3D model data storage method, device, computer equipment and storage medium

Through encoding, segmentation, attribute extraction, regular replacement and compression encryption processing of 3D model data, the problems of large file size, poor security and low rendering efficiency in traditional 3D model storage methods are solved, and efficient storage and transmission are achieved, improving User experience and data security.

CN118708559BActive Publication Date: 2024-12-06深圳市华磊迅拓科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411194611.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-06
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

Traditional 3D model storage methods have inefficient storage, transmission and rendering due to large file size, low data security and rendering performance bottlenecks.

Method used

By obtaining 3D model data for encoding and serialization, it is divided into substrings according to preset segmentation rules, extracting attribute information and generating attribute strings, replacing specific content with regular expressions, using gzip algorithm to compress and asymmetric encryption process, generating compression Encrypted files for storage or transfer.

Benefits of technology

It significantly reduces the redundancy of 3D model data, improves compression efficiency, makes file size smaller, and stores and transfers more efficiently, improves rendering speed and user interaction experience, and effectively prevents data leakage and tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708559B_ABST
    Figure CN118708559B_ABST
Patent Text Reader

Abstract

The present invention relates to a 3D model data storage method, device, computer equipment and storage medium. By acquiring 3D model data and performing encoding and serialization processing, it is converted into a structured string to facilitate subsequent operations. The string is segmented according to preset rules to generate multiple substrings to improve parallel processing efficiency. Each substring extracts attribute information and generates a corresponding attribute string, and reduces redundant information through regular expression replacement. Subsequently, the substrings and attribute strings are gzip compressed and encrypted to generate multiple compressed encrypted files for safe storage and transmission. This solution significantly reduces data redundancy, improves compression efficiency, reduces file size, enhances data security, and improves rendering speed and user interaction experience by segmenting data to adapt to diverse application needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a storage method, device, computer equipment and storage medium for 3D model data. Background Art

[0002] With the rapid development of 3D graphics processing technology, 3D models have been widely used in various application scenarios. However, traditional 3D model storage methods have exposed some significant deficiencies in practical applications. First, as the model details increase, the size of the exported model file also increases. This not only consumes a lot of time and resources during storage and transmission, but also, especially in a network environment, the transmission and loading of large file models has become an obvious bottleneck, seriously affecting the user experience.

[0003] Secondly, traditional 3D model storage methods usually ignore data security. Since model files often contain sensitive business information or personal privacy data, there is a risk of data leakage during transmission and storage. The current storage method lacks effective protection measures, which makes model data easy to be accessed and tampered by unauthorized third parties, resulting in economic losses and privacy leakage.

[0004] In addition, existing 3D rendering engines often encounter performance bottlenecks when processing large file models, affecting rendering efficiency. The loading and decoding process of large file models is cumbersome, resulting in slow interface rendering and poor user interaction experience. In order to improve user experience and data security, an efficient 3D model data storage and compression optimization method is urgently needed to meet the needs of modern applications. Summary of the invention

[0005] The main purpose of the present invention is to provide a storage method, device, computer equipment and storage medium for 3D model data to solve the technical problems of low efficiency in storage, transmission and rendering due to large file size, low data security and rendering performance bottleneck in traditional 3D model storage methods.

[0006] To achieve the above-mentioned purpose, the present invention provides a storage method for 3D model data, comprising the following steps: acquiring 3D model data, encoding and serializing the 3D model data to obtain a character string that can fully represent the 3D model data; segmenting the character string according to a preset segmentation rule to obtain multiple sub-strings; extracting attribute information from each sub-string, and generating an attribute string corresponding to each sub-string according to the attribute information, and replacing specific content in the attribute string with a regular expression; compressing and encrypting the sub-string and the attribute string corresponding to the sub-string to obtain multiple compressed encrypted files, and using the compressed encrypted files for storage or transmission.

[0007] Furthermore, the 3D model data includes at least: picture data and texture data, and after obtaining the 3D model data, the 3D model data storage method also includes: performing preliminary preprocessing on the picture data, removing duplicate picture files in the picture data, and generating a unique UUID for each picture file in the picture data, and using the UUID array to replace the mapping data between the picture files; determining the picture file corresponding to each texture sub-data in the texture data, and using the UUID array of the picture file to replace the mapping data between the texture sub-data and the picture file.

[0008] Furthermore, the 3D model data includes at least: geometric data, and after obtaining the 3D model data, the 3D model data storage method also includes: obtaining precision adjustment parameters of the geometric data, and optimizing the precision of the normal array, position data, and UV attribute data in the geometric data according to the precision adjustment parameters.

