# Construction of Automatic Matching Recommendation System for Web Page Image Packaging Design Based on Constrained Clustering Algorithm

Authors: Xiangjun Kong
Journal: Mobile Information Systems
 (2022)

---

## Abstract

With the rapid development of artificial intelligence technology, computer vision science has also gained new opportunities. As the foundation of computer vision and numerous artificial intelligence applications, image matching technology has received extensive attention from researchers and companies around the world. However, in web design, the research on the image matching system is not mature enough, which results in a series of problems such that the web design is not beautiful enough, and the figures do not conform to the design theme. Therefore, it is the current trend to deeply study the structure of the automatic matching recommendation system for web page image packaging design. The purpose of this paper is to use the constrained clustering algorithm to study how to construct an automatic matching recommendation system for web page image packaging design. This paper first gives a general introduction to the classification of constrained clustering algorithms. Then, the operation mechanism and model establishment of SURF feature description operator, SIFT feature description operator, and ORB feature description operator are described in detail. Then, through experiments, the matching accuracy of the web page image matching system based on the constrained clustering algorithm and the influence of parameter changes are compared with other algorithms. Finally, a comparative experiment is carried out on the image matching effects of the three feature description operators. The matching speed, noise sensitivity, and rotation type experiments are introduced respectively. By constructing the web page image packaging design of the constrained clustering algorithm to automatically match the algorithm model of the recommender system and experimenting with the model, the advantages of the constrained clustering algorithm in the model construction are proved. The experimental results show that the constrained clustering algorithm has higher image matching efficiency and matching accuracy, and the accuracy of image feature extraction is better than other algorithms. However, when the network structure division attribution threshold isϕ=0.4, the clustering performance of the constrained clustering algorithm is better. Compared with the parameter 100, when the parameter is 500 and 1000, the accuracy of the constrained clustering algorithm can be improved, and the calculation accuracy is increased by 0.317.


---

## Body

## 1. Introduction

Image matching technology has been well used in web page image packaging design, such as image resource processing, image production, and image style optimization. At present, the packaging design of web pages has a series of problems such as inefficiency, too cluttered elements, and discordant image design, which will greatly reduce the exquisiteness of web page design and make the user experience degraded. Therefore, building an automatic matching recommendation system for web page image packaging design is an important method to improve the effect of web page design. Constrained clustering is one of the hotspots in clustering research. It is often used in image matching due to its simple operation, easy understanding and implementation, and low time complexity. Therefore, it is scientific and reasonable to integrate the constrained clustering algorithm into the structure of the automatic matching recommendation system for web page image packaging design.With the rapid development of modern society, image matching is increasingly used in video tracking, target detection, modern military, and medical diagnosis. As a research branch in the field of computer vision, image matching technology is an important part of modern general technology and image processing problems. It has a wide range of applications in fields such as motion recovery structures, visual localization and mapping, and object retrieval. In these applications, image-level matching performance is critical and directly related to the performance of the entire system. Therefore, researching and designing effective image matching algorithms can greatly improve the matching efficiency and effect of web page image packaging design, promote the development of computer vision and artificial intelligence industries, and facilitate human life.Constrained clustering algorithm has fast convergence speed, can handle large-scale data sets, and has high image matching accuracy. The innovation of this paper is that (1) constrained clustering algorithm is used to construct an automatic matching recommendation system for web page image packaging design. Because the constrained clustering algorithm has the characteristics of fast matching efficiency, high matching accuracy, and high sensitivity to noise, it improves the performance of the system and makes the design of the system more scientific. (2) The SURF, the SIFT, and the ORB feature description operators are compared and studied to highlight the advantages of the constrained clustering algorithm.


## 2. Related Work

Many scholars have paid attention to the matching system research of web page image packaging design. Jiazhen proposed a new dense feature descriptor and improved similarity measure to improve image matching performance. Based on a structure tensor voting scheme, this descriptor can effectively capture the geometric structure properties of images while being robust to significant noise-induced degradation [1]. Hamzah conducted a study on edge preserving filters in image matching. The work proposed by the authors utilizes the sum of squared differences (SSD) and dual edge preserving filters, which effectively preserve the edge properties of the image and improve the matching accuracy [2]. Sadeghi proposed a histogram that combines the advantages of gradient and intensity features (RAGIH). Extensive experiments on the challenging Oxford data set show that this descriptor has good performance [3]. By introducing an efficient image retrieval method based on features, matching measures, and subspace selection, Mosbah selected relevant feedback information that relies on user injection. It solves the problem of accuracy and efficiency of image retrieval [4]. However, the model accuracy of these methods is not high enough, which may lead to inaccurate results.Constrained clustering algorithm can improve the accuracy of image matching and improve the efficiency of image matching. Li proposed an improved SIFT algorithm based on Erkov distance and cosine similarity to improve the matching rate and detection speed of UAV images. The experimental results show that the improved algorithm can effectively improve the accuracy and speed of image processing [5]. Darwish proposed a new method for optimizing transform fusion of 3D images based on the feature matching technique of Scale Invariant Feature Transform (SIFT) and Speed Up Robust Features (SURF). Quantitative and visual results show that more focused and sharper fused images can be obtained using SURF for image matching refinement [6]. Ma proposed an improved ORB algorithm, which uses the ORB operator to describe the feature points, so that the improved ORB algorithm has scale invariance. Experimental results show that the algorithm effectively improves the matching speed and accuracy of scale and rotation changes between two images [7]. Bi proposed a constrained backtrack matching pursuit (CBMP) image reconstruction algorithm. The combined strategy includes two constraints, effectively controlling the increment of estimated sparsity at different stages and accurately estimating the true support set of images [8]. But these studies lack comparisons between different algorithms, making the articles less rigorous.


## 3. Methods for Constructing an Automatic Matching Recommendation System for Web Page Image Packaging Design

### 3.1. Constrained Clustering Algorithm

Clustering method is a very common and effective data analysis method in the field of data mining. Its working principle is to divide data samples with high similarity between data into the same cluster [9].


#### 3.1.1. Point Pair Constraints

In the process of semisupervised clustering, some known prior information is often used to guide the execution of the clustering process [10]. The prior information often used in semisupervised clustering generally includes label information and point pair constraints.In point pair constraints, it mainly provides prior information about whether two data points are connected or not. If two data points are connected, it means that the two data points must belong to the same category, such that a point pair constraint is usually called a must-connect constraint. If there is no edge connection between two data points, it means that the two data points must not belong to the same category. Such prior information is usually called a disjoint constraint. That is, given a static data setP=p1,p2,…,pn and a point pair constraint ω=ω=∪ω≠, ω= is a must-connect constraint, indicating that data points pj and pk belong to the same category of clusters. And ω≠ is a disjoint constraint, indicating that data points pj and pk do not belong to the same class of clusters.The point pair constraint between data is different from the instance-level label information, which does not directly provide significant category information. Compared with the usual label information, the form of the point pair constraint is more generalized. Take the unconnected constraint as an example, assuming that the known data pointe and the data point f have an unconnected constraint link. Then it can only be deduced that the data point e and the data point f do not belong to the same category. But for other data points, the link relationship cannot be deduced, that is, the point pair constraints do not have the characteristics of deduction conduction. Therefore, the relation transfer problem of point pair constraints is more challenging than traditional label information. It is embodied in the following aspects:(1)
Unlike the category label information, the point pair constraint cannot improve the significant data category information in general, it is more generalized in the prior information and belongs to the weaker supervision information.(2)
In general, the category information of data points cannot be directly deduced from the point-to-point constraint relationship between the data, which mainly explains whether a pair of data points are connected.(3)
For a data set containingm data points, the point-to-constraint relationship transfer needs to derive Om2 point-to-constraint relationships. Conversely, only Om is required for the transitive derivation of label information.


#### 3.1.2. Constrained Clustering

In the field of image recognition [11–13], it is more common to recognize handwritten digits. In the process of clustering, each character is often regarded as a cluster or a category partition [14]. By clustering characters, the character styles of different people can be distinguished and the accuracy of clustering can be improved. Cluster analysis also has many applications in information retrieval and text analysis. Due to the current development of big data, the topics people are concerned about are increasing day by day, which in turn leads to an increase in the amount of information retrieval. When retrieving information, a large amount of relevant content is often returned. Therefore, these contents are clustered to make the information more hierarchical. In the biological information network, the most common problems are biological proteins and gene expression, as shown in Figure 1.Figure 1
Dynamic data example. (a) TimeS1, (b) Time S2, (c) Time S3, and (d) Time S4.
(a)(b)(c)(d)Clustering analysis is usually used to obtain prior information between proteins and to understand the intrinsic correlation between data [15]. In the research field of community discovery, the typical one is social network. Cluster analysis often divides the network into multiple sets by decomposing and dividing the network. And it is required that the nodes in the divided set should be densely connected. The sets should be sparser, so that the network has the characteristics of high cohesion and low coupling. Therefore, the inherent correlation of data can often be mined through cluster analysis, and the utilization of data can be further improved.In the image clustering problem of web design, some prior information is often considered to find better clustering results [16]. The prior information used in the clustering process can generally be divided into label information and constraint information. The constraint information here can be divided into soft constraints and hard constraints. Hard constraints are generally divided into must-link constraints and nonconnected constraints, namely must-link and cannot-link. Among them, the must-connect constraint means that two data points belong to the same cluster in the clustering process, and the nonconnection constraint means that two data points cannot be in the same cluster. Soft constraints are not as strong as hard constraints. It generally obtains information from the label information of the data or other prior information and adjusts the clustering results of the data through soft constraints. In the process of clustering, the use of prior information can often improve the clustering results [17, 18].


