Keyword matching method, information search method and device applied to information search
By constructing and dimensionality reduction adjacency matrix processing, the accuracy and reliability of matching search terms and keywords in the big data environment are solved, and efficient information search is achieved.
Patent Information
- Application Number
- CN202110315277.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-24
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2041-03-24
AI Technical Summary
In the prior art, due to the large amount of data and high dimensions, the accuracy and reliability of matching search terms with keywords is low, and the calculation process is cumbersome and resource consumption is high.
A neighbor matrix is constructed that represents the click relationship between search terms and keywords, and a neighbor matrix is dimensionally reduced to generate a matching relationship.
It improves the accuracy and reliability of matching search terms with keywords, reduces calculation complexity and resource consumption, and improves the efficiency and accuracy of information search.
Smart Images

Figure CN112989170B_ABST
Abstract
Description
Technical Field
[0001] This application relates to big data and intelligent search in artificial intelligence, and particularly to a keyword matching method, an information search method, and a device applied to information search. Background Art
[0002] With the development of technologies such as the Internet and artificial intelligence, and the continuous increase in the amount of information, how to improve the method of matching search terms and keywords to meet the search needs of users has become an urgent problem to be solved.
[0003] In the prior art, the commonly used keyword matching method applied to information search is as follows: mining search data offline, extracting each search term and each keyword from the search data, determining the relevance (such as the similarity degree) between each search term and each keyword through Euclidean distance or cosine distance, and determining the search terms and keywords with a similarity degree greater than a preset similarity degree threshold as the words with a matching relationship.
[0004] However, with the rapid increase in the amount of data, the number of search terms and keywords is relatively large, and the data dimension is high. If the above method is used, there may be a problem that the accuracy and reliability of the determined words with a matching relationship are relatively low due to the large amount of data and high dimension. Summary of the Invention
[0005] This application provides a keyword matching method, an information search method, and a device applied to information search for improving the matching reliability between search terms and keywords.
[0006] According to the first aspect of this application, a keyword matching method applied to information search is provided, including:
[0007] Obtaining sample data, and determining an adjacency matrix according to the sample data, where the sample data includes each search term and each keyword with a click relationship, and the adjacency matrix is a matrix representing the click relationship between each word in the sample data;
[0008] Performing dimensionality reduction processing on the adjacency matrix to obtain a matching relationship between search terms and keywords;
[0009] Wherein, the matching relationship is used to perform keyword search matching on the to-be-searched term.
[0010] According to the second aspect of this application, an information search method is provided, including
[0011] Receiving a search request, where the to-be-searched term is carried in the search request;
[0012] Determine a target keyword corresponding to the to-be-searched term according to the matching relationship, where the matching relationship is generated based on the method described in the first aspect;
[0013] Perform information search based on the target keyword, and obtain and output a search result corresponding to the target keyword.
[0014] According to the third aspect of the present application, there is provided a keyword matching device applied to information search, including:
[0015] An acquisition unit for acquiring sample data, where the sample data includes each search term and each keyword having a click relationship;
[0016] A first determination unit for determining an adjacency matrix according to the sample data, where the adjacency matrix is a matrix representing the click relationship between each word in the sample data;
[0017] A dimensionality reduction unit for performing dimensionality reduction processing on the adjacency matrix to obtain a matching relationship between the search term and the keyword;
[0018] Wherein, the matching relationship is used to perform keyword search matching on the to-be-searched term.
[0019] According to the fourth aspect of the present application, there is provided an information search device, including
[0020] A receiving unit for receiving a search request, where the search request carries a to-be-searched term;
[0021] A second determination unit for determining a target keyword corresponding to the to-be-searched term according to the matching relationship, where the matching relationship is generated based on the method described in the first aspect;
[0022] A search unit for performing information search based on the target keyword to obtain a search result corresponding to the target keyword;
[0023] An output unit for outputting the search result.
[0024] According to the fifth aspect of the present application, there is provided an electronic device, including:
[0025] At least one processor; and
[0026] A memory communicatively connected to the at least one processor; wherein,
[0027] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect; or,
[0028] to enable the at least one processor to execute the method described in the second aspect.
[0029] According to a sixth aspect of the present application, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method described in the first aspect; or,
[0030] the computer instructions are used to cause the computer to execute the method described in the second aspect.
[0031] According to a seventh aspect of the present application, there is provided a computer program product, the program product including: a computer program, the computer program being stored in a readable storage medium, and at least one processor of an electronic device being able to read the computer program from the readable storage medium, and the at least one processor executing the computer program causing the electronic device to execute the method described in the first aspect or the second aspect.
[0032] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings are used to better understand the solution and do not constitute a limitation to the present application. Among them:
[0034] Figure 1 is a schematic diagram according to the first embodiment of the present application;
[0035] Figure 2 is a schematic diagram according to the second embodiment of the present application;
[0036] Figure 3 is a schematic diagram of the undirected graph of this embodiment;
[0037] Figure 4 is a schematic diagram according to the third embodiment of the present application;
[0038] Figure 5 is a schematic diagram of an application scenario to which the information search method of the embodiment of the present application can be applied;
[0039] Figure 6 is a schematic diagram according to the fourth embodiment of the present application;
[0040] Figure 7 is a schematic diagram according to the fifth embodiment of the present application;
[0041] Figure 8 is a schematic diagram according to the sixth embodiment of the present application;
[0042] Figure 9It is a schematic diagram according to the seventh embodiment of the present application;
[0043] Figure 10 It is a schematic diagram according to the eighth embodiment of the present application;
[0044] Figure 11 It is a schematic diagram according to the ninth embodiment of the present application;
[0045] Figure 12 It is a schematic diagram of an electronic device according to an embodiment of the present application. Detailed implementation manners
[0046] The following describes exemplary embodiments of the present application with reference to the accompanying drawings. Various details of the embodiments of the present application are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0047] It should be understood that with the informatization development of technologies in various industries, the amount of information has increased by leaps and bounds, fully entering the era of Internet big data, and the dimension of data has also developed from one-dimensional to multi-dimensional. Correspondingly, how to achieve efficient and rapid search of information has become an urgent problem to be solved. In response to the demand for efficient and rapid search, how to improve the method of matching between search terms and keywords to meet the search needs of users has become a key problem.
[0048] In related technologies, the keyword matching methods commonly used in information search can include two types. The first method is: offline mining of high-frequency data. High-frequency data refers to search terms and keywords with relatively high usage frequencies in search scenarios. The search terms and keywords are input into a pre-trained offline bidirectional encoding model (Bidirectional Encoder Representations from Transformers, BERT), and the expression information of the search terms and keywords is output, so as to determine the keywords that have a matching relationship with the search terms. Among them, the training method of the offline BERT model can be achieved by collecting sample data (including search terms and keywords for training). For the specific implementation principle, reference can be made to the description of related technologies, which will not be elaborated here.
[0049] However, when using this method, on the one hand, since the sample data has a certain representativeness and considering training efficiency and resource consumption, etc., the offline BERT generated by training is very likely to be restricted by the sample data, resulting in insufficient training of the offline BERT model and limited expressive ability, thus leading to the problem of low accuracy of the matching relationship determined based on the offline BERT; on the other hand, since the search terms and keywords used are determined based on frequency, generally, it is necessary to continuously increase data or continuously iterate, etc. to improve the supply for the offline BERT model, otherwise it may lead to low accuracy and timeliness of the determined matching relationship, thus affecting the reliability of the search.
[0050] The second method is: Offline mining of search data, performing natural language processing (NLP) on each word in the search data, such as semantic analysis, etc. Based on the semantic analysis results, the similarity degree between each search term and each keyword in the search data is calculated, such as calculating the similarity degree between each search term and each keyword through the Euclidean distance or cosine distance, and determining the matching relationship between the search term and the keyword based on the similarity degree. For example, the search terms and keywords with a similarity degree greater than the preset similarity degree threshold can be determined as words with a matching relationship.
[0051] However, when using this method, due to the relatively large number of search terms and keywords and the high data dimension, there may be problems of relatively low accuracy and reliability of the determined words with a matching relationship due to the large amount of data and high dimension, and the calculation process is relatively cumbersome, and there may be problems of high resource consumption and low accuracy.
[0052] To solve at least one of the above technical problems, the inventor of the present application has obtained the inventive concept of the embodiments of the present application through creative labor: constructing an adjacency matrix representing the click relationship between each search term and each keyword, and performing dimensionality reduction processing on the adjacency matrix, thereby obtaining the matching relationship between the search term and the keyword.
[0053] Based on the above inventive concept, the present application provides a keyword matching method, an information search method and an apparatus applied to information search, which are applied to big data and intelligent search in the field of artificial intelligence to achieve the accuracy and reliability of determining the matching relationship, and achieve the accuracy and reliability of information search.
[0054] Figure 1 It is a schematic diagram according to the first embodiment of the present application. As Figure 1 shown, the keyword matching method applied to information search according to the embodiments of the present application includes:
[0055] S101: Obtain sample data.
[0056] Among them, the sample data includes each search term and each keyword with a click relationship.
[0057] Exemplarily, the execution subject of this embodiment can be a keyword matching device applied to information search (hereinafter referred to as the matching device). The matching device can be a server (such as a local server or a cloud server. Considering the running efficiency, storage space, and convenience of data collection, a cloud server is preferably used), or a terminal device, or a processor, or a chip. This embodiment does not make any limitations.
[0058] It should be understood that this embodiment does not make any limitations on the method and quantity of the sample data collected by the matching device.
[0059] For example, the matching device can extract the search logs within the most recent time period (such as within the most recent month) from the pre-stored search logs, and offline mine the sample data of each search term and each keyword with a click relationship. For example, the scale of the search terms (queries) is one hundred million, and the scale of the keywords (bidwords) is one billion, etc.
[0060] In some embodiments, based on the extracted search logs within the most recent time period, filtering processing can be performed on some search terms and / or some keywords, such as filtering duplicate search terms and keywords, filtering search terms and / or keywords that do not have general searches (that is, the searched search terms and / or keywords hardly appear again, etc.). There are no more examples listed here.
[0061] Determining the sample data through filtering can make the sample data have high general adaptability, thereby improving the universality of the subsequent determined matching relationship, and can achieve the technical effect of improving the efficiency of determining the matching relationship.
[0062] S102: Determine an adjacency matrix according to the sample data.
[0063] Among them, the adjacency matrix is a matrix representing the click relationship between each word in the sample data.
[0064] In this embodiment, the adjacency matrix is determined based on the sample data and can represent the click relationship between each word, that is, the adjacency matrix can be a matrix representing the click relationship between each search term and each keyword.
[0065] S103: Perform dimensionality reduction processing on the adjacency matrix to obtain the matching relationship between the search term and the keyword.
[0066] Among them, the matching relationship is used to perform keyword search matching on the to-be-searched term.
[0067] In this embodiment, the following are introduced: constructing an adjacency matrix representing the click relationship between each search term and each keyword, and performing dimensionality reduction processing on the adjacency matrix to obtain the characteristics of the matching relationship. On the one hand, it can avoid problems such as low accuracy of the determined matching relationship caused by the first method above, and can avoid problems such as low efficiency caused by the second method above; on the other hand, by performing dimensionality reduction processing on the adjacency matrix, while the data can be limited in dimension to a certain extent, the click relationship between each search term and each keyword can be maintained without being affected, so that the determined matching relationship can relatively accurately represent the corresponding relationship between each search term and each keyword, that is, for any search term, the determined corresponding keyword has high accuracy and reliability.
[0068] Figure 2 is a schematic diagram according to the second embodiment of the present application, as Figure 2 shown, the keyword matching method applied to information search in the embodiment of the present application includes:
[0069] S201: Obtain sample data.
[0070] Among them, the sample data includes each search term and each keyword with a click relationship.
[0071] Exemplarily, for the description of S201, reference can be made to S101, which will not be elaborated here.
[0072] S202: Construct an undirected graph according to the sample data.
[0073] Among them, the undirected graph includes multiple nodes and multiple edges. One node corresponds to one search term or one keyword, and the edge between any two nodes corresponds to the click relationship.
[0074] Exemplarily, as Figure 3 shown, the undirected graph may include multiple nodes, and one node may be a search term or a keyword.
[0075] If one node (such as Figure 3 node A shown in Figure 3 ) is a search term, and another node (such as node B shown in
[0076] ) is a keyword, and there is a click relationship between the search term and the keyword, then an edge can be constructed between node A and node B, and through the edge between node A and node B, it is represented that there is a click relationship between node A and node B. Figure 3
[0077] For example, asFigure 3 As shown, if node A is search term a, node B is keyword b, and based on the click relationship, it is known that the number of clicks between search term a and keyword b is 1, then the weight of the edge between node A and node B is 1. Similarly, the weight of the edge between node A and node C can be obtained as 8, the weight of the edge between node A and node D is 3, the weight of the edge between node A and node E is 5, and so on. By analogy, they will not be listed one by one here.
[0078] S203: Generate an adjacency matrix according to the undirected graph.
[0079] Among them, the adjacency matrix is a matrix representing the click relationship between each node in the undirected graph.
[0080] Exemplarily, if the undirected graph includes N nodes and M edges, that is, the number of search terms and keywords in the sample data is N, and the number of search terms and keywords with click relationships in the sample data is M, then the adjacency matrix A can be represented by Equation 1. Equation 1:
[0081]
[0082] Among them, the adjacency matrix can be understood as an N-dimensional and N-column matrix space.
[0083] It should be noted that, in this embodiment, by constructing an undirected graph based on the sample data, the undirected graph can quickly and effectively express the click relationship between each search term and keyword, and can accurately express the click relationship between each search term and keyword. Therefore, generating an adjacency matrix based on the undirected graph can improve the accuracy and reliability of generating the adjacency matrix, and can improve the technical effect of the efficiency of generating the adjacency matrix. Especially when generating the adjacency matrix in combination with weights, it can further improve the reliable and accurate expression of the relationship between each search term and each keyword by the adjacency matrix.
[0084] S204: Perform dimensionality reduction processing on the adjacency matrix to obtain a vector text.
[0085] Among them, the vector text includes: a search term vector corresponding to each search term and a keyword vector corresponding to each keyword.
[0086] In some embodiments, S204 may include the following steps:
[0087] Step 1: Randomly generate a Gaussian distribution matrix.
[0088] In this embodiment, there is no limitation on the randomly generated Gaussian distribution matrix, and the parameters can be randomly selected.
[0089] For example, the matching device randomly selects parameters for generating the Gaussian distribution matrix, and the Gaussian distribution matrix generated based on the randomly selected parameters is Among them, k is a randomly selected parameter.
[0090] Step 2: Perform dimensionality reduction on the adjacency matrix based on the Gaussian distribution matrix to obtain vector text.
[0091] For example, the adjacency matrix can be mapped to a Gaussian distribution matrix of k dimensions.
[0092] It should be noted that, in this embodiment, by randomly generating the Gaussian distribution matrix so as to perform dimensionality reduction on the adjacency matrix based on the Gaussian distribution matrix, the time complexity can be reduced, the efficiency of determining the matching relationship can be made higher, and higher flexibility of the dimensionality reduction processing can be achieved. Moreover, since the Gaussian distribution matrix is randomly generated, when the matching device performs dimensionality reduction on the adjacency matrix based on the randomly generated Gaussian distribution matrix, problems such as data interference and loss caused by dimensionality reduction can be avoided, thereby improving the technical effects of the accuracy and reliability of the dimensionality reduction. And, especially for large-scale data scenarios, through the method of this embodiment, since the time complexity is relatively low and the calculation is relatively fast, therefore, especially when the method of this embodiment is applied to the determination of the matching relationship between large-scale search terms and keywords, the technical effects of significantly improving efficiency and saving resources can be achieved.
[0093] In some embodiments, Step 2 may include the following sub-steps:
[0094] Sub-step 1: Orthogonalize the Gaussian distribution matrix to obtain an orthogonal matrix.
[0095] Exemplarily, the Gaussian distribution matrix can be orthogonalized through Schmidt orthogonalization to obtain an orthogonal matrix, that is, the projection principle can be used to construct a new orthogonal basis based on the standard orthogonal basis (the orthogonal basis used as the projection basis in the related art).
[0096] For example, if is an inner product space of dimension n, is a k-dimensional subspace of, whose orthogonal basis is {η1,..., η k}, and v is not in . Then the difference β between v and its projection on can be determined by Equation 2:
[0097]
[0098] where k is orthogonal to the subspace , that is, β is orthogonal to the orthogonal basis η1 of .
[0099] Taking v1 as an example, v1 = Rk×1 The Schmidt orthogonal basis on v0 can be represented by Equation 3. Equation 3:
[0100]
[0101] And so on, which will not be listed one by one here.
[0102] Then, the Gaussian distribution matrix is orthonormalized to obtain an orthogonal matrix.
[0103] Sub-step 2: Based on the orthogonal matrix, the adjacency matrix is dimensionally reduced to obtain vector text.
[0104] Exemplarily, the dimensionality reduction process can be understood as projecting the adjacency matrix onto the orthogonal matrix, and specifically, it can be understood as the multiplication of two matrices, that is, the orthogonal matrix multiplied by the adjacency matrix, to obtain the matrix after dimensionality reduction, and based on the matrix after dimensionality reduction, vector text is obtained.
[0105] It should be noted that in this embodiment, by orthonormalizing the Gaussian distribution matrix, an orthonormalized matrix is obtained, so as to dimensionally reduce the adjacency matrix based on the orthonormalized matrix. Since each dimension in the orthonormalized matrix is orthogonal, the data between each dimension has a high degree of mutual independence, so that when the matching device dimensionally reduces the adjacency matrix, the related interference between each data can be avoided, and the technical effects of improving the accuracy and reliability of dimensionality reduction are achieved.
[0106] S205: Generate a matching relationship according to each search term vector and each keyword vector in the vector text.
[0107] Among them, the matching relationship is used to search and match keywords for the search term to be searched.
[0108] It should be noted that in this embodiment, by dimensionally reducing the adjacency matrix to obtain vector text and generating a matching relationship based on the vector text, the problems of large resource consumption and large analysis difficulty caused by a large number of dimensions can be avoided, and the technical effect of cost saving can be achieved.
[0109] In some embodiments, S205 may include the following steps:
[0110] Step 1: According to the search terms and keywords in the sample data, the vector text is split into a search term vector text and a keyword vector text.
[0111] Exemplarily, the sample data includes search terms and keywords, and the generated vector text may include search terms and keywords. In order to improve the matching efficiency of search terms and keywords, the vector text can be split into a search term vector text and a keyword vector text.
[0112] Moreover, based on the above analysis, an undirected graph can be constructed from sample data. Therefore, in this embodiment, the vector text can be split into a search term vector text and a keyword vector text based on the node types of the nodes in the undirected graph, where the node types include the node types of search terms and keywords.
[0113] It should be noted that, in some embodiments, the matching device can split the search term vector text into multiple search term vector sub-texts based on the size of the sample data (i.e., the amount of data in the sample data). Similarly, the keyword vector text can also be split into multiple keyword vector sub-texts to improve the efficiency and reliability of subsequent determination of similar information.
[0114] Step 2: Determine the similarity information between each search term vector in the search term vector text and each keyword vector in the keyword vector text.
[0115] Among them, the similarity information can include similarity.
[0116] In some embodiments, the similarity information can be determined based on the method of approximate search, and specifically, it can be implemented by using the Hierarchical Navigable Small World (HNSW) algorithm. For example, for each search term vector, according to the HNSW and the undirected graph, the keyword vector adjacent to the search term vector is determined, and the similarity between the two is determined.
[0117] Step 3: Generate a matching relationship according to the similarity information.
[0118] It is worth noting that, in this embodiment, by splitting the vector text into a search term vector text and a keyword vector text, so as to determine the similarity information and generate a matching relationship based on the search term vector text and the keyword vector text, the complexity of determining the matching relationship based on the overall vector text can be reduced, the efficiency of determining the similarity information can be improved, and thus the technical effect of improving the efficiency of generating the matching relationship can be achieved.
[0119] In some embodiments, Step 3 may include the following sub-steps:
[0120] Sub-step 1: For any search term, based on a preset quantity, select the keyword corresponding to the keyword vector with the largest similarity information from the similarity information corresponding to any search term in turn.
[0121] Exemplarily, the preset quantity can be set by the matching device based on requirements, historical records, and experiments, etc., and this embodiment does not make any restrictions.
[0122] Sub-step 2: Determine the keyword that has a matching relationship with any search term according to the selected keyword.
[0123] It should be noted that, in this embodiment, by sequentially selecting the keywords corresponding to the keyword vectors with the largest similarity information and determining the keywords selected to have a matching relationship with any search term, the determined keywords can have a high degree of relevance to the search term, thereby providing the technical effects of improving the accuracy and reliability of the determined matching relationship.
[0124] In some embodiments, sub-step 2 may include: determining the recall rate of each keyword among the selected keywords, and determining the keywords with a recall rate greater than a preset recall rate threshold as the keywords having a matching relationship with any search term.
[0125] It should be noted that, in this embodiment, by determining keywords according to the recall rate, the determined search terms having a matching relationship and the keywords can have a high degree of fit, thereby improving the accuracy and reliability of the matching relationship. Furthermore, when determining keywords based on search terms and performing information search based on the keywords, the accuracy of information search can be improved, and the technical effect of improving the recall rate can be achieved.
[0126] Figure 4 is a schematic diagram according to the third embodiment of the present application, as Figure 4 shown, the information search method of the embodiment of the present application includes:
[0127] S401: Receive a search request.
[0128] Wherein, the search request carries the term to be searched.
[0129] Exemplarily, the execution subject of this embodiment may be an information search device, which may be the same as or different from the matching device, and this embodiment does not make a limitation.
[0130] S402: Determine the target keyword corresponding to the term to be searched according to the matching relationship.
[0131] Wherein, the matching relationship is generated based on the method described in any of the above embodiments.
[0132] S403: Perform information search based on the target keyword, and obtain and output the search result corresponding to the target keyword.
[0133] Exemplarily, the method of this embodiment can be applied to Figure 5 the application scenario shown.
[0134] As Figure 5 shown, the information search device may be the server 501.
[0135] User 502 can initiate a search request to server 501 through terminal device 503, and the search request can carry the term to be searched.
[0136] Among them, the terminal device 503 can specifically be, for example, Figure 5 the mobile phone 5031 shown in Figure 5 or the laptop computer 5032 shown in
[0137] For example, Figure 5 as shown, taking the terminal device 503 as the mobile phone 5031 as an example, user 502 can enter the term to be searched in the search box of the mobile phone 5031 and trigger the mobile phone 5031 to initiate a search request to server 502 by clicking the virtual button of "Confirm".
[0138] It should be understood that Figure 5 only the mobile phone 5031 and the laptop computer 5032 are used to demonstratively show the terminal device 503, and it cannot be understood as a limitation on the terminal device.
[0139] When the information search method of this embodiment is applied to the application scenario shown in Figure 5 as shown, when the server 501 receives the search request, it can obtain the term to be searched carried in the search request and determine the target keyword corresponding to the term to be searched according to the matching relationship. Since the matching relationship is generated based on the method of any of the above embodiments, that is, the matching relationship is constructed by building an adjacency matrix based on click relationships and performing dimensionality reduction processing on the adjacency matrix, therefore, the matching relationship has high accuracy and reliability. Furthermore, when the target keyword determined based on the matching relationship has a high degree of matching with the term to be searched and a high degree of fitting, the technical effect of improving the accuracy and reliability of the search is achieved.
[0140] Figure 6 is a schematic diagram according to the fourth embodiment of the present application. As shown in Figure 6 the information search method of the embodiment of the present application includes:
[0141] S601: Receive a search request.
[0142] Among them, the search request carries the term to be searched.
[0143] Exemplarily, for the description of S601, reference can be made to S601, and this embodiment does not make any limitations.
[0144] S602: According to the click relationships of the sample data, determine, from the keywords that have click relationships with the term to be searched, the keywords whose click times with the term to be searched are greater than a preset number threshold.
[0145] S603: From the matching relationship, determine as the target keyword a keyword whose click count for the term to be searched is greater than a preset count threshold.
[0146] Among them, the matching relationship is generated by performing dimensionality reduction processing on the adjacency matrix based on an orthogonal matrix, and the adjacency matrix is a matrix representing the click relationships among the various data in the sample data.
[0147] Similarly, the count threshold can also be set by the information search device based on requirements, historical records, and experiments, etc., which is not limited in this embodiment.
[0148] S604: Perform information search based on the target keyword, and obtain and output a search result corresponding to the target keyword.
[0149] Based on the above analysis, it can be seen that the information search device can determine the target keyword based on the click count. In some other embodiments, the information search device can also determine the target keyword based on the access volume of the recalled information.
[0150] Specifically, the information search device can determine multiple initial keywords corresponding to the term to be searched from the matching relationship, determine the access volume corresponding to the recalled information corresponding to each initial keyword, and determine as the target keyword the initial keyword with the largest access volume, so that the determined target keyword has a high recall rate, thereby improving the accuracy and reliability of the search result determined based on the target keyword, and by determining as the target keyword the initial keyword with the largest access volume, the search result can have a more general applicability, thereby improving the technical effect of the user's search experience.
[0151] Figure 7 is a schematic diagram according to the fifth embodiment of the present application, as Figure 7 shown, the keyword matching device 700 applied to information search in the embodiment of the present application includes:
[0152] An acquisition unit 701, configured to acquire sample data, where the sample data includes various search terms and various keywords having click relationships.
[0153] A first determination unit 702, configured to determine an adjacency matrix according to the sample data, where the adjacency matrix is a matrix representing the click relationships among the various words in the sample data.
[0154] A dimensionality reduction unit 703, configured to perform dimensionality reduction processing on the adjacency matrix to obtain a matching relationship between the search term and the keyword.
[0155] Among them, the matching relationship is used to perform keyword search matching on the term to be searched.
[0156] Figure 8 is a schematic diagram according to the sixth embodiment of the present application, asFigure 8 As shown in Figure 8 , the keyword matching device 800 for information search according to the embodiment of the present application includes:
[0157] An obtaining unit 801, configured to obtain sample data, where the sample data includes each search term and each keyword having a click relationship.
[0158] A first determining unit 802, configured to determine an adjacency matrix according to the sample data, where the adjacency matrix is a matrix characterizing the click relationship between each word in the sample data.
[0159] Combined Figure 8 It can be seen that in some embodiments, the first determining unit 802 includes:
[0160] A constructing subunit 8021, configured to construct an undirected graph according to the sample data, where the undirected graph includes multiple nodes and multiple edges, one node corresponds to one search term or one keyword, and the edge between any two nodes corresponds to a click relationship.
[0161] A generating subunit 8022, configured to generate an adjacency matrix according to the undirected graph, where the adjacency matrix is a matrix characterizing the click relationship between each node in the undirected graph.
[0162] A dimensionality reduction unit 803, configured to perform dimensionality reduction processing on the adjacency matrix to obtain a matching relationship between the search term and the keyword.
[0163] Wherein, the matching relationship is used to perform keyword search matching on the search term to be searched.
[0164] Combined Figure 8 It can be seen that in some embodiments, the dimensionality reduction unit 803 includes:
[0165] A dimensionality reduction subunit 8031, configured to perform dimensionality reduction processing on the adjacency matrix to obtain a vector text, where the vector text includes: a search term vector corresponding to each search term and a keyword vector corresponding to each keyword.
[0166] In some embodiments, the dimensionality reduction subunit 8031 includes:
[0167] A generating module, configured to randomly generate a Gaussian distribution matrix.
[0168] A dimensionality reduction module, configured to perform dimensionality reduction processing on the adjacency matrix based on the Gaussian distribution matrix to obtain a vector text.
[0169] In some embodiments, the dimensionality reduction module includes:
[0170] An orthogonal sub-module, configured to perform orthogonalization processing on the Gaussian distribution matrix to obtain an orthogonal matrix.
[0171] A dimensionality reduction sub-module, configured to perform dimensionality reduction processing on an adjacency matrix based on an orthogonal matrix to obtain a vector text.
[0172] A generation subunit 8032, configured to generate a matching relationship according to each search term vector and each keyword vector in the vector text.
[0173] In some embodiments, the generation subunit 8032 includes:
[0174] A splitting module, configured to split the vector text into a search term vector text and a keyword vector text according to the search terms and keywords in the sample data.
[0175] A determination module, configured to determine the similarity information between each search term vector in the search term vector text and each keyword vector in the keyword vector text.
[0176] A generation module, configured to generate a matching relationship according to the similarity information.
[0177] In some embodiments, the generation module includes:
[0178] A selection sub-module, configured to, for any search term, based on a preset quantity, sequentially select the keyword corresponding to the keyword vector with the largest similarity information from the respective similarity information corresponding to any search term.
[0179] A determination sub-module, configured to determine the keyword having a matching relationship with any search term according to the selected keyword.
[0180] In some embodiments, the determination sub-module is configured to determine the recall rate of each keyword in the selected keywords, and determine the keyword with a recall rate greater than a preset recall rate threshold as the keyword having a matching relationship with any search term.
[0181] Figure 9 It is a schematic diagram according to the seventh embodiment of the present application, as Figure 9 shown, an information search device 900 according to an embodiment of the present application includes:
[0182] A receiving unit 901, configured to receive a search request, where a search term to be searched is carried in the search request.
[0183] A second determination unit 902, configured to determine a target keyword corresponding to the search term to be searched according to the matching relationship, where the matching relationship is generated based on the method described in any of the above embodiments.
[0184] A search unit 903, configured to perform information search based on the target keyword to obtain a search result corresponding to the target keyword.
[0185] An output unit 904, configured to output the search result.
[0186] Figure 10 is a schematic diagram according to the eighth embodiment of the present application. As Figure 10 shown, the information search device 1000 of the embodiment of the present application includes:
[0187] A receiving unit 1001, configured to receive a search request, where a search term to be searched is carried in the search request.
[0188] A second determination unit 1002, configured to determine a target keyword corresponding to the search term according to a matching relationship, where the matching relationship is generated based on the method described in any of the foregoing embodiments.
[0189] Combined with Figure 10 it can be seen that in some embodiments, the second determination unit 1002 includes:
[0190] A third determination subunit 10021, configured to determine, according to a click relationship, a keyword from the keywords having a click relationship with the search term, where the click times of the keyword with the search term are greater than a preset number threshold.
[0191] A fourth determination subunit 10022, configured to determine, from the matching relationship, a keyword whose click times with the search term are greater than the preset number threshold as the target keyword.
[0192] A search unit 1003, configured to perform information search based on the target keyword to obtain a search result corresponding to the target keyword.
[0193] An output unit 1004, configured to output the search result.
[0194] Figure 11 is a schematic diagram according to the ninth embodiment of the present application. As Figure 11 shown, the information search device 1100 of the embodiment of the present application includes:
[0195] A receiving unit 1101, configured to receive a search request, where a search term to be searched is carried in the search request.
[0196] A second determination unit 1102, configured to determine a target keyword corresponding to the search term according to a matching relationship, where the matching relationship is generated based on the method described in any of the foregoing embodiments.
[0197] Combined with Figure 11 it can be seen that in some embodiments, the second determination unit 1102 includes:
[0198] A fifth determination subunit 11021, configured to determine a plurality of initial keywords corresponding to the search term from the matching relationship.
[0199] The sixth determination subunit 11022 is configured to determine the access volume corresponding to the recall information corresponding to each initial keyword, and determine the initial keyword with the largest access volume as the target keyword.
[0200] The search unit 1103 is configured to perform information search based on the target keyword to obtain a search result corresponding to the target keyword.
[0201] The output unit 1104 is configured to output the search result.
[0202] According to an embodiment of the present application, the present application further provides an electronic device and a readable storage medium.
[0203] According to an embodiment of the present application, the present application further provides a computer program product, where the program product includes: a computer program, the computer program is stored in a readable storage medium, and at least one processor of the electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to enable the electronic device to execute the solution provided in any of the above embodiments.
[0204] Figure 12 FIG. shows a schematic block diagram of an exemplary electronic device 1200 that can be used to implement the embodiments of the present application. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0205] As Figure 12 shown, the electronic device 1200 includes a computing unit 1201, which can execute various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 1208 into a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other through a bus 1204. The input / output (I / O) interface 1205 is also connected to the bus 1204.
[0206] Multiple components in device 1200 are connected to I / O interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1207, such as various types of displays, speakers, etc.; a storage unit 1208, such as a magnetic disk, an optical disc, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows device 1200 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0207] The computing unit 1201 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1201 executes the various methods and processes described above, such as the keyword matching method and the information search method applied to information search. For example, in some embodiments, the keyword matching method and the information search method applied to information search can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 1208. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 1200 via the ROM 1202 and / or the communication unit 1209. When the computer program is loaded into the RAM 1203 and executed by the computing unit 1201, one or more steps of the keyword matching method and the information search method applied to information search described above can be executed. Alternatively, in other embodiments, the computing unit 1201 can be configured to execute the keyword matching method and the information search method applied to information search in any other suitable manner (e.g., by means of firmware).
[0208] The various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special or general programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0209] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.
[0210] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0211] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0212] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0213] A computer system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services ("Virtual Private Server", or simply "VPS"). The server can also be a server of a distributed system, or a server combined with blockchain.
[0214] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this application can be achieved, and no limitations are imposed herein.
[0215] The above specific embodiments do not constitute a limitation on the protection scope of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application shall be included within the protection scope of this application.
Claims
1. A keyword matching method applied to information search, comprising: Obtaining sample data and determining an adjacency matrix according to the sample data, wherein the sample data includes each search term and each keyword having a click relationship, the adjacency matrix is a matrix representing the click relationship between each word in the sample data, the sample data is data after filtering processing, and the filtering processing includes filtering duplicate words and words without generality; Randomly generating a Gaussian distribution matrix, and performing an orthogonalization process on the Gaussian distribution matrix to obtain an orthogonal matrix; Performing dimensionality reduction processing on the adjacency matrix based on the orthogonal matrix to obtain a vector text; Generating a matching relationship between a search term and a keyword according to each search term vector and each keyword vector in the vector text; Wherein the matching relationship is used for searching and matching keywords for a term to be searched; Wherein determining the adjacency matrix according to the sample data includes: Constructing an undirected graph according to the sample data, and generating the adjacency matrix according to the undirected graph and the weights of each edge in the undirected graph, and the weight of the edge is characterized by the number of clicks between the search term and the keyword having the click relationship; The generating a matching relationship between a search term and a keyword according to each search term vector and each keyword vector in the vector text includes: Splitting the vector text into a search term vector text and a keyword vector text according to the node types of each node in the undirected graph, and the node types include the node type of the search term and the node type of the keyword; Determining the similarity information between each search term vector in the search term vector text and each keyword vector in the keyword vector text; For any search term, based on a preset quantity, sequentially select the keyword corresponding to the keyword vector with the largest similarity information from the similarity information corresponding to the any search term, and determine the recall rate of each keyword among the selected keywords, and determine the keyword with the recall rate greater than the preset recall rate threshold as the keyword having a matching relationship with the any search term.
2. The method according to claim 1, wherein, The undirected graph includes multiple nodes and multiple edges, one node corresponds to one search term or one keyword, and the edge between any two nodes corresponds to a click relationship, and the adjacency matrix is a matrix representing the click relationship between each node in the undirected graph.
3. An information search method, comprising: Receiving a search request, wherein the search request carries a term to be searched; Determining a target keyword corresponding to the term to be searched according to the matching relationship, wherein the matching relationship is generated based on the method according to claim 1 or 2; Performing information search based on the target keyword, and obtaining and outputting a search result corresponding to the target keyword.
4. The method according to claim 3, wherein, The matching relationship is generated by performing dimensionality reduction processing on the adjacency matrix based on the orthogonal matrix.
5. The method according to claim 3 or 4, wherein, Determining a target keyword corresponding to the term to be searched from the matching relationship includes; According to the click relationship, determining a keyword with the number of clicks greater than a preset number threshold between the keyword having a click relationship with the term to be searched from the keywords having a click relationship with the term to be searched; From the matching relationship, determine, as the target keyword, a keyword whose click count for the search term to be searched is greater than a preset count threshold.
6. The method according to claim 3 or 4, wherein Determining a target keyword corresponding to the search term to be searched from the matching relationship includes: Determine, from the matching relationship, a plurality of initial keywords corresponding to the search term to be searched; Determine the access volume corresponding to the recall information corresponding to each initial keyword, and determine the initial keyword with the largest access volume as the target keyword.
7. A keyword matching device applied to information search, comprising: An acquisition unit configured to acquire sample data, where the sample data includes various search terms and various keywords having a click relationship, and the sample data is data after filtering processing, and the filtering processing includes filtering of duplicate words and non-universal words; A first determination unit configured to determine an adjacency matrix according to the sample data, where the adjacency matrix is a matrix characterizing the click relationship between words in the sample data; A dimensionality reduction unit configured to perform dimensionality reduction processing on the adjacency matrix to obtain a matching relationship between search terms and keywords; where the matching relationship is used for keyword search matching of a search term to be searched; The dimensionality reduction unit includes: A dimensionality reduction subunit configured to perform dimensionality reduction processing on the adjacency matrix to obtain a vector text, where the vector text includes: a search term vector corresponding to each search term, and a keyword vector corresponding to each keyword; A generation subunit configured to generate the matching relationship according to each search term vector and each keyword vector in the vector text; The dimensionality reduction subunit includes: A generation module configured to randomly generate a Gaussian distribution matrix; A dimensionality reduction module configured to perform dimensionality reduction processing on the adjacency matrix based on the Gaussian distribution matrix to obtain a matching relationship between search terms and keywords; The dimensionality reduction module includes: An orthogonal sub-module configured to perform orthogonalization processing on the Gaussian distribution matrix to obtain an orthogonal matrix; A dimensionality reduction sub-module configured to perform dimensionality reduction processing on the adjacency matrix based on the orthogonal matrix to obtain a matching relationship between search terms and keywords; where the first determination unit includes: A construction subunit configured to construct an undirected graph according to the sample data; A generation subunit configured to generate the adjacency matrix according to the undirected graph and the weights of each edge in the undirected graph, and the weight of the edge is characterized by the click count between the search term and the keyword having the click relationship; The generation subunit includes: A splitting module configured to split the vector text into a search term vector text and a keyword vector text according to the node types of each node in the undirected graph, and the node types include the node type of the search term and the node type of the keyword; A determination module configured to determine the similarity information between each search term vector in the search term vector text and each keyword vector in the keyword vector text; A generation module configured to generate the matching relationship according to the similarity information; The generation module includes: A selection sub-module, configured to, for any search term, based on a preset quantity, successively select the keyword corresponding to the keyword vector with the largest similarity information from each piece of similarity information corresponding to the any search term; A determination sub-module, configured to determine the keyword that has a matching relationship with the any search term according to the selected keyword; Wherein, the determination sub-module is configured to determine the recall rate of each keyword in the selected keywords, and determine the keyword with a recall rate greater than a preset recall rate threshold as the keyword that has a matching relationship with the any search term.
8. The apparatus according to claim 7, wherein the undirected graph includes a plurality of nodes and a plurality of edges, one node corresponds to one search term or one keyword, and the edge between any two nodes corresponds to a click relationship.
9. An information search apparatus, comprising A receiving unit for receiving a search request, wherein, The search request carries a search term to be searched; A second determination unit, configured to determine a target keyword corresponding to the search term according to the matching relationship, wherein the matching relationship is generated based on the method according to claim 1 or 2; A search unit, configured to perform information search based on the target keyword to obtain a search result corresponding to the target keyword; An output unit, configured to output the search result.
10. The apparatus according to claim 9, wherein, The matching relationship is generated by performing dimensionality reduction processing on an adjacency matrix based on an orthogonal matrix.
11. The apparatus according to claim 9 or 10, wherein The second determination unit includes; A third determination sub-unit, configured to determine, according to the click relationship, the keyword whose click times with the search term are greater than a preset number threshold from the keywords having a click relationship with the search term; A fourth determination sub-unit, configured to determine, from the matching relationship, the keyword whose click times with the search term are greater than a preset number threshold as the target keyword.
12. The device according to claim 9 or 10, wherein, The second determination unit includes: A fifth determination sub-unit, configured to determine a plurality of initial keywords corresponding to the search term from the matching relationship; A sixth determination sub-unit, configured to determine the access volume corresponding to the recall information corresponding to each initial keyword, and determine the initial keyword with the largest access volume as the target keyword.
13. An electronic device, comprising: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to claim 1 or 2; or, So that the at least one processor can execute the method according to claim 3 or 4.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to claim 1 or 2; or, The computer instructions are used to cause the computer to execute the method according to claim 3 or 4.
15. A computer program product, comprising a computer program, where the computer program, when executed by a processor, implements the method according to claim 1 or 2; or, The computer program, when executed by a processor, implements the method according to claim 3 or 4.
Citation Information
Patent Citations
Search result processing method and device and similarity model training method and device
CN110162593A
Feature information extraction method and device for relational network
CN111046299A