Word similarity determination method, device, storage medium and computer equipment

The definition set and synonym meaning set are determined by synonym word forest, and the meaning similarity is calculated to improve the word similarity, which solves the problem of label inconsistency in intelligent voice search and improves the accuracy of data matching.

CN114548124BActive Publication Date: 2024-11-22SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210175343.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2024-11-22
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

When searching for videos, the smart voice function causes inconsistency in labeling systems due to the differences between user language habits and media labeling systems, which reduces the quality and quantity of data return and reduces the accuracy of data matching.

Method used

The meaning set of words is determined through the synonym forest, and the synonym meaning set in the leaf nodes is considered, and the meaning similarity is calculated to determine the word similarity and improve matching accuracy.

Benefits of technology

It improves the accuracy of word similarity determination, enhances the accuracy of data matching, and solves the problem of inconsistency between user voice tags and media tags.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114548124B_ABST
    Figure CN114548124B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, storage medium, and computer device for determining word similarity. The method, applied in a computer device, includes: determining a first meaning set corresponding to a first word and a second meaning set corresponding to a second word based on a thesaurus; determining the first synonym meaning set of the first meaning located at a leaf node in the first meaning set; determining the second synonym meaning set of the second meaning located at a leaf node in the second meaning set; determining the meaning similarity between each first meaning and each second meaning based on each first meaning and each second meaning, and between each first synonym meaning in the first synonym meaning set and each second synonym meaning in the second synonym meaning set; and determining the similarity between the first word and the second word based on the meaning similarity. The embodiments of this application improve the accuracy of word similarity determination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device, storage medium and computer equipment for determining word similarity. Background Art

[0002] In recent years, with the continuous advancement of Internet information technology, intelligent voice functions have been increasingly used. For example, intelligent voice functions are used to control smart home appliances. For example, for smart TVs, the intelligent voice function can be used to search for TV series / movies / short videos, etc., especially for children or the elderly who are not very literate, the intelligent voice function provides great convenience.

[0003] When users use the intelligent voice function to search for movies, they usually identify the tags in the voice information and compare the tags with the media tags in the media tag system to return the movies corresponding to the media tags that match the corresponding tags. Usually, the media tag system is relatively fixed, for example, including comedy, family ethics, campus, horror, war, etc.

[0004] Since users who use the intelligent voice function to search have different language habits and user objects, when searching, the labels in the user's high-frequency words may not be consistent with the media labels expressed in writing in the media label system. For example, users are accustomed to searching for "war films", but the corresponding media label is "war films", which leads to failure to match correctly. In addition, there are a large number of labels in the user's voice that are similar in meaning to the media labels in the media label system, but not exactly the same, so they cannot be matched well, resulting in reduced quality and quantity of media data returned, and reduced accuracy of data matching. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, storage medium and computer equipment for determining word similarity, which can improve the accuracy of determining word similarity and improve the accuracy of data matching.

[0006] The present application provides a method for determining word similarity, including:

[0007] Obtain a first word and a second word whose similarity needs to be determined;

[0008] Determine a first meaning set corresponding to the first word and a second meaning set corresponding to the second word based on the synonym dictionary;

[0009] Determine, based on the synonym dictionary, a synonym set of a first meaning item in a leaf node in the first meaning set as a first synonym set, and determine a synonym set of a second meaning item in a leaf node in the second meaning set as a second synonym set;

[0010] Determining the meaning similarity between each first meaning and each second meaning according to each first meaning in the first meaning set and each second meaning in the second meaning set, and each first synonym meaning in the first synonym meaning set and each second synonym meaning in the second synonym meaning set;

[0011] The similarity between the first word and the second word is determined according to the sense similarity.

[0012] The embodiment of the present application also provides a device for determining word similarity, including:

[0013] An acquisition module, used for acquiring a first word and a second word for which similarity needs to be determined;

[0014] A first meaning item determination module is used to determine a first meaning item set corresponding to a first word and a second meaning item set corresponding to a second word based on a synonym word forest;

[0015] A second meaning item determination module is used to determine, based on the synonym word forest, a synonym meaning item set of a first meaning item in a leaf node in the first meaning item set as a first synonym meaning item set, and to determine a synonym meaning item set of a second meaning item in a leaf node in the second meaning item set as a second synonym meaning item set;

[0016] A first similarity determination module is used to determine the meaning similarity between each first meaning and each second meaning according to each first meaning in the first meaning set and each second meaning in the second meaning set, and each first synonym meaning in the first synonym meaning set and each second synonym meaning in the second synonym meaning set;

[0017] The second similarity determination module is used to determine the similarity between the first word and the second word according to the semantic similarity.

[0018] An embodiment of the present application further provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor to execute any of the above-mentioned word similarity determination methods.

[0019] An embodiment of the present application also provides a computer device, including a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used for the steps in any of the above-mentioned word similarity determination methods.

[0020] The present application provides a method, apparatus, storage medium and computer device for determining word similarity. The method determines a first sense set corresponding to a first word and a second sense set corresponding to a second word through a synonym word forest, determines a synonym sense set in a leaf node of a first sense set in a first sense set as a first synonym sense set, and determines a synonym sense set in a leaf node of a second sense set in a second sense set as a second synonym sense set. The method determines sense similarities between each first sense and each second sense according to each first sense in the first sense set and each second sense in the second sense set, and each first synonym sense in the first synonym sense set and each second synonym sense in the second synonym sense set, and determines the similarity between the first word and the second word according to the sense similarities. In the scheme for determining word similarity in the embodiment of the present application, the determination of the meaning similarity between the first meaning and the second meaning not only considers the first meaning and the second meaning themselves, but also considers the synonym meaning set of the first meaning at the leaf node and the second meaning at the leaf node, that is, the set of other meanings encoded as "=" in the leaf node where the first meaning and the second meaning are located is also considered. Since the synonym meanings in the leaf node include more information and the synonym meanings are similar to the corresponding first meaning and second meaning, in this way, the synonym meaning set is used to enhance the influence on the similarity between the first meaning and the second meaning, thereby improving the situation where the first meaning and the second meaning belong to different major branches under the synonym word forest and the meaning similarity is extremely low, thereby improving the accuracy of determining word similarity and further improving the accuracy of data matching. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The technical solution and other beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.

[0022] Figure 1 A schematic diagram of a synonym dictionary provided in an embodiment of the present application.

[0023] Figure 2 This is an example flowchart of a method for determining word similarity provided in an embodiment of the present application.

[0024] Figure 3 A schematic diagram of a sub-process of a method for determining word similarity provided in an embodiment of the present application.

[0025] Figure 4 A schematic diagram of determining the shortest path length provided in an embodiment of the present application.

[0026] Figure 5 A schematic diagram for determining the similarity between two meanings provided in an embodiment of the present application.

[0027] Figure 6 A schematic diagram of determining the similarity between two words provided in an embodiment of the present application.

[0028] Figure 7 A schematic diagram of the structure of a device for determining word similarity provided in an embodiment of the present application.

