Method and device for processing text data in games, electronic device and storage medium

By performing classified statistics and text similarity and context analysis on the text data of gamers in the preset time period, the problems of low efficiency and poor timeliness of game speech filtering and statistics in the prior art are solved, and efficient and flexible data analysis and statistics are achieved.

CN114307172BActive Publication Date: 2025-03-18BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111657399.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-03-18
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

In the prior art, game speech filtering and statistics are low and time-consuming, and it is impossible to effectively realize the flexible display of data in various dimensions and scenarios.

Method used

By obtaining the text data of gamers in the preset time period, performing classified statistics of time granularity and statistical dimensions, combining text similarity analysis and context analysis, a second and third speech records collection is constructed and recorded in the target database.

Benefits of technology

It improves the efficiency and timeliness of game speech filtering and statistics, realizes comprehensive analysis and statistics of game player speech records, and can flexibly display various dimensions and scene data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114307172B_ABST
    Figure CN114307172B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for processing text data in a game, an electronic device, and a storage medium, the method comprising: obtaining text data of a game player in a preset time period, and determining the speech record of the corresponding game player from the text data; classifying and counting the speech records according to the time granularity and the statistical dimension to obtain a first speech record set corresponding to the first time granularity and the first statistical dimension; determining speech records that meet the similarity rules from the first speech record set based on text similarity analysis to form a second speech record set, and / or determining speech records that meet the context rules from the first speech record set based on context analysis to form a third speech record set; recording the speech records in the second speech record set and / or the speech records in the third speech record set in the target database. The above scheme solves the problem of low efficiency and poor timeliness in filtering and counting game speeches.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of game technology, and in particular to a method and device for processing text data in a game, an electronic device, and a storage medium. Background Art

[0002] At present, the filtering and statistics of speech in the game mainly rely on blacklists and whitelists for filtering and statistics, and the data in the blacklists and whitelists are usually maintained manually by customer service personnel, which is inefficient and ineffective. Statistics mainly rely on rough calculations of scheduled tasks in the backend, which not only consumes performance, but also makes it difficult to achieve flexible display of data in various dimensions and scenarios. It can be seen that the existing filtering and statistics of game speech are not only inefficient but also difficult to ensure timeliness. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a method and device for processing text data in a game, an electronic device, and a storage medium, so as to solve the problem of low efficiency and poor timeliness of game speech filtering and statistics in the prior art. The specific technical solution is as follows:

[0004] In a first aspect of the implementation of the present application, a method for processing text data in a game is first provided, including: obtaining text data of a game player in the game within a preset time period, and determining speech records corresponding to the game player from the text data; classifying and counting the speech records according to time granularity and statistical dimension to obtain a first speech record set corresponding to a first time granularity and a first statistical dimension, wherein the first speech record set includes multiple speech records; determining speech records that meet similarity rules from the first speech record set based on text similarity analysis to form a second speech record set, and / or determining speech records that meet context rules from the first speech record set based on context analysis to form a third speech record set; and recording the speech records in the second speech record set and / or the speech records in the third speech record set in a target database.

[0005] Optionally, the second speech record set includes multiple similar speech records, and the speech records that meet the similarity rules are determined from the first speech record set based on text similarity analysis to form the second speech record set, including: calculating the Hamming distance between any two speech records in the multiple speech records to determine the text similarity; and when the text similarity is greater than a first preset threshold, determining that the two speech records corresponding to the text similarity are the similar speech records.

[0006] Optionally, the calculating of the Hamming distance between any two speech records in the multiple speech records to determine the text similarity includes: selecting a first speech record subset and a second speech record subset from the multiple speech records, wherein the length of a single speech record in the first speech record subset is greater than or equal to a third preset threshold, and the length of a single speech record in the second speech record subset is less than the third preset threshold; filtering the first speech record subset based on a preset whitelist and a preset blacklist to obtain a third speech record subset, wherein the speech records in the third speech record subset are not hit by the whitelist and the blacklist; and calculating the Hamming distance between any two speech records in the third speech record subset and the second speech record subset to determine the text similarity.

