CN108829930A - The light weight method of three-dimensional digital technological design MBD model - Google Patents
The light weight method of three-dimensional digital technological design MBD model Download PDFInfo
- Publication number
- CN108829930A CN108829930A CN201810444327.6A CN201810444327A CN108829930A CN 108829930 A CN108829930 A CN 108829930A CN 201810444327 A CN201810444327 A CN 201810444327A CN 108829930 A CN108829930 A CN 108829930A
- Authority
- CN
- China
- Prior art keywords
- character
- coding
- algorithm
- huffman
- dimensional digital
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- H03M7/40—Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses a kind of light weight methods of three-dimensional digital technological design MBD model, are combined optimization using greedy algorithm-Huffman Compress Algorithm, main thought is as follows:With existing Huffman Compress Algorithm to three-dimensional digital technological design MBD model light-weight technologg:Greedy algorithm is added on the basis of using Huffman Compress Algorithm based on three-dimensional digital technological design MBD model to carry out light-weight technologg, greedy algorithm-Huffman Compress Algorithm combinational algorithm is constituted to carry out light-weight technologg to MBD model.Greedy algorithm-Huffman Compress Algorithm of the present invention is more much higher than the compression speed of service of Huffman Compress Algorithm, and the compression of greed-Huffman Compress Algorithm and the decompression speed of service are 30~50 times of Huffman Compress Algorithm.
Description
Technical field
The present invention relates to three-dimensional digital process design technology fields, and in particular to a kind of three-dimensional digital technological design
The light weight method of MBD model.
Background technique
In the AI epoch in " industry 4.0 " epoch and future that will realize, the application of Digital Design & Manufacturing Technologies makes
Revolutionary change, and the developing direction of current advanced manufacturing technology can all occur for traditional design and manufacturing process.Product is set
Meter manufacturing mode just fundamentally changes, and wants information carrier based on previous two-dimentional drawing, is aided with the product of threedimensional model
Definition technology, just by using three-dimensional entity model as this completely new Product Definition technology MBD (the Model Based in unique data source
Definition) replaced.
In terms of three-dimensional digital technological design, three dimensional design manufacturing technology using threedimensional model as core information transmitting,
Technological design and manufacturing mode with it is traditional using product two dimension drawing as the mode of core compared with, there are many technical advantages, but
No matter it is very different technically or in management simultaneously.
Current three-dimensional digital technological design MBD model is complicated, has PMI (Product Manufacturing
Information product threedimensional model) becomes design, technique and the standard of production phase, some complex three-dimensional model files
Size MB up to a hundred even several GB easily, the displays of these models, browsing and using more and more difficult may require that terminal is matched
Set higher and higher, but this cannot tackle the problem at its root, influence working efficiency, Expenses Cost.
Summary of the invention
In view of this, in order to solve the above problem in the prior art, the present invention proposes that a kind of three-dimensional digital technique is set
The light weight method for counting MBD model, is combined optimization using greedy algorithm-Huffman Compress Algorithm, improves compression operation
Speed.
The present invention is solved the above problems by following technological means:
A kind of light weight method of three-dimensional digital technological design MBD model, includes the following steps:
S1, the frequency that every kind of character occurs in the source string of three-dimensional digital technological design MBD model data is calculated;
S2, character according to the height of its frequency of occurrences, sequence from low to high is arranged;
S3, construct Huffman tree using the thought of greedy algorithm so that low frequency occur character guarantee tree most
In the following, and using longest coding;
S4, it is encoded from top to bottom with this Huffman tree of construction:
According to the regulation of coding, it is specified that:It is ' 0 ' that left subtree coding, which is compiled, and it is ' 1 ' that right subtree coding, which is compiled, realizes variable-length encoding,
Save character shared by memory, i.e., encoded according to each character of be passed to character string, encode from Huffman tree top to bottm into
Row encodes, and is saved in the coding array list of definition after coding;
S5, output source character successively corresponding Huffman encoding, i.e., to three-dimensional digital technological design MBD model data
Source string encoded and exported:Judge whether source word symbol is equal with each character saved in character list, if equal,
Then coding array corresponding to output character, circuits sequentially, until the ending of source word symbol, and exports coding, as greed-Hough
The coding of graceful compression algorithm;
S6, it is decoded using the compressed coding of Huffman, decodes back three-dimensional digital technological design MBD model data
Source string.
Further, further include:
S7, entire greedy algorithm-Huffman Compress Algorithm is calculated to the volume of three-dimensional digital technological design MBD model data
Code, decoding runing time and compression ratio used.
Further, specific step is as follows by S3:
Construction Huffman tree is carried out from bottom to top:
Total n character in character string takes two characters that frequency is minimum, creates a node tmp1 and with two son sections
Point binary tree and the two nodes are deleted from chained list;Two characters for taking frequency minimum are selected from remaining chained list, are created
It builds a node tmp2 and has two child nodes, and delete the two nodes from chained list;If the weight of tmp1>Tmp2's
Weight then exchanges the two binary trees of tmp1 and tmp2, arranges according to weight ascending order;Followed by insertion node hTmp, compare this
The size of node and father node first, if the weight of first>The weight of hTmp is then merged into one tree, merges n-1 times,
And the weight of father node=left child node weight+right child node weight, just construct Huffman tree.
Further, specific step is as follows by S6:
The decoding of this algorithm is parsed according to the coding of character, and specific practice is:If obtained coding array
Match with the coding array in each character code array list of preservation, then exports corresponding character, as greed-Huffman
The decoding of compression algorithm.
Further, specific step is as follows by S7:
It is monitored program using Stopwatch () function of the inside using c# Programming with Pascal Language and realizes what function was run
Time.
Compared with prior art, beneficial effects of the present invention include at least:
By being compared with greedy algorithm-Huffman Compress Algorithm with Huffman Compress Algorithm, draw the following conclusions:Greed
Algorithm-Huffman Compress Algorithm carries out light-weighted effect to the export data of three-dimensional digital technological design MBD model and compares
It is good, it is embodied in:For same size data character string in the case where, the compression ratio of two kinds of algorithms is the same, but
It is that the Huffman Compress Algorithm speed of service is:87788.928, and greedy algorithm-Huffman Compress Algorithm speed of service is:
1937.643, it follows that conclusion is:The compression speed of service of the greedy algorithm-Huffman Compress Algorithm than Huffman Compress Algorithm
Much higher, the compression of greed-Huffman Compress Algorithm and the decompression speed of service are 30~50 times of Huffman Compress Algorithm.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is result of the existing Huffman Compress Algorithm to three-dimensional digital technological design MBD model light-weight technologg
Figure;
Fig. 2 is the flow chart of the light weight method of three-dimensional digital technological design MBD model of the present invention;
Fig. 3 is the flow chart of the principle construction Huffman tree of greedy algorithm of the invention.
Fig. 4 present invention is using greedy algorithm-Huffman Compress Algorithm Combinatorial Optimization to three-dimensional digital technological design MBD mould
The result figure of type light-weight technologg.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, below in conjunction with attached drawing and specifically
Embodiment technical solution of the present invention is described in detail.It should be pointed out that described embodiment is only this hair
Bright a part of the embodiment, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art are not having
Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
The main thought of the light weight method of three-dimensional digital technological design MBD model of the invention is as follows:
1, with existing Huffman Compress Algorithm to three-dimensional digital technological design MBD model light-weight technologg:
It compresses character words joint number after the speed of service, source string byte number, compression, as a result as shown in Figure 1;
2, light-weight technologg is being carried out using Huffman Compress Algorithm based on three-dimensional digital technological design MBD model
On the basis of be added greedy algorithm, constitute greedy algorithm-Huffman Compress Algorithm combinational algorithm to carry out lightweight to MBD model
Processing.
As shown in Fig. 2, being that the present invention uses greedy algorithm-Huffman Compress Algorithm Combinatorial Optimization to three-dimensional digital technique
The flow chart of the progress light-weight technologg of MBD model is designed, specific implementation step is as follows:
S1, the frequency that every kind of character occurs in the source string of three-dimensional digital technological design MBD model data is calculated;
S2, character according to the height of its frequency of occurrences, sequence from low to high is arranged;
S3, Huffman tree, flow chart as shown in Figure 3, so that low frequency occurs are constructed using the thought of greedy algorithm
Character guarantees in the bottom of tree, and uses longest coding, thus will not influence encoding for the high character of frequency, under
Construction Huffman tree is carried out on and:
Total n character in character string takes two characters that frequency is minimum, creates a node (tmp1) and with two sons
The binary tree of node and the two nodes are deleted from chained list;Two characters for taking frequency minimum are selected from remaining chained list,
It creates a node (tmp2) and has two child nodes, and delete the two nodes from chained list;If the weight of tmp1>
The weight of tmp2 then exchanges the two binary trees of tmp1 and tmp2, arranges according to weight ascending order;Followed by insertion node
(hTmp), compare the size of this node Yu father node (first), if the weight of first>The weight of hTmp, then be merged into one
Tree, merges n-1 times, and the weight of father node=left child node weight+right child node weight has just constructed Huffman tree.
S4, it is encoded from top to bottom with this Huffman tree of construction:
According to the regulation of coding, it is specified that:It is ' 0 ' that left subtree coding, which is compiled, and it is ' 1 ' that right subtree coding, which is compiled, realizes variable-length encoding,
Save character shared by memory, i.e., encoded according to each character of be passed to character string, encode from Huffman tree top to bottm into
Row encodes, and is saved in the coding array list of definition after coding.
S5, output source character successively corresponding Huffman encoding, i.e., to three-dimensional digital technological design MBD model data
Source string encoded and exported:Judge whether source word symbol is equal with each character saved in character list, if equal,
Then coding array corresponding to output character, circuits sequentially, until the ending of source word symbol, and exports coding, as greed-Hough
The coding of graceful compression algorithm.
S6, it is decoded using the compressed coding of Huffman, decodes back three-dimensional digital technological design MBD model data
Source string:
The decoding of this algorithm is parsed according to the coding of character, and specific practice is:If obtained coding array
Match with the coding array in each character code array list of preservation, then exports corresponding character, as greed-Huffman
The decoding of compression algorithm.
S7, entire greedy algorithm-Huffman Compress Algorithm is calculated to the volume of three-dimensional digital technological design MBD model data
Code, decoding runing time and compression ratio used:
It is monitored program using Stopwatch () function of the inside using c# Programming with Pascal Language and realizes what function was run
Time.
Character byte after greedy algorithm-Huffman Compress Algorithm compression speed of service, source string byte number, compression
Number, as a result as shown in Figure 4.
The present invention obtains following knot by being compared with greedy algorithm-Huffman Compress Algorithm with Huffman Compress Algorithm
By:Greedy algorithm-Huffman Compress Algorithm carries out light-weighted effect to the export data of three-dimensional digital technological design MBD model
Fruit is relatively good, is embodied in:For same size data character string in the case where, the compression ratio of two kinds of algorithms is the same
, still, the Huffman Compress Algorithm speed of service is:87788.928, and greedy algorithm-Huffman Compress Algorithm operation speed
Degree is:1937.643, it follows that conclusion is:Compression of the greedy algorithm-Huffman Compress Algorithm than Huffman Compress Algorithm is transported
Scanning frequency degree is much higher, the compression of greed-Huffman Compress Algorithm and decompression the speed of service be Huffman Compress Algorithm 30~
50 times.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention
Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (5)
1. a kind of light weight method of three-dimensional digital technological design MBD model, which is characterized in that include the following steps:
S1, the frequency that every kind of character occurs in the source string of three-dimensional digital technological design MBD model data is calculated;
S2, character according to the height of its frequency of occurrences, sequence from low to high is arranged;
S3, construct Huffman tree using the thought of greedy algorithm so that low frequency occur character guarantees in the bottom of tree,
And use longest coding;
S4, it is encoded from top to bottom with this Huffman tree of construction:
According to the regulation of coding, it is specified that:It is ' 0 ' that left subtree coding, which is compiled, and it is ' 1 ' that right subtree coding, which is compiled, realizes variable-length encoding, saves
Memory shared by character is encoded according to each character of be passed to character string, coding is compiled from Huffman tree top to bottm
Yard, it is saved in the coding array list of definition after coding;
The successively corresponding Huffman encoding of S5, output source character, the i.e. source to three-dimensional digital technological design MBD model data
Character string is encoded and is exported:Judge whether source word symbol is equal with each character saved in character list, it is defeated if equal
Coding array corresponding to character out, circuits sequentially, until the ending of source word symbol, and exports coding, as greed-Huffman pressure
The coding of compression algorithm;
S6, it is decoded using the compressed coding of Huffman, decodes go back to the source of three-dimensional digital technological design MBD model data
Character string.
2. the light weight method of three-dimensional digital technological design MBD model according to claim 1, which is characterized in that also
Including:
S7, calculate entire greedy algorithm-Huffman Compress Algorithm to the coding of three-dimensional digital technological design MBD model data,
Decoding runing time used and compression ratio.
3. the light weight method of three-dimensional digital technological design MBD model according to claim 1, which is characterized in that S3
Specific step is as follows:
Construction Huffman tree is carried out from bottom to top:
Total n character in character string takes two characters that frequency is minimum, creates a node tmp1 and has two child nodes
Binary tree and the two nodes are deleted from chained list;Two characters for taking frequency minimum, creation one are selected from remaining chained list
A node tmp2 simultaneously has two child nodes, and the two nodes are deleted from chained list;If the weight of tmp1>The power of tmp2
Value, then exchange the two binary trees of tmp1 and tmp2, arranges according to weight ascending order;Followed by insertion node hTmp, compare this section
The size of point and father node first, if the weight of first>The weight of hTmp is then merged into one tree, merges n-1 times, and
The weight of father node=left child node weight+right child node weight, has just constructed Huffman tree.
4. the light weight method of three-dimensional digital technological design MBD model according to claim 1, which is characterized in that S6
Specific step is as follows:
The decoding of this algorithm is parsed according to the coding of character, and specific practice is:If obtained coding array and guarantor
The coding array in each character code array list deposited matches, then exports corresponding character, as greed-Huffman compression
The decoding of algorithm.
5. the light weight method of three-dimensional digital technological design MBD model according to claim 2, which is characterized in that S7
Specific step is as follows:
Using c# Programming with Pascal Language, using Stopwatch () function of the inside, be monitored that program realizes that function run when
Between.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810444327.6A CN108829930B (en) | 2018-05-10 | 2018-05-10 | Lightweight method for designing MBD model by three-dimensional digital process |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810444327.6A CN108829930B (en) | 2018-05-10 | 2018-05-10 | Lightweight method for designing MBD model by three-dimensional digital process |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108829930A true CN108829930A (en) | 2018-11-16 |
CN108829930B CN108829930B (en) | 2022-08-19 |
Family
ID=64147782
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810444327.6A Active CN108829930B (en) | 2018-05-10 | 2018-05-10 | Lightweight method for designing MBD model by three-dimensional digital process |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108829930B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109412604A (en) * | 2018-12-05 | 2019-03-01 | 云孚科技(北京)有限公司 | A kind of data compression method based on language model |
CN109639285A (en) * | 2018-12-05 | 2019-04-16 | 北京安华金和科技有限公司 | A method of it is compressed based on limited block sequencing and improves BZIP2 compression algorithm speed |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6121903A (en) * | 1998-01-27 | 2000-09-19 | Infit Communications Ltd. | On-the-fly data re-compression |
US20090174583A1 (en) * | 2008-01-08 | 2009-07-09 | International Business Machines Corporation | Method for Compressed Data with Reduced Dictionary Sizes by Coding Value Prefixes |
US20100061626A1 (en) * | 2007-04-01 | 2010-03-11 | Ariel-University Research And Developement Company Ltd. | Method for compressing elevation maps |
CN103731154A (en) * | 2013-11-01 | 2014-04-16 | 陕西理工学院 | Data compression algorithm based on semantic analysis |
US20140365532A1 (en) * | 2013-06-10 | 2014-12-11 | Nvidia Corporation | Bounding volume hierarchies through treelet restructuring |
-
2018
- 2018-05-10 CN CN201810444327.6A patent/CN108829930B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6121903A (en) * | 1998-01-27 | 2000-09-19 | Infit Communications Ltd. | On-the-fly data re-compression |
US20100061626A1 (en) * | 2007-04-01 | 2010-03-11 | Ariel-University Research And Developement Company Ltd. | Method for compressing elevation maps |
US20090174583A1 (en) * | 2008-01-08 | 2009-07-09 | International Business Machines Corporation | Method for Compressed Data with Reduced Dictionary Sizes by Coding Value Prefixes |
US20140365532A1 (en) * | 2013-06-10 | 2014-12-11 | Nvidia Corporation | Bounding volume hierarchies through treelet restructuring |
CN103731154A (en) * | 2013-11-01 | 2014-04-16 | 陕西理工学院 | Data compression algorithm based on semantic analysis |
Non-Patent Citations (5)
Title |
---|
DAVE MOUNT: "CMSC 451: Lecture 6 Greedy Algorithms: Hu man Coding", 《CMSC》 * |
V. DAI等: "Lossless compression of VLSI layout image data", 《IEEE TRANSACTIONS ON IMAGE PROCESSING》 * |
YONGLI ZHU等: "Adaptive Context Based Coding for Lossless Color Image Compression", 《IMACS MULTICONFERENCE ON COMPUTATIONAL ENGINEERING IN SYSTEMS APPLICATIONS》 * |
王文霞: "基于贪心算法构建最优二叉查找树", 《山西师范大学学报》 * |
金伟祖等: "基于网格分割的三维模型轻量化算法及构建", 《实验室科学》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109412604A (en) * | 2018-12-05 | 2019-03-01 | 云孚科技(北京)有限公司 | A kind of data compression method based on language model |
CN109639285A (en) * | 2018-12-05 | 2019-04-16 | 北京安华金和科技有限公司 | A method of it is compressed based on limited block sequencing and improves BZIP2 compression algorithm speed |
Also Published As
Publication number | Publication date |
---|---|
CN108829930B (en) | 2022-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101095284B (en) | Device and data method for selective compression and decompression and data format for compressed data | |
US10901948B2 (en) | Query predicate evaluation and computation for hierarchically compressed data | |
CN104040542B (en) | For the technology for the column vector that relational data is kept in volatile memory | |
CN106407285B (en) | A kind of optimization bit file compression & decompression method based on RLE and LZW | |
CN104283567B (en) | A kind of compression of name data, decompression method and equipment | |
CN103236847B (en) | Based on the data lossless compression method of multilayer hash data structure and Run-Length Coding | |
US20140185668A1 (en) | Method for adaptive entropy coding of tree structures | |
CN101164340A (en) | CABAC decoding system and method | |
CN107565970B (en) | Hybrid lossless compression method and device based on feature recognition | |
JP2002319865A (en) | Encoding method for using prefix prediction | |
CN116681036A (en) | Industrial data storage method based on digital twinning | |
CN103067022A (en) | Nondestructive compressing method, uncompressing method, compressing device and uncompressing device for integer data | |
CN109871362A (en) | A kind of data compression method towards streaming time series data | |
CN109587483A (en) | Code stream extraction module | |
CN104125475B (en) | Multi-dimensional quantum data compressing and uncompressing method and apparatus | |
CN108829930A (en) | The light weight method of three-dimensional digital technological design MBD model | |
CN104156990A (en) | Lossless compressed encoding method and system supporting oversize data window | |
CN105302915A (en) | High-performance data processing system based on memory calculation | |
Shantagiri et al. | Pixel size reduction loss-less image compression algorithm | |
WO2020114283A1 (en) | Data processing method and device | |
CN116388769B (en) | Computer storage optimization method for environment detection data | |
CN104918049A (en) | Binary arithmetic coding module suitable for HEVC (high efficiency video coding) standards | |
JP2011090526A (en) | Compression program, method, and device, and decompression program, method, and device | |
CN106452451A (en) | Data processing method and device | |
CN108009111A (en) | Data flow connection method and device |
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 |