[0029] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present application.

[0030] Fig. 9 Another structural schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0032] The embodiments of the present application provide a method, device, storage medium and computer equipment for determining word similarity. Any word similarity determination device provided in the embodiments of the present application can be integrated in a computer device, which includes a terminal or a server. The terminal may include a smart phone, a pad, a wearable device, a robot, a smart TV, a smart air conditioner, a smart car device, a personal computer (PC, Personal Computer), etc. The server can be an independent physical server, a service node in a blockchain system, a server cluster 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 (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0033] The computer device provides a word (keyword) matching function. For example, the computer device provides an intelligent voice function, which receives the user's voice, extracts the words (keywords) in the user's voice, matches the words (keywords) with preset words (preset keywords) to determine the similarity; or the computer device provides a search function, matches the words (keywords) with preset words (preset keywords) according to the words (keywords) input by the user to determine the similarity, and finally provides a certain service based on the similarity. Among them, the preset words (preset keywords) can be media asset tags, etc.

[0034] In this application, the determination of word similarity is explained by using a synonymous word forest, which is an improved version of the synonymous word forest of the Chinese word library compiled by Mei Jiaju et al. in 1983 by Harbin Institute of Technology.

[0035] In this version, the Synonym Cilin contains more than 70,000 words, 12 major categories, 94 medium categories, 1,428 minor categories, 4,026 word groups and 17,797 atomic groups. Figure 1 As shown in the figure, the synonym dictionary has a five-layer tree structure, and each node may contain multiple words. The first four layers of nodes represent categories, while the leaf nodes store words and their synonyms, related words, etc. The first to third categories are mostly nouns, numerals and quantifiers are in the fourth category, the fifth category is mostly adjectives, the sixth to tenth categories are mostly verbs, the eleventh category is mostly function words, and the twelfth category is some words that are difficult to be classified into the above categories. The sorting of the major and medium categories follows the principle of concrete concepts to abstract concepts.

[0036] Please see Figure 1 Combined with Table 1, the synonym dictionary provides a total of five levels of coding, and the coding of words in the synonym dictionary is 8 bits. The second level is represented by uppercase English letters, occupying 1 bit; the third level is represented by lowercase English letters, occupying 1 bit; the fourth level is represented by two-digit decimal integers, occupying 2 bits; the fifth level is represented by uppercase English letters, occupying 1 bit; the sixth level is represented by two-digit decimal integers, occupying 2 bits; the last bit, that is, the eighth bit, has three cases: "=" means "equal", "synonymous". "#" means "unequal", "same type", "related". "@" means "self-enclosed", "independent", which has no synonyms or related words in the dictionary. For example, "Ae07C01=fisherman fisherman fisherman fisherman fisherman fisherman fisherman", where "Ae07C01=" is the meaning code, and "fisherman fisherman fisherman fisherman fisherman fisherman" is the word of this category. The same word may exist in different categories at the same time, that is, the meaning code of the word is not unique. Among them, words have multiple meanings, and the meaning is one of their semantic definitions or explanations.

[0037] Table 1 Coding structure of words in the synonym dictionary

[0038]

[0039] Before introducing in detail the method for determining word similarity in the embodiment of the present application, the current research on word similarity based on the synonym dictionary is briefly introduced.

[0040] Regarding the calculation of similarity, DeKang Lin believes that the similarity between any two objects depends on their commonalities and individuality. He gives a general formula for the similarity between any two objects from the perspective of information theory. The general formula is shown in formula (1).

[0041]

[0042] The numerator is the amount of information needed to describe the commonality of s1 and s2, and the denominator is the amount of information needed to fully describe s1 and s2. DeKang Lin's theory is the basic idea of ​​the word similarity calculation model of most semantic dictionary-based methods.

[0043] When Wu et al. were working on the word selection problem in machine translation, they proposed a method based on the depth of the nearest common parent node and the length of the path between the two semantic terms. They defined the similarity calculation formula of the word meanings s1 and s2 as shown in formula (2).

[0044]

[0045] Where H is the number of layers of the nearest common parent node (LCP) of the meaning item s1 and the meaning item s2 in the synonym word forest, and D is the shortest path length of s1 and s2 in the synonym word forest. In the prior art, the shortest path length is the sum of the path length from the branch node where s1 is located to the nearest common parent node and the path length from the branch node where s2 is located to the nearest common parent node. Afterwards, the formula for calculating word similarity based on the path is mostly improved on the above formula (2). For example, Chen Hongchao et al. considered the influence of the word forest density on the meaning similarity in combination with formula (2) and proposed an improved algorithm for (2), as shown in the following formula (3).

[0046]

[0047] Where α is set between 0 and 1 to avoid the root node depth being 0. Among them, i is the number of the layer where the branch node is located, weight(i) is the weight of the edge connecting the branch node and the nearest common parent node, the edges corresponding to each layer in the synonym dictionary have different weights, and the closer to the root layer, the greater the weight, N represents the number of direct children of the nearest common parent node (LCP) of the two senses, and K represents the branch distance between the two senses in the nearest common parent node.

[0048] The above is a path-based word similarity calculation method. The following is a brief introduction to the information content-based word similarity calculation method of CiLin.

[0049] The use of ontology and information content to calculate word similarity can be traced back to Resnik in 1995, that is, the similarity of a pair of words is determined by their commonality (i.e., common parent node). Based on this, a variety of widely used word similarity calculation methods have been derived. Resnik determines the similarity of two words by the information content of their common parent node, and expresses its information content by the probability of the parent node. For details, please refer to formula (4) and formula (5).

[0050] sim Resnik (s1,s2)=IC(LCS(s1,s2)) (4)

[0051] IC Resnik (C) = -log(P(C)) (5)

[0052] Where IC(C) represents the information content of node C, and LCS(s1,s2) represents the nearest common parent node of senses s1 and s2. Seco et al. adjusted the information content calculation method based on Resnik, and introduced the hierarchy and the number of subordinate nodes to assist in the calculation. The lower the hierarchy, the fewer the number of child nodes, and the richer the information it contains. For details, please refer to formula (6).

[0053]

[0054] Where hypo(C) is the number of child nodes of C node, and maxnodes is the number of all leaf nodes in the synonym dictionary. Lin's research adds the influence of the information content of the two words themselves on the basis of Resnik; Meng et al. made nonlinear improvements to Lin's calculation method.

[0055] The existing word similarity calculation method based on the synonym dictionary is single and has a strong scope restriction. Similarity calculation cannot be performed on words outside the dictionary (similarity is 0), and the parts of speech are clearly distinguished (the first to third categories are nouns, the fourth category is numerals and quantifiers, and the fifth category is mostly adjectives). The results are highly subjective. Directly using the existing word similarity calculation method to calculate media asset tags will result in incomplete dictionary coverage, great influence of parts of speech, and different features (similarity) as the calculation method changes.

