A packaging design intelligent retrieval method and system based on big data

By dividing the packaging design image into non-overlapping blocks and using the maximum inter-class variance method and gradient intensity subdivision, high and low quantization values ​​are dynamically calculated, which solves the problem of inaccurate image feature expression in the existing technology and improves retrieval efficiency and accuracy.

CN120578780BActive Publication Date: 2025-09-30SHANXI BLACK & WHITE BRAND PLANNING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511072150.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-01
Publication Date
2025-09-30
Estimated Expiration
2045-08-01

AI Technical Summary

Technical Problem

The existing block truncation algorithm based on absolute distance lacks the ability to adaptively adjust the local structural characteristics of the image, resulting in inaccurate image feature expression and reduced retrieval accuracy.

Method used

By dividing the packaging design drawing into multiple non-overlapping blocks, the maximum inter-class variance method is used to dynamically obtain the optimal binarization threshold. The pixels are subdivided into three categories: strong boundary, weak boundary and non-boundary according to the gradient intensity. The high and low quantization values ​​are calculated according to the grayscale value and weight of the pixel points to form a dual quantization feature representation.

Benefits of technology

It significantly improves the distinguishability and matching accuracy of packaging design images, and improves the retrieval efficiency and accuracy in large-scale image databases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120578780B_ABST
    Figure CN120578780B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of packaging technology, and specifically relates to a method and system for intelligent retrieval of packaging designs based on big data. The method comprises: dividing a packaging design drawing into multiple non-overlapping blocks of specified sizes using a block truncation algorithm based on absolute distance; obtaining an optimal binarization threshold for the non-overlapping blocks using a maximum inter-class variance method; obtaining a bitmap of the same size as the non-overlapping blocks based on the relationship between the grayscale value of each pixel and the optimal binarization threshold; calculating the degree of loss based on the grayscale value and weight of all first pixels in the bitmap to obtain a high quantization value for the non-overlapping blocks; calculating the degree of loss based on the grayscale value and weight of all second pixels to obtain a low quantization value for the non-overlapping blocks; and encoding and storing the bitmap, low quantization value, and high quantization value of each non-overlapping block for use in retrieving packaging design drawings. The present invention improves the retrieval efficiency and accuracy of packaging design drawings in a database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of packaging technology. More specifically, the present invention relates to a packaging design intelligent retrieval method and system based on big data. Background Art

[0002] With the rapid development of e-commerce and digital media technology, packaging design, as an important carrier of product display and brand communication, has an increasing demand for digital management and efficient retrieval.

[0003] In current design resource management, traditional image coding and storage methods are usually used to process packaging design drawings, such as compression algorithms such as JPEG and PNG, or traditional feature extraction methods based on color histograms and texture features.

[0004] However, conventional image coding and storage methods often focus on the overall compression efficiency and visual restoration quality of the image, and are not suitable for efficient retrieval needs.

[0005] To address the above problems, some improved image coding and feature extraction methods have been proposed in recent years, such as the image compression method based on the Absolute Moment Block Truncation Coding (AMBTC) algorithm. This method divides the image into multiple sub-blocks, quantizes each sub-block, extracts bitmaps and quantization values ​​to represent the local features of the image, and has low computational complexity and good image reconstruction capabilities.

[0006] However, most of the existing block truncation algorithms based on absolute distance use a fixed threshold or mean method for quantization processing, which lacks the ability to adaptively adjust the local structural characteristics of the image, resulting in inaccurate image feature expression and insufficient image discrimination, causing a decrease in retrieval accuracy in image retrieval applications. Summary of the Invention

[0007] To address the technical problem that the existing block truncation method lacks the ability to adaptively adjust the local structural characteristics of an image, resulting in inaccurate feature expression in image retrieval applications, the present invention provides solutions in the following aspects.