[0009] Furthermore, the character string is segmented according to a preset segmentation rule to obtain multiple substrings, including: reading from the beginning of the character string and reading a preset length of characters; based on a preset segmentation mark list, determining the first segmentation character existing in the preset length of characters, and determining whether there is a second segmentation character in the preset length of characters; if there is no second segmentation character, segmenting the preset length of characters from the character string to obtain a substring; if there is a second segmentation character, segmenting the characters between the first segmentation character and the second segmentation character from the character string to obtain a substring; determining the remaining characters in the character string, and based on the remaining characters, re-executing the step of "reading from the beginning of the character string and reading a preset length of characters" until the character string is segmented.

[0010] Furthermore, attribute information is extracted from each substring, and an attribute string corresponding to each substring is generated according to the attribute information, including: creating an empty data list, wherein the data list is used to store attribute strings; initializing the substring currently being processed, extracting the content between the first symbol and the second symbol in the substring, and determining the attribute information corresponding to the substring according to the content between the first symbol and the second symbol; generating an attribute string corresponding to the substring according to the attribute information corresponding to the substring, and writing the attribute string into the data list; determining a substring from which attribute information has not been extracted, and using the substring from which attribute information has not been extracted to perform the step of "initializing the substring currently being processed", until the attribute strings corresponding to all substrings are written into the data list.

[0011] Furthermore, a regular expression is used to replace specific content in the attribute string, including: obtaining a preset attribute character comparison table, wherein the attribute character comparison table includes a first column and a second column, the first column contains multiple first strings, the second column contains multiple second strings, and the first strings correspond to the specific content in the attribute string; based on the attribute character comparison table, identifying whether any of the first strings exists in the attribute string; if the first string exists, then based on the attribute character comparison table, replacing the first string existing in the attribute string with the corresponding second string.

[0012] Furthermore, the substring and the attribute string corresponding to the substring are compressed and encrypted to obtain multiple compressed encrypted files, and the compressed encrypted files are used for storage or transmission, including: using the gzip algorithm to compress the substring and the attribute string corresponding to the substring to obtain 3D model compressed data, and converting the compressed 3D model compressed data into a UTF-16 encoding format; using an asymmetric encryption algorithm to generate a pair of public keys and private keys, and using the public key to encrypt the 3D model compressed data after format conversion to obtain 3D model encrypted data, and transmitting or storing the 3D model encrypted data in a server; and sending the private key to a target object so that the target object can decompress and decode the 3D model encrypted data.

[0013] The present invention provides a storage device for 3D model data, comprising: an acquisition unit, used to acquire 3D model data, encode and serialize the 3D model data, and obtain a character string that can completely represent the 3D model data; a segmentation unit, used to segment the character string according to a preset segmentation rule, and obtain multiple sub-character strings; a replacement unit, used to extract attribute information from each sub-character string, and generate an attribute character string corresponding to each sub-character string according to the attribute information, and use a regular expression to replace specific content in the attribute character string; an encryption compression unit, used to compress and encrypt the sub-character string and the attribute character string corresponding to the sub-character string, and obtain multiple compressed encrypted files, and use the compressed encrypted files for storage or transmission processing.

[0014] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.

[0016] The storage method, device, computer equipment and storage medium of 3D model data provided by the present invention obtain 3D model data, encode and serialize it, and generate a string that can fully represent the 3D model data. In this step, complex 3D model data (such as vertices, edges, faces, materials, etc.) are converted into a structured string representation by using JSON, XML or binary encoding methods, which is convenient for subsequent processing. Then, the string is segmented according to a preset segmentation rule to obtain multiple substrings. The segmentation rule can be based on the string length or the logical structure of the model data (such as segmentation by model hierarchy, object), etc., to segment a large string into multiple smaller and manageable substrings. This processing method is conducive to parallel processing, reducing the amount of data for a single operation, thereby improving processing efficiency. Subsequently, attribute information is extracted from each substring, and an attribute string corresponding to each substring is generated based on the attribute information. In order to improve data compression efficiency, regular expressions are also used to replace specific content. The attribute information may include the geometry, material properties, position, etc. of the model, and regular expressions are used to match and replace common values ​​or tags to reduce redundant information. Finally, these substrings and attribute strings are compressed and encrypted to obtain multiple compressed and encrypted files, which are then stored or transmitted. Compression algorithms such as gzip or bzip2 can effectively reduce the data volume, while encryption algorithms such as AES or RSA can protect the security of the data. Compressed and encrypted files are easy to store and transmit safely and efficiently.

[0017] Compared with the existing technology, this solution significantly reduces the redundancy of 3D model data and improves compression efficiency through segmentation, attribute extraction and regular replacement steps, making the file size smaller and storage and transmission more efficient. Secondly, encryption operations are performed while compression is being processed, effectively preventing data leakage and tampering, and protecting the security of commercial information and personal privacy data. Thirdly, the segmented substrings allow the rendering engine to load and decode small data blocks in parallel, reducing the amount of data for a single operation, and improving rendering speed and user interaction experience. Finally, the size of the compressed and encrypted files after segmentation is more flexible, which facilitates efficient transmission and storage in different storage media and network environments, and adapts to a variety of application scenarios and needs.