[0056] The existing method for determining word similarity based on the synonym dictionary cannot well reflect the similarities of words. The word similarity completely depends on the path and the position of the dictionary, and cannot well show the similarities of words in different categories: if two meanings belong to different categories under the synonym dictionary, the similarity is very low and close to 0. For example, "love", "love", and "romance" should be synonyms for media labels. However, in the existing method for determining word similarity based on the synonym dictionary, "love" belongs to different categories, "love" has a low similarity with "love" and "romance", while "romance" has a very high similarity with "love", which reduces the accuracy of determining word similarity.

[0057] To solve the above problems, the embodiments of the present application propose a method, apparatus, computer-readable storage medium, and computer device for determining word similarity. The method, apparatus, computer-readable storage medium, and computer device for determining word similarity in the embodiments of the present application will be described in detail below. It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0058] Figure 2 FIG. 4 is a schematic flowchart of the method for determining word similarity provided by the embodiments of the present application. The method for determining word similarity is applied to a computer device and includes the following steps.

[0059] 101. Obtain a first word and a second word for which similarity needs to be determined.

[0060] Among them, the first word and the second word can be a single word respectively, or can be multiple words. For example, if the first word is a single word and the second word is multiple words, the similarity between the first word and each of the multiple words in the second word is determined one by one. The embodiments of the present application take the first word and the second word being a single word respectively as an example for illustration.

[0061] 102. Based on the Thesaurus, determine a first set of semantic items corresponding to the first word and a second set of semantic items corresponding to the second word.

[0062] Based on the Thesaurus, find the semantic item corresponding to the first word, and use the set of semantic items corresponding to the first word as the first set of semantic items. At the same time, find the semantic item corresponding to the second word, and use the set of semantic items corresponding to the second word as the second set of semantic items.

[0063] Table 2 Semantic item codes of "fight" and "war" in the Thesaurus

[0064]

[0065] As shown in Table 2, the first word and the second word are "fight" and "war" respectively. The first set of semantic items corresponding to "fight" includes "fight" in Hb02C and "fight" in Hb02C01=. The second set of semantic items corresponding to "war" includes "war" in Di11, "war" in Di11B, and "war" in Di11B01=.

[0066] 103. Based on the Thesaurus, determine the set of synonymous semantic items of the first semantic item at the leaf node in the first set of semantic items as the first set of synonymous semantic items, and determine the set of synonymous semantic items of the second semantic item at the leaf node in the second set of semantic items as the second set of synonymous semantic items.

[0067] Among them, the first sense item set includes each first sense item, and the second sense item set includes each second sense item. The set of synonymous sense items corresponding to a sense item includes: when the sense item is at a leaf node and the last symbol of the corresponding sense item code is "=", the set of synonymous sense items is the set of other sense items (corresponding words) at the leaf node; when the sense item is not at a leaf node, or the last symbol of the corresponding sense item code of the sense item is not "=", the set of synonymous sense items is the sense item itself.

[0068] Take the set of synonymous sense items of the first sense item at the leaf node in the leaf node as the first set of synonymous sense items, and take the set of synonymous sense items of the second sense item at the leaf node in the leaf node as the second set of synonymous sense items.

[0069] Suppose the first sense item and the second sense item are represented by s1 and s2 respectively. The first set of synonymous sense items corresponding to the first sense item s1 can be represented by Similar(s1), and the second set of synonymous sense items corresponding to the second sense item s2 can be represented by Similar(s2).

[0070] As shown in Table 2, when s1 is "fight" in Hb02C, since the branch node where s1 is located is not a leaf node, Similar(s1) is s1; when s1 is "fight" in Hb02C01=, because the branch node where s1 is located is a leaf node and the last symbol of the corresponding sense item code of s1 is "=", Similar(s1) includes "battle, combat, engage in battle, exchange fire, clash, fight, wage war, go to war, take the field", that is, the set of sense items excluding "fight". Similarly, when s2 is "war" in Di11, since the branch node where s2 is located is not a leaf node, Similar(s2) is s2; when s2 is "war" in Di11B01=, since the branch node where s2 is located is a leaf node and the last symbol of the corresponding sense item code of s2 is "=", Similar(s2) includes "military affairs, war chaos, scourge of war, smoke and dust, flames of war, beacon fire, beacon smoke, wolf smoke, military fire, war damage, weapons, war, great war", that is, the set of sense items excluding "war". Among them, the leaf node contains more information and its contained information is relatively rich.

[0071] In Table 2, each first meaning corresponding to "fighting" and each second meaning corresponding to "war" belong to two major branches, H and D, respectively, in the synonym dictionary, and their common parent node is the root node, and the information contained is 0. According to the existing word similarity determination method, its similarity is extremely low, and there is no obvious difference from the similarity of any two meanings under other two branches. The existing word similarity determination method only considers the information contained in the nearest common parent node or the depth of the nearest common parent node when determining the similarity. However, the information contained in the nearest common parent node or the depth of the nearest common parent node cannot fully describe the similarity between the two words, and there is unreasonableness. Therefore, in the embodiment of the present application, the synonym meaning set of the meaning is also considered, and the similarity between the meanings is determined according to the synonym meaning set. Among them, it is understood that if the two meanings are similar, then their synonyms are also relatively similar. Please refer to the corresponding description below for details.

[0072] 104. Determine the meaning similarity between each first meaning and each second meaning according to each first meaning in the first meaning set and each second meaning in the second meaning set, and each first synonym meaning in the first synonym meaning set and each second synonym meaning in the second synonym meaning set.

[0073] The first synonym sense item set includes at least one synonym sense item, and each of the included synonym sense items is determined as each first synonym sense item. Similarly, the second synonym sense item set includes at least one synonym sense item, and each of the included synonym sense items is determined as each second synonym sense item. The first sense item set includes each first sense item, and the second sense item set includes each second sense item.

[0074] According to a first meaning and a second meaning, and each first synonym meaning in the first synonym meaning set corresponding to the first meaning, and each second synonym meaning in the second synonym meaning set corresponding to the second meaning, the meaning similarity between the first meaning and the second meaning is determined. According to the same method, the meaning similarity between each first meaning and each second meaning can be determined.

[0075] Among them, the determination of the meaning similarity between the first sense and the second sense not only considers the first sense and the second sense themselves, but also considers the synonym sense set of the first sense at the leaf node and the second sense at the leaf node, that is, the set of other senses encoded as "=" in the leaf node where the first sense and the second sense are located is also considered. Since the synonym senses in the leaf node include more information, and the synonym senses and the corresponding first sense and second senses express similar meanings, in this way, the synonym sense set is used to enhance the influence on the similarity of the first sense and the second sense, which improves the situation where the first sense and the second sense belong to different major branches under the synonym word forest and the similarity is extremely low, improves the accuracy of determining the word similarity, and further improves the accuracy of data matching.

[0076] In one embodiment, the above step 104 includes: determining the common meaning features and the different meaning features between each first meaning and each second meaning according to each first meaning in the first meaning set and each second meaning in the second meaning set, as well as each first synonym meaning in the first synonym meaning set and each second synonym meaning in the second synonym meaning set; and determining the meaning similarity between each first meaning and each second meaning according to the common meaning features and the different meaning features.

[0077] Among them, the common characteristics of meanings refer to the similarities between the first meaning and the second meaning, and the different characteristics of meanings refer to the differences between the first meaning and the second meaning.

[0078] According to a first meaning and a second meaning, and each first synonym meaning in the first synonym meaning set corresponding to the first meaning, and each second synonym meaning in the second synonym meaning set corresponding to the second meaning, the common meaning features and the difference meaning features between the first meaning and the second meaning are determined, and the meaning similarity between the first meaning and the second meaning is determined according to the common meaning features and the difference meaning features. According to the same method, the meaning similarity between each first meaning and each second meaning is obtained.

[0079] The common features of the first meaning s1 and the second meaning s2 can be represented by Comm(s1, s2), and the different features of the first meaning s1 and the second meaning s2 can be represented by Diff(s1, s2). Then, the similarity sim(s1, s2) between the first meaning s1 and the second meaning s2 can be determined by the following formula (7).

[0080]

[0081] Among them, t is a hyperparameter, which represents the influence of common features and difference features between senses in similarity on the similarity value, and can be adjusted according to specific needs.

[0082] In this embodiment, the common semantic features and the semantic difference features of the first semantic item and the second semantic item are determined according to the first synonym semantic items of the first semantic item and the second synonym semantic items of the second semantic item. In this way, the synonym semantic item set is used to enhance the influence on the common semantic features and the semantic difference features between the first semantic item and the second semantic item, and further enhance the influence on the similarity between the first semantic item and the second semantic item, improving the situation where the similarity is extremely low if the first semantic item and the second semantic item belong to different major branch categories under the synonym word forest, improving the accuracy of word similarity determination, and further improving the accuracy of data matching.

[0083] In one embodiment, as Figure 3 shown, the steps of 104 above include the following steps 1041 to 1045.

[0084] 1041. Determine the first similarity between each first semantic item in the first semantic item set and each second semantic item in the second semantic item set.

[0085] The first similarity between the first semantic item and the second semantic item can be determined by the information content of the nearest common parent node of the first semantic item and the second semantic item. For example, determine the nearest common parent node between the first semantic item and the second semantic item, and determine the first similarity between the first semantic item and the second semantic item according to the information content corresponding to the nearest common parent node.

[0086] 1042. Determine the second similarity between each first synonym semantic item in the first synonym semantic item set and each second synonym semantic item in the second synonym semantic item set.

[0087] The second similarity between the first synonym semantic item and the second synonym semantic item can be determined by the information content of the nearest common parent node of the first synonym semantic item and the second synonym semantic item. For example, determine the nearest common parent node between the first synonym semantic item and the second synonym semantic item, and determine the second similarity between the first synonym semantic item and the second synonym semantic item according to the information content corresponding to the nearest common parent node.

[0088] In one embodiment, the second similarity between each first synonym semantic item and each second synonym semantic item can be directly calculated. For example, the similarity between the first synonym semantic item "battle" in Hb02C01 and the second synonym semantic item "battle" in Di11B01 in Table 2 is 100%, and the similarity between the first synonym semantic item "go into battle" in Hb02C01 and the second synonym semantic item "smoke and dust" in Di11B01 is 0, etc.

[0089] Since the first synonym sense item in the first synonym sense item set includes at least one, and the second synonym sense item in the second synonym sense item set includes at least one, the second similarity also includes at least one. Usually, the second similarity includes multiple items.

[0090] 1043 , determining common features of meanings between each first meaning item and each second meaning item according to the first similarity and the second similarity.

[0091] In one embodiment, the first similarity and the second similarity are weightedly summed to obtain the common features of the first sense and the second sense.

[0092] In one embodiment, the above-mentioned step 1043 includes: arranging the second similarities in order from high to low, and obtaining a preset number of target second similarities; obtaining a first hyperparameter and a preset number of second hyperparameters, the second hyperparameter and the target second similarity correspond one to one, and the sum of the first hyperparameter and the preset number of second hyperparameters is one; using the first hyperparameter and the second hyperparameter to perform weighted summation with the first similarity and the target second similarity respectively, so as to obtain the common characteristics of the meanings between each first meaning and each second meaning.

[0093] Wherein, if the second similarity includes multiple, the second similarities are arranged in descending order of similarity values, and the preset number of target second similarity values ​​are obtained from the arranged second similarities. The preset number can be 3, or an integer number such as 2 or 4, and the preset number is taken as an example for explanation. The first hyperparameter and the preset number of second hyperparameters are obtained, and the second hyperparameters correspond to the target second similarities one by one. Wherein, the sum of the preset number of second hyperparameters and the first hyperparameter is 1.

[0094] In one embodiment, the values ​​of the preset number of second hyperparameters may be the same. It is understandable that each target second similarity in the target second similarities corresponds to each second hyperparameter one by one. In another embodiment, the values ​​of the preset number of second hyperparameters are different. For example, the target second similarity with the highest similarity in the target second similarities corresponds to the highest parameter value in the second hyperparameter, ..., the target second similarity with the lowest similarity in the target second similarities corresponds to the lowest parameter value in the second hyperparameter.

[0095] The first hyperparameter and the first similarity, the preset number of second hyperparameters and the preset number of target second similarities are weightedly summed, that is, the value of the first hyperparameter multiplied by the first similarity is added to the value of each second hyperparameter multiplied by the corresponding target second similarities, so as to obtain the common characteristics of the first meaning and the second meaning.

[0096] As shown in Table 2, the similarity of "war" in the synonym meaning set between "combat" and "war" in the existing synonym word forest is not described. In the embodiment of the present application, the second similarity in the synonym meaning set is used to describe the similarity in the synonym meaning set. The second similarity in the synonym meaning set and the first similarity between the first meanings are combined to determine the common characteristics of the meanings, which enhances the influence of the commonality between the semantic items of the words on the similarity of the meanings, improves the situation where the first meaning and the second meaning belong to different major branches under the synonym word forest and the similarity is extremely low, improves the accuracy of determining the similarity of words, and further improves the accuracy of data matching.

[0097] In one embodiment, the common features between the first meaning and the second meaning may be determined according to the following formula (8).

[0098]

[0099] in, β, β k are the adjustable first and second hyperparameters, and the preset number is 3. The similarity between the first meaning s1 and the second meaning s2 cannot fully express the information content of their nearest common parent node or the similarity between s1 and s2 by using only LCS (s1, s2). Therefore, the definition of node information content by Seco et al. is introduced in formula (8): that is, the above formula (6), and the hierarchy and the number of lower nodes (number of child nodes) are introduced to assist in the calculation. Among them, the lower the hierarchy, the fewer the number of child nodes, and the richer the information it contains. That is, the calculation of IC (.) in formula (8) refers to the above formula (6) to improve the accuracy of the common features between the first meaning and the second meaning.

