Synonym mining

By analyzing user search logs and click behavior, combining encoded character patterns and graph neural network model, the inaccuracy problem caused by contextual differences in synonym mining is solved, and the quality and accuracy of synonym pairs are improved.

WO2024244255A1PCT designated stage expired Publication Date: 2024-12-05ZHEJIANG LAB
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/124078
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-29
Filing Date
2023-10-11
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

The existing synonym mining methods have different meanings in different contexts, resulting in inaccurate or low quality of synonyms excavated.

Method used

By obtaining the search log sequence of the user under the same session, distinguishing the exposure log and click log, extracting sub-search word strings based on the encoded character pattern, mining candidate synonyms pairs, and determining the final synonyms pairs based on the user's click behavior, using graph neural network model optimization Synonym relationship prediction.

Benefits of technology

It improves the accuracy and quality of synonym pairs, avoids different meanings of the same word in different contexts, and enhances the accuracy of synonym mining.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023124078_05122024_PF_FP_ABST
    Figure CN2023124078_05122024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present disclosure are a synonym mining method and apparatus, and a storage medium and an electronic device. In the embodiments of the present disclosure, on the basis of an exposure log and a click log in a search log sequence of a user that is generated within an identical session on the basis of a search term sequence, an encoded character string of the search log sequence and a search term string of the search term sequence are determined. On the basis of the principle that "a click after term-substituted search" represents a strong probability that a search term before term substitution and a search term upon a click after the term substitution are synonyms, a search term substring is extracted from the search term string according to a preset encoded character pattern, candidate synonym pairs are mined on the basis of the search term substring, and a final synonym pair is determined on the basis of the candidate synonym pairs. In the method, a context log of a user for search terms is used in combination with search terms before and after the execution of a click behavior of the user, such that an identical search term can be avoided from having different meanings in different context, thereby improving the accuracy of synonym pair mining.
Need to check novelty before this filing date? Find Prior Art

Description

Synonym mining Technical Field

[0001] The present disclosure relates to the field of natural language processing, and in particular to synonym mining. Background Art

[0002] Synonym mining is a very important task in natural language processing and information retrieval. Its accuracy affects many downstream tasks of natural language understanding and the effect of user search click conversion.

[0003] Typically, based on a pre-trained machine learning model, for any two words, the feature vectors of the two words are first extracted to obtain the word vectors of the two words. Then, the distance or similarity between the two word vectors is calculated to determine whether the two words are synonyms.

[0004] However, the feature extraction of the machine learning model is based on the text information of the word itself. However, the same word may express different meanings in different contexts, and the word vectors are also different, which may result in the mined synonym pairs being inaccurate or of low quality.

[0005] Summary of the Invention

[0006] The embodiments of the present disclosure provide a synonym mining method, device, storage medium and electronic device to partially solve the problems existing in the above-mentioned prior art.

[0007] The embodiments of the present disclosure adopt the following technical solutions:

[0008] The present disclosure provides a synonym mining method, comprising:

[0009] Obtaining a search log sequence generated by a user in the same session based on a search term sequence, and determining exposure logs in which no click operation was performed and click logs in which click operations were performed from the search log sequence; wherein the search term sequence is a sequence obtained by arranging the search terms in chronological order, and each search term in the search term sequence corresponds to each search log in the search log sequence;

[0010] Determine, based on the first coded character used to represent the exposure log and the second coded character used to represent the click log, a coded string corresponding to the search log sequence; determine, based on the search word sequence, a search word string; wherein each search word in the search word sequence corresponds to each coded character in the coded string;

[0011] According to a preset encoding character pattern, a sub-encoding character string satisfying the encoding character pattern is extracted from the encoding character string, and a sub-search term string corresponding to the sub-encoding character string is determined from the search term string; wherein the preset encoding character pattern includes a preceding term and a following term, the preceding term corresponds to at least one first encoding character, and the following term corresponds to a second encoding character;

[0012] Mining candidate synonym pairs based on the sub-search word string;

[0013] Based on the candidate synonym pairs, a final synonym pair is determined.

[0014] Optionally, determining a search word string according to the search word sequence includes:

[0015] Each search word in the search word sequence is serially connected using a specified separator to obtain a search word string.

[0016] Optionally, according to a preset coding character pattern, extracting a sub-coding character string that satisfies the coding character pattern from the coding character string corresponding to the search log sequence includes:

[0017] When there are multiple search log sequences, based on a preset regular matching rule, selecting a coding string corresponding to a search log sequence that meets the regular matching rule from the coding strings corresponding to the multiple search log sequences;

[0018] According to a preset encoding character pattern, a sub-encoding character string that meets the encoding character pattern is extracted from the encoding character string corresponding to the selected search log sequence that meets the regular matching rule.

[0019] Optionally, based on the sub-search word string, candidate synonym pairs are mined, including:

[0020] Determine the last search word of the sub-search word string and other search words in the sub-search word string except the last search word;

[0021] For each of the other search terms, the search term is combined with the last search term to obtain a candidate synonym pair.