[0018] In summary, this technical solution solves the problems of large file size, poor security and low rendering efficiency existing in traditional 3D model storage methods, and has outstanding substantive features and significant progress. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a schematic diagram of steps of a method for storing 3D model data in one embodiment of the present invention;

[0020] Figure 2 is a schematic diagram of a method for storing 3D model data in one embodiment of the present invention;

[0021] Figure 3 is a structural block diagram of a storage device for 3D model data in one embodiment of the present invention;

[0022] Figure 4 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0023] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0025] Reference Figure 1 , an embodiment of the present invention provides a method for storing 3D model data, comprising the following steps:

[0026] S1: Acquire 3D model data, encode and serialize the 3D model data, and obtain a character string that can completely represent the 3D model data.

[0027] S2, segmenting the character string according to a preset segmentation rule to obtain a plurality of sub-character strings.

[0028] S3, extracting attribute information from each substring, generating an attribute string corresponding to each substring according to the attribute information, and replacing specific content in the attribute string with a regular expression.

[0029] S4, compressing and encrypting the substring and the attribute string corresponding to the substring to obtain a plurality of compressed and encrypted files, and using the compressed and encrypted files for storage or transmission.

[0030] That is, by obtaining 3D model data, encoding and serializing it, a string that can fully represent the 3D model data is generated. In this step, complex 3D model data (such as vertices, edges, faces, materials, etc.) are converted into a structured string representation by using JSON, XML or binary encoding methods, which is convenient for subsequent processing. Then, the string is segmented according to the preset segmentation rules to obtain multiple substrings. The segmentation rules can be based on the string length or the logical structure of the model data (such as segmentation by model hierarchy, object), etc., to divide the large string into multiple smaller and manageable substrings. This processing method is conducive to parallel processing, reducing the amount of data for a single operation, thereby improving processing efficiency. Subsequently, attribute information is extracted from each substring, and an attribute string corresponding to each substring is generated based on the attribute information. In order to improve data compression efficiency, regular expressions are also used to replace specific content. Attribute information may include the geometry, material properties, position, etc. of the model. Regular expressions are used to match and replace common values ​​or tags to reduce redundant information. Finally, these substrings and attribute strings are compressed and encrypted to obtain multiple compressed and encrypted files, which are stored or transmitted. Compression algorithms such as gzip or bzip2 can effectively reduce the size of data, while encryption algorithms such as AES or RSA can protect the security of data. Compressed and encrypted files are easy to store and transmit safely and efficiently.

[0031] Compared with the existing technology, this solution significantly reduces the redundancy of 3D model data and improves compression efficiency through segmentation, attribute extraction and regular replacement steps, making the file size smaller and storage and transmission more efficient. Secondly, encryption operations are performed while compression is being processed, effectively preventing data leakage and tampering, and protecting the security of commercial information and personal privacy data. Thirdly, the segmented substrings allow the rendering engine to load and decode small data blocks in parallel, reducing the amount of data for a single operation, and improving rendering speed and user interaction experience. Finally, the size of the compressed and encrypted files after segmentation is more flexible, which facilitates efficient transmission and storage in different storage media and network environments, and adapts to a variety of application scenarios and needs.

[0032] In summary, this technical solution solves the problems of large file size, poor security and low rendering efficiency existing in traditional 3D model storage methods, and has outstanding substantive features and significant progress.

[0033] In one example, the 3D model data includes at least: picture data and texture data, and after obtaining the 3D model data, the 3D model data storage method also includes: performing preliminary preprocessing on the picture data, removing duplicate picture files in the picture data, and generating a unique UUID for each picture file in the picture data, and using the UUID array to replace the mapping data between the picture files; determining the picture file corresponding to each texture sub-data in the texture data, and using the UUID array of the picture file to replace the mapping data between the texture sub-data and the picture file.

[0034] In this example, the 3D model data includes at least image data and texture data. After obtaining the 3D model data, the image data is first preprocessed. This preprocessing step includes removing duplicate image files in the image data to reduce redundancy and improve storage and processing efficiency. A unique UUID (universally unique identifier) ​​is generated for each image file to ensure that each image file can be uniquely identified to avoid confusion and duplication.

[0035] Next, the generated UUID array is used to replace the original mapping data between image files. This means that the places where the image file path or name was originally used directly are now replaced with these UUIDs. The benefit of this is that the data structure is further simplified, and UUID has the characteristics of uniqueness and global unique identification, which enhances the reliability of data management.