[0008] In a first aspect, the present invention provides a method for intelligent retrieval of packaging designs based on big data, comprising: dividing a packaging design drawing into a plurality of non-overlapping blocks of a specified size through a block truncation algorithm based on absolute distance, obtaining a bitmap, a low quantization value, and a high quantization value of each non-overlapping block, and encoding and storing the obtained data for retrieval of the packaging design drawing; obtaining the bitmap, the low quantization value, and the high quantization value of each non-overlapping block, comprising: obtaining an optimal binarization threshold of the non-overlapping block through a maximum inter-class variance method based on the grayscale value distribution of pixels in the non-overlapping block; obtaining a bitmap of the same size as the non-overlapping block: for a first pixel point whose grayscale value is greater than the optimal binarization threshold, marking it as a first digit in the bitmap, and for a second pixel point whose grayscale value is not greater than the optimal binarization threshold, marking it as a second digit in the bitmap; obtaining a weight of each pixel point based on the gradient amplitude of each pixel point and its neighboring pixel points; calculating a loss degree based on the grayscale values ​​and weights of all first pixel points, thereby obtaining a high quantization value of the non-overlapping block; calculating a loss degree based on the grayscale values ​​and weights of all second pixel points, thereby obtaining a low quantization value of the non-overlapping block.

[0009] The present invention divides the packaging design drawing into multiple non-overlapping blocks through a block truncation algorithm based on absolute distance, and dynamically obtains the optimal binarization threshold of each non-overlapping block in combination with the maximum inter-class variance method, thereby generating a bitmap consistent with the original non-overlapping size to retain its main structural information; further, by analyzing the gradient intensity of the pixel points, the pixel points in the non-overlapping blocks are subdivided into three categories: strong boundary points, weak boundary points and non-boundary points, and then the weights of each type of pixel points are calculated according to the gradient amplitude of their neighborhood pixels, so that key edges and important structures have a higher influence in feature expression; on this basis, the loss degree of the two types of pixel points above and below the optimal binarization threshold is calculated in combination with their grayscale values ​​and weights, and finally a high quantization value and a low quantization value of each non-overlapping block are obtained, forming a dual-quantization feature representation with semantic distinction ability; in summary, the present invention not only effectively retains the key visual features of the non-overlapping blocks, but also enhances the distinguishability and matching accuracy between packaging design drawings, and significantly improves the retrieval efficiency and retrieval accuracy of packaging design drawings in large-scale image databases.

[0010] Preferably, the method of obtaining the optimal binarization threshold of non-overlapping blocks by the maximum inter-class variance method based on the grayscale value distribution of pixels in non-overlapping blocks includes: obtaining the range consisting of the minimum and maximum values ​​of the grayscale values ​​of all pixels in the non-overlapping blocks. ; Set the range As the binarization threshold, the pixels with grayscale values ​​greater than the binarization threshold are divided into the first class, and the pixels with grayscale values ​​not greater than the binarization threshold are divided into the second class; the inter-class variance of the first and second classes is calculated as the inter-class variance corresponding to the binarization threshold; the binarization threshold with the largest inter-class variance is taken as the optimal binarization threshold for non-overlapping blocks.

[0011] The present invention applies the maximum inter-class variance method in each non-overlapping block to obtain the optimal binarization threshold. The threshold selection is adaptive and better reflects the distribution characteristics of the non-overlapping blocks.

[0012] Preferably, the first digital number is 0 and the second digital number is 1, or the first digital number is 1 and the second digital number is 0.

[0013] Preferably, the method of obtaining the weight of each pixel point according to the gradient amplitude of each pixel point and its neighboring pixel points includes: calculating the gradient amplitude and gradient direction of each pixel point in the packaging design diagram through the Canny operator; setting the upper threshold and lower threshold of the gradient amplitude; recording the pixel points whose gradient amplitude is greater than or equal to the upper threshold as strong boundary points, recording the pixel points whose gradient amplitude is less than the upper threshold and greater than or equal to the lower threshold as weak boundary points, and recording the pixel points whose gradient amplitude is less than the lower threshold as non-boundary points; obtaining the weight of each strong boundary point and each weak boundary point according to the gradient amplitude of each strong boundary point, weak boundary point, non-boundary point and their neighboring pixel points, and setting the weights of all non-boundary points to 1.

[0014] By analyzing the gradient strength of pixel points, the present invention subdivides the pixel points in non-overlapping blocks into three categories: strong boundary points, weak boundary points, and non-boundary points. This helps to control the rationality of subsequent weight distribution, and then calculates the weight of each type of pixel point according to the gradient amplitude of its neighborhood pixel points, so that key edges and important structures have a higher influence in feature expression.