### 3.2. Image Feature Matching Method

There are many kinds of image matching algorithms. With the continuous development and improvement of image matching technology, the general process of matching images is roughly formed, as shown in Figure2.Figure 2
Image matching process.


#### 3.2.1. SURF Feature Description Operator

The SURF feature description operator is an improvement of the SIFT feature description operator. SURF matching is similar to SIFT matching, and it is also an accelerated version of it. The SIFT matching method is relatively stable, and the feature extraction detects many feature points, but it has high computational complexity. SURF has low computational complexity and is several times faster than the SIFT feature description operator, so it has the advantages of high efficiency and short computing time. At the same time, matching multiple images, the SURF feature description operator shows better robustness. However, in the stage of finding the main direction, it relies too much on the gradient direction of the pixels in the local area, which may make the main found direction inaccurate [19]. The reason why the SURF feature descriptor has high computational efficiency is that it uses Harr features and integral images. The specific process is as follows:Assuming the imageMa,b to be matched, the integral image Mja,b is expressed as the area of the rectangle with the pixel point (a, b) and the origin as the diagonal. This simple operation J=E−F−G+H enables the box filter convolution computation to greatly speed up the computation. The integral image is shown in Figure 3.Figure 3
Integral image.The Hessian matrixGA,Φ of the image at scale Φ is(1)GA,Φ=UaaA,ΦUabA,ΦUabA,ΦUbbA,ΦDetG=UaaUbb−UabUab.Among them,UaaA,Φ represents the convolution of the Gaussian second-order partial derivative λ2/λa2tΦ and the image Ma,b at the pixel point A, and Det{G) represents the determinant of the matrix. Only when the determinant is positive, this pixel point may be a local extreme point (feature point) [20]. In order to improve the computational efficiency, the complex Gaussian second-order partial derivatives are approximated, as shown in Figure 4. Wbb is an approximation of Ubb and Wab is an approximation of Uab.Figure 4
Approximation of Gaussian second-order partial derivatives: (a)Ubb, (b) Uab, (c) Wbb, and (d) Wab.
(a)(b)(c)(d)Gaussian second-order partial derivative filter of scaleΦ=0.9, the template size is 7  ×  7, and Waa, Wab, and Wbb are used to replace the convolution value of the box filter template and the image, respectively. The G matrix determinant is(2)DetGapprax=WaaWbb−vWab2.Using the similarity between the Gaussian kernel and its approximation, the weight factorv can be calculated as(3)v=Uab0.9fWaa7fUaa0.9fWab7f=0.724≈0.7,Af is the Frobenius norm. In order to simplify the calculation, in practical applications, v is specified as a constant. In order to make the Frobenius norm suitable for any scale, the template is normalized to obtain the box filter response value. Given an integral image and a simplified template, the box filter response is as follows:(4)Waa=∑n=13rnx4n−x2n−x3n+x1ndaaWbb=∑n=13rnx4n−x2n−x3n+x1ndbbWab=∑n=13rnx4n−x2n−x3n+x1ndab.Among them,daa, dbbdaa=dbb, dab represent the template area of Waa, Wbb, Wab, rn∈1,−1,2 is the internal value of the template, and the integral image value of the opposite vertex of the template is expressed as x1n,x2n,x3n,x4n. As a result, the computational efficiency is greatly improved.


#### 3.2.2. ORB Feature Description Operator

First perform FAST corner detection:(5)CBF=1,EO−Ek>ϕ,0,others,.Among them, the center of the circle is O, the gray value isEO, s represents the neighborhood of the circle, and there are n pixels (k = 1, 2, ..., n) on the circumference. Ek is the gray value of each point, and ϕ is a very small threshold. If the number of points with CBF = 1 is greater than the set threshold of Uϕ, the point is the candidate FAST corner point, as shown in Figure 5. The resulting FAST corners are not scale-invariant and contain edge responses. Based on this defect, some methods can be improved. The specific methods are as follows: (1)
Obtain the feature points to be selected greater than N by lowering the threshold, and then use Harris to sort and obtain N feature points to be selected.(2)
Obtain FAST features at each layer of the image scale pyramid.Figure 5
Circumferential field.Using the gray-scale centroid method by calculating moments to add direction information, the following can be got:(6)Gjk=∑abajbkEa,bD=Da,Db=G10G00,G01G00θ=arctanDbDa=arctanG01G10.


### 3.3. SIFT Feature Description Operator

#### 3.3.1. Key Point Detection in Scale Space

Performing a Gaussian kernel-based computation on an image can define a two-dimensional image as(7)Da,b,Φ=Sa,b,Φ∗Ua,b.Among them,Sa,b,Φ is a Gaussian function whose scale can be changed:(8)Sa,b,Φ=12πΦ2t−a2+b2/2Φ2,Φ is the scale factor of the space, and the value of Φ determines the smoothness and scale of the image. When the value of Φ is larger, the smoothness is higher, and the outline can be seen more clearly, but the clarity is reduced. The lower the smoothness, the sharper the image and the more detailed information.


#### 3.3.2. Build a Differential Pyramid

The Gaussian difference formula can be represented byPa,b,Φ:(9)Pa,b,Φ=Sa,b,wΦ−Sa,b,Φ∗Ua,b=Da,b,wΦ−Da,b,Φ.The DOG image is obtained by the difference value.


#### 3.3.3. The Location of the Feature Points Is Determined

Using series expansion of the scale space, the following can be got:(10)PA=P+αPEαAA+12AEα2PαA2A.Take the derivative and find the extreme point for 0:(11)A∧=−α2P−1αPαA2αA.By substituting formula (11) into formula (10), the following can be got:(12)PA∧=P+1αPE2αA,PA∧ is beneficial to the elimination of unstable candidate points with low DOG response values. Usually, the extreme points with a value of PA∧ below 0.03 are regarded as low-response points and eliminated.


#### 3.3.4. Eliminate Edge Candidate Feature Points

The matrix of the key pointG can be obtained by calculating the pixel difference around the key point:(13)G=PaaPabPabPbb.Letμmin be the smallest eigenvalue of the Hessian matrix G, μmax the largest eigenvalue, and θ the ratio of μmin to μmax; then the following can be got:(14)TrG=Paa+Pab=μmax+μminDetG=PaaPab−Pab2=μmaxμminTrGDetG=μmax+μmin2μmaxμmin=θμmin+μmin2θμmin2=θ+12θ.From the results, it can be concluded that its value is only related to the ratioμmin of μmax to μmin.So far, the algorithm model of the automatic matching recommendation system for web page image packaging design has been established. Next, this paper will design the modules of the system in detail and conduct experiments and analysis on the performance of the system.


### 3.4. Design of Automatic Matching Recommendation System for Web Page Image Packaging Design

The physical structure of the web page image packaging design of automatic matching recommendation system is shown in Figure6.Figure 6
Schematic figure of the physical structure of the system.


#### 3.4.1. Image Data Acquisition

Image acquisition is the basis of model training and the premise of completing system functions. The quality of the selected images determines the success of the entire experiment. Selecting good experimental images plays a crucial role in improving the accuracy of feature matching [21, 22].The images stored in the “Web Management System” need to be filtered. First, for the 30,000 images stored in the “Web Page Management System” database, only 5,360 images are selected that conform to the theme of web page design. Secondly, from these 5360 images, clear, easy-to-recognize, high-resolution, and low-impact images are selected, and the remaining blurred images are eliminated. Finally, the obtained 5000 images are used as the image data of this system.


#### 3.4.2. Model Training

The purpose of model training is to obtain the best similarity threshold, and the selection of the threshold directly determines the result of feature matching [23]. In designing the image matching model, according to the specific workflow, it is mainly divided into 8 parts:(1)
In order to make the images have scale invariance, firstly, build an image pyramid for the 5000 images that conform to the theme of the web page required by this system.(2)
Perform FAST corner extraction at each level of the pyramid, calculate the adaptive threshold of each image, and extract feature points according to the threshold. The feature points extracted at this time are the rough extraction results and have no direction.(3)
In the extraction process, in order to avoid the phenomenon that the accuracy of subsequent feature matching is affected by the aggregation of feature points, a quad-tree structure is introduced to screen the feature points. The feature points extracted at this time are the fine extraction results, but there is still no direction(4)
Based on the constrained clustering algorithm, the gray centroid method is introduced to calculate the direction angleα between the feature points and the centroid, so that all the feature points have directions, thereby achieving rotation invariance.(5)
In order to prevent the descriptor from being too sensitive to high-frequency noise, the image is smoothed first, and then the binary descriptor is obtained through SURF description and ORB feature description. The current descriptor has no direction.(6)
Combine the descriptor with the directionα of the feature point, then obtain the binary descriptor with the direction, and finally store it in the image feature information base.(7)
After the feature point extraction and description of all images in the system is completed, the feature descriptors are matched by the Brute Force method, and the similarity results between different images are obtained based on the Hamming distance.(8)
The similarity result obtained above is substituted into the logistic regression model, and the optimal similarity threshold is calculated.Through the above steps, the image matching model of the system is obtained by training, and then the “image matching system” is successfully implemented based on the image matching model. The image matching system can not only determine whether there are highly similar images between the stored images in the system, but also determine whether the images newly uploaded by the web designer and the images in the system have highly similar images.