[0036] For each texture sub-data in the texture data, determine its corresponding image file, and then replace the mapping data between the texture sub-data and the image file with the previously generated UUID array. In this way, the texture sub-data no longer directly references specific image files, but references the UUIDs of these image files. This replacement method makes the structure of the texture data clearer, and the corresponding image files can be quickly located and managed through the UUID.

[0037] The limited content of this example is intended to optimize the storage and management of 3D model data. By removing duplicate image files, generating unique UUIDs and replacing the original mapping data, the data structure is made more compact and efficient, while improving the reliability and consistency of data management. This process not only reduces redundant data, but also ensures the consistency and uniqueness of data references, which helps to improve the efficiency of storage and transmission and further optimize the processing flow of 3D model data.

[0038] In one example, the 3D model data includes at least: geometric data, and after obtaining the 3D model data, the 3D model data storage method also includes: obtaining precision adjustment parameters of the geometric data, and optimizing the precision of the normal array, position data, and UV attribute data in the geometric data according to the precision adjustment parameters.

[0039] In this example, the 3D model data includes at least geometric data. After acquiring the 3D model data, the storage method further includes a precision optimization step. Specifically, this step acquires precision adjustment parameters of the geometric data, and optimizes the normal array, position data, and UV attribute data in the geometric data according to these parameters.

[0040] Precision adjustment parameters are parameters that can control the fineness of geometric data. The normal array contains the normal direction of each vertex, which is used for lighting calculations; the position data contains the coordinate information of each vertex, which defines the shape of the geometry; the UV attribute data contains the texture coordinate information of each vertex, which is used for texture mapping. According to the precision adjustment parameters, these data can be optimized to reduce the storage space requirements of the data by reducing the number of bits or sampling frequency of the data, while improving the storage and processing efficiency without significantly affecting the visual effect.

[0041] For example, if the precision adjustment parameters indicate that certain details are not so important in the current application scene, the precision of the normal array can be reduced to retain only the necessary bits. Similarly, the precision of the position data and UV attribute data can also be adjusted as needed, such as reducing the number of decimal places of floating point numbers, thereby compressing the amount of data.

[0042] It should be noted that the precision adjustment parameters of the geometric data may be parameters input by the user.

[0043] In this technical solution, the precision optimization process is further extended, and a dynamic precision adjustment method is proposed to dynamically adjust the precision of geometric data based on application scenarios and real-time rendering requirements.

[0044] That is, while obtaining the geometry data, the current application scenario and rendering requirement information, such as the camera position, viewing angle, rendering capability of the target device, and current frame rate, are obtained in real time. Based on the scene and rendering information, the dynamic precision adjustment parameters are calculated. These parameters can be automatically adjusted according to the current viewing angle and device performance. For example, when the camera is far away from the geometry, the precision can be reduced, while when observing at a close distance, the precision can be increased; high precision can be maintained on high-performance devices, while precision can be reduced on low-performance devices to maintain smoothness. According to the dynamic precision adjustment parameters, the normal array, position data, and UV attribute data in the geometry data are optimized. Specific methods include but are not limited to: 1. According to the precision parameters, reduce the number of decimal places of the normal data or simplify it. 2. Simplify the vertex coordinate data, such as using vertex merging or reducing the precision of floating point numbers. 3. Optimize the texture coordinate data, adjust its precision according to demand, and avoid unnecessary high-precision data.

[0045] Finally, the optimized geometry data is updated in real time and stored in an appropriate data structure to ensure that the rendering effect is not affected during the dynamic adjustment process. At the same time, a real-time feedback mechanism is established to continuously adjust the accuracy parameters according to user interaction and scene changes to achieve adaptive accuracy optimization processing.

[0046] In one example, the character string is segmented according to a preset segmentation rule to obtain multiple substrings, including: reading from the beginning of the character string and reading a preset length of characters; based on a preset segmentation mark list, determining the first segmentation character existing in the preset length of characters, and determining whether there is a second segmentation character in the preset length of characters; if there is no second segmentation character, segmenting the preset length of characters from the character string to obtain a substring; if there is a second segmentation character, segmenting the characters between the first segmentation character and the second segmentation character from the character string to obtain a substring; determining the remaining characters in the character string, and based on the remaining characters, re-executing the step of "reading from the beginning of the character string and reading a preset length of characters" until the character string is segmented.

[0047] In this example, a string is segmented to obtain multiple substrings. The specific steps are as follows: First, read from the start position of the string and read characters of a preset length. For example, if the preset length is 100 characters, then read the first 100 characters from the start position of the string. Next, based on a preset list of segmentation markers (such as commas, periods, spaces, etc.), find the first occurrence of the segmentation character in the 100 characters read. At the same time, check whether there is a second segmentation character in the 100 characters. If there is no second segmentation character in the 100 characters, then the 100 characters are segmented from the string as a substring. In this case, only the read characters need to be segmented directly without considering other segmentation markers. If there is a second segmentation character in the 100 characters, then the characters between the first segmentation character and the second segmentation character are segmented from the string as a substring. The purpose of this is to ensure that the segmentation point is as close as possible to the actual segmentation marker to ensure the rationality of the substring.