[0022] Optionally, determining a final synonym pair based on the candidate synonym pairs includes:

[0023] Counting the number of times the candidate synonym pair appears in candidate synonym pairs mined from multiple sessions of multiple users as a first count, and counting the number of times the preceding search term in the candidate synonym pair appears in candidate synonym pairs mined from multiple sessions of the multiple users as a second count;

[0024] Determining a confidence level of the candidate synonym pair based on the first number of times and the second number of times;

[0025] If the confidence of the candidate synonym pair is greater than a preset confidence threshold, the candidate synonym pair is determined to be the target synonym pair;

[0026] Based on the target synonym pair, a final synonym pair is determined.

[0027] Optionally, based on the target synonym pair, a final synonym pair is determined, including:

[0028] Determine the user support count of the target synonym pair based on candidate synonym pairs mined from multiple sessions of multiple users;

[0029] If the user support number of the target synonym pair is greater than a preset support threshold, the target synonym pair is determined to be the final synonym pair.

[0030] Optionally, there are multiple final synonym pairs determined, and the method further includes:

[0031] Constructing a topological graph with each search word in the multiple final synonym pairs as a vertex and the synonym relationships between the search words as edges;

[0032] Inputting the topological graph into a graph neural network model to be trained, so that for any two search terms in the topological graph, the graph neural network model treats the two search terms as search term pairs and predicts the probability that the search term pairs have a synonym relationship;

[0033] The optimization goal is to train the graph neural network model to be trained, with the probability that the predicted search word pair belonging to the final synonym pair has a synonym relationship greater than the probability that other search word pairs have a synonym relationship, to obtain a trained graph neural network model;

[0034] After obtaining the trained graph neural network model, inputting the topological graph into the trained graph neural network model to predict, through the graph neural network model, a probability that a synonym relationship exists between any two search terms in the topological graph that are not connected by an edge;

[0035] Two search terms whose probability of being in a synonym relationship is greater than a preset probability are determined as a synonym pair.

[0036] The present disclosure provides a synonym mining device, comprising:

[0037] an acquisition module, configured to acquire a search log sequence generated by a user in the same session based on a search term sequence, and determine exposure logs in which no click operation was performed and click logs in which click operations were performed from the search log sequence; wherein the search term sequence is a sequence obtained by arranging the search terms in chronological order, and each search term in the search term sequence corresponds to each search log in the search log sequence;

[0038] A first determining module is configured to determine a coded string corresponding to the search log sequence based on a first coded character used to represent the exposure log and a second coded character used to represent the click log; and to determine a search word string based on the search word sequence; wherein each search word in the search word sequence corresponds to each coded character in the coded string;

[0039] an extraction module, configured to extract, from the encoded character string, a sub-encoded character string that satisfies a preset encoded character pattern, and determine, from the search term string, a sub-search term string corresponding to the sub-encoded character string; wherein the preset encoded character pattern includes a preceding term and a succeeding term, the preceding term corresponding to at least one first encoded character, and the succeeding term corresponding to a second encoded character;

[0040] A synonym mining module is used to mine candidate synonym pairs based on the sub-search word string;

[0041] The second determining module is configured to determine a final synonym pair based on the candidate synonym pairs.

[0042] Optionally, the first determining module is configured to serially connect each search word in the search word sequence using a specified separator to obtain a search word string.

[0043] Optionally, the extraction module is used to select, based on a preset regular matching rule, an encoding string corresponding to a search log sequence that satisfies the regular matching rule from the encoding strings corresponding to multiple search log sequences when there are multiple search log sequences; and to extract, according to a preset encoding character pattern, a sub-encoding string that satisfies the encoding character pattern from the encoding string corresponding to the selected search log sequence that satisfies the regular matching rule.

[0044] Optionally, the synonym mining module is used to determine the last search term of the sub-search term string and other search terms in the sub-search term string except the last search term; for each search term of the other search terms, combine the search term with the last search term to obtain a candidate synonym pair.

[0045] Optionally, the second determination module is configured to count the number of times the candidate synonym pair appears in candidate synonym pairs mined from multiple sessions of multiple users, as a first count, and count the number of times the search term located in the front item of the candidate synonym pair appears in candidate synonym pairs mined from multiple sessions of the multiple users, as a second count; determine the confidence of the candidate synonym pair based on the first count and the second count; if the confidence of the candidate synonym pair is greater than a preset confidence threshold, determine the candidate synonym pair as a target synonym pair; and determine a final synonym pair based on the target synonym pair.

[0046] Optionally, the second determination module is used to determine the user support number of the target synonym pair based on the candidate synonym pairs mined from multiple sessions of multiple users; if the user support number of the target synonym pair is greater than a preset support threshold, determine the target synonym pair as the final synonym pair.

[0047] Optionally, the determined final synonym pairs have multiple pairs, and the device further includes: an expansion synonym module;