#### 3.4.3. Establish an Image Feature Information Database

Through the above model training, an image matching model can be obtained, and then the image information obtained in the model needs to be stored.The original image data comes from the “web page management system”. After the model training, the obtained image information is many binary feature descriptors, so this paper creates an image feature information library on the basis of the image matching system. In the image feature information database, it is no longer necessary to store all the information of the image itself, but to store the extracted binary feature description features in all images that have been feature extracted and described. At this time, the feature descriptor occupies a small system space and is convenient to store, which greatly saves the system overhead.The biggest advantage of the image feature information database is to improve the work efficiency of the system. For subsequent newly uploaded images, there is no need to perform feature extraction, feature description, and other operations on the stored images during review. Just do the relevant operations on the newly uploaded image. Then, the similarity can be obtained by directly matching the binary feature descriptor of the new image with the binary feature descriptor stored in the image feature information database. The system user use case figure is shown in Figure7. At this time, the work efficiency of the system is greatly improved, and the waste of human and financial resources is reduced. The final implementation of the system needs to include the following four functions:(1)
Graphical feature vector data management and maintenance is provided.(2)
Graphic feature vector data extraction function is provided.(3)
Graphical feature vector data search and matching function is provided.(4)
A graphic feature operation parameter management adjustment function is provided.Figure 7
System user use case figure.


#### 3.4.4. Parameter Setting of Extraction Algorithm Module

The parameter management (FVPM) module is also responsible for setting the parameters of the extraction algorithm (FVEA) module, including the following: (1) sampling interval pixels (2) Gaussian smoothing; (3) key point threshold |D(x)|; (4) key point curvature threshold; (5) whether the image is doubled when building the Gaussian gold tower, the values being 0 and 1; (6) the width of the histogram descriptive array; (7) the number of blocks in each histogram in the descriptive array; (8) Gaussian blur of the input image; (9) boundary width of ignored key points; (10) the maximum number of steps before key point interpolation fails; (11) the number of directional allocation blocks in the histogram; (12) determination of the Gaussianσ of the orientation assignment; (13) determination of the area radius used in the orientation assignment; (14) the number of times the orientation histogram being smoothed; (15) the maximum orientation amplitude in the result of the new feature; (16) a description of the size of the orientation histogram.


#### 3.4.5. Parameter Setting of Data Management Module

The parameter management (FVPM) module is also responsible for setting the parameters of the data management (FVDM) module, including (1) the size threshold of the elements of the descriptive container; (2) the scaling factor of the floating point descriptor to unsigned char; (3) the priority queue element allocation space initialization size; and (4) the maximum number of searches.


#### 3.4.6. Parameter Setting of Matching Algorithm Module

The parameter management (FVPM) module is also responsible for setting the parameters of the matching algorithm (FVMA) module, including the following.(1)
The distance threshold for the successful matching of feature points: the distance is the Euclidean distance between the feature points to be matched and the feature points in the feature library.(2)
The threshold for the ratio of successful matching of figures: the ratio is the ratio of the number of successfully matched feature points to the number of feature points of the figure to be matched.


## 3.1. Constrained Clustering Algorithm

Clustering method is a very common and effective data analysis method in the field of data mining. Its working principle is to divide data samples with high similarity between data into the same cluster [9].


### 3.1.1. Point Pair Constraints

In the process of semisupervised clustering, some known prior information is often used to guide the execution of the clustering process [10]. The prior information often used in semisupervised clustering generally includes label information and point pair constraints.In point pair constraints, it mainly provides prior information about whether two data points are connected or not. If two data points are connected, it means that the two data points must belong to the same category, such that a point pair constraint is usually called a must-connect constraint. If there is no edge connection between two data points, it means that the two data points must not belong to the same category. Such prior information is usually called a disjoint constraint. That is, given a static data setP=p1,p2,…,pn and a point pair constraint ω=ω=∪ω≠, ω= is a must-connect constraint, indicating that data points pj and pk belong to the same category of clusters. And ω≠ is a disjoint constraint, indicating that data points pj and pk do not belong to the same class of clusters.The point pair constraint between data is different from the instance-level label information, which does not directly provide significant category information. Compared with the usual label information, the form of the point pair constraint is more generalized. Take the unconnected constraint as an example, assuming that the known data pointe and the data point f have an unconnected constraint link. Then it can only be deduced that the data point e and the data point f do not belong to the same category. But for other data points, the link relationship cannot be deduced, that is, the point pair constraints do not have the characteristics of deduction conduction. Therefore, the relation transfer problem of point pair constraints is more challenging than traditional label information. It is embodied in the following aspects:(1)
Unlike the category label information, the point pair constraint cannot improve the significant data category information in general, it is more generalized in the prior information and belongs to the weaker supervision information.(2)
In general, the category information of data points cannot be directly deduced from the point-to-point constraint relationship between the data, which mainly explains whether a pair of data points are connected.(3)
For a data set containingm data points, the point-to-constraint relationship transfer needs to derive Om2 point-to-constraint relationships. Conversely, only Om is required for the transitive derivation of label information.


### 3.1.2. Constrained Clustering

In the field of image recognition [11–13], it is more common to recognize handwritten digits. In the process of clustering, each character is often regarded as a cluster or a category partition [14]. By clustering characters, the character styles of different people can be distinguished and the accuracy of clustering can be improved. Cluster analysis also has many applications in information retrieval and text analysis. Due to the current development of big data, the topics people are concerned about are increasing day by day, which in turn leads to an increase in the amount of information retrieval. When retrieving information, a large amount of relevant content is often returned. Therefore, these contents are clustered to make the information more hierarchical. In the biological information network, the most common problems are biological proteins and gene expression, as shown in Figure 1.Figure 1
Dynamic data example. (a) TimeS1, (b) Time S2, (c) Time S3, and (d) Time S4.
(a)(b)(c)(d)Clustering analysis is usually used to obtain prior information between proteins and to understand the intrinsic correlation between data [15]. In the research field of community discovery, the typical one is social network. Cluster analysis often divides the network into multiple sets by decomposing and dividing the network. And it is required that the nodes in the divided set should be densely connected. The sets should be sparser, so that the network has the characteristics of high cohesion and low coupling. Therefore, the inherent correlation of data can often be mined through cluster analysis, and the utilization of data can be further improved.In the image clustering problem of web design, some prior information is often considered to find better clustering results [16]. The prior information used in the clustering process can generally be divided into label information and constraint information. The constraint information here can be divided into soft constraints and hard constraints. Hard constraints are generally divided into must-link constraints and nonconnected constraints, namely must-link and cannot-link. Among them, the must-connect constraint means that two data points belong to the same cluster in the clustering process, and the nonconnection constraint means that two data points cannot be in the same cluster. Soft constraints are not as strong as hard constraints. It generally obtains information from the label information of the data or other prior information and adjusts the clustering results of the data through soft constraints. In the process of clustering, the use of prior information can often improve the clustering results [17, 18].


## 3.1.1. Point Pair Constraints

In the process of semisupervised clustering, some known prior information is often used to guide the execution of the clustering process [10]. The prior information often used in semisupervised clustering generally includes label information and point pair constraints.In point pair constraints, it mainly provides prior information about whether two data points are connected or not. If two data points are connected, it means that the two data points must belong to the same category, such that a point pair constraint is usually called a must-connect constraint. If there is no edge connection between two data points, it means that the two data points must not belong to the same category. Such prior information is usually called a disjoint constraint. That is, given a static data setP=p1,p2,…,pn and a point pair constraint ω=ω=∪ω≠, ω= is a must-connect constraint, indicating that data points pj and pk belong to the same category of clusters. And ω≠ is a disjoint constraint, indicating that data points pj and pk do not belong to the same class of clusters.The point pair constraint between data is different from the instance-level label information, which does not directly provide significant category information. Compared with the usual label information, the form of the point pair constraint is more generalized. Take the unconnected constraint as an example, assuming that the known data pointe and the data point f have an unconnected constraint link. Then it can only be deduced that the data point e and the data point f do not belong to the same category. But for other data points, the link relationship cannot be deduced, that is, the point pair constraints do not have the characteristics of deduction conduction. Therefore, the relation transfer problem of point pair constraints is more challenging than traditional label information. It is embodied in the following aspects:(1)
Unlike the category label information, the point pair constraint cannot improve the significant data category information in general, it is more generalized in the prior information and belongs to the weaker supervision information.(2)
In general, the category information of data points cannot be directly deduced from the point-to-point constraint relationship between the data, which mainly explains whether a pair of data points are connected.(3)
For a data set containingm data points, the point-to-constraint relationship transfer needs to derive Om2 point-to-constraint relationships. Conversely, only Om is required for the transitive derivation of label information.