[0048] After a substring is segmented, the remaining characters in the string are determined, and based on these remaining characters, the step of reading a preset length of characters from the beginning of the string is repeated again. This step is repeated until the entire string is completely segmented.

[0049] This example defines the steps of string segmentation by presetting segmentation rules and marker lists, ensuring that each segmentation is as reasonable as possible and meets the expected character length. By finding the segmentation characters, the boundaries of the substrings can be determined more intelligently to avoid segmentation at inappropriate locations. This method not only improves the accuracy of segmentation, but also ensures the reasonable length of the substrings, which is convenient for subsequent processing and management.

[0050] In one example, attribute information is extracted from each substring, and an attribute string corresponding to each substring is generated based on the attribute information, including: creating an empty data list, wherein the data list is used to store attribute strings; initializing the substring currently being processed, extracting the content between a first symbol and a second symbol in the substring, and determining the attribute information corresponding to the substring based on the content between the first symbol and the second symbol; generating an attribute string corresponding to the substring based on the attribute information corresponding to the substring, and writing the attribute string into the data list; determining a substring from which attribute information has not been extracted, and using the substring from which attribute information has not been extracted to perform the step of "initializing the substring currently being processed" until the attribute strings corresponding to all substrings are written into the data list.

[0051] In this example, attribute information is extracted from each substring, and an attribute string corresponding to each substring is generated. The specific steps are as follows:

[0052] First, create an empty data list to store the generated attribute strings. This list will save the attribute strings corresponding to all substrings. Then, initialize the substring to be processed and start extracting its attribute information. Specifically, find the content between the first symbol and the second symbol from the substring. For example, the substring may contain a format such as "name, color, size", and the first symbol and the second symbol can be a colon and a comma. In this case, "car", "red", "large", etc. are the attribute information that needs to be extracted.

[0053] Based on the extracted content, the attribute information corresponding to the substring is determined, and the corresponding attribute string is generated. For example, if the substring is "name, color, size", the extracted information may include attributes such as "name", "color", and "size", and the generated attribute string may be "car:red" or other specified formats.

[0054] Write the generated attribute string into the previously created data list. In this way, the attribute information of each substring is stored in the data list. Next, determine the substrings for which the attribute information has not been extracted, and repeat the above steps to initialize the currently processed substring, continue to extract the attribute information, generate the attribute string, and write it into the data list. This process continues until the attribute strings of all substrings have been extracted and stored in the data list.

[0055] The content of this example is limited to a systematic step-by-step description of how to extract attribute information from a substring and generate an attributed string. By creating an empty data list to store the attributed string, processing each substring one by one, extracting the content between specific symbols, determining its attribute information, and generating the corresponding attributed string, this process ensures the accuracy and consistency of data extraction. Finally, all attributed strings are written to the data list to ensure that the attribute information of each substring is effectively processed and stored. This method improves the systematicness and efficiency of data processing and ensures that the generated attributed string can correctly reflect the attribute information in the substring.

[0056] In one example, a regular expression is used to replace specific content in the attribute string, including: obtaining a preset attribute character comparison table, wherein the attribute character comparison table includes a first column and a second column, the first column contains multiple first strings, the second column contains multiple second strings, and the first strings correspond to the specific content in the attribute string; based on the attribute character comparison table, identifying whether any of the first strings exists in the attribute string; if the first string exists, then based on the attribute character comparison table, replacing the first string existing in the attribute string with the corresponding second string.

[0057] In this example, the process of using regular expressions to replace specific content in an attribute string is as follows:

[0058] First, get a preset attribute character comparison table. This comparison table includes two columns: the first column contains multiple first strings, and the second column contains the second strings corresponding to the first strings. The purpose of the comparison table is to define which strings need to be replaced and what they should be replaced with. For example, the first column may contain the strings "red", "blue", "large", and the second column may contain "R", "B", "L" accordingly.

[0059] Next, based on this attribute character comparison table, check whether any first string exists in the attribute string. Regular expressions play a key role here because they can quickly and efficiently identify and match specific content in the string. If any first string is found in the attribute string, then based on the attribute character comparison table, the first string existing in the attribute string is replaced with the corresponding second string. For example, if there is content such as "color" in the attribute string, and the comparison table defines that "red" corresponds to "R", then "red" will be replaced with "R", making the attribute string "color".

[0060] This example describes in detail the process of replacing specific content in an attribute string by combining regular expressions and attribute character comparison tables. Using the preset attribute character comparison table, it is clear which strings need to be replaced and their replacement targets. The use of regular expressions ensures the efficiency and accuracy of the replacement operation. Ultimately, the replacement operation standardizes and simplifies the specific content in the attribute string, making it easier to process and store it later. This method not only improves the efficiency of data processing, but also ensures the accuracy and consistency of the replacement operation.