[0048] The expanded synonym module is used to construct a topological graph with each search term in the multiple final synonym pairs as a vertex and the synonym relationship between the search terms as an edge; the topological graph is input into the graph neural network model to be trained, so that for any two search terms in the topological graph, the two search terms are used as search term pairs, and the probability that the search term pairs have a synonym relationship is predicted; the graph neural network model to be trained is trained with the predicted probability that the search term pairs belonging to the final synonym pairs have a synonym relationship greater than the probability that other search term pairs have a synonym relationship as the optimization goal to obtain a trained graph neural network model; after obtaining the trained graph neural network model, the topological graph is input into the trained graph neural network model to predict the probability that any two search terms in the topological graph that are not connected by edges have a synonym relationship through the graph neural network model; two search terms whose probability of having a synonym relationship is greater than a preset probability are determined as synonym pairs. The present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned synonym mining method is implemented.

[0049] The present disclosure provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned synonym mining method is implemented.

[0050] At least one of the above technical solutions adopted in the embodiments of the present disclosure can achieve the following beneficial effects:

[0051] In the embodiment of the present disclosure, based on the exposure log and click log in the search log sequence generated by the search word sequence under the same session of the user, the encoding character string of the search log sequence and the search word string of the search word sequence are determined. Based on the principle that the behavior of "clicking after changing the word to search" represents that the search word before the word change and the search word when clicking after the word change are most likely synonyms, sub-search word strings are extracted from the search word string according to the preset encoding character pattern, and candidate synonym pairs are mined based on the sub-search word strings, and the final synonym pairs are determined based on the candidate synonym pairs. In this method, the user's context log for the search word and the search words before and after the user's click behavior are used to mine synonyms, which can avoid the different meanings of the same search word in different contexts, thereby improving the accuracy of mined synonym pairs or the quality of synonym pairs. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:

[0053] FIG1 is a flow chart of a synonym mining method provided by an embodiment of the present disclosure;

[0054] FIG2 is a schematic diagram of generating a search string and an encoding string according to an embodiment of the present disclosure;

[0055] 3a and 3b are schematic diagrams of extracting sub-search word strings and sub-coding character strings according to an embodiment of the present disclosure;

[0056] FIG4 is a schematic diagram of the structure of a synonym mining device provided by an embodiment of the present disclosure;

[0057] FIG5 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0058] The synonym mining method provided in the present disclosure is intended to mine synonyms from search terms in a scenario where synonyms are mined. The method is based on the principle that "click after search after changing the term" means that the search term before the term change and the search term when clicked after the term change are likely to be synonyms, and thereby mine synonym pairs from the search term sequence under the same session.

[0059] To make the objectives, technical solutions, and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below in conjunction with the specific embodiments of the present disclosure and the corresponding drawings. The described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present disclosure.

[0060] The technical solutions provided by various embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0061] FIG1 is a flow chart of a synonym mining method provided by an embodiment of the present disclosure. The synonym mining method can be applied to a server and includes:

[0062] S100: Obtain a search log sequence generated by the user in the same session based on a search term sequence, and determine, from the search log sequence, exposure logs in which no click operation is performed and click logs in which click operations are performed; wherein, the search term sequence is a sequence obtained by arranging the search terms in chronological order, and each search term in the search term sequence corresponds to each search log in the search log sequence.

[0063] The synonym mining method in the embodiment of the present disclosure can be applied to a cloud server in a distributed system, wherein the distributed system may include: a cloud server and a user terminal, where the user terminal may be a mobile terminal device or a server.

[0064] The principle of the synonym mining method in the present disclosure is: in a search term sequence, if the user does not perform a click operation in the search page returned based on the search term before changing the search term, but after changing the search term, the user performs a click operation in the search page returned based on the search term, then it means that the search term before changing the search term is likely to be a synonym of the search term after changing the search term.

[0065] Based on the above principle, it is necessary to determine the search logs in which click operations are performed and the search logs in which no click operations are performed in the search log sequence of the same user session.

[0066] Specifically, a search log sequence generated by the user in the same session based on a search term sequence can be obtained. The search term sequence can be a sequence obtained by arranging the search terms in chronological order. Each search term in the search term sequence corresponds to each search log in the search log sequence. Then, search logs in which the user did not perform a click operation are determined from the search log sequence as exposure logs, and search logs in which the user performed a click operation are determined from the search log sequence as click logs. An exposure log can refer to a log in which a search result is displayed to the user after a search based on the search term but the user does not click on the search result. A click log can refer to a log in which a search result is displayed to the user after a search based on the search term and the user clicks on the search result.

[0067] When obtaining the search term sequence and search log sequence, the search logs generated by the user for each search term in the same session can be obtained. Then, the search terms in the same session are sorted in chronological order to obtain the search term sequence. Similarly, the search logs in the same session are sorted in chronological order to obtain the search log sequence. Sorting algorithms include bubble sort, selection sort, insertion sort, quick sort, shell sort, merge sort, heap sort, etc.

[0068] There can be multiple users, and the same user can have multiple sessions. Each user has a unique user ID, which can include a member ID for logged-in users or a device ID for logged-out users. Each session has a session ID. A user's user ID corresponds to the session ID of a session initiated by that user. Searching for a search term in a session initiated by that user generates a search term sequence within that session; that is, one search term sequence corresponds to one session ID.

[0069] For each search term in the same session, a search log for that search term is determined. The search log records information such as the search term entered by the user, the search pages returned based on the search term, the user's browsing behavior on the search page, and the user's click behavior on the search page. If a search log records a user's click behavior on a search page, it indicates that the user performed a click operation on the search page, and this search log can be considered a click log. If a search log does not record a user's click behavior on a search page, it indicates that the user did not perform a click operation on the search page, and this search log can be considered an exposure log.

[0070] It should be noted that search log sequences are generally collected by the search engine front end through event management and Kafka-like event collection components.

[0071] S102: Determine the encoding character string corresponding to the search log sequence based on the first encoding character used to represent the exposure log and the second encoding character used to represent the click log; determine the search term string based on the search term sequence; wherein each search term in the search term sequence corresponds to each encoding character in the encoding character string.

[0072] In an embodiment of the present disclosure, after obtaining a search word sequence and a search log sequence generated based on the search word sequence, the encoding character string corresponding to the search log sequence can be determined based on the first encoding character used to represent the exposure log and the second encoding character used to represent the click log. At the same time, the search word string corresponding to the search word sequence is determined based on the search word sequence. Among them, one search word in the search word sequence corresponds to one encoding character in the encoding character string, and accordingly, the search words in the search word string correspond to the encoding characters in the encoding character string one by one. The first encoding character can be represented by "0", and the second encoding character can be represented by "1". In this way, the encoding character string can be a digital string.

[0073] When determining a search string based on a search word sequence, each search word in the search word sequence is serially connected using a designated separator to obtain a search string, wherein the designated separator is a special character, such as an invisible control character.

[0074] Based on the above description, FIG2 is a schematic diagram of generating a search string and an encoding string provided by an embodiment of the present disclosure.

[0075] In Figure 2, using "|" as the designated delimiter, the search term sequence is: ABCDEF, and the search term string is: A|B|C|D|E|F. If search terms A, C, and E correspond to exposure logs, and search terms B, D, and F correspond to click logs, the encoding string corresponding to the search term sequence is: 010101.

[0076] S104: According to a preset coding character pattern, extract a sub-coding character string that satisfies the coding character pattern from the coding character string, and determine a sub-search term string corresponding to the sub-coding character string from the search term string; wherein the preset coding character pattern includes a preceding item and a following item, the preceding item corresponds to at least one first coding character, and the following item corresponds to a second coding character.

[0077] In an embodiment of the present disclosure, after determining the search word string corresponding to each search word sequence and the encoding character string corresponding to each search log sequence generated based on each search word sequence, a sub-encoding character string that satisfies the encoding character pattern can be extracted from the encoding character string corresponding to the search log sequence according to a preset encoding character pattern. Since the search words in the search word string and the encoding characters in the encoding character string are one-to-one corresponding, the sub-search word string corresponding to the sub-encoding character string can be determined from the search word string. Among them, the preset encoding character pattern includes a preceding item and a following item, the preceding item corresponds to at least one first encoding character, and the following item corresponds to a second encoding character. The preset encoding character pattern may include: "01", "001", "0001", etc.

[0078] When there are multiple search log sequences, for each search log sequence, based on a preset encoding character pattern, a sub-encoding character string that satisfies the encoding character pattern is extracted from the encoding character string corresponding to the search log sequence to obtain the sub-encoding character string corresponding to the search log sequence. Then, a sub-search term string corresponding to the sub-encoding character string is determined from the search term string corresponding to the search term sequence that matches the search log sequence. A single encoding character string corresponding to a search log sequence may contain multiple sub-encoding character strings.

[0079] However, the encoding strings corresponding to some search log sequences do not contain the preset encoding character pattern. Therefore, in order to reduce the number of extracted encoding strings, the encoding strings corresponding to all search log sequences can be filtered first, and the encoding strings that meet the preset encoding character pattern can be retained.

[0080] Specifically, based on a preset regular matching rule, a coding string corresponding to a search log sequence that meets the regular matching rule is selected from coding strings corresponding to multiple search log sequences. Then, according to a preset coding character pattern, a sub-coding string that meets the preset coding character pattern is extracted from the coding string corresponding to the selected search log sequence that meets the regular matching rule. The regular matching rule can be "0+1". "+" means at least one zero. "0+1" means: at least one 0 and one 1, and at least one 0 is located before the 1.

[0081] Based on the above description, FIG. 3 a and FIG. 3 b are schematic diagrams of extracting sub-search word strings and sub-coding character strings provided by an embodiment of the present disclosure.

[0082] In Figure 3a, if there are three search strings, namely: A|B|C|D|E|F, J|K|H|I, and G|H|L|I|E|F, the corresponding encoding strings for these three search strings are: 010101, 1111, and 100101. According to the preset regular matching rule, the encoding strings containing at least one 0 and one 1 are selected from the three encoding strings, namely 010101 and 100101, and 1111 is filtered out. Then, in Figure 3b, for 010101, the three sub-encoding strings extracted from this encoding string are: 01, 01, 01, and the sub-search strings are: A|B, C|D, and E|F. For 100101, the two sub-encoding strings extracted from this encoding string are: 001 and 01, and the sub-search strings are: H|L|I and E|F.

[0083] S106: Based on the sub-search word string, mining candidate synonym pairs.

[0084] In the embodiment of the present disclosure, after extracting sub-search strings from each search string, candidate synonym pairs can be mined based on each sub-search string. Mining algorithms may include: Apriori algorithm, FPgrowth algorithm, GSP algorithm, FreeSpan algorithm, PrefixSpan algorithm, and Disc-all algorithm.

[0085] Considering that the candidate synonym pairs belong to the frequent binaries, the search terms contained in the sub-search term strings can be paired with each other to mine the candidate synonym pairs.

[0086] Specifically, the last search word in the sub-search string and other search words in the sub-search string except the last search word are determined. Then, for each search word in the other search words, the search word is combined with the last search word to obtain a candidate synonym pair.

[0087] When there are multiple sub-search term strings, for each sub-search term string, the last search term in the sub-search term string and the other search terms in the sub-search term string except the last search term are determined. Then, for each search term in the sub-search term string, the search term is combined with the last search term in the sub-search term string to obtain a candidate synonym pair.

[0088] In this way, candidate synonym pairs can be mined from the search word sequences of different users in different sessions.

[0089] For example: if the sub-coding string is 01 and the sub-search term string is A|B, then the sub-search term string has only two search terms, and these two search terms are candidate synonym pairs, namely A|B; if the sub-coding string is 001 and the sub-search term string is C|D|E, then the last search term of the sub-search term string is E, and the other search terms are CD, and the candidate synonym pairs are: C|E and D|E.

[0090] S108: Determine a final synonym pair based on the candidate synonym pairs.

[0091] In the embodiment of the present disclosure, after obtaining each candidate synonym pair, it is necessary to filter each candidate synonym pair and select the candidate synonym pairs with a greater possibility of having a synonym relationship as the final synonym pair.

[0092] Specifically, the number of times the candidate synonym pair appears in candidate synonym pairs mined from multiple conversations of multiple users is counted as a first count, and the number of times the preceding search term in the candidate synonym pair appears in candidate synonym pairs mined from multiple conversations of the multiple users is counted as a second count. Then, based on the first and second counts, the confidence level of the candidate synonym pair is determined. The confidence level is determined as the ratio between the first and second counts. The larger the ratio, the greater the confidence level, indicating a more reliable candidate synonym pair.

[0093] Afterwards, if the confidence of the candidate synonym pair is greater than a preset confidence threshold, the candidate synonym pair is determined to be the target synonym pair, and the target synonym pair can be directly used as the final synonym pair.

[0094] It should be noted that each target synonym pair selected from each candidate synonym is different.

[0095] In this disclosure, we consider that the same user may frequently search for the same search term, which may result in even highly trusted target synonym pairs being unreliable. Therefore, we re-evaluate the credibility of target synonym pairs, removing frequent occurrences of the same search term by the same user or within the same session. Specifically, after selecting each target synonym pair, we determine the final synonym pair based on each target synonym pair.

[0096] Specifically, based on candidate synonym pairs mined from multiple user conversations, the user support count for the target synonym pair is determined. If the user support count for the target synonym pair exceeds a preset support threshold, the target synonym pair is determined to be the final synonym pair. Finally, each final synonym pair can be saved in a synonym library so that it can be used when executing downstream tasks.

[0097] When determining the user support count for a target synonym pair mined from all sessions of each user, for each user, the user's search log sequences from different sessions can be first determined. Sub-encoded strings are then extracted from the encoded strings corresponding to the search log sequences from different sessions, and sub-search term strings corresponding to the sub-encoded strings are determined from the search term strings. Based on the sub-search term strings, candidate synonym pairs are mined as the candidate synonym pairs mined from all sessions of the user. Then, for each arbitrary target synonym pair, the number of users that contain the target synonym pair is determined based on the candidate synonym pairs mined from all sessions of each user, which serves as the user support count for the target synonym pair.

[0098] In the disclosed embodiment, after the final synonym pairs are determined, a graph neural network model can be trained, and the trained graph neural network model can be used to predict synonym pairs that have not been mined based on the search term sequence to expand the number of synonym pairs. The graph neural network model can include: GCN (Graph Convolutional Network), GAT (Graph Attention Network), and GraphSage.

[0099] Specifically, a topological graph is constructed with each search term in multiple final synonym pairs as a vertex and the synonym relationships between search terms as edges. The topological graph is then input into the graph neural network model to be trained. The graph neural network model uses any two search terms in the topological graph as search term pairs and predicts the probability that the search term pairs have a synonym relationship. In this way, all search term pairs contain both final synonym pairs (i.e., positive samples) and search term pairs other than the final synonym pairs (i.e., negative samples).

[0100] The optimization goal is to ensure that the predicted probability of synonymy among the final synonym pairs is greater than the probability of synonymy among other search pairs. The trained graph neural network model is then trained to obtain a trained graph neural network model. Other search pairs refer to all search pairs except the final synonym pairs.

[0101] That is, the graph neural network model is trained with the optimization goal that the probability that the positive sample is a synonym pair is greater than the probability that the negative sample is a synonym pair.

[0102] Among them, when the optimization goal is to take the probability that the predicted final synonym pair exists in a synonym relationship greater than the probability that other search word pairs exist in a synonym relationship, when training the graph neural network model to be trained, the loss is determined according to the predicted probability that the final synonym pair exists in a synonym relationship and the predicted probability that other search word pairs exist in a synonym relationship, and the graph neural network model to be trained is trained with the minimum loss as the optimization goal.

[0103]

[0104] After obtaining the trained graph neural network model, the topology graph can be input into the trained graph neural network model to predict the probability of a synonym relationship between any two search terms in the topology graph that are not connected by an edge. Two search terms with a probability of a synonym relationship greater than a preset probability are determined as synonym pairs, and the determined synonym pairs are saved in a synonym library to expand the synonym library.

[0105] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the corresponding data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0106] It can be seen from the method shown in Figure 1 above that the present disclosure determines the encoding character string of the search log sequence and the search term string of the search term sequence based on the exposure log and click log in the search log sequence generated by the search term sequence under the same session of the user. Based on the principle that "click after search after changing the term" means that the search term before the term change and the search term when clicked after the term change are most likely synonyms, sub-search term strings are extracted from the search term string according to the preset encoding character pattern, and candidate synonym pairs are mined based on the sub-search term strings, and the final synonym pairs are determined based on the candidate synonym pairs. In this method, the user's context log for the search term and the search terms before and after the user performs the click behavior are used to mine synonyms, which can avoid the different meanings of the same search term in different contexts, thereby improving the accuracy of mined synonym pairs or the quality of synonym pairs.

[0107] The above is the synonym mining method provided by the embodiment of the present disclosure. Based on the same idea, the present disclosure also provides corresponding devices, storage media and electronic devices.

[0108] FIG4 is a schematic diagram of the structure of a synonym mining device provided by an embodiment of the present disclosure, wherein the device includes:

[0109] Acquisition module 401 is configured to acquire a search log sequence generated by a user in the same session based on a search term sequence, and determine exposure logs in which no click operation was performed and click logs in which click operations were performed from the search log sequence; wherein the search term sequence is a sequence obtained by arranging the search terms in chronological order, and each search term in the search term sequence corresponds to each search log in the search log sequence;

[0110] The first determining module 402 is configured to determine a coded string corresponding to the search log sequence based on a first coded character representing the exposure log and a second coded character representing the click log; and determine a search string based on the search word sequence; wherein each search word in the search word sequence corresponds to each coded character in the coded string;

[0111] Extraction module 403 is configured to extract, from the encoded character string, a sub-encoded character string that satisfies the encoded character pattern according to a preset encoded character pattern, and determine, from the search term string, a sub-search term string corresponding to the sub-encoded character string; wherein the preset encoded character pattern includes a preceding term and a succeeding term, the preceding term corresponding to at least one first encoded character, and the succeeding term corresponding to a second encoded character;

[0112] A synonym mining module 404 is used to mine candidate synonym pairs based on the sub-search word string;

[0113] The second determining module 405 is configured to determine a final synonym pair based on the candidate synonym pairs.

[0114] Optionally, the determined final synonym pairs have multiple ones, and the apparatus further includes: an expanding synonym module 406;

[0115] The expanded synonym module 406 is used to construct a topological graph with each search term in the multiple final synonym pairs as a vertex and the synonym relationship between the search terms as an edge; the topological graph is input into the graph neural network model to be trained, so that for any two search terms in the topological graph, the two search terms are used as search term pairs, and the probability that the search term pairs have a synonym relationship is predicted; the graph neural network model to be trained is trained with the predicted probability that the search term pairs belonging to the final synonym pairs have a synonym relationship greater than the probability that other search term pairs have a synonym relationship as an optimization goal to obtain a trained graph neural network model; after obtaining the trained graph neural network model, the topological graph is input into the trained graph neural network model to predict the probability that any two search terms in the topological graph that are not connected by edges have a synonym relationship through the graph neural network model; two search terms whose probability of having a synonym relationship is greater than a preset probability are determined as synonym pairs.

[0116] Optionally, the first determining module 402 is specifically configured to serially connect each search word in the search word sequence using a specified separator to obtain a search word string.

[0117] Optionally, the extraction module 403 is specifically used to, when there are multiple search log sequences, select, based on a preset regular matching rule, a coding string corresponding to a search log sequence that satisfies the regular matching rule from the coding strings corresponding to multiple search log sequences; and extract, according to a preset coding character pattern, a sub-coding string that satisfies the coding character pattern from the coding string corresponding to the selected search log sequence that satisfies the regular matching rule.

[0118] Optionally, the synonym mining module 404 is specifically used to determine the last search term of the sub-search term string and other search terms in the sub-search term string except the last search term; for each search term of the other search terms, combine the search term with the last search term to obtain a candidate synonym pair.

[0119] Optionally, the second determination module 405 is specifically configured to count the number of times the candidate synonym pair appears in candidate synonym pairs mined from multiple sessions of multiple users, as a first count, and count the number of times the search term located in the front item of the candidate synonym pair appears in candidate synonym pairs mined from multiple sessions of the multiple users, as a second count; determine the confidence of the candidate synonym pair based on the first count and the second count; if the confidence of the candidate synonym pair is greater than a preset confidence threshold, determine the candidate synonym pair as a target synonym pair; and determine a final synonym pair based on the target synonym pair.

[0120] Optionally, the second determination module 405 is specifically used to determine the user support number of the target synonym pair based on the candidate synonym pairs mined from multiple sessions of multiple users; if the user support number of the target synonym pair is greater than a preset support threshold, determine the target synonym pair as the final synonym pair.

[0121] The present disclosure also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute the synonym mining method provided in FIG. 1 above.

[0122] Based on the synonym mining method shown in Figure 1, the present disclosure also provides a schematic diagram of the structure of an electronic device shown in Figure 5. As shown in Figure 5, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, memory, and non-volatile storage, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile storage into the memory and then runs it to implement the synonym mining method described in Figure 1.

[0123] Of course, in addition to software implementation, this disclosure does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0124] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages ​​and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0125] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.

[0126] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0127] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0128] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0129] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0130] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0132] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0133] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0134] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0135] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0136] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Thus, the present disclosure may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0137] The present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present disclosure may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0138] The various embodiments of this disclosure are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so their description is relatively simple. For relevant portions, refer to the description of the method embodiments.

[0139] The foregoing is merely an embodiment of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims of the present disclosure.

Claims

1. A synonym mining method, characterized in that: include: Acquire a search log sequence generated by the user based on a search word sequence in the same session, and determine an exposure log without a click operation and a click log with a click operation from the search log sequence; wherein the search word sequence is a sequence obtained by arranging the search words in chronological order, and each search word in the search word sequence corresponds to each search log in the search log sequence; Determine the encoding string corresponding to the search log sequence according to the first encoding character used to represent the exposure log and the second encoding character used to represent the click log; determine the search word string according to the search word sequence; wherein each search word in the search word sequence corresponds to each encoding character in the encoding string; According to a preset coding character pattern, a sub-coding character string satisfying the coding character pattern is extracted from the coding character string, and a sub-search term string corresponding to the sub-coding character string is determined from the search term string; wherein the preset coding character pattern includes a preceding term and a succeeding term, the preceding term corresponds to at least one first coding character, and the succeeding term corresponds to a second coding character; Based on the sub-search word string, mining candidate synonym pairs; Based on the candidate synonym pairs, a final synonym pair is determined.

2. The method according to claim 1, characterized in that Determining a search word string according to the search word sequence includes: Each search word in the search word sequence is serially connected using a designated separator to obtain a search word string.

3. The method according to claim 1, characterized in that According to a preset coding character pattern, extracting a sub-coding character string satisfying the coding character pattern from the coding character string corresponding to the search log sequence includes: When there are multiple search log sequences, based on a preset regular matching rule, a coding string corresponding to a search log sequence that satisfies the regular matching rule is selected from the coding strings corresponding to the multiple search log sequences; According to a preset coding character pattern, a sub-coding character string satisfying the coding character pattern is extracted from the coding character string corresponding to the selected search log sequence satisfying the regular matching rule.

4. The method according to claim 1, characterized in that Based on the sub-search string, candidate synonym pairs are mined, including: Determine the last search word of the sub-search word string and other search words in the sub-search word string except the last search word; For each of the other search terms, the search term is combined with the last search term to obtain a candidate synonym pair.

5. The method according to claim 1, characterized in that Based on the candidate synonym pairs, a final synonym pair is determined, including: Counting the number of times the candidate synonym pair appears in the candidate synonym pairs mined under multiple sessions of multiple users as a first count, and counting the number of times the search term located in the front item of the candidate synonym pair appears in the candidate synonym pairs mined under multiple sessions of the multiple users as a second count; Determining the confidence of the candidate synonym pair according to the first number of times and the second number of times; If the confidence of the candidate synonym pair is greater than a preset confidence threshold, the candidate synonym pair is determined to be a target synonym pair; Based on the target synonym pair, a final synonym pair is determined.

6. The method according to claim 5, characterized in that Based on the target synonym pair, a final synonym pair is determined, including: Determine the user support number of the target synonym pair according to the candidate synonym pairs mined from multiple sessions of multiple users; If the user support number of the target synonym pair is greater than a preset support threshold, the target synonym pair is determined to be the final synonym pair.