[0007] Optionally, the method further includes: directly recording the speech records in the first speech record subset that are hit by the blacklist in the target database; and prohibiting the speech records in the first speech record subset that are hit by the whitelist from being recorded in the target database.

[0008] Optionally, determining speech records that meet context rules from the first speech record set based on context analysis to form a third speech record set includes: splicing the speech records whose speech intervals among the multiple speech records are less than the preset second preset threshold in chronological order of the speeches to obtain a fourth speech record; verifying the fourth speech record; and determining the speech record corresponding to the fourth speech record that fails the verification as the third speech record.

[0009] Optionally, the text data includes at least one of text data sent by the game player, text data converted from image data sent by the game player, and text data converted from voice data sent by the game player.

[0010] Optionally, after recording the speech records in the second speech record set and / or the speech records in the second speech record set in the target database, the method further includes: filtering the speech records in the target database according to at least one of the following: speech time, game player ID, speech content.

[0011] Optionally, after recording the speech records in the second speech record set and / or the speech records in the second speech record set in the target database, the method further includes: restricting the game player using the game player ID corresponding to the speech record in the target database, wherein the restriction includes speech restriction and / or game account restriction.

[0012] In a second aspect of the implementation of the present application, there is also provided a device for processing text data in a game, including: an acquisition module, used to acquire text data of a game player in the game within a preset time period, and determine speech records corresponding to the game player from the text data; a statistical module, used to classify and count the speech records according to time granularity and statistical dimension, and obtain a first speech record set corresponding to the first time granularity and the first statistical dimension, wherein the first speech record set includes multiple speech records; a determination module, used to determine speech records that meet similarity rules from the first speech record set based on text similarity analysis to form a second speech record set, and / or determine speech records that meet context rules from the first speech record set based on context analysis to form a third speech record set; and a first recording module, used to record the speech records in the second speech record set and / or the speech records in the third speech record set in a target database.

[0013] Optionally, the second speech record set includes multiple similar speech records, and the determination module includes: a calculation unit, used to calculate the Hamming distance between any two speech records in the multiple speech records to determine the text similarity; and a first determination unit, used to determine that the two speech records corresponding to the text similarity are the similar speech records when the text similarity is greater than a first preset threshold.

[0014] Optionally, the calculation unit includes: a first screening subunit, used to filter out a first speech record subset and a second speech record subset from the multiple speech records, wherein the length of a single speech record in the first speech record subset is greater than or equal to a third preset threshold, and the length of a single speech record in the second speech record subset is less than the third preset threshold; a second screening subunit, used to filter the first speech record subset based on a preset whitelist and a preset blacklist to obtain a third speech record subset, wherein the speech records in the third speech record subset are not hit by the whitelist and the blacklist; and a calculation subunit, used to calculate the third speech record subset, and the Hamming distance between each speech record in the second speech record subset to determine the text similarity.

[0015] Optionally, the device also includes: a second recording module, used to directly record the speech records in the first speech record subset that are hit by the blacklist in the target database; a prohibition module, used to prohibit the speech records in the first speech record subset that are hit by the whitelist from being recorded in the target database.

[0016] Optionally, the determination module includes: a splicing unit, used to splice, in chronological order of the speeches, the speech records whose speech intervals among the multiple speech records are less than the preset second preset threshold, to obtain a fourth speech record; a verification unit, used to verify the fourth speech record; and a second determination unit, used to determine the speech record corresponding to the fourth speech record that fails the verification as the third speech record.

[0017] Optionally, the text data includes at least one of text data sent by the game player, text data converted from image data sent by the game player, and text data converted from voice data sent by the game player.

[0018] Optionally, the device also includes: a filtering module, which is used to filter the speech records in the target database according to at least one of the following items after recording the speech records in the second speech record set and / or the speech records in the second speech record set in the target database: speech time, game player ID, speech content.

[0019] Optionally, the device also includes: a restriction module, which is used to restrict the game player using the game player ID corresponding to the speech record in the target database after recording the speech record in the second speech record set and / or the speech record in the second speech record set in the target database, wherein the restriction includes speech restriction and / or game account restriction.

