Search data mining method, device, equipment and storage medium
By building a relationship network graph and improving the training word embedding vector of graph neural network model, the accuracy and generalization problems of search terms and text association mining are solved, and the relevance and user experience of search results are improved.
Patent Information
- Application Number
- CN202110004248.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-04
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-01-04
AI Technical Summary
In the prior art, the accuracy and generalization ability of the mining model for the association between search terms and text are poor, which affects the query recommendation effect and has poor user experience.
By constructing a relational network graph, the improved graph neural network model is used to train the word embedding vectors of search terms and text, and their association relationships are mined. Random walk sampling positive samples are used and the prediction target nodes are removed during aggregation, which enhances the model learning ability and network generalization.
It improves the recall and recommendation effect of search results, enhances the relevance and clustering ability of search results, and improves the user experience.
Smart Images

Figure CN113535795B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing technology, and in particular to a search data mining method, device, equipment and storage medium. Background Art
[0002] A search engine is a system that collects information from the internet based on specific strategies and computer programs, organizes and processes the information, and displays it to users, providing retrieval services. Vertical search (also known as specialized search) is a subdivision and extension of search engines, primarily targeting searches in a specific field. It integrates a specific type of information within a database, extracts the required data by targeted field, processes it, and then returns it to the user in some form. Vertical search includes music search, image search, video search, public account search, and mini-program search.
[0003] The relationship between search terms (queries) and documents (documents) is a valuable type of information that search engines seek to capture. Accurate correlation analysis between queries and documents not only helps with search result ranking but also plays a crucial role in bridging the gap between queries and documents, enabling the transfer of relevant information between queries and documents. This facilitates deeper query and document understanding, and enables the development of relevant applications based on this understanding.
[0004] Existing techniques for extracting the relationship between queries and documents primarily involve organizing and analyzing data from user search and click logs to construct a query-doc relationship graph. This graph is then processed using models such as Markov random walk models, graph convolutional networks, graph attention networks, or graph neural networks to mine document data that users didn't click on in the click logs. This allows for the prediction of implicit relationships between queries and documents, as well as potential relationships between queries. However, these existing models suffer from poor accuracy and generalization, resulting in poor correlation between the relationships mined between queries and documents, as well as between queries and queries. This, in turn, impacts the effectiveness of query recommendations and results in a poor user experience. Summary of the Invention
[0005] In response to the above-mentioned problems in the prior art, the purpose of the present invention is to provide a search data mining method, device, equipment and storage medium that can accurately mine the association between search terms and between search terms and texts, and improve the relevance of mining results.
[0006] In order to solve the above problems, the present invention provides a search data mining method, comprising:
[0007] Acquire historical search behavior data, and determine search terms and text in the historical search behavior data;
[0008] Constructing a relationship network diagram based on the historical search behavior data, wherein the relationship network diagram uses the search terms and the text as nodes;
[0009] Acquire multiple node sample pairs based on the relationship network graph;
[0010] Training a graph neural network model using the multiple node sample pairs to obtain a word embedding vector for each node in the relationship network graph; wherein the graph neural network model includes a graph neural network layer, the graph neural network layer is used to capture a set of adjacent nodes corresponding to the node in each of the node sample pairs, remove other nodes in the node sample pairs from the adjacent node set to obtain a target node set, and perform feature aggregation on the nodes based on the target node set;
[0011] Each node in the relationship network diagram is matched with other nodes according to the word embedding vector to obtain a matching result.
[0012] Another aspect of the present invention provides a search data mining device, comprising:
[0013] A first acquisition module is used to acquire historical search behavior data and determine search terms and texts in the historical search behavior data;
[0014] A construction module, configured to construct a relationship network diagram based on the historical search behavior data, wherein the relationship network diagram uses the search terms and the text as nodes;
[0015] A second acquisition module is used to acquire a plurality of node sample pairs based on the relationship network graph;
[0016] A training module is configured to train a graph neural network model using the multiple node sample pairs to obtain a word embedding vector for each node in the relationship network graph; wherein the graph neural network model includes a graph neural network layer, the graph neural network layer is configured to capture a set of adjacent nodes corresponding to a node in each of the node sample pairs, remove other nodes in the node sample pairs from the set of adjacent nodes to obtain a target node set, and perform feature aggregation on the nodes based on the target node set;
[0017] A matching module is used to match each node in the relationship network diagram with other nodes according to the word embedding vector to obtain a matching result.
[0018] Another aspect of the present invention provides an electronic device comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the above-mentioned search data mining method.
[0019] Another aspect of the present invention provides a computer-readable storage medium, which stores at least one instruction or at least one program. The at least one instruction or at least one program is loaded and executed by a processor to implement the search data mining method as described above.
[0020] Due to the above technical solution, the present invention has the following beneficial effects:
[0021] (1) The search data mining method of the present invention constructs a relationship network diagram by utilizing historical search behavior data, and trains an improved graph neural network model based on the relationship network diagram, thereby determining the word embedding vectors of search terms and texts in the user's historical search behavior, mining the association relationships between search terms and between search terms and texts, and improving the relevance of mining results, thereby laying a good foundation for improving the recall rate of search results, realizing search recommendations and search result clustering.
[0022] (2) The search data mining method of the present invention improves the graph neural network model. When the model is aggregated, the prediction target is removed from the set of adjacent nodes aggregated by the model, which can enhance the model's learning ability. When collecting training samples, positive sample pairs are collected through random walks, which expands the network's multi-hop information and improves the network's generalization. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] To more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0024] Figure 1 This is a schematic diagram of an implementation environment provided by an embodiment of the present invention;
[0025] Figure 2 is a flow chart of a search data mining method provided by one embodiment of the present invention;
[0026] Figure 3 is a schematic diagram of historical search behavior data provided by one embodiment of the present invention;
[0027] Figure 4 This is a schematic diagram of the structure of a relationship network diagram provided by an embodiment of the present invention;
[0028] Figure 5 is a flow chart of a search data mining method provided by another embodiment of the present invention;
[0029] Figure 6 This is a schematic diagram of a feature aggregation method for a graph neural network layer provided by one embodiment of the present invention;
[0030] Figure 7 This is a comparison chart of semantic relevance results provided by an embodiment of the present invention;
[0031] Figure 8 It is a structural diagram of a search data mining device provided by an embodiment of the present invention;
[0032] Figure 9 It is a structural diagram of a server provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] Artificial intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive field within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making. AI technology is an interdisciplinary discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0034] The solution provided by the embodiments of the present invention relates to the field of natural language processing (NLP), which is an important field in the fields of computer science and artificial intelligence. It studies various theories and methods that can enable effective communication between humans and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language, that is, the language people use in daily life, and is closely related to the study of linguistics. Natural language processing technologies generally include text processing, semantic understanding, machine translation, robot question answering, knowledge graphs, and other technologies.
[0035] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0036] It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or devices.
[0037] First, the relevant terms involved in the embodiments of the present invention are explained as follows:
[0038] Vertical search: Vertical search is a professional search engine for a certain industry. It is a subdivision and extension of the search engine. It integrates a certain type of specialized information in the database, extracts the required data by targeted fields, processes it, and then returns it to the user in some form.
[0039] Service Search: Service search is a type of vertical search that directly displays services that meet the user's query. For example, when searching for a babysitter, service search can directly provide a menu of babysitter services.
[0040] Graph Attention Network (GAT): Graph Attention Network uses an attention mechanism to assign different weights to different nodes. Training relies on pairs of adjacent nodes rather than the specific network structure, making it suitable for inductive tasks. Inductive tasks involve processing different graphs during training and testing. Typically, training is performed on a subgraph, while testing requires processing unknown vertices.
[0041] Node2vec: Node2vec learns continuous feature representations for network nodes. By maximizing the probability of retaining neighboring nodes, it maps nodes into a low-dimensional feature space for vector representation. The basic idea is to use a graph search algorithm to obtain a node's neighboring nodes, use the neighborhood to simulate word context, and train the node vector using the skip-gram model.
[0042] Reference Manual Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present invention, such as Figure 1 As shown, the implementation environment may include at least a terminal 110 and a server 120. The terminal 110 and the server 120 may be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment of the present invention.
[0043] The terminal 110 may include, but is not limited to, a smartphone, a tablet computer, an e-book reader, a laptop computer, or a desktop computer. The terminal 110 may run one or more clients, which may be of the same type or different types. The client may be a web page provided to a user by a service provider, or an application provided to the user by the service provider.
[0044] The server 120 may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The server 120 may include a network communication unit, a processor, and a memory, etc.
[0045] In actual applications, the client can be a client for information applications, such as an RSS reader, feed reader, or news reader. After opening, logging in, or clicking on the client, the user can enter a search term to search for content (including vertical search, service search, etc.). The user can browse / use the images, text, videos, mini-programs, and other content provided by the client. The user's search, click, and other behaviors during the use of the client will leave a record, namely the user behavior log. By collecting user behavior logs over a period of time, the user's historical search behavior data can be obtained. The server 120 can process this historical search behavior data to mine the implicit relationship between query and doc, as well as the association relationship between query and query, thereby laying the foundation for improving the recall rate of search results, implementing query recommendations, and clustering retrieval results.
[0046] It should be noted that Figure 1 Just an example.
[0047] Reference Manual Figure 2 , which shows the process of the search data mining method provided by an embodiment of the present invention, which can be applied to Figure 1 In the server. Figure 2 As shown, the method may include the following steps:
[0048] S210: Acquire historical search behavior data, and determine search terms and texts in the historical search behavior data.
[0049] In an embodiment of the present invention, the search behavior data may be a search request initiated by a user to a server through a terminal and / or data related to the search request (such as interaction data between the user and the server based on the search request, etc.). The search request may include search information input by the user, and the data related to the search request may include search results obtained by the server in response to the search request, including pictures, texts, videos, applets, etc., and may also include user viewing and click information on these information. The historical search behavior data refers to all search behavior data that has been generated before the current time point, or search behavior data generated within a period of time before the current time point. It should be noted that obtaining historical search behavior data is not limited to the above method, and may also be other methods that can achieve the same function.
[0050] In the embodiment of the present invention, the search term refers to search information entered by the user. The search term can be a paragraph, a sentence, or a word entered by the user. The search term can be anything, such as service information required by the user or current news of interest to the user. The embodiment of the present invention does not limit the content or length of the search term.
[0051] In an embodiment of the present invention, the text may be the descriptive text corresponding to the search results obtained by the server based on the search term. For example, it may be the specific content of the search results, or it may be the title, summary, and other text information of the search results. The embodiment of the present invention does not limit the content and length of the text.
[0052] For example, in SouYisou, users can search for Moments, articles, public accounts, mini-programs, novels, music, and emoticons based on keywords. The search terms can be keywords entered by the user, and the text can be the content, title, introduction, and abstract of various information searched based on the keywords. Suppose a user searches for "Versailles literature," and can search for articles such as "Does the popular Versailles literature on the Internet make you feel inferior?", "Versailles literature is popular, take stock of the Versailles school of thought in film and television dramas," and "Showing off wealth in a roundabout way, Versailles literature deserves to be demolished." You can use "Versailles literature" as the search term, and "Does the popular Versailles literature on the Internet make you feel inferior?", "Versailles literature is popular, take stock of the Versailles school of thought in film and television dramas," and "Showing off wealth in a roundabout way, Versailles literature deserves to be demolished" as the corresponding text.
[0053] In one possible embodiment, after obtaining the historical search behavior data, the historical search behavior data can be preprocessed. The preprocessing may include performing data cleaning operations on the search terms and text. The data cleaning operations may include locating and extracting key information, removing invalid information such as dates and account numbers, removing special symbols and uniform resource locators, etc.
[0054] S220: Constructing a relationship network diagram based on the historical search behavior data, wherein the relationship network diagram uses the search terms and the text as nodes.
[0055] In an embodiment of the present invention, the relationship network diagram includes multiple nodes and association relationships between the multiple nodes, wherein the nodes in the relationship network diagram represent search terms or texts, the association relationships include switching relationships between search terms and click relationships between search terms and texts, and the weights of the edges between the nodes can represent the number of switches or clicks.
[0056] In a possible embodiment, constructing a relationship network diagram based on the historical search behavior data may include:
[0057] Determining search term switching data and text click data in the historical search behavior data;
[0058] establishing a switching relationship between the search terms according to the search term switching data, and determining a corresponding switching number;
[0059] Establishing a click relationship between the search term and the text according to the text click data, and determining a corresponding number of clicks;
[0060] The relationship network diagram is constructed based on the switching relationship and the click relationship.
[0061] Specifically, constructing the relationship network diagram based on the switching relationship and the click relationship may include:
[0062] Using the search terms and the text as nodes of the relationship network graph;
[0063] Connecting the nodes having the switching relationship and the click relationship to generate edges of the relationship network graph;
[0064] The number of switches and the number of clicks are used as weights of corresponding edges to obtain the relationship network diagram.
[0065] In an embodiment of the present invention, after obtaining the historical search behavior data, the search term switching data and text click data in the historical search behavior data can be pre-determined to establish a switching relationship between search terms and a click relationship between search terms and text. The search term switching data refers to the behavior data of a user switching from one search term to another, and the text click data refers to the behavior data of a user clicking on the text corresponding to a search term.
[0066] For example, in conjunction with the reference to the specification Figure 3 For example, if a user enters the search term "Double Color Ball" and then enters the search term "Welfare Lottery," "Double Color Ball - Welfare Lottery" can be used as search term switching data, establishing a switching relationship between "Double Color Ball" and "Welfare Lottery." If a user enters the search term "Welfare Lottery" and clicks on an article titled "Lottery Winning Numbers" in the search results, "Welfare Lottery - Lottery Winning Numbers" can be used as text click data, establishing a click relationship between "Welfare Lottery" and "Lottery Winning Numbers."
[0067] Specifically, the number of switches and the number of clicks can be determined by statistics. The relationship network diagram may include two types of nodes, one is a search term node and the other is a text node. Search term nodes and search term nodes, as well as search term nodes and text nodes, can be connected by edges. The weight of each edge is related to the two nodes it corresponds to. The more the number of switches or clicks between the two nodes, the greater the weight of the edge. For example, in conjunction with the reference specification, Figure 4 In the relationship network diagram in the figure, nodes q1, q2 and q3 represent search term nodes; nodes d1 and d2 represent text nodes; there is a switching relationship between q1 and q2, q2 and q3, and a click relationship between q2 and d1, q3 and d2.
[0068] S230: Acquire multiple node sample pairs based on the relationship network graph.
[0069] In an embodiment of the present invention, the node sample pairs include positive sample pairs and negative sample pairs. The positive sample pairs are sample pairs composed of nodes with a certain association relationship, and may include sample pairs composed of search term nodes and search term nodes, or may include sample pairs composed of search term nodes and text nodes. The negative sample pairs are sample pairs composed of nodes without an association relationship, and may include sample pairs composed of search term nodes and search term nodes, or may include sample pairs composed of search term nodes and text nodes, or may include sample pairs composed of text nodes and text nodes. The number of the positive sample pairs and the number of the negative sample pairs can be determined according to actual conditions.
[0070] In one possible embodiment, the Figure 5 , obtaining a plurality of node sample pairs based on the relationship network graph may include:
[0071] S231: Performing random walks in the relationship network graph based on each node in the relationship network graph to obtain multiple positive sample pairs.
[0072] S232: Perform random negative sampling based on each node in the relationship network graph to obtain multiple negative sample pairs.
[0073] Specifically, the obtaining of multiple positive sample pairs based on each node in the relationship network graph performing a random walk in the relationship network graph may include:
[0074] For each node in the relationship network diagram, performing a preset number of random walks in the relationship network diagram to obtain a node sequence;
[0075] The node and each node in the node sequence are respectively formed into sample pairs to obtain multiple positive sample pairs.
[0076] In practical applications, when performing random walks to sample positive sample pairs, each node in the relationship network diagram can be used as an initial traversal point, and N random walks can be performed to obtain a node sequence of length N. The initial traversal point and the N nodes in the node sequence are respectively composed of sample pairs, that is, N positive sample pairs can be obtained. The value of N can be set according to actual needs, and the embodiment of the present invention does not impose any restrictions. For example, assuming that the search term node q1 is used as the initial traversal point to obtain the node sequence q2, q3, d2, q5, and d1, 5 positive sample pairs of (q1, q2), (q1, q3), (q1, d2), (q1, q5), and (q1, d1) can be formed. Sampling by random walks can expand the multi-hop information of the training network, so that the reliability of the word embedding vector obtained by model training is higher.
[0077] In practical applications, when performing random negative sampling, for each node in the relationship network diagram, M random samplings can be performed from nodes that have no association with the node, obtaining M nodes. The node and the M nodes are then combined into sample pairs, thereby obtaining M negative sample pairs. The value of M can be set according to actual needs and is not limited in the present embodiment.
[0078] S240: Use the multiple node sample pairs to train a graph neural network model to obtain word embedding vectors for each node in the relationship network graph; wherein the graph neural network model includes a graph neural network layer, which is used to capture the adjacent node set corresponding to the node in each of the node sample pairs, remove other nodes in the node sample pairs from the adjacent node set to obtain a target node set, and perform feature aggregation on the nodes based on the target node set.
[0079] In an embodiment of the present invention, the word embedding vector of each node in the relationship network is the word embedding vector corresponding to each search term and each text in the historical search behavior data, and the word embedding vector can uniquely represent the search term or the text.
[0080] In a possible embodiment, using the multiple node sample pairs to train a graph neural network model to obtain a word embedding vector for each node in the relationship network graph may include:
[0081] Constructing a graph neural network model, wherein the graph neural network model includes multiple graph neural network layers;
[0082] Training the graph neural network model with the goal of minimizing the sum of word embedding distances between nodes in each of the node sample pairs to obtain a trained graph neural network model;
[0083] Determine the word embedding vector of each node in the relationship network graph based on the trained graph neural network model.
[0084] Specifically, the graph neural network model can be an improved GAT model, and the graph neural network layer can be an improved graph attention network layer. When the graph attention network layer of the existing GAT model performs feature aggregation, it aggregates the features of the adjacent nodes of the target node and splices them with the own features of the target node to obtain the feature vector of the target node after aggregation. In an embodiment of the present invention, when the improved graph attention network layer performs feature aggregation, it removes the predicted target from the set of adjacent nodes aggregated by the model, and the predicted target refers to the other nodes in the current node sample pair where the target node is located. By removing the predicted target from the set of adjacent nodes aggregated by the model, the model learning ability can be enhanced, the accuracy of the model can be improved, and thus the accuracy of the word embedding vector can be improved.
[0085] For example, in conjunction with the reference to the specification Figure 6 When performing graph neural network processing on each positive sample pair (q1, d0), we can first capture the adjacent node set of node q1 (the adjacent node set here includes node q1 itself), remove other nodes (i.e., node d0) in the node sample pair (q1, d0) from the adjacent node set, obtain the target node set, and perform feature aggregation on the node q1 based on the target node set to obtain q1'.
[0086] Specifically, during model training, an improved graph attention network layer can be pre-built. Using the multiple node sample pairs, the graph attention network layer is trained for machine learning with the goal of minimizing the sum of the word embedding distances between the nodes in each of the node sample pairs. By building and training multiple layers of improved graph neural network layers, a trained graph neural network model is ultimately obtained.
[0087] The search data mining method of this invention improves the graph neural network model by removing the predicted target from the set of adjacent nodes during model aggregation, thereby enhancing the model's learning ability. When collecting training samples, positive sample pairs are collected through random walks, expanding the network's multi-hop information and improving the network's generalization.
[0088] S250: Match each node in the relationship network graph with other nodes according to the word embedding vector to obtain a matching result.
[0089] In an embodiment of the present invention, two different search term nodes can be matched based on the word embedding vectors of the search term nodes to mine the implicit relationship between the search terms; and the search term nodes and text nodes can be matched based on the word embedding vectors of the search term nodes and the text nodes to mine the implicit relationship between the search terms and the text.
[0090] In a possible embodiment, matching each node in the relationship network graph with other nodes based on the word embedding vector to obtain a matching result may include:
[0091] Obtaining a plurality of first nodes corresponding to the search terms and a plurality of second nodes corresponding to the text;
[0092] For each of the first nodes, determining a correlation between each of the second nodes and the first node;
[0093] Acquire a second node whose correlation with the first node is greater than a preset threshold, and generate a matching node set;
[0094] The first node is paired with each second node in the matching node set to obtain the matching result.
[0095] Specifically, the matching result can be a node pair consisting of a first node and a second node, that is, a set of matching pairs of search terms and texts. For each search term node, the word embedding distance between it and each text node can be calculated separately as the correlation between the search term node and each text node. The preset threshold can be set according to actual conditions, for example, it can be set to 0.9, and the embodiment of the present invention does not limit this. In some possible embodiments, a certain number of text nodes can also be selected from each text node whose correlation is greater than the preset threshold to generate the matching node set.
[0096] In a possible embodiment, matching each node in the relationship network diagram with other nodes based on the word embedding vector to obtain a matching result may also include: for each first node, determining the correlation between other first nodes in the relationship network diagram and the first node; obtaining other first nodes whose correlation with the first node is greater than a preset threshold; pairing the first node with the other first nodes whose correlation is greater than the preset threshold to obtain a node pair consisting of a first node and a first node, that is, a set of matching pairs of search terms and search terms.
[0097] The matching results obtained in the embodiment of the present invention, that is, the set of matching pairs of search terms and texts, and the set of matching pairs of search terms and search terms, can be accumulated as basic data for service search. By ensuring the reproduction of these matching pairs, the service search experience can be stabilized.
[0098] By comparing the improved GAT model provided by the embodiment of the present invention with the GAT model and the Node2vec model, and referring to the appendix of the reference specification, Figure 7It can be found that the semantic correlation between the highly correlated matching pairs obtained by the method provided by the embodiment of the present invention is significantly greater than the results obtained by the GAT model and the Node2vec model.
[0099] To sum up, the search data mining method of the present invention constructs a relationship network graph by utilizing historical search behavior data, and trains the improved graph neural network model based on the relationship network graph, determines the word embedding vectors of search terms and texts in the user's historical search behavior, and mines the association between search terms and between search terms and texts, which can improve the relevance of the mining results, thereby laying a good foundation for improving the recall rate of search results, realizing search recommendations and search result clustering.
[0100] Reference Manual Figure 8 , which shows the structure of a search data mining device provided by an embodiment of the present invention. Figure 8 As shown, the device may include:
[0101] A first acquisition module 810 is configured to acquire historical search behavior data and determine search terms and text in the historical search behavior data;
[0102] A construction module 820 is configured to construct a relationship network diagram based on the historical search behavior data, wherein the relationship network diagram uses the search terms and the text as nodes;
[0103] A second acquisition module 830 is configured to acquire a plurality of node sample pairs based on the relationship network graph;
[0104] A training module 840 is configured to train a graph neural network model using the multiple node sample pairs to obtain a word embedding vector for each node in the relationship network graph; wherein the graph neural network model includes a graph neural network layer, the graph neural network layer is configured to capture a set of adjacent nodes corresponding to a node in each node sample pair, remove other nodes in the node sample pair from the set of adjacent nodes to obtain a target node set, and perform feature aggregation on the nodes based on the target node set;
[0105] The matching module 850 is used to match each node in the relationship network diagram with other nodes according to the word embedding vector to obtain a matching result.
[0106] In a possible embodiment, the node sample pairs may include positive sample pairs and negative sample pairs; the second acquisition module 830 may include:
[0107] a positive sample pair acquisition unit, configured to perform a random walk in the relationship network graph based on each node in the relationship network graph to obtain a plurality of positive sample pairs;
[0108] The negative sample pair acquisition unit is used to perform random negative sampling based on each node in the relationship network graph to obtain multiple negative sample pairs.
[0109] It should be noted that the devices provided in the above embodiments are only illustrated by the division of the above functional modules when implementing their functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the devices provided in the above embodiments and the corresponding method embodiments are based on the same concept. The specific implementation process is detailed in the corresponding method embodiments and will not be repeated here.
[0110] An embodiment of the present invention also provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the search data mining method provided in the above method embodiment.
[0111] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for the functions, etc.; the data storage area can store data created based on the use of the device, etc. In addition, the memory can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0112] The method embodiments provided in the embodiments of the present invention can be executed in a terminal, a server or a similar computing device, that is, the above electronic device can include a terminal, a server or a similar computing device. For example, if the method is executed on a server, Figure 9As shown, it shows a structural diagram of a server for running a search data mining method provided by an embodiment of the present invention. The server 900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 910 (for example, one or more processors) and memories 930, and one or more storage media 920 (for example, one or more massive storage devices) for storing application programs 923 or data 922. Among them, the memories 930 and the storage media 920 may be temporary storage or permanent storage. The program stored in the storage medium 920 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 910 may be configured to communicate with the storage medium 920 to execute a series of instruction operations in the storage medium 920 on the server 900. The server 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input and output interfaces 940, and / or one or more operating systems 921, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0113] The input / output interface 940 can be used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of the server 900. In one example, the input / output interface 940 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the input / output interface 940 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly, and the wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0114] It can be understood by those skilled in the art that Figure 9 The structure shown is for illustration only. The server 900 may also include Figure 9 More or fewer components than shown, or with Figure 9 Different configurations shown.
[0115] An embodiment of the present invention also provides a computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a search data mining method. The at least one instruction or the at least one program is loaded and executed by the processor to implement the search data mining method provided by the above method embodiment.
[0116] Optionally, in an embodiment of the present invention, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0117] One embodiment of the present invention further provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the search data mining method provided in the various optional implementation examples described above.
[0118] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not represent the superiority or inferiority of the embodiments. The above description is of specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0119] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0120] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0121] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A search data mining method, characterized in that: include: Acquire historical search behavior data, and determine search terms and text in the historical search behavior data; Constructing a relationship network diagram based on the historical search behavior data, wherein the relationship network diagram uses the search terms and the text as nodes; Acquire multiple node sample pairs based on the relationship network graph; Constructing a graph neural network model, the graph neural network model includes multiple graph neural network layers; training the graph neural network model with the goal of minimizing the sum of word embedding distances between nodes in each of the node sample pairs to obtain a trained graph neural network model; determining the word embedding vector of each node in the relationship network graph based on the trained graph neural network model; wherein the graph neural network model includes a graph neural network layer, the graph neural network layer is used to capture the adjacent node set corresponding to the target node in each of the node sample pairs, remove the predicted target in each of the node sample pairs from the adjacent node set to obtain a target node set, and perform feature aggregation on the nodes based on the target node set; The prediction target is a node other than the target node in each node sample pair; the node sample pair includes a positive sample pair; Each node in the relationship network diagram is matched with other nodes according to the word embedding vector to obtain a matching result; the matching result includes a set of matching pairs of search terms and texts, or a set of matching pairs of search terms and search terms.
2. The method according to claim 1, characterized in that The node sample pairs include positive sample pairs and negative sample pairs; The acquiring of a plurality of node sample pairs based on the relationship network graph comprises: Based on each node in the relationship network graph performing a random walk in the relationship network graph, a plurality of positive sample pairs are obtained; Random negative sampling is performed on each node in the relationship network graph to obtain multiple negative sample pairs.
3. The method according to claim 2, characterized in that The random walk of each node in the relationship network graph in the relationship network graph to obtain multiple positive sample pairs includes: For each node in the relationship network diagram, performing a preset number of random walks in the relationship network diagram to obtain a node sequence; The node and each node in the node sequence are respectively formed into sample pairs to obtain multiple positive sample pairs.
4. The method according to claim 1 or 2, characterized in that The constructing of a relationship network diagram based on the historical search behavior data includes: Determining search term switching data and text click data in the historical search behavior data; establishing a switching relationship between the search terms according to the search term switching data, and determining a corresponding switching number; Establishing a click relationship between the search term and the text according to the text click data, and determining a corresponding number of clicks; The relationship network diagram is constructed based on the switching relationship and the click relationship.
5. The method according to claim 4, characterized in that The constructing the relationship network diagram based on the switching relationship and the click relationship includes: Using the search terms and the text as nodes of the relationship network graph; Connecting the nodes having the switching relationship and the click relationship to generate edges of the relationship network graph; The number of switches and the number of clicks are used as weights of corresponding edges to obtain the relationship network diagram.
6. The method according to claim 5, characterized in that The matching of each node in the relationship network diagram with other nodes according to the word embedding vector to obtain a matching result includes: Obtaining a plurality of first nodes corresponding to the search terms and a plurality of second nodes corresponding to the text; For each of the first nodes, determining a correlation between each of the second nodes and the first node; Acquire a second node whose correlation with the first node is greater than a preset threshold, and generate a matching node set; The first node is paired with each second node in the matching node set to obtain the matching result.
7. A search data mining device, characterized in that: include: A first acquisition module is used to acquire historical search behavior data and determine search terms and texts in the historical search behavior data; A construction module, configured to construct a relationship network diagram based on the historical search behavior data, wherein the relationship network diagram uses the search terms and the text as nodes; A second acquisition module is used to acquire a plurality of node sample pairs based on the relationship network graph; A training module is configured to train a graph neural network model using the multiple node sample pairs to obtain a word embedding vector for each node in the relational network graph; wherein the graph neural network model includes a graph neural network layer, the graph neural network layer is configured to capture a set of adjacent nodes corresponding to a target node in each of the node sample pairs, remove a predicted target in each of the node sample pairs from the set of adjacent nodes to obtain a target node set, and perform feature aggregation on the nodes based on the target node set; the predicted target is a node other than the target node in each of the node sample pairs; and the node sample pairs include positive sample pairs; A matching module, configured to match each node in the relationship network diagram with other nodes based on the word embedding vector to obtain a matching result; the matching result includes a set of matching pairs of search terms and text, or a set of matching pairs of search terms and search terms; The training module includes: A model building unit, configured to build a graph neural network model, wherein the graph neural network model includes multiple graph neural network layers; A training unit, configured to train the graph neural network model with the goal of minimizing the sum of word embedding distances between nodes in each of the node sample pairs, to obtain a trained graph neural network model; A vector generation unit is used to determine the word embedding vector of each node in the relationship network graph based on the trained graph neural network model.
8. The device according to claim 7, characterized in that The node sample pairs include positive sample pairs and negative sample pairs; the second acquisition module includes: a positive sample pair acquisition unit, configured to perform a random walk in the relationship network graph based on each node in the relationship network graph to obtain a plurality of positive sample pairs; The negative sample pair acquisition unit is used to perform random negative sampling based on each node in the relationship network graph to obtain multiple negative sample pairs.
9. The device according to claim 8, characterized in that The positive sample pair acquisition unit includes: A random walk subunit, configured to perform a preset number of random walks in the relationship network graph for each node in the relationship network graph to obtain a node sequence; The sample pair generating subunit is used to form a sample pair with the node and each node in the node sequence to obtain a plurality of positive sample pairs.
10. The device according to claim 7 or 8, characterized in that The building blocks include: a data determining unit, configured to determine search term switching data and text click data in the historical search behavior data; a switching data establishing unit, configured to establish a switching relationship between the search terms according to the search term switching data, and determine a corresponding switching number; A click data establishing unit, configured to establish a click relationship between the search term and the text according to the text click data, and determine a corresponding number of clicks; A network diagram construction unit is used to construct the relationship network diagram based on the switching relationship and the click relationship.
11. The device according to claim 10, characterized in that The network diagram construction unit includes: a node generation subunit, configured to use the search terms and the text as nodes of the relationship network graph; an edge generation subunit, configured to connect the nodes having the switching relationship and the click relationship to generate edges of the relationship network graph; The network diagram generating subunit is used to use the switching times and the click times as weights of corresponding edges to obtain the relationship network diagram.
12. The device according to claim 11, characterized in that The matching module includes: A node acquisition unit, configured to acquire a plurality of first nodes corresponding to the search terms and a plurality of second nodes corresponding to the text; a correlation determination unit, configured to determine, for each of the first nodes, a correlation between each of the second nodes and the first node; A set generating unit, configured to obtain a second node whose correlation with the first node is greater than a preset threshold, and generate a matching node set; The matching result generating unit is configured to pair the first node with each second node in the matching node set to obtain the matching result.
13. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the search data mining method according to any one of claims 1-6.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the search data mining method according to any one of claims 1 to 6.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by an electronic device, the search data mining method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Information generation method and device
CN111708876A
Method, system and device for obtaining relationship expression between entities, and advertisement recalling system
WO2020147595A1