[0015] Preferably, obtaining the weight of each strong boundary point includes: Where, is the weight of the strong boundary point, represents the Sigmiod activation function, is the gradient amplitude of the strong boundary point, is the upper threshold of the gradient magnitude.

[0016] Preferably, obtaining the weight of each weak boundary point includes: Where, is the weight of the weak boundary point, is the side length of the target area corresponding to the weak boundary point, is the maximum side length, represents the Sigmiod activation function, is the gradient amplitude of the weak boundary point, is the upper bound of the gradient magnitude threshold.

[0017] Preferably, the method for obtaining the target area corresponding to the weak boundary point is: for any weak boundary point, sequentially obtain the target area with the weak boundary point as the center and the size of The neighborhood area, is the side length of the neighborhood area, and The value of Odd numbers in the range, is the maximum side length, and , Indicates rounding down. Indicates the minimum function, specifying the size equal to ; If the size corresponding to the weak boundary point is There are no neighboring pixels belonging to strong boundary points in the neighborhood area of ​​, but the size corresponding to the weak boundary points is If there are neighboring pixels belonging to strong boundary points in the neighborhood area of ​​, then the size of The neighborhood area of ​​​​is taken as the target area corresponding to the weak boundary point.

[0018] Preferably, the step of calculating the loss degree based on the grayscale values ​​and weights of all first pixels to obtain a high quantization value of the non-overlapping block includes: obtaining a range consisting of the minimum and maximum grayscale values ​​of all first pixels in the non-overlapping block. ; Calculation range The degree of loss of each gray value when it is used as a high quantization value; the gray value with the smallest loss is used as the high quantization value of the non-overlapping block; Where, To range Middle The gray value is used as the degree of loss when the quantization value is high. is the importance of the first pixel, For the The gray value of the first pixel, For range Middle Gray values, is the number of all first pixels in non-overlapping blocks.

[0019] The high quantization value obtained by the calculation after the weight fusion of the present invention is closer to the visual perception of the human eye and provides a numerical basis for the feature description of non-overlapping blocks.

[0020] Preferably, the step of calculating the loss degree based on the grayscale values ​​and weights of all second pixel points to obtain the low quantization value of the non-overlapping block includes: obtaining a range consisting of the minimum and maximum values ​​of the grayscale values ​​of all second pixel points in the non-overlapping block. ; Calculation range The degree of loss of each gray value in is used as the low quantization value; the gray value with the smallest loss is used as the low quantization value of the non-overlapping block; Where, To range Middle Gray value as the loss degree at low quantization value, is the importance of the second pixel, For the The grayscale value of the second pixel, For range Middle Gray values, is the number of all second pixels in non-overlapping blocks.

[0021] The low quantization value obtained by the present invention represents the characteristics of the background area in the non-overlapping block, and together with the high quantization value constitutes a dual quantization feature representation of the non-overlapping block. The combination of the two forms a representative feature vector of the non-overlapping block, which is beneficial for subsequent retrieval.

[0022] In a second aspect, the present invention provides a packaging design intelligent retrieval system based on big data, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned packaging design intelligent retrieval method based on big data is implemented.

[0023] By adopting the above technical solution, the above-mentioned intelligent retrieval method for packaging design based on big data is generated into a computer program and stored in a memory to be loaded and executed by a processor, thereby making a terminal device based on the memory and the processor for easy use.

[0024] The beneficial effects of the present invention are:

[0025] The present invention not only effectively retains the key visual features of non-overlapping blocks, but also enhances the distinguishability and matching accuracy between packaging design drawings, and significantly improves the retrieval efficiency and retrieval accuracy of packaging design drawings in large-scale image databases. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a flow chart schematically illustrating a packaging design intelligent retrieval method based on big data in the present invention;

[0027] Figure 2 is a flow chart schematically illustrating obtaining a bitmap, a low quantization value, and a high quantization value for non-overlapping blocks. DETAILED DESCRIPTION

[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0029] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0030] The embodiment of the present invention discloses a packaging design intelligent retrieval method based on big data, referring to Figure 1 , including steps S1 to S3:

[0031] S1. Obtain packaging design drawings.