[0061] In one example, the substring and the attribute string corresponding to the substring are compressed and encrypted to obtain multiple compressed encrypted files, and the compressed encrypted files are used for storage or transmission, including: using a gzip algorithm to compress the substring and the attribute string corresponding to the substring to obtain 3D model compressed data, and converting the compressed 3D model compressed data into a UTF-16 encoding format; using an asymmetric encryption algorithm to generate a pair of public and private keys, and using the public key to encrypt the 3D model compressed data after format conversion to obtain 3D model encrypted data, and transmitting or storing the 3D model encrypted data in a server; and sending the private key to a target object so that the target object can decompress and decode the 3D model encrypted data.

[0062] In this example, the substring and the corresponding attribute string are compressed and encrypted to obtain multiple compressed and encrypted files for storage or transmission. The specific steps are as follows:

[0063] First, the gzip algorithm is used to compress the substring and the corresponding attribute string to generate 3D model compressed data. Gzip is a widely used compression algorithm that can effectively reduce the size of data. Next, the compressed 3D model data is converted into the UTF-16 encoding format. This step is to ensure the compatibility of data when it is transmitted between different platforms and systems. Then, an asymmetric encryption algorithm is used to generate a pair of public and private keys. Asymmetric encryption algorithms (such as RSA) use public and private keys for encryption and decryption. The public key can be publicly released and used to encrypt data, while the private key must be kept confidential and used to decrypt data. In this step, the generated public key will be used to encrypt the compressed 3D model data.

[0064] The generated public key is used to encrypt the 3D model compressed data that has been converted to UTF-16 format to obtain 3D model encrypted data. Encryption ensures that the data is not accessed or tampered with by unauthorized third parties during transmission and storage, thereby protecting the security of the data. The encrypted data (i.e., 3D model encrypted data) can be safely transmitted or stored in the server. Finally, the private key is sent to the target object. The target object can use this private key to decrypt and decompress the encrypted data to restore the original 3D model data. Only the target object with the private key can decrypt the data, ensuring the secure transmission and storage of the data.

[0065] This example describes the steps of compression and encryption in detail, showing how to effectively transmit and store 3D model data while protecting data security. The gzip algorithm is used for compression processing to reduce the data volume and improve transmission and storage efficiency. The public key and private key are generated using an asymmetric encryption algorithm, and the public key is used to encrypt the data to ensure the security of the data during transmission and storage. By sending the private key to the target object, it is ensured that only the authorized object can decrypt and access the data, thus achieving the purpose of data security protection.

[0066] Further, the substring and the attribute string corresponding to the substring are subjected to multi-level compression, multi-layer encryption and integrity verification processing to obtain multiple compressed encrypted files, and the compressed encrypted files are used for storage or transmission processing, which may also include:

[0067] Use the gzip algorithm to perform preliminary compression processing on the substring and attribute string to obtain primary compressed data; use an efficient compression algorithm (such as Brotli or LZMA) to perform secondary compression processing on the primary compressed data to obtain final compressed data, and convert the final compressed data into UTF-16 encoding format; provide other encoding format options as needed, such as Base64 or UTF-8.

[0068] Use an asymmetric encryption algorithm to generate a pair of public and private keys; use a symmetric encryption algorithm (such as AES) to generate a symmetric key; first use the symmetric key to encrypt the encoded compressed data to obtain symmetric encrypted data; then use the public key to encrypt the symmetric key to obtain the final encrypted data; generate a verification code (such as a SHA-256 hash value) for the final encrypted data and append it to the end of the data for verification during transmission and storage.

[0069] The final encrypted data is segmented into certain sizes, and each segment is encrypted and verified independently; the segmented data is transmitted or stored in the server in sequence to ensure that each segment is processed independently. The private key and the encrypted symmetric key are securely sent to the target object to decrypt and decompress the data; the private key can be transmitted through a secure channel (such as HTTPS), and the symmetric key is transmitted through public key encryption.

[0070] After the target object receives the private key and the encrypted symmetric key, it uses the private key to decrypt the symmetric key; uses the decrypted symmetric key to decrypt the received data; decodes and decompresses the data to restore the original 3D model data; and verifies the data integrity to ensure that the data has not been tampered with.

[0071] That is, through multi-level compression, multi-layer encryption and integrity verification, the efficiency and security of data transmission and storage are enhanced, ensuring the integrity and confidentiality of 3D model data.

