Three-dimensional model feature information management method, device, electronic equipment and medium
By using a unified data type to store the feature information of the three-dimensional model in the database, the problem that existing databases cannot efficiently manage the feature information of the three-dimensional model is solved, and efficient query and data consistency are achieved.
Patent Information
- Application Number
- CN202111592653.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2041-12-23
AI Technical Summary
Existing databases cannot efficiently store and manage feature information of three-dimensional models, including geometric information, visual information and correspondence between them.
A unified data type is used to store feature information of the three-dimensional model in the database, including multiple parts: for storing geometric information, visual information and correspondence between them. In this way, the database can make full use of its own query capabilities and indexing mechanism to improve query performance.
It realizes efficient storage and management of three-dimensional model feature information, improves query performance, is easy for users to master, and has low learning costs, and solves the data consistency problem.
Smart Images

Figure CN114357208B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of database technology, and in particular to a method, device, electronic device and medium for managing feature information of a three-dimensional model. Background Art
[0002] With the rapid development of earth observation technology, the Internet of Things, and digital twin technology, multidimensional spatial data represented by BIM (building information object), GIS (geographic information system), and spatiotemporal mobile objects have exploded and become an important foundation for new infrastructure and digital frameworks. A three-dimensional model is a polygonal representation of an object, which can be displayed on a computer monitor or other display device. A three-dimensional model can be a model of a real object formed by sampling and modeling objects in the real world, or a model of a virtual object generated by computer programming. The feature information of a three-dimensional model includes information such as the geometry, texture, and material of the three-dimensional model. It is an important data resource and plays an increasingly important role in the above-mentioned technical fields. Databases are an important means of data storage and management. However, there is currently no database that can efficiently support the storage and management of the feature information of three-dimensional models. Summary of the invention
[0003] In order to solve the problems in the related art, the embodiments of the present disclosure provide a method, device, electronic device, medium and program product for managing feature information of a three-dimensional model.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for managing feature information of a three-dimensional model.
[0005] Specifically, the feature information management method of the three-dimensional model includes:
[0006] Acquire feature information of the three-dimensional model, the feature information including geometric information, visual information, and a correspondence between the geometric information and the visual information of the three-dimensional model;
[0007] Data records of the three-dimensional model are stored in a database, wherein the data records are used to store feature information of the three-dimensional model and have a specified data type, wherein the specified data type includes multiple parts, wherein a first part is used to store the geometric information, a second part is used to store the visual information, and a third part is used to store the correspondence between the geometric information and the visual information.
[0008] In combination with the first aspect, in a first implementation of the first aspect of the present disclosure, the specified data type further includes any one or more of the following parts:
[0009] The fourth part is used to store additional geometric attribute information of the three-dimensional model and the detail level of the three-dimensional model;
[0010] The fifth part is used to store the temporal information of the three-dimensional model.
[0011] In combination with the first aspect, in a second implementation of the first aspect of the present disclosure, the geometric information includes information for describing the geometric shape and / or spatial position of the three-dimensional model, and the visual information of the three-dimensional model is information for describing how to visualize the three-dimensional model.
[0012] In combination with the first aspect, in a third implementation of the first aspect of the present disclosure, storing the data record of the three-dimensional model in the database includes:
[0013] Determine whether the acquired visual information of the three-dimensional model has been stored in the database; if so, store the visual information of the three-dimensional model in the second part based on the stored visual information; if not, store the visual information of the three-dimensional model in the second part based on the acquired visual information.
[0014] In combination with the third implementation of the first aspect, in a fourth implementation of the first aspect of the present disclosure:
[0015] The visual information includes texture information and material information;
[0016] The second part includes: a first sub-part for storing texture information of the three-dimensional model; a second sub-part for storing material information of the three-dimensional model;
[0017] The third part includes: a fourth sub-part, which is used to store the corresponding relationship between the geometric information and the material information; and a fifth sub-part, which is used to store the corresponding relationship between the material information and the texture information.
[0018] In combination with the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect of the present disclosure, storing the visual information of the three-dimensional model in the second part includes:
[0019] determining whether the acquired material information of the three-dimensional model has been stored in the database, and if so, storing the material information of the three-dimensional model in the second sub-portion based on the stored material information, and if not, storing the material information of the three-dimensional model in the second sub-portion based on the acquired material information;
[0020] Determine whether the acquired texture information of the three-dimensional model has been stored in the database, if yes, store the texture information of the three-dimensional model in the first sub-portion based on the stored texture information, if no, store the texture information of the three-dimensional model in the first sub-portion based on the acquired texture information;
[0021] A mapping relationship from the material information to the texture information is stored in the second sub-part.
[0022] In combination with the fifth implementation manner of the first aspect, in a sixth implementation manner of the first aspect of the present disclosure, storing the data record of the three-dimensional model in the database includes:
[0023] storing the correspondence between the geometric information and the material information of the three-dimensional model in the fourth sub-part;
[0024] The corresponding relationship between the material information and the texture information of the three-dimensional model is stored in the fifth sub-part.
[0025] In combination with the first aspect, in a seventh implementation manner of the first aspect of the present disclosure, the method further includes:
[0026] Get the query request;
[0027] Retrieving feature information of corresponding three-dimensional models from the database according to the query request;
[0028] Constructing a computational model according to the retrieved feature information of the three-dimensional model and the query request;
[0029] Using the calculation model to calculate and obtain a query result corresponding to the query request;
[0030] The query result is outputted. In a second aspect, a feature information management device for a three-dimensional model is provided in an embodiment of the present disclosure.
[0031] Specifically, the feature information management device of the three-dimensional model includes:
[0032] A first acquisition module is configured to acquire feature information of a three-dimensional model, wherein the feature information includes geometric information, visual information, and a correspondence between the geometric information and the visual information of the three-dimensional model;
[0033] A storage module is configured to store data records of the three-dimensional model in a database, wherein the data records are used to store feature information of the three-dimensional model and have a specified data type, wherein the specified data type includes multiple parts, wherein a first part is used to store the geometric information, a second part is used to store the visual information, and a third part is used to store the correspondence between the geometric information and the visual information.
[0034] In combination with the second aspect, in a first implementation of the second aspect of the present disclosure, the specified data type further includes any one or more of the following parts:
[0035] The fourth part is used to store additional geometric attribute information of the three-dimensional model and the detail level of the three-dimensional model;
[0036] The fifth part is used to store the temporal information of the three-dimensional model.
[0037] In combination with the second aspect, in a second implementation of the second aspect of the present disclosure, the geometric information includes information used to describe the geometric shape and / or spatial position of the three-dimensional model, and the visual information of the three-dimensional model is information used to describe how to visualize the three-dimensional model.
[0038] In combination with the second aspect, in a third implementation of the second aspect of the present disclosure, storing the data record of the three-dimensional model in the database includes:
[0039] Determine whether the acquired visual information of the three-dimensional model has been stored in the database; if so, store the visual information of the three-dimensional model in the second part based on the stored visual information; if not, store the visual information of the three-dimensional model in the second part based on the acquired visual information.
[0040] In combination with the third implementation of the second aspect, in a fourth implementation of the second aspect of the present disclosure:
[0041] The visual information includes texture information and material information;
[0042] The second part includes: a first sub-part for storing texture information of the three-dimensional model; a second sub-part for storing material information of the three-dimensional model;
[0043] The third part includes: a fourth sub-part, which is used to store the corresponding relationship between the geometric information and the material information; and a fifth sub-part, which is used to store the corresponding relationship between the material information and the texture information.
[0044] In combination with the fourth implementation manner of the second aspect, in a fifth implementation manner of the second aspect of the present disclosure, storing the visual information of the three-dimensional model in the second part includes:
[0045] determining whether the acquired material information of the three-dimensional model has been stored in the database, and if so, storing the material information of the three-dimensional model in the second sub-portion based on the stored material information, and if not, storing the material information of the three-dimensional model in the second sub-portion based on the acquired material information;
[0046] Determine whether the acquired texture information of the three-dimensional model has been stored in the database, if yes, store the texture information of the three-dimensional model in the first sub-portion based on the stored texture information, if no, store the texture information of the three-dimensional model in the first sub-portion based on the acquired texture information;
[0047] A mapping relationship from the material information to the texture information is stored in the second sub-part.
[0048] In combination with the fifth implementation manner of the second aspect, in a sixth implementation manner of the second aspect of the present disclosure, storing the data record of the three-dimensional model in the database includes:
[0049] storing the correspondence between the geometric information and the material information of the three-dimensional model in the fourth sub-part;
[0050] The corresponding relationship between the material information and the texture information of the three-dimensional model is stored in the fifth sub-part.
[0051] In combination with the second aspect, in a seventh implementation of the second aspect of the present disclosure, the device further includes:
[0052] A second acquisition module is configured to acquire a query request;
[0053] A retrieval module is configured to retrieve feature information of a corresponding three-dimensional model from the database according to the query request;
[0054] A construction module is configured to construct a calculation model according to the retrieved feature information of the three-dimensional model and the query request;
[0055] A calculation module, configured to use the calculation model to calculate and obtain a query result corresponding to the query request;
[0056] The output module is configured to output the query result.
[0057] In a third aspect, an embodiment of the present disclosure provides a database management system, including:
[0058] A database, wherein the database stores a texture table, a material table, a three-dimensional model table, an index table, and three-dimensional model metadata, wherein the texture table is used to store texture content of the three-dimensional model, the material table is used to store material information of the three-dimensional model defined by a user, the three-dimensional model table is used to store data records of the three-dimensional model, the data records are used to store feature information of the three-dimensional model and have a specified data type, the feature information includes geometric information, visual information, and a correspondence between the geometric information and the visual information of the three-dimensional model, the specified data type includes multiple parts, wherein a first part is used to store the geometric information, a second part is used to store the visual information, and a third part is used to store the correspondence between the geometric information and the visual information, the visual information includes texture and material, the index table is used to store indexes of the data records of the three-dimensional model, and the three-dimensional model metadata is used to store metadata information of the three-dimensional model table;
[0059] A parser, configured to parse the user's query request;
[0060] An optimizer, configured to optimize the parsing result of the user's query request;
[0061] The executor is configured to query the database according to the optimized parsing result.
[0062] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement a method as described in any one of the first aspect to the seventh implementation manner of the first aspect.
[0063] In a fifth aspect, a computer-readable storage medium is provided in an embodiment of the present disclosure, on which computer instructions are stored. When the computer instructions are executed by a processor, the method described in any one of the first aspect to the seventh implementation manner of the first aspect is implemented.
[0064] In a sixth aspect, a computer program product is provided in an embodiment of the present disclosure, comprising computer instructions, which, when executed by a processor, implement the method steps described in any one of the first aspect to the seventh implementation manner of the first aspect.
[0065] According to the technical solution provided by the embodiment of the present disclosure, a unified data type is used to store and manage the feature information such as the geometry and visual information of the three-dimensional model in the database, and the feature information of the three-dimensional model can be queried and retrieved by using the query capability of the database itself, making full use of the index mechanism of the database itself, improving the query performance, and making it easy for users to master and the learning cost is low. At the same time, the embodiment of the present disclosure uses the database function to maintain the data consistency problem, solving the problem that the middleware cannot perceive the modification of the database under the traditional middleware solution.
[0066] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:
[0068] Figure 1 A flowchart of a method for managing feature information of a three-dimensional model according to an embodiment of the present disclosure is shown.
[0069] Figure 2 A schematic diagram showing data records with specified data types according to an embodiment of the present disclosure.
[0070] Figure 3 The process of creating a data record of a three-dimensional model according to an embodiment of the present disclosure is shown.
[0071] Figure 4 The process of querying data records of a three-dimensional model according to an embodiment of the present disclosure is shown.
[0072] Figure 5 The flow of the feature information management method according to an embodiment of the present disclosure is shown.
[0073] Figure 6 The architecture of a database system for storing data records of three-dimensional data according to an embodiment of the present disclosure is shown.
[0074] Figure 7 A structural block diagram of a feature information management device for a three-dimensional model according to an embodiment of the present disclosure is shown.
[0075] Figure 8 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0076] Fig. 9 A schematic diagram showing the structure of a computer system suitable for implementing the method according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0077] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.
[0078] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.
[0079] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0080] In the present disclosure, the acquisition of user information or user data is an operation authorized and confirmed by the user, or actively selected by the user.
[0081] As mentioned above, with the rapid development of earth observation technology, the Internet of Things, and digital twin technology, multidimensional spatial data represented by BIM (building information object), GIS (geographic information system), and spatiotemporal mobile objects have exploded and become an important foundation for new infrastructure and digital frameworks. A three-dimensional model is a polygonal representation of an object that can be displayed on a computer monitor or other display device. A three-dimensional model can be a model of a real object formed by sampling and modeling objects in the real world, or it can be a model of a virtual object generated by computer programming. The feature information of a three-dimensional model includes information such as the geometry, texture, and material of the three-dimensional model. It is an important data resource and plays an increasingly important role in the above-mentioned technical fields. Databases are an important means of data storage and management. However, there is currently no database that can efficiently support the storage and management of the feature information of three-dimensional models.
[0082] For example, databases such as PostGIS can only manage 3D geometry-like data, and cannot manage visual information such as materials and textures in a unified manner. Instead, they must associate geometry and visual information in the middle layer. Traditional GIS vendors such as EsriArcGIS and SuperMap all use middleware to manage 3D models, and need to access data through SDK (software development kit), which cannot fully utilize the database's own query capabilities and calculation push capabilities.
[0083] The existing 3D model feature information management solutions all adopt the middleware mode, which has the following problems:
[0084] 1. It is not possible to use the database to uniformly manage geometric attributes and visual attributes. Accessing data requires SDK programming, and it is not possible to directly use the database's own query capabilities to access data. It is difficult for users to master and the learning cost is high;
[0085] 2. Lack of data consistency. When the data in the database is modified, the data in the middleware will not be modified synchronously, resulting in inconsistent data and incorrect search results;
[0086] 3. Low computing performance. Calculations involving 3D model feature information must be performed after obtaining data from the database through the middleware, which has a large transmission overhead and cannot fully utilize the database query capabilities of the database end.
[0087] An embodiment of the present disclosure provides a method for managing feature information of a three-dimensional model, comprising: acquiring feature information of the three-dimensional model, the feature information comprising geometric information, visual information, and a correspondence between the geometric information and the visual information of the three-dimensional model; storing a data record of the three-dimensional model in a database, the data record being used to store the feature information of the three-dimensional model and having a specified data type, the specified data type comprising a plurality of parts, wherein a first part is used to store the geometric information, a second part is used to store the visual information, and a third part is used to store the correspondence between the geometric information and the visual information.
[0088] The disclosed embodiment uses a unified data type to store and manage feature information such as geometry and visual information of a 3D model in a database, and can use the database's own query capabilities to query and retrieve the feature information of the 3D model, making full use of the database's own indexing mechanism, improving query performance, and making it easy for users to master and low in learning costs. At the same time, the disclosed embodiment uses database functions to maintain data consistency issues, solving the problem that the middleware cannot perceive when the database is modified under the traditional middleware solution.
[0089] Figure 1 FIG. 1 is a flow chart showing a method for managing feature information of a three-dimensional model according to an embodiment of the present disclosure. Figure 1 As shown, the feature information management method of the three-dimensional model includes the following steps S101-S102:
[0090] In step S101, feature information of a three-dimensional model is obtained, where the feature information includes geometric information, visual information, and a correspondence between the geometric information and the visual information of the three-dimensional model;
[0091] In step S102, data records of the three-dimensional model are stored in a database, wherein the data records are used to store feature information of the three-dimensional model and have a specified data type, wherein the specified data type includes multiple parts, wherein a first part is used to store the geometric information, a second part is used to store the visual information, and a third part is used to store the correspondence between the geometric information and the visual information.
[0092] According to an embodiment of the present disclosure, the three-dimensional model may be a model of a real object formed by sampling and modeling objects in the real world, or may be a model of a virtual object generated by computer programming.
[0093] The geometric information of the three-dimensional model is information used to describe the geometric shape and / or spatial position of the three-dimensional model, such as the size and coordinates of the three-dimensional model or each part of the three-dimensional model.
[0094] The visual information of the three-dimensional model is information used to describe how to visualize the three-dimensional model, including, for example, texture information and material information.
[0095] The texture of a 3D model usually refers to the grooves that make the surface of the 3D model appear uneven, and also includes color patterns on the smooth surface of the 3D model. The texture information of the 3D model is usually a picture that can reflect these grooves and / or patterns.
[0096] The material information of the 3D model is information used to render the visual attributes of the 3D model surface, for example, including any one or more of the following: the illumination model of the 3D model surface, the 3D model surface brightness, the 3D model transparency, the texture information corresponding to the material of the 3D model, and the user-defined material information. The illumination model is, for example, any one or more of the following light illumination models: ambient light, scattered light, and specular reflection light.
[0097] The correspondence between the geometric information of the 3D model and the visual information is used to describe which visual information corresponds to each position of the 3D model. For example, assuming that the 3D model is a building, which includes exterior walls, doors, windows and other parts, the correspondence between the geometric information of the 3D model and the visual information can be used to describe the texture and material of the exterior wall, the texture and material of the door, the texture and material of the window, and so on.
[0098] According to an embodiment of the present disclosure, a specified data type for storing feature information of a three-dimensional model can be defined in a database, and the specified data type includes multiple parts, wherein a first part is used to store the geometric information, a second part is used to store the visual information, and a third part is used to store the correspondence between the geometric information and the visual information.
[0099] According to an embodiment of the present disclosure, each part of the specified data type may be implemented in one table in a database, or may be implemented in multiple interrelated tables, each table implementing one or more parts of the specified data type.
[0100] The disclosed embodiment uses a unified data type to store and manage feature information such as geometry and visual information of a 3D model in a database, and can use the database's own query capabilities to query and retrieve the feature information of the 3D model, making full use of the database's own indexing mechanism, improving query performance, and making it easy for users to master and low in learning costs. At the same time, the disclosed embodiment uses database functions to maintain data consistency issues, solving the problem that the middleware cannot perceive when the database is modified under the traditional middleware solution.
[0101] Figure 2 A schematic diagram showing data records with specified data types according to an embodiment of the present disclosure.
[0102] like Figure 2 As shown, T1 is a 3D model table for storing data records of 3D models. Each 3D model data record may include feature information of the 3D model stored in a specified data type (e.g., called "3D model type"), as well as additional information such as the model name A1, creation time A2, etc.
[0103] The specified data type may include multiple parts, such as a first part G, a second part V, a third part MP, a fourth part A, a fifth part TS, etc. According to actual needs, the specified data type may also include other parts for storing more characteristic information of the three-dimensional model.
[0104] The first part G is used to store geometric information of the three-dimensional model, and the geometric information is used to describe the geometric shape, spatial position, etc. of the three-dimensional model, for example, the size, position coordinates, etc. of the three-dimensional model and / or each part of the three-dimensional model.
[0105] The second part V is used to store visual information of the three-dimensional model. The second part may include a first sub-part and a second sub-part. The first sub-part is used to store texture information T of the three-dimensional model, and the second sub-part is used to store material information M of the three-dimensional model.
[0106] The texture information T includes, for example, the height H of the texture, the width W of the texture, the format and compression method C of the texture image, and the texture content or path address U1. The texture content may be binary data corresponding to the texture image, and the binary data may be stored in the first sub-part. The texture path address may point to a texture table, in which the binary data corresponding to the texture image and the corresponding index are stored. Alternatively, the texture path address may point to the storage location of the texture image, and the texture image may be stored in a file system or in an object storage manner. The texture image of the three-dimensional model may be obtained according to the texture content or path address U1.
[0107] The material information M is information used to render the visual attributes of the surface of the three-dimensional model, for example, including any one or more of the following: the illumination model of the surface of the three-dimensional model, the surface brightness S of the three-dimensional model, the transparency TD of the three-dimensional model, the texture information I corresponding to the material of the three-dimensional model, and the user-defined material information U2. The illumination model includes, for example, an ambient illumination model AL and a scattered illumination model D, and may also include a specular reflection illumination model, etc. The user-defined material information U2 may include, for example, gloss information and roughness information of the material, etc., which may be stored in the second sub-part in the form of binary data, or may be stored in the second sub-part in the form of a path address pointing to a material table, in which the binary data of the user-defined material information and the corresponding index are stored. Alternatively, the material information U2 may point to the file storage location of the user-defined material information.
[0108] According to an embodiment of the present disclosure, each type of material information has corresponding texture information, that is, each type of material information can be mapped to corresponding texture information, and the mapping relationship is stored in the texture information I corresponding to the material of the three-dimensional model, so that the corresponding texture information can be added when rendering any material.
[0109] The third part MP is used to store the correspondence between the geometric information G and the visual information V, and includes a fourth sub-part and a fifth sub-part. The fourth sub-part is used to store the correspondence GM between the geometric information G and the material information M, and the fifth sub-part is used to store the correspondence TM between the material information M and the texture information T.
[0110] The correspondence GM between the geometric information G and the material information M is used to describe which materials each part of the 3D model corresponds to, so that these parts can be rendered according to the material information. The material information stores the correspondence between the material information and the texture information, so when rendering according to the material information, the texture information can be superimposed. The correspondence TM between the material information M and the texture information T describes which texture information each material information of the 3D model corresponds to, and which material information each texture information of the 3D model corresponds to, so that users can query and manage the correspondence between the material information and the texture information.
[0111] The fourth part A is used to store additional geometric attribute information AA and detail level L of the 3D model. The additional geometric attribute information AA includes, for example, vertex normal vectors and face normal vectors of the 3D model, or a geometric scaling factor of the 3D model relative to another 3D model, etc. The detail level indicates how much detail the 3D model has. The higher the detail level, the richer the detail of the 3D model.
[0112] The fifth part TS is used to store the temporal information of the 3D model, such as the generation and disappearance time of each part of the 3D model, and so on.
[0113] Figure 3 The process of creating a data record of a three-dimensional model according to an embodiment of the present disclosure is shown.
[0114] like Figure 3 As shown, the user sends a request for creating a data record of a three-dimensional model to the server. For example, the user sends a request for creating a data record of a three-dimensional model written in SQL language to the server.
[0115] The server parses and optimizes the received request for creating a data record of a three-dimensional model to obtain feature information of the three-dimensional model, including geometric information, visual information, and a correspondence between the geometric information and the visual information. Then, the server determines whether the obtained visual information of the three-dimensional model has been stored in the database, and if so, stores the visual information of the three-dimensional model in the second part of the specified data type of the three-dimensional model based on the stored visual information, and if not, stores the visual information of the three-dimensional model in the second part of the specified data type of the three-dimensional model based on the obtained visual information.
[0116] Specifically, the server can determine whether the material information of the three-dimensional model has been stored in the database. For example, the server can maintain identification information or summary information of the stored material information to determine whether the acquired material information of the three-dimensional model has been stored in the database. If the material information of the three-dimensional model has been stored in the database, the database can be instructed to store the material information in the second sub-part of the second part according to the stored material information, so as to reduce the amount of data written by the server to the database, save read and write resources, and improve the storage speed. For example, the stored material information can be copied to the second sub-part, or a reference path to the stored material information can be stored in the second sub-part. If the material information of the three-dimensional model is not stored in the database, the server sends the acquired material information of the three-dimensional model to the database for storage.
[0117] Then, the server determines whether the texture information corresponding to the material information of the three-dimensional model has been stored in the database. For example, the server can maintain the identification information or summary information of the stored texture information to determine whether the acquired texture information of the three-dimensional model has been stored in the database. If the texture information of the three-dimensional model has been stored in the database, the database can be instructed to store the texture information in the first sub-part of the second part according to the stored texture information, so as to reduce the amount of data written by the server to the database, save read and write resources, and improve the storage speed. For example, the stored texture information can be copied to the first sub-part, or a reference path to the stored texture information can be stored in the first sub-part. If the texture information of the three-dimensional model is not stored in the database, the server sends the acquired texture information of the three-dimensional model to the database for storage.
[0118] Then, the mapping relationship between the material information and texture information of the three-dimensional model is stored in the second sub-part of the specified data type of the three-dimensional model, the correspondence between the geometric information and material information of the three-dimensional model is stored in the fourth sub-part, and the correspondence between the material information and texture information of the three-dimensional model is stored in the fifth sub-part.
[0119] If the designated data model includes a fourth part and a fifth part, the corresponding three-dimensional model additional geometric attribute information and temporal information are stored in the fourth part and the fifth part respectively.
[0120] Then, the spatial index information of the three-dimensional model, such as the spatial position coordinates of the three-dimensional model, is stored in the database. The spatial index information can be used to query the three-dimensional model.
[0121] Figure 4 The process of querying data records of a three-dimensional model according to an embodiment of the present disclosure is shown.
[0122] like Figure 4As shown, the user sends a request for querying data records of the three-dimensional model to the server. For example, the user sends a request for querying data records of the three-dimensional model written in SQL language to the server.
[0123] The server parses and optimizes the received request for querying the data record of the three-dimensional model to obtain the query condition, such as the query condition related to one or more of the spatial position, material, texture, etc. of the three-dimensional model. The server searches the database to obtain the data record of the three-dimensional model that meets the query condition, that is, obtains the feature information of the three-dimensional model that meets the query condition.
[0124] If the user's query request does not involve the visual information of the three-dimensional model, or the visual information of the three-dimensional model involved in the query request is stored in binary form in the data record of the three-dimensional model, the server constructs a computing model, such as a geometric computing model or a visual processing computing model, according to the query request based on the feature information in the acquired data record of the three-dimensional model, uses the computing model to obtain a query result corresponding to the query request, and outputs the query result to the user.
[0125] If the visual information of the three-dimensional model involved in the user's query request is stored outside the data record of the three-dimensional model, the server obtains the visual information stored outside the data record according to the path address in the data record, and builds a computing model according to the query request, such as a geometric computing model or a visual processing computing model, based on the feature information in the data record of the obtained three-dimensional model and the visual information obtained from outside the data record. The computing model is used to obtain a query result corresponding to the query request, and the query result is output to the user.
[0126] During the query process, users do not need to know the specific storage location and acquisition method of feature information. The database system will automatically process the query request. Compared with the implementation method using SDK programming, it makes full use of the database's own index mechanism to improve query performance. It is easy for users to master and has a low learning cost. Since the calculation is performed in the database, there is no need to transmit feature information to the middleware, and then write the results calculated by the middleware back to the database, which greatly improves the computing performance and efficiency. In addition, the calculation process is completed in the database, ensuring the security of the data.
[0127] Figure 5 The flow of the feature information management method according to an embodiment of the present disclosure is shown.
[0128] like Figure 5As shown, in S501, a texture table for storing texture content is created. In S502, a material table for storing user-defined material information is created. In S503, a three-dimensional model table is created. Then, in S504, a data record of a three-dimensional model is inserted into the three-dimensional model table, for example, including geometric information, visual information, correspondence between geometric information and visual information, correspondence between texture information and material information, etc. of the three-dimensional model. In S505, a spatial index of the data record of the three-dimensional model is created. In S506, the data record of the three-dimensional model is updated, including updating one or more of the geometric information, visual information, correspondence between geometric information and visual information, correspondence between texture information and material information, etc. of the three-dimensional model. In S507, one or more of the geometric information, visual information, and additional information of the three-dimensional model is obtained according to the user's query request, or all the information of the three-dimensional model is obtained according to the user's query request. In S508, the information of the three-dimensional model obtained by the query is exported to construct a calculation model. In S509, unnecessary three-dimensional models are deleted.
[0129] Figure 6 The architecture of a database system for storing data records of three-dimensional data according to an embodiment of the present disclosure is shown.
[0130] like Figure 6 As shown, the host for implementing the database system includes an input / output device, a central processing unit CPU, and a database management system. The database management system includes a parser, an optimizer, and an executor. The parser is configured to parse the user's query request, the optimizer is configured to optimize the parsing result of the user's query request, and the executor is configured to query the database according to the optimized parsing result. The database management system also includes: a texture table for storing the texture content of the three-dimensional model; a material table for storing the material information of the three-dimensional model defined by the user; a three-dimensional model table for storing the data records of the three-dimensional model; an index table for storing the index of the data records of the three-dimensional model; a three-dimensional model metadata for storing the metadata information of the three-dimensional model table; and a local file system for file storage. The network adapter is used to access an external storage system, such as a network storage system or an object storage system. One or more of the above-mentioned texture table, material table, three-dimensional model table, index table, three-dimensional model metadata, etc. can be stored in a local file system, or stored in a network storage system or an object storage system and accessed through a network adapter.
[0131] Figure 7 The structural block diagram of the feature information management device of the three-dimensional model according to the embodiment of the present disclosure is shown. The device can be implemented as part or all of the electronic device through software, hardware or a combination of both.
[0132] According to an embodiment of the present disclosure, the feature information management device 700 of a three-dimensional model includes a first acquisition module 710 and a storage module 720 .
[0133] The first acquisition module 710 is configured to acquire feature information of the three-dimensional model, wherein the feature information includes geometric information, visual information, and a correspondence between the geometric information and the visual information of the three-dimensional model;
[0134] The storage module 720 is configured to store data records of the three-dimensional model in a database, wherein the data records are used to store feature information of the three-dimensional model and have a specified data type, wherein the specified data type includes multiple parts, wherein the first part is used to store the geometric information, the second part is used to store the visual information, and the third part is used to store the correspondence between the geometric information and the visual information.
[0135] According to an embodiment of the present disclosure, the specified data type further includes any one or more of the following parts:
[0136] The fourth part is used to store additional geometric attribute information of the three-dimensional model and the detail level of the three-dimensional model;
[0137] The fifth part is used to store the temporal information of the three-dimensional model.
[0138] According to an embodiment of the present disclosure, the geometric information includes information for describing the geometric shape and / or spatial position of the three-dimensional model, and the visual information of the three-dimensional model is information for describing how to visualize the three-dimensional model.
[0139] According to an embodiment of the present disclosure, storing the data record of the three-dimensional model in a database includes:
[0140] Determine whether the acquired visual information of the three-dimensional model has been stored in the database; if so, store the visual information of the three-dimensional model in the second part based on the stored visual information; if not, store the visual information of the three-dimensional model in the second part based on the acquired visual information.
[0141] According to an embodiment of the present disclosure, wherein:
[0142] The visual information includes texture information and material information;
[0143] The second part includes: a first sub-part for storing texture information of the three-dimensional model; a second sub-part for storing material information of the three-dimensional model;
[0144] The third part includes: a fourth sub-part, which is used to store the corresponding relationship between the geometric information and the material information; and a fifth sub-part, which is used to store the corresponding relationship between the material information and the texture information.
[0145] According to an embodiment of the present disclosure, the storing of the visual information of the three-dimensional model in the second part includes:
[0146] determining whether the acquired material information of the three-dimensional model has been stored in the database, and if so, storing the material information of the three-dimensional model in the second sub-portion based on the stored material information, and if not, storing the material information of the three-dimensional model in the second sub-portion based on the acquired material information;
[0147] Determine whether the acquired texture information of the three-dimensional model has been stored in the database, if yes, store the texture information of the three-dimensional model in the first sub-portion based on the stored texture information, if no, store the texture information of the three-dimensional model in the first sub-portion based on the acquired texture information;
[0148] A mapping relationship from the material information to the texture information is stored in the second sub-part.
[0149] According to an embodiment of the present disclosure, storing the data record of the three-dimensional model in a database includes:
[0150] storing the correspondence between the geometric information and the material information of the three-dimensional model in the fourth sub-part;
[0151] The corresponding relationship between the material information and the texture information of the three-dimensional model is stored in the fifth sub-part.
[0152] According to an embodiment of the present disclosure, the device 700 further includes:
[0153] The second acquisition module 730 is configured to acquire a query request;
[0154] A retrieval module 740 is configured to retrieve feature information of a corresponding three-dimensional model from the database according to the query request;
[0155] A construction module 750 is configured to construct a calculation model according to the retrieved feature information of the three-dimensional model and the query request;
[0156] A calculation module 760 is configured to calculate and obtain a query result corresponding to the query request using the calculation model;
[0157] The output module 770 is configured to output the query result.
[0158] The present disclosure also discloses an electronic device, Figure 8 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0159] like Figure 8 As shown, the electronic device 800 includes a memory 801 and a processor 802, wherein the memory 801 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 802 to implement the method according to an embodiment of the present disclosure.
[0160] The present disclosure provides a method for managing feature information of a three-dimensional model, including:
[0161] Acquire feature information of the three-dimensional model, the feature information including geometric information, visual information, and a correspondence between the geometric information and the visual information of the three-dimensional model;
[0162] Data records of the three-dimensional model are stored in a database, wherein the data records are used to store feature information of the three-dimensional model and have a specified data type, wherein the specified data type includes multiple parts, wherein a first part is used to store the geometric information, a second part is used to store the visual information, and a third part is used to store the correspondence between the geometric information and the visual information.
[0163] According to an embodiment of the present disclosure, the specified data type further includes any one or more of the following parts:
[0164] The fourth part is used to store additional geometric attribute information of the three-dimensional model and the detail level of the three-dimensional model;
[0165] The fifth part is used to store the temporal information of the three-dimensional model.
[0166] According to an embodiment of the present disclosure, the geometric information includes information for describing the geometric shape and / or spatial position of the three-dimensional model, and the visual information of the three-dimensional model is information for describing how to visualize the three-dimensional model.
[0167] According to an embodiment of the present disclosure, storing the data record of the three-dimensional model in a database includes:
[0168] Determine whether the acquired visual information of the three-dimensional model has been stored in the database; if so, store the visual information of the three-dimensional model in the second part based on the stored visual information; if not, store the visual information of the three-dimensional model in the second part based on the acquired visual information.
[0169] According to an embodiment of the present disclosure, wherein:
[0170] The visual information includes texture information and material information;
[0171] The second part includes: a first sub-part for storing texture information of the three-dimensional model; a second sub-part for storing material information of the three-dimensional model;
[0172] The third part includes: a fourth sub-part, which is used to store the corresponding relationship between the geometric information and the material information; and a fifth sub-part, which is used to store the corresponding relationship between the material information and the texture information.
[0173] According to an embodiment of the present disclosure, the storing of the visual information of the three-dimensional model in the second part includes:
[0174] determining whether the acquired material information of the three-dimensional model has been stored in the database, and if so, storing the material information of the three-dimensional model in the second sub-portion based on the stored material information, and if not, storing the material information of the three-dimensional model in the second sub-portion based on the acquired material information;
[0175] Determine whether the acquired texture information of the three-dimensional model has been stored in the database, if yes, store the texture information of the three-dimensional model in the first sub-portion based on the stored texture information, if no, store the texture information of the three-dimensional model in the first sub-portion based on the acquired texture information;
[0176] A mapping relationship from the material information to the texture information is stored in the second sub-part.
[0177] According to an embodiment of the present disclosure, storing the data record of the three-dimensional model in a database includes:
[0178] storing the correspondence between the geometric information and the material information of the three-dimensional model in the fourth sub-part;
[0179] The corresponding relationship between the material information and the texture information of the three-dimensional model is stored in the fifth sub-part.
[0180] According to an embodiment of the present disclosure, the method further includes:
[0181] Get the query request;
[0182] Retrieving feature information of corresponding three-dimensional models from the database according to the query request;
[0183] Constructing a computational model according to the retrieved feature information of the three-dimensional model and the query request;
[0184] Using the calculation model to calculate and obtain a query result corresponding to the query request;
[0185] The query result is output.
[0186] Fig. 9 A schematic diagram showing the structure of a computer system suitable for implementing the method according to an embodiment of the present disclosure is shown.
[0187] like Fig. 9 As shown, the computer system 900 includes a processing unit 901, which can perform various processes in the above-mentioned embodiments according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The processing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0188] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed. Among them, the processing unit 901 can be implemented as a processing unit such as a CPU, a GPU, a TPU, an FPGA, an NPU, etc.
[0189] In particular, according to an embodiment of the present disclosure, the method described above can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes computer instructions, and the computer instructions are executed by a processor to implement the method steps described above. In such an embodiment, the computer program product can be downloaded and installed from a network through the communication part 909, and / or installed from a removable medium 911.
[0190] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0191] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or programmable hardware. The units or modules described may also be set in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.
[0192] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or computer system in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into a device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.
[0193] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
Claims
1. A method for managing feature information of a three-dimensional model, comprising: Acquire feature information of the three-dimensional model, the feature information including geometric information, visual information, and a correspondence between the geometric information and the visual information of the three-dimensional model; Data records of the three-dimensional model are stored in a database, wherein the data records are used to store feature information of the three-dimensional model and have a specified data type, wherein the specified data type includes multiple parts, wherein a first part is used to store the geometric information, a second part is used to store the visual information, and a third part is used to store the correspondence between the geometric information and the visual information.
2. The method according to claim 1, wherein: The specified data type also includes any one or more of the following parts: The fourth part is used to store additional geometric attribute information of the three-dimensional model and the detail level of the three-dimensional model; The fifth part is used to store the temporal information of the three-dimensional model.
3. The method according to claim 1, wherein: The geometric information includes information for describing the geometric shape and / or spatial position of the three-dimensional model, and the visual information of the three-dimensional model is information for describing how to visualize the three-dimensional model.
4. The method according to claim 1, wherein: The storing of the data record of the three-dimensional model in the database comprises: Determine whether the acquired visual information of the three-dimensional model has been stored in the database; if so, store the visual information of the three-dimensional model in the second part based on the stored visual information; if not, store the visual information of the three-dimensional model in the second part based on the acquired visual information.
5. The method according to claim 4, wherein: The visual information includes texture information and material information; The second part includes: a first sub-part for storing texture information of the three-dimensional model; a second sub-part for storing material information of the three-dimensional model; The third part includes: a fourth sub-part, which is used to store the corresponding relationship between the geometric information and the material information; and a fifth sub-part, which is used to store the corresponding relationship between the material information and the texture information.
6. The method according to claim 5, wherein: The storing of the visual information of the three-dimensional model in the second part comprises: determining whether the acquired material information of the three-dimensional model has been stored in the database, and if so, storing the material information of the three-dimensional model in the second sub-portion based on the stored material information, and if not, storing the material information of the three-dimensional model in the second sub-portion based on the acquired material information; Determine whether the acquired texture information of the three-dimensional model has been stored in the database, if yes, store the texture information of the three-dimensional model in the first sub-portion based on the stored texture information, if no, store the texture information of the three-dimensional model in the first sub-portion based on the acquired texture information; A mapping relationship from the material information to the texture information is stored in the second sub-part.
7. The method according to claim 6, wherein: The storing of the data record of the three-dimensional model in the database comprises: storing the correspondence between the geometric information and the material information of the three-dimensional model in the fourth sub-part; The corresponding relationship between the material information and the texture information of the three-dimensional model is stored in the fifth sub-part.
8. The method according to claim 1, further comprising: Get the query request; Retrieving feature information of corresponding three-dimensional models from the database according to the query request; Constructing a computational model according to the retrieved feature information of the three-dimensional model and the query request; Using the calculation model to calculate and obtain a query result corresponding to the query request; The query result is output.
9. A feature information management device for a three-dimensional model, comprising: A first acquisition module is configured to acquire feature information of a three-dimensional model, wherein the feature information includes geometric information, visual information, and a correspondence between the geometric information and the visual information of the three-dimensional model; A storage module is configured to store data records of the three-dimensional model in a database, wherein the data records are used to store feature information of the three-dimensional model and have a specified data type, wherein the specified data type includes multiple parts, wherein a first part is used to store the geometric information, a second part is used to store the visual information, and a third part is used to store the correspondence between the geometric information and the visual information.
10. A database management system comprising: A database, the database storing a texture table, a material table, a 3D model table, an index table, and 3D model metadata, wherein the texture table is used to store texture content of the 3D model, the material table is used to store material information of the 3D model defined by a user, the 3D model table is used to store data records of the 3D model, the data records are used to store feature information of the 3D model and have a specified data type, the feature information includes geometric information and visual information of the 3D model, and a correspondence between the geometric information and the visual information, the specified data type includes multiple parts, wherein a first part is used to store the geometric information, a second part is used to store the visual information, and a third part is used to store the correspondence between the geometric information and the visual information, the visual information includes texture and material, the index table is used to store indexes of the data records of the 3D model, and the 3D model metadata is used to store metadata information of the 3D model table; A parser, configured to parse the user's query request; An optimizer, configured to optimize the parsing result of the user's query request; The executor is configured to query the database according to the optimized parsing result.
11. An electronic device comprising a memory and a processor; wherein: The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps described in any one of claims 1-8.
12. A readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed by a processor, implement the method steps described in any one of claims 1 to 8.
13. A computer program product, comprising computer instructions, which, when executed by a processor, implement the method steps of any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for generating two-dimensional images
CN102819855A
Data processing method and data processing system
CN111723424A