[0032] Specifically, the packaging design drawing refers to the visual expression content with packaging elements (such as LOGO, text, pattern, color matching, etc.), including but not limited to original design drafts, product real-life photos, and 3D renderings.

[0033] S2. Divide the packaging design drawing into multiple non-overlapping blocks of specified sizes through a block truncation algorithm based on absolute distance, and obtain a bitmap, a low quantization value, and a high quantization value of each non-overlapping block.

[0034] It should be noted that the absolute distance based block truncation algorithm (AMBTC) is a fast lossy image compression algorithm. Its main idea is: divide the input image into non-overlapping blocks of a specified size, calculate the mean of the grayscale values ​​of each non-overlapping block as the binarization threshold, and then obtain a bitmap of the same size corresponding to each block according to the size relationship between the grayscale value of the pixel and the mean: for grayscale values ​​greater than the mean, write "1" in the bitmap, otherwise, write "0" in the bitmap, and then calculate the mean of the grayscale values ​​of all pixels written with "1" as the high quantization value, and calculate the mean of the grayscale values ​​of all pixels written with "0" as the low quantization value, and encode the high quantization value, low quantization value and bitmap; the decoding process is to replace the "1" and "0" in the bitmap according to the high quantization value and the low quantization value.

[0035] It should be further explained that, during decoding, the "1" and "0" in the bitmap are replaced according to the high quantization value and the low quantization value to directly obtain the decoded image. Therefore, the setting of the high quantization value and the low quantization value determines the effect of the final decoded image, that is, the degree of loss of the decoded image compared with the original image; and the high quantization value and the low quantization value are set according to the grayscale values ​​of all pixels written with "1" and all pixels written with "0", and whether to write "1" or "0" depends on the setting of the binarization threshold. Therefore, the effect of the decoded image is affected by the setting method of the binarization threshold, the high quantization value and the low quantization value.

[0036] In summary, in the block truncation algorithm based on absolute distance, the method of setting the binarization threshold, high quantization value and low quantization value based on the mean is too rough. Although the algorithm has low complexity and fast speed, the decoded image quality is poor and lacks the ability to adaptively adjust the local structural characteristics of the image, resulting in inaccurate expression of image features and lack of sufficient discrimination, resulting in a decrease in retrieval accuracy.

[0037] Therefore, in this embodiment, the optimal binarization threshold of the non-overlapping blocks is obtained by the maximum inter-class variance method; based on the size relationship between the grayscale value of the pixel point and the optimal binarization threshold, a bitmap of the non-overlapping blocks with the same size as the non-overlapping blocks is obtained; the loss degree is calculated based on the grayscale values ​​and weights of all the first pixels in the bitmap, and then a high quantization value that makes the quality of the decoded non-overlapping blocks better is obtained; the loss degree is calculated based on the grayscale values ​​and weights of all the second pixels, and then a low quantization value that makes the quality of the decoded non-overlapping blocks better is obtained.

[0038] Specifically, the packaging design drawing is divided into a plurality of non-overlapping blocks of a specified size, wherein the specified size is equal to ,in, and The specific value of can be set according to the actual application scenario and requirements, and and The value range of is [7,15]. Set to 10, Set to 10.

[0039] It should be noted that this embodiment structures the packaging design drawing into non-overlapping blocks of a specified size, which helps to capture local feature information of the packaging design drawing and is conducive to building a standardized feature database.

[0040] For each non-overlapping block obtained, obtain the bitmap, low quantization value and high quantization value of the non-overlapping block. Refer to the flowchart Figure 2 , including steps S201 to S206, specifically:

[0041] S201 : Based on the grayscale value distribution of pixels in non-overlapping blocks, an optimal binarization threshold of the non-overlapping blocks is obtained by using a maximum inter-class variance method.

[0042] Specifically, obtain the range consisting of the minimum and maximum values ​​of the grayscale values ​​of all pixels in the non-overlapping blocks ; Set the range As the binarization threshold, the pixels whose grayscale values ​​are greater than the binarization threshold are divided into the first class, and the pixels whose grayscale values ​​are not greater than the binarization threshold are divided into the second class; the inter-class variance of the first class and the second class is calculated as the inter-class variance corresponding to the binarization threshold.

[0043] Furthermore, the binarization threshold with the largest inter-class variance is taken as the optimal binarization threshold for non-overlapping blocks.

