Game tag generation method, device, storage medium and electronic device
By calculating the mutual information value of user comment information and determining game tags using preset models, the problems of low efficiency and poor accuracy of game tag extraction in the prior art are solved, and efficient and accurate game tag generation is achieved.
Patent Information
- Application Number
- CN202110892037.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-04
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2041-08-04
AI Technical Summary
In the prior art, the efficiency of extracting game tags from user comment data is low, the accuracy is poor, the recall rate is low, and the manual extraction cost is high, so it is difficult for automated extraction methods to accurately reflect the game characteristics.
By obtaining the mutual information values in user comment information, a preliminary tag word collection is formed, and the AC automaton and preset models are used to determine the pending tag words, select the game tags with semantic matching, eliminate duplicate and confusing tags, and improve recall and accuracy.
It improves the efficiency and accuracy of game tag extraction, avoids semantic inconsistencies, and ensures the quality and reliability of tags.
Smart Images

Figure CN113591004B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, storage medium, and electronic device for generating a game tag. Background Art
[0002] With the development of the internet and information technology, various online information is experiencing exponential growth. For games, users typically post reviews of current games in mobile game centers, app stores, or comment sections on game-related websites, generating user review data for the game. A significant portion of this user review data clearly highlights the characteristics of the reviewed game. Game tags derived from this user review data can more accurately describe the game from multiple perspectives, helping to comprehensively and accurately present the game's features to users.
[0003] Currently, extracting game tags used by users to describe the user from the user review data usually has problems such as low extraction efficiency, poor accuracy of the obtained game tags, a small number of recalled tags, and a low recall rate. Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides a game tag generation method, device, storage medium and electronic device.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for generating a game tag is provided, the method comprising:
[0006] Get multiple user review information of the target game;
[0007] For each acquired user comment, obtain the mutual information value between two adjacent character strings in the user comment, where the mutual information value represents the probability of forming a phrase between the two adjacent character strings; and obtain preliminary label words from the user comment based on the mutual information value to form a preliminary label word set;
[0008] Extracting a first undetermined label word from each user comment information according to the preliminary label word set;
[0009] Determining, by a first preset model, a second undetermined label word that semantically matches the user comment information corresponding to the first undetermined label word;
[0010] A game tag is determined according to the second undetermined tag word.
[0011] Optionally, determining the game tag according to the second undetermined tag word includes:
[0012] Obtaining the emotion category corresponding to the second undetermined label word, where the emotion category includes negative emotion and non-negative emotion;
[0013] In a case where the emotion category corresponding to the second undetermined label word is a non-negative emotion, the second undetermined label word is used as a game label.
[0014] Optionally, obtaining the emotion category corresponding to the second undetermined label word includes:
[0015] Obtain target user comment information corresponding to the second undetermined label word;
[0016] The target user comment information is used as input of a second preset model, so that the second preset model outputs the sentiment category of the second undetermined label word.
[0017] Optionally, the second preset model is trained in the following manner:
[0018] Acquire first model training data, where the first model training data includes multiple user comment information samples and sentiment category annotation data corresponding to each user comment information sample;
[0019] The first preset initial model is trained using the first model training data to obtain the second preset model.
[0020] Optionally, obtaining preliminary label words from the user comment information according to the mutual information value to form a preliminary label word set includes:
[0021] Determining a comment word corresponding to each piece of the user comment information according to the mutual information value to obtain a comment word set;
[0022] Obtaining information entropy corresponding to each comment word in the comment word set;
[0023] The preliminary label words are determined from the comment word set according to the information entropy corresponding to each comment word to obtain the preliminary label word set.
[0024] Optionally, determining the comment words corresponding to each piece of the user comment information according to the mutual information value to obtain a comment word set includes:
[0025] Two adjacent character strings whose mutual information values are greater than a preset mutual information value threshold are concatenated into one comment word, so as to obtain the comment word set formed by multiple comment words corresponding to multiple user comment information.
[0026] Optionally, determining the preliminary label words from the comment word set according to the information entropy corresponding to each comment word to obtain the preliminary label word set includes:
[0027] Determine the target comment word with the largest information entropy from each group of related comment words that have an inclusion relationship in the comment word set;
[0028] When it is determined that the target comment word does not belong to the preset common word set, the target comment word is used as the preliminary label word to obtain the preliminary label word set.
[0029] Optionally, extracting a first undetermined label word from each user comment information according to the label word set includes:
[0030] The first undetermined label word is extracted from each user comment information through an AC automaton.
[0031] Optionally, determining, by a first preset model, the first undetermined label word and a second undetermined label word that semantically matches the user comment information corresponding to the first undetermined label word includes:
[0032] Using the first undetermined label word and the user comment information corresponding to the first undetermined label word as input to the first preset model to output a matching degree between the user comment information and the first undetermined label word;
[0033] When the matching degree is greater than or equal to a preset matching degree threshold, it is determined that the first undetermined label word and the user comment information corresponding to the first undetermined label word are semantically matched, and the first undetermined label word is used as the second undetermined label word.
[0034] Optionally, the first preset model is trained in the following manner:
[0035] Acquire second model training data, where the second model training data includes: a plurality of user comment information samples and a first undetermined label word sample semantically matched with each of the user comment information samples;
[0036] The second preset initial model is trained using the second model training sample to obtain the first preset model.
[0037] Optionally, the method further includes:
[0038] Get a game tag set formed by multiple game tags;
[0039] When it is determined that the game tag set includes an including game tag and an included game tag, the included game tag is removed to obtain an updated game tag set, wherein the included game tag is a substring of the including game tag.
[0040] Optionally, the method further includes:
[0041] When it is determined that there is a target game tag in the game tag set that is easily confused with a game name in the preset game name set, if it is determined that the target game tag and the game name of the target game do not have the same character string, the target game tag is removed from the game tag set to obtain an updated game tag set.
[0042] According to a second aspect of an embodiment of the present disclosure, a game tag generating device is provided, the device comprising:
[0043] A first acquisition module is configured to acquire multiple user review information of a target game;
[0044] The second acquisition module is configured to obtain, for each acquired user comment, a mutual information value between two adjacent character strings in the user comment, wherein the mutual information value represents a probability of forming a phrase between the two adjacent character strings; and obtain preliminary label words from the user comment based on the mutual information value to form a preliminary label word set;
[0045] A first determination module is configured to extract a first undetermined label word from each user comment information according to the preliminary label word set;
[0046] A second determining module is configured to determine, through a first preset model, a second undetermined label word that semantically matches the first undetermined label word with the user comment information corresponding to the first undetermined label word;
[0047] The third determining module is configured to determine a game tag according to the second undetermined tag word.
[0048] Optionally, the third determining module is configured to:
[0049] Obtaining the emotion category corresponding to the second undetermined label word, where the emotion category includes negative emotion and non-negative emotion;
[0050] In a case where the emotion category corresponding to the second undetermined label word is a non-negative emotion, the second undetermined label word is used as a game label.
[0051] Optionally, the third determining module is configured to:
[0052] Obtain target user comment information corresponding to the second undetermined label word;
[0053] The target user comment information is used as input of a second preset model, so that the second preset model outputs the sentiment category of the second undetermined label word.
[0054] Optionally, the second preset model is trained in the following manner:
[0055] Acquire first model training data, where the first model training data includes multiple user comment information samples and sentiment category annotation data corresponding to each user comment information sample;
[0056] The first preset initial model is trained using the first model training data to obtain the second preset model.
[0057] Optionally, the second acquisition module is configured to:
[0058] Determining a comment word corresponding to each piece of the user comment information according to the mutual information value to obtain a comment word set;
[0059] Obtaining information entropy corresponding to each comment word in the comment word set;
[0060] The preliminary label words are determined from the comment word set according to the information entropy corresponding to each comment word to obtain the preliminary label word set.
[0061] Optionally, the second acquisition module is configured to:
[0062] Two adjacent character strings whose mutual information values are greater than a preset mutual information value threshold are concatenated into one comment word, so as to obtain the comment word set formed by multiple comment words corresponding to multiple user comment information.
[0063] Optionally, the second acquisition module is configured to:
[0064] Determine the target comment word with the largest information entropy from each group of related comment words that have an inclusion relationship in the comment word set;
[0065] When it is determined that the target comment word does not belong to the preset common word set, the target comment word is used as the preliminary label word to obtain the preliminary label word set.
[0066] Optionally, the first determining module is configured to:
[0067] The first undetermined label word is extracted from each user comment information through an AC automaton.
[0068] Optionally, the second determining module is configured to:
[0069] Using the first undetermined label word and the user comment information corresponding to the first undetermined label word as input to the first preset model to output a matching degree between the user comment information and the first undetermined label word;
[0070] When the matching degree is greater than or equal to a preset matching degree threshold, it is determined that the first undetermined label word and the user comment information corresponding to the first undetermined label word are semantically matched, and the first undetermined label word is used as the second undetermined label word.
[0071] Optionally, the first preset model is trained in the following manner:
[0072] Acquire second model training data, where the second model training data includes: a plurality of user comment information samples and a first undetermined label word sample semantically matched with each of the user comment information samples;
[0073] The second preset initial model is trained using the second model training sample to obtain the first preset model.
[0074] Optionally, the device further comprises:
[0075] A third acquisition module is configured to acquire a game tag set formed by a plurality of game tags;
[0076] The fourth determining module is configured to, when determining that the game tag set includes an including game tag and an included game tag, remove the included game tag to obtain an updated game tag set, wherein the included game tag is a substring of the including game tag.
[0077] Optionally, the device further comprises:
[0078] The fifth determination module is configured to, when it is determined that there is a target game tag in the game tag set that is easily confused with a game name in the preset game name set, and when it is determined that the target game tag and the game name of the target game do not have the same character string, remove the target game tag from the game tag set to obtain an updated game tag set.
[0079] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0080] a storage device having a computer program stored thereon;
[0081] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect above.
[0082] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium stores computer program instructions thereon, which implement the steps of the method described in the first aspect above when executed by a processor.
[0083] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by extracting the first pending label word from each user comment information according to the preliminary label word set, the recall rate of the game label can be effectively guaranteed, and the first pending label word is determined through a first preset model. The second pending label word that semantically matches the user comment information corresponding to the first pending label word is determined, and then the game label is determined according to the second pending label word. This can effectively avoid the situation where the determined game label is semantically inconsistent with the user comment information, thereby facilitating the improvement of the accuracy of the obtained game label, and can effectively improve the efficiency of extracting game labels compared to manually extracting game labels.
[0084] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0086] Figure 1 is a flowchart of a method for generating a game tag according to an exemplary embodiment of the present disclosure;
[0087] Figure 2 is a schematic diagram illustrating the working principle of an AC automaton according to an exemplary embodiment of the present disclosure;
[0088] Figure 3 is a schematic diagram showing the working principle of a semantic matching model according to an exemplary embodiment of the present disclosure;
[0089] Figure 4 is based on Figure 1 The illustrated embodiment shows a flow chart of a method for generating a game tag;
[0090] Figure 5 is based on Figure 1 A flowchart of another method for generating a game tag according to the illustrated embodiment;
[0091] Figure 6 is a schematic diagram of the working principle of a sentiment classification model shown in an exemplary embodiment of the present disclosure;
[0092] Figure 7 is based on Figure 1 The illustrated embodiment shows a flow chart of a method for generating a game tag;
[0093] Figure 8 is a block diagram of a device for generating a game tag according to an exemplary embodiment of the present disclosure;
[0094] Figure 9 is based on Figure 8 A block diagram of a game tag generation device shown in the illustrated embodiment;
[0095] Figure 10 It is a block diagram of a device for generating a game tag according to an exemplary embodiment. DETAILED DESCRIPTION
[0096] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0097] Before introducing the specific implementation methods of the present disclosure in detail, the application scenarios of the present disclosure are first described as follows. The present disclosure can be applied to the process of extracting game tags from user comment data on the game in the game comment area, wherein the game comment area can be a comment input box set on a game center, an application store, or a game-related web page. The extracted game tags can be used to promote and publicize the game. For example, they can be used as display tags for the game in a word-of-mouth recommendation display area, and users can quickly understand relevant information about the game through the display tags.
[0098] In the related art, there are three methods for extracting game tags from a large amount of game review data. The first method relies on manual search, sorting and extraction of certain words from the game reviews sent by users as review tags for the game. This extraction method usually has low extraction efficiency and requires high labor costs. The second method is to extract review tags in an unsupervised way based on rule extraction. It mainly uses a dictionary to match words that appear in user review data. If multiple label data in the target dictionary are hit at the same time in the text, these multiple label data are extracted together as the game's label. The third method is to directly use a supervised method of text label extraction to extract game review tags. Specifically, named entity recognition is used to directly extract words from each review of the game, and the extracted words are judged correct by a classification model to determine the review tag corresponding to the game; or, based on the frequency of the words appearing in the game reviews, words are screened from each review as the review tag for the game. The comment tags extracted by the first approach are often highly subjective and fail to truly reflect the characteristics of the game. Furthermore, this approach is time-consuming and requires significant human resources. Furthermore, since manual word selection often involves significant personal subjectivity, the extracted comment tags often struggle to objectively reflect the characteristics of the game, resulting in low accuracy. While the second approach to comment tag extraction can automatically extract game comment tags, saving significant human resources and processing time compared to the first approach, it ignores the interrelationships between individual comments, resulting in low correlation between the extracted tags and the comments. It can even produce game tags that are inconsistent with the semantics of the comment statements, easily leading to low accuracy in the extracted comment tags. While the third approach to comment tag extraction offers high accuracy, it also recalls too few tags, and requires a large amount of training data to train the game comment extraction model. In other words, currently, extracting game tags from user comment data often suffers from low extraction efficiency, poor accuracy of the resulting game tags, a small number of recalled tags, and a low recall rate.
[0099] In order to solve the above technical problems, the present disclosure provides a game tag generation method, device, storage medium and electronic device. The game tag generation method extracts a first pending tag word from each user comment information according to the preliminary tag word set, thereby effectively ensuring the recall rate of the game tag, and determines the second pending tag word that semantically matches the user comment information corresponding to the first pending tag word through a first preset model, and then determines the game tag according to the second pending tag word. It can effectively avoid the situation where the determined game tag is inconsistent with the semantics of the user comment information, thereby facilitating improving the accuracy of the obtained game tag, and can effectively improve the extraction efficiency of the game tag compared to manually extracting game tags.
[0100] The following describes the implementation of the present disclosure in conjunction with specific examples.
[0101] Figure 1 This is a flowchart of a method for generating a game tag according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the game tag generation method may include the following steps:
[0102] Step 101: Obtain multiple user review information of the target game.
[0103] In this step, user review information of the target game can be obtained from a game review area, which can be a comment input box set on a game center, an app store, or a web page related to the target game.
[0104] Step 102 : for each acquired user comment information, obtain the mutual information value between two adjacent character strings in the user comment information, and obtain preliminary label words from the user comment information according to the mutual information value to form a preliminary label word set.
[0105] The mutual information value represents the probability of forming a phrase between two adjacent character strings.
[0106] It should be noted that mutual information is the amount of information about another random variable contained in a random variable, or the uncertainty of a random variable reduced by knowing another random variable. The mutual information value calculated here can be used to characterize the probability of forming a phrase between two adjacent character strings. The larger the mutual information value, the higher the correlation between the two adjacent character strings, and the greater the possibility that the two adjacent character strings form a phrase. Conversely, the smaller the mutual information value, the smaller the correlation between the two adjacent character strings, and the smaller the possibility that the two adjacent character strings form a phrase. The calculation formula of the mutual information value can be expressed as:
[0107]
[0108] In the above formula, X and Y refer to two adjacent strings. These strings can include English letters, Chinese characters, or text in other languages. They can be first-order characters, second-order phrases, third-order phrases, fourth-order phrases, and so on. MI(X,Y) represents the mutual information between adjacent strings X and Y, and P(X,Y) represents the probability of X and Y appearing adjacent to each other in all user reviews. P(X) represents the probability of string X appearing in all user reviews, and P(Y) represents the probability of string Y appearing in all user reviews.
[0109] For example, the number of times “algorithm → research” appears in the user review information for game A is 2, and the number of second-order phrases contained in the user review information is 191, so the number of second-order phrases in the game A is 2. If the number of times “algorithm” appears is 8 and the number of times “research” appears is 11, then Similarly, mutual information calculation can be performed on every two adjacent second-order phrases appearing in the user review information of the game A to obtain the mutual information value corresponding to every two adjacent second-order phrases.
[0110] In addition, the implementation methods of obtaining preliminary label words from the user comment information according to the mutual information value in this step may include the following two implementation methods:
[0111] Method 1 is to group adjacent character strings whose mutual information values are greater than or equal to the target mutual information threshold into a phrase, so that a plurality of such phrases can be obtained from the user comment information to form the preliminary label word set.
[0112] Method 2: Determine the comment words corresponding to each user comment based on the mutual information value to obtain a comment word set; obtain the information entropy corresponding to each comment word in the comment word set; and determine the preliminary label words from the comment word set based on the information entropy corresponding to each comment word to obtain the preliminary label word set. The information entropy can be left information entropy or right information entropy.
[0113] Step 103: extract a first undetermined label word from each user comment information according to the preliminary label word set.
[0114] In this step, the first undetermined label word may be extracted from each user comment information by using an AC (Aho-Corasick automation) automaton.
[0115] For example, taking he, she, his, and hers as elements in the preliminary tag word set, if a user comment information is ushers, here the elements in the preliminary tag word set are used as pattern strings, and the user comment information is the main string, that is, he, she, his, and hers are used as pattern strings, and ushers is used as the main string, forming the following: Figure 2 The state machine, Figure 2 It is a schematic diagram of the working principle of an AC automaton shown in an exemplary embodiment of the present disclosure. Inside the state machine, you can see solid and dotted arrows. The solid line is used to indicate the direction conversion state first, and the dotted line conversion is used only when the solid line conversion is not possible. In addition, when the conversion is to the red circle position in the figure, it means that pattern matching has occurred. For example, for he, from the root node to 1 and then to 2, it meets he at this time, indicating that pattern matching has occurred, that is, he has been extracted from the ushers. Similarly, the four words he, she, his, and hers can be extracted from the ushers, thereby realizing the process of extracting the first pending label word from each user comment information according to the preliminary label word set. It should be noted that the AC automaton belongs to the commonly used algorithm in the prior art. For the specific details of the algorithm, please refer to the relevant description in the prior art, and the present disclosure will not repeat them here.
[0116] Step 104 : Determine, through a first preset model, a second undetermined label word that semantically matches the first undetermined label word with the user comment information corresponding to the first undetermined label word.
[0117] In this step, in a possible implementation, the first pending label word and the user comment information corresponding to the first pending label word can be used as the input of the first preset model to output the matching degree between the user comment information and the first pending label word; when the matching degree is greater than or equal to the preset matching degree threshold, the semantic matching between the first pending label word and the user comment information corresponding to the first pending label word is determined, and the first pending label word is used as the second pending label word.
[0118] Among them, the first preset model is trained in the following manner: obtaining second model training data, the second model training data including: multiple user comment information samples and a first pending label word sample that semantically matches each user comment information sample; training the second preset initial model through the second model training sample to obtain the first preset model.
[0119] It should be noted that the first preset model can be a BERT model. BERT is a deep bidirectional encoding text representation model based on Transformer. The specific architecture of the BERT model can refer to the relevant description in the prior art, and this disclosure is not limited here. In this disclosure, the BERT model can be used to determine whether the semantics of the first pending label word and the user comment information corresponding to the first pending label word match, that is, whether the first pending label word and the user comment information to which it belongs express the same meaning. In addition, it should be noted that the input of the BERT model in this disclosure is a sentence pair consisting of a first pending label word and the user comment information corresponding to the first pending label word. In this sentence pair, the corresponding input sequence is used as the semantic representation of the text by adding the [CLS] symbol, and the two input sequences (the first pending label word and the user comment information corresponding to the first pending label word are each a sequence) are split with a [SEP] symbol, and two different text vectors are attached to the two sequences for distinction. The output of the BERT model is the semantic matching degree, for example, the matching degree is 60% and the mismatch degree is 40%.
[0120] In another possible implementation, the first preset model may be a BERT-based semantic matching model, and the first pending label word and the user comment information corresponding to the first pending label word are used as inputs to the BERT-based semantic matching model, so that the BERT-based semantic matching model outputs a semantic matching result, and the semantic matching result includes: correct semantic matching or incorrect semantic matching. When it is determined that the semantic matching result is correct semantic matching, the first pending label word is used as the second pending label word.
[0121] For example, Figure 3 As shown, Figure 3 This is a schematic diagram of the working principle of a semantic matching model shown in an exemplary embodiment of the present disclosure. In the semantic matching model, after the BERT model outputs the matching degree, a preset classifier is used to determine whether the matching degree is greater than or equal to the preset matching degree threshold. When it is determined that the matching degree is greater than or equal to the preset matching degree threshold, the classifier outputs the words "semantic matching correct" or "1" to represent the semantic match between the first pending label word and the user comment information corresponding to the first pending label word; when it is determined that the matching degree is less than the preset matching degree threshold, the classifier outputs the words "semantic matching error" or "0" to represent the semantic mismatch between the first pending label word and the user comment information corresponding to the first pending label word. Figure 3 As shown in , when the user comment information is "This game is fun" and the first pending label word is "The game is fun", the semantic matching model outputs the word "correct", indicating that "The game is fun" (the first pending label word) and "This game is fun" (the user comment information) are semantically matched.
[0122] Step 105: Determine a game tag based on the second undetermined tag word.
[0123] In this step, the second pending tag word may be used as the game tag, or some words may be selected from the second pending tag word according to the part of speech of each game tag (eg, derogatory, complimentary) as the game tag.
[0124] The above technical solution can effectively ensure the recall rate of game tags by extracting the first pending tag word from each user comment information based on the preliminary tag word set, and determine the second pending tag word that semantically matches the user comment information corresponding to the first pending tag word through the first preset model, and then determine the game tag based on the second pending tag word. This can effectively avoid the situation where the determined game tag is semantically inconsistent with the user comment information, thereby helping to improve the accuracy of the obtained game tags, and can effectively improve the efficiency of game tag extraction compared to manually extracting game tags.
[0125] Figure 4 is based on Figure 1 The embodiment shown is a flowchart of a method for generating a game tag, as shown in FIG. Figure 4 As shown, Figure 1 The step 102 of obtaining preliminary label words from the user comment information according to the mutual information value to form a preliminary label word set may include the following steps:
[0126] Step 1021: Determine the comment words corresponding to each piece of the user comment information according to the mutual information value to obtain a comment word set.
[0127] In this step, two adjacent character strings whose mutual information value is greater than a preset mutual information value threshold may be concatenated into one comment word, so as to obtain the comment word set formed by multiple comment words corresponding to multiple user comment information.
[0128] Step 1022: Obtain the information entropy corresponding to each comment word in the comment word set.
[0129] Among them, the information entropy can be the left information entropy or the right information entropy, or the sum of the left information entropy and the right information entropy. The larger the information entropy is, the greater the probability that the current comment word is a separate word. The left information entropy is the entropy of the left boundary of the multi-word expression, and the right information entropy is the entropy of the right boundary of the multi-word expression. The larger the left information entropy (right information entropy) of the current comment word is, the more frequently the words on the left (right) of the current comment word are replaced, and the greater the probability that the current comment word is a separate word.
[0130] It should be noted that entropy represents a measure of the uncertainty of a random variable. If X is a random variable that takes n values, then X takes the value X i The probability of P(X i ) is expressed as follows: the information entropy of X can be calculated by the following formula: H(X) = -∑P(X i )log2P(X i ), where i is 1, 2,…n.
[0131] The calculation formula of the left information entropy is: In the above formula, A is the set formed by the comment words to the left of the comment word W, a is any comment word to the left of the comment word W, and P(aW│W) is the probability that the comment word to the left of the comment word W is the comment word a when the comment word is W.
[0132] The calculation formula of the right information entropy is: In the above formula, B is the set formed by the comment words to the right of the comment word W, b is any comment word to the right of the comment word W, and P(Wb│W) is the probability that the comment word to the right of the comment word W is the comment word b when the comment word is W.
[0133] Step 1023 , determining the preliminary label word from the comment word set according to the information entropy corresponding to each comment word, to obtain the preliminary label word set.
[0134] In this step, a possible implementation method is: determine the target comment word with the largest information entropy from each group of related comment words that have an inclusion relationship in the comment word set; when it is determined that the target comment word does not belong to the preset common word set, use the target comment word as the preliminary label word to obtain the preliminary label word set.
[0135] For example, in the review word set, "cooking", "games" and "cooking games" are a group of related review words, and "quite", "interesting", "of" and "quite interesting" are a group of related review words. For another example, "quite", "fun", "quite fun", "of" and "quite fun" are a group of related review words. The information entropy corresponding to each review word in a group of related review words can be calculated using the information entropy calculation method described in step 1022 above, and the review word with the largest information entropy is used as the preliminary label word corresponding to the relevant review word. For example, since the information entropy of "cooking" (here, the information entropy can be the sum of the left information entropy and the right information entropy) is greater than the information entropy of "games" but less than the information entropy of "cooking games", that is, the information entropy of "cooking games" is the largest in the group of related review words, "cooking games" can be used as the target review word corresponding to the group of related review words. In the case where the review word set includes multiple groups of related review words, a preliminary label word that is not a preset common word is obtained from each group of related review words, thereby obtaining a preliminary label word set formed by multiple preliminary label words.
[0136] The above technical solution determines the comment words corresponding to each user comment information according to the mutual information value to obtain a comment word set, obtains the information entropy corresponding to each comment word in the comment word set, and determines the preliminary label words from the comment word set according to the information entropy corresponding to each comment word to obtain the preliminary label word set. This can obtain more accurate preliminary label words from the user comment information and provide a reliable data basis for determining game tags.
[0137] Figure 5 is based on Figure 1 The embodiment shown is a flowchart of another method for generating a game tag, as shown in FIG. Figure 5 As shown, Figure 1 Determining the game tag according to the second undetermined tag word in step 105 may include the following steps:
[0138] Step 1051: Obtain the emotion category corresponding to the second undetermined label word.
[0139] In one implementation, target user comment information corresponding to the second undetermined label word may be obtained; the target user comment information is used as input to a second preset model so that the second preset model outputs the sentiment category of the second undetermined label word.
[0140] The emotion category includes negative emotion and non-negative emotion. The second preset model is trained by the following method:
[0141] Obtain first model training data, where the first model training data includes multiple user comment information samples and emotion category annotation data corresponding to each user comment information sample; train the first preset initial model using the first model training data to obtain the second preset model.
[0142] For example, the second preset model can be a BERT sentiment classification model, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the working principle of a sentiment classification model shown in an exemplary embodiment of the present disclosure. The target user comment information ("The picture is so beautiful that it makes me vomit") corresponding to the second undetermined label word ("beautiful picture") is used as the input of the sentiment classification model, so that the sentiment classification model outputs the corresponding emotion type (for example, a negative emotion), indicating that the second undetermined label word ("beautiful picture") is a reverse comment on the current game.
[0143] Step 1052: When the emotion category corresponding to the second undetermined label word is non-negative emotion, the second undetermined label word is used as a game label.
[0144] In this step, the second undetermined label word with the emotion category of non-negative emotion is used as the game label. Then, by using the game label as a promotional word for game promotion, or as a display label for the game in the word-of-mouth recommendation display area, the accuracy of the promotional data can be guaranteed.
[0145] The above technical solution can filter out game tags with non-negative emotions from the second pending tag words, can effectively obtain positive game tags for the game, promote and publicize the game through positive game tags, and can effectively ensure the accuracy of the promotional data.
[0146] Figure 7 is based on Figure 1 The embodiment shown is a flowchart of a method for generating a game tag; see Figure 7 , the method may further include:
[0147] Step 106: Acquire a game tag set formed by multiple game tags.
[0148] In this step, the game tags of the formed game tag set can be obtained by the method described in steps 101 to 105 above.
[0149] Step 107: When it is determined that the game tag set includes an including game tag and an included game tag, the included game tag is removed to obtain an updated game tag set.
[0150] The including game tag includes the included game tag, that is, the included game tag is a substring of the including game tag.
[0151] For example, "Tower Defense Game" and "Tower Defense", wherein "Tower Defense Game" is the containing game tag and "Tower Defense" is the included game tag. In this case, "Tower Defense" can be removed.
[0152] In step 108, if it is determined that there is a target game tag in the game tag set that is easily confused with a game name in the preset game name set, and if it is determined that the target game tag does not have the same character string as the game name of the target game, the target game tag is removed from the game tag set to obtain an updated game tag set.
[0153] For example, in the game tag set of the game "Westward Journey Online", there is a game tag "Gobang" (there is a level related to Gobang in the game, so the user entered such a comment). Since there is a game name like "Gobang" in the preset game name set, and the game tag "Gobang" does not have the same character string as the game name "Westward Journey Online", the game tag "Gobang" can be removed to obtain an updated game tag set.
[0154] The reason why the target game label needs to be removed is that the game label "Gobang" is easily mistaken by users as the game "Gobang" and is easily confused by users. Removing the target game label that is easily confused can effectively ensure that the game label obtained is accurate and not easily confused, which is conducive to improving the quality of the game label.
[0155] The above technical solution, by fusing the containing game tag and the included game tag, eliminates the target game tag that is easily confused with other game names, which can effectively ensure that the extracted game tags are accurate and not easily confused, and is conducive to improving the quality of game tags.
[0156] Figure 8 is a block diagram of a game tag generation device shown in an exemplary embodiment of the present disclosure; see Figure 8 , the apparatus may include:
[0157] A first acquisition module 701 is configured to acquire multiple user review information of a target game;
[0158] The second acquisition module 702 is configured to obtain, for each acquired user comment, a mutual information value between two adjacent character strings in the user comment, where the mutual information value represents a probability of forming a phrase between the two adjacent character strings; and obtain preliminary label words from the user comment based on the mutual information value to form a preliminary label word set;
[0159] A first determination module 703 is configured to extract a first undetermined tag word from each user comment information according to the preliminary tag word set;
[0160] The second determining module 704 is configured to determine, through a first preset model, a second undetermined label word that semantically matches the first undetermined label word with the user comment information corresponding to the first undetermined label word;
[0161] The third determining module 705 is configured to determine a game tag according to the second undetermined tag word.
[0162] The above technical solution can effectively ensure the recall rate of game tags by extracting the first pending tag word from each user comment information based on the preliminary tag word set, and determine the second pending tag word that semantically matches the user comment information corresponding to the first pending tag word through the first preset model, and then determine the game tag based on the second pending tag word. This can effectively avoid the situation where the determined game tag is semantically inconsistent with the user comment information, thereby helping to improve the accuracy of the obtained game tags, and can effectively improve the efficiency of game tag extraction compared to manually extracting game tags.
[0163] Optionally, the third determining module 705 is configured to:
[0164] Obtaining the emotion category corresponding to the second undetermined label word, where the emotion category includes negative emotion and non-negative emotion;
[0165] In the case that the emotion category corresponding to the second undetermined label word is a non-negative emotion, the second undetermined label word is used as a game label.
[0166] Optionally, the third determining module 705 is configured to:
[0167] Obtain target user comment information corresponding to the second undetermined label word;
[0168] The target user comment information is used as the input of the second preset model, so that the second preset model outputs the sentiment category of the second undetermined label word.
[0169] Optionally, the second preset model is trained in the following manner:
[0170] Acquire first model training data, where the first model training data includes multiple user comment information samples and sentiment category annotation data corresponding to each user comment information sample;
[0171] The first preset initial model is trained using the first model training data to obtain the second preset model.
[0172] Optionally, the second obtaining module 702 is configured to:
[0173] Determine the comment words corresponding to each comment information of the user according to the mutual information value to obtain a comment word set;
[0174] Obtain the information entropy corresponding to each comment word in the comment word set;
[0175] The preliminary label word is determined from the comment word set according to the information entropy corresponding to each comment word to obtain the preliminary label word set.
[0176] Optionally, the second obtaining module 702 is configured to:
[0177] Two adjacent character strings whose mutual information value is greater than a preset mutual information value threshold are concatenated into one comment word, so as to obtain the comment word set formed by multiple comment words corresponding to multiple user comment information.
[0178] Optionally, the second obtaining module 702 is configured to:
[0179] Determine the target comment word with the largest information entropy from each group of related comment words that have a containment relationship in the comment word set;
[0180] When it is determined that the target comment word does not belong to the preset common word set, the target comment word is used as the preliminary label word to obtain the preliminary label word set.
[0181] Optionally, the first determining module 701 is configured to:
[0182] The first undetermined tag word is extracted from each user comment information through the AC automaton.
[0183] Optionally, the second determining module 704 is configured to:
[0184] The first undetermined label word and the user comment information corresponding to the first undetermined label word are used as inputs of the first preset model to output a matching degree between the user comment information and the first undetermined label word;
[0185] When the matching degree is greater than or equal to a preset matching degree threshold, it is determined that the first undetermined label word and the user comment information corresponding to the first undetermined label word are semantically matched, and the first undetermined label word is used as the second undetermined label word.
[0186] Optionally, the first preset model is trained in the following manner:
[0187] Acquire second model training data, the second model training data comprising: a plurality of user comment information samples and a first undetermined label word sample semantically matched with each of the user comment information samples;
[0188] The second preset initial model is trained using the second model training sample to obtain the first preset model.
[0189] Figure 9 is based on Figure 8 The embodiment shown is a block diagram of a game tag generation device; see Figure 9 , the apparatus may further include:
[0190] The third acquisition module 706 is configured to acquire a game tag set formed by multiple game tags;
[0191] The fourth determining module 707 is configured to, when determining that the game tag set includes an including game tag and an included game tag, remove the included game tag to obtain an updated game tag set.
[0192] Optionally, the device further comprises:
[0193] The fifth determination module 708 is configured to, if it is determined that there is a target game tag in the game tag set that is easily confused with a game name in the preset game name set, and if it is determined that the target game tag does not have the same string as the game name of the target game, remove the target game tag from the game tag set to obtain an updated game tag set.
[0194] The above technical solution, by fusing the containing game tag and the included game tag, eliminates the target game tag that is easily confused with other game names, which can effectively ensure that the extracted game tags are accurate and not easily confused, and is conducive to improving the quality of game tags.
[0195] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0196] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the game tag generation method provided by the present disclosure.
[0197] Figure 10 9 is a block diagram of an apparatus for generating a game tag according to an exemplary embodiment. For example, the apparatus 900 may be provided as a server. Figure 10The apparatus 900 includes a processing component 922, which further includes one or more processors, and a memory resource represented by a memory 932 for storing instructions, such as an application, that can be executed by the processing component 922. The application stored in the memory 932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 922 is configured to execute the instructions to perform the above-described game tag generation method.
[0198] The device 900 may also include a power supply component 926 configured to perform power management of the device 900, a wired or wireless network interface 950 configured to connect the device 900 to a network, and an input / output (I / O) interface 958. The device 900 may operate based on an operating system stored in the memory 932, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.
[0199] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0200] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for generating a game tag, characterized in that: The method comprises: Get multiple user review information of the target game; For each acquired user comment, obtain the mutual information value between two adjacent character strings in the user comment, where the mutual information value represents the probability of forming a phrase between the two adjacent character strings; and obtain preliminary label words from the user comment based on the mutual information value to form a preliminary label word set; Extracting a first undetermined label word from each user comment information according to the preliminary label word set; Determining, by a first preset model, a second undetermined label word that semantically matches the user comment information corresponding to the first undetermined label word; Determine a game tag based on the second undetermined tag word; The determining, by using a first preset model, the first undetermined label word and the second undetermined label word that semantically matches the user comment information corresponding to the first undetermined label word includes: Using the first undetermined label word and the user comment information corresponding to the first undetermined label word as input to the first preset model to output a matching degree between the user comment information and the first undetermined label word; When the matching degree is greater than or equal to a preset matching degree threshold, it is determined that the first undetermined label word and the user comment information corresponding to the first undetermined label word are semantically matched, and the first undetermined label word is used as the second undetermined label word.
2. The method according to claim 1, characterized in that The determining of the game tag according to the second undetermined tag word includes: Obtaining the emotion category corresponding to the second undetermined label word, where the emotion category includes negative emotion and non-negative emotion; When the emotion category corresponding to the second undetermined label word is a non-negative emotion, the second undetermined label word is used as a game label.
3. The method according to claim 2, characterized in that The obtaining of the emotion category corresponding to the second undetermined label word includes: Obtain target user comment information corresponding to the second undetermined label word; The target user comment information is used as input of a second preset model, so that the second preset model outputs the sentiment category of the second undetermined label word.
4. The method according to claim 3, characterized in that The second preset model is trained in the following way: Acquire first model training data, where the first model training data includes multiple user comment information samples and sentiment category annotation data corresponding to each user comment information sample; The first preset initial model is trained using the first model training data to obtain the second preset model.
5. The method according to claim 1, characterized in that The obtaining preliminary label words from the user comment information according to the mutual information value to form a preliminary label word set includes: Determining a comment word corresponding to each piece of the user comment information according to the mutual information value to obtain a comment word set; Obtaining information entropy corresponding to each comment word in the comment word set; The preliminary label words are determined from the comment word set according to the information entropy corresponding to each comment word to obtain the preliminary label word set.
6. The method according to claim 5, characterized in that Determining the comment words corresponding to each piece of the user comment information according to the mutual information value to obtain a comment word set includes: Two adjacent character strings whose mutual information values are greater than a preset mutual information value threshold are concatenated into one comment word, so as to obtain the comment word set formed by multiple comment words corresponding to multiple user comment information.
7. The method according to claim 5, characterized in that The determining the preliminary label words from the comment word set according to the information entropy corresponding to each comment word to obtain the preliminary label word set includes: Determine the target comment word with the largest information entropy from each group of related comment words that have an inclusion relationship in the comment word set; When it is determined that the target comment word does not belong to the preset common word set, the target comment word is used as the preliminary label word to obtain the preliminary label word set.
8. The method according to claim 1, characterized in that The step of extracting a first undetermined label word from each user comment information according to the label word set includes: The first undetermined label word is extracted from each user comment information through an AC automaton.
9. The method according to claim 1, characterized in that The first preset model is trained in the following way: Acquire second model training data, where the second model training data includes: a plurality of user comment information samples and a first undetermined label word sample semantically matched with each of the user comment information samples; The second preset initial model is trained using the second model training data to obtain the first preset model.
10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: Get a game tag set formed by multiple game tags; When it is determined that the game tag set includes an including game tag and an included game tag, the included game tag is removed to obtain an updated game tag set, wherein the included game tag is a substring of the including game tag.
11. The method according to claim 10, characterized in that The method further comprises: When it is determined that there is a target game tag in the game tag set that is easily confused with a game name in the preset game name set, if it is determined that the target game tag and the game name of the target game do not have the same character string, the target game tag is removed from the game tag set to obtain an updated game tag set.
12. A game tag generating device, characterized in that: The device comprises: A first acquisition module is configured to acquire multiple user review information of a target game; The second acquisition module is configured to obtain, for each acquired user comment, a mutual information value between two adjacent character strings in the user comment, wherein the mutual information value represents a probability of forming a phrase between the two adjacent character strings; and obtain preliminary label words from the user comment based on the mutual information value to form a preliminary label word set; A first determination module is configured to extract a first undetermined label word from each user comment information according to the preliminary label word set; A second determining module is configured to determine, through a first preset model, a second undetermined label word that semantically matches the first undetermined label word with the user comment information corresponding to the first undetermined label word; a third determining module, configured to determine a game tag according to the second undetermined tag word; The second determination module is configured to take the first pending label word and the user comment information corresponding to the first pending label word as the input of the first preset model to output the matching degree between the user comment information and the first pending label word; when the matching degree is greater than or equal to the preset matching degree threshold, determine that the first pending label word and the user comment information corresponding to the first pending label word are semantically matched, and use the first pending label word as the second pending label word.
13. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 11.
14. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Chinese address word segmentation method without using dictionary
CN107329950A
Method and device used for outputting information
CN108153856A