[0100] 1044. Determine the semantic difference characteristics between each first meaning item and each second meaning item based on the shortest path length between each first meaning item and each second meaning item.

[0101] In one embodiment, the above-mentioned step 1044 includes: obtaining the shortest path length of each first sense item and each second sense item, and the nearest common parent node of each first sense item and each second sense item; obtaining the layer weight corresponding to the nearest common parent node, and determining the number of direct children of the nearest common parent node, and the branch distance of the nearest common parent node of each first sense item and each second sense item; determining the meaning difference characteristics between each first sense item and each second sense item based on the shortest path length, layer weight, number of direct children and branch distance.

[0102] In the synonym dictionary, each layer has a corresponding weight, which is called the layer weight.

[0103] In one embodiment, the semantic difference feature between the first semantic term and the second semantic term may be determined according to the following formula (9).

[0104]

[0105] Among them, i is the layer number of the nearest common parent node of the first sense s1 and the second sense s2, D is the shortest path length between the first sense s1 and the second sense s2, N is the number of direct children of the nearest common parent node of the first sense s1 and the second sense s2, and k is the branch distance of the nearest common parent node of the first sense s2 and the second sense s2.

[0106] It should be noted that the method for determining the shortest path length of the first meaning s1 and the second meaning s2 in the embodiment of the present application is different from the original calculation method. In the original calculation method, the similarity between the first meaning and the second meaning is expressed by the sum of the path length from the branch node where the first meaning is located to the nearest common parent node and the path length from the branch node where the second meaning is located to the nearest common parent node, and no other considerations are made. The embodiment of the present application considers the distinction between the similarity between meanings under the inclusion relationship and the similarity under the non-inclusion relationship. As shown in Table 3, the word "opera" includes the words "Kunju", "Beijing Opera", etc., and the original calculation method does not consider these effects on the shortest path length.

[0107] Table 3. The meaning codes of opera, Kunqu opera and Peking opera in the synonym dictionary

[0108]

[0109] Based on this, the shortest path lengths of the first meaning and the second meaning are redefined in the embodiment of the present application, providing a new way to define the shortest path lengths of the first meaning and the second meaning. Specifically, the above-mentioned step of obtaining the shortest path lengths of each first meaning and each second meaning includes: determining the shortest path lengths of each first meaning and each second meaning based on whether the first word or the second word exists in the nearest common parent node and leaf node of each first meaning corresponding to the first word and each second meaning corresponding to the second word. It is specifically divided into the following situations.

[0110] When the nearest common parent node of the first meaning corresponding to the first word and the second meaning corresponding to the second word includes the first word or the second word, the shortest path length between the first meaning and the second meaning is the path length between the nearest common parent node and the branch node corresponding to the second meaning, or the path length between the nearest common parent node and the branch node corresponding to the first meaning.

[0111] like Figure 4As shown in the figure a in the figure, the branch node corresponding to the first sense (the leaf node in the current figure a) includes the first word W1, the branch node corresponding to the second sense includes the second word W2, and the nearest common parent node LCP corresponding to the first sense and the second sense includes the second word W2, which means that the first word W1 and the second word W2 belong to an inclusion relationship. Then the shortest path length of the first sense and the second sense is the path length between the nearest common parent node and the branch node corresponding to the first sense, that is, D=L1. Among them, L1 is the sum of the path distances of the two edges between the branch node corresponding to the first sense in the figure a and the nearest common parent node. The path distance corresponding to the edge is determined according to the edge weight. Different edge weights are used for different layers: the closer to the root node, the greater the weight, and the closer to the leaf node, the smaller the weight. Similarly, L2 is also understood in the same way, and will not be repeated below.

[0112] When the first sense corresponding to the first word and the second sense corresponding to the second word only appear in leaf nodes, the shortest path length between the first sense and the second sense is the sum of the path length between the leaf node corresponding to the first sense and the nearest common parent node and the path length between the leaf node corresponding to the second sense and the nearest common parent node.

[0113] like Figure 4 As shown in Figure b, the branch node corresponding to the first sense includes the first word W1, and the branch node corresponding to the second sense includes the second word W2. The branch node corresponding to the first sense and the branch node corresponding to the second sense are both leaf nodes. Then the shortest path length D between the first sense and the second sense is the sum of the path length L1 between the leaf node corresponding to the first sense and the nearest common parent node, and the path length L2 between the leaf node corresponding to the second sense and the nearest common parent node, that is, D=L1+L2.

[0114] When the first meaning corresponding to the first word and the second meaning corresponding to the second word do not include the first word or the second word in the nearest common parent node, but the first word or the second word appears both in a leaf node and in a non-nearest common parent node, then the shortest path length between the first sense and the second sense is the sum of the path length between the leaf node corresponding to the first sense and the nearest common parent node and the path length between the leaf node corresponding to the second sense and the nearest common parent node.

[0115] like Figure 4As shown in Figure c, the nearest common parent node of the first meaning corresponding to the first word W1 and the second meaning corresponding to the second word W2 does not include the first word W1 or the second word W2, but the second word W2 appears in the leaf node and also appears in the non-nearest common parent node. Then the shortest path length of the first sense and the second sense is the sum of the path length L1 between the leaf node corresponding to the first sense and the nearest common parent node, and the path length L2 between the leaf node corresponding to the second sense and the nearest common parent node, that is, D=L1+L2.

[0116] Among them, although the second word W2 appears in the leaf node, it does not appear in the nearest common parent node, and it does not belong to the inclusion relationship. It appears in the non-nearest common parent node, which means that the second word W2 in the non-nearest common parent node belongs to the category. Therefore, the true shortest path distance between the first meaning and the second meaning is still L1+L2.

[0117] When the first sense corresponding to the first word and the second sense corresponding to the second word appear not only in the nearest common parent node but also in the corresponding leaf nodes, the shortest path length between the first sense and the second sense is the sum of the path length between the leaf node corresponding to the first sense and the nearest common parent node and the path length between the leaf node corresponding to the second sense and the nearest common parent node.

[0118] like Figure 4 As shown in Figure d, the first sense corresponding to the first word W1 and the second sense corresponding to the second word W2 appear not only in the nearest common parent node, but also in the corresponding leaf nodes, which means that the first word W1 and the second word W2 appearing in the nearest common parent node belong to the category, and the first word W1 and the second word W2 in the leaf node correspond to the first sense and the second sense. Then the shortest path length between the first sense and the second sense is the sum of the path length L1 between the leaf node corresponding to the first sense and the nearest common parent node, and the path length L2 between the leaf node corresponding to the second sense and the nearest common parent node, that is, D=L1+L2.

