Web Page Image Packaging Design Based on Constrained Clustering Algorithm

With the rapid development of articial intelligence technology, computer vision science has also gained new opportunities. As the foundation of computer vision and numerous articial 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 gures do not conform to the design theme. erefore, it is the current trend to deeply study the structure of the automatic matching recommendation system for web page image packaging design. e 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. is paper rst gives a general introduction to the classication of constrained clustering algorithms. en, the operation mechanism and model establishment of SURF feature description operator, SIFT feature description operator, and ORB feature description operator are described in detail. en, through experiments, the matching accuracy of the web page image matching system based on the constrained clustering algorithm and the inuence of parameter changes are compared with other algorithms. Finally, a comparative experiment is carried out on the image matching eects of the three feature description operators. e 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 algorithmmodel of the recommender system and experimenting with the model, the advantages of the constrained clustering algorithm in the model construction are proved. e experimental results show that the constrained clustering algorithm has higher image matching eciency 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.


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 ine ciency, too cluttered elements, and discordant image design, which will greatly reduce the exquisiteness of web page design and make the user experience degraded. erefore, building an automatic matching recommendation system for web page image packaging design is an important method to improve the e ect 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. erefore, it is scienti c 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. erefore, 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. e 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) e SURF, the SIFT, and the ORB feature description operators are compared and studied to highlight the advantages of the constrained clustering algorithm.

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. e 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. e 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. e 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.

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].

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]. e 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.
at is, given a static data set P � p 1 , p 2 , . . . , p n and a point pair constraint ω � ω � ∪ ω ≠ , ω � is a must-connect constraint, indicating that data points p j and p k belong to the same category of clusters. And ω ≠ is a disjoint constraint, indicating that data points p j and p k do not belong to the same class of clusters. e 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 point e and the data point f have an unconnected constraint link. en 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. erefore, 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.

Constrained Clustering.
In the field of image recognition [11][12][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. erefore, 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.
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. e sets should be sparser, so that the network has the characteristics of high cohesion and low coupling. erefore, 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]. e prior information used in the clustering process can generally be divided into label information and constraint information. e 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 mustconnect 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].

Image Feature Matching Method.
ere 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 Figure 2.

SURF Feature Description Operator.
e 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. e 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]. e reason why the SURF feature descriptor has high computational efficiency is that it uses Harr features and integral images. e specific process is as follows: Assuming the image M(a, b) to be matched, the integral image M j (a, b) is expressed as the area of the rectangle with the pixel point (a, b) and the origin as the diagonal. is simple operation J � E − F − G + H enables the box filter convolution computation to greatly speed up the computation. e integral image is shown in Figure 3. (1) Among them, U aa (A, Φ) represents the convolution of the Gaussian second-order partial derivative λ 2 /λa 2 t(Φ) and the image M(a, 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 Mobile Information Systems computational efficiency, the complex Gaussian secondorder partial derivatives are approximated, as shown in Figure 4. W bb is an approximation of U bb and W ab is an approximation of U ab .
Gaussian second-order partial derivative filter of scale Φ � 0.9, the template size is 7 × 7, and W aa , W ab , and W bb are used to replace the convolution value of the box filter template and the image, respectively. e G matrix determinant is Using the similarity between the Gaussian kernel and its approximation, the weight factor v can be calculated as

Mobile Information Systems
|A| f 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: Among them, d aa , d bb (d aa � d bb ), d ab represent the template area of W aa , W bb , W ab , r n ∈ 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 x n 1 , x n 2 , x n 3 , x n 4 . As a result, the computational efficiency is greatly improved.

ORB Feature Description
Operator. First perform FAST corner detection: Among them, the center of the circle is O, the gray value is E O , s represents the neighborhood of the circle, and there are n pixels (k � 1, 2, ..., n) on the circumference. E k 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. e resulting FAST corners are not scale-invariant and contain edge responses. Based on this defect, some methods can be improved. e 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.
Using the gray-scale centroid method by calculating moments to add direction information, the following can be got:

Key Point Detection in Scale Space. Performing a
Gaussian kernel-based computation on an image can define a two-dimensional image as Among them, S(a, b, Φ) is a Gaussian function whose scale can be changed: Φ 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. e lower the smoothness, the sharper the image and the more detailed information.

Build a Differential Pyramid.
e Gaussian difference formula can be represented by P(a, b, Φ): e DOG image is obtained by the difference value.

e Location of the Feature Points Is Determined.
Using series expansion of the scale space, the following can be got: Take the derivative and find the extreme point for 0: Mobile Information Systems 5 By substituting formula (11) into formula (10), the following can be got: is beneficial to the elimination of unstable candidate points with low DOG response values. Usually, the extreme points with a value of P(A ∧ ) below 0.03 are regarded as lowresponse points and eliminated.

Eliminate Edge Candidate Feature Points.
e matrix of the key point G can be obtained by calculating the pixel difference around the key point: 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: 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.

Design of Automatic Matching Recommendation System for Web Page Image Packaging Design.
e physical structure of the web page image packaging design of automatic matching recommendation system is shown in Figure 6. success of the entire experiment. Selecting good experimental images plays a crucial role in improving the accuracy of feature matching [21,22]. e 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-torecognize, 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.

Model Training.
e 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. e 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. e 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. e current descriptor has no direction. Mobile Information Systems rough 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. e 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.

Establish an Image Feature Information Database.
rough the above model training, an image matching model can be obtained, and then the image information obtained in the model needs to be stored. e 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.
e 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.
en, 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.
e system user use case figure is shown in Figure 7. At this time, the work efficiency of the system is greatly improved, and the waste of human and financial resources is reduced. e final implementation of the system needs to include the following four functions: (1) Graphical feature vector data management and maintenance is provided.

Parameter Setting of Data Management Module.
e 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.

Parameter Setting of Matching Algorithm Module.
e parameter management (FVPM) module is also responsible for setting the parameters of the matching algorithm (FVMA) module, including the following.
(1) e 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.

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 Table 1: Figure 8 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. e target matching accuracy changes relatively stable when the data set detection parameters change.
e 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.

Discussion on Parameters of Matching Recommendation System.
is 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.
It can be seen from Figure 9(a) that other algorithms cannot better adapt to the dynamic changes of the figure during the clustering process, so the clustering effect is poor. e 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. Figure 10 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.
As can be seen from Figure 10(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. erefore, 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.

Matching Speed Experiment.
e 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].
is 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. e algorithm matching speed for different image sets is shown in Table 2.
It can be seen from Table 2 that for the matching of different source images, the feature description algorithm of ORB has obvious advantages in the running time of the algorithm. e 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.

Noise Sensitivity Experiment.
e 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 Table 3 is obtained.
It can be seen from Table 3 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. e 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. e 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. en, 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. e comparison of all algorithms is shown in Figure 11.
It can be known from the line Figure 11 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.

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 Table 4. (2) Select an image to be matched, gradually increase the rotation angle, and test the rotation invariance of each algorithm.
It can be seen from Table 4 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 Figure 12 that with the increase of the rotation angle, the number of successful matches does not change much. erefore, it has rotation invariance, and the experimental results also prove the effectiveness of the image matching recommendation system. e 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. e 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.

Conclusions
e 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 smoothedged targets is weak. e 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. e ORB algorithm has the fastest calculation speed and short matching time. e 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. erefore, 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) e computational efficiency and matching accuracy of the constrained clustering algorithm are better than other algorithms. (6) e 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.
e 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.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e author does not have any possible conflicts of interest.