Abnormal text recognition method, device, equipment and storage medium in games

By obtaining and processing chat message texts in MMORPG games, building a game public opinion text portrait and performing abnormal identification, the problem of inefficient collection of game public opinion information is solved, and efficient public opinion analysis and monitoring is achieved.

CN114139538BActive Publication Date: 2025-08-12CHENGDU PERFECT WORLD NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111449791.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-08-12
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

In the prior art, MMORPG game public opinion information collection is inefficient and labor expenditure is large, making it difficult to achieve large-scale information collection and analysis.

Method used

By obtaining the chat message text of the player in the game chat channel, performing data desensitization processing, constructing structured data, extracting target keywords, using the pre-constructed game public opinion text portrait for abnormal identification, and combining with the game environment to determine whether there are abnormalities in the chat message text.

Benefits of technology

It improves the efficiency of game public opinion information analysis, reduces manual monitoring, is suitable for public opinion analysis in complex game environments, and improves monitoring timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139538B_ABST
    Figure CN114139538B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device, and storage medium for identifying abnormal text in games. The method pre-acquires a set of chat message texts from players in a game chat channel within a historical time period, extracts game public opinion keywords from the chat message text set, obtains game public opinion keyword structure data, and constructs a game public opinion text portrait based on the keyword structure data. The game public opinion text portrait is then used to perform abnormal identification on target keywords in newly entered chat message texts, and then, based on the abnormal identification results and the game environment corresponding to the chat message text, it is determined whether the chat message text has abnormalities. This method is suitable for accurate analysis of public opinion in games under complex game environments, reducing manual monitoring of the game public opinion environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for identifying abnormal text in a game. Background Art

[0002] At present, in the current MMORPG (Massive Multiplayer Online Role-Playing Game), players' public opinion information on the game plays a very important role in the operation and development of the game.

[0003] Currently, public opinion information in online games is primarily collected manually, with operators observing and collecting player comments on social media, and customer service staff collecting player feedback and questions. While this method can be highly targeted and accurate, it is inefficient and labor-intensive, making it unsuitable for large-scale information collection and analysis. Summary of the Invention

[0004] The embodiments of the present invention provide a method, apparatus, device, and storage medium for identifying abnormal text in games, which can effectively improve the above-mentioned problems.

[0005] In a first aspect, an embodiment of the present invention provides a method for identifying abnormal text in a game, the method comprising:

[0006] Get the chat message text output by the player in the game chat channel;

[0007] Extracting target keywords from the chat message text;

[0008] Calling a pre-built game public opinion text portrait to identify anomalies of the target keyword, wherein the process of constructing the game public opinion text portrait includes: obtaining a chat message text set of players in a game chat channel within a historical time period, extracting game public opinion keywords from the chat message text set, obtaining game public opinion keyword structure data, and constructing the game public opinion text portrait based on the keyword structure data;

[0009] Determine whether the chat message text has an abnormality based on the abnormality recognition result of the target keyword and the game environment corresponding to the chat message text.

[0010] Furthermore, obtaining the chat message text output by the player in the game chat channel includes:

[0011] Get the player's raw chat message from the game chat channel;

[0012] Performing data desensitization processing on the player's private information involved in the original chat message;

[0013] Based on the chat messages obtained after the data desensitization processing, structured chat data is constructed on a player-by-player basis, and the structured chat data includes: chat message text output by the player in the game chat channel.

[0014] Furthermore, extracting target keywords from the chat message text includes:

[0015] Segmenting the chat message text based on a preset dictionary, wherein the preset dictionary includes a plurality of words that are used more frequently than a preset frequency in the game environment;

[0016] The target keyword is determined from the word segmentation result of the chat message text.

[0017] Furthermore, obtaining the game public opinion keyword structure data and constructing the game public opinion text portrait based on the keyword structure data includes:

[0018] Divide the extracted game public opinion keywords by player to obtain the game public opinion keyword structure data corresponding to each player;

[0019] For each of the players, a player text portrait is constructed based on the game public opinion keyword structure data.

[0020] Furthermore, the player text portrait is constructed based on the game public opinion keyword structure data, including:

[0021] Determine the frequency of occurrence of each game public opinion keyword in the keyword structure data corresponding to each player;

[0022] Each game public opinion keyword in the keyword structure data is stored in correspondence with the respective occurrence frequencies to form the player text portrait.

[0023] Furthermore, obtaining the game public opinion keyword structure data and constructing the game public opinion text portrait based on the keyword structure data includes:

[0024] Divide the extracted game public opinion keywords by server, and obtain the game public opinion keyword structure data corresponding to each server;

[0025] For each of the servers, a server text portrait is constructed based on the game public opinion keyword structure data, and the server text portrait is used to analyze public opinion information of all players in the server.

[0026] Furthermore, the server text portrait is constructed based on the game public opinion keyword structure data, including:

[0027] Determine the frequency of occurrence of each game public opinion keyword in the keyword structure data corresponding to each server;

[0028] Each game public opinion keyword in the keyword structure data is stored in correspondence with the respective occurrence frequencies to form the server text portrait.

[0029] Furthermore, the game public opinion text portrait includes a plurality of game public opinion keywords and their corresponding frequencies of occurrence. The calling of the pre-built game public opinion text portrait to perform abnormality identification on the target keyword includes:

[0030] If the target keyword exists in the game public opinion text portrait, then based on the corresponding occurrence frequency of the target keyword in the game public opinion text portrait and the occurrence frequency of each game public opinion keyword in the game public opinion text portrait, perform abnormal identification on the target keyword;

[0031] If the target keyword does not exist in the game public opinion text portrait, it is determined that there is no abnormality in the target keyword.

[0032] Furthermore, the abnormality identification of the target keyword based on the corresponding occurrence frequency of the target keyword in the game public opinion text portrait and the occurrence frequency of each game public opinion keyword in the game public opinion text portrait includes:

[0033] Based on the frequency of occurrence of each game public opinion keyword in the game public opinion text portrait, obtain the average frequency of the keyword in the game public opinion text portrait;

[0034] If the frequency of occurrence of the target keyword in the game public opinion text portrait is greater than or equal to the average frequency, it is determined that there is no abnormality in the target keyword;

[0035] If the corresponding occurrence frequency of the target keyword in the game public opinion text portrait is less than the average frequency, the abnormal score of the target keyword is determined.

[0036] Furthermore, determining the abnormality score of the target keyword includes:

[0037] Based on the corresponding appearance frequency of the target keyword in the game public opinion text portrait, and the number of game public opinion keywords contained in the game public opinion text portrait, the abnormal score of the target keyword is obtained.

[0038] Furthermore, determining whether the chat message text has an abnormality based on the abnormality recognition result of the target keyword and the game environment corresponding to the chat message text includes:

[0039] Determining an abnormality judgment threshold based on the game environment corresponding to the chat message text;

[0040] Based on the anomaly score in the anomaly identification result and the anomaly judgment threshold, determine whether the chat message text has an anomaly.

[0041] Furthermore, determining the abnormality judgment threshold based on the game environment corresponding to the chat message text includes:

[0042] An abnormality assessment threshold is determined based on the version update time of the game environment corresponding to the chat message text and / or the opening time of the server where the game environment is located.

[0043] Further, based on the abnormality score in the abnormality identification result and the abnormality judgment threshold, determining whether the chat message text has an abnormality includes:

[0044] Normalize the anomaly scores in the anomaly recognition results obtained within a preset time window;

[0045] Sort the normalized anomaly scores from low to high to determine the percentile corresponding to the anomaly score of the target keyword;

[0046] If the percentile exceeds the abnormality judgment threshold, it is determined that there is an abnormality in the chat message text.

[0047] In a second aspect, an embodiment of the present invention provides a device for identifying abnormal text in a game, the device comprising:

[0048] The message acquisition module is used to obtain the chat message text output by players in the game chat channel;

[0049] A keyword extraction module, used to extract target keywords from the chat message text;

[0050] An identification module is used to call a pre-built game public opinion text portrait to perform anomaly identification on the target keyword, wherein the process of constructing the game public opinion text portrait includes: obtaining a chat message text set of players in a game chat channel within a historical time period, extracting game public opinion keywords from the chat message text set, obtaining game public opinion keyword structure data, and constructing the game public opinion text portrait based on the keyword structure data;

[0051] The determination module is used to determine whether there is an abnormality in the chat message text based on the abnormality recognition result of the target keyword and the game environment corresponding to the chat message text.

[0052] In a third aspect, an embodiment of the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for identifying abnormal text in a game provided in the first aspect are implemented.

[0053] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for identifying abnormal text in a game provided in the first aspect.

[0054] The method for identifying abnormal text in games provided by an embodiment of the present invention obtains a set of chat message texts from players in a game chat channel within a historical time period in advance, extracts game public opinion keywords from the chat message text set, obtains game public opinion keyword structure data, and constructs a game public opinion text portrait based on the keyword structure data, thereby calling the game public opinion text portrait to perform abnormal identification of target keywords in the newly entered chat message text, and then determines whether the chat message text is abnormal based on the abnormal identification results and the game environment corresponding to the chat message text. This technical solution constructs a game public opinion text portrait by extracting chat messages generated by players in the social environment within the game, and performs abnormal analysis of the in-game public opinion in combination with the current game environment in which the in-game public opinion is located. It is suitable for accurate analysis of in-game public opinion in complex game environments, reduces manual monitoring of the game public opinion environment, and is conducive to improving the efficiency of analyzing game public opinion information.

[0055] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0057] Figure 1 A flowchart of a method for identifying abnormal text in a game provided by an embodiment of this specification is shown;

[0058] Figure 2 A flowchart of the text portrait construction process in an embodiment of this specification is shown;

[0059] Figure 3 It shows a module block diagram of the abnormal text recognition device in the game provided by the embodiment of this specification;

[0060] Figure 4 A schematic structural diagram of an exemplary electronic device in an embodiment of this specification is shown. DETAILED DESCRIPTION

[0061] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0062] In the first aspect, the embodiments of this specification provide a method for identifying abnormal text in a game, such as Figure 1 As shown, the method may at least include the following steps S101 to S104.

[0063] Step S101: Obtain the chat message text output by the player in the game chat channel.

[0064] To foster a sense of community in online games, in-game chat systems are often implemented. Players can communicate with other players through various chat channels within these systems. For example, players can post messages in the world chat channel, and other players on the same server can see their messages. Another example is that after forming a team, players can chat with other team members in the team chat channel.

[0065] Based on this, the text content output channels accessible to players in the game can be divided into two types: public channels and private channels. Public channels are channels in the game environment where any player can access messages, meaning all content is publicly available. Private channels are channels in the game environment where not all players can access messages, meaning not all content is publicly available. For example, public channels include, but are not limited to, world channels, faction channels, regional channels, and current channels; private channels include, but are not limited to, legion channels, sworn brotherhood channels, team channels, and secret channels.

[0066] In an optional implementation, the original chat messages output by all players in each chat channel of the game can be classified according to a preset classification rule to obtain the original chat message set D raw For example, the preset classification rules may be as shown in Table 1.

[0067] Table 1

[0068]

[0069] For example, according to the above exemplary classification rules, the original chat message set D raw The structure can be expressed as: raw ={d1,d2,…,d8}. Among them, the subset d i is the original chat message of channel number i. The specific structure can be expressed as follows:

