Data dimension reduction method and device, computer equipment and storage medium

By combining the data dimensionality reduction method of screenshots, feature extraction, linearization processing and principal component analysis in image recognition, the problem of poor data dimensionality reduction effect in the existing technology is solved, and the efficiency and accuracy of image recognition are improved. A concise feature representation is generated.

CN118552803APending Publication Date: 2024-08-27GUANGZHOU PINWEI SOFTWARE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410861024.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

The data dimensionality reduction effect in the existing technology is poor, which results in long-term model training and prediction in the image recognition process, and it is difficult to effectively extract image features.

Method used

The method of dimensionality reduction is to use screenshots, feature extraction, linearization processing and principal component analysis method in the scene graph. Through the combination of linearization processing of the feature matrix and principal component analysis method, the feature differences between samples can be retained to the maximum extent during dimensionality reduction. Generate high-quality, concise feature representations.

Benefits of technology

It improves the classification efficiency of image recognition tasks, ensures the accuracy and efficiency of recognition, reduces redundancy and over-fitting risks, and generates a high-quality data basis suitable for subsequent modeling and recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552803A
    Figure CN118552803A
Patent Text Reader

Abstract

The invention provides a data dimension reduction method and device, computer equipment and a storage medium. The method comprises the following steps: performing screenshot on a target area in a scene graph to obtain a to-be-recognized graph; performing feature extraction on the to-be-recognized image to obtain a feature matrix; determining a target dimension from the dimensions of the feature matrix, and performing linearization processing on an image feature value of the target dimension; and carrying out dimensionality reduction on the feature matrix by using a principal component analysis method. According to the method, the characteristic difference between samples can be reserved to the greatest extent during dimension reduction of the principal component analysis method in a mode of performing linearization processing on a matrix of a specific dimension. According to the method, high-quality and simple feature representation is generated for a complex scene image recognition task, and a data foundation is laid for subsequent modeling recognition, so that the classification efficiency is improved on the premise of ensuring the accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data dimensionality reduction method, device, computer equipment and storage medium. Background Art

[0002] In the field of automated testing, it is necessary to find the location of the target image from the scene graph so that the target image area can be operated. In the recognition process, it is often necessary to take a screenshot of the scene graph, and use the neural network model to classify and recognize the features extracted from the screenshot and the target image. However, the features extracted by the feature extraction algorithm have many dimensions and the data is relatively complex, which makes model training and prediction more time-consuming. Therefore, for high-dimensional data in image recognition scenarios, dimensionality reduction processing is usually required to extract effective features and reduce the amount of calculation. However, the data dimensionality reduction method in traditional technology has the problem of poor dimensionality reduction effect. Summary of the invention

[0003] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the problem of poor dimensionality reduction effect in the prior art.

[0004] In a first aspect, the present application provides a data dimensionality reduction method, comprising:

[0005] Take a screenshot of the target area in the scene graph to obtain a to-be-recognized graph;

[0006] Perform feature extraction on the image to be identified to obtain a feature matrix;

[0007] Determine the target dimension from the dimension of the feature matrix, and perform linearization processing on the image eigenvalues ​​of the target dimension;

[0008] The principal component analysis method is used to reduce the dimension of the feature matrix.

[0009] In one embodiment, the feature matrix includes features extracted by multiple preset algorithms, and the extraction process of a first preset algorithm among the multiple preset algorithms includes:

[0010] Extracting feature points from the target image to obtain a first feature point set, and extracting feature points from the image to be identified to obtain a second feature point set;

[0011] Traverse the first feature points in the first feature point set, and whenever a first feature point is traversed, find two second feature points closest to the first feature point from the second feature point set, and form a first matching point pair and a second matching point pair with the two second feature points respectively; the first matching point pair is the optimal matching point pair, and the second matching point pair is the suboptimal matching point pair;

[0012] The first feature point whose distance ratio between the best matching point pair and the second best matching point pair is smaller than the current matching factor is determined as the matching feature point;

[0013] Starting from the preset lower limit of the matching ratio, increase to the preset upper limit according to the first step length, find the matching factor when the ratio of the matching feature points in the first feature point set matches the current matching ratio, and use the found matching factor as the feature value of the dimension corresponding to the current matching ratio.

[0014] In one embodiment, determining the target dimension from the dimension of the feature matrix includes:

[0015] The dimension associated with the first preset algorithm is determined as the target dimension.

[0016] In one embodiment, when the proportion of the matching feature points in the first feature point set matches the current matching proportion, the matching factor is selected, including:

[0017] If the current matching ratio is the preset lower limit value, the matching factor is gradually increased from the preset minimum factor value according to the second step length until a matching factor is found that makes the ratio of the matching feature points in the first feature point set match the current matching ratio;

[0018] If the current matching ratio is not the preset lower limit, the matching factor is gradually increased from the matching factor of the previous matching ratio according to the second step length until a matching factor is found that makes the ratio of the matching feature points in the first feature point set match the current matching ratio.

[0019] In one embodiment, linearization is performed on the image feature values ​​of the target dimension, including:

[0020] The incremental linearization model is used to linearize the image feature values ​​of the target dimension.

[0021] In one embodiment, the dimension reduction of the feature matrix is ​​performed using a principal component analysis method, including:

[0022] Normalize the feature matrix;

[0023] Calculate the covariance matrix of the normalized feature matrix;

[0024] Perform eigendecomposition on the covariance matrix to obtain multiple eigenvalues ​​and eigenvectors corresponding to each eigenvalue;

[0025] Select multiple eigenvalues ​​from each eigenvalue in descending order, so that the cumulative contribution rate of the selected eigenvalues ​​is just greater than the contribution rate threshold;

[0026] The dimension of the feature matrix is ​​reduced according to the eigenvectors corresponding to the selected eigenvalues.

[0027] In one embodiment, normalizing the feature matrix includes:

[0028] For any dimension of the feature matrix, determine the mean and standard deviation of that dimension;

[0029] Subtract the mean value from each image feature value in that dimension and divide it by the standard deviation.

[0030] In a second aspect, the present application provides a data dimension reduction device, comprising:

[0031] A screenshot module is used to take a screenshot of the target area in the scene graph to obtain a to-be-recognized image;

[0032] A feature extraction module is used to extract features from the image to be identified and obtain a feature matrix;

[0033] A linearization module, used to determine a target dimension from the dimension of the feature matrix and perform linearization processing on the image eigenvalues ​​of the target dimension;

[0034] The dimension reduction module is used to reduce the dimension of the feature matrix using principal component analysis.

[0035] In a third aspect, the present application provides a computer device comprising one or more processors and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the steps of the data dimensionality reduction method in any of the above-mentioned embodiments are performed.

[0036] In a fourth aspect, the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the data dimensionality reduction method in any of the above embodiments.

[0037] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0038] Based on the data dimensionality reduction method in this embodiment, firstly, screenshots are taken of multiple target areas in the scene graph to obtain images to be identified. Then, image features are extracted for each image to be identified, and the image features corresponding to each image to be identified are combined into a feature matrix. For the target dimensions with high correlation but nonlinear change trend in the feature matrix, linearization processing is performed to meet the use requirements of the principal component analysis method. Finally, the principal component analysis method is used for dimensionality reduction. This method can maximize the retention of feature differences between samples when the principal component analysis method is used for dimensionality reduction by linearizing the matrix of a specific dimension. This method generates high-quality and concise feature representations for complex scene image recognition tasks, lays a data foundation for subsequent modeling and recognition, and thus improves classification efficiency while ensuring accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0040] Figure 1 A flowchart of a data dimensionality reduction method provided in one embodiment of the present application;

[0041] Figure 2 A schematic diagram of a module of a data dimension reduction device provided in one embodiment of the present application;

[0042] Figure 3 An internal structural diagram of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0044] This application provides a data dimensionality reduction method, please refer to Figure 1 , including steps S102 to S108.

[0045] S102, taking a screenshot of the target area in the scene graph to obtain a to-be-recognized graph.

[0046] It can be understood that a web application page contains many page elements. When performing automated testing, a certain page element will be targeted for operation, so it is necessary to identify the location of the target page element. The scene graph is a complete screenshot of each page. The screenshot of the target page element is called the target graph. The target area is the screenshot area designed according to the size of the target graph. When finding an area that matches the target graph from the scene graph, multiple captures can be performed in the scene graph until a screenshot that matches the target graph is found or the scene graph is traversed. Therefore, the screenshot obtained each time is the image to be identified that needs to be identified whether it matches the target graph.

[0047] S104, extracting features from the image to be identified to obtain a feature matrix.

[0048] It can be understood that since the scene graph needs to be intercepted multiple times, each interception of the to-be-identified graph can be used as a sample, and each to-be-identified graph needs to go through a feature extraction process to obtain its own corresponding image features. The image features of all samples are combined into a feature matrix. Each row in the feature matrix corresponds to all image features of a sample, and each column represents an image feature of a dimension. Feature extraction algorithms include SIFT, SURF, HOG, etc. The image features in this embodiment can be extracted by selecting a feature extraction algorithm, or can be formed by extracting and combining multiple different feature extraction algorithms. Selecting an appropriate feature extraction algorithm can effectively represent the significant characteristics of the target, improve the distinguishability between samples, and facilitate subsequent model classification and recognition. The dimensions of the feature matrix may include scaling, shape factor, color factor, feature point similarity, number of matching feature points, number of target graph feature points, number of scene graph feature points, target graph width and height, and scene graph width and height.

[0049] S106, determining a target dimension from the dimensions of the feature matrix, and performing linearization processing on the image feature values ​​of the target dimension.

[0050] It can be understood that the target dimension here refers to the dimension in which the correlation between different dimensions of the same sample is very high, but the change trend is nonlinear. The information that these dimensions can provide for classification is very similar, and can be uniformly represented by a smaller number of dimensions, but this embodiment will be based on the principal component analysis method for dimensionality reduction, which achieves dimensionality reduction by coordinate rotation projection, while retaining the difference information between samples to the greatest extent. However, the principal component analysis method will destroy some features of nonlinear data during the projection transformation process, and significantly lose the information required for classification and identification. Therefore, it is necessary to linearize the data of the target dimension and approximate the nonlinear data according to the linear relationship. The principal component analysis method can better capture the correlation between data when it is used. In this way, when constructing new coordinates by dimensionality reduction, the distance and variance between samples can be kept in the original state as much as possible. Thereby, less classification information is lost when dimensionality reduction is performed.

[0051] S108, using principal component analysis to reduce the dimension of the feature matrix.

[0052] It is understandable that in order to obtain higher recognition accuracy, principal component analysis often chooses to extract as many image features as possible, but as the number of image features increases, the dimension and complexity of the feature matrix rise sharply, resulting in redundancy and overfitting risks. The principal component analysis method finds the most critical feature projection direction through orthogonal transformation, realizes the conversion from high dimension to low dimension, and improves the robustness and efficiency of subsequent processing. The target dimensions in the feature matrix are highly correlated with each other, but the change trend is nonlinear. It is difficult for the principal component analysis method to directly process nonlinear features. Step S106 linearizes these target dimensions to meet the use requirements of the principal component analysis method. After linearization, the principal component analysis method is applied for dimensionality reduction, which can retain the discriminant information between samples to the greatest extent. Thus, the original matrix can be represented using fewer features, achieving the purpose of dimensionality reduction.

[0053] Based on the data dimensionality reduction method in this embodiment, firstly, screenshots are taken of multiple target areas in the scene graph to obtain images to be identified. Then, image features are extracted for each image to be identified, and the image features corresponding to each image to be identified are combined into a feature matrix. For the target dimensions with high correlation but nonlinear change trend in the feature matrix, linearization processing is performed to meet the use requirements of the principal component analysis method. Finally, the principal component analysis method is used for dimensionality reduction. This method can maximize the retention of feature differences between samples when the principal component analysis method is used for dimensionality reduction by linearizing the matrix of a specific dimension. This method generates high-quality and concise feature representations for complex scene image recognition tasks, lays a data foundation for subsequent modeling and recognition, and thus improves classification efficiency while ensuring accuracy.

[0054] In one embodiment, the feature matrix includes features extracted by multiple preset algorithms, and the extraction process of a first preset algorithm among the multiple preset algorithms includes:

[0055] (1) Extract feature points from the target image to obtain a first feature point set, and extract feature points from the image to be identified to obtain a second feature point set.

[0056] The feature points of an image can reflect the essential features of the image, such as points where the grayscale value of the image changes dramatically or points with large curvature on the edge of the image. The number of feature points of an image is generally much smaller than the number of pixels of the image. Comparing the feature points of the image will not affect the accuracy of the comparison and can speed up the processing speed. There are many feature extraction algorithms that can extract features from images, such as SIFT (Scale-invariant feature transform) algorithm, SURF (Speeded Up Robust Features) algorithm, etc. The feature points extracted by the SIFT algorithm are scale-invariant feature transform (SIFT) feature points, and the feature points extracted by the SURF algorithm are speeded up robust features (SURF) feature points. Based on this, the first preset algorithm extracts features from the target image and the image to be identified respectively to obtain a first feature point set and a second feature point set.

[0057] (2) Traverse the first feature points in the first feature point set. Whenever a first feature point is traversed, find the two second feature points closest to the first feature point from the second feature point set, and form a first matching point pair and a second matching point pair with the two second feature points respectively. The first matching point pair is the optimal matching point pair, and the second matching point pair is the suboptimal matching point pair.

[0058] It can be understood that each feature point in the first feature point set and the second feature point set has a corresponding descriptor to describe the image features it has. The descriptor includes multi-dimensional image features, which can be used for feature point matching. The specific way of matching is to perform it according to the distance between the feature points of two different images. That is, all feature points of the target image are traversed, and the distance between the traversed feature points and each feature point in the image to be identified is calculated according to the descriptor of the feature points. The size of the distance represents the similarity between the two feature points. After obtaining all the distances, the two feature points closest to the traversed feature points can be found. These two feature points are the two feature points that best match the traversed feature points. Among them, the matching point pair composed of the feature points closest to the traversed feature points is the optimal matching point pair, and the matching point pair composed of the feature points second closest to the traversed feature points is the suboptimal matching point pair.

[0059] (3) The first feature point whose distance ratio between the optimal matching point pair and the suboptimal matching point pair is less than the current matching factor is determined as the matching feature point.

[0060] It can be understood that whether the first feature point can find a matching second feature point in the image to be identified is mainly determined by the distance ratio between the best matching point pair and the second best matching point pair. If the ratio between the two is larger, it means that for the same first feature point, the first feature point is very close to the second feature point in the best matching point pair and the second feature point in the second best matching point pair, and there is no matching value. It is very likely that the match is caused by noise and needs to be ignored. Therefore, only when the ratio between the two is less than the set matching factor can it be determined that a first feature point belongs to a matching feature point.

[0061] (4) Starting from the preset lower limit value of the matching ratio, increase the first step length to the preset upper limit value, find the matching factor when the ratio of the matching feature points in the first feature point set matches the current matching ratio, and use the found matching factor as the feature value of the dimension corresponding to the current matching ratio.

[0062] It can be understood that the matching ratio refers to the ratio between the number of matching feature points and the total number of first feature points in the first feature point set. The matching ratio can be adjusted according to the matching factor selected during matching. The larger the matching factor, the more likely it is that more matching feature points will appear. In this embodiment, the first preset algorithm will extract feature values ​​of multiple dimensions, and each dimension corresponds to a matching ratio, and the matching ratio corresponding to each dimension starts from a preset lower limit value and grows to a preset upper limit value according to a fixed first step length. For example, the features extracted by the first preset algorithm have a total of 20 dimensions, then it can start from 5% and gradually grow to 100% according to a step length of 5%. For each dimension, there is a specific matching factor that makes the current matching ratio reach the same as the matching ratio corresponding to the current dimension. After finding the matching factor, the matching factor can be used as the feature value of the current dimension. Therefore, the larger the matching factor corresponding to the dimension with a smaller matching ratio, the larger the matching factor is, which means that for the same first feature point, the distance between the first feature point and the second feature point in the optimal matching point pair and the second feature point in the suboptimal matching point pair is very different, which means that each matching feature point is a relatively similar point. Considering all dimensions of the first preset algorithm, it can be concluded that the two images are very similar.

[0063] In one embodiment, determining the target dimension from the dimension of the feature matrix includes: determining the dimension related to the first preset algorithm as the target dimension. It can be understood that since the image feature values ​​extracted by the first preset algorithm are different matching factors obtained based on the same feature extraction and matching idea, the values ​​of these dimensions will show high correlation and nonlinear change trend. Therefore, it is necessary to perform linearization processing as the target dimension.

[0064] In one embodiment, when the proportion of the matching feature points in the first feature point set matches the current matching proportion, the matching factor is selected, including:

[0065] (1) If the current matching ratio is the preset lower limit value, the matching factor is gradually increased from the preset minimum factor value according to the second step length until a matching factor is found that makes the ratio of the matching feature points in the first feature point set match the current matching ratio.

[0066] It can be understood that when the traversed matching ratio is the set minimum value, in order to obtain a sufficient number of matching points, it is necessary to select the minimum matching factor value as the initialization value, that is, to use the most stringent matching degree requirement. Then, the requirements are gradually relaxed from the minimum matching factor until the ratio of the number of matching feature points found to the number of feature points in the first feature point set matches the preset lower limit value. The matching factor found at this time is the feature value when the matching ratio is the preset lower limit value.

[0067] (2) If the current matching ratio is not the preset lower limit, the matching factor is increased gradually from the matching factor of the previous matching ratio according to the second step length until a matching factor is found that makes the ratio of the matching feature points in the first feature point set match the current matching ratio.

[0068] It can be understood that when the traversed matching ratio is not the set minimum value, since the matching ratio is gradually increasing during the traversal process, if more matching feature points are needed, a looser matching degree requirement than the previous matching ratio is required. Therefore, the matching factor selected at the previous matching ratio can continue to increase until the ratio of the number of matching feature points found to the number of feature points in the first feature point set matches the currently required matching ratio.

[0069] In one embodiment, the image feature value of the target dimension is linearized, including: using an incremental linearization model to linearize the image feature value of the target dimension. It can be understood that the incremental linearization model is a commonly used linearization method, which adopts the idea of ​​piecewise linearization and has a significant improvement in mean square error and interpolation error compared with general linearization methods.

[0070] In one embodiment, the dimension reduction of the feature matrix is ​​performed using a principal component analysis method, including:

[0071] (1) Normalize the feature matrix.

[0072] It can be understood that normalization is to scale the eigenvalues ​​of each column of the feature matrix and map them to a unified numerical range. There are differences in the units and numerical ranges between different feature quantities of the feature matrix. In order to eliminate the data instability caused by this difference, all image eigenvalues ​​will be unified into a specific numerical range, which can generally be 0 to 1.

[0073] (2) Calculate the covariance matrix of the normalized feature matrix.

[0074] It can be understood that the covariance matrix can reflect the degree of difference between data of different dimensions. Based on the covariance matrix, it can help to choose the direction of mapping data in high-dimensional space to low-dimensional space.

[0075] (3) Perform eigendecomposition on the covariance matrix to obtain multiple eigenvalues ​​and the eigenvectors corresponding to each eigenvalue.

[0076] It can be understood that the covariance matrix is ​​a real symmetric matrix, and the eigenvectors corresponding to its different eigenvalues ​​must be orthogonal, which can help map the original data into unrelated coordinate systems. The eigenvalue represents the variance of the data in each new coordinate system. The larger the eigenvalue, the more information in the original data can be retained. Therefore, by performing eigenvalue decomposition on the covariance matrix, we can complete the dimensionality reduction operation and map high-dimensional data into low-dimensional space, so as to better describe and understand the relationship between the data.

[0077] (4) Select multiple eigenvalues ​​from each eigenvalue in order from large to small, so that the cumulative contribution rate of the selected eigenvalues ​​is just greater than the contribution rate threshold.

[0078] It can be understood that each eigenvector has a certain correlation with the original matrix, but the larger the corresponding eigenvalue is, the more information can be retained by mapping the original data to the coordinate system in which it is located. Therefore, in order to better reduce the dimension, it is only necessary to select the most important part of the eigenvectors from all the eigenvectors. This embodiment makes the selection based on the cumulative contribution rate of the eigenvalues ​​corresponding to the selected eigenvectors. The cumulative contribution rate is a proportional value, whose denominator is the sum of all eigenvalues ​​and the numerator is the sum of the selected eigenvalues. When selecting, start from the largest eigenvalue, and calculate the cumulative contribution rate once each time a new eigenvalue is selected until the current cumulative contribution rate is greater than the contribution rate threshold.

[0079] (5) Reduce the dimension of the feature matrix according to the eigenvectors corresponding to the selected eigenvalues.

[0080] It can be understood that the number of selected eigenvalues ​​is called the target number. The eigenvectors corresponding to the selected eigenvalues ​​form a projection matrix. The transpose of the projection matrix is ​​multiplied by the transpose of the feature matrix, that is, the number of dimensions of the feature matrix is ​​reduced from the original value to the target number.

[0081] In one embodiment, normalizing the feature matrix includes:

[0082] (1) For any dimension of the feature matrix, determine the mean and standard deviation of that dimension.

[0083] (2) Subtract the mean value from each image feature value of that dimension and divide it by the standard deviation.

[0084] It can be understood that the mean value of each dimension reflects the average level of the image feature value under this dimension, while the standard deviation can determine the fluctuation range and dispersion of the value distribution. By subtracting the mean and dividing by the standard deviation, the difference in the value range of each feature dimension value can be eliminated, and a standard normal distribution with a mean of 0 and a standard deviation of 1 can be obtained.

[0085] This application provides a data dimensionality reduction device, see Figure 2 , including a screenshot module 210, a feature extraction module 220, a linearization module 230 and a dimension reduction module 240.

[0086] The screenshot module 210 is used to take a screenshot of the target area in the scene graph to obtain a to-be-recognized graph.

[0087] The feature extraction module 220 is used to extract features from the image to be identified to obtain a feature matrix.

[0088] The linearization module 230 is used to determine the target dimension from the dimension of the feature matrix and perform linearization processing on the image feature value of the target dimension.

[0089] The dimension reduction module 240 is used to reduce the dimension of the feature matrix by using the principal component analysis method.

[0090] In one embodiment, the feature extraction module 220 is used to extract feature points from the target image to obtain a first feature point set, and to extract feature points from the image to be identified to obtain a second feature point set; traverse the first feature points in the first feature point set, and whenever a first feature point is traversed, find two second feature points closest to the first feature point from the second feature point set, and form a first matching point pair and a second matching point pair with the two second feature points respectively; the first matching point pair is the optimal matching point pair, and the second matching point pair is the suboptimal matching point pair; the first feature point whose distance ratio between the optimal matching point pair and the suboptimal matching point pair is less than the current matching factor is determined as the matching feature point; starting from the preset lower limit value of the matching ratio, increase to the preset upper limit value according to the first step length, find the matching feature point in the first feature point set when the ratio of the matching feature point matches the current matching ratio, select the matching factor, and use the found matching factor as the feature value of the dimension corresponding to the current matching ratio.

[0091] In one embodiment, the linearization module 230 is used to determine a dimension associated with the first preset algorithm as a target dimension.

[0092] In one embodiment, the feature extraction module 220 is used to, if the current matching ratio is a preset lower limit value, start the matching factor from the preset minimum factor value and gradually increase it according to the second step length until a matching factor is found that makes the ratio of the matching feature points in the first feature point set match the current matching ratio; if the current matching ratio is not the preset lower limit value, then start the matching factor from the matching factor of the previous matching ratio and gradually increase it according to the second step length until a matching factor is found that makes the ratio of the matching feature points in the first feature point set match the current matching ratio.

[0093] In one embodiment, the linearization module 230 is used to perform linearization processing on the image feature values ​​of the target dimension using an incremental linearization model.

[0094] In one embodiment, the dimension reduction module 240 is used to normalize the feature matrix; calculate the covariance matrix of the normalized feature matrix; perform eigendecomposition on the covariance matrix to obtain multiple eigenvalues ​​and eigenvectors corresponding to each eigenvalue; select multiple eigenvalues ​​from each eigenvalue in order from large to small so that the cumulative contribution rate of the selected eigenvalues ​​is just greater than the contribution rate threshold; and reduce the dimension of the feature matrix according to the eigenvectors corresponding to the selected eigenvalues.

[0095] In one embodiment, the dimension reduction module 240 is used to determine the mean value and standard deviation of any dimension of the feature matrix; subtract the mean value from each image feature value of the dimension and divide the result by the standard deviation.

[0096] For the specific definition of the data dimensionality reduction device, please refer to the definition of the data dimensionality reduction method above, which will not be repeated here. Each module in the above-mentioned data dimensionality reduction device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. It should be noted that the division of modules in the embodiment of the present application is schematic, which is only a logical function division, and there may be other division methods in actual implementation.

[0097] The present application provides a computer device, including one or more processors and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the following are performed: taking a screenshot of a target area in a scene graph to obtain a to-be-recognized image; performing feature extraction on the to-be-recognized image to obtain a feature matrix; determining a target dimension from the dimension of the feature matrix, and performing linearization processing on the image feature values ​​of the target dimension; and reducing the dimension of the feature matrix using a principal component analysis method.

[0098] In one embodiment, when the computer-readable instructions are executed by one or more processors, the following are performed: extracting feature points from a target image to obtain a first feature point set, extracting feature points from an image to be identified to obtain a second feature point set; traversing the first feature points in the first feature point set, and whenever a first feature point is traversed, finding two second feature points closest to the first feature point from the second feature point set, and forming a first matching point pair and a second matching point pair with the two second feature points respectively; the first matching point pair is an optimal matching point pair, and the second matching point pair is a suboptimal matching point pair; determining a first feature point whose distance ratio between the optimal matching point pair and the suboptimal matching point pair is less than a current matching factor as a matching feature point; starting from a preset lower limit value of the matching ratio, increasing the first step length to a preset upper limit value, selecting a matching factor when the ratio of the matching feature points in the first feature point set matches the current matching ratio, and using the found matching factor as the feature value of the dimension corresponding to the current matching ratio.

[0099] In one embodiment, when the computer readable instructions are executed by one or more processors, the instructions perform: determining a dimension associated with a first preset algorithm as a target dimension.

[0100] In one embodiment, when the computer-readable instructions are executed by one or more processors, the following is performed: if the current matching ratio is a preset lower limit value, the matching factor is increased starting from the preset minimum factor value and step by step according to the second step length until a matching factor is found that makes the ratio of the matching feature points in the first feature point set match the current matching ratio; if the current matching ratio is not the preset lower limit value, the matching factor is increased starting from the matching factor of the previous matching ratio and step by step according to the second step length until a matching factor is found that makes the ratio of the matching feature points in the first feature point set match the current matching ratio.

[0101] In one embodiment, when the computer readable instructions are executed by one or more processors, the instructions perform: linearizing the image feature values ​​of the target dimension using an incremental linearization model.

[0102] In one embodiment, when the computer-readable instructions are executed by one or more processors, the following steps are performed: normalizing the feature matrix; calculating the covariance matrix of the normalized feature matrix; eigendecomposing the covariance matrix to obtain multiple eigenvalues ​​and eigenvectors corresponding to each eigenvalue; selecting multiple eigenvalues ​​from each eigenvalue in order from large to small so that the cumulative contribution rate of the selected eigenvalues ​​is just greater than the contribution rate threshold; and reducing the dimension of the feature matrix according to the eigenvectors corresponding to the selected eigenvalues.

[0103] In one embodiment, when the computer-readable instructions are executed by one or more processors, the following are performed: for data of any dimension of the feature matrix, determine the mean value and standard deviation of the dimension; and subtract the mean value from each image feature value of the dimension and divide the result by the standard deviation.

[0104] Indicatively, Figure 3 As shown, Figure 3 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. Figure 3 The computer device 300 includes a processing component 302, which further includes one or more processors, and a memory resource represented by a memory 301, for storing instructions executable by the processing component 302, such as an application. The application stored in the memory 301 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 302 is configured to execute instructions to perform the steps of the data dimensionality reduction method of any of the above embodiments.

[0105] The computer device 300 may further include a power supply component 303 configured to perform power management of the computer device 300 , a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305 .

[0106] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0107] The present application provides a storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute: taking a screenshot of a target area in a scene graph to obtain a to-be-recognized image; performing feature extraction on the to-be-recognized image to obtain a feature matrix; determining a target dimension from the dimension of the feature matrix, and linearizing the image feature values ​​of the target dimension; and reducing the dimension of the feature matrix using a principal component analysis method.

[0108] In one of the embodiments, when the computer-readable instructions are executed by one or more processors, the one or more processors are caused to execute: extracting feature points from the target image to obtain a first feature point set, extracting feature points from the image to be identified to obtain a second feature point set; traversing the first feature points in the first feature point set, and whenever a first feature point is traversed, finding two second feature points closest to the first feature point from the second feature point set, and forming a first matching point pair and a second matching point pair with the two second feature points respectively; the first matching point pair is the optimal matching point pair, and the second matching point pair is the suboptimal matching point pair; determining the first feature point whose distance ratio between the optimal matching point pair and the suboptimal matching point pair is less than the current matching factor as the matching feature point; starting from a preset lower limit value of the matching ratio, increasing according to the first step length to a preset upper limit value, selecting a matching factor when the ratio of the matching feature points in the first feature point set matches the current matching ratio, and using the found matching factor as the feature value of the dimension corresponding to the current matching ratio.

[0109] In one of the embodiments, when the computer readable instructions are executed by one or more processors, the one or more processors are caused to perform: determining a dimension associated with a first preset algorithm as a target dimension.

[0110] In one embodiment, when the computer-readable instructions are executed by one or more processors, the one or more processors execute: if the current matching ratio is a preset lower limit value, the matching factor is increased starting from the preset minimum factor value and gradually increasing according to the second step length until a matching factor is found that makes the ratio of the matching feature points in the first feature point set match the current matching ratio; if the current matching ratio is not the preset lower limit value, the matching factor is increased starting from the matching factor of the previous matching ratio and gradually increasing according to the second step length until a matching factor is found that makes the ratio of the matching feature points in the first feature point set match the current matching ratio.

[0111] In one embodiment, when the computer readable instructions are executed by one or more processors, the one or more processors are caused to perform: linearizing the image feature values ​​of the target dimension using an incremental linearization model.

[0112] In one embodiment, when the computer-readable instructions are executed by one or more processors, the one or more processors execute: normalizing the feature matrix; calculating the covariance matrix of the normalized feature matrix; eigendecomposing the covariance matrix to obtain multiple eigenvalues ​​and eigenvectors corresponding to each eigenvalue; selecting multiple eigenvalues ​​from each eigenvalue in order from large to small so that the cumulative contribution rate of the selected eigenvalues ​​is just greater than the contribution rate threshold; and reducing the dimension of the feature matrix according to the eigenvectors corresponding to the selected eigenvalues.

[0113] In one embodiment, when the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps: for data of any dimension of the feature matrix, determine the mean value and standard deviation of the dimension; and subtract the mean value from each image feature value of the dimension and divide the result by the standard deviation.

[0114] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

[0115] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data dimensionality reduction method, It is characterized in that include: Take a screenshot of the target area in the scene graph to obtain a to-be-recognized graph; Extracting features from the image to be identified to obtain a feature matrix; Determining a target dimension from the dimensions of the feature matrix, and performing linearization processing on the image eigenvalues ​​of the target dimension; The principal component analysis method is used to reduce the dimension of the feature matrix.

2. The data dimensionality reduction method according to claim 1, It is characterized in that The feature matrix includes features extracted by multiple preset algorithms, and the extraction process of the first preset algorithm among the multiple preset algorithms includes: Extracting feature points from the target image to obtain a first feature point set, and extracting feature points from the image to be identified to obtain a second feature point set; Traversing the first feature points in the first feature point set, each time traversing a first feature point, finding two second feature points closest to the first feature point from the second feature point set, and forming a first matching point pair and a second matching point pair with the two second feature points respectively; the first matching point pair is the optimal matching point pair, and the second matching point pair is the suboptimal matching point pair; Determine a first feature point whose distance ratio between the optimal matching point pair and the suboptimal matching point pair is smaller than a current matching factor as a matching feature point; Starting from the preset lower limit value of the matching ratio, increase to the preset upper limit value according to the first step length, and select the matching factor when the ratio of the matching feature points in the first feature point set matches the current matching ratio, and use the found matching factor as the feature value of the dimension corresponding to the current matching ratio.

3. The data dimensionality reduction method according to claim 2, It is characterized in that The determining of the target dimension from the dimension of the feature matrix comprises: The dimension associated with the first preset algorithm is determined as the target dimension.

4. The data dimensionality reduction method according to claim 2, It is characterized in that The selecting the matching factor when the proportion of the matching feature points in the first feature point set matches the current matching proportion includes: If the current matching ratio is the preset lower limit value, the matching factor is gradually increased according to the second step length starting from the preset minimum factor value until the matching factor is found that makes the ratio of the matching feature points in the first feature point set match the current matching ratio; If the current matching ratio is not the preset lower limit, the matching factor is set to start from the matching factor of the previous matching ratio and gradually decrease according to the second step size until the matching factor is found that matches the ratio of the matching feature points in the first feature point set with the current matching ratio.

5. The data dimensionality reduction method according to claim 1, It is characterized in that The linearizing process of the image feature value of the target dimension includes: An incremental linearization model is used to perform linearization processing on the image feature values ​​of the target dimension.

6. The data dimensionality reduction method according to claim 1, It is characterized in that The step of reducing the dimension of the feature matrix by using the principal component analysis method includes: Normalizing the feature matrix; Calculating the covariance matrix of the normalized feature matrix; Performing eigendecomposition on the covariance matrix to obtain a plurality of eigenvalues ​​and eigenvectors corresponding to the eigenvalues; Selecting a plurality of the eigenvalues ​​from the eigenvalues ​​in order from large to small, so that the cumulative contribution rate of the selected eigenvalues ​​is just greater than the contribution rate threshold; The dimension of the feature matrix is ​​reduced according to the feature vector corresponding to the selected feature value.

7. The data dimensionality reduction method according to claim 6, It is characterized in that The normalizing process of the feature matrix includes: For the data of any dimension of the feature matrix, determine the mean value and standard deviation of the dimension; The mean value is subtracted from each image feature value of the dimension and the resultant value is divided by the standard deviation.

8. A data dimension reduction device, It is characterized in that include: A screenshot module is used to take a screenshot of the target area in the scene graph to obtain a to-be-recognized image; A feature extraction module is used to extract features from the image to be identified to obtain a feature matrix; A linearization module, used to determine a target dimension from the dimensions of the feature matrix, and perform linearization processing on the image eigenvalues ​​of the target dimension; The dimension reduction module is used to reduce the dimension of the feature matrix by using the principal component analysis method.

9. A computer device, It is characterized in that It includes one or more processors and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the data dimensionality reduction method according to any one of claims 1 to 7 are performed.

10. A storage medium, It is characterized in that The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the data dimensionality reduction method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image recognition method and device

    CN105335753A

  • An image registration method and apparatus based on an improved SIFT and hash algorithm

    CN109410255A

  • Dimension reduction parallel image feature matching algorithm fusing principal component analysis and double heap filtering

    CN117218389A

  • Image classification method and system, electronic equipment and storage medium

    CN117333719A

  • Method, system, and computer program product for recognizing face

    US20160371537A1