## 3.1.2. Constrained Clustering

In the field of image recognition [11–13], it is more common to recognize handwritten digits. In the process of clustering, each character is often regarded as a cluster or a category partition [14]. By clustering characters, the character styles of different people can be distinguished and the accuracy of clustering can be improved. Cluster analysis also has many applications in information retrieval and text analysis. Due to the current development of big data, the topics people are concerned about are increasing day by day, which in turn leads to an increase in the amount of information retrieval. When retrieving information, a large amount of relevant content is often returned. Therefore, these contents are clustered to make the information more hierarchical. In the biological information network, the most common problems are biological proteins and gene expression, as shown in Figure 1.Figure 1
Dynamic data example. (a) TimeS1, (b) Time S2, (c) Time S3, and (d) Time S4.
(a)(b)(c)(d)Clustering analysis is usually used to obtain prior information between proteins and to understand the intrinsic correlation between data [15]. In the research field of community discovery, the typical one is social network. Cluster analysis often divides the network into multiple sets by decomposing and dividing the network. And it is required that the nodes in the divided set should be densely connected. The sets should be sparser, so that the network has the characteristics of high cohesion and low coupling. Therefore, the inherent correlation of data can often be mined through cluster analysis, and the utilization of data can be further improved.In the image clustering problem of web design, some prior information is often considered to find better clustering results [16]. The prior information used in the clustering process can generally be divided into label information and constraint information. The constraint information here can be divided into soft constraints and hard constraints. Hard constraints are generally divided into must-link constraints and nonconnected constraints, namely must-link and cannot-link. Among them, the must-connect constraint means that two data points belong to the same cluster in the clustering process, and the nonconnection constraint means that two data points cannot be in the same cluster. Soft constraints are not as strong as hard constraints. It generally obtains information from the label information of the data or other prior information and adjusts the clustering results of the data through soft constraints. In the process of clustering, the use of prior information can often improve the clustering results [17, 18].


## 3.2. Image Feature Matching Method

There are many kinds of image matching algorithms. With the continuous development and improvement of image matching technology, the general process of matching images is roughly formed, as shown in Figure2.Figure 2
Image matching process.


### 3.2.1. SURF Feature Description Operator

The SURF feature description operator is an improvement of the SIFT feature description operator. SURF matching is similar to SIFT matching, and it is also an accelerated version of it. The SIFT matching method is relatively stable, and the feature extraction detects many feature points, but it has high computational complexity. SURF has low computational complexity and is several times faster than the SIFT feature description operator, so it has the advantages of high efficiency and short computing time. At the same time, matching multiple images, the SURF feature description operator shows better robustness. However, in the stage of finding the main direction, it relies too much on the gradient direction of the pixels in the local area, which may make the main found direction inaccurate [19]. The reason why the SURF feature descriptor has high computational efficiency is that it uses Harr features and integral images. The specific process is as follows:Assuming the imageMa,b to be matched, the integral image Mja,b is expressed as the area of the rectangle with the pixel point (a, b) and the origin as the diagonal. This simple operation J=E−F−G+H enables the box filter convolution computation to greatly speed up the computation. The integral image is shown in Figure 3.Figure 3
Integral image.The Hessian matrixGA,Φ of the image at scale Φ is(1)GA,Φ=UaaA,ΦUabA,ΦUabA,ΦUbbA,ΦDetG=UaaUbb−UabUab.Among them,UaaA,Φ represents the convolution of the Gaussian second-order partial derivative λ2/λa2tΦ and the image Ma,b at the pixel point A, and Det{G) represents the determinant of the matrix. Only when the determinant is positive, this pixel point may be a local extreme point (feature point) [20]. In order to improve the computational efficiency, the complex Gaussian second-order partial derivatives are approximated, as shown in Figure 4. Wbb is an approximation of Ubb and Wab is an approximation of Uab.Figure 4
Approximation of Gaussian second-order partial derivatives: (a)Ubb, (b) Uab, (c) Wbb, and (d) Wab.
(a)(b)(c)(d)Gaussian second-order partial derivative filter of scaleΦ=0.9, the template size is 7  ×  7, and Waa, Wab, and Wbb are used to replace the convolution value of the box filter template and the image, respectively. The G matrix determinant is(2)DetGapprax=WaaWbb−vWab2.Using the similarity between the Gaussian kernel and its approximation, the weight factorv can be calculated as(3)v=Uab0.9fWaa7fUaa0.9fWab7f=0.724≈0.7,Af is the Frobenius norm. In order to simplify the calculation, in practical applications, v is specified as a constant. In order to make the Frobenius norm suitable for any scale, the template is normalized to obtain the box filter response value. Given an integral image and a simplified template, the box filter response is as follows:(4)Waa=∑n=13rnx4n−x2n−x3n+x1ndaaWbb=∑n=13rnx4n−x2n−x3n+x1ndbbWab=∑n=13rnx4n−x2n−x3n+x1ndab.Among them,daa, dbbdaa=dbb, dab represent the template area of Waa, Wbb, Wab, rn∈1,−1,2 is the internal value of the template, and the integral image value of the opposite vertex of the template is expressed as x1n,x2n,x3n,x4n. As a result, the computational efficiency is greatly improved.


### 3.2.2. ORB Feature Description Operator

First perform FAST corner detection:(5)CBF=1,EO−Ek>ϕ,0,others,.Among them, the center of the circle is O, the gray value isEO, s represents the neighborhood of the circle, and there are n pixels (k = 1, 2, ..., n) on the circumference. Ek is the gray value of each point, and ϕ is a very small threshold. If the number of points with CBF = 1 is greater than the set threshold of Uϕ, the point is the candidate FAST corner point, as shown in Figure 5. The resulting FAST corners are not scale-invariant and contain edge responses. Based on this defect, some methods can be improved. The specific methods are as follows: (1)
Obtain the feature points to be selected greater than N by lowering the threshold, and then use Harris to sort and obtain N feature points to be selected.(2)
Obtain FAST features at each layer of the image scale pyramid.Figure 5
Circumferential field.Using the gray-scale centroid method by calculating moments to add direction information, the following can be got:(6)Gjk=∑abajbkEa,bD=Da,Db=G10G00,G01G00θ=arctanDbDa=arctanG01G10.


## 3.2.1. SURF Feature Description Operator

The SURF feature description operator is an improvement of the SIFT feature description operator. SURF matching is similar to SIFT matching, and it is also an accelerated version of it. The SIFT matching method is relatively stable, and the feature extraction detects many feature points, but it has high computational complexity. SURF has low computational complexity and is several times faster than the SIFT feature description operator, so it has the advantages of high efficiency and short computing time. At the same time, matching multiple images, the SURF feature description operator shows better robustness. However, in the stage of finding the main direction, it relies too much on the gradient direction of the pixels in the local area, which may make the main found direction inaccurate [19]. The reason why the SURF feature descriptor has high computational efficiency is that it uses Harr features and integral images. The specific process is as follows:Assuming the imageMa,b to be matched, the integral image Mja,b is expressed as the area of the rectangle with the pixel point (a, b) and the origin as the diagonal. This simple operation J=E−F−G+H enables the box filter convolution computation to greatly speed up the computation. The integral image is shown in Figure 3.Figure 3
Integral image.The Hessian matrixGA,Φ of the image at scale Φ is(1)GA,Φ=UaaA,ΦUabA,ΦUabA,ΦUbbA,ΦDetG=UaaUbb−UabUab.Among them,UaaA,Φ represents the convolution of the Gaussian second-order partial derivative λ2/λa2tΦ and the image Ma,b at the pixel point A, and Det{G) represents the determinant of the matrix. Only when the determinant is positive, this pixel point may be a local extreme point (feature point) [20]. In order to improve the computational efficiency, the complex Gaussian second-order partial derivatives are approximated, as shown in Figure 4. Wbb is an approximation of Ubb and Wab is an approximation of Uab.Figure 4
Approximation of Gaussian second-order partial derivatives: (a)Ubb, (b) Uab, (c) Wbb, and (d) Wab.
(a)(b)(c)(d)Gaussian second-order partial derivative filter of scaleΦ=0.9, the template size is 7  ×  7, and Waa, Wab, and Wbb are used to replace the convolution value of the box filter template and the image, respectively. The G matrix determinant is(2)DetGapprax=WaaWbb−vWab2.Using the similarity between the Gaussian kernel and its approximation, the weight factorv can be calculated as(3)v=Uab0.9fWaa7fUaa0.9fWab7f=0.724≈0.7,Af is the Frobenius norm. In order to simplify the calculation, in practical applications, v is specified as a constant. In order to make the Frobenius norm suitable for any scale, the template is normalized to obtain the box filter response value. Given an integral image and a simplified template, the box filter response is as follows:(4)Waa=∑n=13rnx4n−x2n−x3n+x1ndaaWbb=∑n=13rnx4n−x2n−x3n+x1ndbbWab=∑n=13rnx4n−x2n−x3n+x1ndab.Among them,daa, dbbdaa=dbb, dab represent the template area of Waa, Wbb, Wab, rn∈1,−1,2 is the internal value of the template, and the integral image value of the opposite vertex of the template is expressed as x1n,x2n,x3n,x4n. As a result, the computational efficiency is greatly improved.