[0044] It should be noted that this embodiment applies the maximum inter-class variance method in each non-overlapping block to obtain an optimal binarization threshold for the non-overlapping block. The threshold selection is more adaptive and can better reflect the distribution characteristics of the non-overlapping blocks, providing an accurate binarization basis for the next step of generating the bitmap.

[0045] S202 : Based on the optimal binarization threshold, obtain a bitmap corresponding to the non-overlapping blocks with the same size as the non-overlapping blocks.

[0046] It should be noted that the non-overlapping blocks are binarized using the optimal binarization threshold obtained in the previous step to generate a bitmap of the same size as the original block. The obtained bitmap records whether each pixel in the non-overlapping block belongs to the high grayscale part or the low grayscale part.

[0047] Specifically, for pixel points in non-overlapping blocks, the grayscale value of the pixel point is compared with the optimal binarization threshold to determine the mark of the pixel point in the bitmap, including: for the first pixel point whose grayscale value is greater than the optimal binarization threshold, it is marked as the first number in the bitmap, and for the second pixel point whose grayscale value is not greater than the optimal binarization threshold, it is marked as the second number in the bitmap.

[0048] In one embodiment, the first number is 0 and the second number is 1; in another embodiment, the first number is 1 and the second number is 0.

[0049] It should be noted that the obtained bitmap retains the main structural contour information of non-overlapping blocks and can be used as a key feature identifier in the subsequent retrieval process; at the same time, the bitmap is represented by simple binary values ​​0 and 1, which facilitates subsequent encoding compression and fast matching.

[0050] S203 , dividing all pixel points into strong boundary points, weak boundary points, and non-boundary points according to the relationship between the gradient amplitude of the pixel point and the upper threshold and the lower threshold.

[0051] It should be noted that, combined with the set threshold, pixels are classified into three categories according to the gradient amplitude: strong boundary points with large gradients, weak boundary points with medium gradients, and non-boundary points with small gradients.

[0052] The specific steps are:

[0053] 1. Use the Canny operator to calculate the gradient magnitude and gradient direction of each pixel in the packaging design image.

[0054] 2. Set the upper and lower thresholds.

[0055] Among them, the specific values ​​of the upper threshold and the lower threshold can be set according to the actual application scenario and requirements, and the value range of the upper threshold is [45,75], and the value range of the lower threshold is [15,45). In the present invention, the upper threshold is set to 50 and the lower threshold is set to 28.

[0056] 3. Compare the gradient amplitude of the pixel point with the upper and lower thresholds: the pixel point with a gradient amplitude greater than or equal to the upper threshold is recorded as a strong boundary point; the pixel point with a gradient amplitude less than the upper threshold and greater than or equal to the lower threshold is recorded as a weak boundary point; the pixel point with a gradient amplitude less than the lower threshold is recorded as a non-boundary point.

[0057] It should be noted that this embodiment enhances the ability to express texture and structure of non-overlapping blocks by introducing edge information of pixel points; at the same time, by classifying pixel points, it helps to control the rationality of subsequent weight distribution.

[0058] S204 , obtaining weights of each strong boundary point, each weak boundary point, and each non-boundary point according to the gradient amplitudes of each strong boundary point, each weak boundary point, each non-boundary point, and their neighboring pixel points.

[0059] It should be noted that this embodiment makes feature extraction more refined by introducing a weighting mechanism, and further sets higher weights for boundary points, especially strong boundary points, which helps to highlight the key structures of the image, improve the sensitivity and accuracy of non-overlapping blocks in similarity comparison, and thus improve the efficiency of subsequent retrieval.

[0060] The specific steps are:

[0061] 1. For strong boundary points, the calculation formula for the weight of strong boundary points is:

[0062] ;

[0063] Where, is the weight of the strong boundary point, represents the Sigmiod activation function, is the gradient amplitude of the strong boundary point, is the upper bound of the gradient magnitude threshold.

[0064] It should be noted that due to the gradient amplitude of the strong boundary point Are greater than or equal to the upper threshold ,therefore, Greater than or equal to 0, then is greater than or equal to 0, and in the Sigmiod activation function, when the independent variable is greater than or equal to 0, the dependent variable is greater than or equal to 0.5, so, If it is greater than or equal to 0.5, the weight of the strong boundary point ranges from [1.5, 2].