[0072] In summary, if Figure 2 As shown, the technical solution provided by the present invention is summarized as follows: 3D resource files are exported by professional modeling software, usually including DRC, GLB, OBJ, GLTF and other formats. First, the image data is processed, duplicate images are removed, and a mapping relationship between the image UUID and the UUID array is established. Next, the texture data is processed, and the image UUID in the texture is replaced with the corresponding UUID array. For geometric data, the normal, position and UV attribute arrays are precision processed. A string is generated based on the above processed content, and the string is segmented according to a preset segmentation rule. The segmentation rule can be based on a specific delimiter, character length or other custom rules, and several substrings are obtained after segmentation.

[0073] The system further processes the segmented substrings to extract or generate attribute strings. Attribute strings can be specific parts of a substring, results obtained through calculation or conversion, or other information related to a substring. Next, the system uses regular expressions to replace attribute strings. Regular replacement replaces specific content in attribute strings according to preset rules, thereby greatly improving the flexibility and accuracy of string processing.

[0074] The attribute string after regular replacement is reassembled into a new string by the system. In order to improve the transmission and storage efficiency of data, the system compresses the newly generated string with gzip and converts it into UTF-16 encoding format. This method can reduce the size of the data, thereby saving transmission bandwidth and storage space. In order to ensure the security of the data, the system performs asymmetric encryption on the compressed data. Use an asymmetric encryption algorithm to generate a pair of public and private keys, and use the public key to encrypt the compressed data to ensure the security of the data during transmission and storage, and prevent data leakage and illegal access.

[0075] Finally, through the above steps, an obt file is generated based on the new string for data storage. This file can be safely transmitted or stored in the server, and by sending the private key to the target object, the target object can decompress and decode the 3D model encrypted data to restore the original 3D model data.

[0076] Reference Figure 3 , an embodiment of the present invention provides a storage device for 3D model data, comprising:

[0077] An acquisition unit 1 is used to acquire 3D model data, encode and serialize the 3D model data, and obtain a character string that can fully represent the 3D model data;

[0078] A segmentation unit 2 is used to segment the string according to a preset segmentation rule to obtain multiple substrings;

[0079] A replacement unit 3 is used to extract attribute information from each substring, generate an attribute string corresponding to each substring according to the attribute information, and replace specific content in the attribute string using a regular expression;

[0080] The encryption compression unit 4 is used to compress and encrypt the substring and the attribute string corresponding to the substring to obtain a plurality of compressed encrypted files, and use the compressed encrypted files for storage or transmission.

[0081] In this embodiment, for the specific implementation of each unit in the above device embodiment, please refer to the above method embodiment, which will not be repeated here.

[0082] Reference Figure 4 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0083] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0084] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0085] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.

[0086] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0087] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for storing 3D model data, characterized in that: The following steps are involved: Acquire 3D model data, encode and serialize the 3D model data, and obtain a character string that can fully represent the 3D model data; Segment the string according to a preset segmentation rule to obtain multiple substrings; Extracting attribute information from each substring, generating an attribute string corresponding to each substring according to the attribute information, and replacing specific content in the attribute string with a regular expression, wherein the replacement operation normalizes and simplifies the specific content in the attribute string; Performing compression and encryption processing on the substring and the attribute string corresponding to the substring to obtain a plurality of compressed and encrypted files, and using the compressed and encrypted files for storage or transmission processing; Wherein, the character string is segmented according to a preset segmentation rule to obtain a plurality of substrings, including: reading from the beginning of the character string and reading a preset length of characters; based on a preset segmentation mark list, determining the first segmentation character existing in the preset length of characters, and determining whether there is a second segmentation character in the preset length of characters; if there is no second segmentation character, segmenting the preset length of characters from the character string to obtain a substring; if there is a second segmentation character, segmenting the characters between the first segmentation character and the second segmentation character from the character string to obtain a substring; determining the remaining characters in the character string, and based on the remaining characters, re-executing the step of "reading from the beginning of the character string and reading a preset length of characters" until the character string is segmented; The method extracts attribute information from each substring and generates an attribute string corresponding to each substring according to the attribute information, including: creating an empty data list, wherein the data list is used to store attribute strings; initializing a substring currently being processed, extracting content between a first symbol and a second symbol in the substring, and determining attribute information corresponding to the substring according to the content between the first symbol and the second symbol; generating an attribute string corresponding to the substring according to the attribute information corresponding to the substring, and writing the attribute string into the data list; determining a substring from which attribute information has not been extracted, and using the substring from which attribute information has not been extracted to perform the step of "initializing the substring currently being processed" until attribute strings corresponding to all substrings are written into the data list; The method of replacing the specific content in the attribute string with a regular expression includes: obtaining a preset attribute character comparison table, wherein the attribute character comparison table includes a first column and a second column, the first column includes a plurality of first character strings, the second column includes a plurality of second character strings, and the first character strings correspond to the specific content in the attribute string; based on the attribute character comparison table, identifying whether any of the first character strings exists in the attribute string; if the first character string exists, replacing the first character string existing in the attribute string with the corresponding second character string based on the attribute character comparison table; The substring and the attribute string corresponding to the substring are compressed and encrypted to obtain a plurality of compressed encrypted files, and the compressed encrypted files are used for storage or transmission, including: using a gzip algorithm to compress the substring and the attribute string corresponding to the substring to obtain 3D model compressed data, and converting the compressed 3D model compressed data into a UTF-16 encoding format; using an asymmetric encryption algorithm to generate a pair of public and private keys, and using the public key to encrypt the 3D model compressed data after format conversion to obtain 3D model encrypted data, and transmitting or storing the 3D model encrypted data in a server; and sending the private key to a target object so that the target object can decompress and decode the 3D model encrypted data.

