Similar object searching processing method based on Huffman algorithm, Hash algorithm and Cache
By integrating the Huffman algorithm and hashing algorithm in EDA software and combining the optimization strategy of cache Cache, the problem of efficient compression and rapid retrieval of similar objects is solved, which significantly improves the efficiency of batch search and modification operations.
Patent Information
- Application Number
- CN202411613383.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-07
AI Technical Summary
In EDA software, it is difficult for the prior art to achieve efficient compression and rapid retrieval of similar objects (such as pads, packaging), resulting in inefficient batch search and modification operations.
By fusing the Huffman algorithm and hash algorithm and combining the optimization strategy of cache cache, data compression and rapid retrieval can be achieved. The specific steps include: building a Huffman tree for data compression, generating hash values using a hash algorithm, and storing the compressed data and hash values in the cache for quick location and access.
It realizes efficient compression and rapid search of similar objects, and improves the speed and efficiency of batch search and modification operations of similar objects by EDA system.
Smart Images

Figure CN119396838A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data information processing, and relates to a similar object search processing method based on a Huffman algorithm, a hash algorithm and a Cache. Background Art
[0002] In EDA software, in order to speed up the batch search and modification of similar objects (such as pads and packages), it is necessary to compress and store the data. Data compression can reduce data storage space, so that the same capacity of cache can cache more data and improve the hit rate of cache memory. Among them, Huffman coding, as an efficient data compression algorithm, achieves effective data compression by assigning different lengths of codes to characters of different frequencies. However, there are still challenges in the search and modification of compressed data. The hash algorithm has been widely used in data storage and retrieval systems due to its fast search and uniqueness verification. Therefore, a similar object search processing method based on Huffman algorithm, hash algorithm and cache is proposed, which is of great significance to achieve efficient compression and fast retrieval of similar objects, and accelerate EDA batch search and modification of similar objects such as pads and packages. Summary of the invention
[0003] The purpose of the present invention is to provide a method for searching similar objects based on Huffman algorithm, hash algorithm and cache, aiming to realize efficient compression and fast search of EDA searching similar objects by integrating Huffman algorithm and hash algorithm and optimizing cache.
[0004] In order to achieve the above object, the technical solution adopted by the present invention is as follows: A method for searching similar objects based on Huffman algorithm, hash algorithm and cache includes the following steps: S1. Obtain the batch processing data required for searching similar object arrays in EDA as the original data source; S2, constructing a Huffman tree according to the frequency of occurrence of attribute values in the similar object search array, performing Huffman encoding on the similar object search array, and generating compressed binary data; S3, performing hash processing on the compressed binary data through a hash algorithm to generate a hash value; S4, using a cache Cache to store the compressed binary data and its corresponding hash value respectively; S5. When data needs to be accessed, first search for the corresponding compressed binary data in the cache according to the hash value. If found, directly read the compressed binary data. If not found, access the original data source and repeat steps S2 to S5 until the corresponding compressed binary data is found in the cache according to the hash value and read. S6. Decode the compressed binary data obtained from the cache, obtain the corresponding original data and store it. When all threads have finished processing, search and modify the obtained original data.
[0005] As a limitation, in step S1, the specific steps of obtaining the batch processing data required for searching the similar object array in EDA are: S11, calculating the number of elements of the array for finding similar objects in the EDA, and determining the number of threads actually used; S12. Calculate the element block size that each thread needs to process according to the number of threads and the number of elements. S13, creating a container to store the results obtained by each thread in the Huffman algorithm and the hash algorithm respectively; S14. Traverse and create threads, each thread processes a block of elements and stores the results As a second limitation, in step S2, the attribute value is type, number, network name, position, shape, angle, copper layer, process layer, and manufacturing attribute.
[0006] Due to the adoption of the above technical solution, the present invention has the following technical advances compared with the prior art: (1) The present invention combines the Huffman algorithm and the hash algorithm closely through algorithm fusion to achieve data compression and fast retrieval. At the same time, by optimizing the storage strategy and management mechanism of the cache, the cache hit rate is improved, cache pollution is reduced, and system performance is further improved. (2) The present invention uses the Huffman algorithm to compress the similar object array, then uses the hash algorithm to build an index, and finally quickly locates the compressed binary data through the hash value, thereby improving the speed of searching for similar objects and batch modifying similar objects.
[0007] In summary, the present invention achieves efficient compression and fast search of EDA for similar objects by integrating the Huffman algorithm and the hash algorithm and optimizing the cache. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 Shown is a method flow chart of an embodiment of the present invention. DETAILED DESCRIPTION
[0009] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation modes in conjunction with the accompanying drawings.
[0010] Embodiment A method for searching similar objects based on Huffman algorithm, hash algorithm and cache like Figure 1 As shown, this embodiment is a method for searching similar objects based on Huffman algorithm, hash algorithm and Cache, comprising the following steps: S1. Obtain the batch processing data required for searching similar object arrays in EDA as the original data source; The specific steps for obtaining the batch processing data required for searching similar object arrays in EDA are: S11, calculating the number of elements of the array for finding similar objects in the EDA, and determining the number of threads actually used; S12. Calculate the element block size that each thread needs to process according to the number of threads and the number of elements. S13, creating a container to store the results obtained by each thread in the Huffman algorithm and the hash algorithm respectively; S14. Traverse and create threads, each thread processes an element block and stores the results; S2, constructing a Huffman tree according to the frequency of occurrence of attribute values in the similar object search array, performing Huffman encoding on the similar object search array, and generating compressed binary data; Among them, the attribute values of this step are type, number, network name, position, shape, angle, copper layer, process layer, and manufacturing attributes; S3, performing hash processing on the compressed binary data through a hash algorithm to generate a hash value; S4, using a cache Cache to store the compressed binary data and its corresponding hash value respectively; S5. When data needs to be accessed, first search for the corresponding compressed binary data in the cache according to the hash value. If found, directly read the compressed binary data. If not found, access the original data source and repeat steps S2 to S5 until the corresponding compressed binary data is found in the cache according to the hash value and read. S6. Decode the compressed binary data obtained from the cache, obtain the corresponding original data and store it. When all threads have finished processing, search and modify the obtained original data.
[0011] It should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art can still modify the technical solutions described in the above embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for searching similar objects based on Huffman algorithm, hash algorithm and Cache, characterized in that: The following steps are involved: S1. Obtain the batch processing data required for searching similar object arrays in EDA as the original data source; S2, constructing a Huffman tree according to the frequency of occurrence of attribute values in the similar object search array, performing Huffman encoding on the similar object search array, and generating compressed binary data; S3, performing hash processing on the compressed binary data through a hash algorithm to generate a hash value; S4, using a cache Cache to store the compressed binary data and its corresponding hash value respectively; S5. When data needs to be accessed, first search for the corresponding compressed binary data in the cache according to the hash value. If found, directly read the compressed binary data. If not found, the original data source is accessed and steps S2 to S5 are repeated until the corresponding compressed binary data is found in the cache according to the hash value and read; S6. Decode the compressed binary data obtained from the cache, obtain the corresponding original data and store it. When all threads have finished processing, search and modify the obtained original data.
2. The method for searching similar objects based on Huffman algorithm, hash algorithm and Cache according to claim 1 is characterized in that: In step S1, the specific steps of obtaining the batch processing data required for searching similar object arrays in EDA are: S11, calculating the number of elements of the array for finding similar objects in the EDA, and determining the number of threads actually used; S12. Calculate the element block size that each thread needs to process according to the number of threads and the number of elements. S13, creating a container to store the results obtained by each thread in the Huffman algorithm and the hash algorithm respectively; S14. Traverse and create threads, each thread processes a block of elements and stores the results.
3. The method for searching similar objects based on Huffman algorithm, hash algorithm and Cache according to claim 1 is characterized in that: In step S2, the attribute values are type, number, network name, position, shape, angle, copper layer, process layer, and manufacturing attributes.