[0070] d i ={chatData1,chatData2,…,chatData j}, where j = 1, 2, 3, ...

[0071] Among them, chatData j For the jth chat message in this channel, the chat message may include: speaking timestamp, speaking role nickname and message text i.e. speaking content. For example, chatData j The structure can be expressed as:

[0072] chatData j =<timestamp,name,content>

[0073] Among them, Timestamp indicates the timestamp of the speech; Name indicates the nickname of the speaking role; Content indicates the message text.

[0074] After obtaining the original chat message, to facilitate further analysis of the chat message text, the original chat message needs to be preprocessed. The specific preprocessing process can be configured according to actual needs. The following mainly lists three preprocessing processes for illustration. During the specific implementation, other preprocessing processes can also be configured as needed.

[0075] The first is transcoding. If the in-game messages are stored in a special encoding, then if the original chat messages are in a special encoding, then transcoding is required to convert the original chat messages into plain text.

[0076] The second method involves data desensitization. Considering that the plaintext content of messages contains a significant amount of player personal information, to protect player privacy, it is necessary to desensitize the player's private information contained in the original chat message. For example, this private information may include the player's character nickname contained in the original chat message. Alternatively, in addition to the player's character nickname, this private information may also include the account information associated with the player's character nickname. This account information may include, but is not limited to, the player's in-game character identity information (character ID), the character's game time, and the account's existence. The specific information can be determined based on the actual application scenario.

[0077] During implementation, appropriate data desensitization algorithms can be used based on actual needs. For example, in one application scenario, the K-Anonymity algorithm can be used to desensitize player privacy information contained in plaintext chat messages. Table 2 compares a sample set of data before and after desensitization using the K-Anonymity algorithm. As shown in Table 2, data desensitization can protect player privacy information, preventing it from being exploited or leaked by unauthorized parties and potentially infringing on player privacy.

[0078] Table 2

[0079] data Before desensitization treatment After desensitization treatment Character ID 25316 2531* Character nickname Zhang San open* Role-playing game duration (minutes) 343145 343*** Account existence time (days) 924 92*

[0080] The third method involves constructing structured data. Because the original chat message collection includes all chat messages from all players on the same server and across different chat channels in a single subset, it's inconvenient to analyze chat message text on a per-player basis. Therefore, before analyzing chat message text, we can construct structured data on a per-player basis based on the desensitized chat messages. This allows us to aggregate chat messages from the same player across all chat channels, making them easier to access.

[0081] Specifically, a player's structured data may include: chat message text output by the player in the game chat channel, and the chat message text is the chat message text that has been processed after data desensitization. In addition, in order to make the structured data more reflective of the player's relevant situation in the game, in addition to the chat message text, the structured data may also include: the player's private information that has been processed after data desensitization. For example, it may include: the character ID, character nickname, server ID, character game time, and account existence time that have been processed after data desensitization. It is understandable that the character nickname can be obtained from the player's chat message, and the character nickname is associated with the character ID, and using this as an index, other account-related information can be obtained in the game database.

[0082] For example, the structured data of player number k can be recorded as S k , the specific structure is as follows:

[0083] S k ={

[0084] playerID,

[0085] playerName,

[0086] zoneID,

[0087] inGameTime,

[0088] timeAccExisted,

[0089] chatData

[0090] }

[0091] Among them, the member variables and their meanings are shown in Table 3.

[0092] Table 3

[0093] Member variables meaning playerID Character ID playerName Character nickname zoneID Server ID inGameTime Character play time timeAccExisted Account existence time chatData Chat Messages

[0094] Based on this, each chat message text in the player's structured data can be conveniently called to execute the following step S102, which is beneficial to improving the efficiency of message processing for the same player.

[0095] Step S102: extract target keywords from the chat message text.

[0096] Generally speaking, chat messages contain a large amount of meaningless words, known as disturbance information. To prevent this from affecting the accuracy of text analysis, this disturbance information can be processed before keyword extraction. As you can see, chat messages may contain multiple types of disturbance information. The following mainly illustrates two processing procedures.

[0097] The first method is to remove stop words. Stop words are frequently used articles, adverbs, prepositions, or conjunctions in natural language. These words can interfere with the natural language analysis process, resulting in unsatisfactory results.

[0098] The second method is to replace the escaped characters representing emoticons in the game with text. These escaped characters can be interpreted from the patterns to convey the intended expression, but they cannot be directly applied to natural language processing. Therefore, it is necessary to convert all escaped emoticons contained in chat messages into text according to pre-set rules. For example, the emoticon representing "anger" can be converted into the text "@Anger".

[0099] After processing the disturbance information in the chat message text, we can further perform word segmentation on the chat message text and then extract keywords from the word segmentation results as target keywords. The target keywords are the keywords that need to be identified for anomalies.

[0100] Specifically, there are many word segmentation algorithms that can be used. In an optional implementation, a dictionary-based word segmentation algorithm can be used. First, the sentence is divided into words according to a preset dictionary, and then the optimal combination of words is found. To do this, a preset dictionary needs to be constructed first. During specific implementation, a preset dictionary can be constructed based on high-frequency words used in actual game scenarios, that is, words that are used more frequently than a preset frequency. For example, the word types in the preset dictionary may include: location names, equipment names, prop names, and skill names in the game. The preset dictionary constructed in this way is more in line with the game scenario corresponding to the message text, which is conducive to improving the accuracy of the word segmentation results.

[0101] For example, in MMORPG gaming scenarios, there are a large number of specific terms used in the game. We can first initialize the dictionary, then add a large number of high-frequency terms likely to be used in specific scenarios to the dictionary. After manual qualitative screening, we can obtain a preset dictionary. For example, the number of terms added to the dictionary can be around 11,000, and the main types and numbers can be shown in Table 4.

[0102] Table 4

[0103]

[0104]

[0105] On this basis, the chat message text can be segmented based on a preset dictionary. In an optional implementation, a Trie tree can be constructed based on the preset dictionary. A Trie tree is a commonly used storage method for counting, storing, or sorting large amounts of text words, significantly reducing search time. A directed acyclic graph corresponding to the chat message text is then generated based on the Trie tree. In simple terms, this involves performing a dictionary lookup based on a given dictionary, generating several possible sentence segmentations, and constructing a directed acyclic graph of all possible sentence-forming words in the chat message text. Furthermore, sentence segmentation is performed on the text based on the directed acyclic graph. Specifically, the chat message text can be segmented by scanning the frequency of different words and the word formation within sentences, and then using dynamic programming rules to find the maximum probability path in the directed acyclic graph.

[0106] Furthermore, keywords can be extracted from the chat message text segmentation results as target keywords. For example, the TF-IDF (Term Frequency-Inverse Document Frequency) algorithm can be used to extract keywords from the words contained in the chat message text. It is understood that the importance of a word in the text content is proportional to its occurrence and inversely proportional to its frequency of occurrence in the corpus. Therefore, the TF-IDF algorithm can effectively reflect the importance of a word in a text.

[0107] After the target keywords are extracted, the following step S103 may be continued to perform abnormality analysis on the target keywords.

[0108] Step S103: call the pre-built game public opinion text portrait to identify abnormalities of the target keywords.

[0109] Among them, the game public opinion text portrait is pre-built based on the chat message text set of players in the game chat channel during the historical period. The following is an explanation of the construction process of the game public opinion text portrait. Figure 2 As shown, it may include steps S201 to S203.

[0110] Step S201: Obtain a chat message text set of players in a game chat channel within a historical time period.

[0111] The chat message texts included in the chat message text set are the message texts posted by the player in the game chat channel before the chat message texts obtained in step S101. The length of the historical time period can be set according to actual needs, for example, 7 days, a month, or a quarter.

[0112] It should be noted that the process of obtaining the chat message text in the chat message text set is similar to the process of obtaining the chat message text in the above step S101, and will not be repeated here.

[0113] Step S202: extract game public opinion keywords from the chat message text set to obtain game public opinion keyword structure data.

[0114] It should be noted that the process of extracting game public opinion keywords from the chat message text set is similar to the keyword extraction process in the above step S102, and will not be repeated here.

[0115] The game public opinion keyword structure data is obtained by dividing the extracted game public opinion keywords according to specific objects. Specifically, the specific objects can be players and / or servers. For example, when the specific object is a player, the extracted game public opinion keywords are divided by player, and the game public opinion keyword structure data corresponding to each player is obtained; when the specific object is a server, the extracted game public opinion keywords are divided by server, and the game public opinion keyword structure data corresponding to each server is obtained.

[0116] Step S203: construct a game public opinion text portrait based on the keyword structure data.

[0117] Accordingly, the game public opinion text profile can include player text profiles and / or server text profiles. Therefore, the process of constructing a game public opinion text profile based on keyword structure data can include: constructing a player text profile for each player based on the corresponding game public opinion keyword structure data; and / or constructing a server text profile for each server based on the game public opinion keyword structure data.

[0118] The following is an example of the specific process of constructing a player text profile. As an implementation method, you can first determine the frequency of occurrence of each game public opinion keyword in the keyword structure data corresponding to each player; then store each game public opinion keyword in correspondence with its respective frequency of occurrence to form a player text profile. For example, the construction method is as follows:

[0119] Player number k, whose player text portrait is M k It can be expressed as:

[0120] M k ={<f1,n1> ,<f2,n2> ,<f3,n3> ,…, <f g ,n g >}

[0121] Among them, f g Indicates the g-th game public opinion keyword, n g represents the total number of occurrences of the g-th game public opinion keyword in the corresponding keyword structure data, i.e., the frequency of occurrence, f g With n g The two elements together form a feature tuple in the portrait. For example, if the word "golden armor" appears 17 times in the player's speech, then the feature tuple is <golden armor, 17>.

[0122] It is understandable that due to the individuality of different players, the entire player text portrait will vary greatly. Therefore, it is necessary to build a separate text portrait for each player, which can characterize the player's speaking and chatting tendencies over a long period of time, so as to identify whether there are any abnormalities in the player's chat text.

[0123] Similarly, the process of constructing a server text portrait may include: determining the frequency of occurrence of each game public opinion keyword in the keyword structure data corresponding to each server; storing each game public opinion keyword in correspondence with its respective frequency of occurrence to form a server text portrait.

[0124] It should be noted that the construction of server text portrait is similar to that of player text portrait. The difference is that the corpus used to construct the player text portrait is the chat message text of the player in all chat channels, while the corpus used to construct the server text portrait is the chat message text of all players in the server in all chat channels. The server text portrait construction process will not be described in detail here.

[0125] Server text profiles can be used to analyze public opinion information for all players on that server. For example, public opinion information analysis can include keyword anomaly analysis or discussion heat analysis of specific game objects (such as in-game items, skills, or gameplay).

[0126] Different servers serving the same game have varying environments due to varying lengths of time. Building text profiles for each server can be used to analyze the overall gaming environment within a short window. For example, after a major version update, the frequency and timing of keyword occurrences for in-game items, skills, or gameplay can be analyzed. For example, the frequency of keyword occurrences for a newly released skill can be obtained from the server text profile to measure whether the level of discussion about that skill on that server is meeting expectations.

[0127] On the basis of completing the construction of the game public opinion text portrait, for the new chat message text, that is, the chat message text obtained in step S101, after the target keyword extraction in step S102, the pre-constructed game public opinion text portrait can be called to perform abnormal identification of the target keywords in the new chat message text.

[0128] Specifically, since the game public opinion text portrait includes player text portrait and / or server text portrait, in specific implementation, the player text portrait can be called to identify abnormalities in the target keywords of the corresponding player's chat message text, thereby analyzing whether there are abnormalities in the player's chat message text on a player-by-player basis. For example, if the new chat message is a chat message text posted by player A, the text portrait based on player A can be called to determine whether there are abnormalities in the target keywords in the chat message. Alternatively, the server text portrait can be called to identify abnormalities in the target keywords of the new chat message texts of all players on the server, thereby analyzing whether there are abnormalities in the chat message text within the server on a server-by-server basis. The text portrait to be called is determined based on the needs of the actual application scenario.

[0129] The process of using player text profiling to identify keyword anomalies is similar to that of using server text profiling to identify keyword anomalies. The only difference is that the former identifies new chat messages from a single player, while the latter identifies new chat messages from the entire server. The following mainly uses the process of using player text profiling to identify keyword anomalies as an example.

[0130] The abnormality identification process for the target keyword may include: if the target keyword does not exist in the corresponding player text portrait, it means that the target keyword has not appeared in the historical chat message text of the player, and it can be determined that there is no abnormality in the target keyword; if the target keyword exists in the corresponding player text portrait, then the target keyword is identified as abnormal based on the corresponding occurrence frequency of the target keyword in the player text portrait and the occurrence frequency of each game public opinion keyword in the player text portrait.

[0131] In an optional implementation, the average frequency of the game public opinion keywords in the player's text portrait can be obtained based on the frequency of occurrence of each game public opinion keyword in the player's text portrait; if the corresponding frequency of occurrence of the target keyword in the player's text portrait is greater than or equal to the above average frequency, it is determined that there is no abnormality in the target keyword; if the corresponding frequency of occurrence of the target keyword in the player's text portrait is less than the above average frequency, the abnormality score of the target keyword is determined.

[0132] It should be noted that the average frequency used as a judgment benchmark can be the arithmetic mean, geometric mean, or root mean square average of the frequencies of all game public opinion keywords. Of course, in addition to using the average frequency, in other embodiments of this specification, the median of the frequencies of all game public opinion keywords in the player's text portrait can also be used as the judgment benchmark. This embodiment does not limit this, and the specific frequency can be determined according to actual needs.

[0133] For example, still taking player A as an example, assume that the target keyword corresponding to player A appears in the text profile of player A with a frequency of n, the total number of game public opinion keywords contained in the text profile of player A is N, and the average frequency of all game public opinion keywords is E. Taking the average frequency as the arithmetic mean, the average frequency E can be calculated according to the following formula:

[0134]

[0135] Among them, n h The frequency of the hth game public opinion keyword in player A's text profile. If n ≥ E, the target keyword is frequently used by the player in historical chats and can be considered normal. If n < E, the target keyword is rarely used in historical chats, indicating an abnormal risk. The target keyword's anomaly score is then further determined.

[0136] Furthermore, for target keywords that do not contain any anomalies, the target keywords can be added to the player's text profile to update the player's text profile. Similarly, target keywords that do not contain any anomalies can be added to the server text profile of the player's server to synchronously update the server text profile.

[0137] The anomaly score is used to measure the risk level of the target keyword. A higher score indicates a greater risk level, and vice versa. The anomaly score of a target keyword is negatively correlated with the frequency of the target keyword appearing in the corresponding player's text profile. In other words, the higher the frequency of the target keyword appearing in the player's text profile, the lower the anomaly score.

[0138] In an optional embodiment, the process of determining the abnormal score of the target keyword may include: obtaining the abnormal score of the target keyword based on the corresponding frequency of occurrence of the target keyword in the player text portrait, and the number of game public opinion keywords contained in the player text portrait.

[0139] For example, the anomaly score s can be calculated according to the following formula.

[0140]

[0141] Of course, the calculation method of the abnormal score is not limited to the above formula, and other applicable methods can also be used. For example, the formula: Or, Calculate the anomaly score, where α and β are weight coefficients that can be set according to the actual application scenario.

[0142] It should be noted that the process of calling the server text portrait to perform abnormal identification of target keywords in the new chat message texts of all players on the server can refer to the above-mentioned process of calling the player text portrait to perform keyword abnormal identification, which will not be repeated here.

[0143] After obtaining the abnormality recognition result of the target keyword, that is, the above-mentioned abnormality score, the following step S104 can be executed to further determine whether there is any abnormality in the chat message text.

[0144] Step S104: Determine whether there is any abnormality in the chat message text based on the abnormality recognition result of the target keyword and the game environment corresponding to the chat message text.

[0145] In an optional embodiment, the above-mentioned step S104 may include: determining an abnormality judgment threshold based on the game environment corresponding to the chat message text; and determining whether there is an abnormality in the chat message text based on the abnormality score and the abnormality judgment threshold in the abnormality identification result.

[0146] Specifically, considering that the game environment is relatively complex, especially MMORPG games, the abnormality judgment threshold can be flexibly set according to the game environment. For example, the abnormality judgment threshold can be determined based on the version update time of the game environment corresponding to the chat message text and / or the opening time of the server where the game environment is located. Taking into account the large differences in text portraits of different players and text portraits of different servers, in an optional embodiment, the abnormality scores in the abnormality recognition results obtained within the preset time window can be normalized, and the abnormality judgment threshold is set to the relative proportion threshold within the normalized abnormality score interval. Of course, in other embodiments of this specification, the abnormality judgment threshold can also be directly set as a score threshold, which is not limited here.

[0147] Specifically, it can be determined whether the opening time of the server where the game environment is located exceeds the first time threshold. If it exceeds the first time threshold, it means that the server is a server that has been open for a long time (old server). At this time, the first preset value is used as the abnormal judgment threshold. In ordinary servers, the main purpose is to locate places where bugs are prone to occur. Old servers have the characteristics of long opening time, relatively stable users, and difficult to change game environments. Therefore, the abnormal judgment threshold for text warnings should be set to a medium level. For example, the second preset value can be set to 40%. In order to prevent special problems that are difficult to find in testing, maintain the stability of the server environment.

[0148] If the server opening time does not exceed the first time threshold, it means that the server is a newly opened server (new server), and the second preset value is used as the abnormality judgment threshold. Among them, the first preset value is less than the second preset value. Newly opened servers have the characteristics of short opening time, fast influx of players, and high data density. Therefore, the statistical time window required for text portrait data is relatively short, and the abnormality judgment threshold for text warnings should be set at a higher level to reduce misjudgment of detection situations. For example, the second preset value can be set to 70%. At the same time, data within a time window when the server is first opened can be collected as the basic data required for the first portrait of the next new server. And each time the i-th server is opened, the data of the i-1-th server is used as the original text portrait.

[0149] Furthermore, it is also possible to detect whether the time interval between the version update time of the game environment and the current time is less than a second time threshold. If it is less than the first time threshold, it means that the game has recently had a version update. In this case, the third preset value can be used as the abnormality judgment threshold. If it is not less than the first time threshold, it means that the game has not had a version update recently. In this case, the abnormality judgment threshold can be set according to the length of time the server has been open. Among them, the third preset value is less than the first preset value. It is understandable that under normal circumstances, after a major version update, players will usually discuss the updated content. Therefore, the abnormality judgment threshold for text warnings should be set at a lower level, and a wider variety of abnormal keywords should be output. By combining the different channel types divided by the message acquisition process, R&D personnel can use qualitative and quantitative evaluation criteria to conduct feedback and preliminary research on the new version content. For example, the third preset value can be set to 30%.

[0150] Furthermore, if the game has recently been updated, the third preset value can be adjusted within a reasonable range based on the specific conditions of the server. For example, the third preset value can be adjusted based on the server's operating time. For example, for an old server, the third preset value can be appropriately set to 45%-50%; for a new server, the third preset value can be appropriately adjusted to 55%-60%.

[0151] Accordingly, the process of determining whether a chat message text contains an anomaly based on the anomaly score in the anomaly identification result and the anomaly assessment threshold may include: normalizing the anomaly scores in the anomaly identification result obtained within a preset time window; sorting the normalized anomaly scores from low to high to determine the percentile corresponding to the anomaly score of the target keyword; and determining that the chat message text contains an anomaly if the percentile exceeds the anomaly assessment threshold. The length of the preset time window can be set as needed, for example, to one day.

[0152] Normalizing the anomaly scores can more conveniently count the scores of abnormal target keywords in the entire sample space, unify the standards, and obtain anomaly scores distributed within (0, 1). Accordingly, the score at the X percentage of the abnormal scores obtained after normalization, from low to high, is the anomaly score threshold. Here, X is the above-mentioned anomaly judgment threshold. Therefore, it is also possible to first determine the anomaly score threshold within the normalized anomaly score interval based on the anomaly judgment threshold. If the normalized anomaly score of the target keyword exceeds the anomaly score threshold, it is determined that the chat message text is abnormal.

[0153] Furthermore, the specific handling method for chat messages identified as abnormal can be customized based on actual needs. For example, an alert can be issued for abnormal target keywords to facilitate further verification and processing by relevant backend personnel. The specific content of the alert is also customized based on actual needs. For example, it may include, but is not limited to, the player's character ID, server ID, abnormal target keyword, and anomaly score. Furthermore, the chat message containing the abnormal target keyword may also be included.

[0154] In summary, the method for identifying abnormal text in games provided by the embodiments of this specification constructs a text portrait of game public opinion by extracting chat messages generated by players in the social environment within the game, and performs abnormal identification on the new chat message text in combination with the current game environment where the in-game public opinion is located, that is, performs abnormal analysis on the in-game public opinion. It can be applied to the accurate analysis of public opinion in games under complex game environments, and reduces manual monitoring of the game public opinion environment, which is conducive to improving the efficiency of analyzing game public opinion information. At the same time, it also improves the timeliness of monitoring the game environment. Moreover, by extracting keywords from the message text, it is more conducive to locating abnormal remarks in the game.

[0155] In the second aspect, based on the same inventive concept, the embodiment of this specification also provides a device for identifying abnormal text in a game, such as Figure 3 As shown, the abnormal text recognition device 30 may include:

[0156] A portrait construction module 301 is used to obtain a chat message text set of players in a game chat channel within a historical time period, extract game public opinion keywords from the chat message text set, obtain game public opinion keyword structure data, and construct a game public opinion text portrait based on the keyword structure data;

[0157] Message acquisition module 302, used to acquire chat message text output by players in the game chat channel;

[0158] A keyword extraction module 303 is used to extract target keywords from the chat message text;

[0159] Identification module 304, used to call the pre-built game public opinion text portrait to identify abnormalities of the target keyword;

[0160] The determination module 305 is used to determine whether there is an abnormality in the chat message text based on the abnormality recognition result of the target keyword and the game environment corresponding to the chat message text.

[0161] In an optional implementation, the message acquisition module 302 includes:

[0162] The acquisition submodule is used to obtain the player's original chat messages from the game chat channel;

[0163] A desensitization submodule, configured to perform data desensitization processing on the player's private information involved in the original chat message;

[0164] A construction submodule is used to construct structured chat data based on the chat messages obtained after the data desensitization processing, with each player as a unit. The structured chat data includes: chat message text output by the player in the game chat channel.

[0165] In an optional embodiment, the keyword extraction module 303 includes:

[0166] A word segmentation submodule, configured to segment the chat message text based on a preset dictionary, wherein the preset dictionary includes a plurality of words that are used more frequently than a preset frequency in the game environment;

[0167] The determination submodule is used to determine the target keyword from the word segmentation result of the chat message text.

[0168] In an optional embodiment, the portrait construction module 301 is used to:

[0169] Divide the extracted game public opinion keywords by player to obtain the game public opinion keyword structure data corresponding to each player;

[0170] For each of the players, a player text portrait is constructed based on the game public opinion keyword structure data.

[0171] In an optional embodiment, the portrait construction module 301 is used to:

[0172] Determine the frequency of occurrence of each game public opinion keyword in the keyword structure data corresponding to each player;

[0173] Each of the game public opinion keywords is stored in correspondence with the respective occurrence frequencies to form the player text portrait.

[0174] In an optional embodiment, the portrait construction module 301 is used to:

[0175] Divide the extracted game public opinion keywords by server, and obtain the game public opinion keyword structure data corresponding to each server;

[0176] For each of the servers, a server text portrait is constructed based on the game public opinion keyword structure data, and the server text portrait is used to analyze public opinion information of all players in the server.

[0177] In an optional embodiment, the portrait construction module 301 is used to:

[0178] Determine the frequency of occurrence of each game public opinion keyword in the keyword structure data corresponding to each server;

[0179] Each of the game public opinion keywords is stored in correspondence with its respective occurrence frequency to form the server text portrait.

[0180] In an optional embodiment, the game public opinion text portrait includes multiple game public opinion keywords and their corresponding frequencies of occurrence. The identification module 304 is used to:

[0181] If the target keyword exists in the game public opinion text portrait, then based on the corresponding occurrence frequency of the target keyword in the game public opinion text portrait and the occurrence frequency of each game public opinion keyword in the game public opinion text portrait, perform abnormal identification on the target keyword;

[0182] If the target keyword does not exist in the game public opinion text portrait, it is determined that there is no abnormality in the target keyword.

[0183] In an optional implementation, the identification module 304 is configured to:

[0184] Based on the frequency of occurrence of each game public opinion keyword in the game public opinion text portrait, obtain the average frequency of the game public opinion keyword in the game public opinion text portrait;

[0185] If the frequency of occurrence of the target keyword in the game public opinion text portrait is greater than or equal to the average frequency, it is determined that there is no abnormality in the target keyword;

[0186] If the corresponding occurrence frequency of the target keyword in the game public opinion text portrait is less than the average frequency, the abnormal score of the target keyword is determined.

[0187] In an optional implementation, the identification module 304 is configured to:

[0188] Based on the corresponding appearance frequency of the target keyword in the game public opinion text portrait, and the number of game public opinion keywords contained in the game public opinion text portrait, the abnormal score of the target keyword is obtained.

[0189] In an optional implementation, the determining module 305 is configured to:

[0190] Determining an abnormality judgment threshold based on the game environment corresponding to the chat message text;

[0191] Based on the anomaly score in the anomaly identification result and the anomaly judgment threshold, determine whether the chat message text has an anomaly.

[0192] In an optional implementation, the determining module 305 is configured to:

[0193] An abnormality assessment threshold is determined based on the version update time of the game environment corresponding to the chat message text and / or the opening time of the server where the game environment is located.

[0194] In an optional implementation, the determining module 305 is configured to:

[0195] Normalize the anomaly scores in the anomaly recognition results obtained within a preset time window;

[0196] Sort the normalized anomaly scores from low to high to determine the percentile corresponding to the anomaly score of the target keyword;

[0197] If the percentile exceeds the abnormality judgment threshold, it is determined that there is an abnormality in the chat message text.

[0198] 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.

[0199] In a third aspect, an embodiment of this specification further provides an electronic device comprising a processor and a memory, wherein the memory is coupled to the processor and stores instructions, which, when executed by the processor, enable the electronic device to execute the steps of the abnormal text recognition method in the game provided in the first aspect above.

[0200] Figure 41 is a structural diagram of an electronic device as a server in an embodiment of the present specification. The server 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1922 (for example, one or more processors) and a memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) for storing application programs 1942 or data 1944. Among them, the memory 1932 and the storage medium 1930 can be short-term storage or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1922 can be configured to communicate with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.

[0201] The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and / or one or more operating systems 1941, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0202] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1932 including instructions. The instructions can be executed by a processor of an electronic device to complete the abnormal text identification method in the game provided in the first aspect, specifically including: obtaining the chat message text output by the player in the game chat channel; extracting the target keyword in the chat message text; calling a pre-built game public opinion text portrait to perform abnormal identification on the target keyword, wherein the process of constructing the game public opinion text portrait includes: obtaining a chat message text set of the player in the game chat channel within a historical time period, extracting the game public opinion keywords in the chat message text set, obtaining the game public opinion keyword structure data, and constructing the game public opinion text portrait based on the keyword structure data; according to the abnormal identification result of the target keyword and the game environment corresponding to the chat message text, determining whether the chat message text has an abnormality. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a tape, a floppy disk, and an optical data storage device.

[0203] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention 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 invention being indicated by the following claims.

[0204] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope of the present invention. The scope of the present invention is limited only by the appended claims. The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A method for identifying abnormal text in a game, characterized in that: The method comprises: Get the chat message text output by the player in the game chat channel; Extracting target keywords from the chat message text; Calling a pre-built game public opinion text portrait to identify anomalies of the target keyword, wherein the process of constructing the game public opinion text portrait includes: obtaining a chat message text set of players in a game chat channel within a historical time period, extracting game public opinion keywords from the chat message text set, obtaining game public opinion keyword structure data, and constructing the game public opinion text portrait based on the keyword structure data; Determining whether the chat message text has an abnormality based on the abnormality recognition result of the target keyword and the game environment corresponding to the chat message text; The determining whether the chat message text has an abnormality based on the abnormality recognition result of the target keyword and the game environment corresponding to the chat message text includes: Determining an abnormality judgment threshold based on the game environment corresponding to the chat message text; Based on the anomaly score in the anomaly identification result and the anomaly judgment threshold, determine whether the chat message text has an anomaly.

2. The method according to claim 1, characterized in that The step of obtaining the chat message text output by the player in the game chat channel includes: Get the player's raw chat message from the game chat channel; Performing data desensitization processing on the player's private information involved in the original chat message; Based on the chat messages obtained after the data desensitization processing, structured chat data is constructed on a player-by-player basis, and the structured chat data includes: chat message text output by the player in the game chat channel.

3. The method according to claim 1, characterized in that The extracting target keywords from the chat message text includes: Segmenting the chat message text based on a preset dictionary, wherein the preset dictionary includes a plurality of words that are used more frequently than a preset frequency in the game environment; The target keyword is determined from the word segmentation result of the chat message text.

4. The method according to claim 1, wherein The obtaining of the game public opinion keyword structure data and constructing the game public opinion text portrait based on the keyword structure data includes: Divide the extracted game public opinion keywords by player to obtain the game public opinion keyword structure data corresponding to each player; For each of the players, a player text portrait is constructed based on the game public opinion keyword structure data.

5. The method according to claim 4, characterized in that The construction of player text portraits based on game public opinion keyword structure data includes: Determine the frequency of occurrence of each game public opinion keyword in the keyword structure data corresponding to each player; Each of the game public opinion keywords is stored in correspondence with the respective occurrence frequencies to form the player text portrait.

6. The method according to claim 1, characterized in that The obtaining of the game public opinion keyword structure data and constructing the game public opinion text portrait based on the keyword structure data includes: Divide the extracted game public opinion keywords by server, and obtain the game public opinion keyword structure data corresponding to each server; For each of the servers, a server text portrait is constructed based on the game public opinion keyword structure data, and the server text portrait is used to analyze public opinion information of all players in the server.

7. The method according to claim 6, characterized in that The server text portrait is constructed based on the game public opinion keyword structure data, including: Determine the frequency of occurrence of each game public opinion keyword in the keyword structure data corresponding to each server; Each of the game public opinion keywords is stored in correspondence with its respective occurrence frequency to form the server text portrait.

8. The method according to claim 1, 5 or 7, characterized in that The game public opinion text portrait includes multiple game public opinion keywords and their corresponding frequencies of occurrence. The calling of the pre-built game public opinion text portrait to perform abnormality identification on the target keyword includes: If the target keyword exists in the game public opinion text portrait, then based on the corresponding occurrence frequency of the target keyword in the game public opinion text portrait and the occurrence frequency of each game public opinion keyword in the game public opinion text portrait, perform abnormal identification on the target keyword; If the target keyword does not exist in the game public opinion text portrait, it is determined that there is no abnormality in the target keyword.

9. The method according to claim 8, characterized in that The abnormality identification of the target keyword based on the corresponding occurrence frequency of the target keyword in the game public opinion text portrait and the occurrence frequency of each game public opinion keyword in the game public opinion text portrait includes: Based on the frequency of occurrence of each game public opinion keyword in the game public opinion text portrait, obtain the average frequency of the game public opinion keyword in the game public opinion text portrait; If the frequency of occurrence of the target keyword in the game public opinion text portrait is greater than or equal to the average frequency, it is determined that there is no abnormality in the target keyword; If the corresponding occurrence frequency of the target keyword in the game public opinion text portrait is less than the average frequency, the abnormal score of the target keyword is determined.

10. The method according to claim 9, characterized in that Determining the abnormality score of the target keyword includes: Based on the corresponding appearance frequency of the target keyword in the game public opinion text portrait, and the number of game public opinion keywords contained in the game public opinion text portrait, the abnormal score of the target keyword is obtained.

11. The method according to claim 1, wherein The determining of the abnormality judgment threshold based on the game environment corresponding to the chat message text includes: An abnormality assessment threshold is determined based on the version update time of the game environment corresponding to the chat message text and / or the opening time of the server where the game environment is located.

12. The method according to claim 1, characterized in that The determining whether the chat message text has an abnormality based on the abnormality score in the abnormality identification result and the abnormality judgment threshold includes: Normalize the anomaly scores in the anomaly recognition results obtained within a preset time window; Sort the normalized anomaly scores from low to high to determine the percentile corresponding to the anomaly score of the target keyword; If the percentile exceeds the abnormality judgment threshold, it is determined that there is an abnormality in the chat message text.

13. A device for identifying abnormal text in a game, characterized in that: The device comprises: The message acquisition module is used to obtain the chat message text output by players in the game chat channel; A keyword extraction module, used to extract target keywords from the chat message text; An identification module is used to call a pre-built game public opinion text portrait to perform anomaly identification on the target keyword, wherein the process of constructing the game public opinion text portrait includes: obtaining a chat message text set of players in a game chat channel within a historical time period, extracting game public opinion keywords from the chat message text set, obtaining game public opinion keyword structure data, and constructing the game public opinion text portrait based on the keyword structure data; A determination module, configured to determine whether the chat message text has an abnormality based on the abnormality recognition result of the target keyword and the game environment corresponding to the chat message text; The determining module is specifically configured to: Determining an abnormality judgment threshold based on the game environment corresponding to the chat message text; Based on the anomaly score in the anomaly identification result and the anomaly judgment threshold, determine whether the chat message text has an anomaly.

14. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and operable on the processor, wherein when the processor executes the program, the steps of the method according to any one of claims 1 to 12 are implemented.

15. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Public opinion analysis method and system, computer equipment and storage medium

    CN108874992A