[0119] Among the above four situations, the situation corresponding to Figure a belongs to the inclusion relationship, and the situations corresponding to Figures b, c and d all belong to the parallel relationship. In this embodiment, a certain distinction is made between the inclusion relationship and the parallel relationship, and the calculation method of the shortest path distance between two meanings is redefined according to different relationships, so that the similarity between the two meanings of the inclusion relationship is greater than the similarity between the two meanings of the parallel relationship under the same circumstances, making it more suitable for the calculation of the similarity of media asset tags.

[0120] 1045. Determine the meaning similarity between each first meaning and each second meaning according to the common features of the meanings and the different features of the meanings.

[0121] Specifically, the meaning similarity between each first meaning and each second meaning is determined according to the common characteristics of the meanings and the difference characteristics of the meanings. It can be determined in the manner of the above formula (7). Please refer to the above description for details, which will not be repeated here.

[0122] The above embodiment describes in detail how to determine the similarity between the first meaning and the second meaning. Figure 5 To understand the above process of determining the similarity between the first meaning and the second meaning, w11, w12, ..., w1n are the first synonym set, and w21, w22, ..., w2n are the second synonym set.

[0123] 105 , determining the similarity between the first word and the second word according to the meaning similarity.

[0124] The similarity between the first word and the second word may be determined according to a maximum value of the similarities between the meaning corresponding to the first word and the meaning corresponding to the second word.

[0125] The similarity between the first word W1 and the second word W2 can be determined according to formula (10).

[0126] sim(W1,W2)=max{sim(s1,s2)} s1∈S(W1),s2∈S(W2) (10)

[0127] Among them, S(W1) and S(W2) respectively represent the first meaning set corresponding to the first word W1 and the second meaning set corresponding to the second word W2.

[0128] Specifically, the similarity between the first word and the second word can be determined by referring to Figure 6 , Figure 6 The word 1 and word 2 in are the first word and the second word respectively.

[0129] In the scheme for determining word similarity in the embodiment of the present application, the determination of the meaning similarity between the first meaning and the second meaning not only considers the first meaning and the second meaning itself, but also considers the synonym meaning set of the first meaning at the leaf node and the second meaning at the leaf node, that is, it also considers the set of other meanings encoded as "=" in the leaf node where the first meaning and the second meaning are located. Since the synonym meanings in the leaf node include more information, and the synonym meanings are similar to the corresponding first meaning and second meaning, the synonym meaning set is used to enhance the influence on the similarity of the first meaning and the second meaning. At the same time, the present application combines the information-based and path-based word similarity calculation methods, improves the situation where the first meaning and the second meaning belong to different major branches under the synonym word forest and the similarity is extremely low, improves the accuracy of word similarity determination, and further improves the accuracy of data matching.

[0130] Tables 4 and 5 are word similarity comparison results based on the synonym dictionary. It can be seen that the word similarity determination method in the embodiment of the present application greatly improves the accuracy of word similarity determination.

[0131] The parameter t is 4, β = 0.85, β1 = 0.05, β2 = 0.05, β3 = 0.05, weight = [0.0, 0.038, 0.096, 0.192, 0.289, 0.385]. The MC manual judgment value refers to the result of the manually determined word similarity published by Miller & Charles (MC).

[0132] Table 4. Comparison results of word similarity based on synonyms dictionary

[0133]

[0134] Table 5. Comparison results of word similarity based on synonyms dictionary

[0135]

[0136] In one embodiment, when a user uses the intelligent voice function to search for a movie, the tags in the voice information are usually identified and compared with the media tags in the media tag system. The method of comparing the tags with the media tags can refer to the content described in any embodiment of the word similarity determination method proposed in the embodiments of the present application above, and the relevant movies are returned based on the comparison results.

[0137] According to the method described in the above embodiment, this embodiment will be further described from the perspective of a word similarity determination device, which can be implemented as an independent entity or integrated in a computer device.

[0138] See also Figure 7 , Figure 7 The word similarity determination device provided in the embodiment of the present application is specifically described, and is applied in a computer device. The word similarity determination device may include: an acquisition module 201, a first meaning determination module 202, a second meaning determination module 203, a first similarity determination module 204, and a second similarity determination module 205.

[0139] The acquisition module 201 is used to acquire a first word and a second word for which similarity needs to be determined.

[0140] The first meaning item determination module 202 is used to determine the first meaning item set corresponding to the first word and the second meaning item set corresponding to the second word based on the synonym dictionary.

[0141] The second meaning item determination module 203 is used to determine, based on the synonym word forest, a synonym meaning item set of the first meaning item in the leaf node of the first meaning item set in the leaf node as the first synonym meaning item set, and to determine a synonym meaning item set of the second meaning item in the leaf node of the second meaning item set in the leaf node as the second synonym meaning item set.

[0142] The first similarity determination module 204 is used to determine the meaning similarity between each first meaning and each second meaning based on each first meaning in the first meaning set and each second meaning in the second meaning set, as well as each first synonym meaning in the first synonym meaning set and each second synonym meaning in the second synonym meaning set.

[0143] In one embodiment, the first similarity determination module 204 is specifically used to determine the common meaning features and the different meaning features between each first meaning and each second meaning based on each first meaning in the first meaning set and each second meaning in the second meaning set, as well as each first synonym meaning in the first synonym meaning set and each second synonym meaning in the second synonym meaning set; and determine the meaning similarity between each first meaning and each second meaning based on the common meaning features and the different meaning features.

[0144] In one embodiment, when the first similarity determination module 204 executes the step of determining the common sense features and the different sense features between each first sense and each second sense according to each first sense in the first sense set and each second sense in the second sense set, and each first synonym sense in the first synonym sense set and each second synonym sense in the second synonym sense set, the first similarity determination module 204 specifically executes: determining the first similarity between each first sense in the first sense set and each second sense in the second sense set; determining the second similarity between each first synonym sense in the first synonym sense set and each second synonym sense in the second synonym sense set; determining the common sense features between each first sense and each second sense according to the first similarity and the second similarity; and determining the different sense features between each first sense and each second sense based on the shortest path length between each first sense and each second sense.

[0145] In one embodiment, when the first similarity determination module 204 executes the step of determining the common features of meanings between each first meaning and each second meaning according to the first similarity and the second similarity, the first similarity determination module 204 specifically executes: arranging the second similarities in order from high to low, and obtaining a preset number of target second similarities; obtaining a first hyperparameter and a preset number of second hyperparameters, the second hyperparameter corresponding to the target second similarity one-to-one, and the sum of the first hyperparameter and the preset number of the second hyperparameter is one; using the first hyperparameter and the second hyperparameter to perform weighted summation with the first similarity and the target second similarity respectively, so as to obtain the common features of meanings between each first meaning and each second meaning.

[0146] In one embodiment, when the first similarity determination module 204 executes the step of determining the meaning difference characteristics between each first sense and each second sense based on the shortest path length between each first sense and each second sense, the first similarity determination module 204 specifically performs the following steps: obtaining the shortest path length between each first sense and each second sense, and the nearest common parent node between each first sense and each second sense; obtaining the layer weight corresponding to the nearest common parent node, and determining the number of direct children of the nearest common parent node, and the branch distance of the nearest common parent node where each first sense and each second sense are located; and determining the meaning difference characteristics between each first sense and each second sense based on the shortest path length, the layer weight, the number of direct children, and the branch distance.

