[go: up one dir, main page]

CN118708559B - 3D model data storage method, device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN118708559B
CN118708559B CN202411194611.4A CN202411194611A CN118708559B CN 118708559 B CN118708559 B CN 118708559B CN 202411194611 A CN202411194611 A CN 202411194611A CN 118708559 B CN118708559 B CN 118708559B
Authority
CN
China
Prior art keywords
data
attribute
string
character
substring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202411194611.4A
Other languages
Chinese (zh)
Other versions
CN118708559A (en
Inventor
郭镇鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Hualei Xuntou Technology Co ltd
Original Assignee
Shenzhen Hualei Xuntou Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Hualei Xuntou Technology Co ltd filed Critical Shenzhen Hualei Xuntou Technology Co ltd
Priority to CN202411194611.4A priority Critical patent/CN118708559B/en
Publication of CN118708559A publication Critical patent/CN118708559A/en
Application granted granted Critical
Publication of CN118708559B publication Critical patent/CN118708559B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明涉及一种3D模型数据存储方法、装置、计算机设备和存储介质。通过获取3D模型数据并进行编码和序列化处理,将其转换为结构化字符串,便于后续操作。字符串按照预设规则进行分割,生成多个子字符串,以提高并行处理效率。每个子字符串提取属性信息并生成对应的属性字符串,通过正则表达式替换减少冗余信息。随后,对子字符串和属性字符串进行gzip压缩,并加密,生成多个压缩加密文件,便于安全存储和传输。本方案显著减少了数据冗余,提高了压缩效率,减小了文件体积,增强了数据安全性,并通过分割数据提升渲染速度和用户交互体验,适应多样化的应用需求。

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.

Description

Storage method, storage device, computer equipment and storage medium for 3D model data
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and apparatus for storing 3D model data, a computer device, and a storage medium.
Background
With the rapid development of three-dimensional graphics processing technology, 3D models are widely used in various application scenarios. However, the conventional 3D model storage method exposes some significant drawbacks in practical applications. First, as model details increase, the volume of the derived model file also increases. The method not only consumes a great deal of time and resources in the storage and transmission process, but also becomes an obvious bottleneck for transmitting and loading a large file model particularly in a network environment, and seriously influences the user experience.
Second, conventional 3D model storage methods typically ignore the security of data. Since the 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, so that model data is easy to access and tamper by unauthorized third parties, and economic loss and privacy disclosure are caused.
In addition, when the existing 3D rendering engine processes a large file model, performance bottlenecks are often encountered, and rendering efficiency is affected. The loading and decoding processes of the large file model are complicated, so that the interface rendering speed is slow, and the user interaction experience is poor. In order to improve user experience and data security, an efficient 3D model data storage and compression optimization method is needed to meet the requirements of modern applications.
Disclosure of Invention
The invention mainly aims to provide a storage method, a storage device, computer equipment and a storage medium for 3D model data, so as to solve the technical problem that the efficiency is low in the storage, transmission and rendering processes caused by large file size, low data security and rendering performance bottleneck in the traditional 3D model storage method.
The invention provides a storage method of 3D model data, which comprises the following steps of obtaining 3D model data, carrying out coding and serialization processing on the 3D model data to obtain a character string capable of completely representing the 3D model data, carrying out segmentation processing on the character string according to a preset segmentation rule to obtain a plurality of sub-character strings, extracting attribute information from each sub-character string, generating attribute character strings corresponding to each sub-character string according to the attribute information, replacing specific content in the attribute character strings by adopting a regular expression, carrying out compression encryption processing on the sub-character strings and the attribute character strings corresponding to the sub-character strings to obtain a plurality of compression encryption files, and storing or transmitting the compression encryption files.
Further, the 3D model data at least comprises picture data and texture data, and after the 3D model data is acquired, the 3D model data storage method further comprises the steps of carrying out preliminary preprocessing on the picture data, removing repeated picture files in the picture data, generating a unique UUID (user identifier) for each picture file in the picture data, replacing mapping data representing the picture files by using a UUID array, determining picture files corresponding to each texture sub-data in the texture data, and replacing the mapping data between the texture sub-data and the picture files by using the UUID array of the picture files.
Further, the 3D model data at least comprises geometric data, and after the 3D model data are acquired, the 3D model data storage method further comprises the steps of acquiring precision adjustment parameters of the geometric data, and optimizing the precision of a normal array, position data and UV attribute data in the geometric data according to the precision adjustment parameters.
Further, the character string is segmented according to a preset segmentation rule to obtain a plurality of sub-character strings, the method comprises the steps of starting to read the character string from the beginning position of the character string, reading the characters with the preset length, determining the first segmentation character existing in the characters with the preset length based on a preset segmentation mark list, determining whether the second segmentation character exists in the characters with the preset length, segmenting the characters with the preset length from the character string to obtain a sub-character string if the second segmentation character does not exist, segmenting the characters between the first segmentation character and the second segmentation character from the character string to obtain a sub-character string if the second segmentation character exists, determining the remaining characters in the character string, and re-executing the step of starting to read the characters with the preset length from the beginning position of the character string based on the remaining characters until the character string is segmented.
Further, attribute information is extracted from each sub-string, attribute strings corresponding to the sub-strings are generated according to the attribute information, an empty data list is created, wherein the data list is used for storing the attribute strings, the currently processed sub-string is initialized, content between a first symbol and a second symbol in the sub-string is extracted, the attribute information corresponding to the sub-string is determined according to the content between the first symbol and the second symbol, the attribute strings corresponding to the sub-string are generated according to the attribute information corresponding to the sub-string, the attribute strings are written into the data list, the sub-string without the attribute information is determined, and the sub-string with the attribute information without the attribute information is adopted to execute the step of initializing the currently processed sub-string until all the attribute strings corresponding to the sub-string are written into the data list.
Further, the regular expression is adopted to replace specific content in the attribute character strings, the method comprises the steps of obtaining a preset attribute character comparison table, wherein the attribute character comparison table comprises a first column and a second column, the first column comprises a plurality of first character strings, the second column comprises a plurality of second character strings, the first character strings correspond to the specific content in the attribute character strings, whether any first character string exists in the attribute character strings or not is recognized based on the attribute character comparison table, and if the first character string exists, the first character string existing in the attribute character strings is replaced with the corresponding second character string based on the attribute character comparison table.
Further, compressing and encrypting the sub-character strings and attribute character strings corresponding to the sub-character strings to obtain a plurality of compressed and encrypted files, and storing or transmitting the compressed and encrypted files, wherein the compressing and encrypting the sub-character strings and the attribute character strings corresponding to the sub-character strings to obtain 3D model compressed data by adopting a gzip algorithm, converting the compressed 3D model compressed data into UTF-16 coding format, generating a pair of public key and private key by using an asymmetric encryption algorithm, encrypting the 3D model compressed data after format conversion by using the public key to obtain 3D model encrypted data, transmitting or storing the 3D model encrypted data in a server, and transmitting the private key to a target object so that the target object decompresses and decodes the 3D model encrypted data.
The invention provides a storage device of 3D model data, which comprises an acquisition unit, a segmentation unit, a replacement unit and an encryption compression unit, wherein the acquisition unit is used for acquiring 3D model data, carrying out coding and serialization processing on the 3D model data to obtain a character string capable of completely representing the 3D model data, the segmentation unit is used for carrying out segmentation processing on the character string according to a preset segmentation rule to obtain a plurality of sub-character strings, the replacement unit is used for extracting attribute information from each sub-character string, generating attribute character strings corresponding to each sub-character string according to the attribute information, replacing specific content in the attribute character strings by adopting a regular expression, and carrying out compression encryption processing on the sub-character strings and the attribute character strings corresponding to the sub-character strings to obtain a plurality of compression encryption files and carrying out storage or transmission processing by adopting the compression encryption files.
The invention also provides a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of any of the methods described above when the computer program is executed.
The invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the preceding claims.
According to the storage method, the storage device, the computer equipment and the storage medium for the 3D model data, the 3D model data are obtained, and are encoded and serialized to generate a character string capable of completely representing the 3D model data. This step converts complex 3D model data (e.g., vertices, edges, faces, materials, etc.) into a structured string representation by using, for example, JSON, XML, or binary coding, to facilitate subsequent processing. And then, dividing the character string according to a preset dividing rule to obtain a plurality of sub-character strings. The segmentation rules may segment a large string into a plurality of smaller, manageable sub-strings based on string length or logical structure of the model data (e.g., by model hierarchy, object segmentation), etc. The processing mode is favorable for parallel processing, and reduces the data volume of single operation, thereby improving the processing efficiency. Then, attribute information is extracted from each sub-string, and an attribute string corresponding to each sub-string is generated according to the attribute information. To improve data compression efficiency, regular expressions are also used to replace specific content. The attribute information may include model geometry, material properties, location, etc., and regular expressions are used to match and replace common values or labels to reduce redundant information. And finally, carrying out compression encryption processing on the sub-character strings and the attribute character strings to obtain a plurality of compression encryption files, and storing or transmitting the compression encryption files. Compression algorithms such as gzip or bzip2 may effectively reduce the data volume, while encryption algorithms such as AES or RSA may protect the security of the data. Compressing the encrypted file facilitates secure, efficient storage and transmission.
Compared with the prior art, the method has the advantages that through the steps of segmentation, attribute extraction and regular replacement, the redundancy of 3D model data is obviously reduced, the compression efficiency is improved, the file size is smaller, and the storage and transmission are more efficient. And secondly, encryption operation is carried out while compression processing, so that data leakage and tampering are effectively prevented, and the safety of business information and personal privacy data is protected. And thirdly, the segmented substring enables the rendering engine to load and decode small data blocks in parallel, so that the data volume of single operation is reduced, and the rendering speed and user interaction experience are improved. And finally, the size of the compressed and encrypted file after being segmented is more flexible, so that efficient transmission and storage can be conveniently carried out under different storage media and network environments, and the compressed and encrypted file is suitable for diversified application scenes and requirements.
In conclusion, the technical scheme solves the problems of large file volume, poor safety, low rendering efficiency and the like in the traditional 3D model storage method, and has outstanding substantive characteristics and remarkable progress.
Drawings
FIG. 1 is a schematic diagram showing steps of a method for storing 3D model data according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method for storing 3D model data according to an embodiment of the present invention;
FIG. 3 is a block diagram illustrating a 3D model data storage device according to an embodiment of the present invention;
Fig. 4 is a block diagram schematically illustrating a structure of a computer device according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, an embodiment of the present invention provides a method for storing 3D model data, including the steps of:
S1, acquiring 3D model data, and carrying out coding and serialization processing on the 3D model data to obtain a character string capable of completely representing the 3D model data.
S2, carrying out segmentation processing on the character strings according to a preset segmentation rule to obtain a plurality of sub-character strings.
And S3, extracting attribute information from each sub-string, generating attribute strings corresponding to each sub-string according to the attribute information, and replacing specific contents in the attribute strings by adopting a regular expression.
S4, carrying out compression encryption processing on the sub-character strings and attribute character strings corresponding to the sub-character strings to obtain a plurality of compression encryption files, and carrying out storage or transmission processing by adopting the compression encryption files.
That is, by acquiring 3D model data and performing encoding and serialization processing on the 3D model data, a character string capable of completely representing the 3D model data is generated. This step converts complex 3D model data (e.g., vertices, edges, faces, materials, etc.) into a structured string representation by using, for example, JSON, XML, or binary coding, to facilitate subsequent processing. And then, dividing the character string according to a preset dividing rule to obtain a plurality of sub-character strings. The segmentation rules may segment a large string into a plurality of smaller, manageable sub-strings based on string length or logical structure of the model data (e.g., by model hierarchy, object segmentation), etc. The processing mode is favorable for parallel processing, and reduces the data volume of single operation, thereby improving the processing efficiency. Then, attribute information is extracted from each sub-string, and an attribute string corresponding to each sub-string is generated according to the attribute information. To improve data compression efficiency, regular expressions are also used to replace specific content. The attribute information may include model geometry, material properties, location, etc., and regular expressions are used to match and replace common values or labels to reduce redundant information. And finally, carrying out compression encryption processing on the sub-character strings and the attribute character strings to obtain a plurality of compression encryption files, and storing or transmitting the compression encryption files. Compression algorithms such as gzip or bzip2 may effectively reduce the data volume, while encryption algorithms such as AES or RSA may protect the security of the data. Compressing the encrypted file facilitates secure, efficient storage and transmission.
Compared with the prior art, the method has the advantages that through the steps of segmentation, attribute extraction and regular replacement, the redundancy of 3D model data is obviously reduced, the compression efficiency is improved, the file size is smaller, and the storage and transmission are more efficient. And secondly, encryption operation is carried out while compression processing, so that data leakage and tampering are effectively prevented, and the safety of business information and personal privacy data is protected. And thirdly, the segmented substring enables the rendering engine to load and decode small data blocks in parallel, so that the data volume of single operation is reduced, and the rendering speed and user interaction experience are improved. And finally, the size of the compressed and encrypted file after being segmented is more flexible, so that efficient transmission and storage can be conveniently carried out under different storage media and network environments, and the compressed and encrypted file is suitable for diversified application scenes and requirements.
In conclusion, the technical scheme solves the problems of large file volume, poor safety, low rendering efficiency and the like in the traditional 3D model storage method, and has outstanding substantive characteristics and remarkable progress.
In one example, the 3D model data at least comprises picture data and texture data, and after the 3D model data is acquired, the 3D model data storage method further comprises the steps of carrying out preliminary preprocessing on the picture data, removing repeated picture files in the picture data, generating a unique UUID (user identifier) for each picture file in the picture data, replacing mapping data representing the picture files with UUID arrays, determining picture files corresponding to each texture sub-data in the texture data, and replacing mapping data between the texture sub-data and the picture files with UUID arrays of the picture files.
In this example, the 3D model data includes at least picture data and texture data. After the 3D model data is acquired, first, preliminary preprocessing is performed on the picture data. The preprocessing step comprises removing repeated picture files in the picture data to reduce redundancy and improve storage and processing efficiency. A unique UUID (universal unique identification code) is generated for each picture file in order to ensure that each picture file can be uniquely identified, thereby avoiding confusion and duplication.
Next, mapping data originally representing the image files is replaced with the generated UUID array. This means that where the picture file path or name was originally used directly, these UUIDs are now replaced. The advantage of this is that the data structure is further simplified, and the UUID has the characteristics of uniqueness and globally unique identification, enhancing the reliability of data management.
For each texture sub-data in the texture data, determining the corresponding picture file, and then replacing mapping data between the texture sub-data and the picture file with a UUID array generated before. In this way, the texture sub-data no longer directly references specific picture files, but rather references UUIDs of these picture files. This alternative makes the texture data structure clearer and the corresponding picture files can be located and managed quickly by UUID.
The limitations of this example aim to optimize the storage and management of 3D model data, making the data structure more compact and efficient by removing duplicate picture files, generating unique UUIDs, and replacing the original mapping data, while improving the reliability and consistency of data management. The process not only reduces redundant data, but also ensures consistency and uniqueness of data references, is beneficial to improving efficiency of storage and transmission, and further optimizes the processing flow of 3D model data.
In one example, the 3D model data at least comprises geometric data, and after the 3D model data is acquired, the 3D model data storage method further comprises the steps of acquiring accuracy adjustment parameters of the geometric data, and optimizing the accuracy of a normal array, position data and UV attribute data in the geometric data according to the accuracy adjustment parameters.
In this example, the 3D model data includes at least geometry data. After the acquisition of the 3D model data, the storage method further comprises a precision optimization step. Specifically, this step acquires accuracy adjustment parameters of the geometry data, and performs optimization processing on the normal array, the position data, and the UV attribute data in the geometry data according to the parameters.
The precision adjustment parameter refers to a parameter that can control the fineness of the geometric data. The normal array contains the normal direction of each vertex for illumination calculation, the position data contains the coordinate information of each vertex, the shape of the geometric body is defined, and the UV attribute data contains the texture coordinate information of each vertex for texture mapping. According to the precision adjustment parameters, the data are optimized, the storage space requirement of the data can be reduced by reducing the bit number or sampling frequency of the data, and meanwhile, the storage and processing efficiency is improved on the premise of not obviously influencing the visual effect.
For example, if the precision adjustment parameters indicate that certain details are less important in the current application scenario, the precision of the normal array may be reduced, leaving only the necessary number of bits. Also, the accuracy of the position data and the UV attribute data can be adjusted as needed, such as reducing the decimal number of floating point numbers, thereby compressing the data volume.
It should be noted that the precision adjustment parameter of the geometric data may be a parameter input by a user.
In the technical scheme, the precision optimization processing is further expanded, and a dynamic precision adjustment method is provided for dynamically adjusting the precision of the geometric data based on the application scene and the real-time rendering requirement.
The method comprises the steps of acquiring the geometric data, and simultaneously acquiring the current application scene and rendering requirement information such as the position of a camera, the visual angle, the rendering capability of target equipment, the current frame rate and the like in real time. And calculating dynamic precision adjustment parameters according to the scene and the rendering information. These parameters may be automatically adjusted based on the current viewing angle and device capabilities. For example, when the camera is far from the geometry, the accuracy may be reduced, while the accuracy is increased when viewed at close range, with higher accuracy maintained on high performance devices and reduced accuracy on low performance devices to maintain fluency. And carrying out optimization processing on the normal array, the position data and the UV attribute data in the geometric data according to the dynamic precision adjustment parameters. Specific methods include, but are not limited to, 1, reducing the decimal number of the normal line data or performing a simplified process according to the precision parameter. 2. The vertex coordinate data is simplified, for example using vertex merging or reducing floating point number accuracy. 3. And the texture coordinate data are optimized, the precision of the texture coordinate data is adjusted according to the requirements, and unnecessary high-precision data are avoided.
And finally, updating the geometry data after optimization processing in real time and storing the geometry data into a proper data structure to ensure that the rendering effect is not influenced in the dynamic adjustment process. Meanwhile, a real-time feedback mechanism is established, and precision parameters are continuously adjusted according to user interaction and scene changes, so that self-adaptive precision optimization processing is realized.
In one example, the character string is segmented according to a preset segmentation rule to obtain a plurality of sub-character strings, wherein the sub-character strings comprise a first segmented character which exists in the character string with the preset length and a second segmented character which exists in the character string with the preset length are determined based on a preset segmentation mark list, if the second segmented character does not exist, the character string with the preset length is segmented from the character string to obtain a sub-character string, if the second segmented character exists, the character between the first segmented character and the second segmented character is segmented from the character string to obtain a sub-character string, the remaining characters in the character string are determined, and the step of reading the character with the preset length from the beginning of the character string is re-executed based on the remaining characters until the character string is segmented.
In this example, the character string is divided to obtain a plurality of sub-character strings, and the specific steps are that firstly, the characters with preset lengths are read from the initial position of the character string. For example, if the preset length is 100 characters, the first 100 characters are read from the start position of the character string. Next, based on a preset division mark list (e.g., comma, period, space, etc.), the first appearing divided character is found among the read 100 characters. At the same time, it is checked whether there is a second split character among the 100 characters. If the second split character does not exist in the 100 characters, the 100 characters are split from the character string as a sub-character string. In this case, only the read character needs to be directly segmented, and other segmentation markers do not need to be considered. If there is a second split character in the 100 characters, the character between the first split character and the second split character is split from the character string as a sub-character string. The aim of this is to ensure that the segmentation points are as close as possible to the actual segmentation markers, ensuring the rationality of the substrings.
After a sub-string is divided, the remaining characters in the string are determined, and based on the remaining characters, the step of reading characters of a predetermined length from the position where the string starts is re-performed. This step is repeated until the entire string is completely segmented.
The content defined by this example refines the step of segmenting the string by presetting the segmentation rules and the tag list, ensuring that each segmentation is as reasonable as possible and meets the expected character length. By searching for the segmentation character, the boundary of the substring can be more intelligently determined, and segmentation at an unsuitable position is avoided. The method not only improves the accuracy of segmentation, but also ensures the reasonable length of the substring, and is convenient for subsequent processing and management.
In one example, the method comprises the steps of extracting attribute information from each sub-string and generating attribute strings corresponding to each sub-string according to the attribute information, creating an empty data list, initializing the currently processed sub-string, extracting content between a first symbol and a second symbol in the sub-string, determining the attribute information corresponding to the sub-string according to the content between the first symbol and the second symbol, generating the attribute strings corresponding to the sub-string according to the attribute information corresponding to the sub-string, writing the attribute strings into the data list, determining sub-strings not extracting the attribute information, and executing an initializing current sub-string step by adopting the sub-strings not extracting the attribute information until all the attribute strings corresponding to the sub-strings are written into the data list.
In this example, the attribute information is extracted from each sub-string, and the attribute string corresponding to each sub-string is generated as follows:
First, an empty data list is created for storing the generated attribute strings. This list will hold attribute strings corresponding to all sub-strings. Then, the substring to be processed is initialized, and extraction of attribute information thereof is started. Specifically, content located between the first symbol and the second symbol is found from the substring. For example, the substring may contain a format such as "name, color, size", and the first symbol and the second symbol may be a colon and a comma. In this case, "car", "red", "large", and the like are attribute information that needs to be extracted.
And determining attribute information corresponding to the sub-character strings according to the extracted content, and generating corresponding attribute character strings. For example, if the substring is "name, color, size", the extracted information may include attributes such as "name", "color", "size", etc., and the generated attribute string may be "car: red" or other specified format.
And writing the generated attribute character string into a data list created before. In this way, attribute information of each sub-string is stored in the data list. Next, determining the substring without extracting the attribute information, repeating the steps, initializing the substring processed currently, continuing to extract the attribute information, generating the attribute string, and writing the attribute string into a data list. This process continues until the attribute strings of all sub-strings are extracted and stored in the data list.
The content defined in this example describes in detail how to extract attribute information from the substring and generate an attribute string through systematic steps. The process ensures the accuracy and consistency of data extraction by creating an empty data list to store attribute strings, processing each sub-string one by one, extracting content between specific symbols from the sub-strings, determining attribute information of the sub-strings, and generating corresponding attribute strings. And finally, writing all attribute character strings into a data list to ensure that the attribute information of each sub-character string is effectively processed and stored. The method improves the systematicness and the efficiency of data processing, and ensures that the generated attribute character strings can correctly reflect the attribute information in the sub character strings.
In one example, replacing specific content in the attribute strings by using a regular expression comprises obtaining a preset attribute character comparison table, wherein the attribute character comparison table comprises a first column and a second column, the first column comprises a plurality of first strings, the second column comprises a plurality of second strings, the first strings correspond to the specific content in the attribute strings, whether any first strings exist in the attribute strings or not is recognized based on the attribute character comparison table, and if the first strings exist, the first strings existing in the attribute strings are replaced by the corresponding second strings based on the attribute character comparison table.
In this example, the replacement of specific content in the attribute string with a regular expression proceeds as follows:
firstly, a preset attribute character comparison table is obtained. The comparison table comprises two columns, wherein the first column comprises a plurality of first character strings, and the second column comprises a second character string corresponding to the first character strings. The purpose of the look-up table is to define which strings need to be replaced and what they should be replaced. For example, a first column may contain the strings "red", "blue", "large", and a second column may contain the strings "R", "B", and "L", respectively.
Next, based on this attribute character comparison table, it is checked whether any first character string exists in the attribute character strings. The regular expression plays a key role here because it can quickly and efficiently identify and match specific content in a string. If any first string is found in the attribute strings, the first string present in the attribute string is replaced with a corresponding second string based on the attribute string lookup table. For example, if the attribute string has a content such as "color", and the look-up table defines that "red" corresponds to "R", then "red" is replaced with "R", so that the attribute string becomes "color".
This example details the process of replacing specific content in an attribute string by a combination of regular expressions and attribute character lookup tables. And using a preset attribute character comparison table to determine which character strings need to be replaced and the replacement targets of the character strings. The use of regular expressions ensures the efficiency and accuracy of the replacement operation. Finally, the replacement operation enables specific content in the attribute character string to be normalized and simplified, and subsequent processing and storage are facilitated. The method not only improves the efficiency of data processing, but also ensures the accuracy and consistency of replacement operation.
In one example, compressing and encrypting the sub-strings and attribute strings corresponding to the sub-strings to obtain a plurality of compressed and encrypted files, and storing or transmitting the compressed and encrypted files, wherein the compressing and encrypting files comprise compressing the sub-strings and the attribute strings corresponding to the sub-strings by adopting a gzip algorithm to obtain 3D model compressed data, converting the compressed 3D model compressed data into UTF-16 coding format, generating a pair of public key and private key by using an asymmetric encryption algorithm, encrypting the 3D model compressed data after format conversion by using the public key to obtain 3D model encrypted data, transmitting or storing the 3D model encrypted data in a server, and transmitting the private key to a target object so that the target object decompresses and decodes the 3D model encrypted data.
In this example, the sub-strings and the corresponding attribute strings are subjected to compression encryption processing to obtain a plurality of compression encrypted files and stored or transmitted, and the specific steps are as follows:
Firstly, compressing the sub character strings and the corresponding attribute character strings by adopting a gzip algorithm to generate 3D model compressed data. gzip is a widely used compression algorithm that can effectively reduce the volume of data. The compressed 3D model data is then converted to UTF-16 encoding format, which is done to ensure compatibility of the data when transmitted between different platforms and systems. A pair of public and private keys is then generated using an asymmetric encryption algorithm. Asymmetric encryption algorithms (such as RSA) encrypt and decrypt data using a public key that can be published publicly for encrypting the data and a private key that must be kept secret for decrypting the data. At this step, the generated public key will be used to encrypt the compressed 3D model data.
And encrypting the 3D model compressed data converted into the UTF-16 format by using the generated public key to obtain the 3D model encrypted data. The encryption process ensures that the data is not accessed and tampered with by unauthorized third parties during transmission and storage, thereby protecting the security of the data. The encrypted data (i.e., the 3D model encrypted data) may be securely transmitted or stored in a server. And finally, sending the private key to the target object. The target object may decrypt and decompress the encrypted data using this private key, thereby restoring the original 3D model data. Only the target object with the private key can decrypt the data, so that the safe transmission and storage of the data are ensured.
This example demonstrates how 3D model data can be efficiently transferred and stored while protecting data security by detailing the steps of compression and encryption. And the gzip algorithm is adopted for compression processing, so that the data volume is reduced, and the transmission and storage efficiency is improved. And the public key and the private key are generated by using an asymmetric encryption algorithm, and the public key is utilized to encrypt data, so that the security of the data in the transmission and storage processes is ensured. By sending the private key to the target object, the data can be decrypted and accessed only by the authorized object, thereby achieving the aim of data security protection.
Further, performing multi-stage compression, multi-layer encryption and integrity check processing on the sub-strings and attribute strings corresponding to the sub-strings to obtain a plurality of compressed and encrypted files, and performing storage or transmission processing by adopting the compressed and encrypted files, and may further include:
The method comprises the steps of performing primary compression processing on a sub-character string and an attribute character string by adopting a gzip algorithm to obtain primary compression data, performing secondary compression processing on the primary compression data by using a high-efficiency compression algorithm (such as Brotli or LZMA) to obtain final compression data, converting the final compression data into a UTF-16 coding format, and providing selection of other coding formats such as Base64 or UTF-8 according to requirements.
Generating a pair of public key and private key by using an asymmetric encryption algorithm, generating a symmetric key by using a symmetric encryption algorithm (such as AES), firstly encrypting the coded compressed data by using the symmetric key to obtain symmetric encrypted data, then encrypting the symmetric key by using the public key to obtain final encrypted data, generating a check code (such as SHA-256 hash value) for the final encrypted data, and attaching the check code to the end of the data for checking in the transmission and storage processes.
The final encrypted data is segmented according to a certain size, each segment of data is independently encrypted and checked, and the segmented data is sequentially transmitted or stored into a server, so that each segment of data is ensured to be independently processed. The private key and the encrypted symmetric key are securely sent to the target object for decrypting and decompressing the data, the private key may be transmitted over a secure channel (e.g., HTTPS), and the symmetric key may be transferred over public key encryption.
After receiving the private key and the encrypted symmetric key, the target object decrypts the symmetric key by using the private key, decrypts the received data by using the decrypted symmetric key, decodes and decompresses the data to recover the original 3D model data, and verifies the integrity of the data to ensure that the data is not tampered.
Namely, through multi-level compression, multi-layer encryption and integrity check, the efficiency and the safety of data transmission and storage are enhanced, and the integrity and confidentiality of 3D model data are ensured.
In summary, as shown in fig. 2, the technical scheme provided by the invention is that the 3D resource file is derived by professional modeling software and generally comprises DRC, GLB, OBJ, GLTF formats. Firstly, processing the picture data, removing repeated pictures, and establishing a mapping relation between a UUID of the picture and a UUID array. And then, processing the texture data, and replacing the UUID of the picture in the texture with a corresponding UUID array. For geometry data, the array of normals, positions and UV properties is processed with precision. And generating a character string according to the processed content, and dividing the character string according to a preset dividing rule. The segmentation rules may be based on specific separators, character lengths, or other custom rules, and may result in a number of substrings after segmentation.
The system further processes the sub-character strings obtained by segmentation, and extracts or generates attribute character strings. The attribute string may be a specific portion of the substring, a result of a calculation or conversion, or other information related to the substring. Next, the system performs a replacement operation on the attribute string using the regular expression. The regular replacement replaces specific contents in the attribute character string according to a preset rule, so that the flexibility and accuracy of character string processing are greatly improved.
The attribute character strings after regular replacement processing are recombined into new character strings by the system. In order to improve the transmission efficiency and the storage efficiency of data, the system carries out gzip compression on the newly generated character strings and converts the character strings into UTF-16 coding format, and the mode can reduce the size of the data, so that the transmission bandwidth and the storage space are saved. In order to ensure the safety of the data, the system carries out asymmetric encryption processing on the compressed data. And generating a pair of public key and private key by using an asymmetric encryption algorithm, and encrypting the compressed data by using the public key, so that the security of the data in the transmission and storage processes is ensured, and the data leakage and illegal access are prevented.
Finally, through the above steps, a obt file is generated for data storage based on the new character string. This file can be securely transmitted or stored in the server and the original 3D model data can be restored by sending the private key to the target object so that the target object decompresses and decodes the 3D model encrypted data.
Referring to fig. 3, an embodiment of the present invention provides a storage device for 3D model data, including:
the acquisition unit 1 is used for acquiring 3D model data, and carrying out coding and serialization processing on the 3D model data to obtain a character string capable of completely representing the 3D model data;
A segmentation unit 2, configured to segment the character string according to a preset segmentation rule to obtain a plurality of sub-character strings;
A replacing unit 3, configured to extract attribute information from each sub-string, generate an attribute string corresponding to each sub-string according to the attribute information, and replace specific content in the attribute string by using a regular expression;
And the encryption and compression unit 4 is used for carrying out compression and encryption processing on the sub-character strings and the attribute character strings corresponding to the sub-character strings to obtain a plurality of compression and encryption files, and carrying out storage or transmission processing by adopting the compression and encryption files.
In this embodiment, for specific implementation of each unit in the above embodiment of the apparatus, please refer to the description in the above embodiment of the method, and no further description is given here.
Referring to fig. 4, in an embodiment of the present invention, there is further provided a computer device, which may be a server, and the internal structure of the computer device may be as shown in fig. 4. The computer device includes a processor, a memory, a display screen, an input device, a network interface, and a database connected by a system bus. Wherein the computer is configured 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, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. 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 for communicating with an external terminal through a network connection. Which computer program, when being executed by a processor, carries out the above-mentioned method.
It will be appreciated by those skilled in the art that the architecture shown in fig. 4 is merely a block diagram of a portion of the architecture in connection with the present inventive arrangements and is not intended to limit the computer devices to which the present inventive arrangements are applicable.
An embodiment of the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above method. It is understood that the computer readable storage medium in this embodiment may be a volatile readable storage medium or a nonvolatile readable storage medium.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided by the present invention and used in embodiments may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual 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.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, apparatus, article, or method that comprises the element.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes using the descriptions and drawings of the present invention or direct or indirect application in other related technical fields are included in the scope of the present invention.

Claims (6)

1.一种3D模型数据的存储方法,其特征在于,包括以下步骤:1. A method for storing 3D model data, characterized in that it comprises the following steps: 获取3D模型数据,对所述3D模型数据进行编码和序列化处理,得到一个能完整表示所述3D模型数据的字符串;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 using 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 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; 其中,采用正则表达式对所述属性字符串中的特定内容进行替换,包括:获取预设的属性字符对照表,其中,所述属性字符对照表包括第一列和第二列,所述第一列包含多个第一字符串,所述第二列包含多个第二字符串,所述第一字符串与属性字符串中的特定内容相对应;基于所述属性字符对照表,识别所述属性字符串中是否存在任何所述第一字符串;若存在所述第一字符串,则基于所述属性字符对照表,将所述属性字符串存在的第一字符串替换为对应的第二字符串;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; 其中,对所述子字符串和所述子字符串对应的属性字符串进行压缩加密处理,得到多个压缩加密文件,并采用所述压缩加密文件进行存储或传输处理,包括:采用gzip算法对所述子字符串和所述子字符串对应的属性字符串进行压缩处理,得到3D模型压缩数据,并将压缩后的3D模型压缩数据转换成UTF-16编码格式;使用非对称加密算法生成一对公钥和私钥,并使用所述公钥对格式转换后的所述3D模型压缩数据进行加密处理,得到3D模型加密数据,并将所述3D模型加密数据传输或存储于服务器中;以及,将所述私钥发送至目标对象,以便所述目标对象解压并解码所述3D模型加密数据。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.根据权利要求1所述的3D模型数据的存储方法,其特征在于,所述3D模型数据至少包括:图片数据和纹理数据,以及在获取3D模型数据之后,所述3D模型数据存储方法还包括:2. The method for storing 3D model data according to claim 1, wherein the 3D model data at least includes: picture data and texture data, and after acquiring the 3D model data, the method for storing 3D model data further includes: 对所述图片数据进行初步预处理,去除所述图片数据中的重复图片文件,并为所述图片数据中的每个图片文件生成一个唯一的UUID,并采用UUID数组替换表示所述图片文件之间的映射数据;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; 确定所述纹理数据中的每个纹理子数据对应的图片文件,并采用所述图片文件的UUID数组替换所述纹理子数据与所述图片文件之间的映射数据。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 with the UUID array of the image file. 3.根据权利要求1所述的3D模型数据的存储方法,其特征在于,所述3D模型数据至少包括:几何体数据,以及在获取3D模型数据之后,所述3D模型数据存储方法还包括:3. The method for storing 3D model data according to claim 1, wherein the 3D model data at least comprises: geometric body data, and after acquiring the 3D model data, the method for storing 3D model data further comprises: 获取所述几何体数据的精度调整参数,并根据所述精度调整参数对所述几何体数据中的法线数组、位置数据、UV属性数据的精度进行优化处理。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.一种3D模型数据的存储装置,其特征在于,包括:4. A storage device for 3D model data, comprising: 获取单元,用于获取3D模型数据,对所述3D模型数据进行编码和序列化处理,得到一个能完整表示所述3D模型数据的字符串;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 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; 其中,采用正则表达式对所述属性字符串中的特定内容进行替换,包括:获取预设的属性字符对照表,其中,所述属性字符对照表包括第一列和第二列,所述第一列包含多个第一字符串,所述第二列包含多个第二字符串,所述第一字符串与属性字符串中的特定内容相对应;基于所述属性字符对照表,识别所述属性字符串中是否存在任何所述第一字符串;若存在所述第一字符串,则基于所述属性字符对照表,将所述属性字符串存在的第一字符串替换为对应的第二字符串;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; 其中,对所述子字符串和所述子字符串对应的属性字符串进行压缩加密处理,得到多个压缩加密文件,并采用所述压缩加密文件进行存储或传输处理,包括:采用gzip算法对所述子字符串和所述子字符串对应的属性字符串进行压缩处理,得到3D模型压缩数据,并将压缩后的3D模型压缩数据转换成UTF-16编码格式;使用非对称加密算法生成一对公钥和私钥,并使用所述公钥对格式转换后的所述3D模型压缩数据进行加密处理,得到3D模型加密数据,并将所述3D模型加密数据传输或存储于服务器中;以及,将所述私钥发送至目标对象,以便所述目标对象解压并解码所述3D模型加密数据。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.一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至3中任一项所述3D模型数据的存储方法的步骤。5. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the 3D model data storage method according to any one of claims 1 to 3 when executing the computer program. 6.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至3中任一项所述3D模型数据的存储方法的步骤。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.
CN202411194611.4A 2024-08-29 2024-08-29 3D model data storage method, device, computer equipment and storage medium Active CN118708559B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411194611.4A CN118708559B (en) 2024-08-29 2024-08-29 3D model data storage method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411194611.4A CN118708559B (en) 2024-08-29 2024-08-29 3D model data storage method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN118708559A CN118708559A (en) 2024-09-27
CN118708559B true CN118708559B (en) 2024-12-06

Family

ID=92820333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411194611.4A Active CN118708559B (en) 2024-08-29 2024-08-29 3D model data storage method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118708559B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118010A (en) * 2020-08-25 2020-12-22 中电信用服务有限公司 A method, device and storage medium for compressing character strings
CN118296626A (en) * 2024-04-12 2024-07-05 中国工商银行股份有限公司 Data encryption method, device, electronic equipment, storage medium and program product

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434231B (en) * 2020-11-05 2023-09-08 北京奇艺世纪科技有限公司 Data processing method and device and electronic equipment
CN115617847A (en) * 2022-10-24 2023-01-17 中国银行股份有限公司 Low version MYSQL regular replacement method and device
CN115688180B (en) * 2022-11-17 2025-12-12 广州凡拓数字创意科技股份有限公司 A 3D model encryption method based on GLB format
CN115940958A (en) * 2022-12-22 2023-04-07 玉溪融建信息技术有限公司 Compression method based on Fasta and Fastq biological big data
CN117454404A (en) * 2023-11-13 2024-01-26 腾讯科技(深圳)有限公司 Text encryption method, text decryption device and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118010A (en) * 2020-08-25 2020-12-22 中电信用服务有限公司 A method, device and storage medium for compressing character strings
CN118296626A (en) * 2024-04-12 2024-07-05 中国工商银行股份有限公司 Data encryption method, device, electronic equipment, storage medium and program product

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"低熵图像序列无损压缩";汤颖等;《计算机科学》;20141215;第41卷(第12期);第238-244页 *

Also Published As

Publication number Publication date
CN118708559A (en) 2024-09-27

Similar Documents

Publication Publication Date Title
US12430614B2 (en) Flexible format encryption
CN108512830B (en) Information encryption processing method and device, computer equipment and storage medium
CN113515752B (en) Information encryption method, information decryption device and electronic equipment
EP3756130B1 (en) Image hidden information detector
US10706160B1 (en) Methods, systems, and articles of manufacture for protecting data in an electronic document using steganography techniques
US10164945B2 (en) Method, apparatus, and computer-readable medium for masking data
CN112600665A (en) Covert communication method, device and system based on block chain and encryption technology
WO2024066271A1 (en) Database watermark embedding method and apparatus, database watermark tracing method and apparatus, and electronic device
Bitar et al. Blind digital watermarking in PDF documents using Spread Transform Dither Modulation
CN111340676A (en) Image watermark embedding method, image watermark identification method, image watermark embedding device, image watermark identification device and electronic equipment
Hua et al. Enabling large-capacity reversible data hiding over encrypted JPEG bitstreams
WO2020147439A1 (en) Image processing method, image verification method, apparatus, device and medium
CN117692129A (en) Data encryption transmission method and device, storage medium and computer equipment
CN118708559B (en) 3D model data storage method, device, computer equipment and storage medium
CN111382398B (en) Method, device and equipment for information processing, hidden information analysis and embedding
Cao et al. Separable reversible data hiding in encrypted VQ‐encoded images
AU2017100438A4 (en) Methods and Apparatus for Encrypting Multimedia Information
CN119089479B (en) Space database encryption method, equipment and medium
CN114692100A (en) Digital watermark adding and extracting method and device, electronic equipment and readable medium
Zhu et al. A permutation-based reversible data hiding method with zero visual distortion
CN114692187A (en) Data processing method and device
CN115549979A (en) Data encryption and decryption method and device, electronic equipment and storage medium
Choche et al. A methodology to conceal QR codes for security applications
CN118363986B (en) Encryption and decryption method and device for secret database
Kelesidis et al. Searching for Gemstones: Flawed Stegosystems May Hide Promising Ideas

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant