CN110119508A - Filter method, system and the equipment of chat messages - Google Patents

Filter method, system and the equipment of chat messages Download PDF

Info

Publication number
CN110119508A
CN110119508A CN201910248211.XA CN201910248211A CN110119508A CN 110119508 A CN110119508 A CN 110119508A CN 201910248211 A CN201910248211 A CN 201910248211A CN 110119508 A CN110119508 A CN 110119508A
Authority
CN
China
Prior art keywords
chat
link information
function
chat messages
insertion position
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910248211.XA
Other languages
Chinese (zh)
Other versions
CN110119508B (en
Inventor
张绍鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910248211.XA priority Critical patent/CN110119508B/en
Publication of CN110119508A publication Critical patent/CN110119508A/en
Application granted granted Critical
Publication of CN110119508B publication Critical patent/CN110119508B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements
    • H04L51/063Content adaptation, e.g. replacement of unsuitable content

Abstract

This application discloses a kind of filter method of chat messages, system and equipment, belong to internet area.This method includes: the first chat messages for receiving client and sending, first chat messages include mutual independent common chat content and function linked contents, function linked contents include insertion position and link information, and link information is used to trigger other functions in addition to chat feature;Filtering sensitive words are carried out to common chat content, obtain filtered common chat content;The second chat messages are obtained according to filtered common chat content and function linked contents;Second chat messages are sent to client, client is used for after receiving the second chat messages, link information is inserted into filtered common chat content according to insertion position and is shown.The application is by being only filtered operation to common chat content, caused accidentally filtration problem when so as to avoid chat content and function linked contents mixing.

Description

Filter method, system and the equipment of chat messages
Technical field
This application involves internet area, in particular to a kind of filter method of chat messages, system and equipment.
Background technique
Chat feature is all integrated in the application program much with social attribute, for example online game, live streaming are put down Platform, short video sharing platform etc..
By taking the online game with chat feature as an example, chat feature not only carries the effect exchanged between player, It carries some miscellaneous functions of online game, for example position sharing function, shares red packet function, stage property trading function, forms a team Deng.By taking a player in online game will send the position of oneself as an example, the chat that the first client of the player is sent disappears Breath be " I<pos x=111,y=222>deng you ", the second client of other players is after receiving the chat messages, meeting " I is waiting you " is parsed into text information, by the Context resolution in<>at the coordinate position in online game.If other players Click the coordinate position, then it can be by the game role self-navigation of other players to the coordinate position.
And filtering sensitive words also are carried out to chat messages in order to create a harmonious communication environment, in online game, have When will appear accidentally filtration problem, for example there are a sensitive words " xxyy ", it would be possible that can be by chat messages " xx < yy 1234>" " xx<yy " in is identified as sensitive word, and the chat messages are finally filtered into " * * * * * 1234>", cause to show different Normal problem.
Summary of the invention
The embodiment of the present application provides filter method, device, equipment and the storage medium of a kind of chat messages, can solve The problem of certainly chat messages may accidentally being filtered in the related technology.The technical solution is as follows:
According to the one aspect of the embodiment of the present disclosure, a kind of filter method of chat messages is provided, is applied to have and chat In the server of its function, which comprises
The first chat messages that client is sent are received, first chat messages include mutual independent common chat Content and function linked contents, the function linked contents include insertion position and link information, and the link information is for touching Send out other functions in addition to the chat feature;
Filtering sensitive words are carried out to the common chat content, obtain filtered common chat content;
The second chat messages are obtained according to the filtered common chat content and the function linked contents;
Second chat messages are sent to the client, the client is used to receive second chat After message, the link information is inserted into the filtered common chat content according to the insertion position and is shown Show.
According to the another aspect of the embodiment of the present disclosure, a kind of filter method of chat messages is provided, is applied to have and chat In the client of its function, which comprises
The second chat messages that the server is sent are received, second chat messages are the servers to common After chat content carries out filtering sensitive words, obtained according to filtered common chat content and function linked contents;
The insertion position, the link information and described filtered common are obtained from second chat messages Chat content;
The link information is inserted into the filtered common chat content according to the insertion position and is shown Show;
Wherein, the independent common chat content and the function linked contents are the servers from reception mutually Obtained in the first chat messages arrived, the function linked contents include insertion position and link information, the link information For triggering other functions in addition to the chat feature.
According to the another aspect of the embodiment of the present disclosure, a kind of filter device of chat content sensitive word, the dress are provided It sets and includes:
Receiving module, for receiving the first chat messages of client transmission, first chat messages include only mutually Vertical common chat content and function linked contents, the function linked contents include insertion position and link information, the chain Information is connect for triggering other functions in addition to the chat feature;
Filtering module obtains in filtered common chat for carrying out filtering sensitive words to the common chat content Hold, the second chat messages are obtained according to the filtered common chat content and the function linked contents;
Sending module, for second chat messages to be sent to the client, the client is for receiving After second chat messages, the link information is inserted by the filtered common chat according to the insertion position It is shown in content.
According to the another aspect of the embodiment of the present disclosure, a kind of filter device of chat content sensitive word, the dress are provided It sets and includes:
Receiving module, the second chat messages sent for receiving the server, second chat messages are described After server carries out filtering sensitive words to common chat content, according to filtered common chat content and function linked contents It obtains;
Module is obtained, for obtaining the insertion position, the link information and described from second chat messages Filtered common chat content;
Display module, for the link information to be inserted into described filtered common chat according to the insertion position It is shown in its content;
Wherein, the independent common chat content and the function linked contents are the servers from reception mutually Obtained in the first chat messages arrived, the function linked contents include insertion position and link information, the link information For triggering other functions in addition to the chat feature.
According to the another aspect of the embodiment of the present disclosure, provide a kind of server, the server include: processor and Memory;
The memory is stored at least one instruction, at least a Duan Chengxu, code set or instruction set, and described at least one Item instruction, an at least Duan Chengxu, the code set or instruction set are loaded by the processor and are executed to realize as above-mentioned The filter method of the chat messages executed in aspect by server.
According to the another aspect of the embodiment of the present disclosure, a kind of terminal is provided, the terminal includes: processor and storage Device;
The memory is stored at least one instruction, at least a Duan Chengxu, code set or instruction set, and described at least one Item instruction, an at least Duan Chengxu, the code set or instruction set are loaded by the processor and are executed to realize as above-mentioned The filter method of the chat messages executed in aspect by terminal.
According to the another aspect of the embodiment of the present disclosure, a kind of computer readable storage medium is provided, the computer can It reads storage medium and is stored at least one instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, institute An at least Duan Chengxu, the code set or instruction set is stated to be loaded by the processor and executed to realize either side institute as above The filter method for the chat messages stated.
Technical solution bring beneficial effect provided by the embodiments of the present application includes at least:
By generating independent common chat content and function linked contents mutually by client, in function linked contents In be provided with insertion position for indicating function linked contents in chat messages, and for indicating function linked contents function The link information of energy;After chat messages are sent to server by terminal, server only carries out sensitive word mistake to common chat content Filter operation, and filtered common chat content and function linked contents are sent to other terminals, so that server is only Filtering sensitive words are carried out to common chat content, filtering sensitive words are not carried out to function linked contents, are chatted so as to avoid common Its content and function linked contents individually will not all trigger the strobe utility of sensitive word, but mixing just has when being aligned to together The problem of sensitive word may be formed, chat messages is caused accidentally to be filtered.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, required in being described below to embodiment The attached drawing used is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings Other attached drawings.
Fig. 1 is the schematic illustration of the filter method for the chat messages that one exemplary embodiment of the application provides;
Fig. 2 is the structural block diagram for the chat system that one exemplary embodiment of the application provides;
Fig. 3 is the flow chart of the filter method for the chat messages that one exemplary embodiment of the application provides;
Fig. 4 is the flow chart of the filter method for the chat messages that one exemplary embodiment of the application provides;
Fig. 5 is the flow chart of the filter method for the chat messages that one exemplary embodiment of the application provides;
Fig. 6 is the interface schematic diagram for the user interface that one exemplary embodiment of the application provides;
Fig. 7 is the interface schematic diagram for the user interface that one exemplary embodiment of the application provides;
Fig. 8 is the flow chart of the filter method for the chat messages that one exemplary embodiment of the application provides;
Fig. 9 is the schematic diagram for the fixed length memory block that one exemplary embodiment of the application provides;
Figure 10 is the block diagram of the filter device for the chat messages that one exemplary embodiment of the application provides;
Figure 11 is the block diagram of the filter device for the chat messages that one exemplary embodiment of the application provides;
Figure 12 is the block diagram for the terminal that one exemplary embodiment of the application provides;
Figure 13 is the block diagram for the server that one exemplary embodiment of the application provides.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with attached drawing to the application embodiment party Formula is described in further detail.
Referring to FIG. 1, it illustrates the signals of the filter method of the chat messages of one exemplary embodiment of the application offer Figure.It include sending side terminal 11, receiving side terminal 12 and server 13 in the filter method.The server 13 can be network Operation has network game client on game server, sending side terminal 11 and receiving side terminal 12.
Sending side terminal 11 includes common chat content and function in chat messages for editing and sending chat messages At least one of linked contents.The present embodiment includes simultaneously common chat content and function linked contents with the chat messages For, common chat content is manually entered by user, function linked contents by the network game client in sending side terminal 11 according to User's operation automatically generates, which is used to trigger other functions in addition to chat feature, in not editable Hold.
Schematically, common chat content and function linked contents of user's input with sensitive word " sprout and newly sprout newly ", hair Chat messages are divided into mutual independent two class by the side's of sending terminal 11 automatically: szcontent { common chat content } and SzLinkinfo { function linked contents }, and chat messages are sent to server 13.Wherein, " 1 " in function linked contents Position sharing function is represented, it is " coordinate information " after the 6th character in common chat content that " 6 ", which represent insertion position, Represent position coordinates to be shared.
Server 13 identifies two kinds of information types after receiving chat messages, and is only filtered to common chat content, Sensitive word " sprouting new " is substituted for the characters such as " xx " or " * * " and is sent to reception terminal 12.
Receive client 12 receive content after filtered chat messages are shown, finally show " xx " or " * * " character replaces the information content after sensitive word.
Referring to FIG. 2, it illustrates a kind of structural schematic diagrams of chat system involved in each embodiment of the application. The chat system includes client 120, access layer 130, server 140 and database 150.
Client 120 is that have the application program of chat feature, and client 120 is run at the terminal.The terminal can be Mobile phone, tablet computer, pocket computer on knee and desktop computer etc..
It can be connected by wireless network or cable network between client 120 and access layer 130.
Access layer 130 is the hinge connected between client 120 and server 140.
Server 140 can be a server, or the server cluster consisted of several servers, either One cloud computing service center.Server 140 can be the background server of online game, and the background server of platform is broadcast live, The background server etc. of short video sharing platform.
It can be connected by wireless network or cable network between database 150 and server 140, be chatted for storing Its content.
Referring to FIG. 3, it illustrates the flow chart of the filter method of the chat messages of the application one embodiment offer, The present embodiment is applied to illustrate in chat system shown in Fig. 1 with the filter method of the chat messages.The chat messages Filter method may include the following steps:
Step 101, client sends the first chat messages according to user's operation.
Step 102, server receives the first chat messages that client is sent, and the first chat messages include independent mutually Common chat content and function linked contents.
Optionally, independent common chat content and function linked contents include: to be indicated using the first data format mutually Common chat content, and using the second data format indicate function linked contents.First data format and the second data Format is different two data formats.
Common chat content is element of being chatted by least one of text, symbol, expression, picture, audio and video Composed content.
Function linked contents include insertion position and link information.Insertion position is general for indicating that link information is inserted into Position when logical chat content, link information are used to trigger other functions in addition to chat feature.
Optionally, the function type of other functions includes but is not limited to: position, form a team, at least one in stage property and red packet Kind.
Step 103, server carries out filtering sensitive words to common chat content and obtains filtered common chat content.
Since common chat content and function linked contents are independent mutually, server can be to common chat content Filtering sensitive words are carried out, without being filtered to function linked contents.
Step 104, server obtains the second chat according to filtered common chat content and function linked contents and disappears Breath.
Step 105, the second chat messages are sent to client by server.
Step 106, client receives the second chat messages that server is sent, and insertion is obtained from the second chat messages Position, link information and filtered common chat content;Link information is inserted into according to insertion position filtered common It is shown in chat content.
In conclusion method provided in this embodiment, by by client generate independent common chat content mutually and Function linked contents are provided with the insertion position for indicating function linked contents in chat messages in function linked contents It sets, and the link information for indicating function linked contents function;After chat messages are sent to server by terminal, server Filtering sensitive words operation only is carried out to common chat content, and filtered common chat content and function linked contents are sent out Give other terminals so that server only to common chat content carry out filtering sensitive words, not to function linked contents into Row filtering sensitive words individually will not all trigger the filtering of sensitive word so as to avoid common chat content and function linked contents Mechanism, but mix and be possible to the problem of forming sensitive word, chat messages is caused accidentally to be filtered when being aligned to together.
Referring to FIG. 4, it illustrates the method flows of the filter method of the chat messages of another embodiment offer of the application Figure, the present embodiment are applied to illustrate in chat system shown in Fig. 1 with the filter method of the chat messages.The chat disappears The filter method of breath may include the following steps:
Step 201, client sends the first chat messages according to user's operation.
First chat messages include mutual independent common chat content and function linked contents.
Chat messages are divided into common chat content and function linked contents automatically when inputting chat messages by client, Wherein, common chat content is indicated with data format " szContent ", function linked contents data format " stlinkinfo " is indicated.
Table 1
Optionally, common chat content be user manually or voice edition input content, form include text, number, Symbol, expression, picture, audio, any one or a few in video.
Optionally, function linked contents are indicated using target data format, have the content of specified function.Its In, target data format includes: linking functions type, insertion position and link information.Linking functions type is used to indicate link The function type that information is triggered;Insertion position is used to indicate that link information to be inserted into inserting in filtered common chat content Enter position;Link information is used to carry the parameter information of other functions.
Step 202, the first chat messages that client is sent are received, the first chat messages include independent common mutually Chat content and function linked contents, function linked contents include insertion position and link information, and link information is removed for triggering Other functions except chat feature.
Wherein, insertion position (Pos) is for indicating that link information is inserted into common chat content (filtered common chat Content) in insertion position.In an optional embodiment, insertion position is using common where digital representation link Position in chat content, for example, indicating that there are three characters in front of function linked contents, i.e., should when insertion position is " 3 " The position of function linked contents insertion is behind the third character in common chat content.
Link information (LinkInfo) is used to carry the parameter information of other functions, as shown in table 2 below.
Table 2
Optionally, function linked contents further include linking functions type.With continued reference to table 2, linking functions type (ilinkinfo) it is used to indicate the function type that link information is triggered, schematically, function type may include position, group At least one of in team, stage property and red packet.
Optionally, target data format is JSON format, and linking functions type, insertion position and link information use Different field in JSON format indicates.
When linking functions type is used to indicate position, enabled in pathfinding function and transmitting function according to link information At least one of.When linking functions type, which is used to indicate, forms a team, more people are enabled according to link information and are formed a team function;When link function When energy type is used to indicate stage property, at least one in stage property trading function and stage property lease function is enabled according to link information; When linking functions type is used to indicate red packet, virtual resource packet distribution function is enabled according to link information.
Optionally, above-mentioned other functions can also be executed by terminal, or be held again after being triggered at the terminal by user Row.
Step 203, server carries out filtering sensitive words to common chat content, obtains filtered common chat content.
After server receives the first chat messages, the first chat is distinguished according to " szContent " and " stlinkinfo " Common chat content and function linked contents in message, the filtering that server only carries out sensitive word to common chat content are grasped Make, when in common chat content including sensitive word, sensitive word is substituted for " xx " or " * * " by server, for example, ought commonly chat Its content is " sprouting newly, I'm Waiting For You ", and " sprouting new " therein is sensitive word, and server " will sprout new " filtering, and be filtered Common chat content afterwards, are as follows: " xx, I'm Waiting For You ", or " * *, I'm Waiting For You ".If in common chat content not Comprising sensitive word, then filter operation is not executed, it is identical as former common chat content to obtain filtered common chat content.
Step 204, server obtains the second chat according to filtered common chat content and function linked contents and disappears Breath.
Second chat messages include: filtered common chat content and without Jing Guo filtration treatment function link in Hold.If common chat content does not include sensitive word, filtered common chat content is identical as former common chat content, That is, the second chat messages are identical as the first chat messages content if common chat content does not include sensitive word.
Step 205, the second chat messages are sent to client by server.
Second chat messages are sent to client in the form of common chat content and function linked contents by server, The client can be located at receiving side terminal or sending side terminal.
For example, chat messages are sent to the same of receiving side terminal by server when chat messages are common chat contents When to sending side terminal feedback information, for whole conversation contents to be presented on sending side terminal.
Step 206, client obtains insertion position, link after receiving the second chat messages from the second chat messages Information and filtered common chat content
It includes: filtered common chat content and function that client, which receives in the second chat messages that server is sent, Linked contents.
Since server does not do filter operation to the function linked contents in the first chat messages, in function link Information in appearance does not change, is still linking functions type, insertion position and link information in the first chat messages.
Step 207, client obtains icon corresponding with linking functions type;According to insertion position by functional diagram Mark, which is inserted into filtered common chat content, to be shown, icon is directed toward link information.
Step 208, client obtains linking functions type from the second chat messages.
After client receives the second chat messages, filtered common chat content and function linked contents are obtained, visitor Family end determines the icon that function linked contents are shown on the client according to the linking functions type in function linked contents, shows Example property, when linking functions type is the relevant coordinate data in position, icon, which is used, to be usually used on map indicating positioning Icon, and icon is directed toward link information.
Client shows the pattern insertion for indicating function link type according to insertion position in common chat content Show, schematically, when insertion position is " 3 ", is directed toward third character of the pattern insertion in common chat content of link information Behind.
Step 209, client receives the trigger action to link information.
Client has the function of click function linked contents to trigger in link information.
When the corresponding function type of link information is position, if icon corresponding to user's click function linked contents, Client enables at least one in pathfinding function and transmitting function according to link information.Believe by pathfinding of link information content For breath, after receiving side terminal parses and obtains the position coordinates in link information, user terminal is sought according to position coordinates generation Road instruction, starting point are the pathfinding point that the game role of game user manipulation is presently in, and terminal is the position in link information Coordinate.Map partitioning is the pathfinding point of gridding, and a pathfinding point is a grid, and all map scenes include ground, forest Etc. being filled in pathfinding point.
Wherein, the mode for searching for direct path can be to be realized by A star algorithm, and A star algorithm belongs to the common skill in this field The common knowledge of art personnel, details are not described herein again.
Optionally, when the corresponding function type of link information is to form a team, figure corresponding to click function linked contents Mark, client request more people to form a team function according to link information to server.
Schematically, the present embodiment provides a kind of organizing method of online game, this method is completed by server, the party Method includes the following steps:
S31, the attribute information for inquiring player;
Above-mentioned attribute information may include: player role unique identification, player levels, player's occupation, current scene, step on Record at least one of city.
S32, the player of same alike result information is formed a team;
The method for realizing S32 is specifically as follows: if attribute information is logs in city, then according to the IP address of players log It determines the corresponding city of the IP address, the identical player for logging in city is formed a team.It, will be identical if attribute information is player levels The player of grade forms a team.Certainly player of the grade degree of differing greatly in grade threshold can also be formed a team.Wherein, grade phase The highest player of group middle grade can be used for poor great disparity degree and the grade difference of the minimum player of grade is indicated.
S33, the highest player of contribution degree in team is appointed as into team leader.
Optionally, when the corresponding function type of link information is stage property, figure corresponding to click function linked contents Mark, client request to enable at least one in stage property trading function and stage property lease function to server according to link information; The present embodiment for enabling stage property trading function, the transaction the following steps are included:
Step 41, sending side terminal generates a reception link with stage property mark.
It include the link of dummy payments in stage property link, for paying receiving side terminal by payment link Ideal money.
Step 42, sending side terminal is packaged into group message for link is received.
The group message includes recipient's mark and payment link, and sends the message to server.
Step 43, server identifies according to recipient and determines receiving side terminal, and the group message with payment link is sent out It send to receiving side terminal.
Step 44, receiving side terminal, which connects, determines stage property details according to function type, determines payment gold according to payment link Volume, after receiving side terminal is paid successfully in payment link, stage property is sent to receiving side terminal (buyer) by server, will be connect The ideal money of debit's terminal (buyer) payment is sent to sending side terminal (seller).
Optionally, it when the corresponding function type of link information is red packet, requests to enable to server according to link information Virtual resource packet gets function.Schematically, the operation for sending red packet may comprise steps of:
Step 51, sending side terminal generates a reception link for carrying " red packet " mark.
Step 52, sending side terminal is packaged into group message for link is received.
Step 53, group message and at least one recipient mark are sent to base server by sending side terminal.
Accordingly, base server receives the group message and at least one recipient mark that sending side terminal is sent.
Step 54, base server identifies according to recipient group message being sent at least one receiving side terminal.
Accordingly, receiving side terminal receives base server and identifies the group message sent according to recipient.
Step 55, base server sends link related information to issue server, and link related information includes " red packet " Mark, transmitting side marking and each recipient mark.
Accordingly, issue server receives and stores the link related information of base server transmission.
Wherein, above-mentioned steps 42, step 52, the group message in step 54 can be using in above method embodiments The message format of offer is sent and is filtered.
In conclusion method provided in this embodiment, by by client generate independent common chat content mutually and Function linked contents are provided with the insertion position for indicating function linked contents in chat messages in function linked contents It sets, and the link information for indicating function linked contents function;After chat messages are sent to server by terminal, server Filtering sensitive words operation only is carried out to common chat content, and filtered common chat content and function linked contents are sent out Give other terminals so that server only to common chat content carry out filtering sensitive words, not to function linked contents into Row filtering sensitive words individually will not all trigger the filtering of sensitive word so as to avoid common chat content and function linked contents Mechanism, but mix and be possible to the problem of forming sensitive word, chat messages is caused accidentally to be filtered when being aligned to together.
Simultaneously as including insertion position and linking functions type, the common chat content of server in function linked contents It is sent in client together with function linked contents, client determines that function linked contents institute is right according to linking functions type The icon answered determines that function linked contents are inserted into the position of common chat content according to insertion position, facilitates accurate reproduction and chat Its content.
Optionally, this programme uses the storage mode of round-robin queue, can effectively solve database purchase and bears excessive ask Topic, only stores recent chat messages, and it is excessive that database burden has been effectively relieved in the case where influencing less on user experience The problem of.
Referring to FIG. 5, it illustrates the flow chart of the filter method of the chat messages of another embodiment offer of the application, The present embodiment is applied to chat system shown in FIG. 1 with the filter method of the chat messages, and the chat system is online game In chat system illustrate.This method may include the following steps:
Step 301, player inputs chat content.
Chat messages include szContent (common chat content) and szLinkInfo (function linked contents), are commonly chatted Its content be user's input content, content-form can be text, number, symbol, voice etc. any one or a few;
Function linked contents are the links for carrying correlation function, in conjunction with Fig. 6 and Fig. 7, click the "+" in dialog box, display A variety of link information types.Schematically, link information includes at least one of expression, history, coordinate, red packet, stage property.
The composition of function linked contents includes at least following three parts:
Linking functions type (LinkType) is used to indicate the function type that link information is triggered, such as the link is Place, team, red packet or stage property etc..When recipient receives the link information, relevant operation is executed according to link type;
Insertion position (Pos), the insertion position being inserted into filtered common chat content for indicating link information, To achieve the effect that mixing.Pos is indicated by the position in the information where number mark link when Pos is " 3 " There are three characters in front of Pos, i.e. the position of link insertion is behind third character.
Link information (LinkInfo), for carrying the parameter information of other functions.
Optionally, the information content in the link is surrounded using spcial character segmentation, that is, for surrounding the information content Spcial character be the information content identifier, which can customize setting, for example, can be " { } ", " [] " or " < > " etc. forms.
The information content may include the related datas such as position coordinates, the red packet amount of money.
Schematically, when the common chat content of input is " I fights herein ", the form of expression of function linked contents For " A ", link type is position, when Pos is " 4 ", state that receiving side terminal and sending side terminal interface show are as follows: " I A fights herein ".
Step 302, client is parsed into common chat content and function linked contents.
For user during input, information is divided into common chat content and function linked contents two automatically by terminal Point.Wherein, the content that user is manually entered is common chat content, and the content by link insertion is function linked contents, eventually Common chat content and function linked contents are sent to server by end.
Step 303, server filters common chat content.
After server receives chat messages, chat messages are parsed, are divided into common chat content and function link Content two parts, server only do filter operation to common chat content, do not do filter operation to function linked contents.
Step 304, server parses function linked contents, judges whether to trigger game function.It does not need to then follow the steps 305, it needs to then follow the steps 306.
Step 305, memory buffers information.
Server stores chat content in the database.
Optionally, storage is carried out by the way of round-robin queue: using the memory of one section of fixed length, realizing a fixed length Array covers old chat data by the way of pointer with new chat data, only stores newest data to realize.Such as Shown in Fig. 9, which is stored using the storage mode of round-robin queue, the storage mode include: by chat messages successively It stores into fixed length memory block, fixed length memory block is used to store N nearest chat messages using circulation form, and N is positive whole Number.After the storage of fixed length memory block is full, new chat messages can cover earliest chat messages, to form round-robin queue.
Step 306, game function is handled.
Server determines the need for carrying out function treatment operation according to the type and content of function linked contents, for example, When function linked contents are red packets, after receiving side terminal gets red packet, server need to execute function behaviour relevant to red packet Make, such as feedback gets notice.Server stores chat messages in the database after having executed game function processing operation.
Optionally, function treatment operation carries out in server or terminal, when function complexity is lower, and does not need it When his terminal data information, function treatment carries out in terminal, such as pathfinding information.When function complexity is higher, or need it When his terminal data information, function treatment carries out in the server, for example, set up team, give bonus or equip transaction etc. operate.
Step 307, it converts the information into client format and is sent to client.
Server before being sent to client first by the information content from server language conversion at can terminal present State.That is, still include common chat content (szContent) and function linked contents (szLinkInfo) two parts, wherein Function linked contents do not process.
Client includes sending side terminal and receiving side terminal, to transmission while server is sent to receiving side terminal Square terminal feedback information, for conversation content to be presented on sending side terminal.When the content of transmission is that receiving side terminal is needed to lead When the content of operations such as taking or execute, server sends after operation is got or executed to receiving side terminal to sending side terminal anti- Feedforward information prompts sending side terminal to send content and is got or executed.
Step 308, client is parsed and is shown.
Customer side obtains filtered common chat content and function linked contents in the content for receiving server, Client determines the icon that function linked contents are shown on the client according to the linking functions type in function linked contents, Illustratively, when linking functions type is the relevant coordinate data in position, icon on map using being usually used in indicating positioning Mark, and icon be directed toward link information.Client will indicate the pattern insertion of function link type according to insertion position It is shown in common chat content, schematically, when insertion position is " 4 ", is directed toward the pattern insertion of link information general Behind 4th character of logical chat content.
Fig. 8 shows the method flow diagram of the filter method for the chat messages that another embodiment of the application provides, this implementation Example is applied to illustrate in chat system shown in Fig. 1 with the filter method of the chat messages.This method may include as follows Several steps:
Step 401, client receives server info.
Client receives the second chat messages that server is sent, and the second chat messages are servers in common chat Hold after carrying out filtering sensitive words, is obtained according to function linked contents and filtered common chat content.
Optionally, function linked contents are indicated using target data format, and target data format includes: insertion position It sets and link information, wherein insertion position is for indicating the insertion position that link information is inserted into filtered common chat content It sets;Link information is used to carry the parameter information of other functions.
Client obtains insertion position, link information and filtered common chat content from the second chat messages.
Optionally, function linked contents further include linking functions type, and linking functions type is used to indicate link information institute The function type of triggering, function type includes: position, form a team, in stage property and red packet at least one of.
Optionally, target data format is JSON format, and linking functions type, insertion position and link information use Different field in JSON format indicates.
Wherein, independent common chat content and function linked contents are that server is chatted from first received mutually Obtained in message.
Step 402, client is parsed and is shown.
Linking functions type is obtained from the second chat messages, obtains icon corresponding with linking functions type;
Link information is inserted into filtered common chat content according to insertion position and shows by client, can Icon is inserted into filtered common chat content according to insertion position and shows by selection of land, client, functional diagram Mark is directed toward the link information.
Step 403, user's click function linked contents, client parse function linked contents.
Client receives user to the trigger action of link information, when the corresponding function type of link information is position, Click function linked contents, client enable at least one in pathfinding function and transmitting function according to link information;Work as link The corresponding function type of information is click function linked contents when forming a team, and client is requested according to link information to server more People forms a team function;When the corresponding function type of link information is stage property, click function linked contents, client is according to link Information requests to enable at least one in stage property trading function and stage property lease function to server;When link information is corresponding When function type is red packet, click function linked contents, client requests to enable virtual resource to server according to link information Packet gets function.
Above-mentioned function is identical as Fig. 3 and Fig. 4 disclosure above-mentioned, and details are not described herein.
Step 404, client judges whether to need Trigger Function.
When the icon of client click function linked contents, client judges whether to need to trigger phase according to function type Close function, if desired, then follow the steps 405, execute step 406, end operation if not.
Step 405, the display function page.
If linked contents are when needing Trigger Function, client shows the correlation function page, using function linked contents as pathfinding For information.After receiving side terminal parses and obtains the position coordinates in function linked contents, receiving side terminal is sat according to position Mark generates pathfinding instruction, and starting point is the pathfinding point that the game role of game user manipulation is presently in, and terminal is link information In position coordinates.Map partitioning is the pathfinding point of gridding, and a pathfinding point is a grid, and all map scenes include Ground, forest etc. are filled in pathfinding point, and user reaches target position according to the pathfinding route of generation.
Optionally, the mode for searching for direct path can be to be realized by A star algorithm, and it is common that A star algorithm belongs to this field The common knowledge of technical staff, details are not described herein again.
In conclusion being linked after the client in the present embodiment receives the chat messages that server is sent according to function Linking functions type in content obtains function type, and determines the icon used;Determine that link information is inserted according to insertion position Enter the position in filtered common chat content;The parameter information carried, complete reduction service are determined according to link information The chat messages that device is sent simplify the execution step of client reduction chat content, and alleviate client executes burden.
Following is the application Installation practice, can be used for executing the application embodiment of the method.It is real for the application device Undisclosed details in example is applied, the application embodiment of the method is please referred to.
Referring to Fig. 10, showing it illustrates the filter device of the chat content sensitive word of one embodiment of the application offer It is intended to.Device 700 includes:
Receiving module 710, for receiving the first chat messages of client transmission, the first chat messages include only mutually Vertical common chat content and function linked contents, function linked contents include insertion position and link information, and link information is used In other functions of the triggering in addition to chat feature;
Processing module 720 obtains in filtered common chat for carrying out filtering sensitive words to common chat content Hold;
Processing module 720 disappears for obtaining the second chat according to filtered common chat content and function linked contents Breath;
Sending module 730, for the second chat messages to be sent to client, client is for receiving the second chat After message, link information is inserted into filtered common chat content according to insertion position and is shown.
In an alternative embodiment, function linked contents are indicated using target data format, target data lattice Formula includes: linking functions type, insertion position and link information;
Linking functions type is used to indicate the function type that link information is triggered;
Insertion position is for indicating the insertion position that link information is inserted into filtered common chat content;
Link information is used to carry the parameter information of other functions.
In an alternative embodiment, target data format is JSON format, linking functions type, insertion position and Link information is indicated using the different field in JSON format.
In an alternative embodiment, function type include: position, form a team, in stage property and red packet at least one of, The device includes:
Processing module 720, for enabling pathfinding function according to link information when linking functions type is used to indicate position It can be at least one in transmitting function;
Processing module 720, for when linking functions type be used to indicate form a team when, more people's groups are enabled according to link information Team's function;
Processing module 720, for enabling stage property according to link information and handing over when linking functions type is used to indicate stage property At least one of in easy function and stage property lease function;
Processing module 720, for enabling virtual money according to link information when linking functions type is used to indicate red packet Source packet distribution function.
Processing module 720, for storing chat messages into fixed length memory block, fixed length memory block is used for using circulation Form stores N nearest chat messages, and N is positive integer.
Figure 11 is please referred to, it illustrates the filter devices of the chat content sensitive word of another embodiment offer of the application Schematic diagram.Device 800 includes:
Receiving module 810, for receiving the second chat messages of server transmission, the second chat messages are servers pair After common chat content carries out filtering sensitive words, obtained according to filtered common chat content and function linked contents;
Processing module 820, for obtaining insertion position, link information and filtered common from the second chat messages Chat content;
Processing module 820, for according to insertion position by link information be inserted into filtered common chat content into Row display;
Wherein, independent common chat content and function linked contents are that server is chatted from first received mutually Obtained in message, function linked contents include insertion position and link information, link information for trigger except chat feature it Outer other functions.
In an alternative embodiment, function linked contents are indicated using target data format, target data lattice Formula includes: linking functions type, insertion position and link information;
Linking functions type is used to indicate the function type that link information is triggered;
Insertion position is for indicating the insertion position that link information is inserted into filtered common chat content;
Link information is used to carry the parameter information of other functions.
In an alternative embodiment, target data format is JSON format, linking functions type, insertion position and Link information is indicated using the different field in JSON format.
In an alternative embodiment, processing module 820, for obtaining linking functions class from the second chat messages Type;Processing module 820, for obtaining icon corresponding with linking functions type;Processing module 820, for according to insertion Icon is inserted into filtered common chat content and shows by position, and icon is directed toward link information.
In an alternative embodiment, function type include: position, form a team, in stage property and red packet at least one of,
Receiving module 810, for receiving the trigger action to link information;
Processing module 820, for being sought according to link information enabling when the corresponding function type of link information is position At least one of in road function and transmitting function;
Processing module 820, for when the corresponding function type of link information is to form a team, according to link information to service Device requests more people to form a team function;
Processing module 820, for when the corresponding function type of link information is stage property, according to link information to service Device request enables at least one in stage property trading function and stage property lease function;
Processing module 820, for when the corresponding function type of link information is red packet, according to link information to service Device request enables virtual resource packet and gets function.
In an alternative embodiment, device further include: sending module 830, for according to user's operation to server Send the first chat messages.
It should be understood that the filter device and terminal of chat content sensitive word provided by the above embodiment are providing language Sound service when, only the example of the division of the above functional modules, in practical application, can according to need and will be upper It states function distribution to be completed by different functional modules, i.e., the internal structure of equipment is divided into different functional modules, to complete All or part of function described above.In addition, the filter device of chat content sensitive word provided by the above embodiment with chat The embodiment of the method for the filter method of its content erotic word belongs to same design, and specific implementation process is detailed in embodiment of the method, Which is not described herein again.
Figure 12 shows the structural block diagram of the terminal 1900 of one exemplary embodiment of the application offer.The terminal 1900 It may is that smart phone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) player, laptop or desktop computer.Terminal 1900 It is also possible to referred to as other titles such as user equipment, portable terminal, laptop terminal, terminal console.
In general, terminal 1900 includes: processor 1901 and memory 1902.
Processor 1901 may include one or more processing cores, such as 4 core processors, 8 core processors etc.. Processor 1901 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- Programmable Gate Array, field programmable gate array), (Programmable Logic Array, can compile PLA Journey logic array) at least one of example, in hardware realize.Processor 1901 also may include primary processor and association's processing Device, primary processor are the processors for being handled data in the awake state, also referred to as CPU (Central Processing Unit, central processing unit);Coprocessor is the low function for being handled data in the standby state Consume processor.In some embodiments, processor 1901 can be integrated with GPU (Graphics Processing Unit, Image processor), GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processing Device 1901 can also include AI (Artificial Intelligence, artificial intelligence) processor, and the AI processor is for locating Manage the calculating operation in relation to machine learning.
Memory 1902 may include one or more computer readable storage mediums, the computer readable storage medium It can be non-transient.Memory 1902 may also include high-speed random access memory and nonvolatile memory, such as One or more disk storage equipments, flash memory device.In some embodiments, the non-transient meter in memory 1902 Calculation machine readable storage medium storing program for executing for storing at least one instruction, at least one instruction for performed by processor 1901 with Realize the filter method for the chat messages that embodiment of the method provides in the application.
In some embodiments, terminal 1900 is also optional includes: peripheral device interface 1903 and at least one periphery are set It is standby.It can be connected by bus or signal wire between processor 1901, memory 1902 and peripheral device interface 1903.It is each Peripheral equipment can be connected by bus, signal wire or circuit board with peripheral device interface 1903.Specifically, peripheral equipment packet It includes: radio circuit 1904, touch display screen 1905, camera 1906, voicefrequency circuit 1907, positioning component 1908 and power supply At least one of 1909.
Peripheral device interface 1903 can be used for by I/O (Input/Output, input/output) it is relevant at least one Peripheral equipment is connected to processor 1901 and memory 1902.In some embodiments, processor 1901,1902 and of memory Peripheral device interface 1903 is integrated on same chip or circuit board;In some other embodiments, processor 1901 is deposited Any one or two in reservoir 1902 and peripheral device interface 1903 can realize on individual chip or circuit board, The present embodiment is not limited this.
Radio circuit 1904 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal. Radio circuit 1904 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 1904 will be electric Signal is converted to electromagnetic signal and is sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio frequency electrical Road 1904 include: antenna system, RF transceiver, one or more amplifier, tuner, oscillator, digital signal processor, Codec chip group, user identity module card etc..Radio circuit 1904 can by least one wireless communication protocol come with Other terminals are communicated.The wireless communication protocol includes but is not limited to: in WWW, Metropolitan Area Network (MAN), Intranet, each generation, are mobile logical Communication network (2G, 3G, 4G and 5G), WLAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.? In some embodiments, radio circuit 1904 can also include that (Near Field Communication, near radio are logical by NFC Letter) related circuit, the application is not limited this.
Display screen 1905 is for showing UI (User Interface, user interface).The UI may include figure, text, Icon, video and its their any combination.When display screen 1905 is touch display screen, display screen 1905 also has acquisition In the ability of the touch signal on the surface or surface of display screen 1905.The touch signal can be used as control signal input It is handled to processor 1901.At this point, display screen 1905 can be also used for providing virtual push button and/or dummy keyboard, also referred to as Soft button and/or soft keyboard.In some embodiments, display screen 1905 can be one, and the front panel of terminal 1900 is arranged; In further embodiments, display screen 1905 can be at least two, be separately positioned on the different surfaces of terminal 1900 or in folding Folded design;In still other embodiments, display screen 1905 can be flexible display screen, and the curved surface of terminal 1900 is arranged in On upper or fold plane.Even, display screen 1905 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 1905 can use LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light- Emitting Diode, Organic Light Emitting Diode) etc. materials preparation.
CCD camera assembly 1906 is for acquiring image or video.Optionally, CCD camera assembly 1906 includes front camera And rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.? In some embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length respectively Any one in camera, with realize main camera and the fusion of depth of field camera realize background blurring function, main camera and Wide-angle camera fusion is realized pan-shot and VR (Virtual Reality, virtual reality) shooting function or other is melted It is in step with camera shooting function.In some embodiments, CCD camera assembly 1906 can also include flash lamp.Flash lamp can be monochromatic temperature Flash lamp is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can For the light compensation under different-colour.
Voicefrequency circuit 1907 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and It converts sound waves into electric signal and is input to processor 1901 and handled, or be input to radio circuit 1904 to realize voice Communication.For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different portions of terminal 1900 to be multiple Position.Microphone can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker be then used for will from processor 1901 or The electric signal of radio circuit 1904 is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramics Loudspeaker.When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, The sound wave that the mankind do not hear can be converted electrical signals to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 1907 can also include earphone jack.
Positioning component 1908 is used for the current geographic position of positioning terminal 1900, to realize navigation or LBS (Location Based Service, location based service).Positioning component 1908 can be the GPS (Global based on the U.S. Positioning System, global positioning system), China dipper system or Russia Galileo system positioning group Part.
Power supply 1909 is used to be powered for the various components in terminal 1900.Power supply 1909 can be alternating current, direct current Electricity, disposable battery or rechargeable battery.When power supply 1909 includes rechargeable battery, which can be wired Rechargeable battery or wireless charging battery.Wired charging battery is the battery to be charged by Wireline, and wireless charging battery is logical Cross the battery of wireless coil charging.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 1900 further includes having one or more sensors 1910.One or more sensing Device 1910 includes but is not limited to: acceleration transducer 1911, gyro sensor 1912, pressure sensor 1913, fingerprint sensing Device 1914, optical sensor 1915 and proximity sensor 1916.
Acceleration transducer 1911 can detecte the acceleration in three reference axis of the coordinate system established with terminal 1900 Size.For example, acceleration transducer 1911 can be used for detecting component of the acceleration of gravity in three reference axis.Processor The 1901 acceleration of gravity signals that can be acquired according to acceleration transducer 1911, control touch display screen 1905 with lateral view Figure or longitudinal view carry out the display of user interface.Acceleration transducer 1911 can be also used for game or the movement of user The acquisition of data.
Gyro sensor 1912 can detecte body direction and the rotational angle of terminal 1900, gyro sensor 1912 can cooperate with acquisition user to act the 3D of terminal 1900 with acceleration transducer 1911.Processor 1901 is according to gyro The data that instrument sensor 1912 acquires, may be implemented following function: action induction (for example changed according to the tilt operation of user Become UI), shooting when image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 1905 in terminal 1900 can be set in pressure sensor 1913.When When the side frame of terminal 1900 is arranged in pressure sensor 1913, user can detecte to the gripping signal of terminal 1900, by Reason device 1901 carries out right-hand man's identification or prompt operation according to the gripping signal that pressure sensor 1913 acquires.Work as pressure sensing When the lower layer of touch display screen 1905 is arranged in device 1913, by processor 1901 according to user to the pressure of touch display screen 1905 Power operation, realization control the operability control on the interface UI.Operability control includes button control, scroll bar At least one of control, icon control, menu control.
Fingerprint sensor 1914 is used to acquire the fingerprint of user, is acquired by processor 1901 according to fingerprint sensor 1914 The identity of the fingerprint recognition user arrived, alternatively, by fingerprint sensor 1914 according to the identity of collected fingerprint recognition user. When the identity for identifying user is trusted identity, the user is authorized to execute relevant sensitive operation by processor 1901, this is quick Sense operation includes solving lock screen, checking encryption information, downloading software, payment and change setting etc..Fingerprint sensor 1914 can be with The front, the back side or side of terminal 1900 is set.When being provided with physical button or manufacturer Logo in terminal 1900, fingerprint Sensor 1914 can be integrated with physical button or manufacturer Logo.
Optical sensor 1915 is for acquiring ambient light intensity.In one embodiment, processor 1901 can be according to light The ambient light intensity that sensor 1915 acquires is learned, the display brightness of touch display screen 1905 is controlled.Specifically, work as environmental light intensity When spending higher, the display brightness of touch display screen 1905 is turned up;When ambient light intensity is lower, touch display screen 1905 is turned down Display brightness.In another embodiment, the environmental light intensity that processor 1901 can also be acquired according to optical sensor 1915 Degree, dynamic adjust the acquisition parameters of CCD camera assembly 1906.
Proximity sensor 1916, also referred to as range sensor are generally arranged at the front panel of terminal 1900.Proximity sensor 1916 for acquiring the distance between the front of user Yu terminal 1900.In one embodiment, when proximity sensor 1916 is examined When measuring the distance between the front of user and terminal 1900 and gradually becoming smaller, touch display screen 1905 is controlled by processor 1901 Breath screen state is switched to from bright screen state;When proximity sensor 1916 detect between user and the front of terminal 1900 away from When from becoming larger, touch display screen 1905 being controlled by processor 1901 and is switched to bright screen state from breath screen state.
It, can be with it will be understood by those skilled in the art that the restriction of the not structure paired terminal 1900 of structure shown in Figure 12 Including than illustrating more or fewer components, perhaps combining certain components or being arranged using different components.
Figure 13 shows the structural schematic diagram of the server of the application one embodiment offer.The server is for implementing The filter method of the chat messages provided in above-described embodiment.Specifically:
The server 1300 includes central processing unit (CPU) 1301 including random access memory (RAM) 1302 With the system storage 1304 of read-only memory (ROM) 1303, and connection system storage 1304 and central processing unit 1301 system bus 1305.The server 1300 further includes that information is transmitted between each device helped in computer Basic input/output (I/O system) 1306, and it is used for storage program area 1313, application program 1314 and other programs The mass-memory unit 1307 of module 1315.
The basic input/output 1306 includes display 1308 for showing information and defeated for user Enter the input equipment 1309 of such as mouse, keyboard etc of information.Wherein the display 1308 and input equipment 1309 are all logical It crosses and is connected to the input and output controller 1310 of system bus 1305 and is connected to central processing unit 1301.The basic input/ Output system 1306 can also include input and output controller 1310 for receiving and handling from keyboard, mouse or electronics The input of multiple other equipment such as stylus.Similarly, input and output controller 1310 also provides output to display screen, printing Machine or other kinds of output equipment.
The mass-memory unit 1307 (is not shown by being connected to the bulk memory controller of system bus 1305 It is connected to central processing unit 1301 out).The mass-memory unit 1307 and its associated computer-readable medium are Server 1300 provides non-volatile memories.That is, the mass-memory unit 1307 may include such as hard disk or The computer-readable medium (not shown) of person's CD-ROM drive etc.
Without loss of generality, the computer-readable medium may include computer storage media and communication media.Computer Storage medium includes information such as computer readable instructions, data structure, program module or other data for storage The volatile and non-volatile of any method or technique realization, removable and irremovable medium.Computer storage medium includes RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storages its technologies, CD-ROM, DVD or other optical storages, tape Box, tape, disk storage or other magnetic storage devices.Certainly, skilled person will appreciate that the computer storage medium It is not limited to above-mentioned several.Above-mentioned system storage 1304 and mass-memory unit 1307 may be collectively referred to as memory.
According to the various embodiments of the application, the server 1300 can also be connected to the network by internet etc. Remote computer operation on to network.Namely server 1300 can be by the net that is connected on the system bus 1305 Network interface unit 1311 is connected to network 1312, in other words, Network Interface Unit 1311 can be used also to be connected to other classes The network or remote computer system (not shown) of type.
The memory further includes one or more than one program, the one or more programs storage In memory, and it is configured to be executed by one or more than one processor.Said one or more than one program bag Containing the instruction for performing the following operation
It should be understood that referenced herein " multiple " refer to two or more."and/or", description association The incidence relation of object indicates may exist three kinds of relationships, for example, A and/or B, can indicate: individualism A is existed simultaneously These three situations of A and B, individualism B.Character "/" typicallys represent the relationship that forward-backward correlation object is a kind of "or".
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely the preferred embodiments of the application, not to limit the application, it is all in spirit herein and Within principle, any modification, equivalent replacement, improvement and so on be should be included within the scope of protection of this application.

Claims (16)

1. a kind of filter method of chat messages, which is characterized in that applied in the server with chat feature, the method Include:
Receive the first chat messages that client is sent, first chat messages include mutual independent common chat content and Function linked contents, the function linked contents include insertion position and link information, and the link information removes institute for triggering State other functions except chat feature;
Filtering sensitive words are carried out to the common chat content, obtain filtered common chat content;
The second chat messages are obtained according to the filtered common chat content and the function linked contents;
Second chat messages are sent to the client, the client is for receiving second chat messages Afterwards, the link information is inserted into the filtered common chat content according to the insertion position and is shown.
2. the method according to claim 1, wherein the function linked contents are carried out using target data format It indicates, the target data format includes: linking functions type, the insertion position and the link information;
The linking functions type is used to indicate the function type that the link information is triggered;
The insertion position is for indicating the insertion position that the link information is inserted into the filtered common chat content;
The link information is used to carry the parameter information of other functions.
3. according to the method described in claim 2, it is characterized in that, the target data format is JSON format, the link Function type, the insertion position and the link information are indicated using the different field in the JSON format.
4. method according to any one of claims 1 to 3, which is characterized in that the function type includes: position, forms a team, road At least one of in tool and red packet, the method also includes:
When the linking functions type is used to indicate the position, pathfinding function and transmission function are enabled according to the link information At least one of in energy;
When the linking functions type is used to indicate described form a team, more people are enabled according to the link information and are formed a team function;
When the linking functions type is used to indicate the stage property, stage property trading function and road are enabled according to the link information At least one of in tool lease function;
When the linking functions type is used to indicate the red packet, virtual resource packet is enabled according to the link information and distributes function Energy.
5. method according to any one of claims 1 to 3, which is characterized in that the method also includes:
The chat messages are stored into fixed length memory block, the fixed length memory block is used for nearest using circulation form storage N chat messages, N are positive integer.
6. a kind of filter method of chat messages, which is characterized in that applied in the client with chat feature, the method Include:
The second chat messages that the server is sent are received, second chat messages are the servers in common chat Hold after carrying out filtering sensitive words, is obtained according to filtered common chat content and function linked contents;
From being obtained in second chat messages in the insertion position, the link information and the filtered common chat Hold;
The link information is inserted into the filtered common chat content according to the insertion position and is shown;
Wherein, the independent common chat content and the function linked contents are the servers from the received mutually Obtained in one chat messages, the function linked contents include insertion position and link information, and the link information is for touching Send out other functions in addition to the chat feature.
7. according to the method described in claim 6, it is characterized in that, the function linked contents are carried out using target data format It indicates, the target data format includes: linking functions type, the insertion position and the link information;
The linking functions type is used to indicate the function type that the link information is triggered;
The insertion position is for indicating the insertion position that the link information is inserted into the filtered common chat content;
The link information is used to carry the parameter information of other functions.
8. the method according to the description of claim 7 is characterized in that the target data format is JSON format, the link Function type, the insertion position and the link information are indicated using the different field in the JSON format.
9. the method according to the description of claim 7 is characterized in that the method also includes:
The linking functions type is obtained from second chat messages;
The described link information is inserted into the filtered common chat content according to the insertion position shows Show, comprising:
Obtain icon corresponding with the linking functions type;
The icon is inserted into the filtered common chat content according to the insertion position and is shown, institute It states icon and is directed toward the link information.
10. according to any method of claim 7 to 9, which is characterized in that the function type includes: position, form a team, In stage property and red packet at least one of, it is described the link information is inserted into according to the insertion position it is described filtered general After being shown in logical chat content, further includes:
Receive the trigger action to the link information;
When the corresponding function type of the link information is the position, pathfinding function and biography are enabled according to the link information Send at least one in function;
When the corresponding function type of the link information is described forms a team, more people are requested to server according to the link information It forms a team function;
When the corresponding function type of the link information is the stage property, requested according to the link information to the server Enable at least one in stage property trading function and stage property lease function;
When the corresponding function type of the link information is the red packet, requested according to the link information to the server It enables virtual resource packet and gets function.
11. according to any method of claim 6 to 9, which is characterized in that the method also includes:
First chat messages are sent to the server according to user's operation.
12. a kind of filter device of chat content sensitive word, which is characterized in that described device includes:
Receiving module, for receiving the first chat messages of client transmission, first chat messages include independent mutually Common chat content and function linked contents, the function linked contents include insertion position and link information, the link letter Breath is for triggering other functions in addition to the chat feature;
Filtering module obtains filtered common chat content, root for carrying out filtering sensitive words to the common chat content The second chat messages are obtained according to the filtered common chat content and the function linked contents;
Sending module, for second chat messages to be sent to the client, the client be used for receive it is described After second chat messages, the link information is inserted into the filtered common chat content according to the insertion position It is shown.
13. a kind of filter device of chat content sensitive word, which is characterized in that described device includes:
Receiving module, the second chat messages sent for receiving the server, second chat messages are the services After device carries out filtering sensitive words to common chat content, obtained according to filtered common chat content and function linked contents 's;
Module is obtained, for obtaining the insertion position, the link information and the filtering from second chat messages Common chat content afterwards;
Display module, for the link information to be inserted into the filtered common chat content according to the insertion position In shown;
Wherein, the independent common chat content and the function linked contents are the servers from the received mutually Obtained in one chat messages, the function linked contents include insertion position and link information, and the link information is for touching Send out other functions in addition to the chat feature.
14. a kind of server, which is characterized in that the server includes: processor and memory;
The memory is stored at least one instruction, at least a Duan Chengxu, code set or instruction set, and described at least one refers to It enables, an at least Duan Chengxu, the code set or instruction set are loaded by the processor and executed to realize such as claim 1 To the filter method of 5 any chat messages.
15. a kind of terminal, which is characterized in that the terminal includes: processor and memory;
The memory is stored at least one instruction, at least a Duan Chengxu, code set or instruction set, and described at least one refers to It enables, an at least Duan Chengxu, the code set or instruction set are loaded by the processor and executed to realize such as claim 6 To the filter method of 11 any chat messages.
16. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has at least one Instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set Or instruction set is loaded by the processor and is executed the filtering side to realize the chat messages as described in claim 1 to 11 is any Method.
CN201910248211.XA 2019-03-29 2019-03-29 Chat message filtering method, system and equipment Active CN110119508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910248211.XA CN110119508B (en) 2019-03-29 2019-03-29 Chat message filtering method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910248211.XA CN110119508B (en) 2019-03-29 2019-03-29 Chat message filtering method, system and equipment

Publications (2)

Publication Number Publication Date
CN110119508A true CN110119508A (en) 2019-08-13
CN110119508B CN110119508B (en) 2023-03-24

Family

ID=67520760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910248211.XA Active CN110119508B (en) 2019-03-29 2019-03-29 Chat message filtering method, system and equipment

Country Status (1)

Country Link
CN (1) CN110119508B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810268A (en) * 2021-05-31 2021-12-17 多益网络有限公司 Message formatting method, device, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079539A (en) * 2013-03-28 2014-10-01 阿里巴巴集团控股有限公司 Data privacy storage method and client
CN104346396A (en) * 2013-08-05 2015-02-11 腾讯科技(深圳)有限公司 Data processing method, device, terminal and system of instant messaging client
CN104980447A (en) * 2015-07-07 2015-10-14 珠海赞友科技有限公司 Method for safely transmitting chatting and other information through network
CN105653941A (en) * 2015-07-31 2016-06-08 哈尔滨安天科技股份有限公司 Heuristic detection method and system for phishing website
CN106528731A (en) * 2016-10-27 2017-03-22 新疆大学 Sensitive word filtering method and system
CN106844469A (en) * 2016-12-22 2017-06-13 惠州Tcl移动通信有限公司 The automatic electronic equipment for obtaining content and the automatic method for obtaining content
CN107402940A (en) * 2016-05-20 2017-11-28 北京京东尚科信息技术有限公司 Sensitive word search method
CN107809368A (en) * 2016-09-09 2018-03-16 腾讯科技(深圳)有限公司 Information filtering method and device
US20180218085A1 (en) * 2016-06-01 2018-08-02 Google Inc. Conversion latency reduction in online chat-based communication infrastructure
CN108574772A (en) * 2017-03-10 2018-09-25 腾讯科技(深圳)有限公司 End message display methods and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079539A (en) * 2013-03-28 2014-10-01 阿里巴巴集团控股有限公司 Data privacy storage method and client
CN104346396A (en) * 2013-08-05 2015-02-11 腾讯科技(深圳)有限公司 Data processing method, device, terminal and system of instant messaging client
CN104980447A (en) * 2015-07-07 2015-10-14 珠海赞友科技有限公司 Method for safely transmitting chatting and other information through network
CN105653941A (en) * 2015-07-31 2016-06-08 哈尔滨安天科技股份有限公司 Heuristic detection method and system for phishing website
CN107402940A (en) * 2016-05-20 2017-11-28 北京京东尚科信息技术有限公司 Sensitive word search method
US20180218085A1 (en) * 2016-06-01 2018-08-02 Google Inc. Conversion latency reduction in online chat-based communication infrastructure
CN107809368A (en) * 2016-09-09 2018-03-16 腾讯科技(深圳)有限公司 Information filtering method and device
CN106528731A (en) * 2016-10-27 2017-03-22 新疆大学 Sensitive word filtering method and system
CN106844469A (en) * 2016-12-22 2017-06-13 惠州Tcl移动通信有限公司 The automatic electronic equipment for obtaining content and the automatic method for obtaining content
CN108574772A (en) * 2017-03-10 2018-09-25 腾讯科技(深圳)有限公司 End message display methods and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ALANLEE: "java实现敏感词过滤(DFA算法)", 《博客园》 *
FEI WU等: "A Chinese Message Sensitive Words Filtering System based on DFA and Word2vec", 《PROCEDIA COMPUTER SCIENCE》 *
傅明建: "一种基于Java Web的敏感词过滤方法研究与实现", 《智能计算机与应用》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810268A (en) * 2021-05-31 2021-12-17 多益网络有限公司 Message formatting method, device, equipment and storage medium
CN113810268B (en) * 2021-05-31 2024-02-20 多益网络有限公司 Message formatting method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110119508B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
KR102510194B1 (en) Virtual pet information display method, apparatus, terminal, server, recording medium, and system
CN111339086B (en) Block processing method, and data query method and device based on block chain
CN110585699A (en) Control method, device and equipment of cloud game and storage medium
CN110276840A (en) Control method, device, equipment and the storage medium of more virtual roles
CN109260707A (en) Methods of exhibiting, device, equipment and the storage medium of virtual pet
CN108710496A (en) Configuration update method, device, equipment and the storage medium of application program
CN110471858A (en) Applied program testing method, device and storage medium
JP7245853B2 (en) Virtual pet breeding methods, devices, equipment and computer programs
CN110496392B (en) Virtual object control method, device, terminal and storage medium
CN113873281A (en) Information display method and device, terminal and storage medium
CN112827166B (en) Card object-based interaction method and device, computer equipment and storage medium
CN110224870A (en) Interface monitoring method, apparatus calculates equipment and storage medium
CN111080371A (en) Method, device and storage medium for issuing resources to user account
CN108804180A (en) Display methods, device, terminal and the storage medium of user interface
CN109126136B (en) Three-dimensional virtual pet generation method, device, equipment and storage medium
CN109933594A (en) Obtain method, apparatus, electronic equipment and the medium of data
CN109889858A (en) Information processing method, device and the computer readable storage medium of virtual objects
CN113506086A (en) Task issuing method and device, computer equipment and medium
CN112330380B (en) Order creation method, order creation device, computer equipment and computer readable storage medium
CN109833624A (en) The display methods and device for line information of marching on virtual map
CN112288894A (en) Method, device and equipment for displaying entrance ticket information and readable storage medium
CN111760296A (en) Team forming processing method, team forming processing device, terminal, server and storage medium
CN110399183B (en) Virtual pet breeding method, device, equipment and storage medium
CN110119508A (en) Filter method, system and the equipment of chat messages
CN111695629A (en) User characteristic obtaining method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant