Inner product matrix retrieval method and device, computer equipment and readable storage medium
By calculating the internal product of the missing vector and the complete internal product matrix eigenvalue distribution in the target dataset, the internal product matrix is corrected, and the problem of low retrieval efficiency and accuracy of the internal product matrix caused by missing data is solved, achieving efficient and accurate Search results.
Patent Information
- Application Number
- CN202410877483.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-11-15
AI Technical Summary
The uncertainty caused by missing data in the prior art affects the accuracy and efficiency of the retrieval when calculating the inner product matrix, and the calculation time of the probability model is long and the efficiency and accuracy are low.
By obtaining the missing vectors in the target dataset, calculating their internal product, combining the eigenvalue distribution of the complete internal product matrix, the target feature value is extracted to correct the missing internal product matrix, and the search efficiency and accuracy are improved.
It realizes efficient and accurate correction of the internal product matrix, improves the efficiency and accuracy of the search, and reduces the impact of missing data on the search results.
Smart Images

Figure CN118964400A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer network technology, and in particular to a method, device, computer equipment and readable storage medium for searching an inner product matrix. Background Art
[0002] Missing data refers to data that is not recorded or has been lost in a database or data set. Equipment failure, network delays, or information omissions may cause data missing. The generation of missing data increases the uncertainty of the inner product matrix calculation, which in turn affects the accuracy of the retrieval of the inner product matrix. Therefore, it is necessary to complete the missing data.
[0003] In the related art, the inner product matrix is generally calculated directly by relying on existing data, or by establishing a probability model to analyze the missing mechanism and data distribution characteristics, thereby inferring the missing values and calculating the inner product matrix. However, the inner product matrix calculated by the former has low accuracy, and the latter may be due to the fact that the data distribution and missing inference mechanism are inconsistent with the actual situation, and the probability model runs too long, resulting in low efficiency and accuracy in inferring the inner product matrix, which in turn leads to low efficiency and accuracy in retrieving the inner product matrix. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a method, device, computer equipment and readable storage medium for searching an inner product matrix, which can improve the efficiency and accuracy of searching the inner product matrix by improving the efficiency and accuracy of inferring the inner product matrix.
[0005] To achieve the above object, a first aspect of an embodiment of the present application proposes a method for retrieving an inner product matrix, the method comprising:
[0006] Acquire a target data set, and determine a plurality of missing vectors having missing values from the target data set;
[0007] By calculating the inner product of any two missing vectors, a missing inner product matrix corresponding to the target data set is obtained; wherein the dimensions of any two missing vectors are the same;
[0008] Determine a complete inner product matrix of the same dimension as the missing inner product matrix from the target data set, and extract a first target eigenvalue from the complete inner product matrix based on the eigenvalue distributions of the missing inner product matrix and the complete inner product matrix;
[0009] Correcting the missing inner product matrix based on the first target eigenvalue to obtain a target inner product matrix;
[0010] According to the target retrieval index, the corresponding matrix elements are searched in the target inner product matrix to obtain the retrieval result corresponding to the target retrieval index.
[0011] Accordingly, a second aspect of an embodiment of the present application proposes a device for searching an inner product matrix, the device comprising:
[0012] An acquisition module, used for acquiring a target data set and determining a plurality of missing vectors having missing values from the target data set;
[0013] A calculation module, configured to obtain a missing inner product matrix corresponding to the target data set by calculating the inner product of any two missing vectors; wherein the dimensions of any two missing vectors are the same;
[0014] an extraction module, configured to determine a complete inner product matrix of the same dimension as the missing inner product matrix from the target data set, and extract a first target eigenvalue from the complete inner product matrix based on the eigenvalue distributions of the missing inner product matrix and the complete inner product matrix;
[0015] A correction module, used for correcting the missing inner product matrix based on the first target eigenvalue to obtain a target inner product matrix;
[0016] The retrieval module is used to retrieve corresponding matrix elements in the target inner product matrix according to the target retrieval index to obtain the retrieval result corresponding to the target retrieval index.
[0017] In some embodiments, the extraction module is further used to:
[0018] Performing eigenvalue decomposition on the missing inner product matrix to obtain a missing diagonal matrix of the missing inner product matrix;
[0019] Determining a second target eigenvalue based on the eigenvalue distribution of the missing diagonal matrix;
[0020] Performing eigenvalue decomposition on the complete inner product matrix to obtain a complete diagonal matrix of the complete inner product matrix;
[0021] Based on the distribution position of the second target eigenvalue in the missing diagonal matrix, the first target eigenvalue is determined from the complete diagonal matrix; wherein the sum of the number of the first target eigenvalue and the second target eigenvalue is equal to the number of eigenvalues of the missing diagonal matrix.
[0022] In some embodiments, the extraction module is further used to:
[0023] Determine a first eigenvalue set and a second eigenvalue set based on the eigenvalue distribution of the missing diagonal matrix; wherein the eigenvalues of the first eigenvalue set are greater than the eigenvalues of the second eigenvalue set;
[0024] The feature values in the first feature value set are used as second target feature values.
[0025] In some embodiments, the correction module is further used to:
[0026] Performing eigendecomposition on the missing inner product matrix to obtain a missing orthogonal matrix, a missing diagonal matrix, and a transposed matrix of the missing orthogonal matrix of the missing inner product matrix;
[0027] Correcting the missing diagonal matrix according to the first target eigenvalue to obtain a target missing diagonal matrix;
[0028] A target inner product matrix is obtained based on the product of the missing orthogonal matrix, the target missing diagonal matrix and a transposed matrix of the missing orthogonal matrix.
[0029] In some implementations, the missing vector includes a first missing vector and a second missing vector, and the calculation module is further configured to:
[0030] Determining a target dimension having non-missing values in both the first missing vector and the second missing vector;
[0031] Based on the target dimension, a first subvector is extracted from the first missing vector, a second subvector is extracted from the second missing vector, and an inner product of the first missing vector and the second missing vector is obtained based on determining an inner product of the first subvector and the second subvector.
[0032] In some implementations, the target search index is a maximum inner product search index; the search module is further used to:
[0033] Obtaining a first target search object;
[0034] According to the maximum inner product search index, the inner products of the first target search object and each matrix element of the target inner product matrix are calculated to obtain a first inner product;
[0035] Determining a first matrix element having a maximum inner product from among the plurality of first inner products;
[0036] The first matrix element is used as the search result corresponding to the target search index.
[0037] In some implementations, the target search index is a nearest neighbor search index; the search module is further used to:
[0038] Acquire a second target search object;
[0039] Calculate the inner product distance between the second target search object and each matrix element in the target inner product matrix according to the nearest neighbor search index;
[0040] A second matrix element corresponding to the smallest inner product distance is determined from the plurality of inner product distances, and the second matrix element is used as a search result corresponding to the target search index.
[0041] Correspondingly, the third aspect embodiment of the present application proposes a computer device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the inner product matrix retrieval method described in any one of the first aspect embodiments of the present application when executing the computer program.
[0042] Correspondingly, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the inner product matrix retrieval method described in any one of the first aspect embodiments of the present application.
[0043] The embodiment of the present application obtains a target data set, and determines multiple missing vectors with missing values from the target data set; obtains a missing inner product matrix corresponding to the target data set by calculating the inner product of any two missing vectors; wherein the dimensions of any two missing vectors are the same; determines a complete inner product matrix of the same dimension as the missing inner product matrix from the target data set, and extracts a first target eigenvalue from the complete inner product matrix based on the eigenvalue distribution of the missing inner product matrix and the complete inner product matrix; corrects the missing inner product matrix based on the first target eigenvalue to obtain a target inner product matrix; retrieves corresponding matrix elements in the target inner product matrix according to the target retrieval index to obtain a retrieval result corresponding to the target retrieval index. In this way, the missing inner product matrix can be efficiently and accurately corrected based on the first target eigenvalue of the complete inner product matrix to obtain a corrected target inner product matrix, and then can be retrieved based on the complete target inner product matrix, thereby improving the efficiency and accuracy of the retrieval of the target inner product matrix. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a schematic diagram of the architecture of the inner product matrix retrieval system provided in an embodiment of the present application;
[0045] Figure 2 is a flowchart of a method for retrieving an inner product matrix provided in an embodiment of the present application;
[0046] Figure 3 is an overall flow chart of the inner product matrix retrieval method provided in an embodiment of the present application;
[0047] Figure 4 It is a functional module diagram of a search device for an inner product matrix provided in an embodiment of the present application;
[0048] Figure 5 It is a schematic diagram of the hardware structure of the computer device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0052] Missing data refers to data that is not recorded or has been lost in a database or data set. Equipment failure, network delays, or information omissions may cause data missing. The generation of missing data increases the uncertainty of the inner product matrix calculation, which in turn affects the accuracy of the retrieval of the inner product matrix. Therefore, it is necessary to complete the missing data.
[0053] In the related art, the inner product matrix is generally calculated directly by relying on existing data, or by establishing a probability model to analyze the missing mechanism and data distribution characteristics, thereby inferring the missing values and calculating the inner product matrix. However, the inner product matrix calculated by the former has low accuracy, and the latter may be due to the data distribution and missing inference mechanism not being consistent with the actual situation, and the probability model running time is too long, resulting in low efficiency and accuracy in inferring the inner product matrix, which in turn leads to low efficiency and accuracy in retrieving the inner product matrix.
[0054] Based on this, the embodiments of the present application provide a method, apparatus, computer device and readable storage medium for searching an inner product matrix, which can improve the efficiency and accuracy of searching the inner product matrix by improving the efficiency and accuracy of inferring the inner product matrix.
[0055] The inner product matrix retrieval method, apparatus, computer device and readable storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the inner product matrix retrieval system in the embodiments of the present application is described.
[0056] Please refer to Figure 1In some implementations, an embodiment of the present application provides a retrieval system for an inner product matrix, and the retrieval system for an inner product matrix includes a terminal 11 and a server 12.
[0057] Specifically, the terminal 11 may be a smart phone, a personal computer, a laptop, a tablet computer, an embedded device or a dedicated data processing device. For example, the terminal 11 may allow the user to input queries, view search results, etc. by running data processing software. The terminal 11 may also display processing progress, allow the user to cancel or pause tasks, provide feedback mechanisms, etc.
[0058] Exemplarily, the server 12 may be a high-performance computer or a cloud server, etc. The server 12 has strong computing capabilities and a large amount of storage space. For example, the server 12 may be used to store a large number of data sets, including target data sets and other related data. The server 12 may also provide necessary computing resources, such as distributed computing, parallel processing, etc., to support the data processing requirements of the terminal 11.
[0059] In some embodiments, the terminal 11 can also be connected to a remote server via a cloud computing service to perform computationally intensive data processing tasks. Similarly, the server 12 can also provide a user interface and interactive functions, and so on.
[0060] The inner product matrix retrieval method in the embodiment of the present application can be illustrated by the following embodiment.
[0061] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first. Moreover, the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or separate consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or separate consent, the necessary user-related data for enabling the normal operation of the embodiment of the present application will be obtained.
[0062] In the embodiment of the present application, the description will be made from the dimension of the inner product matrix retrieval device, which can be specifically integrated in a computer device. Figure 2 , Figure 2 The flowchart of the step of the inner product matrix retrieval method provided in the embodiment of the present application, the embodiment of the present application takes the inner product matrix retrieval device as an example, such as being specifically integrated on a terminal or a server, when the processor on the terminal or the server executes the program instructions corresponding to the inner product matrix retrieval method, the specific process is as follows:
[0063] Step 101: Obtain a target data set, and determine a plurality of missing vectors having missing values from the target data set.
[0064] It is understandable that since missing data may lead to inaccurate retrieval results, it is necessary to obtain missing vectors with missing values from the target data set in order to correct the missing inner product matrix later.
[0065] The target data set may be an offline database or an online database, which may be used to store historical data, reference data or online data. Specifically, the target data set may be a data set collected from the target network, which may include performance status information of network devices, system resources or applications.
[0066] Missing values can be data that is not recorded or cannot be recorded during data collection or storage due to equipment failure, operational errors, data privacy, etc. Missing values can be marked with specific identifiers in the target data set, such as NaN.
[0067] The missing vector can be a vector containing missing values, and the missing vector can be obtained based on the missing data set extracted from the target data set. Specifically, the missing data set can be obtained using It can be a d×n dimensional matrix. The missing data set contains n missing vectors. Each missing vector has d dimensions f1,f2,...,f d , for example, the missing vector can be [1,NaN,3], where NaN represents a missing value.
[0068] Exemplarily, the performance data of multiple servers can be obtained from the offline database. When some performance indicator data of a server is missing, a missing data set can be formed based on the performance indicator data of the server with missing values. Each missing vector can be a grouping vector of the performance indicator data. For example, the performance indicator data can be performance indicator data 1, performance indicator data 2, and performance indicator data 3. Then performance indicator data 1, performance indicator data 2, and performance indicator data 3 correspond to missing vector 1, missing vector 2, and missing vector 3, respectively, and each missing vector has at least one missing value. Since the missing values are very likely to affect the subsequent data analysis and retrieval results, and affect the accuracy of the subsequent data analysis and retrieval results, subsequent missing value completion operations are required.
[0069] Through the above method, at least one missing data set can be determined from the target data set, so as to facilitate the subsequent generation of the missing inner product matrix.
[0070] Step 102, by calculating the inner product of any two missing vectors, a missing inner product matrix corresponding to the target data set is obtained; wherein the dimensions of any two missing vectors are the same.
[0071] It can be understood that since the inner product measures the similarity between samples, the relationship between data can be effectively described by calculating the inner product of any two missing vectors.
[0072] The inner product can be the dot product of two missing vectors, which is an operation between two vectors in the vector space. For example, the missing vector 1 is x=[x1,...x2,...,x d ], the missing vector 2 is y=[y1,...y2,...,y d ], then the inner product of missing vector 1 and missing vector 2 is x·y=x1*y1+x2*y2+…+x d *y d .
[0073] The missing inner product matrix may be an inner product matrix composed of inner products of multiple missing vectors.
[0074] For example, the inner product between any two missing vectors in the missing data set can be calculated to obtain the missing inner product matrix corresponding to multiple missing vectors in the target data set. For example, the missing data set can be extracted from the target data set based on the missing values. The missing data set is a missing sample set. in is a d×n dimensional matrix containing n missing vectors Each missing vector There are d-dimensional numerical values f1,f2,...,f d .
[0075] Furthermore, for any two missing vectors and The inner product of two missing vectors can be calculated. The inner product calculation method has been explained above and will not be repeated here. Afterwards, the missing inner product matrix If the missing sample set is a matrix of d×n dimensions, then the calculated missing inner product matrix is a matrix of n×n dimensions, where the missing inner product matrix S o The matrix element in the i-th row and j-th column of
[0076] For example, for missing vector A, missing vector B and missing vector C, the inner product of any two missing vectors is S(AB), S(AC), S(BC), then the missing inner product matrix S o It can be expressed as:
[0077]
[0078] In the above manner, the missing inner product matrix of the target data set can be calculated to facilitate the subsequent completion of the missing inner product matrix. It can be understood that since the missing values will not affect the calculation results, the calculation of the inner product of any two missing vectors is equivalent to the inner product of the matrix of the two missing vectors in the non-missing value dimension. Thus, the efficiency and accuracy of calculating the inner product of any two missing vectors can be improved. Exemplarily, the "calculating the inner product of any two missing vectors" in step 102 includes:
[0079] (102.1) determining a target dimension that has non-missing values in both the first missing vector and the second missing vector;
[0080] (102.2) Based on the target dimension, extract a first subvector from the first missing vector, extract a second subvector from the second missing vector, and obtain the inner product of the first missing vector and the second missing vector based on determining the inner product of the first subvector and the second subvector.
[0081] The first missing vector may be a vector containing missing values extracted from the missing data set.
[0082] The second missing vector may be a vector containing missing values extracted from the missing data set, and there is no intersection between the first missing vector and the second missing vector.
[0083] Among them, non-missing values can be values relative to missing values. Non-missing values are specific values. For example, if missing values are all represented by NaN, then non-missing values are values with practical significance, such as 2, 3, etc.
[0084] The target dimension can be the set of dimensions that have non-missing values in both the first missing vector and the second missing vector. For example, the first missing vector can be represented by x i Indicates that the second missing vector can be represented by x j When x i =[1,NaN,3,4],x j = [NaN, 2, 3, 5], the dimensions of the non-missing values of the first missing vector are 1, 3, 4, and the dimensions of the non-missing values of the second missing vector are 2, 3, 4, then the target dimension is x i and x j The dimensions that have non-missing values in are 3 and 4. In this case, 3 and 4 are the target dimensions.
[0085] The first sub-vector can be extracted from the first missing vector and contains only non-missing values in the target dimension, that is, the vector of the first missing vector in each target dimension. For example, the first missing vector is x i =[1,NaN,3,4], the target dimensions are 3 and 4, then the first subvector is [3,4].
[0086] The second sub-vector can be extracted from the second missing vector and contains only non-missing values in the target dimension, that is, the vector of the second missing vector in each target dimension. For example, the second missing vector is x j =[NaN,2,3,5], the target dimensions are 3 and 4, then the second subvector is [3,5].
[0087] It can be understood that the inner product of the first missing vector and the second missing vector can be obtained by calculating the product of the corresponding elements of each target dimension in the first subvector and the second subvector, and adding the products of each target dimension. Exemplarily, the first subvector is [3,4] and the second subvector is [3,5], then the inner product of the first subvector and the second subvector is: 3*3+4*5=29.
[0088] Furthermore, in order to map the inner product into a standardized interval, the inner product can be normalized. The specific normalization formula is as follows:
[0089]
[0090] in, Represents the first missing vector and the second missing vector The normalized inner product, d represents the dimensions of the first missing vector and the second missing vector, |I| represents the size of the non-missing value dimension set, where I represents the number of target dimensions, The first subvector, represents the second sub-vector, represents the inner product of the first subvector and the second subvector.
[0091] Through the above method, only the target dimensions without missing values can be considered to calculate the inner product, and the results can be normalized to handle the missing data between samples. In this way, the interference of missing values can be avoided, and the inner product matrix of the missing vector can be calculated quickly and accurately, thereby improving the efficiency and accuracy of the subsequent completion of the missing inner product matrix.
[0092] Step 103: determine a complete inner product matrix of the same dimension as the missing inner product matrix from the target data set, and extract a first target eigenvalue from the complete inner product matrix based on the eigenvalue distributions of the missing inner product matrix and the complete inner product matrix.
[0093] In some embodiments, since the missing inner product matrix and the complete inner product matrix have the same dimension and all come from data in a unified mode, that is, the missing inner product matrix and the complete inner product matrix share eigenvalue information of the same distribution. Based on this, the original eigenvalue distribution of the missing inner product matrix can be estimated by the eigenvalue distribution of the complete inner product matrix, so that the missing values in the missing inner product matrix can be accurately and quickly restored.
[0094] The complete inner product matrix may be an inner product matrix composed of the inner products of multiple complete vectors. The complete vector may be obtained based on the complete data set extracted from the target data set, and is a vector that does not contain missing values. Furthermore, since the complete inner product matrix does not contain missing values, that is, it is not generated based on the missing data set, there is no intersection between the complete inner product matrix and the missing inner product matrix.
[0095] Among them, the eigenvalues can be the individual matrix elements in the missing inner product matrix and the complete inner product matrix. Further, the eigenvalues can be the diagonal elements in the missing diagonal matrix and the complete diagonal matrix. The eigenvalues can be used to reveal the structure and characteristics of the matrix. The missing diagonal matrix and the complete diagonal matrix have similar structures and characteristic distributions.
[0096] The first target eigenvalue may be an eigenvalue extracted from a complete diagonal matrix after eigendecomposition of the complete inner product matrix, and used to complete the missing inner product matrix.
[0097] Specifically, the complete dataset can be used Indicates that the complete dataset is a d×n dimensional matrix, and the dimension of the complete dataset is the same as the dimension of the missing dataset. The complete dataset contains n complete vectors: Each complete vector has d dimensions of values f1,f2,...,f d , for example, when d=3, the complete vector can be [2,4,3].
[0098] Furthermore, the complete inner product matrix can be composed of the inner products of any two complete vectors in the complete data set. For example, complete vector 1: x = [x1, ... x2, ..., x d ], complete vector 2: y = [y1,...y2,...,y d ], then the inner product of the complete vector 1 and the complete vector 2 is x·y=x1*y1+x2*y2+…+x d *y d Furthermore, after calculating the inner product of any two complete vectors in the complete data set, a complete inner product matrix can be formed from multiple inner products.
[0099] Exemplarily, based on the eigenvalue distribution of the missing inner product matrix, important features of the missing diagonal matrix that carry key information and data structure of the missing inner product matrix can be selected for retention, and based on the eigenvalue distribution of the complete inner product matrix, the first target feature other than the distribution position of the important feature can be selected to correct the eigenvalues in the missing inner product matrix.
[0100] For example, if the dimensions of the missing inner product matrix and the complete inner product matrix are both n×n, if the first k eigenvalues are extracted from the missing inner product matrix, then the remaining eigenvalues can be extracted from the complete inner product matrix. The first target eigenvalues from k+1 to n are extracted from the complete inner product matrix, and the second target eigenvalues from k+1 to n of the missing inner product matrix are replaced based on the first target eigenvalues from k+1 to n extracted from the complete inner product matrix.
[0101] In the above manner, the first target eigenvalue can be determined by combining the eigenvalue distributions of the missing inner product matrix and the complete inner product matrix to ensure the integrity and accuracy of the subsequently restored data.
[0102] It can be understood that since both the complete inner product matrix and the missing inner product matrix are determined based on the target data set, the original eigenvalue distribution of the missing inner product matrix can be estimated by the eigenvalue distribution of the complete inner product matrix. The diagonal matrix contains the eigenvalues of the inner product matrix, which represent the main features and intrinsic dimensions of the inner product matrix. Therefore, the diagonal matrix of the missing inner product matrix can be corrected by the complete diagonal matrix of the complete inner product matrix. Further, in the missing diagonal matrix, the important features and specific data structure of the missing diagonal matrix will be characterized by large eigenvalues, and the smaller eigenvalues represent the basic or common patterns in the data. Therefore, the complete diagonal matrix and the missing diagonal matrix often share small eigenvalues. Due to the existence of missing data, redundant data such as noise will be generated, which will affect the small eigenvalues in the missing diagonal matrix. Therefore, the large eigenvalues can be retained to retain the important features and structure of the missing diagonal matrix, and the missing diagonal matrix can be corrected by the small eigenvalues in the complete diagonal matrix, so as to quickly and accurately realize the correction of the missing diagonal matrix, and then realize the correction of the missing inner product matrix. Exemplarily, the step 103 of “extracting the first target eigenvalue from the complete inner product matrix based on the eigenvalue distributions of the missing inner product matrix and the complete inner product matrix” includes:
[0103] (103.1) Perform eigenvalue decomposition on the missing inner product matrix to obtain the missing diagonal matrix of the missing inner product matrix;
[0104] (103.2) determining a second target eigenvalue based on the eigenvalue distribution of the missing diagonal matrix;
[0105] (103.3) Perform eigenvalue decomposition on the complete inner product matrix to obtain a complete diagonal matrix of the complete inner product matrix;
[0106] (103.4) Based on the distribution position of the second target eigenvalue in the missing diagonal matrix, determine the first target eigenvalue from the complete diagonal matrix; wherein the sum of the number of the first target eigenvalue and the second target eigenvalue is equal to the number of eigenvalues of the missing diagonal matrix.
[0107] The missing diagonal matrix may be a diagonal matrix obtained by eigendecomposing the missing inner product matrix.
[0108] Among them, the second target eigenvalue can be an eigenvalue with important information determined according to the distribution of eigenvalues after the missing diagonal matrix is subjected to eigenvalue decomposition. The second target eigenvalue can be determined by observing the eigenvalue distribution of the missing diagonal matrix to determine the presence of obvious gaps or outliers, thereby determining the second target eigenvalue. For example, when the matrix elements of the missing diagonal matrix are 36, 35, 32, 5, 2, 1, 36, 35, 32 can be determined as the second target eigenvalue. In some embodiments, the second target eigenvalue can be determined based on artificial determination or selected according to a model, as long as it does not violate the selection logic of this application.
[0109] The complete diagonal matrix may be a diagonal matrix obtained by performing eigenvalue decomposition on the complete inner product matrix.
[0110] Among them, the first target eigenvalue can be an eigenvalue determined from the complete diagonal matrix to complete the remaining positions of the missing diagonal matrix according to the distribution position of the second target eigenvalue in the missing diagonal matrix. For example, the missing diagonal matrix and the complete diagonal matrix both have n eigenvalues, and the eigenvalues of the missing diagonal matrix and the complete diagonal matrix generally present a distribution characteristic from large to small. When the position distribution of the second target eigenvalue of the missing diagonal matrix is the 1st to kth data, then k+1 to n matrix elements can be determined from the complete diagonal matrix, and the k+1 to n matrix elements in the missing diagonal matrix can be replaced according to the k+1 to n matrix elements determined from the complete diagonal matrix.
[0111] For example, the missing inner product matrix S o By performing eigenvalue decomposition, we can get S o =U o Λ o U oT , where U o is the missing orthogonal matrix; U oT is the transposed matrix of the missing orthogonal matrix; For S oThe missing diagonal matrix (also called the missing eigenvalue matrix) of , the missing diagonal matrix is an n×n dimensional diagonal matrix, the diagonal matrix elements are S o The n eigenvalues of :
[0112] Furthermore, the complete inner product matrix S * By performing eigenvalue decomposition, we can get S * =U * Λ * U *T , where U * is an orthogonal matrix; U *T is the transposed matrix of the complete orthogonal matrix; For S * The complete diagonal matrix is a diagonal matrix of n×n dimensions, and the diagonal matrix elements are S * The n eigenvalues of :
[0113] Further, the dividing value between important eigenvalues and unimportant eigenvalues in the missing diagonal matrix can be determined based on the distribution of each diagonal matrix element of the missing diagonal matrix, and the second target eigenvalue is determined based on the dividing value. For example, when the diagonal matrix elements on the main diagonal of the missing diagonal matrix are (80, 76, 70, 1.1, 0.6, 0), then 1.1 can be determined as the dividing value, and the diagonal matrix elements including the dividing value are all unimportant features disturbed by redundant data. Therefore, 80, 76, 70 can be determined as the second target eigenvalue, and 1.1, 0.6, 0 are the eigenvalues that need to be replaced from the missing diagonal matrix.
[0114] For example, if the diagonal matrix elements on the main diagonal of the complete diagonal matrix are (42, 40, 35, 16, 13, 10), and in the missing diagonal matrix, 80, 76, 70 are located at the 1st, 2nd, and 3rd positions, respectively, and the diagonal matrix elements on the main diagonal of the missing diagonal matrix have a total of 6 positions, therefore, the 4th, 5th, and 6th elements can be selected from the complete diagonal matrix, which are 16, 13, and 10, respectively. Therefore, the diagonal matrix elements on the main diagonal of the corrected missing diagonal matrix are (80, 76, 70, 16, 13, 10).
[0115] It can be understood that in the eigenvalue decomposition, the size of the eigenvalue represents the contribution of the main feature expression of the corresponding eigenvector. The larger eigenvalue represents important feature information, while the smaller eigenvalue may represent common feature information shared by all data sets in the target data set. Since there is no missing data in the complete inner product matrix, the smaller eigenvalue is accurate, while in the missing diagonal matrix, due to the presence of missing values, the missing diagonal matrix will have some redundant data such as noise. Therefore, important features and redundant features often have a more obvious boundary. Based on this, the second target eigenvalue can be determined by the size of the eigenvalue of the missing diagonal matrix. In this way, the remaining eigenvalues can be accurately determined from the complete diagonal matrix of the complete inner product matrix based on the distribution of the second target eigenvalue to ensure that the restored missing inner product matrix is closer to the real inner product matrix. Exemplarily, (103.2) may include:
[0116] (103.2.1) Determine a first eigenvalue set and a second eigenvalue set based on the eigenvalue distribution of the missing diagonal matrix; wherein the eigenvalues of the first eigenvalue set are greater than the eigenvalues of the second eigenvalue set;
[0117] (103.2.2) Use the eigenvalues in the first eigenvalue set as the second target eigenvalues.
[0118] The first eigenvalue set may be at least one eigenvalue extracted from the missing diagonal matrix and having important features and important structures.
[0119] Among them, the second eigenvalue set can be the eigenvalues that need to be replaced in the missing diagonal matrix. Due to the existence of missing values, each eigenvalue in the second eigenvalue set will present a characteristic distribution different from other data in the target data set. Therefore, it is necessary to replace the eigenvalues in the second eigenvalue set of the missing diagonal matrix with the eigenvalues in the complete diagonal matrix.
[0120] Exemplarily, an obvious demarcation value can be determined based on the eigenvalue distribution of the missing diagonal matrix, and the first feature set and the second feature set can be divided based on the demarcation value. For example, if the distribution of each diagonal matrix element of the missing diagonal matrix is (100, 90, 86, 80, 6, 3, 2, 1), then the demarcation value can be determined to be 6, the first feature set is {100, 90, 86, 80}, and 100, 90, 86, 80 are used as the second target eigenvalues, and the second feature set is {6, 3, 2, 1}. It is understandable that in the case where the demarcation value is difficult to determine obviously, it can be manually determined by a technician, and the first feature set and the second feature set are divided accordingly.
[0121] Step 104: Correct the missing inner product matrix based on the first target eigenvalue to obtain a target inner product matrix.
[0122] It can be understood that the missing inner product matrix can be corrected based on the first target eigenvalue extracted from the complete diagonal matrix, so that the missing diagonal matrix can be corrected through the correct eigenvalue, and then the correction of the missing inner product matrix is completed based on the corrected missing diagonal matrix to obtain the target inner product matrix.
[0123] The target inner product matrix may be an inner product matrix after correction processing based on the first target eigenvalues, including important eigenvalues and corrected eigenvalues, and having data integrity, accuracy and reliability.
[0124] In some embodiments, the missing diagonal matrix corresponding to the missing inner product matrix can be corrected based on the first target eigenvalue. Specifically, the missing diagonal matrix can be accurately corrected by retaining an important part of the missing diagonal matrix and replacing the part of the missing diagonal matrix affected by redundant data such as noise with the first target eigenvalue.
[0125] The target inner product matrix can be obtained in the above manner to facilitate subsequent accurate retrieval.
[0126] It is understandable that in order to correct the missing inner product matrix, the missing diagonal matrix of the missing inner product matrix can be corrected. After the missing diagonal matrix is corrected, the target inner product matrix is obtained by multiplying the missing orthogonal matrix, the target missing diagonal matrix and the missing orthogonal matrix, thereby achieving accurate correction of the missing inner product matrix. For example, step 104 may include:
[0127] (104.1) Performing eigendecomposition on the missing inner product matrix to obtain a missing orthogonal matrix, a missing diagonal matrix, and a transposed matrix of the missing orthogonal matrix of the missing inner product matrix;
[0128] (104.2) Correcting the missing diagonal matrix according to the first target eigenvalue to obtain a target missing diagonal matrix;
[0129] (104.3) Based on the product of the missing orthogonal matrix, the target missing diagonal matrix and the transposed matrix of the missing orthogonal matrix, the target inner product matrix is obtained.
[0130] The missing orthogonal matrix may be a real number matrix obtained by performing eigendecomposition on the missing inner product matrix, and the row vectors and column vectors of the missing orthogonal matrix are both unit vectors that are orthogonal to each other.
[0131] The missing diagonal matrix may be a diagonal matrix obtained by performing eigendecomposition on the missing inner product matrix, and the diagonal of the missing diagonal matrix contains eigenvalues and the off-diagonal matrix is zero.
[0132] The transposed matrix of the missing orthogonal matrix may be a matrix obtained by transposing the rows and columns of the missing orthogonal matrix.
[0133] The target missing diagonal matrix may be a matrix obtained by correcting the missing diagonal matrix using the first target eigenvalue determined by the complete diagonal matrix.
[0134] It can be understood that the target inner product matrix can be obtained by calculating the product of the missing orthogonal matrix, the missing diagonal matrix, and the transposed matrix of the missing orthogonal matrix. o By performing eigenvalue decomposition, we can get S o =U o Λ o U iT , where U i is the missing orthogonal matrix; U oT is the transposed matrix of the missing orthogonal matrix; For S o The missing diagonal matrix (also called the missing eigenvalue matrix) of , the missing diagonal matrix is an n×n dimensional diagonal matrix, the diagonal matrix elements are S o The n eigenvalues of :
[0135] Furthermore, the complete inner product matrix S * By performing eigenvalue decomposition, we can get S * =U * Λ * U *T , where U * is an orthogonal matrix; U *T is the transposed matrix of the complete orthogonal matrix; For S * The complete diagonal matrix is a diagonal matrix of n×n dimensions, and the diagonal matrix elements are S * The n eigenvalues of :
[0136] Furthermore, if the matrix elements of the missing diagonal matrix that represent important features are located at the 1st to the kth positions in the matrix elements, then it can be obtained from Λ o Extract Then the first target eigenvalue is in the k+1th to nth positions of the complete diagonal matrix, from Λ * Extracted from The corrected target missing diagonal matrix is
[0137] Furthermore, based on the corrected target missing diagonal matrix, the target inner product matrix can be calculated as Among them, U ois the missing orthogonal matrix; U oT is the transposed matrix of the missing orthogonal matrix.
[0138] By correcting the missing diagonal matrix, the important characteristic parts in the missing diagonal matrix can be retained, that is, the parts closer to the true value can be retained. For the parts with inaccurate eigenvalues in the missing diagonal matrix, correction can be made based on the first target eigenvalue in the complete diagonal matrix, thereby achieving correction of the missing inner product matrix.
[0139] Step 105, searching for corresponding matrix elements in the target inner product matrix according to the target search index, and obtaining a search result corresponding to the target search index.
[0140] In some embodiments, in order to efficiently determine data similar to the search object or samples with a neighbor relationship in the target data set, so as to be applied to tasks such as data processing, pattern recognition, and recommendation systems in various fields, and to help realize the intelligence and personalization of data analysis and applications, the search can be performed in the corrected target inner product matrix according to the corresponding target search index to quickly and accurately obtain the search results.
[0141] Among them, the target retrieval index can be a maximum inner product retrieval index, a nearest neighbor retrieval index, sorting, recommendation, etc. The target retrieval index is a retrieval task, and the system can perform corresponding retrieval based on the target retrieval index.
[0142] Furthermore, when the target search index is the maximum inner product search index, the inner product of each matrix element in the first search object and the target inner product matrix can be calculated to determine the first matrix element with the largest inner product, and use the matrix element as the search result.
[0143] Furthermore, when the target retrieval index is a nearest neighbor retrieval index, the inner product distance between the second retrieval object and each matrix element in the target inner product matrix can be calculated to determine the first matrix element with the smallest inner product distance, and use the matrix element as the retrieval result.
[0144] It is understandable that if the entire target data set needs to be searched, the target inner product matrix and the complete inner product matrix can be searched at the same time according to the target search index to obtain the corresponding search results. If only the accurately corrected target inner product matrix needs to be searched, only the target inner product matrix can be searched.
[0145] The above methods can help the system complete specific retrieval tasks more accurately and improve user experience and system performance.
[0146] It is understandable that in order to find the vector with the maximum inner product in the target inner product matrix, so as to be used in the fields of related recommendation in the system, similarity matching in information retrieval, text similarity retrieval in natural language processing, etc., the target inner product matrix can be searched for the maximum inner product, so as to realize efficient recommendation tasks. Exemplarily, step 105 may include:
[0147] (105.a1) Obtain the first target search object;
[0148] (105.a2) according to the maximum inner product search index, calculating the inner products of the first target search object and each matrix element of the target inner product matrix, and obtaining a first inner product;
[0149] (105.a3) determining a first matrix element having a maximum inner product from among the plurality of first inner products;
[0150] (105.a4) Using the first matrix element as the search result corresponding to the target search index.
[0151] The first search object may refer to an object that needs to be queried and identified in target detection or similarity search. The first search object may be a vector or a feature descriptor, which is used to represent a certain entity or data point.
[0152] The maximum inner product search index may be an index for finding a matrix element that maximizes the inner product value in a target inner product matrix. After the matrix element with the maximum inner product is determined from the target inner product matrix, it indicates that the system has achieved the maximum inner product search index.
[0153] The first inner product may be the inner product result of the first target search object and each matrix element in the target inner product matrix.
[0154] Among them, the first matrix element can be the matrix element with the largest inner product in the target inner product matrix, that is, the matrix element most similar to the first target retrieval index.
[0155] Exemplarily, assuming that the first search object is a set of user behavior data, each behavior data can be converted into an embedding vector, and each embedding vector represents the user's interest or preference. Afterwards, the embedding vector of each user behavior data and the target inner product matrix can be calculated according to the maximum inner product search index to obtain multiple first inner products. Furthermore, the first matrix element with the maximum inner product can be determined by comparing all the calculated first inner products.
[0156] Furthermore, the first inner product between the first matrix element and the currently queried user behavior data is the largest, indicating that the first matrix element is most similar to the user behavior data. Therefore, the first matrix element can be used as the retrieval result, thereby determining the user group or behavior pattern that best matches the currently queried user behavior pattern from the target inner product matrix.
[0157] In some implementations, each matrix element in the target inner product matrix may also be compared, and the largest matrix element, that is, the largest inner product, is taken as the search result.
[0158] In the above manner, the similarity between the two vectors can be measured by comparing the first inner product between the two vectors. The larger the first inner product, the more similar the two vectors are. By determining the matrix element with the largest first inner product with the first target retrieval object from the target inner product matrix, it helps to improve the accuracy of similarity matching and the efficiency and accuracy of information retrieval, thereby enhancing the user experience.
[0159] It is understandable that in order to determine the object closest to the query vector in the feature space from the first inner product matrix, and to determine the matrix element closest to the query vector in the feature space, retrieval can be performed by calculating the inner product distance between the query vector and each matrix element in the first inner product matrix, so as to facilitate database retrieval, data deduplication, anomaly detection, image recognition and other fields. For example, step 105 may also include:
[0160] (105.b1) Obtain the second target search object;
[0161] (105.b2) Calculate the inner product distance between the second target search object and each matrix element in the target inner product matrix according to the nearest neighbor search index;
[0162] (105.b3) Determine the second matrix element corresponding to the smallest inner product distance from multiple inner product distances, and use the second matrix element as the search result corresponding to the target search index.
[0163] The second target retrieval object may be an object that needs to be queried and identified in the retrieval task, and the second target retrieval object may be a vector or a feature descriptor.
[0164] The nearest neighbor search index may be a search target, that is, a search target for determining the inner product matrix of the second target search object and the target.
[0165] The inner product distance may be the similarity between the second target search object and each matrix element in the target inner product matrix. The inner product distance may be calculated by Euclidean distance and cosine similarity.
[0166] Exemplarily, assuming that the target database is an image database, the target inner product matrix is generated based on the image database. The second target retrieval object is image A, and the nearest neighbor retrieval index is to determine the image most similar to image A from the target inner product matrix.
[0167] Furthermore, the inner product distance between image A and each matrix element can be determined by calculating the Euclidean distance between image A and each matrix element in the target inner product matrix. For example, if the Euclidean distance between image A and matrix element 1 is 3, the Euclidean distance between image A and matrix element 2 is 4, the Euclidean distance between image A and matrix element 3 is 3, and the Euclidean distance between image A and matrix element 4 is 2, then the minimum inner product distance can be determined to be 2, and matrix element 4 can be used as the search result corresponding to the target search index.
[0168] Through the above method, the matrix elements most similar to the query items can be effectively found from a large amount of data, thereby achieving efficient and accurate nearest neighbor retrieval.
[0169] Please refer to Figure 3 , this application combines Figure 3 The overall process is introduced. First, the target data set of the target network is collected and the target data set is tested. When missing data is detected in the target data set, the missing data set and the complete data set are divided, and the inner product of any two missing vectors is calculated based on multiple missing vectors in the missing data set to obtain the missing inner product matrix corresponding to the target data set. Furthermore, the inner product of any two complete vectors can be calculated based on the complete vectors of the complete data set to obtain the complete inner product matrix corresponding to the target data set. Furthermore, eigendecomposition can be performed based on the complete inner product matrix and the missing inner product matrix to obtain a complete diagonal matrix and a missing diagonal matrix.
[0170] It can be understood that due to the presence of missing values in the missing data set, the important structural features in the missing inner product matrix will show a clear boundary with the unimportant structural features. Therefore, the unimportant structural features of the missing diagonal matrix can be corrected based on the first target eigenvalue of the complete diagonal matrix to obtain the target inner product matrix.
[0171] Furthermore, similarity search can be performed on the missing data set based on the target inner product matrix according to the target retrieval index. Similarly, similarity search can be performed on the complete data set based on the complete inner product matrix, or similarity search can be performed on the target data set based on both the target inner product matrix and the complete inner product matrix, and so on.
[0172] The embodiment of the present application obtains a target data set, and determines multiple missing vectors with missing values from the target data set; obtains a missing inner product matrix corresponding to the target data set by calculating the inner product of any two missing vectors; wherein the dimensions of any two missing vectors are the same; determines a complete inner product matrix of the same dimension as the missing inner product matrix from the target data set, and extracts a first target eigenvalue from the complete inner product matrix based on the eigenvalue distribution of the missing inner product matrix and the complete inner product matrix; corrects the missing inner product matrix based on the first target eigenvalue to obtain a target inner product matrix; retrieves corresponding matrix elements in the target inner product matrix according to the target retrieval index to obtain a retrieval result corresponding to the target retrieval index. In this way, the missing inner product matrix can be efficiently and accurately corrected based on the first target eigenvalue of the complete inner product matrix to obtain a corrected target inner product matrix, and then can be retrieved based on the complete target inner product matrix, thereby improving the efficiency and accuracy of the retrieval of the target inner product matrix.
[0173] See also Figure 4 The embodiment of the present application further provides a device for searching an inner product matrix, which can implement the above-mentioned method for searching an inner product matrix. The device for searching an inner product matrix includes:
[0174] An acquisition module 41 is used to acquire a target data set and determine a plurality of missing vectors having missing values from the target data set;
[0175] A calculation module 42 is used to obtain a missing inner product matrix corresponding to the target data set by calculating the inner product of any two missing vectors; wherein the dimensions of any two missing vectors are the same;
[0176] An extraction module 43 is used to determine a complete inner product matrix of the same dimension as the missing inner product matrix from the target data set, and extract a first target eigenvalue from the complete inner product matrix based on the eigenvalue distributions of the missing inner product matrix and the complete inner product matrix;
[0177] A correction module 44, configured to correct the missing inner product matrix based on the first target eigenvalue to obtain a target inner product matrix;
[0178] The retrieval module 45 is used to retrieve corresponding matrix elements in the target inner product matrix according to the target retrieval index to obtain the retrieval result corresponding to the target retrieval index.
[0179] The specific implementation of the inner product matrix retrieval device is basically the same as the specific implementation of the inner product matrix retrieval method described above, and will not be repeated here. On the premise of meeting the requirements of the embodiment of the present application, the inner product matrix retrieval device can also be provided with other functional modules to implement the inner product matrix retrieval method in the above embodiment.
[0180] The embodiment of the present application also provides a computer device, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the above inner product matrix retrieval method when executing the computer program. The computer device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0181] See also Figure 5 , Figure 5 The hardware structure of a computer device according to another embodiment is shown, and the computer device includes:
[0182] The processor 51 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0183] The memory 52 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 52 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 52, and the processor 51 calls and executes the inner product matrix retrieval method of the embodiment of the present application;
[0184] Input / output interface 53, used to implement information input and output;
[0185] The communication interface 54 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0186] A bus 55 that transmits information between the various components of the device (e.g., the processor 51, the memory 52, the input / output interface 53, and the communication interface 54);
[0187] The processor 51 , the memory 52 , the input / output interface 53 and the communication interface 54 are connected to each other in communication within the device via a bus 55 .
[0188] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned inner product matrix retrieval method.
[0189] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0190] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0191] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0192] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0193] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0194] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0195] It should be understood that in the present application, "at least one (item)" and "several" refer to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0196] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0197] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0198] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0199] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0200] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for retrieving inner product matrix, It is characterized in that The method comprises: Acquire a target data set, and determine a plurality of missing vectors having missing values from the target data set; By calculating the inner product of any two missing vectors, a missing inner product matrix corresponding to the target data set is obtained; wherein the dimensions of any two missing vectors are the same; Determine a complete inner product matrix of the same dimension as the missing inner product matrix from the target data set, and extract a first target eigenvalue from the complete inner product matrix based on the eigenvalue distributions of the missing inner product matrix and the complete inner product matrix; Correcting the missing inner product matrix based on the first target eigenvalue to obtain a target inner product matrix; According to the target retrieval index, the corresponding matrix elements are searched in the target inner product matrix to obtain the retrieval result corresponding to the target retrieval index.
2. The inner product matrix retrieval method according to claim 1, It is characterized in that The extracting a first target eigenvalue from the complete inner product matrix based on the eigenvalue distributions of the missing inner product matrix and the complete inner product matrix comprises: Performing eigenvalue decomposition on the missing inner product matrix to obtain a missing diagonal matrix of the missing inner product matrix; Determining a second target eigenvalue based on the eigenvalue distribution of the missing diagonal matrix; Performing eigenvalue decomposition on the complete inner product matrix to obtain a complete diagonal matrix of the complete inner product matrix; Based on the distribution position of the second target eigenvalue in the missing diagonal matrix, the first target eigenvalue is determined from the complete diagonal matrix; wherein the sum of the number of the first target eigenvalue and the second target eigenvalue is equal to the number of eigenvalues of the missing diagonal matrix.
3. The inner product matrix retrieval method according to claim 2, It is characterized in that The determining of a second target eigenvalue based on the eigenvalue distribution of the missing diagonal matrix comprises: Determine a first eigenvalue set and a second eigenvalue set based on the eigenvalue distribution of the missing diagonal matrix; wherein the eigenvalues of the first eigenvalue set are greater than the eigenvalues of the second eigenvalue set; The feature values in the first feature value set are used as second target feature values.
4. The inner product matrix retrieval method according to claim 1, It is characterized in that The correcting the missing inner product matrix based on the first target eigenvalue to obtain a target inner product matrix includes: Performing eigendecomposition on the missing inner product matrix to obtain a missing orthogonal matrix, a missing diagonal matrix, and a transposed matrix of the missing orthogonal matrix of the missing inner product matrix; Correcting the missing diagonal matrix according to the first target eigenvalue to obtain a target missing diagonal matrix; A target inner product matrix is obtained based on the product of the missing orthogonal matrix, the target missing diagonal matrix and a transposed matrix of the missing orthogonal matrix.
5. The inner product matrix retrieval method according to claim 1, It is characterized in that The missing vectors include a first missing vector and a second missing vector, and the calculating the inner product of any two missing vectors includes: Determining a target dimension having non-missing values in both the first missing vector and the second missing vector; Based on the target dimension, a first subvector is extracted from the first missing vector, a second subvector is extracted from the second missing vector, and an inner product of the first missing vector and the second missing vector is obtained based on determining an inner product of the first subvector and the second subvector.
6. The inner product matrix retrieval method according to claim 1, It is characterized in that The target retrieval index is a maximum inner product retrieval index; searching for corresponding matrix elements in the target inner product matrix according to the target retrieval index to obtain a retrieval result corresponding to the target retrieval index includes: Obtaining a first target search object; According to the maximum inner product search index, the inner products of the first target search object and each matrix element of the target inner product matrix are calculated to obtain a first inner product; Determining a first matrix element having a maximum inner product from among the plurality of first inner products; The first matrix element is used as the search result corresponding to the target search index.
7. The inner product matrix retrieval method according to claim 1, It is characterized in that The target retrieval index is a nearest neighbor retrieval index; searching for corresponding matrix elements in the target inner product matrix according to the target retrieval index to obtain a retrieval result corresponding to the target retrieval index also includes: Acquire a second target search object; Calculate the inner product distance between the second target search object and each matrix element in the target inner product matrix according to the nearest neighbor search index; A second matrix element corresponding to the smallest inner product distance is determined from the plurality of inner product distances, and the second matrix element is used as a search result corresponding to the target search index.
8. A search device for an inner product matrix, It is characterized in that The device comprises: An acquisition module, used for acquiring a target data set and determining a plurality of missing vectors having missing values from the target data set; A calculation module, configured to obtain a missing inner product matrix corresponding to the target data set by calculating the inner product of any two missing vectors; wherein the dimensions of any two missing vectors are the same; an extraction module, configured to determine a complete inner product matrix of the same dimension as the missing inner product matrix from the target data set, and extract a first target eigenvalue from the complete inner product matrix based on the eigenvalue distributions of the missing inner product matrix and the complete inner product matrix; A correction module, used for correcting the missing inner product matrix based on the first target eigenvalue to obtain a target inner product matrix; The retrieval module is used to retrieve corresponding matrix elements in the target inner product matrix according to the target retrieval index to obtain the retrieval result corresponding to the target retrieval index.
9. A computer device, It is characterized in that The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the inner product matrix retrieval method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the inner product matrix retrieval method according to any one of claims 1 to 7 is implemented.
