Dynamic extensible composite material database design method
Through the dynamic scalable composite material database design method, ORM technology and Redis cache library are used to solve the problem of low data storage and query efficiency in composite material databases, efficient data storage and fast query are achieved, and dynamic expansion and high-frequency access are supported.
Patent Information
- Application Number
- CN202510955143.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-07-11
AI Technical Summary
The existing composite material database is less efficient in adding or querying related data, and cannot meet the rapid storage and retrieval needs of engineers.
Using the dynamic extensible composite material database design method, a TPID database is created through ORM technology, combining the pre-sorted traversal tree model and Redis cache library to realize efficient mapping and data storage of type tables, attribute classification tables, and attribute item tables, support dynamic expansion, and optimize the query process through the pre-sorted traversal tree model and Redis cache library.
It improves the efficiency of engineers in querying and storing data in composite materials databases, reduces the complexity of the traversal time of the tree, supports dynamic expansion of attribute classification and attribute items, and improves the response speed of high-frequency access data.
Smart Images

Figure CN120452641A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer simulation technology, and in particular to a method for designing a dynamic and extensible composite material database. Background Art
[0002] With the trend toward lightweight vehicles, carbon fiber reinforced polymers (CFRP) have become a mainstream material for automotive component development due to their lightweight, high-strength, vibration-reducing, noise-reducing, and fatigue-resistant properties. A composites database is a system specifically designed to store, manage, retrieve, and view composites-related data, including physical and chemical properties, application areas, and production processes.
[0003] However, existing conventional databases are inefficient in adding, deleting or querying relevant data in composite material databases. Summary of the Invention
[0004] In order to meet the storage requirements of basic information, physical properties, chemical properties, process information and other data of different composite materials, and improve the efficiency of engineering personnel in adding, deleting or querying related data in the composite materials database, this application provides a dynamic and scalable composite materials database design method.
[0005] The present application provides a method for designing a dynamic and extensible composite material database using the following technical solutions: A method for designing a dynamic and extensible composite material database comprises the following steps: Step S1: Create a TPID database, create a T table, a P table, and an I table respectively, and map the T table, P table, and I table based on ORM technology to create the TPID database. The T table is a type table, the P table is an attribute classification table, and the I table is an attribute item table. Step S2: managing tree structure data based on the pre-ordered traversal tree model, matching type names in the TPID database with type nodes of the pre-ordered traversal tree model, matching attribute classification names in the TPID database with attribute classification nodes of the pre-ordered traversal tree model, and matching attribute item names in the TPID database with attribute classification nodes of the pre-ordered traversal tree model; Step S3: creating a template table based on the format of the TPID database, collecting data of the composite material based on the template table, and entering or updating the data of the composite material into the TPID database; Step S4: Establish a Redis cache library, determine the frequently accessed attribute classification name based on the data types frequently used by engineers, extract the frequently accessed attribute classification table and store it in the Redis cache library; Step S5: query result acquisition, obtain query instructions, extract data through a pre-sorted traversal tree model based on the category of the query instructions or extract data from the Redis cache library.
[0006] By adopting the above technical solution, a TPID database is created based on the type table, attribute classification table, attribute item table and value table mapping of the composite material through ORM technology, and the type, attribute classification and attribute item of the composite material are respectively associated with the type node, attribute classification node and attribute item node of the pre-ordered traversal tree model. Since the pre-ordered traversal tree model pre-calculates and stores the left value and right value of the node, the tree traversal time complexity is reduced to o (1), which can quickly assist engineers in obtaining the attribute items and attribute item values under different attribute classifications of the composite material, thereby improving the efficiency of engineers in querying the relevant attributes of the composite material from the database. In terms of data entry and update of composite materials, when it is necessary to add or delete attribute classifications or attribute items in the TPID database, the pre-ordered traversal tree model can be used to automatically add or delete attribute classification nodes or attribute item nodes in the TPID database, and automatically update the left value and right value corresponding to each attribute classification node and attribute item node, so that the TPID database can be efficiently and dynamically expanded and adjusted. In addition, through the Redis cache library, one or several attribute classification data that are frequently accessed in composite material-related data queries can be pre-stored. When engineers query and call high-frequency access data, they can directly extract the query items from the Redis cache library. Based on the efficient key-value storage format of the Redis cache library, it can quickly respond to the query needs of engineers and further improve the efficiency of engineers in querying composite material-related data.
[0007] Preferably, the step S1 comprises the following steps: Step S11: Create a type table, attribute classification table, or attribute item table base class BasicBase based on the declarative_base of the SQLAlchemy library; Step S12: creating a serialized base class of a type table, an attribute classification table, or an attribute item table based on the Schema of the Marshmallow library; Step S13: creating a TPI type table and a serialization operation class based on the serialized base class of the type table, attribute classification table or attribute item table; Step S14: Associating type table, attribute table or attribute item table and their corresponding serialization operation classes; Step S15 determines the type of the mapped table. If the mapped table is a type table or an attribute classification table, the mapping process ends. If the mapped table is an attribute item table, a D table is created to record the association between the D table and the attribute classification name, and the mapping process ends. The D table is a value table used to describe the result of the attribute item. Step S16: Determine the type of the attribute item value. If the attribute item value type is integer, floating point or string, create an integer value table, floating point value table or string value table respectively; if the attribute item value type is curve data, perform curve data mapping.
[0008] By adopting the above technical solution, the classified storage of numerical types provides a preset attribute classification. Through a preset value table, attribute item values are uniformly stored, meeting the storage requirements of attribute item values. Therefore, for the values of entered or newly added attribute items, only the classified storage is required, without modifying the field structure of the value table used to store attribute item values. Considering the special characteristics of curve data, curve information tables and curve data tables are mapped and created to store all types of curve data.
[0009] Preferably, step S15 includes the following steps: Step S151: using SQLAlchemy's Table to create a value table associated with the attribute classification, the value table includes an integer value table, a floating point value table, and a string value table; Step S152: Record the association between the integer value table, the floating point value table, and the string value table and the attribute classification name.
[0010] By adopting the above technical solution, by associating the attribute classification table with the integer value table, the floating-point value table, and the string value table, a value table for storing corresponding attribute item values can be created according to the attribute classification and the attribute item numerical type, which can meet the automatic storage under the dynamically extended attribute items and limit the number of value tables.
[0011] Preferably, step S16 includes the following steps: Step S161: obtaining attribute item values as attribute item values of curve data, extracting the corresponding curve data, and creating a curve information table for recording information such as curve name, coordinate axis name, coordinate unit, etc.; Step S162: creating a curve data table for recording the two-dimensional coordinate information and coordinate values of the curve points; Step S163: Add a mapping relationship between the attribute item and the curve data table.
[0012] By adopting the above technical solution, the curve data of the attribute item value type can be stored through the curve information table and the curve data table, which is convenient for engineering personnel to query the curve data of the attribute items related to the composite material.
[0013] Preferably, step S3 includes the following steps: Step S31: inputting or updating the composite material data by data input or file import based on the template table; Step S32: Obtain the entered or updated data. If the entered or updated data contains an attribute item, find the attribute classification name corresponding to the newly added attribute item, insert the newly added attribute item into the attribute item table corresponding to the attribute classification name, and automatically update the left value and right value of each attribute item node under the same attribute classification node through the pre-sorted traversal tree model and store them. Step S33: Based on the data type of the newly added attribute item value, the attribute item value of the newly added attribute item is classified and stored.
[0014] By adopting the above technical solution and using the pre-ordered traversal tree model, when there are new attribute classifications or attribute items in the entered or updated data, the corresponding attribute classifications and attribute items can be added to the corresponding classification or attribute classification table in the TPID table through the pre-ordered traversal tree model, and the left value and right value of the attribute classification node and the attribute item node can be automatically updated in the pre-ordered traversal tree model, thereby realizing dynamic expansion of the TPID database and improving the efficiency of storing composite material data.
[0015] Preferably, step S4 includes the following steps: Step S41: marking the attribute classification table that the engineering personnel focus on with high frequency access to obtain high frequency access data; Step S42: Create a Redis cache library for storing frequently accessed data; Step S43: Acquire the entered or updated data, filter out the frequently accessed data, and update the Redis cache library.
[0016] By adopting the above technical solution and setting up a Redis cache, engineers can filter and store the data they are most interested in during data entry or updates. When engineers enter a query term to find relevant data, if the query term is frequently accessed, the data is directly retrieved from the Redis cache. Due to the Redis cache's efficient key-value storage format, the query term can be retrieved more efficiently, making it more convenient for engineers to query the TPID database.
[0017] Preferably, step S5 includes the following steps: Step S51: Obtain query instructions; Step S52: Determine the type of the query instruction. If the query instruction is a type, attribute classification or attribute item, extract data by traversing the tree model in a pre-ordered manner; if the query instruction is a numerical type, extract data from the Redis cache.
[0018] By adopting the above technical solution, since numerical query items are a relatively high-frequency query category in the actual query process of engineers, numerical data, attribute items to which numerical data belongs, and attribute categories to which numerical data belongs are pre-stored in the Redis database during the process of entering or updating data. When engineers enter query items, if the query items entered are of type, attribute classification, or attribute item class, the corresponding data is retrieved based on the pre-sorted traversal tree model; if the query items are numerical, the data is directly extracted from the Redis cache. Data can be extracted by classification based on the query item category, improving the extraction efficiency of frequently accessed data and ensuring that the database matches the actual query requirements.
[0019] Preferably, extracting data through a pre-sorted traversal tree model includes: calculating the left value and right value boundary values according to the query item name and filtering conditions passed in during the query, extracting row records that meet the left value and right value boundary value range, performing set operations, constructing a composite material classification tree, and returning dictionary structure data.
[0020] By adopting the above technical solution, when the query item is a type class, an attribute classification class, or an attribute item class, the pre-sorted traversal tree model can be used to traverse the type nodes, attribute classification nodes, and attribute item nodes in the TPID database based on the name and filtering conditions of the query item, and filter the row records that meet the left value and right value ranges. After set operations and the construction of the material classification tree, the dictionary structure data is returned to facilitate engineering personnel to obtain the dictionary structure data corresponding to the attribute item.
[0021] Preferably, extracting data through the Redis cache library includes: after obtaining a numerical query item, if the query content exists in the Redis cache library, obtaining the data in the Redis cache library; if the query content does not exist in the Redis cache library, querying the corresponding numerical table from the TPID database to obtain the result, and extracting high-frequency access data from it, creating a storage dictionary in the Redis cache library and storing it.
[0022] By adopting the above technical solution, if the query item is a numerical type and the query content is pre-stored in the Redis database, the data of the query item can be directly obtained from the Redis cache library; if the query content is not stored in the Redis cache library, the data is extracted from the TPID database and stored in the Redis cache database, and the Redis cache library can be updated based on the search count of the query item.
[0023] In summary, the present invention provides a method for designing a dynamic and extensible composite material database, which has at least one of the following beneficial technical effects: 1. Create a TPID database based on the composite material's type table, attribute classification table, attribute item table, and value table mapping through ORM technology, and associate the composite material's type, attribute classification, and attribute item with the type node, attribute classification node, and attribute item node of the pre-ordered traversal tree model respectively. Since the pre-ordered traversal tree model pre-calculates and stores the left and right values of the nodes, the tree traversal time complexity is reduced to o(1). This can quickly assist engineers in obtaining the attribute items and attribute item values under different attribute classifications of composite materials, thereby improving the efficiency of engineers in querying the relevant attributes of composite materials from the database. 2. In terms of composite material data entry and updating, when attribute classifications or attribute items in the TPID database need to be added or deleted, the pre-sorted traversal tree model can be used to automatically add or delete attribute classification nodes or attribute item nodes in the TPID database, and automatically update the left and right values corresponding to each attribute classification node and attribute item node, allowing for efficient dynamic expansion and adjustment of the TPID database. 3. Through the Redis cache library, one or several frequently accessed attribute classification data in composite material-related data queries can be pre-stored. When engineers query and call for frequently accessed data, they can directly extract the query items from the Redis cache library. Based on the efficient key-value storage format of the Redis cache library, it can quickly respond to the query needs of engineers and further improve the efficiency of engineers in querying composite material-related data. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a schematic diagram of the main process of the composite material database design method used in the embodiment of the present application.
[0025] Figure 2 It is a schematic diagram used to illustrate the overall process of step S1 in an embodiment of the present application.
[0026] Figure 3 This is a schematic diagram of an embodiment of the present application used to illustrate the main creation process of the TPID database.
[0027] Figure 4 This is a property classification table used in the embodiment of the present application to display the property classification name of the composite material as mechanical properties; Figure 5 This is a schematic diagram of an embodiment of the present application used to illustrate the overall process of data entry and update.
[0028] Figure 6 This is a schematic diagram of an embodiment of the present application used to illustrate the overall process of TPID database query. DETAILED DESCRIPTION
[0029] The following combination Figures 1-6 This application is described in further detail.
[0030] Example The present application embodiment discloses a method for designing a dynamic and extensible composite material database. Figure 1 , the design method mainly includes the following steps: Step S1: Create a TPID database, create a T table, a P table, and an I table respectively, and map the T table, P table, and I table based on ORM technology to create the TPID database. The T table is a type table, the P table is an attribute classification table, and the I table is an attribute item table. Step S2: managing tree structure data based on the pre-ordered traversal tree model, matching type names in the TPID database with type nodes of the pre-ordered traversal tree model, matching attribute classification names in the TPID database with attribute classification nodes of the pre-ordered traversal tree model, and matching attribute item names in the TPID database with attribute classification nodes of the pre-ordered traversal tree model; Step S3: creating a template table based on the format of the TPID database, collecting data of the composite material based on the template table, and entering or updating the data of the composite material into the TPID database; Step S4: Establish a Redis cache library, determine the frequently accessed attribute classification name based on the data types frequently used by engineers, extract the frequently accessed attribute classification table and store it in the Redis cache library; Step S5: query result acquisition, obtain query instructions, extract data through a pre-sorted traversal tree model based on the category of the query instructions or extract data from the Redis cache library.
[0031] It should be noted that in this embodiment, the T-Table, P-Table, and I-Table are created based on the categories of composite material information. The attribute categories for each type of composite material mainly include data overview, product information, physical and chemical properties, mechanical properties, laminate properties, hygrothermal properties, electrical properties, flame retardancy, and process information. The attribute items are descriptions of the attributes under each attribute category, and the composite material's performance is displayed through the attribute item values, which are the measurement results of the attribute items.
[0032] Through ORM technology, the type table, attribute classification table, attribute item table and attribute item value table of the composite material are mapped to create a TPID database, and the type, attribute classification and attribute item of the composite material are associated with the type node, attribute classification node and attribute item node of the pre-sorted model through the pre-sorted traversal tree model. Since the pre-sorted traversal tree model pre-calculates and stores the left value and right value of the type node, attribute classification node and attribute item node, the traversal time complexity of the TPID four-layer structure tree can be reduced to o (1), which can quickly assist engineering personnel in obtaining the attribute items and attribute item values under different attribute classifications of the composite material, thereby improving the efficiency of engineering personnel in querying the relevant attributes of the composite material from the database.
[0033] In terms of data entry and updating of composite materials, when it is necessary to add or delete attribute classifications or attribute items in the TPID database, the pre-sorted traversal tree model can be used to automatically add or delete attribute classification nodes or attribute item nodes in the structure tree, automatically add or delete corresponding attribute classifications or attribute items, and automatically update the left and right values of the attribute classification nodes and attribute item nodes, so as to efficiently and dynamically expand and adjust the TPID database.
[0034] By setting up the Redis cache library, one or several attribute classification data that are frequently accessed during the engineer's query process can be pre-stored. When the query item entered by the engineer is frequently accessed data, the structure of the query item can be directly extracted from the Redis cache library. Based on the efficient key-value storage format of the Redis cache library, the query needs of the engineer can be quickly responded to, which can further improve the efficiency of the engineer's query related data of composite materials.
[0035] Reference Figure 2 and Figure 3 In this embodiment, the TPID database in step S1 mainly includes the following steps: Step S11: Create a type table, attribute classification table, or attribute item table base class BasicBase based on the declarative_base of the SQLAlchemy library; Step S12: creating a serialized base class of a type table, an attribute classification table, or an attribute item table based on the Schema of the Marshmallow library; Step S13: creating a TPI type table and a serialization operation class based on the serialized base class of the type table, attribute classification table or attribute item table; Step S14: Associating type table, attribute table or attribute item table and their corresponding serialization operation classes; Step S15 determines the type of the mapped table. If the mapped table is a type table or an attribute classification table, the mapping process ends. If the mapped table is an attribute item table, a D table is created to record the association between the D table and the attribute classification name, and the mapping process ends. The D table is a value table used to describe the result of the attribute item. Step S16: Determine the type of the attribute item value. If the attribute item value type is integer, floating point or string, create an integer value table, floating point value table or string value table respectively; if the attribute item value type is curve data, perform curve data mapping.
[0036] By classifying and storing attribute item values according to numerical types, a preset attribute classification is provided. The attribute item values are uniformly stored through a preset value table, which can meet the storage requirements of attribute item values. Therefore, for the values of entered or newly added attribute items, they only need to be classified and stored without modifying the field structure of the value table used to store attribute item values.
[0037] The steps of creating the value table in step S15 mainly include: Step S151: using SQLAlchemy's Table to create a value table associated with the attribute classification, the value table includes an integer value table, a floating point value table, and a string value table; Step S152: Record the association between the integer value table, the floating point value table, and the string value table and the attribute classification name.
[0038] By associating the attribute classification table with the integer value table, floating-point value table, and string value table, a value table for storing corresponding attribute item values can be created according to the attribute classification and the numerical type of the attribute item. This can meet the automatic classification storage of dynamically expanded attribute item values and limit the number of value tables.
[0039] The step of storing the curve data in step S16 mainly includes: Step S161: obtaining attribute item values as attribute item values of curve data, extracting the corresponding curve data, and creating a curve information table for recording information such as curve name, coordinate axis name, coordinate unit, etc.; Step S162: creating a curve data table for recording the two-dimensional coordinate information and coordinate values of the curve points; Step S163: Add a mapping relationship between the attribute item and the curve data table.
[0040] Through the curve information table and curve data table, the attribute item value type of curve data can be stored, which is convenient for engineers to query the curve data of composite material related attribute items.
[0041] For example, see Figure 4In this embodiment, for example, a composite material with a mechanical properties attribute category is created. The attributes under this attribute category include longitudinal tensile strength, longitudinal compressive strength, and transverse tensile strength. The values for these attributes are floating-point values, and a floating-point value table is created to store the test results for each attribute under this composite material's mechanical properties. When entering data for this composite material, the values for the mechanical properties attributes are automatically categorized and stored in the value table without modifying the field structure of the value table.
[0042] In this embodiment, step S3 includes the following steps: Step S31: inputting or updating the composite material data by data input or file import based on the template table; Step S32: Obtain the entered or updated data. If the entered or updated data contains an attribute item, find the attribute classification name corresponding to the newly added attribute item, insert the newly added attribute item into the attribute item table corresponding to the attribute classification name, and automatically update the left value and right value of each attribute item node under the same attribute classification node through the pre-sorted traversal tree model and store them. Step S33: Based on the data type of the newly added attribute item value, the attribute item value of the newly added attribute item is classified and stored.
[0043] Reference Figure 5 By using the pre-sorted traversal tree model, when there are new attribute classifications or attribute items in the entered or updated data, the corresponding attribute classifications and attribute items can be added to the corresponding classification or attribute classification table in the TPID table through the pre-sorted traversal tree model, and the left value and right value of the attribute classification node and attribute item node can be automatically updated in the pre-sorted traversal tree model to realize the dynamic expansion of the TPID database and improve the efficiency of storing composite material data.
[0044] After the TPID database is created, a template table can be created based on the table format of the TPID database, or a template table can be inserted into the database. During the process of entering and updating the TPID database, engineers can import data into the TPID database by batch importing files or selecting a template table in the window.
[0045] Wherein, step S4 includes the following steps: Step S41: marking the attribute classification table that the engineering personnel focus on with high frequency access to obtain high frequency access data; Step S42: Create a Redis cache library for storing frequently accessed data; Step S43: Acquire the entered or updated data, filter out the frequently accessed data, and update the Redis cache library.
[0046] By setting up the Redis cache, engineers can filter and store the data they're most interested in during data entry or updates. When engineers enter a query for related data, if the query item is frequently accessed, the data is directly retrieved from the Redis cache. Because the Redis cache features efficient key-value storage, query items can be retrieved more efficiently, making it easier for engineers to query the TPID database.
[0047] Step S5 includes the following steps: Step S51: Obtain query instructions; Step S52: Determine the type of the query instruction. If the query instruction is a type, attribute classification or attribute item, extract data by traversing the tree model in a pre-ordered manner; if the query instruction is a numerical type, extract data from the Redis cache.
[0048] Reference Figure 6 In this embodiment, when the query item is a type class, an attribute classification class, or an attribute item class, the pre-ordered traversal tree model can be used to traverse the type nodes, attribute classification nodes, and attribute item nodes of the TPID database based on the name of the query item and the filtering conditions, and filter the row records that meet the left value and right value ranges. After set operations and the construction of the material classification tree, the dictionary structure data is returned to facilitate engineering personnel to obtain the dictionary structure data corresponding to the attribute item.
[0049] Among them, extracting data through the pre-sorted traversal tree model includes: calculating the left value and right value boundary values according to the query item name and filtering conditions passed in during the query, extracting row records that meet the left value and right value boundary value range, performing set operations, building a composite material classification tree, and returning dictionary structure data.
[0050] When the query item is a type class, attribute classification class, or attribute item class, the pre-sorted traversal tree model can be used to traverse the type nodes, attribute classification nodes, and attribute item nodes in the TPID database based on the name and filtering conditions of the query item, and filter the row records that meet the left value and right value ranges. After set operations and building a material classification tree, the dictionary structure data is returned to facilitate engineering personnel to obtain the dictionary structure data corresponding to the attribute item.
[0051] Extracting data through the Redis cache library includes: after obtaining a numerical query item, if the query content exists in the Redis cache library, obtaining the data in the Redis cache library; if the query content does not exist in the Redis cache library, querying the corresponding numerical table in the TPID database to obtain the result, extracting frequently accessed data from it, creating a storage dictionary in the Redis cache library and storing it.
[0052] If the query item is a numerical value and the query content is pre-stored in the Redis database, the data of the query item can be directly obtained from the Redis cache library; if the query content is not stored in the Redis cache library, the data is extracted from the TPID database and stored in the Redis cache database, and the Redis cache library can be updated based on the search count of the query item.
[0053] The above are all preferred embodiments of the present application, and are not intended to limit the scope of protection of the present application in sequence. Therefore, any equivalent changes made based on the structure, shape, and principle of the present application should be included in the scope of protection of the present application.
Claims
1. A method for designing a dynamic and extensible composite material database, characterized in that: The following steps are involved: Step S1: Create a TPID database, create a T table, a P table, and an I table respectively, and map the T table, P table, and I table based on ORM technology to create the TPID database. The T table is a type table, the P table is an attribute classification table, and the I table is an attribute item table. Step S2: managing tree structure data based on the pre-ordered traversal tree model, matching type names in the TPID database with type nodes of the pre-ordered traversal tree model, matching attribute classification names in the TPID database with attribute classification nodes of the pre-ordered traversal tree model, and matching attribute item names in the TPID database with attribute classification nodes of the pre-ordered traversal tree model; Step S3: creating a template table based on the format of the TPID database, collecting data of the composite material based on the template table, and entering or updating the data of the composite material into the TPID database; Step S4: Establish a Redis cache library, determine the frequently accessed attribute classification name based on the data types frequently used by engineers, extract the frequently accessed attribute classification table and store it in the Redis cache library; Step S5: query result acquisition, obtain query instructions, extract data through a pre-sorted traversal tree model based on the category of the query instructions or extract data from the Redis cache library.
2. A method for designing a dynamic and extensible composite material database according to claim 1, characterized in that: Described step S1 comprises the following steps: Step S11: Create a type table, attribute classification table, or attribute item table base class BasicBase based on the declarative_base of the SQLAlchemy library; Step S12: creating a serialized base class of a type table, an attribute classification table, or an attribute item table based on the Schema of the Marshmallow library; Step S13: creating a TPI type table and a serialization operation class based on the serialized base class of the type table, attribute classification table or attribute item table; Step S14: Associating type table, attribute table or attribute item table and their corresponding serialization operation classes; Step S15 determines the type of the mapped table. If the mapped table is a type table or an attribute classification table, the mapping process ends. If the mapped table is an attribute item table, a D table is created to record the association between the D table and the attribute classification name, and the mapping process ends. The D table is a value table used to describe the result of the attribute item. Step S16: Determine the type of the attribute item value. If the attribute item value type is integer, floating point or string, create an integer value table, floating point value table or string value table respectively; if the attribute item value type is curve data, perform curve data mapping.
3. A method for designing a dynamic and extensible composite material database according to claim 2, characterized in that: Step S15 includes the following steps: Step S151: using SQLAlchemy's Table to create a value table associated with the attribute classification, the value table includes an integer value table, a floating point value table, and a string value table; Step S152: Record the association between the integer value table, the floating point value table, and the string value table and the attribute classification name.
4. A method for designing a dynamic and extensible composite material database according to claim 3, characterized in that: Step S16 includes the following steps: Step S161: Obtaining attribute item values as attribute item values of curve data, extracting the corresponding curve data, and creating a curve information table for recording the curve name, coordinate axis name, and coordinate unit; Step S162: creating a curve data table for recording the two-dimensional coordinate information and coordinate values of the curve points; Step S163: Add a mapping relationship between the attribute item and the curve data table.
5. A method for designing a dynamic and extensible composite material database according to claim 4, characterized in that: Step S3 includes the following steps: Step S31: inputting or updating the composite material data by data input or file import based on the template table; Step S32: Obtain the entered or updated data. If the entered or updated data contains an attribute item, find the attribute classification name corresponding to the newly added attribute item, insert the newly added attribute item into the attribute item table corresponding to the attribute classification name, and automatically update the left value and right value of each attribute item node under the same attribute classification node through the pre-sorted traversal tree model and store them. Step S33: Based on the data type of the newly added attribute item value, the attribute item value of the newly added attribute item is classified and stored.
6. A method for designing a dynamic and extensible composite material database according to claim 5, characterized in that: Step S4 includes the following steps: Step S41: marking the attribute classification table that the engineering personnel focus on with high frequency access to obtain high frequency access data; Step S42: Create a Redis cache library for storing frequently accessed data; Step S43: Acquire the entered or updated data, filter out the frequently accessed data, and update the Redis cache library.
7. A method for designing a dynamic and extensible composite material database according to claim 6, characterized in that: The step S5 comprises the following steps: Step S51: Obtain query instructions; Step S52: Determine the type of the query instruction. If the query instruction is a type, attribute classification or attribute item, extract data by traversing the tree model in a pre-ordered manner; if the query instruction is a numerical type, extract data from the Redis cache.
8. The method for designing a dynamic and extensible composite material database according to claim 7, characterized in that: Extracting data through the pre-sorted traversal tree model includes: calculating the left value and right value boundary values according to the query item name and filter conditions passed in during the query, extracting row records that meet the left value and right value boundary value range, performing set operations, building a composite material classification tree, and returning dictionary structure data.
9. The method for designing a dynamic and extensible composite material database according to claim 7, characterized in that: Extracting data through the Redis cache library includes: after obtaining a numerical query item, if the query content exists in the Redis cache library, obtaining the data in the Redis cache library; if the query content does not exist in the Redis cache library, querying the corresponding numerical table in the TPID database to obtain the result, extracting frequently accessed data from it, creating a storage dictionary in the Redis cache library and storing it.
Citation Information
Patent Citations
Database primary memory indexing method
CN103823865A
Efficient use of trie data structure in databases
CN112219199A
Data structure design method of composite material database
CN117708082A
Method for designing tree data storage mode in relational database by using preorder traversal
CN119537369A
System and method for ranking of database tables for use with extract, transform, load processes
US20210049183A1