[0065] 2. For weak boundary points, the target area corresponding to the weak boundary point is obtained based on whether there are strong boundary points in the local areas of different sizes corresponding to the weak boundary point. The weight of the weak boundary point is obtained based on the gradient amplitude of the weak boundary point and the side length of the corresponding target area. The calculation formula of the weight of the weak boundary point is:

[0066] ;

[0067] Where, is the weight of the weak boundary point, is the side length of the target area corresponding to the weak boundary point, is the maximum side length, represents the Sigmiod activation function, is the gradient amplitude of the weak boundary point, is the upper bound of the gradient magnitude threshold.

[0068] It should be noted that due to the gradient amplitude of the weak boundary point Are less than the upper threshold ,therefore, Less than 0, then is less than 0, and in the Sigmiod activation function, when the independent variable is less than 0, the dependent variable is greater than 0 and less than 0.5, so, If it is greater than 0 and less than 0.5, the weight of the weak boundary point ranges from [1, 1.5].

[0069] Among them, the method for obtaining the target area corresponding to the weak boundary point is:

[0070] (1) For any weak boundary point, obtain the The neighborhood area, is the side length of the neighborhood area, and The value of Odd numbers in the range, is the maximum side length, and , Indicates rounding down. Indicates the minimum function, specifying the size equal to .

[0071] (2) If the size corresponding to the weak boundary point is There are no neighboring pixels belonging to strong boundary points in the neighborhood area of ​​, but the size corresponding to the weak boundary points is If there are neighboring pixels belonging to strong boundary points in the neighborhood area of ​​, then the size of The neighborhood area of ​​​​is taken as the target area corresponding to the weak boundary point.

[0072] 3. For non-boundary points, set the weights of all non-boundary points to 1.

[0073] S205 : Calculate the loss degree according to the grayscale values ​​and weights of all first pixel points, and then obtain a high quantization value of the non-overlapping block.

[0074] Specifically, obtain the range consisting of the minimum and maximum values ​​of the grayscale values ​​of all first pixels in the non-overlapping blocks ; Calculation range The gray value with the smallest loss is used as the high quantization value of the non-overlapping block.

[0075] Among them, the range The calculation formula for the loss degree when each gray value is used as a high quantization value is:

[0076] ;

[0077] Where, To range Middle The gray value is used as the degree of loss when the quantization value is high. is the importance of the first pixel, Indicates taking the absolute value, For the The gray value of the first pixel, For range Middle Gray values, is the number of all first pixels in non-overlapping blocks.

[0078] It should be noted that the high quantization value obtained represents the characteristics of the more significant areas in the non-overlapping blocks, and the high quantization value calculated after the fusion weights is closer to the visual perception of the human eye, providing a numerical basis for the feature description of the non-overlapping blocks.

[0079] S206 : Calculate the loss degree according to the grayscale values ​​and weights of all second pixel points, and then obtain the low quantization value of the non-overlapping block.

[0080] Specifically, the range consisting of the minimum and maximum values ​​of the grayscale values ​​of all second pixels in the non-overlapping blocks is obtained. ; Calculation range The gray value with the smallest loss is used as the low quantization value of the non-overlapping block.

[0081] Among them, the range The calculation formula for the loss degree when each gray value is used as a low quantization value is:

[0082] ;

[0083] Where, To range Middle Gray value as the loss degree at low quantization value, is the importance of the second pixel, Indicates taking the absolute value, For the The gray value of the second pixel, For range Middle Gray values, is the number of all second pixels in non-overlapping blocks.

[0084] It should be noted that the low quantization value obtained represents the characteristics of the background area in the non-overlapping block, and together with the high quantization value constitutes a dual quantization feature representation of the non-overlapping block. The combination of the two forms a representative feature vector of the non-overlapping block, which is conducive to subsequent retrieval.

[0085] S3. Encode and store the bitmap, low quantization value, and high quantization value of each non-overlapping block for retrieval of the packaging design drawing.