7. The method according to claim 1, characterized in that The determined final synonym pairs have a plurality of pairs, and the method further comprises: Taking each search word in the multiple final synonym pairs as a vertex, the synonym relationship between the search words The system is used as an edge to construct a topological graph; The topological graph is input into a graph neural network model to be trained, so that for any two search terms in the topological graph, the two search terms are used as search term pairs, and the probability that the search term pairs have a synonym relationship is predicted through the graph neural network model; Taking the probability that the predicted search word pairs belonging to the final synonym pair have a synonym relationship as greater than the probability that other search word pairs have a synonym relationship as the optimization goal, the graph neural network model to be trained is trained to obtain a trained graph neural network model; After obtaining the trained graph neural network model, inputting the topological graph into the trained graph neural network model to predict, through the graph neural network model, the probability that a synonym relationship exists between any two search terms in the topological graph that are not connected by an edge; Two search terms whose probability of being in a synonym relationship is greater than a preset probability are determined as a synonym pair.

8. A synonym mining device, characterized in that: include: An acquisition module is used to acquire a search log sequence generated by a user in the same session based on a search word sequence, and determine an exposure log for which a click operation is not performed and a click log for which a click operation is performed from the search log sequence; wherein the search word sequence is a sequence obtained by arranging the search words in chronological order, and each search word in the search word sequence corresponds to each search log in the search log sequence; A first determination module is used to determine the coded character string corresponding to the search log sequence according to the first coded character used to represent the exposure log and the second coded character used to represent the click log; and to determine the search term string according to the search term sequence; wherein each search term in the search term sequence corresponds to each coded character in the coded character string; An extraction module is used to extract a sub-encoded string satisfying the encoding character pattern from the encoding string according to a preset encoding character pattern, and determine a sub-search term string corresponding to the sub-encoded string from the search term string; wherein the preset encoding character pattern includes a preceding term and a succeeding term, the preceding term corresponds to at least one first encoding character, and the succeeding term corresponds to a second encoding character; A synonym mining module is used to mine candidate synonym pairs based on the sub-search word string; The second determination module is used to determine a final synonym pair based on the candidate synonym pairs.

9. The device according to claim 8, characterized in that The first determining module is used to serially connect each search word in the search word sequence using a specified separator to obtain a search word string.

10. The device according to claim 8, characterized in that The extraction module is used to select, based on a preset regular matching rule, a coded string corresponding to a search log sequence that satisfies the regular matching rule from coded strings corresponding to multiple search log sequences when there are multiple search log sequences; and to extract, according to a preset coded character pattern, a sub-coded string that satisfies the coded character pattern from the coded string corresponding to the selected search log sequence that satisfies the regular matching rule.

11. The device according to claim 8, characterized in that The synonym mining module is used to determine the last search word of the sub-search word string and other search words in the sub-search word string except the last search word; for each search word of the other search words, the search word is combined with the last search word to obtain a candidate synonym pair.

12. The device according to claim 8, characterized in that The second determination module is used to count the number of times the candidate synonym pair appears in the candidate synonym pairs mined under multiple sessions of multiple users, as a first count, and count the number of times the search term located in the front item of the candidate synonym pair appears in the candidate synonym pairs mined under multiple sessions of the multiple users, as a second count; Determining the confidence of the candidate synonym pair according to the first number of times and the second number of times; If the confidence of the candidate synonym pair is greater than a preset confidence threshold, the candidate synonym pair is determined to be a target synonym pair; Based on the target synonym pair, a final synonym pair is determined.

13. The device according to claim 12, characterized in that The second determination module is used to determine the user support number of the target synonym pair based on the candidate synonym pairs mined from multiple sessions of multiple users; if the user support number of the target synonym pair is greater than a preset support threshold, determine the target synonym pair as the final synonym pair.

14. The device according to claim 8, characterized in that The determined final synonym pairs have a plurality of pairs, and the device further comprises: an expansion synonym module; The expanded synonym module is used to construct a topological graph with each search word in the multiple final synonym pairs as a vertex and the synonym relationship between the search words as an edge; the topological graph is input into the graph neural network model to be trained, so that through the graph neural network model, for any two search words in the topological graph, the two search words are used as search word pairs, and the probability of the search word pairs having a synonym relationship is predicted; the graph neural network model to be trained is trained with the predicted probability of the search word pairs belonging to the final synonym pairs having a synonym relationship being greater than the probability of the other search word pairs having a synonym relationship as an optimization goal to obtain a trained graph neural network model; after obtaining the trained graph neural network model, the topological graph is input into the trained graph neural network model to predict the probability of the existence of a synonym relationship between any two search words in the topological graph that are not connected by edges through the graph neural network model; and two search words whose probability of having a synonym relationship is greater than a preset probability are determined as a synonym pair.

15. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • A method and apparatus for mine synonyms

    CN109508414A

  • Synonym acquisition method and device

    CN113988056A

  • Synonym mining method and device, electronic equipment and computer storage medium

    CN114462396A

  • Synonym mining method and device, storage medium and electronic equipment

    CN116340469A

  • System, method, and non-transitory computer-readable storage media for generating synonyms of a search query

    US20160253418A1