2. The method for storing 3D model data according to claim 1, characterized in that: The 3D model data at least includes: picture data and texture data, and after acquiring the 3D model data, the 3D model data storage method further includes: Preliminarily preprocessing the image data, removing duplicate image files in the image data, generating a unique UUID for each image file in the image data, and replacing the mapping data between the image files with a UUID array; The image file corresponding to each texture sub-data in the texture data is determined, and the mapping data between the texture sub-data and the image file is replaced by the UUID array of the image file.

3. The method for storing 3D model data according to claim 1, characterized in that: The 3D model data at least includes: geometric body data, and after acquiring the 3D model data, the 3D model data storage method further includes: The precision adjustment parameters of the geometric data are obtained, and the precision of the normal array, position data, and UV attribute data in the geometric data are optimized according to the precision adjustment parameters.

4. A storage device for 3D model data, characterized in that: include: An acquisition unit, used to acquire 3D model data, encode and serialize the 3D model data, and obtain a character string that can fully represent the 3D model data; A segmentation unit, used to segment the string according to a preset segmentation rule to obtain a plurality of substrings; A replacement unit, used to extract attribute information from each substring, generate an attribute string corresponding to each substring according to the attribute information, and replace specific content in the attribute string using a regular expression, wherein the replacement operation normalizes and simplifies the specific content in the attribute string; An encryption compression unit, used for compressing and encrypting the substring and the attribute string corresponding to the substring to obtain a plurality of compressed encrypted files, and using the compressed encrypted files for storage or transmission processing; Wherein, the character string is segmented according to a preset segmentation rule to obtain a plurality of substrings, including: reading from the beginning of the character string and reading a preset length of characters; based on a preset segmentation mark list, determining the first segmentation character existing in the preset length of characters, and determining whether there is a second segmentation character in the preset length of characters; if there is no second segmentation character, segmenting the preset length of characters from the character string to obtain a substring; if there is a second segmentation character, segmenting the characters between the first segmentation character and the second segmentation character from the character string to obtain a substring; determining the remaining characters in the character string, and based on the remaining characters, re-executing the step of "reading from the beginning of the character string and reading a preset length of characters" until the character string is segmented; The method extracts attribute information from each substring and generates an attribute string corresponding to each substring according to the attribute information, including: creating an empty data list, wherein the data list is used to store attribute strings; initializing a substring currently being processed, extracting content between a first symbol and a second symbol in the substring, and determining attribute information corresponding to the substring according to the content between the first symbol and the second symbol; generating an attribute string corresponding to the substring according to the attribute information corresponding to the substring, and writing the attribute string into the data list; determining a substring from which attribute information has not been extracted, and using the substring from which attribute information has not been extracted to perform the step of "initializing the substring currently being processed" until attribute strings corresponding to all substrings are written into the data list; The method of replacing the specific content in the attribute string with a regular expression includes: obtaining a preset attribute character comparison table, wherein the attribute character comparison table includes a first column and a second column, the first column includes a plurality of first character strings, the second column includes a plurality of second character strings, and the first character strings correspond to the specific content in the attribute string; based on the attribute character comparison table, identifying whether any of the first character strings exists in the attribute string; if the first character string exists, replacing the first character string existing in the attribute string with the corresponding second character string based on the attribute character comparison table; The substring and the attribute string corresponding to the substring are compressed and encrypted to obtain a plurality of compressed encrypted files, and the compressed encrypted files are used for storage or transmission, including: using a gzip algorithm to compress the substring and the attribute string corresponding to the substring to obtain 3D model compressed data, and converting the compressed 3D model compressed data into a UTF-16 encoding format; using an asymmetric encryption algorithm to generate a pair of public and private keys, and using the public key to encrypt the 3D model compressed data after format conversion to obtain 3D model encrypted data, and transmitting or storing the 3D model encrypted data in a server; and sending the private key to a target object so that the target object can decompress and decode the 3D model encrypted data.

5. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method for storing 3D model data according to any one of claims 1 to 3 are implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for storing 3D model data according to any one of claims 1 to 3 are implemented.