[0086] Specifically, the low quantization values ​​and high quantization values ​​of all non-overlapping blocks in the packaging design drawing are used to form a dual-quantization feature set of the packaging design drawing, and the bitmaps of all non-overlapping blocks in the packaging design drawing are used to form a binary feature set of the packaging design drawing; the dual-quantization feature set and the binary feature set of all packaging design drawings in the database are obtained, and then an index structure is constructed to achieve standardized storage of the feature set of the packaging design drawings, supporting fast search and comparison.

[0087] The index structure includes but is not limited to an inverted index, a KD (K-Dimensional Tree) tree, and an LSH (Locality Sensitive Hashing).

[0088] Furthermore, the user uploads a packaging design image to be retrieved as a query image and submits a query request to the system. The system responds to the user's query request. The specific process is as follows:

[0089] 1. The system performs the same feature extraction process as step S2 on the query image provided by the user, obtains the bitmap, high quantization value and low quantization value of all non-overlapping blocks in the query image, and forms the dual quantization feature set and binary feature set of the query image.

[0090] 2. Compare the query image's dual-quantization feature set with the package design drawings' dual-quantization feature set stored in the database, and calculate the first matching degree between the query image's dual-quantization feature set and the package design drawings' dual-quantization feature set stored in the database. , To query the number of non-overlapping blocks in the image, 、 The query image The low and high quantization values ​​of non-overlapping blocks, 、 The first The low and high quantization values ​​of the two non-overlapping blocks.

[0091] 3. Filter out several packaging design images with a first matching degree greater than 0.9 from the database and record them as matching images:

[0092] (1) If the number of matching images is less than or equal to the target number, all matching images are directly displayed to the user, and the user is supported to browse and download them further.

[0093] (2) If the number of matching images is greater than the target number, further calculate the second matching degree between the binary feature set of the query image and the binary feature set of each matching image , To query the number of non-overlapping blocks in the image, The query image non-overlapping blocks and the first The Hamming distance of the binary feature set of non-overlapping blocks, with a specified size equal to ; The second one with the highest matching degree Matching images are displayed to the user, and the user is supported to browse and download them. is the target number.

[0094] The specific value of the target number can be set according to the actual application scenario and requirements, and the target number is a positive integer. The present invention sets the target number to 10.

[0095] An embodiment of the present invention also discloses an intelligent retrieval system for packaging design based on big data, including a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, an intelligent retrieval method for packaging design based on big data according to the present invention is implemented.

[0096] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.

Claims

1. A packaging design intelligent retrieval method based on big data, characterized by: include: The packaging design drawing is divided into multiple non-overlapping blocks of specified sizes through a block truncation algorithm based on absolute distance. The bitmap, low quantization value, and high quantization value of each non-overlapping block are obtained and encoded and stored for retrieval of the packaging design drawing. The obtaining of the bitmap, the low quantization value and the high quantization value of each non-overlapping block includes: Based on the gray value distribution of pixels in non-overlapping blocks, the optimal binarization threshold of non-overlapping blocks is obtained by the maximum inter-class variance method; Obtain a bitmap of the same size corresponding to the non-overlapping blocks: for a first pixel point whose grayscale value is greater than the optimal binarization threshold, mark it as a first code in the bitmap; for a second pixel point whose grayscale value is not greater than the optimal binarization threshold, mark it as a second code in the bitmap; Obtain the weight of each pixel according to the gradient amplitude of each pixel and its neighboring pixels; Calculate the loss degree according to the grayscale values ​​and weights of all first pixels, and then obtain the high quantization value of the non-overlapping blocks; The loss degree is calculated according to the grayscale values ​​and weights of all second pixel points, thereby obtaining the low quantization value of the non-overlapping block.

2. The intelligent retrieval method for packaging design based on big data according to claim 1, characterized in that: The method of obtaining the optimal binarization threshold of the non-overlapping blocks by using the maximum inter-class variance method based on the grayscale value distribution of the pixels in the non-overlapping blocks includes: Get the range consisting of the minimum and maximum grayscale values ​​of all pixels in non-overlapping blocks ; The range As the binarization threshold, the pixels whose grayscale values ​​are greater than the binarization threshold are divided into the first category, and the pixels whose grayscale values ​​are not greater than the binarization threshold are divided into the second category; the inter-class variance between the first category and the second category is calculated as the inter-class variance corresponding to the binarization threshold; The binarization threshold with the largest inter-class variance is taken as the optimal binarization threshold for non-overlapping blocks.