[0020] In another aspect of the present application, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes any of the random testing methods for host operations described above.

[0021] In another aspect of the implementation of the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned random testing methods for host operations.

[0022] In the present application, the speech records classified and counted according to the time granularity and the statistical dimension are the text data of the game players within a preset time period, and then the speech records are classified and counted according to the time granularity and the statistical dimension to obtain a first speech record set corresponding to the first time granularity and the first statistical dimension. The preset time period and the corresponding time granularity ensure the timeliness of the classified statistical data; in addition, the first speech record set obtained by the classified statistics is subjected to text similarity analysis and / or context analysis, and the speech records obtained by the text similarity analysis and / or context analysis are counted into the target database; it can be seen that in the embodiment of the present application, the speech records of the game players are subjected to text similarity and / or context analysis, taking into account the comprehensiveness of the speech record analysis and statistics, thereby solving the problem of low efficiency and poor timeliness of game speech filtering and statistics in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0024] Figure 1 It is a flowchart of a method for processing text data in a game in an embodiment of the present application;

[0025] Figure 2 It is a structural schematic diagram of a device for processing text data in a game in an embodiment of the present application;

[0026] Figure 3 It is a schematic diagram of the structure of the electronic device in the game in the embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0028] In the following description, the suffixes such as "module" and "unit" used to represent elements are only used to facilitate the description of the present application, and they themselves have no specific meaning. Therefore, "module" and "component" can be used interchangeably.

[0029] First, the relevant terms involved in the embodiments of the present application are explained accordingly;

[0030] TD-IDF algorithm (Term Frequency–Inverse Document Frequency) is a commonly used weighting technique for information retrieval and data mining. TF is term frequency, IDF is inverse document frequency index, that is, TD-IDF algorithm is the product of the two.

[0031] The SimHash algorithm maps a high-dimensional feature vector into a low-dimensional feature vector and determines whether text data is repeated or highly similar through the Hamming distance between two vectors.

[0032] The present application embodiment provides a method for processing text data in a game, such as Figure 1 As shown, the steps of the method include:

[0033] Step 102, obtaining text data of a game player in a preset time period in the game, and determining a speech record of the corresponding game player from the text data;

[0034] It should be noted that the text data in the embodiment of the present application may include at least one of text data sent by the game player, text data converted from image data sent by the game player, and text data converted from voice data sent by the game player. That is to say, in a specific example, the text data may be text chat data used by the game player to communicate with other game players in the game, text data converted from voice data sent during communication, or text data converted from image data sent by the game player in a group chat or bulletin board.

[0035] Step 104, classifying and counting the speech records according to the time granularity and the statistical dimension to obtain a first speech record set corresponding to the first time granularity and the first statistical dimension, the first speech record set including a plurality of speech records;

[0036] It should be noted that the time granularity and statistical dimension can be set accordingly according to actual needs. For example, the time granularity can be 5 minutes, 10 minutes, etc., and the statistical dimension can be the identity of the game player, the role identity of the game player, the game login terminal, the game player's platform, etc.

[0037] Step 106, determining speech records that meet the similarity rule from the first speech record set based on text similarity analysis to form a second speech record set, and / or determining speech records that meet the context rule from the first speech record set based on context analysis to form a third speech record set;

[0038] It should be noted that the similarity analysis and context analysis in the embodiments of the present application can be for the same game player or for different game players, and corresponding settings are made according to actual needs in the specific examples.

[0039] Step 108: record the speech records in the second speech record set and / or the speech records in the third speech record set in the target database.

[0040] Through the above steps 102 to 108, the speech records classified and counted according to the time granularity and the statistical dimension are the text data of the game players within a preset time period, and then the speech records are classified and counted according to the time granularity and the statistical dimension to obtain a first speech record set corresponding to the first time granularity and the first statistical dimension. The preset time period and the corresponding time granularity ensure the timeliness of the classified statistical data; in addition, the first speech record set obtained by the classified statistics is subjected to text similarity analysis and / or context analysis, and the speech records obtained by the text similarity analysis and / or context analysis are counted into the target database; it can be seen that in the embodiment of the present application, the speech records of the game players are subjected to text similarity and / or context analysis, taking into account the comprehensiveness of the speech record analysis and statistics, thereby solving the problem of low efficiency and poor timeliness of game speech filtering and statistics in the prior art.

[0041] In an optional implementation of the embodiment of the present application, the second speech record set in the embodiment of the present application includes multiple similar speech records. Based on this, the method of determining speech records that meet the similarity rule from the first speech record set according to the text similarity analysis to form the second speech record set involved in the above step 106 may further include:

[0042] Step 11, calculating the Hamming distance between two speech records in the plurality of speech records to determine the text similarity;

[0043] Step 12: When the text similarity is greater than a first preset threshold, determining that the two speech records corresponding to the text similarity are similar speech records.

[0044] In the specific example, the Hamming distance between the two speech records in the above steps 11 and 12 can be calculated based on the SimHash algorithm, which is an algorithm that maps a high-dimensional feature vector into a low-dimensional feature vector and determines whether the text data is repeated or highly similar by the Hamming distance of the two vectors.

[0045] In an optional implementation of the embodiment of the present application, the method of calculating the Hamming distance between two speech records in the plurality of speech records to determine the text similarity involved in the above step 11 may further include:

[0046] Step 21, selecting a first speech record subset and a second speech record subset from the plurality of speech records, wherein the length of a single speech record in the first speech record subset is greater than or equal to a third preset threshold, and the length of a single speech record in the second speech record subset is less than the third preset threshold;

[0047] Step 22, screening the first speech record subset based on a preset whitelist and a preset blacklist to obtain a third speech record subset, wherein the speech records in the third speech record subset are not hit by the whitelist and the blacklist;

[0048] Step 23, calculating the third speech record subset and the Hamming distance between each speech record in the second speech record subset to determine the text similarity.

[0049] For the above steps 21 to 23, the speech data in the speech record set can be first screened through the blacklist, and then a similarity analysis can be performed. In this regard, in a specific example, for example, from 09:00 to 09:10 on 2021.10.01, the number of speeches collected by game player A with user id 10001 in the entire domain is 200. For these 200 data, a threshold judgment is first performed, that is, if the single-granularity speech volume exceeds the threshold, a pre-check with the vocabulary is performed. Specifically, the vocabulary can use the TD-IDF algorithm to generate a black and white list related to the current game business in real time for preprocessing the speech; then the filtered speech is analyzed for similarity, for example, 80 of the 200 speeches are determined to be similar repeated speeches, and the 80 similar repeated speeches are recorded in the suspected user library (target database). After filtering through the black and white lists, a similarity analysis is performed, which can further filter out the similarity of speech records that are not in the black and white lists, so that the filtering and statistics of speech records are more accurate and comprehensive.

[0050] In addition, in an optional implementation manner of the embodiment of the present application, the method of the embodiment of the present application may also include:

[0051] Step 31, directly recording the speech records in the first speech record subset that are hit by the blacklist in the target database;

[0052] Step 32: prohibiting the speech records in the first speech record subset that are hit by the whitelist from being recorded in the target database.

[0053] It can be seen that after filtering by the blacklist and whitelist, the speech records in the first speech record subset that are hit by the blacklist are directly recorded in the target database, and the speech records in the first speech record subset that are hit by the whitelist are prohibited from being recorded in the target database. Without affecting the comprehensiveness of the text data analysis, the amount of data for subsequent text data analysis is reduced, thereby improving the efficiency of the subsequent text data analysis.

[0054] In an optional implementation manner of the embodiment of the present application, the method involved in the above step 106 of determining speech records that meet the context rules from the first speech record set based on context analysis to form a third speech record set may further include:

[0055] Step 41, in the order of speech time, splicing the speech records whose speech interval time is less than the preset second preset threshold among the multiple speech records to obtain a fourth speech record;

[0056] Step 42, verifying the fourth speech record;

[0057] Step 43: determine the speech record corresponding to the fourth speech record that fails the verification as the third speech record.

[0058] The speech records involved in the above steps 41 to 43 can be the same game player or different game players. The speech records corresponding to the fourth speech record include the speech records before splicing and / or the fourth speech record after splicing. In this regard, in a specific example, for example, from 09:00 to 09:10 on 2021.10.01, 10 speeches of game player A with user id 10002 were collected in the whole domain. For these 10 speech records, first check the time interval between their speeches. If the context aggregation time threshold is set to 2s, it is calculated that the time interval between the first four and the last six speeches in the 10 speeches is within 2s, then splice them into two long speeches in chronological order. Send it to the thread pool to be detected and call the external detection interface for asynchronous processing. In a specific game scenario, for example, the first four aggregated information returned by the interface is an advertising speech, which is "Add", "Me", "V", and "Letter" in order. Finally, the speeches and detection results before and after aggregation are uniformly recorded in the suspected user library. It can be seen that context analysis can further analyze advertising speeches sent in special ways, or other speeches suspected of violating regulations, thereby improving the comprehensiveness of text data analysis.

[0059] In another optional implementation of the embodiment of the present application, after step 108 involves recording the speech records in the second speech record set and / or the speech records in the second speech record set in the target database, the method steps of the embodiment of the present application may further include:

[0060] Step 110, filtering the speech records in the target database according to at least one of the following: speech time, game player ID, speech content.

[0061] For the above step 110, in a specific example, filtering the speech records in the target database by speech time can be a targeted or selective filtering of the speech records, for example, if you want to filter out the speech records in the time period from 8 to 10 pm on a certain day, or if you need the speech records in the time period from 8 to 10 pm on a certain day, then filter out the speech data in other time periods. Filtering the speech records in the target database by game player ID means that if the speech records of a certain game player are needed or not, or if a certain type of game player is needed, targeted filtering can be performed based on the game ID of the game player. Filtering the speech records in the target database by speech content can mean filtering speech records with high repetition, or filtering invalid speech records, etc. The above are just examples, and the specific filtering method can be set accordingly according to the actual situation.

[0062] In another optional implementation of the embodiment of the present application, after step 108 involves recording the speech records in the second speech record set and / or the speech records in the second speech record set in the target database, the method steps of the embodiment of the present application may further include:

[0063] Step 112: restricting the game player using the game player ID corresponding to the speech record in the target database, wherein the restriction includes speech restriction and / or game account restriction.

[0064] It should be noted that the speech restriction can be for a certain game player who has insulted or slandered another game player in the game, and the game player can be prohibited from speaking for a period of time, or if a certain game player speaks frequently within a certain period of time in a game, the speaking frequency of the game player can be restricted. The game account restriction can be for a player with an age limit, and the login time of the game account can be limited, or if the current mobile terminal is logged in, the PC terminal cannot log in, that is, there is a login device restriction. The above is just an example, and corresponding speech restrictions and / or game account restrictions can be made according to actual conditions.

[0065] Corresponding to the above Figure 1 The present application also provides a device for processing text data in a game, such as Figure 2 As shown, the device comprises:

[0066] An acquisition module 22 is used to acquire text data of a game player in a game within a preset time period, and determine a speech record of the corresponding game player from the text data;

[0067] A statistical module 24 is used to classify and count the speech records according to the time granularity and the statistical dimension to obtain a first speech record set corresponding to the first time granularity and the first statistical dimension, wherein the first speech record set includes multiple speech records;

[0068] A determination module 26, configured to determine speech records that meet the similarity rule from the first speech record set based on text similarity analysis to form a second speech record set, and / or to determine speech records that meet the context rule from the first speech record set based on context analysis to form a third speech record set; and

[0069] The first recording module 28 is used to record the speech records in the second speech record set and / or the speech records in the third speech record set in the target database.

[0070] Through the device of the embodiment of the present application, the speech records that are classified and counted according to the time granularity and the statistical dimension are the text data of the game players within a preset time period, and then the speech records are classified and counted according to the time granularity and the statistical dimension to obtain a first speech record set corresponding to the first time granularity and the first statistical dimension. The preset time period and the corresponding time granularity ensure the timeliness of the classified statistical data; in addition, the first speech record set obtained by the classified statistics is subjected to text similarity analysis and / or context analysis, and the speech records obtained by the text similarity analysis and / or context analysis are counted into the target database; it can be seen that in the embodiment of the present application, the speech records of the game players are subjected to text similarity and / or context analysis, taking into account the comprehensiveness of the speech record analysis and statistics, thereby solving the problem of low efficiency and poor timeliness of game speech filtering and statistics in the prior art.

[0071] Optionally, the second speech record set in the embodiment of the present application includes multiple similar speech records. Based on this, the determination module 26 in the embodiment of the present application may further include: a calculation unit, used to calculate the Hamming distance between each speech record in the multiple speech records to determine the text similarity; and a first determination unit, used to determine that the two speech records corresponding to the text similarity are similar speech records when the text similarity is greater than a first preset threshold.

[0072] Optionally, the calculation unit in the embodiment of the present application may further include: a first screening sub-unit, used to screen out a first speech record subset and a second speech record subset from multiple speech records, wherein the length of a single speech record in the first speech record subset is greater than or equal to a third preset threshold, and the length of a single speech record in the second speech record subset is less than the third preset threshold; a second screening sub-unit, used to screen the first speech record subset based on a preset whitelist and a preset blacklist to obtain a third speech record subset, wherein the speech records in the third speech record subset are not hit by the whitelist and the blacklist; and a calculation sub-unit, used to calculate the third speech record subset, and the Hamming distance between each speech record in the second speech record subset to determine the text similarity.

[0073] Optionally, the device in the embodiment of the present application may also include: a second recording module, used to directly record the speech records in the first speech record subset that are hit by the blacklist in the target database; a prohibition module, used to prohibit the speech records in the first speech record subset that are hit by the whitelist from being recorded in the target database.

[0074] Optionally, the determination module 26 in the embodiment of the present application may further include: a splicing unit, used to splice, in chronological order of the speeches, the speech records whose speech intervals are less than a preset second preset threshold among the multiple speech records to obtain a fourth speech record; a verification unit, used to verify the fourth speech record; and a second determination unit, used to determine the speech record corresponding to the fourth speech record that fails the verification as the third speech record.

[0075] Optionally, the text data includes at least one of text data sent by the game player, text data converted from image data sent by the game player, and text data converted from voice data sent by the game player.

[0076] Optionally, the device in the embodiment of the present application may also include: a filtering module, which is used to filter the speech records in the target database according to at least one of the following items after the speech records in the second speech record set and / or the speech records in the second speech record set are recorded in the target database: speech time, game player ID, speech content.

[0077] Optionally, the device in the embodiment of the present application may also include: a restriction module, which is used to restrict the game player using the game player ID corresponding to the speech record in the target database after recording the speech record in the second speech record set and / or the speech record in the second speech record set in the target database, wherein the restriction includes speech restriction and / or game account restriction.

[0078] The present application also provides an electronic device, such as Figure 3 As shown, it includes a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304.

[0079] Memory 303, used for storing computer programs;

[0080] Processor 301 is used to execute the program stored in memory 303 to implement Figure 1 The method steps in Figure 1 The method and steps are the same as in , so I will not repeat them here.

[0081] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0082] The communication interface is used for communication between the above terminal and other devices.

[0083] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0084] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0085] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes the method for processing text data in a game as described in any of the above embodiments.

[0086] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the method for processing text data in a game as described in any of the above embodiments.

[0087] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0088] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0089] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0090] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A method for processing text data in a game, characterized in that: include: Acquire text data of a game player in a game within a preset time period, and determine a speech record corresponding to the game player from the text data; Classify and count the speech records according to the time granularity and the statistical dimension to obtain a first speech record set corresponding to the first time granularity and the first statistical dimension, wherein the first speech record set includes multiple speech records; Determining speech records that meet similarity rules from the first speech record set based on text similarity analysis to form a second speech record set, and determining speech records that meet context rules from the first speech record set based on context analysis to form a third speech record set; and Recording the speech records in the second speech record set and the speech records in the third speech record set in a target database; The second speech record set includes a plurality of similar speech records, and the determining speech records that meet the similarity rule from the first speech record set based on the text similarity analysis to form the second speech record set includes: calculating the Hamming distance between two speech records in the plurality of speech records to determine the text similarity; and when the text similarity is greater than a first preset threshold, determining that the two speech records corresponding to the text similarity are the similar speech records; Among them, the method of determining the speech records that meet the context rules from the first speech record set based on context analysis to form a third speech record set includes: splicing the speech records whose speech interval time is less than a preset second preset threshold in the multiple speech records in chronological order to obtain a fourth speech record; verifying the fourth speech record; and determining the speech record corresponding to the fourth speech record that fails the verification as the third speech record.

2. The method according to claim 1, characterized in that: The calculating the Hamming distance between any two speech records in the plurality of speech records to determine the text similarity includes: Filtering out a first speech record subset and a second speech record subset from the plurality of speech records, wherein the length of a single speech record in the first speech record subset is greater than or equal to a third preset threshold, and the length of a single speech record in the second speech record subset is less than the third preset threshold; The first speech record subset is screened based on a preset whitelist and a preset blacklist to obtain a third speech record subset, wherein the speech records in the third speech record subset are not hit by the whitelist and the blacklist; and The Hamming distance between the speech records in the third speech record subset and the second speech record subset is calculated to determine the text similarity.

3. The method according to claim 2, characterized in that The method further comprises: directly recording the speech records in the first speech record subset that are hit by the blacklist in the target database; and It is prohibited to record the speech records in the first speech record subset that are hit by the whitelist in the target database.

4. The method according to claim 1, characterized in that: The text data includes at least one of text data sent by the game player, text data converted from image data sent by the game player, and text data converted from voice data sent by the game player.

5. The method according to claim 1, characterized in that After recording the speech records in the second speech record set and the speech records in the third speech record set in the target database, the method further includes: The speech records in the target database are filtered according to at least one of the following: speech time, game player ID, and speech content.

6. The method according to claim 1, characterized in that After recording the speech records in the second speech record set and the speech records in the third speech record set in the target database, the method further includes: The game player is restricted by using the game player ID corresponding to the speech record in the target database, wherein the restriction includes speech restriction and / or game account restriction.

7. A device for processing text data in a game, characterized in that: include: An acquisition module, used to acquire text data of a game player in a game within a preset time period, and determine a speech record corresponding to the game player from the text data; A statistical module, configured to classify and count the speech records according to a time granularity and a statistical dimension, to obtain a first speech record set corresponding to a first time granularity and a first statistical dimension, wherein the first speech record set includes a plurality of speech records; a determination module, configured to determine speech records that meet the similarity rule from the first speech record set based on text similarity analysis to form a second speech record set, and to determine speech records that meet the context rule from the first speech record set based on context analysis to form a third speech record set; and A first recording module, configured to record the speech records in the second speech record set and the speech records in the third speech record set in a target database; The determination module includes: a calculation unit, configured to calculate the Hamming distance between two speech records in the plurality of speech records to determine text similarity; a first determination unit, configured to determine that the two speech records corresponding to the text similarity are similar speech records when the text similarity is greater than a first preset threshold; The determination module also includes: a splicing unit, which is used to splice the speech records whose speech interval time is less than a preset second preset threshold in the multiple speech records in chronological order of the speeches to obtain a fourth speech record; a verification unit, which is used to verify the fourth speech record; and a second determination unit, which is used to determine the speech record corresponding to the fourth speech record that fails the verification as the third speech record.

8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Iteratively updatable garbage text identification method and system

    CN107943941A

  • Voice interaction processing method and device, terminal and storage medium

    CN112735418A

  • Speech forbidding processing method and device, nonvolatile storage medium and electronic device

    CN112807687A