## 3.2.2. ORB Feature Description Operator

First perform FAST corner detection:(5)CBF=1,EO−Ek>ϕ,0,others,.Among them, the center of the circle is O, the gray value isEO, s represents the neighborhood of the circle, and there are n pixels (k = 1, 2, ..., n) on the circumference. Ek is the gray value of each point, and ϕ is a very small threshold. If the number of points with CBF = 1 is greater than the set threshold of Uϕ, the point is the candidate FAST corner point, as shown in Figure 5. The resulting FAST corners are not scale-invariant and contain edge responses. Based on this defect, some methods can be improved. The specific methods are as follows: (1)
Obtain the feature points to be selected greater than N by lowering the threshold, and then use Harris to sort and obtain N feature points to be selected.(2)
Obtain FAST features at each layer of the image scale pyramid.Figure 5
Circumferential field.Using the gray-scale centroid method by calculating moments to add direction information, the following can be got:(6)Gjk=∑abajbkEa,bD=Da,Db=G10G00,G01G00θ=arctanDbDa=arctanG01G10.


## 3.3. SIFT Feature Description Operator

### 3.3.1. Key Point Detection in Scale Space

Performing a Gaussian kernel-based computation on an image can define a two-dimensional image as(7)Da,b,Φ=Sa,b,Φ∗Ua,b.Among them,Sa,b,Φ is a Gaussian function whose scale can be changed:(8)Sa,b,Φ=12πΦ2t−a2+b2/2Φ2,Φ is the scale factor of the space, and the value of Φ determines the smoothness and scale of the image. When the value of Φ is larger, the smoothness is higher, and the outline can be seen more clearly, but the clarity is reduced. The lower the smoothness, the sharper the image and the more detailed information.


### 3.3.2. Build a Differential Pyramid

The Gaussian difference formula can be represented byPa,b,Φ:(9)Pa,b,Φ=Sa,b,wΦ−Sa,b,Φ∗Ua,b=Da,b,wΦ−Da,b,Φ.The DOG image is obtained by the difference value.


### 3.3.3. The Location of the Feature Points Is Determined

Using series expansion of the scale space, the following can be got:(10)PA=P+αPEαAA+12AEα2PαA2A.Take the derivative and find the extreme point for 0:(11)A∧=−α2P−1αPαA2αA.By substituting formula (11) into formula (10), the following can be got:(12)PA∧=P+1αPE2αA,PA∧ is beneficial to the elimination of unstable candidate points with low DOG response values. Usually, the extreme points with a value of PA∧ below 0.03 are regarded as low-response points and eliminated.


### 3.3.4. Eliminate Edge Candidate Feature Points

The matrix of the key pointG can be obtained by calculating the pixel difference around the key point:(13)G=PaaPabPabPbb.Letμmin be the smallest eigenvalue of the Hessian matrix G, μmax the largest eigenvalue, and θ the ratio of μmin to μmax; then the following can be got:(14)TrG=Paa+Pab=μmax+μminDetG=PaaPab−Pab2=μmaxμminTrGDetG=μmax+μmin2μmaxμmin=θμmin+μmin2θμmin2=θ+12θ.From the results, it can be concluded that its value is only related to the ratioμmin of μmax to μmin.So far, the algorithm model of the automatic matching recommendation system for web page image packaging design has been established. Next, this paper will design the modules of the system in detail and conduct experiments and analysis on the performance of the system.


## 3.3.1. Key Point Detection in Scale Space

Performing a Gaussian kernel-based computation on an image can define a two-dimensional image as(7)Da,b,Φ=Sa,b,Φ∗Ua,b.Among them,Sa,b,Φ is a Gaussian function whose scale can be changed:(8)Sa,b,Φ=12πΦ2t−a2+b2/2Φ2,Φ is the scale factor of the space, and the value of Φ determines the smoothness and scale of the image. When the value of Φ is larger, the smoothness is higher, and the outline can be seen more clearly, but the clarity is reduced. The lower the smoothness, the sharper the image and the more detailed information.


## 3.3.2. Build a Differential Pyramid

The Gaussian difference formula can be represented byPa,b,Φ:(9)Pa,b,Φ=Sa,b,wΦ−Sa,b,Φ∗Ua,b=Da,b,wΦ−Da,b,Φ.The DOG image is obtained by the difference value.


## 3.3.3. The Location of the Feature Points Is Determined

Using series expansion of the scale space, the following can be got:(10)PA=P+αPEαAA+12AEα2PαA2A.Take the derivative and find the extreme point for 0:(11)A∧=−α2P−1αPαA2αA.By substituting formula (11) into formula (10), the following can be got:(12)PA∧=P+1αPE2αA,PA∧ is beneficial to the elimination of unstable candidate points with low DOG response values. Usually, the extreme points with a value of PA∧ below 0.03 are regarded as low-response points and eliminated.


## 3.3.4. Eliminate Edge Candidate Feature Points

The matrix of the key pointG can be obtained by calculating the pixel difference around the key point:(13)G=PaaPabPabPbb.Letμmin be the smallest eigenvalue of the Hessian matrix G, μmax the largest eigenvalue, and θ the ratio of μmin to μmax; then the following can be got:(14)TrG=Paa+Pab=μmax+μminDetG=PaaPab−Pab2=μmaxμminTrGDetG=μmax+μmin2μmaxμmin=θμmin+μmin2θμmin2=θ+12θ.From the results, it can be concluded that its value is only related to the ratioμmin of μmax to μmin.So far, the algorithm model of the automatic matching recommendation system for web page image packaging design has been established. Next, this paper will design the modules of the system in detail and conduct experiments and analysis on the performance of the system.


## 3.4. Design of Automatic Matching Recommendation System for Web Page Image Packaging Design

The physical structure of the web page image packaging design of automatic matching recommendation system is shown in Figure6.Figure 6
Schematic figure of the physical structure of the system.


### 3.4.1. Image Data Acquisition

Image acquisition is the basis of model training and the premise of completing system functions. The quality of the selected images determines the success of the entire experiment. Selecting good experimental images plays a crucial role in improving the accuracy of feature matching [21, 22].The images stored in the “Web Management System” need to be filtered. First, for the 30,000 images stored in the “Web Page Management System” database, only 5,360 images are selected that conform to the theme of web page design. Secondly, from these 5360 images, clear, easy-to-recognize, high-resolution, and low-impact images are selected, and the remaining blurred images are eliminated. Finally, the obtained 5000 images are used as the image data of this system.


### 3.4.2. Model Training

The purpose of model training is to obtain the best similarity threshold, and the selection of the threshold directly determines the result of feature matching [23]. In designing the image matching model, according to the specific workflow, it is mainly divided into 8 parts:(1)
In order to make the images have scale invariance, firstly, build an image pyramid for the 5000 images that conform to the theme of the web page required by this system.(2)
Perform FAST corner extraction at each level of the pyramid, calculate the adaptive threshold of each image, and extract feature points according to the threshold. The feature points extracted at this time are the rough extraction results and have no direction.(3)
In the extraction process, in order to avoid the phenomenon that the accuracy of subsequent feature matching is affected by the aggregation of feature points, a quad-tree structure is introduced to screen the feature points. The feature points extracted at this time are the fine extraction results, but there is still no direction(4)
Based on the constrained clustering algorithm, the gray centroid method is introduced to calculate the direction angleα between the feature points and the centroid, so that all the feature points have directions, thereby achieving rotation invariance.(5)
In order to prevent the descriptor from being too sensitive to high-frequency noise, the image is smoothed first, and then the binary descriptor is obtained through SURF description and ORB feature description. The current descriptor has no direction.(6)
Combine the descriptor with the directionα of the feature point, then obtain the binary descriptor with the direction, and finally store it in the image feature information base.(7)
After the feature point extraction and description of all images in the system is completed, the feature descriptors are matched by the Brute Force method, and the similarity results between different images are obtained based on the Hamming distance.(8)
The similarity result obtained above is substituted into the logistic regression model, and the optimal similarity threshold is calculated.Through the above steps, the image matching model of the system is obtained by training, and then the “image matching system” is successfully implemented based on the image matching model. The image matching system can not only determine whether there are highly similar images between the stored images in the system, but also determine whether the images newly uploaded by the web designer and the images in the system have highly similar images.


### 3.4.3. Establish an Image Feature Information Database

Through the above model training, an image matching model can be obtained, and then the image information obtained in the model needs to be stored.The original image data comes from the “web page management system”. After the model training, the obtained image information is many binary feature descriptors, so this paper creates an image feature information library on the basis of the image matching system. In the image feature information database, it is no longer necessary to store all the information of the image itself, but to store the extracted binary feature description features in all images that have been feature extracted and described. At this time, the feature descriptor occupies a small system space and is convenient to store, which greatly saves the system overhead.The biggest advantage of the image feature information database is to improve the work efficiency of the system. For subsequent newly uploaded images, there is no need to perform feature extraction, feature description, and other operations on the stored images during review. Just do the relevant operations on the newly uploaded image. Then, the similarity can be obtained by directly matching the binary feature descriptor of the new image with the binary feature descriptor stored in the image feature information database. The system user use case figure is shown in Figure7. At this time, the work efficiency of the system is greatly improved, and the waste of human and financial resources is reduced. The final implementation of the system needs to include the following four functions:(1)
Graphical feature vector data management and maintenance is provided.(2)
Graphic feature vector data extraction function is provided.(3)
Graphical feature vector data search and matching function is provided.(4)
A graphic feature operation parameter management adjustment function is provided.Figure 7
System user use case figure.


