3D model reconstruction method, device, computer equipment and storage medium
The method automates 3D model reconstruction by extracting and parsing target data from model files, reducing costs and computational pressure, thus addressing the need for multiple models in existing methods.
Patent Information
- Application Number
- CN202110928526.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-13
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-08-13
AI Technical Summary
Existing 3D model reconstruction methods require artists to create separate models for different reconstruction methods, leading to increased maintenance and production costs.
A method that automatically extracts target data from a model file based on a specified reconstruction method, parses it, and reconstructs the model, eliminating the need for maintaining separate models for each method.
Reduces maintenance and production costs by automating the reconstruction process and distributing the computational workload between a server and terminal, enhancing user convenience and efficiency.
Smart Images

Figure CN113593042B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional 3D (3D) models, and in particular to a 3D model reconstruction method, device, computer equipment and storage medium. Background Art
[0002] In the application industry of dynamically loading 3D models, due to the diversity of actual application scenarios, the requirements for model reconstruction methods in different application scenarios are also different. For example, some application scenarios need to be reconstructed in a point cloud manner, while some application scenarios need to be reconstructed in a white model manner. In the existing technology, for each reconstruction method, artists are required to specially make a corresponding model, and then perform 3D reconstruction based on the model corresponding to the required reconstruction method. On the one hand, the increase in the number of models increases the maintenance cost of maintaining the model, and on the other hand, it also increases the production cost of the model. Summary of the invention
[0003] The purpose of the present invention is to provide a 3D model reconstruction method, device, computer equipment and storage medium, which can automatically extract the required target data from the model file of the model to be reconstructed according to the reconstruction method, then parse the target data, and finally reconstruct the model to be reconstructed in a specified manner according to the analysis result. There is no need to maintain a corresponding model for each reconstruction method, which greatly reduces maintenance costs and production costs.
[0004] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0005] In a first aspect, the present invention provides a 3D model reconstruction method, which is applied to a server, wherein the server is communicatively connected to a terminal, and the method comprises:
[0006] Receiving an optimization configuration sent by the terminal, wherein the optimization configuration is used to indicate a reconstruction method of a model to be reconstructed;
[0007] Based on the optimized configuration, obtaining a model file of the model to be reconstructed;
[0008] extracting target data from the model file according to the reconstruction method;
[0009] The target data is parsed to obtain a parsing result, and the parsing result is sent to the terminal, so that the terminal reconstructs the model to be reconstructed according to the parsing result.
[0010] Furthermore, the step of parsing the target data to obtain a parsing result includes:
[0011] Parsing the target data using a preset plug-in corresponding to the file format of the model file to obtain an initial result;
[0012] The initial result is converted according to a preset format to obtain the parsing result.
[0013] The above method automatically extracts the required target data from the model file of the model to be reconstructed according to the reconstruction method, then analyzes the target data, and finally reconstructs the model to be reconstructed in a specified manner according to the analysis result. Therefore, there is no need to maintain a corresponding model for each reconstruction method, which greatly reduces maintenance costs and production costs.
[0014] Furthermore, before the step of extracting the target data from the model file according to the reconstruction method, the step includes:
[0015] Generate an index mark according to the reconstruction method and the model file;
[0016] If a parsing file corresponding to the index identifier exists locally, the parsing file is returned to the terminal as the parsing result.
[0017] The above method determines whether the corresponding parsing file already exists locally based on the index identifier, thereby avoiding unnecessary repeated parsing.
[0018] Furthermore, the target data is parsed to obtain the parsing result, and the following steps are further included:
[0019] If the parsing file corresponding to the index identifier does not exist locally, a parsing file corresponding to the index identifier is generated according to the parsing result and stored.
[0020] The above method stores the non-existent parsed file corresponding to the index identifier, so that when the parsed file is needed again later, there is no need to repeat the parsing.
[0021] In a second aspect, the present invention provides a 3D model reconstruction method, which is applied to a terminal, wherein the terminal is communicatively connected to a server, and the method comprises:
[0022] Obtaining a reconstruction configuration for instructing to reconstruct the model to be reconstructed;
[0023] If the reconstruction configuration includes an optimization configuration, and the optimization configuration is used to indicate a reconstruction method of the model to be reconstructed, the optimization configuration is sent to the server to instruct the server to obtain a model file of the model to be reconstructed based on the optimization configuration, extract target data from the model file according to the reconstruction method, parse the target data, obtain a parsing result, and send the parsing result to the terminal;
[0024] The analysis result sent by the server is received, and the model to be reconstructed is reconstructed according to the analysis result.
[0025] The above method extracts the target data from the model file according to the reconstruction method, parses the target data, and obtains the parsing result. The processing process is completed by the server, which reduces the processing pressure of the terminal.
[0026] Furthermore, the method further comprises:
[0027] If the reconstruction configuration does not include an optimized configuration, obtaining a model file of the to-be-reconstructed model indicated by the reconstruction configuration;
[0028] If the model file is in a preset format, reconstructing the model to be reconstructed according to the model file;
[0029] If the model file is not in the preset format, parsing information of the model file is generated and sent to the server to instruct the server to parse the model file according to the parsing information, obtain a parsing result, and send the parsing result to the terminal.
[0030] The above method enables the terminal to only process a model file in a preset format, thereby simplifying the processing process of the terminal.
[0031] Furthermore, the step of generating parsing information of the model file includes:
[0032] If the server stores the model file, the model file identifier in the reconstruction configuration is used as the parsing information;
[0033] If the server does not store the model file, the model file in the reconstruction configuration is used as the parsing information.
[0034] The above method transmits the model file from the terminal to the server only when the server does not store the model file, thereby reducing unnecessary data transmission between the terminal and the server.
[0035] In a third aspect, the present invention provides a 3D model reconstruction method, which is applied to a terminal, wherein the terminal is communicatively connected to a server, and the method comprises:
[0036] Sending an optimization configuration to the server, wherein the optimization configuration is used to indicate a reconstruction method of the model to be reconstructed, the optimization configuration can be used as basic data for the server to obtain a model file of the model to be reconstructed, and the model file contains target data corresponding to the reconstruction method, and the target data can be parsed to obtain a parsing result;
[0037] The analysis result is received, and the model to be reconstructed is reconstructed according to the analysis result.
[0038] The above method specifies the reconstruction method of the model to be reconstructed by optimizing the configuration, so that the server can extract the target data from the model file and parse the target data according to the optimized configuration. The processing process of obtaining the parsing result is completed by the server. On the one hand, it reduces the processing pressure of the terminal, and on the other hand, it allows the user to reconstruct the model to be reconstructed through simple optimized configuration, and the user operation is more convenient.
[0039] In a fourth aspect, the present invention provides a 3D model reconstruction method, which is applied to a server, wherein the server is communicatively connected to a terminal, and the method comprises:
[0040] receiving an optimization configuration, wherein the optimization configuration is used to indicate a reconstruction method of the model to be reconstructed, and the optimization configuration can be included in a reconstruction configuration used to indicate reconstruction of the model to be reconstructed;
[0041] According to the reconstruction method, target data is extracted from the corresponding model file, and the target data is parsed to obtain a parsing result, which can be sent to the terminal and used as basic data for reconstructing the model to be reconstructed.
[0042] The above method specifies the reconstruction method of the model to be reconstructed by optimizing the configuration, and the server completes the analysis result, so that the user can reconstruct the model to be reconstructed through a simple optimization configuration through the terminal, and the user operation is more convenient.
[0043] Furthermore, the method further comprises:
[0044] If the optimization configuration is not included in the reconstruction configuration for instructing to reconstruct the model to be reconstructed, the model file corresponds to the model to be reconstructed indicated by the reconstruction configuration and is acquired by the terminal;
[0045] If the model file is in a preset format, the model file can be used as basic data for the terminal to reconstruct the model to be reconstructed;
[0046] If the model file is not in the preset format, receiving parsing information for parsing the model file, the parsing information corresponding to the model file and capable of being generated by the terminal;
[0047] The model file is parsed according to the parsing information to obtain a parsing result, and the parsing result is sent to the terminal. The parsing result is used as basic data for reconstructing the model to be reconstructed.
[0048] The above method enables the server to process only model files of non-preset formats that cannot be processed by the terminal, and the terminal to process only model files of preset formats, so that the processing pressure of the terminal and the server can be well balanced.
[0049] In a fifth aspect, the present invention provides a 3D model reconstruction device, which is applied to a server, the server is communicatively connected with a terminal, and the device comprises:
[0050] A configuration receiving module, used for receiving the optimization configuration sent by the terminal, wherein the optimization configuration is used for indicating a reconstruction method of the model to be reconstructed;
[0051] A parsing module, used for obtaining a model file of the model to be reconstructed based on the optimization configuration;
[0052] The parsing module is further used to extract target data from the model file according to the reconstruction method;
[0053] The parsing module is further used to parse the target data to obtain a parsing result, and send the parsing result to the terminal, so that the terminal reconstructs the model to be reconstructed according to the parsing result.
[0054] In a sixth aspect, the present invention provides a 3D model reconstruction device, which is applied to a server, the server is communicatively connected with a terminal, and the device comprises:
[0055] A configuration receiving module, used for receiving an optimization configuration, wherein the optimization configuration is used for indicating a reconstruction method of the model to be reconstructed, and the optimization configuration can be included in a reconstruction configuration for indicating reconstruction of the model to be reconstructed;
[0056] The parsing module is used to extract target data from the corresponding model file according to the reconstruction method, parse the target data, and obtain a parsing result; the parsing result can be sent to the terminal and used as basic data for reconstructing the model to be reconstructed.
[0057] In a seventh aspect, the present invention provides a 3D model reconstruction device, which is applied to a terminal, wherein the terminal is communicatively connected to a server, and the device comprises:
[0058] An acquisition module, used for acquiring a reconstruction configuration for instructing to reconstruct the model to be reconstructed;
[0059] A sending module, configured to, if the reconstruction configuration includes an optimization configuration, and the optimization configuration is used to indicate a reconstruction method of the model to be reconstructed, send the optimization configuration to the server to instruct the server to obtain a model file of the model to be reconstructed based on the optimization configuration, extract target data from the model file according to the reconstruction method, parse the target data to obtain a parsing result, and send the parsing result to the terminal;
[0060] The result receiving module is used to receive the analysis result sent by the server and reconstruct the model to be reconstructed according to the analysis result.
[0061] In an eighth aspect, the present invention provides a 3D model reconstruction device, which is applied to a terminal, wherein the terminal is communicatively connected to a server, and the device comprises:
[0062] A sending module, used for sending an optimization configuration to the server, wherein the optimization configuration is used to indicate a reconstruction method of the model to be reconstructed, the optimization configuration can be used as basic data for the server to obtain a model file of the model to be reconstructed, and the model file contains target data corresponding to the reconstruction method, and the target data can be parsed to obtain a parsing result;
[0063] The result receiving module is used to receive the analysis result and reconstruct the model to be reconstructed according to the analysis result.
[0064] In a ninth aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the 3D model reconstruction method applied to the server as described above, or implements the 3D model reconstruction method applied to the terminal as described above.
[0065] In a tenth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the 3D model reconstruction method applied to the server as described above, or implements the 3D model reconstruction method applied to the terminal as described above.
[0066] Compared with the prior art, the present invention receives an optimized configuration of a reconstruction method based on the knowledge of a model to be reconstructed sent by a terminal through a server, extracts target data from a model file according to the reconstruction method, and then parses the target data to obtain a parsing result, and finally sends the parsing result to the terminal. The terminal reconstructs the model to be reconstructed according to the parsing result, thereby eliminating the need to maintain a corresponding model for each reconstruction method, greatly reducing maintenance costs and production costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0068] Figure 1 An example diagram of an application scenario provided by an embodiment of the present invention.
[0069] Figure 2 A block diagram of a computer device provided by an embodiment of the present invention.
[0070] Figure 3 A schematic flow chart of a 3D model reconstruction method provided in an embodiment of the present invention.
[0071] Figure 4 The embodiment of the present invention provides Figure 3 Schematic diagram of the flow chart of the sub-steps of step S130.
[0072] Figure 5 A schematic flow chart of another 3D model reconstruction method provided by an embodiment of the present invention.
[0073] Figure 6 A schematic flow chart of another 3D model reconstruction method provided by an embodiment of the present invention.
[0074] Figure 7 A schematic flow chart of another 3D model reconstruction method provided by an embodiment of the present invention.
[0075] Figure 8 A schematic flow chart of another 3D model reconstruction method provided by an embodiment of the present invention.
[0076] Fig. 9 A schematic flow chart of another 3D model reconstruction method provided by an embodiment of the present invention.
[0077] Fig.10 The embodiment of the present invention provides Fig. 9 Schematic diagram of the flow chart of the sub-steps of step S250.
[0078] Fig.11 A schematic flow chart of another 3D model reconstruction method provided by an embodiment of the present invention.
[0079] Fig.12 An example diagram of a processing flow provided by an embodiment of the present invention.
[0080] Fig.13 A block diagram of a first 3D model reconstruction device provided in an embodiment of the present invention.
[0081] Fig.14 A block diagram of a second 3D model reconstruction device provided in an embodiment of the present invention.
[0082] Fig.15 A block diagram of a third 3D model reconstruction device provided in an embodiment of the present invention.
[0083] Fig.16 A block diagram of a fourth 3D model reconstruction device provided in an embodiment of the present invention.
[0084] Icons: 10-server; 20-terminal; 30-file storage system; 40-computer equipment; 41-processor; 42-memory; 43-bus; 44-communication interface; 100-first 3D model reconstruction device; 110-first configuration receiving module; 120-first parsing module; 200-second 3D model reconstruction device; 210-second configuration receiving module; 220-second parsing module; 300-third 3D model reconstruction device; 310-acquisition module; 320-first sending module; 330-first result receiving module; 400-fourth 3D model reconstruction device; 410-second sending module; 420-second result receiving module. DETAILED DESCRIPTION
[0085] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0086] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0087] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0088] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0089] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0090] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0091] Please refer to Figure 1 , Figure 1 An example diagram of an application scenario provided for an embodiment of the present invention, in which a server 10 is communicatively connected to a terminal 20, and the server 10 is also communicatively connected to a file storage system 30. The terminal 20 sends an optimization configuration to the server 10, and the server 10 obtains a model file of a model to be reconstructed based on the optimization configuration, extracts target data from the model file according to a reconstruction method, and parses the target data to obtain a parsing result. The server 10 sends the parsing result to the terminal 20, and the terminal 20 reconstructs the model to be reconstructed according to the parsing result.
[0092] The server 10 may be a single server or a cluster consisting of multiple servers.
[0093] The terminal 20 may be a physical host or a virtual machine that can realize the same functions as the physical host, or a mobile handheld device, such as a smart phone, a tablet computer, etc., or a wearable electronic device, such as a 3D helmet, 3D glasses, etc.
[0094] The file storage system 30 can be a storage server, or a storage cluster composed of multiple storage servers, or a storage array, etc. The file storage system 30 is used to store the analysis results. If the analysis results required by the terminal 20 are already stored in the file storage system 30, there is no need to repeat the analysis. The server 10 only needs to obtain the analysis results from the file storage system 30 and return them to the terminal 20. It should be noted that the file storage system 30 can be independent of the server 10, or it can be combined with the server 10. When the file storage system 30 and the server 10 are combined, the server 10 is responsible for both parsing to obtain the analysis results and storing the analysis results.
[0095] exist Figure 1Based on the above, the embodiment of the present invention also provides a block diagram of a computer device 40, which can be Figure 1 The server 10 in the Figure 1 The terminal 20 in the embodiment of the present invention is used to execute the 3D model reconstruction method applied to the server 10 when the computer device 40 is the server 10, and to execute the 3D model reconstruction method applied to the terminal 20 when the computer device 40 is the terminal 20. Figure 2 , Figure 2 The block diagram of the computer device 40 provided in the embodiment of the present invention includes a processor 41, a memory 42, a bus 43, and a communication interface 44. The processor 41 and the memory 42 are connected via the bus 43, and the processor 41 communicates with other devices via the communication interface 44.
[0096] The processor 41 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 41 or the instructions in the form of software. The above processor 41 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0097] The memory 42 is used to store programs, such as the first 3D model reconstruction device 100, the second 3D model reconstruction device 200, the third 3D model reconstruction device 300 and the fourth 3D model reconstruction device 400 in the embodiment of the present invention. The first 3D model reconstruction device 100, the second 3D model reconstruction device 200, the third 3D model reconstruction device 300 and the fourth 3D model reconstruction device 400 each include at least one software function module that can be stored in the memory 42 in the form of software or firmware. After receiving the execution instruction, the processor 41 executes the program to implement the 3D model reconstruction method in the embodiment of the present invention.
[0098] The memory 42 may include a high-speed random access memory (RAM) or a non-volatile memory. Optionally, the memory 42 may be a storage device built into the processor 41 or a storage device independent of the processor 41.
[0099] The bus 43 may be an ISA bus, a PCI bus, an EISA bus, or the like. Figure 2 It is represented by only one bidirectional arrow, but it does not mean that there is only one bus or one type of bus.
[0100] exist Figure 1 and Figure 2 Based on this, the embodiment of the present invention provides a 3D model reconstruction method, please refer to Figure 3 , Figure 3 A schematic diagram of a 3D model reconstruction method provided by an embodiment of the present invention, which can be applied to Figure 1 The server 10 in can also be applied to Figure 2 Act as Figure 1 The computer device 40 of the server 10 comprises the following steps:
[0101] Step S100: receiving an optimization configuration sent by a terminal, wherein the optimization configuration is used to indicate a reconstruction method of a model to be reconstructed.
[0102] In this embodiment, the reconstruction method can be point cloud, fine model, white model, etc. For example, the point cloud only needs to sample the vertex data in the model file, and does not need all the vertex data in the model file. The white model only needs to calculate the vertex data of the outer rectangle based on the root node data of the model file.
[0103] In this embodiment, different reconstruction modes correspond to different optimization configurations, and the user can select the desired optimization configuration through the configuration page provided by the terminal 20 according to the needs, so as to obtain the desired reconstruction effect.
[0104] Step S110: obtaining a model file of a model to be reconstructed based on the optimized configuration.
[0105] In this embodiment, the user can select the model file of the model to be reconstructed locally through the terminal 20, or select the model file of the model to be reconstructed pre-stored on the server 10 through the terminal 20. The model file can be a file format supported by the current 3D engine technology, such as FBX, OBJ, 3DS and GLTF, or it can be a custom file format.
[0106] In this embodiment, each model to be reconstructed only needs one model file in advance, and the model file includes all the basic data required for reconstruction, which can meet the requirements of various reconstruction methods. This avoids the need to pre-establish a corresponding model file for each reconstruction method to meet the requirements of different reconstruction methods, which leads to an increase in maintenance costs and production costs caused by too many model files.
[0107] Step S120: extracting target data from the model file according to the reconstruction method.
[0108] In this embodiment, the target data required to generate the analysis results that meet the reconstruction method can be directly extracted from the model file or calculated based on the data extracted from the model file. Different reconstruction methods will result in different target data extracted from the model file.
[0109] Step S130, analyzing the target data to obtain an analysis result, and sending the analysis result to the terminal, so that the terminal reconstructs the model to be reconstructed according to the analysis result.
[0110] In this embodiment, the server 10 is responsible for parsing the target data, which is a computationally intensive task. After obtaining the parsing result, the parsing result is sent to the terminal 20. The terminal 20 only needs to reconstruct the model to be reconstructed according to the parsing result.
[0111] The above method provided in this embodiment does not need to maintain a corresponding model for each reconstruction method, which greatly reduces maintenance costs and production costs. The server 10 is responsible for parsing, which effectively alleviates the computing pressure on the terminal 20 and improves the user experience of the terminal 20. The user only needs to optimize the configuration according to the required reconstruction method to obtain a reconstruction result that meets the requirements, thereby improving the efficiency of the user in reconstructing the 3D model.
[0112] exist Figure 3 Based on this, the embodiment of the present invention also provides a specific implementation method for parsing the target data, please refer to Figure 4 , Figure 4 The embodiment of the present invention provides Figure 3 Schematic diagram of the flow of sub-steps of step S130, step S130 includes the following sub-steps:
[0113] Sub-step S1301, using a preset plug-in corresponding to the file format of the model file to parse the target data to obtain an initial result.
[0114] In this embodiment, different file formats of model files mean that different 3D development engines are used, and the corresponding preset plug-ins are also different. The server 10 stores preset plug-ins corresponding to various file formats to meet the requirements of different file formats.
[0115] Sub-step S1302, converting the initial result according to a preset format to obtain a parsing result.
[0116] In this embodiment, in order to shield the terminal 20 from the differences between different file formats, the initial results are uniformly converted into a preset format, and the terminal 20 only needs to reconstruct according to the preset format.
[0117] In this embodiment, the preset format may be an existing format, such as FBX, OBJ, 3DS, etc., or may be a custom format.
[0118] In the above method provided in this embodiment, the server 10 can parse model files of different file formats to meet the requirements of different file formats. The terminal 20 only needs to rebuild according to the preset format, which shields the differences between different file formats from the terminal 20 and simplifies the processing flow of the terminal 20.
[0119] In order to reuse the previous analysis results, the embodiment of the present invention also provides a specific implementation method to avoid unnecessary analysis. Figure 5 , Figure 5 A schematic flow chart of another 3D model reconstruction method provided by an embodiment of the present invention, the method further includes the following steps:
[0120] Step S111, generating an index mark according to the reconstruction method and the model file.
[0121] In this embodiment, different reconstruction methods and the same model file generate different index identifiers. As a specific implementation, a unique serial number can be set for each type of reconstruction method, and the index identifier is generated according to the serial number and the file name of the model file.
[0122] Step S112: If a parsing file corresponding to the index identifier exists locally, the parsing file is returned to the terminal as a parsing result.
[0123] In this embodiment, if a parsed file corresponding to the index identifier already exists locally, it means that the model file that meets the reconstruction method has been parsed before and the parsing result already exists. At this time, there is no need to perform unnecessary parsing. The parsing result can be directly found and returned to terminal 20.
[0124] It should be noted that the parsed file corresponding to the index identifier may be pre-stored in the server 10. Figure 1 In the application scenario shown, the parsed file corresponding to the index identifier may be pre-stored in the file storage system 30 .
[0125] In order to avoid unnecessary analysis, the embodiment of the present invention also provides an implementation method for storing the analysis results. Please continue to refer to Figure 5 After parsing the target data and obtaining the parsing result, the method further includes the following steps:
[0126] Step S130: If the parsing file corresponding to the index identifier does not exist locally, a parsing file corresponding to the index identifier is generated according to the parsing result and stored.
[0127] In this embodiment, after obtaining the analysis result, in order to avoid repeating the analysis process next time the user performs the same optimization configuration for the model to be reconstructed, the analysis file corresponding to the index identifier generated according to the analysis result can be stored so that the analysis result can be directly obtained later.
[0128] In this embodiment, the present invention also provides a 3D model reconstruction method, please refer to Figure 6 , Figure 6 A schematic diagram of another 3D model reconstruction method provided by an embodiment of the present invention, which can be applied to Figure 1 The server 10 in can also be applied to Figure 2 Act as Figure 1 The computer device 40 of the server 10 comprises the following steps:
[0129] Step S140 , receiving an optimization configuration, where the optimization configuration is used to indicate a reconstruction method of the model to be reconstructed. The optimization configuration can be included in a reconstruction configuration used to indicate how to reconstruct the model to be reconstructed.
[0130] Step S141, extracting target data from the corresponding model file according to the reconstruction method, parsing the target data to obtain a parsing result, and the parsing result can be sent to the terminal and used as basic data for reconstructing the model to be reconstructed.
[0131] exist Figure 6 Based on this, the embodiment of the present invention also provides a 3D model reconstruction method, please refer to Figure 7 , Figure 7 A schematic flow chart of another 3D model reconstruction method provided by an embodiment of the present invention, the method further includes the following steps:
[0132] Step S150: If the optimization configuration is not included in the reconstruction configuration for instructing to reconstruct the model to be reconstructed, the model file corresponds to the model to be reconstructed indicated by the reconstruction configuration and is acquired by the terminal.
[0133] Step S151: If the model file is in a preset format, the model file can be used as basic data for the terminal to reconstruct the model to be reconstructed.
[0134] Step S152: if the model file is not in a preset format, receiving parsing information for parsing the model file, the parsing information corresponds to the model file and can be generated by the terminal.
[0135] Step S153, parsing the model file according to the parsing information to obtain a parsing result, and sending the parsing result to the terminal, the parsing result is used as basic data for reconstructing the model to be reconstructed.
[0136] exist Figure 1and Figure 2 Based on this, the embodiment of the present invention provides a 3D model reconstruction method, please refer to Figure 8 , Figure 8 A schematic diagram of a 3D model reconstruction method provided by an embodiment of the present invention, which can be applied to Figure 1 The terminal 20 in the embodiment can also be applied to Figure 2 Act as Figure 1 The computer device 40 of the terminal 20 comprises the following steps:
[0137] Step S200: obtaining a reconstruction configuration for instructing to reconstruct a model to be reconstructed.
[0138] In this embodiment, the reconstruction configuration may specify a reconstruction method or may not specify a reconstruction method. When the reconstruction method is specified, the reconstruction configuration includes an optimization configuration, which indicates the reconstruction method of the model to be reconstructed, such as solid model reconstruction, point cloud model reconstruction, white model reconstruction, and reduced surface model reconstruction. When the reconstruction method is not specified, a preset default reconstruction method may be used. For example, the default reconstruction method may be fine model reconstruction.
[0139] Step S210, if the reconstruction configuration includes an optimization configuration, and the optimization configuration is used to indicate the reconstruction method of the model to be reconstructed, the optimization configuration is sent to the server to instruct the server to obtain the model file of the model to be reconstructed based on the optimization configuration, and extract the target data from the model file according to the reconstruction method, parse the target data, obtain the parsing result, and send the parsing result to the terminal.
[0140] In this embodiment, the server obtains the model file of the model to be reconstructed based on the optimization configuration, extracts the target data from the model file according to the reconstruction method, parses the target data, and obtains the parsing result. The process has been described above and will not be repeated here.
[0141] Step S220, receiving the analysis result sent by the server, and reconstructing the model to be reconstructed according to the analysis result.
[0142] exist Figure 8 Based on this, this embodiment also provides another 3D model reconstruction method, please refer to Fig. 9 , Fig. 9 A schematic flow chart of another 3D model reconstruction method provided by an embodiment of the present invention, the method further includes the following steps:
[0143] Step S230: If the reconstruction configuration does not include the optimized configuration, a model file of the model to be reconstructed indicated by the reconstruction configuration is obtained.
[0144] Step S240: if the model file is in a preset format, the model to be reconstructed is reconstructed according to the model file.
[0145] In this embodiment, if the model file is in a preset format, it means that the format of the model file is a format that can be parsed by the terminal 20. At this time, there is no need to send the model file to the server 10 for parsing. The terminal 20 can parse it directly, avoiding unnecessary data transmission between the server 10 and the terminal 20, and the model to be reconstructed can be reconstructed faster.
[0146] Step S250, if the model file is not in the preset format, generate parsing information of the model file, and send the parsing information to the server to instruct the server to parse the model file according to the parsing information, obtain the parsing result, and send the parsing result to the terminal.
[0147] In this embodiment, if the model file is not in the preset format, it means that the terminal 20 cannot recognize the format of the model file, and the server 10 needs to perform parsing.
[0148] In this embodiment, the parsing information of the model file can be the model file itself or the model file identifier, depending on different situations. This embodiment also provides a specific implementation method for generating the parsing information of the model file, please refer to Fig.10 , Fig.10 The embodiment of the present invention provides Fig. 9 Schematic diagram of the process of sub-steps of step S250, step S250 includes the following sub-steps:
[0149] Sub-step S2501: If the server stores a model file, the model file identifier in the reconstruction configuration is used as parsing information.
[0150] In this embodiment, if the server 10 stores a model file, for example, the model file is specified by the user from the server 10 through the terminal 20, then the server must have stored the model file. At this time, there is no need to send the model file to the server 10. Only the identifier of the model file needs to be sent to the server 10, that is, the model file identifier in the reconstruction configuration is used as the parsing information, thereby avoiding unnecessary data transmission between the terminal 20 and the server 10.
[0151] Sub-step S2502: If the server does not store the model file, the model file in the reconstruction configuration is used as parsing information.
[0152] In this embodiment, if the server 10 does not store the model file, for example, the model file is a local model file of the terminal 20 specified by the user, or is obtained from other devices that have a communication connection with the terminal 20, then the model file needs to be sent to the server 10, that is, the model file in the reconstruction configuration is used as the parsing information.
[0153] The embodiment of the present invention also provides another 3D model reconstruction method applied to the terminal 20, please refer to Fig.11 , Fig.11 A schematic flow chart of another 3D model reconstruction method provided by an embodiment of the present invention, the method comprising the following steps:
[0154] Step S260, sending an optimization configuration to the server, wherein the optimization configuration is used to indicate a reconstruction method of the model to be reconstructed. The optimization configuration can serve as basic data for the server to obtain a model file of the model to be reconstructed, and the model file contains target data corresponding to the reconstruction method, and the target data can be parsed to obtain a parsing result.
[0155] Step S270: receiving the analysis result, and reconstructing the model to be reconstructed according to the analysis result.
[0156] In order to more clearly describe the above method from the perspective of the whole process, this embodiment describes the method from the complete processing flow of the server 10 and the terminal 20, please refer to Fig.12 , Fig.12 An example diagram of a processing flow provided by an embodiment of the present invention. Fig.12 In the process, a model file or model data is imported through a terminal. The model file or model data can be specified by a user locally in the terminal, or can be specified from a model file or model data stored in the server by accessing the server through a terminal WEB page. The identifier on the terminal is used to identify whether the format of the model file is the correct format, that is, whether the model file is a 3D model file. The correct format can be an existing 3D model format or a custom format set by the user. If it is not a 3D model file, the terminal displays a prompt message of an incorrect file format. Otherwise, the terminal performs optimization configuration and sends the optimization configuration to the parsing service cluster. The parsing service cluster determines whether there is a parsing result corresponding to the optimization configuration by accessing the file storage system. If so, the parsing result is directly obtained and returned to the terminal. Otherwise, the parsing is performed according to the optimization configuration and the model file to generate a parsing result and return it to the terminal.
[0157] In order to execute the corresponding steps of the 3D model reconstruction method in the above embodiment and each possible implementation method, the implementation method of the relevant 3D model reconstruction device is given below. It should be noted that the basic principle and technical effect of the relevant 3D model reconstruction device provided in this embodiment are the same as those in the above embodiment. For the sake of brief description, this embodiment is not mentioned.
[0158] Please refer to Fig.13 , Fig.13 FIG. 1 is a block diagram of a first 3D model reconstruction device 100 provided in an embodiment of the present invention. The first 3D model reconstruction device 100 is applied to Figure 1The server 10 in can also be applied to Figure 2 Act as Figure 1 The computer device 40 of the server 10.
[0159] The first 3D model reconstruction apparatus 100 includes a first configuration receiving module 110 and a first parsing module 120 .
[0160] The first configuration receiving module 110 is used to receive an optimization configuration sent by a terminal, wherein the optimization configuration is used to indicate a reconstruction method of a model to be reconstructed.
[0161] The first parsing module 120 is used to obtain a model file of a model to be reconstructed based on the optimized configuration.
[0162] The first parsing module 120 is further used to extract target data from the model file according to the reconstruction method.
[0163] The first parsing module 120 is further used to parse the target data to obtain a parsing result, and send the parsing result to the terminal so that the terminal reconstructs the model to be reconstructed according to the parsing result.
[0164] As a specific implementation, the first parsing module 120 is specifically used to: parse the target data using a preset plug-in corresponding to the file format of the model file to obtain an initial result; and convert the initial result according to a preset format to obtain a parsed result.
[0165] As a specific implementation method, the first parsing module 120 is specifically used to: generate an index identifier according to the reconstruction method and the model file before extracting the target data from the model file according to the reconstruction method; if a parsing file corresponding to the index identifier exists locally, the parsing file is returned to the terminal as a parsing result.
[0166] As a specific implementation, after the first parsing module 120 is used to parse the target data and obtain the parsing result, it is specifically used to: if the parsing file corresponding to the index identifier does not exist locally, generate a parsing file corresponding to the index identifier according to the parsing result for storage.
[0167] Please refer to Fig.14 , Fig.14 FIG. 2 is a block diagram of a second 3D model reconstruction device 200 provided in an embodiment of the present invention. The second 3D model reconstruction device 200 is applied to Figure 1 The server 10 in can also be applied to Figure 2 Act as Figure 1 The computer device 40 of the server 10.
[0168] The second 3D model reconstruction apparatus 200 includes a second configuration receiving module 210 and a second parsing module 220 .
[0169] The second configuration receiving module 210 is used to receive an optimization configuration, where the optimization configuration is used to indicate a reconstruction method of the model to be reconstructed. The optimization configuration can be included in a reconstruction configuration used to indicate how to reconstruct the model to be reconstructed.
[0170] The second parsing module 220 is used to extract target data from the corresponding model file according to the reconstruction method, parse the target data, and obtain parsing results; the parsing results can be sent to the terminal and used as basic data for reconstructing the model to be reconstructed.
[0171] As a specific implementation method, the second parsing module 220 is also used for: if the optimization configuration is not included in the reconstruction configuration for indicating the reconstruction of the model to be reconstructed, the model file corresponds to the model to be reconstructed indicated by the reconstruction configuration and is obtained by the terminal; if the model file is in a preset format, the model file can be used as basic data for the terminal to reconstruct the model to be reconstructed; if the model file is not in a preset format, parsing information for parsing the model file is received, the parsing information corresponds to the model file and can be generated by the terminal; the model file is parsed according to the parsing information to obtain a parsing result, and the parsing result is sent to the terminal, and the parsing result is used as the basic data for reconstructing the model to be reconstructed.
[0172] Please refer to Fig.15 , Fig.15 FIG. 3 is a block diagram of a third 3D model reconstruction apparatus 300 provided in an embodiment of the present invention. The third 3D model reconstruction apparatus 300 is applied to Figure 1 The terminal 20 in the embodiment can also be applied to Figure 2 Act as Figure 1 The computer device 40 of the terminal 20.
[0173] The third 3D model reconstruction apparatus 300 includes an acquisition module 310 , a first sending module 320 and a first result receiving module 330 .
[0174] The acquisition module 310 is used to acquire a reconstruction configuration for instructing to reconstruct the model to be reconstructed.
[0175] The first sending module 320 is used to send the optimization configuration to the server if the reconstruction configuration includes the optimization configuration, and the optimization configuration is used to indicate the reconstruction method of the model to be reconstructed, so as to instruct the server to obtain the model file of the model to be reconstructed based on the optimization configuration, extract the target data from the model file according to the reconstruction method, parse the target data, obtain the parsing result, and send the parsing result to the terminal.
[0176] As a specific implementation method, the first sending module 320 is also used to: if the reconstruction configuration does not include an optimization configuration, obtain the model file of the model to be reconstructed indicated by the reconstruction configuration; if the model file is in a preset format, reconstruct the model to be reconstructed according to the model file; if the model file is not in a preset format, generate parsing information of the model file, and send the parsing information to the server to instruct the server to parse the model file according to the parsing information, obtain the parsing result, and send the parsing result to the terminal.
[0177] As a specific implementation method, when the first sending module 320 is used to generate parsing information of a model file, it is specifically used to: if the server stores the model file, then the model file identifier in the reconstruction configuration is used as the parsing information; if the server does not store the model file, then the model file in the reconstruction configuration is used as the parsing information.
[0178] The first result receiving module 330 is used to receive the parsing result sent by the server, and reconstruct the model to be reconstructed according to the parsing result.
[0179] Please refer to Fig.16 , Fig.16 FIG. 4 is a block diagram of a fourth 3D model reconstruction apparatus 400 provided in an embodiment of the present invention. Figure 1 The terminal 20 in the embodiment can also be applied to Figure 2 Act as Figure 1 The computer device 40 of the terminal 20.
[0180] The fourth 3D model reconstruction apparatus 400 includes a second sending module 410 and a second result receiving module 420 .
[0181] The second sending module 410 is used to send the optimization configuration to the server, wherein the optimization configuration is used to indicate the reconstruction method of the model to be reconstructed. The optimization configuration can serve as the basic data of the model file of the model to be reconstructed by the server, and the model file contains target data corresponding to the reconstruction method, and the target data can be parsed to obtain the parsing result.
[0182] The second result receiving module 420 is used to receive the analysis result and reconstruct the model to be reconstructed according to the analysis result.
[0183] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the 3D model reconstruction method applied to the server as described above, or implements the 3D model reconstruction method applied to the terminal as described above.
[0184] In summary, the embodiments of the present invention provide a 3D model reconstruction method, apparatus, computer equipment and storage medium, which are applied to a server, and the server is communicatively connected with a terminal, and the method includes: receiving an optimization configuration sent by a terminal, wherein the optimization configuration is used to indicate a reconstruction method of a model to be reconstructed; based on the optimization configuration, obtaining a model file of the model to be reconstructed; extracting target data from the model file according to the reconstruction method; parsing the target data to obtain a parsing result, and sending the parsing result to the terminal, so that the terminal reconstructs the model to be reconstructed according to the parsing result. The embodiments of the present invention can automatically extract the required target data from the model file of the model to be reconstructed according to the reconstruction method, and then parse the target data, and finally realize the reconstruction of the model to be reconstructed in a specified manner according to the parsing result, thereby eliminating the need to maintain a corresponding model for each reconstruction method, greatly reducing maintenance costs and production costs.
[0185] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A 3D model reconstruction method, It is characterized in that Applied to a server, the server is connected to a terminal for communication, and the method includes: receiving an optimization configuration sent by the terminal, wherein the optimization configuration is used to indicate a reconstruction method of a model to be reconstructed; Based on the optimized configuration, a model file of the model to be reconstructed is obtained, each model to be reconstructed corresponds to a model file, and the model file includes all basic data required to reconstruct the corresponding model to be reconstructed; Extracting target data from the model file according to the reconstruction method, the reconstruction method including a point cloud method and a white model method, the point cloud method samples the vertex data in the model file, and the white model method calculates the vertex data of the circumscribed rectangle according to the root node data of the model file; Parsing the target data to obtain a parsing result, and sending the parsing result to the terminal, so that the terminal reconstructs the model to be reconstructed according to the parsing result; The step of obtaining the analysis result by analyzing the target data comprises: Parsing the target data using a preset plug-in corresponding to the file format of the model file to obtain an initial result; Convert the initial result according to a preset format to obtain the parsing result; The step of extracting target data from the model file according to the reconstruction method includes: Generate an index identifier according to the reconstruction method and the model file, set a unique serial number for each type of reconstruction method, and generate an index identifier according to the serial number and the file name of the model file; If a parsing file corresponding to the index identifier exists locally, returning the parsing file as the parsing result to the terminal; After parsing the target data and obtaining the parsing result, the following steps are further included: If the parsing file corresponding to the index identifier does not exist locally, a parsing file corresponding to the index identifier is generated according to the parsing result and stored.
2. A 3D model reconstruction device, It is characterized in that Applied to a server, the server is connected to a terminal for communication, and the device comprises: A first configuration receiving module, used to receive an optimization configuration sent by the terminal, wherein the optimization configuration is used to indicate a reconstruction method of a model to be reconstructed; A first parsing module, configured to obtain a model file of the model to be reconstructed based on the optimization configuration, wherein each model to be reconstructed corresponds to a model file, and the model file includes all basic data required to reconstruct the corresponding model to be reconstructed; The first parsing module is further used to extract target data from the model file according to the reconstruction method, wherein the reconstruction method includes a point cloud method and a white model method, wherein the point cloud method samples the vertex data in the model file, and the white model method calculates the vertex data of the circumscribed rectangle according to the root node data of the model file; The first parsing module is further used to parse the target data to obtain a parsing result, and send the parsing result to the terminal, so that the terminal reconstructs the model to be reconstructed according to the parsing result.
3. A computer device comprising a memory and a processor, It is characterized in that The memory stores a computer program, and the processor implements the 3D model reconstruction method as claimed in claim 1 when executing the computer program.
4. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the 3D model reconstruction method as claimed in claim 1 is implemented.