[0147] In one embodiment, when executing the step of obtaining the shortest path length of each first sense term and each second sense term, the first similarity determination module 204 specifically performs: determining the shortest path length of each first sense term and each second sense term based on whether the first sense term corresponding to the first word or the second sense term corresponding to the second word exists in the nearest common parent node and leaf node.

[0148] In one embodiment, when the first similarity determination module 204 executes the step of determining the shortest path lengths of each first sense and each second sense according to whether the first word or the second word exists in the nearest common parent node and leaf node of each first sense corresponding to the first word and each second sense corresponding to the second word, the following is specifically performed: when the nearest common parent node of the first sense corresponding to the first word and the second sense corresponding to the second word includes the first word or the second word, the shortest path length of the first sense and the second sense is the path length between the nearest common parent node and the branch node corresponding to the second sense, or the path length between the nearest common parent node and the branch node corresponding to the first sense; when the first sense corresponding to the first word and the second sense corresponding to the second word appear only in leaf nodes, the shortest path length of the first sense and the second sense is the path length between the leaf node corresponding to the first sense and the nearest common parent node, and the path length between the leaf node corresponding to the second sense and the nearest common parent node. The sum of the path lengths between the leaf node corresponding to the sense and the nearest common parent node; when the nearest common parent node of the first sense corresponding to the first word and the second sense corresponding to the second word does not include the first word or the second word, but the first word or the second word appears both in the leaf node and in the non-nearest common parent node, then the shortest path length of the first sense and the second sense is the sum of the path length between the leaf node corresponding to the first sense and the nearest common parent node, and the path length between the leaf node corresponding to the second sense and the nearest common parent node; when the first sense corresponding to the first word and the second sense corresponding to the second word appear not only in the nearest common parent node but also in the corresponding leaf nodes, then the shortest path length of the first sense and the second sense is the sum of the path length between the leaf node corresponding to the first sense and the nearest common parent node, and the path length between the leaf node corresponding to the second sense and the nearest common parent node.

[0149] The second similarity determination module 205 is used to determine the similarity between the first word and the second word according to the semantic similarity.

[0150] During specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above modules can refer to the previous method embodiments. The specific beneficial effects that can be achieved can also refer to the beneficial effects in the previous method embodiments, which will not be repeated here.

[0151] In addition, the present application also provides a computer device, such as Figure 8 As shown, the computer device 300 includes a processor 301 and a memory 302. The processor 301 is electrically connected to the memory 302.

[0152] The processor 301 is the control center of the computer device 300. It uses various interfaces and lines to connect the various parts of the entire computer device. By running or loading applications stored in the memory 302 and calling data stored in the memory 302, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole.

[0153] In this embodiment, the processor 301 in the computer device 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions, such as:

[0154] A first word and a second word whose similarity needs to be determined are obtained; a first sense item set corresponding to the first word and a second sense item set corresponding to the second word are determined based on a synonym dictionary; a synonym sense item set of a first sense item in a leaf node of the first sense item set in the leaf node is determined based on the synonym dictionary as a first synonym sense item set, and a synonym sense item set of a second sense item in a leaf node of the second sense item set is determined as a second synonym sense item set; a sense similarity between each first sense item and each second sense item is determined based on each first sense item in the first sense item set and each second sense item in the second sense item set, and each first synonym sense item in the first synonym sense item set and each second synonym sense item in the second synonym sense item set; and a similarity between the first word and the second word is determined based on the sense similarity.

[0155] The computer device can implement the steps in any embodiment of the word similarity determination method provided in the embodiments of the present application, and therefore can achieve the beneficial effects that can be achieved by any word similarity determination method provided in the embodiments of the present invention. For details, please refer to the previous embodiments and will not be repeated here.

[0156] Fig. 9The specific structural block diagram of the computer device provided in the embodiment of the present invention is shown, and the computer device can be used to implement the word similarity determination method provided in the above embodiment. The computer device includes the following modules / units.

[0157] The RF circuit 410 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 410 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 410 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.

[0158] The memory 420 can be used to store software programs (computer programs) and modules, such as the corresponding program instructions / modules in the above embodiments, and the processor 480 executes various functional applications and data processing by running the software programs and modules stored in the memory 420. The memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 420 may further include a memory remotely arranged relative to the processor 480, and these remote memories may be connected to the computer device 400 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0159] The input unit 430 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 430 may include a touch-sensitive surface 431 and other input devices 432. The touch-sensitive surface 431, also known as a touch display screen (touch screen) or a touchpad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 431), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 431 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 480, and can receive and execute commands sent by the processor 480. In addition, the touch-sensitive surface 431 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 431, the input unit 430 may further include other input devices 432. Specifically, other input devices 432 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0160] The display unit 440 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the computer device 400, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 440 may include a display panel 441. Optionally, the display panel 441 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 431 may cover the display panel 441. When the touch-sensitive surface 431 detects a touch operation on or near it, it is transmitted to the processor 480 to determine the type of the touch event, and then the processor 480 provides a corresponding visual output on the display panel 441 according to the type of the touch event. Although in the figure, the touch-sensitive surface 431 and the display panel 441 are implemented as two independent components to implement input and output functions, it can be understood that the touch-sensitive surface 431 is integrated with the display panel 441 to implement input and output functions.

[0161] The computer device 400 may also include at least one sensor 450, such as a light sensor, a direction sensor, a proximity sensor, and other sensors. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. As for other sensors that can be configured in the computer device 400, such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., they will not be described in detail here.

[0162] The audio circuit 460, the speaker 461, and the microphone 462 can provide an audio interface between the user and the computer device 400. The audio circuit 460 can transmit the electrical signal converted from the received audio data to the speaker 461, which is converted into a sound signal for output; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is received by the audio circuit 460 and converted into audio data, and then the audio data is output to the processor 480 for processing, and then sent to another computer device through the RF circuit 410, or the audio data is output to the memory 420 for further processing. The audio circuit 460 may also include an earphone jack to provide communication between an external headset and the computer device 400.

[0163] The computer device 400 can help users receive requests, send information, etc. through a transmission module 470 (such as a Wi-Fi module), which provides users with wireless broadband Internet access. Although the transmission module 470 is shown in the figure, it is understandable that it is not a necessary component of the computer device 400 and can be omitted as needed without changing the essence of the invention.

[0164] The processor 480 is the control center of the computer device 400. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs (computer programs) and / or modules stored in the memory 420, and calling data stored in the memory 420, it executes various functions of the computer device 400 and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 480 may include one or more processing cores; in some embodiments, the processor 480 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 480.

[0165] The computer device 400 also includes a power supply 490 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 480 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 490 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0166] Although not shown, the computer device 400 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the computer device is a touch screen display, and the computer device also includes a memory, and one or more programs (computer programs), wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors. One or more programs include the steps for performing any of the embodiments of the word similarity determination method provided in the above-mentioned embodiments of the present application.