### 3.4.4. Parameter Setting of Extraction Algorithm Module

The parameter management (FVPM) module is also responsible for setting the parameters of the extraction algorithm (FVEA) module, including the following: (1) sampling interval pixels (2) Gaussian smoothing; (3) key point threshold |D(x)|; (4) key point curvature threshold; (5) whether the image is doubled when building the Gaussian gold tower, the values being 0 and 1; (6) the width of the histogram descriptive array; (7) the number of blocks in each histogram in the descriptive array; (8) Gaussian blur of the input image; (9) boundary width of ignored key points; (10) the maximum number of steps before key point interpolation fails; (11) the number of directional allocation blocks in the histogram; (12) determination of the Gaussianσ of the orientation assignment; (13) determination of the area radius used in the orientation assignment; (14) the number of times the orientation histogram being smoothed; (15) the maximum orientation amplitude in the result of the new feature; (16) a description of the size of the orientation histogram.


### 3.4.5. Parameter Setting of Data Management Module

The parameter management (FVPM) module is also responsible for setting the parameters of the data management (FVDM) module, including (1) the size threshold of the elements of the descriptive container; (2) the scaling factor of the floating point descriptor to unsigned char; (3) the priority queue element allocation space initialization size; and (4) the maximum number of searches.


### 3.4.6. Parameter Setting of Matching Algorithm Module

The parameter management (FVPM) module is also responsible for setting the parameters of the matching algorithm (FVMA) module, including the following.(1)
The distance threshold for the successful matching of feature points: the distance is the Euclidean distance between the feature points to be matched and the feature points in the feature library.(2)
The threshold for the ratio of successful matching of figures: the ratio is the ratio of the number of successfully matched feature points to the number of feature points of the figure to be matched.


## 3.4.1. Image Data Acquisition

Image acquisition is the basis of model training and the premise of completing system functions. The quality of the selected images determines the success of the entire experiment. Selecting good experimental images plays a crucial role in improving the accuracy of feature matching [21, 22].The images stored in the “Web Management System” need to be filtered. First, for the 30,000 images stored in the “Web Page Management System” database, only 5,360 images are selected that conform to the theme of web page design. Secondly, from these 5360 images, clear, easy-to-recognize, high-resolution, and low-impact images are selected, and the remaining blurred images are eliminated. Finally, the obtained 5000 images are used as the image data of this system.


## 3.4.2. Model Training

The purpose of model training is to obtain the best similarity threshold, and the selection of the threshold directly determines the result of feature matching [23]. In designing the image matching model, according to the specific workflow, it is mainly divided into 8 parts:(1)
In order to make the images have scale invariance, firstly, build an image pyramid for the 5000 images that conform to the theme of the web page required by this system.(2)
Perform FAST corner extraction at each level of the pyramid, calculate the adaptive threshold of each image, and extract feature points according to the threshold. The feature points extracted at this time are the rough extraction results and have no direction.(3)
In the extraction process, in order to avoid the phenomenon that the accuracy of subsequent feature matching is affected by the aggregation of feature points, a quad-tree structure is introduced to screen the feature points. The feature points extracted at this time are the fine extraction results, but there is still no direction(4)
Based on the constrained clustering algorithm, the gray centroid method is introduced to calculate the direction angleα between the feature points and the centroid, so that all the feature points have directions, thereby achieving rotation invariance.(5)
In order to prevent the descriptor from being too sensitive to high-frequency noise, the image is smoothed first, and then the binary descriptor is obtained through SURF description and ORB feature description. The current descriptor has no direction.(6)
Combine the descriptor with the directionα of the feature point, then obtain the binary descriptor with the direction, and finally store it in the image feature information base.(7)
After the feature point extraction and description of all images in the system is completed, the feature descriptors are matched by the Brute Force method, and the similarity results between different images are obtained based on the Hamming distance.(8)
The similarity result obtained above is substituted into the logistic regression model, and the optimal similarity threshold is calculated.Through the above steps, the image matching model of the system is obtained by training, and then the “image matching system” is successfully implemented based on the image matching model. The image matching system can not only determine whether there are highly similar images between the stored images in the system, but also determine whether the images newly uploaded by the web designer and the images in the system have highly similar images.


## 3.4.3. Establish an Image Feature Information Database

Through the above model training, an image matching model can be obtained, and then the image information obtained in the model needs to be stored.The original image data comes from the “web page management system”. After the model training, the obtained image information is many binary feature descriptors, so this paper creates an image feature information library on the basis of the image matching system. In the image feature information database, it is no longer necessary to store all the information of the image itself, but to store the extracted binary feature description features in all images that have been feature extracted and described. At this time, the feature descriptor occupies a small system space and is convenient to store, which greatly saves the system overhead.The biggest advantage of the image feature information database is to improve the work efficiency of the system. For subsequent newly uploaded images, there is no need to perform feature extraction, feature description, and other operations on the stored images during review. Just do the relevant operations on the newly uploaded image. Then, the similarity can be obtained by directly matching the binary feature descriptor of the new image with the binary feature descriptor stored in the image feature information database. The system user use case figure is shown in Figure7. At this time, the work efficiency of the system is greatly improved, and the waste of human and financial resources is reduced. The final implementation of the system needs to include the following four functions:(1)
Graphical feature vector data management and maintenance is provided.(2)
Graphic feature vector data extraction function is provided.(3)
Graphical feature vector data search and matching function is provided.(4)
A graphic feature operation parameter management adjustment function is provided.Figure 7
System user use case figure.


## 3.4.4. Parameter Setting of Extraction Algorithm Module

The parameter management (FVPM) module is also responsible for setting the parameters of the extraction algorithm (FVEA) module, including the following: (1) sampling interval pixels (2) Gaussian smoothing; (3) key point threshold |D(x)|; (4) key point curvature threshold; (5) whether the image is doubled when building the Gaussian gold tower, the values being 0 and 1; (6) the width of the histogram descriptive array; (7) the number of blocks in each histogram in the descriptive array; (8) Gaussian blur of the input image; (9) boundary width of ignored key points; (10) the maximum number of steps before key point interpolation fails; (11) the number of directional allocation blocks in the histogram; (12) determination of the Gaussianσ of the orientation assignment; (13) determination of the area radius used in the orientation assignment; (14) the number of times the orientation histogram being smoothed; (15) the maximum orientation amplitude in the result of the new feature; (16) a description of the size of the orientation histogram.


## 3.4.5. Parameter Setting of Data Management Module

The parameter management (FVPM) module is also responsible for setting the parameters of the data management (FVDM) module, including (1) the size threshold of the elements of the descriptive container; (2) the scaling factor of the floating point descriptor to unsigned char; (3) the priority queue element allocation space initialization size; and (4) the maximum number of searches.


## 3.4.6. Parameter Setting of Matching Algorithm Module

The parameter management (FVPM) module is also responsible for setting the parameters of the matching algorithm (FVMA) module, including the following.(1)
The distance threshold for the successful matching of feature points: the distance is the Euclidean distance between the feature points to be matched and the feature points in the feature library.(2)
The threshold for the ratio of successful matching of figures: the ratio is the ratio of the number of successfully matched feature points to the number of feature points of the figure to be matched.


## 4. Experiment and Deconstruction of Automatic Matching Recommendation System for Web Image Packaging Design

### 4.1. Comparison of Matching Accuracy of Algorithms

Set three parameters, respectively, 100, 500, and 1000, compare the image matching accuracy of the constrained clustering algorithm (K-Means) and other algorithms under the three parameters, and obtain the data in Table1:Table 1
Matching accuracy comparison.
Data setParameters 100Parameters 500Parameters 1000K-meansOther algorithmsK-meansOther algorithmsK-meansOther algorithmsMultiple target0.8370.8020.9070.7560.9130.794Single target0.9960.8910.890.8030.9740.835Small target10.9030.9660.9250.9700.903Rich prospects0.9370.7590.980.8110.9530.847Rich background10.6380.8240.460.8440.426Figure8 can intuitively compare the matching accuracy. When the parameter is selected as 100, the matching accuracy is more different than the other two groups of parameters. When the parameter is 500 and 1000, the accuracy improvement tends to be stable. When the background texture is rich, the improvement of the parameters will greatly improve the self-collection accuracy. The target matching accuracy changes relatively stable when the data set detection parameters change. The overall average calculation of the accuracy improvement is performed, and the calculation accuracy is increased by 0.317. In general, the constrained clustering algorithm has good universality, and it is feasible to construct an automatic matching recommendation system for web page image packaging design.Figure 8
Schematic figure of the image matching accuracy comparison of the algorithm under different parameters. (a) Comparison of experimental results when the detection parameter is 100. (b) Comparison of experimental results when the detection parameter is 500. (c) Comparison of experimental results when the detection parameter is 1000.
(a)(b)(c)


### 4.2. Discussion on Parameters of Matching Recommendation System

This section discusses the impact of the network structure partition attribution threshold ofϕ on the NMI of the constrained clustering algorithm. Figure 9 mainly shows the variation trend of the NMI value of each algorithm at different times in the LFR data set under the condition of parameter ϕ=0.4 and the average NMI value of different algorithms in the dynamic network data set LFR under different parameter ranges.Figure 9
Changes in NMI metrics under different algorithms in the LFR data set. (a) The trend of NMI changes at different times. (b) The influence of threshold changes on the average NMI index.
(a)(b)It can be seen from Figure9(a) that other algorithms cannot better adapt to the dynamic changes of the figure during the clustering process, so the clustering effect is poor. The constrained clustering algorithm K-Means proposed in this paper has a higher NMI value and better clustering performance than other algorithms at ϕ=0.4. As can be seen from Figure 9(b), as the value of ϕ increases, the average NMI of the algorithm decreases to varying degrees. When it is ϕ=0.4, K-Means has better clustering effect than other algorithms, so setting ϕ=0.4 in the experiment can get better clustering results.Figure10 shows the variation trend of the NMI value of each algorithm at different times in the Enron data set and the average NMI value of different algorithms in the dynamic network data set Newman under different parameter ranges.Figure 10
Changes in NMI metrics under different algorithms in the Enron data set. (a) The trend of NMI changes at different times. (b) The influence of threshold changes on the average NMI index.
(a)(b)As can be seen from Figure10(a), as time goes by, the comparison algorithms CDBIA, IC, etc. have different degrees of jitter. It shows that this kind of algorithm cannot effectively adapt to the increase of nodes and edges in the process of figure change, while K-Means is relatively smoother. Therefore, the algorithm K-Means proposed in this paper is superior to other algorithms in terms of clustering performance. It can be seen from Figure 10(b) that when the value is ϕ=0.4, the clustering effect obtained by the K-Means algorithm is more ideal than other algorithms.


### 4.3. Image Matching Experiment of Three Feature Description Operators

#### 4.3.1. Matching Speed Experiment

The feature point matching problem of multisource images is also known as the cross-domain image matching problem, where images are formed and processed in different imaging domains [24]. This section tests the SIFT-based matching algorithm, the SURF-based matching algorithm, and the ORB-based matching algorithm. A very advanced matching method based on the intersection of mutual information and the proposed framework scheme based on multisource data sets - two-dimensional structured constrained feature matching method. The algorithm matching speed for different image sets is shown in Table 2.Table 2
Comparison of experimental results for matching speed.
Correct match rateBooksBowlsCaveHazeTeapotSIFT14.356316.216711.517111.040912.9744SURF1.60421.81891.30501.28141.4545ORB0.38240.39620.44060.43700.2671It can be seen from Table2 that for the matching of different source images, the feature description algorithm of ORB has obvious advantages in the running time of the algorithm.The constrained clustering algorithm verified in this section can effectively deal with the clustering problem of dynamic data and dynamic constraints and will not appear large jitter over time.


#### 4.3.2. Noise Sensitivity Experiment

The noise sensitivity of the SIFT feature description operator, the SURF feature description operator, and the ORB feature description operator of the K-Means algorithm is tested, and the data in Table3 is obtained.Table 3
Comparison of experimental results for correct matching rate.
Correct match rateBooksBowlsCaveHazeTeapotSIFT91.389.981.992.093.8SURF72.668.563.375.470.1ORB89.289.674.581.191.0It can be seen from Table3 that SURF is more sensitive to noise and has a higher number of false matches. Compared with other algorithms, the algorithm based on SIFT matching results in this paper has similar sensitivity to noise, but has a higher matching rate. The matching results based on SURF in this paper are slightly worse than the original SURF results, but the matching accuracy is significantly higher than SURF and significantly better than other algorithms. The results of the algorithm based on ORB matching results in this paper are better than the original ORB matching results, the matching accuracy is significantly higher than that of ORB, and it is also significantly better than other algorithms.Then, Gaussian noise is added to the same pair of images, the mean value remains unchanged, the variance is gradually increased, and the sensitivity of each algorithm to noise is compared. The comparison of all algorithms is shown in Figure11.Figure 11
Comparison of algorithm matching results after adding Gaussian noise.It can be known from the line Figure11 that with the increase of noise, the blurring degree of the multisource image increases, and the ORB and SIFT algorithms are obviously more robust to noise than other algorithms.


#### 4.3.3. Rotation Experiment of Matching Algorithm

In order to quantitatively evaluate the rotational performance of the algorithm, the following experiments are carried out in this paper. (1) Rotate an image by 90°, then use each algorithm to match it, and record its matching accuracy and running time in Table4. (2) Select an image to be matched, gradually increase the rotation angle, and test the rotation invariance of each algorithm.Table 4
Comparison of experimental results after rotating 90°.
Match rate and time/sBooksBowlsTeapotSIFT95.615.372195.416.311796.611.9885SURE76.11.468286.851.656486.01.2012ORB89.70.304689.80.364494.10.1905It can be seen from Table4 that the computational efficiency and the matching correct rate are the advantages of the constrained clustering algorithm, which effectively removes outliers—wrong matching—and greatly improves the matching rate.It can be seen from the line in Figure12 that with the increase of the rotation angle, the number of successful matches does not change much. Therefore, it has rotation invariance, and the experimental results also prove the effectiveness of the image matching recommendation system.Figure 12
Comparison of algorithm matching results.The constrained clustering algorithm effectively reduces the computational complexity and improves the computational efficiency. Experiments were conducted on the multisource image standard library, and the better matching results verify the effectiveness of the automatic matching recommendation system for web page image packaging design based on the clustering algorithm. The experimental results of image matching also prove that the matching framework in this paper can obtain the ideal matching degree with the optimal calculation amount.


## 4.1. Comparison of Matching Accuracy of Algorithms

Set three parameters, respectively, 100, 500, and 1000, compare the image matching accuracy of the constrained clustering algorithm (K-Means) and other algorithms under the three parameters, and obtain the data in Table1:Table 1
Matching accuracy comparison.
Data setParameters 100Parameters 500Parameters 1000K-meansOther algorithmsK-meansOther algorithmsK-meansOther algorithmsMultiple target0.8370.8020.9070.7560.9130.794Single target0.9960.8910.890.8030.9740.835Small target10.9030.9660.9250.9700.903Rich prospects0.9370.7590.980.8110.9530.847Rich background10.6380.8240.460.8440.426Figure8 can intuitively compare the matching accuracy. When the parameter is selected as 100, the matching accuracy is more different than the other two groups of parameters. When the parameter is 500 and 1000, the accuracy improvement tends to be stable. When the background texture is rich, the improvement of the parameters will greatly improve the self-collection accuracy. The target matching accuracy changes relatively stable when the data set detection parameters change. The overall average calculation of the accuracy improvement is performed, and the calculation accuracy is increased by 0.317. In general, the constrained clustering algorithm has good universality, and it is feasible to construct an automatic matching recommendation system for web page image packaging design.Figure 8
Schematic figure of the image matching accuracy comparison of the algorithm under different parameters. (a) Comparison of experimental results when the detection parameter is 100. (b) Comparison of experimental results when the detection parameter is 500. (c) Comparison of experimental results when the detection parameter is 1000.
(a)(b)(c)


## 4.2. Discussion on Parameters of Matching Recommendation System

This section discusses the impact of the network structure partition attribution threshold ofϕ on the NMI of the constrained clustering algorithm. Figure 9 mainly shows the variation trend of the NMI value of each algorithm at different times in the LFR data set under the condition of parameter ϕ=0.4 and the average NMI value of different algorithms in the dynamic network data set LFR under different parameter ranges.Figure 9
Changes in NMI metrics under different algorithms in the LFR data set. (a) The trend of NMI changes at different times. (b) The influence of threshold changes on the average NMI index.
(a)(b)It can be seen from Figure9(a) that other algorithms cannot better adapt to the dynamic changes of the figure during the clustering process, so the clustering effect is poor. The constrained clustering algorithm K-Means proposed in this paper has a higher NMI value and better clustering performance than other algorithms at ϕ=0.4. As can be seen from Figure 9(b), as the value of ϕ increases, the average NMI of the algorithm decreases to varying degrees. When it is ϕ=0.4, K-Means has better clustering effect than other algorithms, so setting ϕ=0.4 in the experiment can get better clustering results.Figure10 shows the variation trend of the NMI value of each algorithm at different times in the Enron data set and the average NMI value of different algorithms in the dynamic network data set Newman under different parameter ranges.Figure 10
Changes in NMI metrics under different algorithms in the Enron data set. (a) The trend of NMI changes at different times. (b) The influence of threshold changes on the average NMI index.
(a)(b)As can be seen from Figure10(a), as time goes by, the comparison algorithms CDBIA, IC, etc. have different degrees of jitter. It shows that this kind of algorithm cannot effectively adapt to the increase of nodes and edges in the process of figure change, while K-Means is relatively smoother. Therefore, the algorithm K-Means proposed in this paper is superior to other algorithms in terms of clustering performance. It can be seen from Figure 10(b) that when the value is ϕ=0.4, the clustering effect obtained by the K-Means algorithm is more ideal than other algorithms.


## 4.3. Image Matching Experiment of Three Feature Description Operators

### 4.3.1. Matching Speed Experiment

The feature point matching problem of multisource images is also known as the cross-domain image matching problem, where images are formed and processed in different imaging domains [24]. This section tests the SIFT-based matching algorithm, the SURF-based matching algorithm, and the ORB-based matching algorithm. A very advanced matching method based on the intersection of mutual information and the proposed framework scheme based on multisource data sets - two-dimensional structured constrained feature matching method. The algorithm matching speed for different image sets is shown in Table 2.Table 2
Comparison of experimental results for matching speed.
Correct match rateBooksBowlsCaveHazeTeapotSIFT14.356316.216711.517111.040912.9744SURF1.60421.81891.30501.28141.4545ORB0.38240.39620.44060.43700.2671It can be seen from Table2 that for the matching of different source images, the feature description algorithm of ORB has obvious advantages in the running time of the algorithm.The constrained clustering algorithm verified in this section can effectively deal with the clustering problem of dynamic data and dynamic constraints and will not appear large jitter over time.


### 4.3.2. Noise Sensitivity Experiment

The noise sensitivity of the SIFT feature description operator, the SURF feature description operator, and the ORB feature description operator of the K-Means algorithm is tested, and the data in Table3 is obtained.Table 3
Comparison of experimental results for correct matching rate.
Correct match rateBooksBowlsCaveHazeTeapotSIFT91.389.981.992.093.8SURF72.668.563.375.470.1ORB89.289.674.581.191.0It can be seen from Table3 that SURF is more sensitive to noise and has a higher number of false matches. Compared with other algorithms, the algorithm based on SIFT matching results in this paper has similar sensitivity to noise, but has a higher matching rate. The matching results based on SURF in this paper are slightly worse than the original SURF results, but the matching accuracy is significantly higher than SURF and significantly better than other algorithms. The results of the algorithm based on ORB matching results in this paper are better than the original ORB matching results, the matching accuracy is significantly higher than that of ORB, and it is also significantly better than other algorithms.Then, Gaussian noise is added to the same pair of images, the mean value remains unchanged, the variance is gradually increased, and the sensitivity of each algorithm to noise is compared. The comparison of all algorithms is shown in Figure11.Figure 11
Comparison of algorithm matching results after adding Gaussian noise.It can be known from the line Figure11 that with the increase of noise, the blurring degree of the multisource image increases, and the ORB and SIFT algorithms are obviously more robust to noise than other algorithms.


### 4.3.3. Rotation Experiment of Matching Algorithm

In order to quantitatively evaluate the rotational performance of the algorithm, the following experiments are carried out in this paper. (1) Rotate an image by 90°, then use each algorithm to match it, and record its matching accuracy and running time in Table4. (2) Select an image to be matched, gradually increase the rotation angle, and test the rotation invariance of each algorithm.Table 4
Comparison of experimental results after rotating 90°.
Match rate and time/sBooksBowlsTeapotSIFT95.615.372195.416.311796.611.9885SURE76.11.468286.851.656486.01.2012ORB89.70.304689.80.364494.10.1905It can be seen from Table4 that the computational efficiency and the matching correct rate are the advantages of the constrained clustering algorithm, which effectively removes outliers—wrong matching—and greatly improves the matching rate.It can be seen from the line in Figure12 that with the increase of the rotation angle, the number of successful matches does not change much. Therefore, it has rotation invariance, and the experimental results also prove the effectiveness of the image matching recommendation system.Figure 12
Comparison of algorithm matching results.The constrained clustering algorithm effectively reduces the computational complexity and improves the computational efficiency. Experiments were conducted on the multisource image standard library, and the better matching results verify the effectiveness of the automatic matching recommendation system for web page image packaging design based on the clustering algorithm. The experimental results of image matching also prove that the matching framework in this paper can obtain the ideal matching degree with the optimal calculation amount.


## 4.3.1. Matching Speed Experiment

The feature point matching problem of multisource images is also known as the cross-domain image matching problem, where images are formed and processed in different imaging domains [24]. This section tests the SIFT-based matching algorithm, the SURF-based matching algorithm, and the ORB-based matching algorithm. A very advanced matching method based on the intersection of mutual information and the proposed framework scheme based on multisource data sets - two-dimensional structured constrained feature matching method. The algorithm matching speed for different image sets is shown in Table 2.Table 2
Comparison of experimental results for matching speed.
Correct match rateBooksBowlsCaveHazeTeapotSIFT14.356316.216711.517111.040912.9744SURF1.60421.81891.30501.28141.4545ORB0.38240.39620.44060.43700.2671It can be seen from Table2 that for the matching of different source images, the feature description algorithm of ORB has obvious advantages in the running time of the algorithm.The constrained clustering algorithm verified in this section can effectively deal with the clustering problem of dynamic data and dynamic constraints and will not appear large jitter over time.


## 4.3.2. Noise Sensitivity Experiment

The noise sensitivity of the SIFT feature description operator, the SURF feature description operator, and the ORB feature description operator of the K-Means algorithm is tested, and the data in Table3 is obtained.Table 3
Comparison of experimental results for correct matching rate.
Correct match rateBooksBowlsCaveHazeTeapotSIFT91.389.981.992.093.8SURF72.668.563.375.470.1ORB89.289.674.581.191.0It can be seen from Table3 that SURF is more sensitive to noise and has a higher number of false matches. Compared with other algorithms, the algorithm based on SIFT matching results in this paper has similar sensitivity to noise, but has a higher matching rate. The matching results based on SURF in this paper are slightly worse than the original SURF results, but the matching accuracy is significantly higher than SURF and significantly better than other algorithms. The results of the algorithm based on ORB matching results in this paper are better than the original ORB matching results, the matching accuracy is significantly higher than that of ORB, and it is also significantly better than other algorithms.Then, Gaussian noise is added to the same pair of images, the mean value remains unchanged, the variance is gradually increased, and the sensitivity of each algorithm to noise is compared. The comparison of all algorithms is shown in Figure11.Figure 11
Comparison of algorithm matching results after adding Gaussian noise.It can be known from the line Figure11 that with the increase of noise, the blurring degree of the multisource image increases, and the ORB and SIFT algorithms are obviously more robust to noise than other algorithms.


## 4.3.3. Rotation Experiment of Matching Algorithm

In order to quantitatively evaluate the rotational performance of the algorithm, the following experiments are carried out in this paper. (1) Rotate an image by 90°, then use each algorithm to match it, and record its matching accuracy and running time in Table4. (2) Select an image to be matched, gradually increase the rotation angle, and test the rotation invariance of each algorithm.Table 4
Comparison of experimental results after rotating 90°.
Match rate and time/sBooksBowlsTeapotSIFT95.615.372195.416.311796.611.9885SURE76.11.468286.851.656486.01.2012ORB89.70.304689.80.364494.10.1905It can be seen from Table4 that the computational efficiency and the matching correct rate are the advantages of the constrained clustering algorithm, which effectively removes outliers—wrong matching—and greatly improves the matching rate.It can be seen from the line in Figure12 that with the increase of the rotation angle, the number of successful matches does not change much. Therefore, it has rotation invariance, and the experimental results also prove the effectiveness of the image matching recommendation system.Figure 12
Comparison of algorithm matching results.The constrained clustering algorithm effectively reduces the computational complexity and improves the computational efficiency. Experiments were conducted on the multisource image standard library, and the better matching results verify the effectiveness of the automatic matching recommendation system for web page image packaging design based on the clustering algorithm. The experimental results of image matching also prove that the matching framework in this paper can obtain the ideal matching degree with the optimal calculation amount.


## 5. Conclusions

The following conclusions are drawn from the analysis of this paper: (1) the SIFT matching method is relatively stable, and there are many feature points detected by feature extraction, but the feature point extraction ability for smooth-edged targets is weak. The SURF matching method has fast calculation speed, high efficiency, low computational complexity, and also good robustness. But it may encounter the problem of inaccurate matching main direction. The ORB algorithm has the fastest calculation speed and short matching time. The calculation time is only about 1% of SIFT and 10% of SURF, and the storage space occupied is low. However, its ability to cope with scale transformation is relatively low. (2) When the parameters are 500 and 1000, the accuracy improvement of the constrained clustering algorithm tends to be stable compared with the parameter 100. And the change of the image matching accuracy is also relatively stable, and the calculation accuracy is increased by 0.317. Therefore, the constrained clustering algorithm has good universality. (3) When the attribution threshold of network structure division isϕ=0.4, the clustering effect of the constrained clustering algorithm is higher than the NMI value of other matching algorithms, and the clustering performance is better. (4) In terms of noise sensitivity, SURF is more sensitive to noise and has a higher number of false matches. SIFT and ORB are moderately sensitive to noise, but have high matching rates. (5) The computational efficiency and matching accuracy of the constrained clustering algorithm are better than other algorithms. (6) The research work of this paper has made a certain contribution to the research of automatic matching recommendation system for web page image packaging design, but there are still some shortcomings. The feature point matching algorithm has different adaptability to the changes of the illumination, scale, and direction of the image. It is worth thinking about what kind of matching method should be applied in different scenes.



---

*Source: 2224807-2022-08-23.xml*