3. The intelligent retrieval method for packaging design based on big data according to claim 1, characterized in that: The first digital number is 0 and the second digital number is 1, or the first digital number is 1 and the second digital number is 0.

4. The intelligent retrieval method for packaging design based on big data according to claim 1, characterized in that: Obtaining the weight of each pixel point according to the gradient amplitude of each pixel point and its neighboring pixel points includes: Use the Canny operator to calculate the gradient magnitude and gradient direction of each pixel in the packaging design image; set the upper and lower thresholds of the gradient magnitude; Pixels with gradient magnitude greater than or equal to the upper threshold are marked as strong boundary points, pixels with gradient magnitude less than the upper threshold and greater than or equal to the lower threshold are marked as weak boundary points, and pixels with gradient magnitude less than the lower threshold are marked as non-boundary points. According to the gradient amplitude of each strong boundary point, weak boundary point, non-boundary point and its neighboring pixel points, the weight of each strong boundary point and each weak boundary point is obtained, and the weight of all non-boundary points is set to 1.

5. The intelligent retrieval method for packaging design based on big data according to claim 4 is characterized in that: The step of obtaining the weight of each strong boundary point includes: ; Where, is the weight of the strong boundary point, represents the Sigmiod activation function, is the gradient amplitude of the strong boundary point, is the upper threshold of the gradient magnitude.

6. The intelligent retrieval method for packaging design based on big data according to claim 4 is characterized in that: The step of obtaining the weight of each weak boundary point includes: ; Where, is the weight of the weak boundary point, is the side length of the target area corresponding to the weak boundary point, is the maximum side length, represents the Sigmiod activation function, is the gradient amplitude of the weak boundary point, is the upper bound of the gradient magnitude threshold.

7. The intelligent retrieval method for packaging design based on big data according to claim 6, characterized in that: The method for obtaining the target area corresponding to the weak boundary point is: For any weak boundary point, obtain the The neighborhood area, is the side length of the neighborhood area, and The value of Odd numbers in the range, is the maximum side length, and , Indicates rounding down. Indicates the minimum function, specifying the size equal to ; If the size corresponding to the weak boundary point is There are no neighboring pixels belonging to strong boundary points in the neighborhood area of ​​, but the size corresponding to the weak boundary points is If there are neighboring pixels belonging to strong boundary points in the neighborhood area of ​​, then the size of The neighborhood area of ​​​​is taken as the target area corresponding to the weak boundary point.

8. The intelligent retrieval method for packaging design based on big data according to claim 1, characterized in that: The step of calculating the loss degree according to the grayscale values ​​and weights of all first pixels, and then obtaining a high quantization value of the non-overlapping block, includes: Get the range consisting of the minimum and maximum grayscale values ​​of all first pixels in non-overlapping blocks ; Calculation range The degree of loss of each gray value when it is used as a high quantization value; the gray value with the smallest loss is used as the high quantization value of the non-overlapping block; ; Where, To range Middle The gray value is used as the degree of loss when the quantization value is high. is the importance of the first pixel, For the The gray value of the first pixel, For range Middle Gray values, is the number of all first pixels in non-overlapping blocks.

9. The intelligent retrieval method for packaging design based on big data according to claim 1, characterized in that: The step of calculating the loss degree according to the grayscale values ​​and weights of all second pixel points, and then obtaining the low quantization value of the non-overlapping block, includes: Get the range consisting of the minimum and maximum grayscale values ​​of all second pixels in non-overlapping blocks ; Calculation range The degree of loss of each gray value in is used as the low quantization value; the gray value with the smallest loss is used as the low quantization value of the non-overlapping block; ; Where, To range Middle Gray value as the loss degree at low quantization value, is the importance of the second pixel, For the The gray value of the second pixel, For range Middle Gray values, is the number of all second pixels in non-overlapping blocks.

10. A packaging design intelligent retrieval system based on big data, characterized by: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, an intelligent retrieval method for packaging design based on big data according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Reversible information hiding method based on AMBTC compression technology and Hamming distance

    CN111915473A

  • System for low resolution power reduction with compressed image

    US20120014448A1