[0167] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0168] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructions (computer programs) or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps of any embodiment of the word similarity determination method provided in the embodiment of the present invention.

[0169] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0170] Since the instructions stored in the storage medium can execute the steps in any embodiment of the word similarity determination method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any word similarity determination method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0171] The above is a detailed introduction to a method, device, storage medium and computer device for determining word similarity provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for determining word similarity, characterized in that: include: Obtain a first word and a second word whose similarity needs to be determined; Determine a first meaning set corresponding to the first word and a second meaning set corresponding to the second word based on the synonym dictionary; Determine, based on the synonym dictionary, a synonym set of a first meaning item in a leaf node in the first meaning set as a first synonym set, and determine a synonym set of a second meaning item in a leaf node in the second meaning set as a second synonym set; Determining the meaning similarity between each first meaning and each second meaning according to each first meaning in the first meaning set and each second meaning in the second meaning set, and each first synonym meaning in the first synonym meaning set and each second synonym meaning in the second synonym meaning set; The similarity between the first word and the second word is determined according to the sense similarity.

2. The method for determining word similarity according to claim 1, characterized in that: The step of determining the meaning similarity between each first meaning and each second meaning according to each first meaning in the first meaning set and each second meaning in the second meaning set, and each first synonym meaning in the first synonym meaning set and each second synonym meaning in the second synonym meaning set, comprises: Determine the common sense features and the different sense features between each first sense and each second sense according to each first sense in the first sense set and each second sense in the second sense set, and each first synonym sense in the first synonym sense set and each second synonym sense in the second synonym sense set; The meaning similarity between each first meaning term and each second meaning term is determined based on the common features of the meaning terms and the different features of the meaning terms.

3. The method for determining word similarity according to claim 2, characterized in that: The step of determining the common features and the different features of meanings between each first sense and each second sense according to each first sense in the first sense set and each second sense in the second sense set, and each first synonym sense in the first synonym sense set and each second synonym sense in the second synonym sense set, comprises: Determining a first similarity between each first sense term in the first sense term set and each second sense term in the second sense term set; Determining a second similarity between each first synonym sense in the first synonym sense set and each second synonym sense in the second synonym sense set; Determining common features of meanings between each first meaning item and each second meaning item according to the first similarity and the second similarity; Based on the shortest path lengths between the first meaning items and the second meaning items, the meaning difference characteristics between the first meaning items and the second meaning items are determined.

4. The method for determining word similarity according to claim 3, characterized in that: The step of determining the common features of the meanings between each first meaning item and each second meaning item according to the first similarity and the second similarity comprises: Arrange the second similarities in descending order, and obtain a preset number of target second similarities; Obtaining a first hyperparameter and a preset number of second hyperparameters, wherein the second hyperparameters correspond one-to-one to the target second similarities, and a sum of the first hyperparameter and the preset number of second hyperparameters is one; The first hyperparameter and the second hyperparameter are used to perform weighted summation with the first similarity and the target second similarity respectively, so as to obtain the common features of the meanings between each first meaning item and each second meaning item.

5. The method for determining word similarity according to claim 3, characterized in that: The step of determining the difference characteristics of the meanings between each first meaning item and each second meaning item based on the shortest path length between each first meaning item and each second meaning item comprises: Obtain the shortest path length of each first meaning item and each second meaning item, and the nearest common parent node of each first meaning item and each second meaning item; Obtain the layer weight corresponding to the nearest common parent node, and determine the number of direct children of the nearest common parent node, and the branch distance of the nearest common parent node where each first meaning item and each second meaning item are located; The meaning difference characteristics between each first meaning item and each second meaning item are determined according to the shortest path length, the layer weight, the number of direct children and the branch distance.

6. The method for determining word similarity according to claim 5, characterized in that: The step of obtaining the shortest path lengths of each first meaning item and each second meaning item comprises: The shortest path lengths of the first meaning items and the second meaning items are determined based on whether the first word or the second word exists in the nearest common parent node and leaf node of the first meaning items corresponding to the first word and the second meaning items corresponding to the second word.

7. The method for determining word similarity according to claim 6, characterized in that: The step of determining the shortest path lengths of each first meaning item and each second meaning item according to whether the first meaning item corresponding to the first word or the second meaning item corresponding to the second word exists in the nearest common parent node and leaf node of each first meaning item corresponding to the first word and each second meaning item corresponding to the second word comprises: When the first meaning corresponding to the first word and the second meaning corresponding to the second word have the first word or the second word in their nearest common parent node, the shortest path length between the first meaning and the second meaning is the path length between the nearest common parent node and the branch node corresponding to the second meaning, or the path length between the nearest common parent node and the branch node corresponding to the first meaning; When the first meaning corresponding to the first word and the second meaning corresponding to the second word appear only in leaf nodes, the shortest path length between the first meaning and the second meaning is the sum of the path length between the leaf node corresponding to the first meaning and the nearest common parent node and the path length between the leaf node corresponding to the second meaning and the nearest common parent node; When the first meaning item corresponding to the first word and the second meaning item corresponding to the second word do not include the first word or the second word in the nearest common parent node, but the first word or the second word appears in both a leaf node and a non-nearest common parent node, then the shortest path length between the first meaning item and the second meaning item is the sum of the path length between the leaf node corresponding to the first meaning item and the nearest common parent node and the path length between the leaf node corresponding to the second meaning item and the nearest common parent node; When the first meaning corresponding to the first word and the second meaning corresponding to the second word appear not only in the nearest common parent node but also in the corresponding leaf nodes, the shortest path length between the first meaning and the second meaning is the sum of the path length between the leaf node corresponding to the first meaning and the nearest common parent node and the path length between the leaf node corresponding to the second meaning and the nearest common parent node.

8. A device for determining word similarity, characterized in that: include: An acquisition module, used for acquiring a first word and a second word for which similarity needs to be determined; A first meaning item determination module is used to determine a first meaning item set corresponding to a first word and a second meaning item set corresponding to a second word based on a synonym word forest; A second meaning item determination module is used to determine, based on the synonym word forest, a synonym meaning item set of a first meaning item in a leaf node in the first meaning item set as a first synonym meaning item set, and to determine a synonym meaning item set of a second meaning item in a leaf node in the second meaning item set as a second synonym meaning item set; A first similarity determination module is used to determine the meaning similarity between each first meaning and each second meaning according to each first meaning in the first meaning set and each second meaning in the second meaning set, and each first synonym meaning in the first synonym meaning set and each second synonym meaning in the second synonym meaning set; The second similarity determination module is used to determine the similarity between the first word and the second word according to the semantic similarity.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the method for determining word similarity according to any one of claims 1 to 7.

10. A computer device, characterized in that: It comprises a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to execute the steps in the method for determining word similarity according to any one of claims 1 to 7.