[go: up one dir, main page]

CN110119508B - Chat message filtering method, system and equipment - Google Patents

Chat message filtering method, system and equipment Download PDF

Info

Publication number
CN110119508B
CN110119508B CN201910248211.XA CN201910248211A CN110119508B CN 110119508 B CN110119508 B CN 110119508B CN 201910248211 A CN201910248211 A CN 201910248211A CN 110119508 B CN110119508 B CN 110119508B
Authority
CN
China
Prior art keywords
chat
content
function
link
link information
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.)
Expired - Fee Related
Application number
CN201910248211.XA
Other languages
Chinese (zh)
Other versions
CN110119508A (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
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种聊天消息的过滤方法、系统及设备,属于互联网领域。本方法包括:接收客户端发送的第一聊天消息,第一聊天消息包括互相独立的普通聊天内容和功能链接内容,功能链接内容包括插入位置和链接信息,链接信息用于触发除聊天功能之外的其它功能;对普通聊天内容进行敏感词过滤,得到过滤后的普通聊天内容;根据过滤后的普通聊天内容和功能链接内容得到第二聊天消息;将第二聊天消息发送给客户端,客户端用于在收到第二聊天消息后,根据插入位置将链接信息插入至过滤后的普通聊天内容中进行显示。本申请通过只对普通聊天内容进行过滤操作,从而避免了聊天内容和功能链接内容混排时引起的误过滤问题。

Figure 201910248211

The application discloses a chat message filtering method, system and equipment, belonging to the Internet field. The method includes: receiving the first chat message sent by the client, the first chat message includes common chat content and function link content independent of each other, the function link content includes insertion position and link information, and the link information is used to trigger Other functions of other functions; filter sensitive words on ordinary chat content to obtain filtered ordinary chat content; obtain the second chat message according to the filtered ordinary chat content and function link content; send the second chat message to the client, the client It is used for inserting the link information into the filtered general chat content according to the insertion position for displaying after receiving the second chat message. This application only filters common chat content, thereby avoiding the mis-filtering problem caused by mixing chat content and function link content.

Figure 201910248211

Description

聊天消息的过滤方法、系统及设备Method, system and device for filtering chat messages

技术领域technical field

本申请涉及互联网领域,特别涉及一种聊天消息的过滤方法、系统及设备。The present application relates to the Internet field, in particular to a method, system and equipment for filtering chat messages.

背景技术Background technique

在很多具有社交属性的应用程序中都集成有聊天功能,比如网络游戏、直播平台、短视频分享平台等。Chat functions are integrated in many applications with social attributes, such as online games, live broadcast platforms, and short video sharing platforms.

以带有聊天功能的网络游戏为例,聊天功能不但承担着玩家之间交流的作用,也承担着网络游戏的一些辅助功能,比如位置分享功能、分享红包功能、道具交易功能、组队等。以网络游戏中的一个玩家要发送自己的位置为例,该玩家的第一客户端发送的聊天消息是“我在<pos x=111,y=222>等你”,其它玩家的第二客户端在收到该聊天消息后,会把“我在等你”解析成文本信息,将<>内的内容解析成网络游戏中的坐标位置。若其它玩家点击该坐标位置,则可以将其它玩家的游戏角色自动导航到该坐标位置。Taking an online game with a chat function as an example, the chat function not only assumes the role of communication between players, but also undertakes some auxiliary functions of the online game, such as location sharing, red envelope sharing, item trading, team formation, etc. Take a player in an online game who wants to send his position as an example, the chat message sent by the player's first client is "I'm waiting for you at <pos x=111, y=222>", the second client of other players After receiving the chat message, the terminal will parse "I'm waiting for you" into text information, and parse the content inside <> into the coordinate position in the online game. If other players click on the coordinate position, the game characters of other players can be automatically navigated to the coordinate position.

而为了创建一个和谐的交流环境,网络游戏中还对聊天消息进行敏感词过滤,有时候会出现误过滤问题,比如存在一个敏感词“xxyy”,那么可能会将聊天消息“xx<yy 1234>”中的“xx<yy”识别为敏感词,最终将该聊天消息过滤为“*****1234>”,造成显示异常的问题。In order to create a harmonious communication environment, online games also filter sensitive words in chat messages, and sometimes misfiltering problems occur. For example, if there is a sensitive word "xxyy", then the chat message "xx<yy 1234> may be filtered. "xx<yy" in "is identified as a sensitive word, and the chat message is finally filtered as "*****1234>", causing an abnormal display problem.

发明内容Contents of the invention

本申请实施例提供了一种聊天消息的过滤方法、装置、设备及存储介质,可以解决相关技术中可能会对聊天消息进行误过滤的问题。所述技术方案如下:Embodiments of the present application provide a chat message filtering method, device, device, and storage medium, which can solve the problem of possible false filtering of chat messages in the related art. Described technical scheme is as follows:

根据本公开实施例的一个方面,提供了一种聊天消息的过滤方法,应用于具有聊天功能的服务器中,所述方法包括:According to an aspect of an embodiment of the present disclosure, a method for filtering chat messages is provided, which is applied to a server with a chat function, and the method includes:

接收客户端发送的第一聊天消息,所述第一聊天消息包括互相独立的普通聊天内容和功能链接内容,所述功能链接内容包括插入位置和链接信息,所述链接信息用于触发除所述聊天功能之外的其它功能;Receive the first chat message sent by the client, the first chat message includes common chat content and function link content independent of each other, the function link content includes insertion position and link information, and the link information is used to trigger the functions other than the chat function;

对所述普通聊天内容进行敏感词过滤,得到过滤后的普通聊天内容;Sensitive word filtering is carried out to described ordinary chat content, obtains the ordinary chat content after filtering;

根据所述过滤后的普通聊天内容和所述功能链接内容得到第二聊天消息;obtaining a second chat message according to the filtered common chat content and the function link content;

将所述第二聊天消息发送给所述客户端,所述客户端用于在收到所述第二聊天消息后,根据所述插入位置将所述链接信息插入至所述过滤后的普通聊天内容中进行显示。sending the second chat message to the client, the client is configured to insert the link information into the filtered common chat according to the insertion position after receiving the second chat message displayed in the content.

根据本公开实施例的另一方面,提供了一种聊天消息的过滤方法,应用于具有聊天功能的客户端中,所述方法包括:According to another aspect of the embodiments of the present disclosure, a method for filtering chat messages is provided, which is applied to a client with a chat function, and the method includes:

接收所述服务器发送的第二聊天消息,所述第二聊天消息是所述服务器对普通聊天内容进行敏感词过滤后,根据过滤后的普通聊天内容和功能链接内容得到的;receiving the second chat message sent by the server, the second chat message is obtained according to the filtered common chat content and function link content after the server filters the common chat content for sensitive words;

从所述第二聊天消息中获取所述插入位置、所述链接信息和所述过滤后的普通聊天内容;Obtaining the insertion position, the link information and the filtered general chat content from the second chat message;

根据所述插入位置将所述链接信息插入至所述过滤后的普通聊天内容中进行显示;Inserting the link information into the filtered general chat content according to the insertion position for display;

其中,互相独立的所述普通聊天内容和所述功能链接内容是所述服务器从接收到的第一聊天消息中得到的,所述功能链接内容包括插入位置和链接信息,所述链接信息用于触发除所述聊天功能之外的其它功能。Wherein, the independent common chat content and the function link content are obtained by the server from the received first chat message, and the function link content includes insertion position and link information, and the link information is used for Trigger functions other than the chat function.

根据本公开实施例的另一方面,提供了一种聊天内容敏感词的过滤装置,所述装置包括:According to another aspect of the embodiments of the present disclosure, a device for filtering sensitive words in chat content is provided, the device comprising:

接收模块,用于接收客户端发送的第一聊天消息,所述第一聊天消息包括互相独立的普通聊天内容和功能链接内容,所述功能链接内容包括插入位置和链接信息,所述链接信息用于触发除所述聊天功能之外的其它功能;The receiving module is configured to receive the first chat message sent by the client, the first chat message includes common chat content and function link content independent of each other, the function link content includes insertion position and link information, and the link information uses for triggering functions other than the chat function;

过滤模块,用于对所述普通聊天内容进行敏感词过滤,得到过滤后的普通聊天内容,根据所述过滤后的普通聊天内容和所述功能链接内容得到第二聊天消息;A filtering module, configured to filter sensitive words on the ordinary chat content to obtain filtered ordinary chat content, and obtain a second chat message according to the filtered ordinary chat content and the function link content;

发送模块,用于将所述第二聊天消息发送给所述客户端,所述客户端用于在收到所述第二聊天消息后,根据所述插入位置将所述链接信息插入至所述过滤后的普通聊天内容中进行显示。a sending module, configured to send the second chat message to the client, and the client is configured to insert the link information into the Displayed in the filtered general chat content.

根据本公开实施例的另一方面,提供了一种聊天内容敏感词的过滤装置,所述装置包括:According to another aspect of the embodiments of the present disclosure, a device for filtering sensitive words in chat content is provided, the device comprising:

接收模块,用于接收所述服务器发送的第二聊天消息,所述第二聊天消息是所述服务器对普通聊天内容进行敏感词过滤后,根据过滤后的普通聊天内容和功能链接内容得到的;The receiving module is configured to receive the second chat message sent by the server, the second chat message is obtained according to the filtered common chat content and function link content after the server filters sensitive words on the common chat content;

获取模块,用于从所述第二聊天消息中获取所述插入位置、所述链接信息和所述过滤后的普通聊天内容;An obtaining module, configured to obtain the insertion position, the link information and the filtered general chat content from the second chat message;

显示模块,用于根据所述插入位置将所述链接信息插入至所述过滤后的普通聊天内容中进行显示;A display module, configured to insert the link information into the filtered general chat content according to the insertion position for display;

其中,互相独立的所述普通聊天内容和所述功能链接内容是所述服务器从接收到的第一聊天消息中得到的,所述功能链接内容包括插入位置和链接信息,所述链接信息用于触发除所述聊天功能之外的其它功能。Wherein, the independent common chat content and the function link content are obtained by the server from the received first chat message, and the function link content includes insertion position and link information, and the link information is used for Trigger functions other than the chat function.

根据本公开实施例的另一方面,提供了一种服务器,所述服务器包括:处理器和存储器;According to another aspect of an embodiment of the present disclosure, a server is provided, and the server includes: a processor and a memory;

所述存储器存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上述方面中由服务器执行的聊天消息的过滤方法。The memory stores at least one instruction, at least one section of program, code set or instruction set, and the at least one instruction, the at least one section of program, the code set or instruction set are loaded and executed by the processor to realize the above-mentioned Method for filtering chat messages performed by the server in an aspect.

根据本公开实施例的另一方面,提供了一种终端,所述终端包括:处理器和存储器;According to another aspect of the embodiments of the present disclosure, a terminal is provided, and the terminal includes: a processor and a memory;

所述存储器存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上述方面中由终端执行的聊天消息的过滤方法。The memory stores at least one instruction, at least one section of program, code set or instruction set, and the at least one instruction, the at least one section of program, the code set or instruction set are loaded and executed by the processor to realize the above-mentioned A filtering method for chat messages performed by the terminal in the aspect.

根据本公开实施例的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上任一方面所述的聊天消息的过滤方法。According to another aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, the computer-readable storage medium stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, all The at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for filtering chat messages as described in any aspect above.

本申请实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solutions provided by the embodiments of the present application at least include:

通过由客户端生成互相独立的普通聊天内容和功能链接内容,在功能链接内容中设置有用于表示功能链接内容在聊天消息中的插入位置,和用于表示功能链接内容功能的链接信息;终端将聊天消息发送至服务器后,服务器只对普通聊天内容进行敏感词过滤操作,并将过滤后的普通聊天内容和功能链接内容发送给其它终端,从而使得服务器只对普通聊天内容进行敏感词过滤,不对功能链接内容进行敏感词过滤,从而避免了普通聊天内容和功能链接内容单独都不会触发敏感词的过滤机制,但是混合排列到一起时就有可能组成敏感词,导致聊天消息被误过滤的问题。By generating mutually independent ordinary chat content and function link content by the client, the function link content is provided with information indicating the insertion position of the function link content in the chat message and link information indicating the function of the function link content; the terminal will After the chat message is sent to the server, the server only filters the sensitive words of the common chat content, and sends the filtered common chat content and function link content to other terminals, so that the server only filters the sensitive words of the common chat content, and does not Sensitive words are filtered for function link content, so as to avoid the filtering mechanism that ordinary chat content and function link content will not trigger sensitive words alone, but when mixed and arranged together, sensitive words may be formed, resulting in chat messages being filtered by mistake .

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.

图1是本申请一个示例性实施例提供的聊天消息的过滤方法的原理示意图;FIG. 1 is a schematic diagram of the principle of a chat message filtering method provided by an exemplary embodiment of the present application;

图2是本申请一个示例性实施例提供的聊天系统的结构框图;Fig. 2 is a structural block diagram of a chat system provided by an exemplary embodiment of the present application;

图3是本申请一个示例性实施例提供的聊天消息的过滤方法的流程图;Fig. 3 is the flow chart of the filtering method of chat message provided by an exemplary embodiment of the present application;

图4是本申请一个示例性实施例提供的聊天消息的过滤方法的流程图;Fig. 4 is the flow chart of the filtering method of the chat message that an exemplary embodiment of the present application provides;

图5是本申请一个示例性实施例提供的聊天消息的过滤方法的流程图;FIG. 5 is a flowchart of a method for filtering chat messages provided by an exemplary embodiment of the present application;

图6是本申请一个示例性实施例提供的用户界面的界面示意图;FIG. 6 is a schematic diagram of a user interface provided by an exemplary embodiment of the present application;

图7是本申请一个示例性实施例提供的用户界面的界面示意图;FIG. 7 is a schematic diagram of a user interface provided by an exemplary embodiment of the present application;

图8是本申请一个示例性实施例提供的聊天消息的过滤方法的流程图;FIG. 8 is a flow chart of a chat message filtering method provided by an exemplary embodiment of the present application;

图9是本申请一个示例性实施例提供的定长存储区的示意图;Fig. 9 is a schematic diagram of a fixed-length storage area provided by an exemplary embodiment of the present application;

图10是本申请一个示例性实施例提供的聊天消息的过滤装置的框图;Fig. 10 is a block diagram of an apparatus for filtering chat messages provided by an exemplary embodiment of the present application;

图11是本申请一个示例性实施例提供的聊天消息的过滤装置的框图;Fig. 11 is a block diagram of an apparatus for filtering chat messages provided by an exemplary embodiment of the present application;

图12是本申请一个示例性实施例提供的终端的框图;Fig. 12 is a block diagram of a terminal provided by an exemplary embodiment of the present application;

图13是本申请一个示例性实施例提供的服务器的框图。Fig. 13 is a block diagram of a server provided by an exemplary embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solution and advantages of the present application clearer, the implementation manners of the present application will be further described in detail below in conjunction with the accompanying drawings.

请参考图1,其示出了本申请一示例性实施例提供的聊天消息的过滤方法的示意图。该过滤方法中包括发送方终端11、接收方终端12和服务器13。该服务器13可以是网络游戏服务器,发送方终端11和接收方终端12上运行有网游客户端。Please refer to FIG. 1 , which shows a schematic diagram of a method for filtering chat messages provided by an exemplary embodiment of the present application. The filtering method includes a sender terminal 11 , a receiver terminal 12 and a server 13 . The server 13 may be an online game server, and an online game client runs on the sender terminal 11 and the receiver terminal 12 .

发送方终端11用于编辑和发送聊天消息,聊天消息中包括普通聊天内容和功能链接内容中的至少一种。本实施例以该聊天消息同时包括普通聊天内容和功能链接内容为例,普通聊天内容由用户手动输入,功能链接内容由发送方终端11中的网游客户端根据用户操作自动生成,该功能链接内容用于触发除聊天功能之外的其它功能,为不可编辑内容。The sender terminal 11 is used for editing and sending chat messages, and the chat messages include at least one of common chat content and function link content. In this embodiment, the chat message includes common chat content and function link content as an example. The normal chat content is manually input by the user, and the function link content is automatically generated by the online game client in the sender terminal 11 according to user operations. The function link content It is used to trigger functions other than the chat function and cannot be edited.

示意性的,用户输入带有敏感词“萌新萌新”的普通聊天内容和功能链接内容,发送方终端11将聊天消息自动分为互相独立的两类:szcontent{普通聊天内容}和szLinkinfo{功能链接内容},并将聊天消息发送至服务器13。其中,功能链接内容中的“1”代表位置分享功能,“6”代表插入位置是普通聊天内容中的第六个字符之后,“坐标信息”代表待分享的位置坐标。Schematically, the user inputs common chat content and functional link content with the sensitive word "吉新萌新", and the sender terminal 11 automatically divides the chat messages into two independent categories: szcontent{common chat content} and szLinkinfo{ function link content}, and send the chat message to the server 13. Among them, "1" in the function link content represents the location sharing function, "6" represents the insertion position after the sixth character in the ordinary chat content, and "coordinate information" represents the location coordinates to be shared.

服务器13接收到聊天消息后识别两种信息类型,并只对普通聊天内容进行过滤,将敏感词“萌新”替换成“xx”或“**”等字符发送至接收终端12。After the server 13 receives the chat message, it recognizes the two types of information, and only filters the common chat content, and replaces the sensitive word "Mengxin" with characters such as "xx" or "**" and sends it to the receiving terminal 12.

接收客户端12收到内容后将过滤后的聊天消息显示出来,最终呈现出“xx”或“**”字符替换敏感词后的信息内容。After receiving the content, the receiving client 12 displays the filtered chat message, and finally presents the information content after sensitive words are replaced by "xx" or "**" characters.

请参考图2,其示出了本申请各个实施例所涉及的一种聊天系统的结构示意图。该聊天系统包括客户端120、接入层130、服务器140和数据库150。Please refer to FIG. 2 , which shows a schematic structural diagram of a chat system involved in various embodiments of the present application. The chat system includes a client 120 , an access layer 130 , a server 140 and a database 150 .

客户端120是具有聊天功能的应用程序,客户端120运行在终端上。该终端可以是手机、平板电脑、膝上型便携计算机和台式计算机等等。The client 120 is an application program with a chat function, and the client 120 runs on the terminal. The terminal may be a mobile phone, a tablet computer, a laptop computer, a desktop computer, and the like.

客户端120与接入层130之间可以通过无线网络或者有线网络相连。The client 120 and the access layer 130 may be connected through a wireless network or a wired network.

接入层130是连接客户端120和服务器140之间的枢纽。The access layer 130 is the hub connecting the client 120 and the server 140 .

服务器140可以是一台服务器,或者由若干台服务器组成的服务器集群,或者是一个云计算服务中心。服务器140可以是网络游戏的后台服务器,直播平台的后台服务器,短视频分享平台的后台服务器等。The server 140 may be one server, or a server cluster composed of several servers, or a cloud computing service center. The server 140 may be a background server of an online game, a background server of a live broadcast platform, a background server of a short video sharing platform, and the like.

数据库150与服务器140之间可以通过无线网络或者有线网络相连,用于存储聊天内容。The database 150 and the server 140 can be connected through a wireless network or a wired network for storing chat content.

请参考图3,其示出了本申请一个实施例提供的聊天消息的过滤方法的流程图,本实施例以该聊天消息的过滤方法应用于图1所示聊天系统中来举例说明。该聊天消息的过滤方法可以包括如下几个步骤:Please refer to FIG. 3 , which shows a flow chart of a method for filtering chat messages provided by an embodiment of the present application. This embodiment is illustrated by using the method for filtering chat messages in the chat system shown in FIG. 1 . The filtering method of the chat message may include the following steps:

步骤101,客户端根据用户操作发送第一聊天消息。Step 101, the client sends a first chat message according to a user operation.

步骤102,服务器接收客户端发送的第一聊天消息,第一聊天消息包括互相独立的普通聊天内容和功能链接内容。Step 102, the server receives the first chat message sent by the client, and the first chat message includes common chat content and function link content which are independent of each other.

可选地,互相独立的普通聊天内容和功能链接内容包括:采用第一数据格式表示的普通聊天内容,以及采用第二数据格式表示的功能链接内容。第一数据格式和第二数据格式是不同的两个数据格式。Optionally, the independent common chat content and function link content include: common chat content expressed in the first data format, and function link content expressed in the second data format. The first data format and the second data format are two different data formats.

普通聊天内容是由文本、符号、表情、图片、音频以及视频中的至少一种聊天元素所组成的内容。Common chat content is content composed of at least one chat element in text, symbols, emoticons, pictures, audio and video.

功能链接内容包括插入位置和链接信息。插入位置用于表示链接信息插入至普通聊天内容时的位置,链接信息用于触发除聊天功能之外的其它功能。Function link content includes insertion position and link information. The insertion position is used to indicate the position when the link information is inserted into the common chat content, and the link information is used to trigger other functions except the chat function.

可选地,其它功能的功能类型包括但不限于:位置、组队、道具和红包中的至少一种。Optionally, the function types of other functions include but not limited to: at least one of location, team formation, props and red envelopes.

步骤103,服务器对普通聊天内容进行敏感词过滤得到过滤后的普通聊天内容。In step 103, the server filters sensitive words on the common chat content to obtain filtered common chat content.

由于普通聊天内容和功能链接内容互相独立,因此,服务器可以对普通聊天内容进行敏感词过滤,而不对功能链接内容进行过滤。Since common chat content and functional link content are independent of each other, the server can filter sensitive words on common chat content but not functional link content.

步骤104,服务器根据过滤后的普通聊天内容和功能链接内容得到第二聊天消息。Step 104, the server obtains the second chat message according to the filtered common chat content and function link content.

步骤105,服务器将第二聊天消息发送给客户端。Step 105, the server sends the second chat message to the client.

步骤106,客户端接收服务器发送的第二聊天消息,从第二聊天消息中获取插入位置、链接信息和过滤后的普通聊天内容;根据插入位置将链接信息插入至过滤后的普通聊天内容中进行显示。Step 106, the client receives the second chat message sent by the server, obtains the insertion position, link information and filtered common chat content from the second chat message; inserts the link information into the filtered common chat content according to the insertion position and performs show.

综上所述,本实施例提供的方法,通过由客户端生成互相独立的普通聊天内容和功能链接内容,在功能链接内容中设置有用于表示功能链接内容在聊天消息中的插入位置,和用于表示功能链接内容功能的链接信息;终端将聊天消息发送至服务器后,服务器只对普通聊天内容进行敏感词过滤操作,并将过滤后的普通聊天内容和功能链接内容发送给其它终端,从而使得服务器只对普通聊天内容进行敏感词过滤,不对功能链接内容进行敏感词过滤,从而避免了普通聊天内容和功能链接内容单独都不会触发敏感词的过滤机制,但是混合排列到一起时就有可能组成敏感词,导致聊天消息被误过滤的问题。To sum up, in the method provided by this embodiment, the client generates the common chat content and the function link content which are independent of each other, the function link content is set to indicate the insertion position of the function link content in the chat message, and the It is the link information indicating the function link content function; after the terminal sends the chat message to the server, the server only performs sensitive word filtering operation on the common chat content, and sends the filtered common chat content and function link content to other terminals, so that The server only filters sensitive words for common chat content, and does not filter sensitive words for functional link content, thus avoiding the filtering mechanism that ordinary chat content and functional link content will not trigger sensitive words alone, but it is possible when they are mixed together The formation of sensitive words may cause chat messages to be misfiltered.

请参考图4,其示出了本申请另一实施例提供的聊天消息的过滤方法的方法流程图,本实施例以该聊天消息的过滤方法应用于图1所示聊天系统中来举例说明。该聊天消息的过滤方法可以包括如下几个步骤:Please refer to FIG. 4 , which shows a flow chart of a method for filtering chat messages provided by another embodiment of the present application. This embodiment is illustrated by using the method for filtering chat messages in the chat system shown in FIG. 1 . The filtering method of the chat message may include the following steps:

步骤201,客户端根据用户操作发送第一聊天消息。Step 201, the client sends a first chat message according to a user operation.

第一聊天消息包括互相独立的普通聊天内容和功能链接内容。The first chat message includes common chat content and function link content that are independent of each other.

客户端在输入聊天消息时,自动将聊天消息分为普通聊天内容和功能链接内容,其中,普通聊天内容用数据格式“szContent”表示,功能链接内容用数据格式“stlinkinfo”表示。When the client enters a chat message, it automatically divides the chat message into common chat content and functional link content, wherein the common chat content is expressed in the data format "szContent", and the functional link content is expressed in the data format "stlinkinfo".

表1Table 1

Figure GDA0003962325270000071
Figure GDA0003962325270000071

可选地,普通聊天内容是用户手动或语音编辑输入的内容,形式包括文字、数字、符号、表情、图片、音频、视频中的任意一种或几种。Optionally, the common chat content is the content input manually or by voice editing by the user, and the form includes any one or more of words, numbers, symbols, emoticons, pictures, audio, and video.

可选地,功能链接内容是采用目标数据格式进行表示,具有指定功能的内容。其中,目标数据格式包括:链接功能类型、插入位置和链接信息。链接功能类型用于指示链接信息所触发的功能类型;插入位置用于表示链接信息插入过滤后的普通聊天内容中的插入位置;链接信息用于携带其它功能的参数信息。Optionally, the functional link content is expressed in a target data format and has a specified function. Wherein, the target data format includes: link function type, insertion position and link information. The link function type is used to indicate the function type triggered by the link information; the insertion position is used to indicate the insertion position of the link information inserted into the filtered general chat content; the link information is used to carry parameter information of other functions.

步骤202,接收客户端发送的第一聊天消息,第一聊天消息包括互相独立的普通聊天内容和功能链接内容,功能链接内容包括插入位置和链接信息,链接信息用于触发除聊天功能之外的其它功能。Step 202, receiving the first chat message sent by the client, the first chat message includes common chat content and function link content independent of each other, the function link content includes insertion position and link information, and the link information is used to trigger chat functions other than the chat function other functions.

其中,插入位置(Pos)用于表示链接信息插入普通聊天内容(过滤后的普通聊天内容)中的插入位置。在一个可选的实施方式中,插入位置采用数字表示链接所在的普通聊天内容中的位置,例如,当插入位置为“3”时,表示功能链接内容前方有三个字符,即该功能链接内容插入的位置是普通聊天内容中的第三个字符的后面。Wherein, the insertion position (Pos) is used to indicate the insertion position where the link information is inserted into the ordinary chat content (filtered ordinary chat content). In an optional implementation, the insertion position uses a number to indicate the position in the normal chat content where the link is located. For example, when the insertion position is "3", it means that there are three characters in front of the function link content, that is, the function link content is inserted The position of is after the third character in the normal chat content.

链接信息(LinkInfo)用于携带其它功能的参数信息,如下表2所示。Link information (LinkInfo) is used to carry parameter information of other functions, as shown in Table 2 below.

表2Table 2

Figure GDA0003962325270000081
Figure GDA0003962325270000081

可选地,功能链接内容还包括链接功能类型。继续参阅表2,链接功能类型(ilinkinfo)用于指示链接信息所触发的功能类型,示意性的,功能类型可以包括位置、组队、道具和红包中的至少一项。Optionally, the function link content further includes a link function type. Continuing to refer to Table 2, the link function type (ilinkinfo) is used to indicate the function type triggered by the link information. Schematically, the function type may include at least one of position, team formation, prop and red envelope.

可选地,目标数据格式是JSON格式,链接功能类型、插入位置和链接信息采用JSON格式中的不同字段表示。Optionally, the target data format is JSON format, and the link function type, insertion position and link information are represented by different fields in the JSON format.

当链接功能类型用于指示位置时,根据链接信息启用寻路功能和传送功能中的至少一项。当链接功能类型用于指示组队时,根据链接信息启用多人组队功能;当链接功能类型用于指示道具时,根据链接信息启用道具交易功能和道具租赁功能中的至少一项;当链接功能类型用于指示红包时,根据链接信息启用虚拟资源包分发功能。When the link function type is used to indicate the location, at least one of a wayfinding function and a transfer function is enabled according to the link information. When the link function type is used to indicate team formation, the multi-person team function is enabled according to the link information; when the link function type is used to indicate props, at least one of the prop transaction function and prop rental function is enabled according to the link information; when the link When the function type is used to indicate a red envelope, the virtual resource pack distribution function is enabled according to the link information.

可选地,上述其它功能也可以由终端来执行,或者由用户在终端上触发后再执行。Optionally, the above other functions may also be executed by the terminal, or executed after being triggered by the user on the terminal.

步骤203,服务器对普通聊天内容进行敏感词过滤,得到过滤后的普通聊天内容。Step 203, the server filters the sensitive words of the common chat content to obtain the filtered common chat content.

服务器接收到第一聊天消息后,根据“szContent”和“stlinkinfo”区分第一聊天消息中的普通聊天内容和功能链接内容,服务器只对普通聊天内容进行敏感词的过滤操作,当普通聊天内容中包括敏感词时,服务器将敏感词替换成“xx”或“**”,例如,当普通聊天内容是“萌新,我在这里等你”,其中的“萌新”为敏感词,服务器将“萌新”过滤,得到过滤后的普通聊天内容,为:“xx,我在这里等你”,或“**,我在这里等你”。若普通聊天内容中不包含敏感词,则不执行过滤操作,得到过滤后的普通聊天内容与原普通聊天内容相同。After receiving the first chat message, the server distinguishes the normal chat content and function link content in the first chat message according to "szContent" and "stlinkinfo". The server only filters sensitive words for common chat content. When including sensitive words, the server will replace the sensitive words with "xx" or "**". "Mengxin" is filtered to obtain the filtered general chat content, which is: "xx, I am waiting for you here", or "**, I am waiting for you here". If the ordinary chat content does not contain sensitive words, no filtering operation is performed, and the filtered ordinary chat content is the same as the original ordinary chat content.

步骤204,服务器根据过滤后的普通聊天内容和功能链接内容得到第二聊天消息。Step 204, the server obtains the second chat message according to the filtered common chat content and function link content.

第二聊天消息包括:过滤后的普通聊天内容和没有经过过滤处理的功能链接内容。若普通聊天内容不包含敏感词,则过滤后的普通聊天内容与原普通聊天内容相同,也即,若普通聊天内容不包含敏感词,则第二聊天消息与第一聊天消息内容相同。The second chat message includes: filtered common chat content and unfiltered function link content. If the ordinary chat content does not contain sensitive words, the filtered ordinary chat content is the same as the original ordinary chat content, that is, if the ordinary chat content does not contain sensitive words, the second chat message is the same as the first chat message.

步骤205,服务器将第二聊天消息发送给客户端。Step 205, the server sends the second chat message to the client.

服务器将第二聊天消息以普通聊天内容和功能链接内容的形式发送至客户端,该客户端可以位于接收方终端或者发送方终端。The server sends the second chat message to the client in the form of common chat content and function link content, and the client can be located at the receiving terminal or the sending terminal.

例如,当聊天消息是普通聊天内容时,服务器将聊天消息发送给接收方终端的同时向发送方终端反馈信息,用于在发送方终端上呈现全部的对话内容。For example, when the chat message is common chat content, the server sends the chat message to the receiver terminal and at the same time feeds back information to the sender terminal, so as to present all the conversation content on the sender terminal.

步骤206,客户端在收到第二聊天消息后,从第二聊天消息中获取插入位置、链接信息和过滤后的普通聊天内容。Step 206, after receiving the second chat message, the client obtains the insertion position, link information and filtered common chat content from the second chat message.

客户端接收服务器发送的第二聊天消息中包括:过滤后的普通聊天内容和功能链接内容。The second chat message sent by the server to the client includes: filtered common chat content and function link content.

由于服务器未对第一聊天消息中的功能链接内容做过滤操作,因此功能链接内容中的信息未发生改变,仍然是第一聊天消息中的链接功能类型、插入位置和链接信息。Since the server does not filter the content of the function link in the first chat message, the information in the content of the function link remains unchanged, and remains the link function type, insertion position and link information in the first chat message.

步骤207,客户端获取与链接功能类型对应的功能图标;根据插入位置将功能图标插入至过滤后的普通聊天内容中进行显示,功能图标指向链接信息。Step 207, the client obtains the function icon corresponding to the link function type; inserts the function icon into the filtered general chat content for display according to the insertion position, and the function icon points to the link information.

步骤208,客户端从第二聊天消息中获取链接功能类型。In step 208, the client acquires the link function type from the second chat message.

客户端接收到第二聊天消息后,得到过滤后的普通聊天内容和功能链接内容,客户端根据功能链接内容中的链接功能类型确定功能链接内容在客户端上显示的图标,示例性的,当链接功能类型是位置相关的坐标数据时,图标采用在地图上常用于表示定位的图标,且功能图标指向链接信息。After the client receives the second chat message, it obtains the filtered general chat content and function link content, and the client determines the icon displayed on the client for the function link content according to the link function type in the function link content. For example, when When the link function type is position-related coordinate data, the icon is an icon commonly used to indicate location on a map, and the function icon points to the link information.

客户端根据插入位置将表示功能链接类型的图标插入在普通聊天内容中进行显示,示意性的,插入位置是“3”时,指向链接信息的图标插入在普通聊天内容的第三个字符的后面。The client inserts the icon indicating the type of function link into the normal chat content for display according to the insertion position. For example, when the insertion position is "3", the icon pointing to the link information is inserted behind the third character of the normal chat content .

步骤209,客户端接收对链接信息的触发操作。Step 209, the client receives a trigger operation on the link information.

客户端具有点击功能链接内容以触发链接信息中的功能。The client has the ability to click on the function link content to trigger the function in the link information.

当链接信息对应的功能类型是位置时,若用户点击功能链接内容所对应的图标,客户端根据链接信息启用寻路功能和传送功能中的至少一项。以链接信息内容为寻路信息为例,接收方终端解析并得到链接信息中的位置坐标后,用户终端根据位置坐标生成寻路指令,起始点为游戏用户操纵的游戏角色当前所处的寻路点,终点为链接信息中的位置坐标。地图划分为网格化的寻路点,一个寻路点为一个网格,所有地图场景包括地面、森林等填充在寻路点中。When the function type corresponding to the link information is location, if the user clicks the icon corresponding to the content of the function link, the client enables at least one of the pathfinding function and the transmission function according to the link information. Taking the content of the link information as the pathfinding information as an example, after the receiving terminal parses and obtains the location coordinates in the link information, the user terminal generates a pathfinding instruction according to the location coordinates, and the starting point is the pathfinding location where the game character manipulated by the game user is currently located. point, the end point is the location coordinates in the link information. The map is divided into gridded wayfinding points, one wayfinding point is a grid, and all map scenes, including ground and forest, are filled in wayfinding points.

其中,搜索直达路径的方式可以是通过A星算法实现,A星算法属于本领域普通技术人员的公知常识,此处不再赘述。Wherein, the manner of searching for the direct route may be implemented by the A-star algorithm, and the A-star algorithm belongs to the common knowledge of those skilled in the art, and will not be repeated here.

可选地,当链接信息对应的功能类型是组队时,点击功能链接内容所对应的图标,客户端根据链接信息向服务器请求多人组队功能。Optionally, when the function type corresponding to the link information is team formation, click the icon corresponding to the content of the function link, and the client requests the server for a multi-person team formation function according to the link information.

示意性的,本实施例提供一种网络游戏的组队方法,该方法由服务器完成,该方法包括如下步骤:Schematically, this embodiment provides a method for forming a team in an online game, the method is completed by a server, and the method includes the following steps:

S31、查询玩家的属性信息;S31. Query the attribute information of the player;

上述属性信息可以包括:玩家角色唯一标识、玩家等级、玩家职业、当前场景、登录城市中的至少一种。The above attribute information may include: at least one of player character unique identifier, player level, player occupation, current scene, and login city.

S32、将相同属性信息的玩家组队;S32. Teaming up players with the same attribute information;

实现S32的方法具体可以为:如属性信息为登录城市,则根据玩家登录的IP地址确定该IP地址对应的城市,将相同登录城市的玩家组队。如属性信息为玩家等级,将相同等级的玩家组队。当然还可以将等级相差悬殊度在等级阈值内的玩家组队。其中,等级相差悬殊度可采用队中等级最高的玩家与等级最低玩家的等级差值进行表示。The method for implementing S32 may specifically be as follows: if the attribute information is the login city, then determine the city corresponding to the IP address according to the player's login IP address, and form a team with players in the same login city. If the attribute information is player level, players of the same level are teamed up. Of course, it is also possible to form a team with players whose levels differ greatly within the level threshold. Wherein, the level disparity can be represented by the level difference between the player with the highest level and the player with the lowest level in the team.

S33、将队中贡献度最高的玩家任命为队长。S33. Appointing the player with the highest contribution in the team as the captain.

可选地,当链接信息对应的功能类型是道具时,点击功能链接内容所对应的图标,客户端根据链接信息向服务器请求启用道具交易功能和道具租赁功能中的至少一项;本实施例以启用道具交易功能为例,该交易包括以下步骤:Optionally, when the function type corresponding to the link information is an item, click the icon corresponding to the content of the function link, and the client requests the server to enable at least one of the item transaction function and the item rental function according to the link information; Take the item trading function as an example, the transaction includes the following steps:

步骤41,发送方终端生成一带有道具标识的接收链接。Step 41, the sender terminal generates a receiving link with the item identifier.

该道具链接中包括虚拟货币支付的链接,用于使接收方终端通过支付链接支付虚拟货币。The item link includes a virtual currency payment link, which is used to make the receiver terminal pay the virtual currency through the payment link.

步骤42,发送方终端将接收链接封装成群组消息。Step 42, the sender terminal encapsulates the received link into a group message.

该群组消息包括接收方标识和支付链接,并将该消息发送至服务器。The group message includes the recipient ID and the payment link, and the message is sent to the server.

步骤43,服务器根据接收方标识确定接收方终端,将带有支付链接的群组消息发送至接收方终端。Step 43, the server determines the recipient terminal according to the recipient identifier, and sends the group message with the payment link to the recipient terminal.

步骤44,接收方终端接根据功能类型确定道具详情,根据支付链接确定支付金额,接收方终端在支付链接内支付成功后,服务器将道具发送至接收方终端(买家),将接收方终端(买家)支付的虚拟货币发送至发送方终端(卖家)。Step 44, the recipient terminal determines the item details according to the function type, and determines the payment amount according to the payment link. After the recipient terminal successfully pays in the payment link, the server sends the item to the recipient terminal (buyer), and the recipient terminal ( The virtual currency paid by the buyer) is sent to the sender terminal (seller).

可选地,当链接信息对应的功能类型是红包时,根据链接信息向服务器请求启用虚拟资源包领取功能。示意性的,发送红包的操作可以包括以下步骤:Optionally, when the function type corresponding to the link information is a red envelope, request the server to enable the virtual resource package collection function according to the link information. Schematically, the operation of sending a red envelope may include the following steps:

步骤51,发送方终端生成一携带有“红包”标识的接收链接。Step 51, the sender terminal generates a receiving link carrying the "red packet" logo.

步骤52,发送方终端将接收链接封装成群组消息。Step 52, the sender terminal encapsulates the received link into a group message.

步骤53,发送方终端将群组消息以及至少一个接收方标识发送给基础服务器。Step 53, the sender terminal sends the group message and at least one receiver identifier to the basic server.

对应地,基础服务器接收发送方终端发送的群组消息以及至少一个接收方标识。Correspondingly, the basic server receives the group message sent by the sender terminal and at least one receiver identifier.

步骤54,基础服务器根据接收方标识将群组消息发送给至少一个接收方终端。Step 54, the basic server sends the group message to at least one recipient terminal according to the recipient identifier.

对应地,接收方终端接收基础服务器根据接收方标识发送的群组消息。Correspondingly, the recipient terminal receives the group message sent by the basic server according to the recipient identifier.

步骤55,基础服务器向发放服务器发送链接关联信息,链接关联信息包括“红包”标识、发送方标识以及各个接收方标识。In step 55, the basic server sends link association information to the issuing server, and the link association information includes the "red envelope" identifier, the sender identifier, and each receiver identifier.

对应地,发放服务器接收并存储基础服务器发送的链接关联信息。Correspondingly, the distribution server receives and stores the link association information sent by the basic server.

其中,上述步骤42、步骤52、步骤54中的群组消息均可以采用上述方法实施例中提供的消息格式进行发送和过滤。Wherein, the group messages in the above step 42, step 52, and step 54 can all be sent and filtered using the message format provided in the above method embodiment.

综上所述,本实施例提供的方法,通过由客户端生成互相独立的普通聊天内容和功能链接内容,在功能链接内容中设置有用于表示功能链接内容在聊天消息中的插入位置,和用于表示功能链接内容功能的链接信息;终端将聊天消息发送至服务器后,服务器只对普通聊天内容进行敏感词过滤操作,并将过滤后的普通聊天内容和功能链接内容发送给其它终端,从而使得服务器只对普通聊天内容进行敏感词过滤,不对功能链接内容进行敏感词过滤,从而避免了普通聊天内容和功能链接内容单独都不会触发敏感词的过滤机制,但是混合排列到一起时就有可能组成敏感词,导致聊天消息被误过滤的问题。To sum up, in the method provided by this embodiment, the client generates the common chat content and the function link content which are independent of each other, the function link content is set to indicate the insertion position of the function link content in the chat message, and the It is the link information indicating the function link content function; after the terminal sends the chat message to the server, the server only performs sensitive word filtering operation on the common chat content, and sends the filtered common chat content and function link content to other terminals, so that The server only filters sensitive words for common chat content, and does not filter sensitive words for functional link content, thus avoiding the filtering mechanism that ordinary chat content and functional link content will not trigger sensitive words alone, but it is possible when they are mixed together The formation of sensitive words may cause chat messages to be misfiltered.

同时,由于功能链接内容中包括插入位置和链接功能类型,服务器普通聊天内容和功能链接内容一同发送至客户端内,客户端根据链接功能类型确定功能链接内容所对应的图标,根据插入位置确定功能链接内容插入普通聊天内容的位置,有助于准确还原聊天内容。At the same time, since the function link content includes the insertion position and link function type, the server sends the normal chat content and the function link content to the client together, and the client determines the icon corresponding to the function link content according to the link function type, and determines the function according to the insertion position. The link content is inserted into the position of the ordinary chat content, which helps to restore the chat content accurately.

可选地,本方案采用循环队列的存储方式,能有效解决数据库存储负担过大的问题,只存储近期的聊天消息,在对用户体验影响不大的情况下有效缓解了数据库负担过大的问题。Optionally, this solution adopts the circular queue storage method, which can effectively solve the problem of excessive database storage burden. Only recent chat messages are stored, which effectively alleviates the problem of excessive database burden with little impact on user experience. .

请参考图5,其示出了本申请另一实施例提供的聊天消息的过滤方法的流程图,本实施例以该聊天消息的过滤方法应用于图1所示的聊天系统,且该聊天系统是网络游戏中的聊天系统来举例说明。该方法可以包括如下几个步骤:Please refer to FIG. 5 , which shows a flowchart of a method for filtering chat messages provided by another embodiment of the present application. In this embodiment, the method for filtering chat messages is applied to the chat system shown in FIG. 1 , and the chat system Take the chat system in an online game as an example. The method may include the following steps:

步骤301,玩家输入聊天内容。Step 301, the player inputs chat content.

聊天消息包括szContent(普通聊天内容)和szLinkInfo(功能链接内容),普通聊天内容为用户输入内容,内容形式可以是文字、数字、符号、语音等任意一种或几种;The chat message includes szContent (common chat content) and szLinkInfo (function link content). The common chat content is the content input by the user, and the content form can be any one or more of text, number, symbol, voice, etc.;

功能链接内容是承载相关功能的链接,结合图6和图7,点击对话框中的“+”,显示多种链接信息类型。示意性的,链接信息包括表情、历史、坐标、红包、道具中的至少一种。The function link content is the link carrying the relevant function. Combining Figure 6 and Figure 7, click "+" in the dialog box to display various types of link information. Schematically, the link information includes at least one of emoticons, history, coordinates, red envelopes, and props.

功能链接内容的组成至少包括以下三部分:The composition of the function link content includes at least the following three parts:

链接功能类型(LinkType),用于指示链接信息所触发的功能类型,例如该链接是地点、团队、红包或道具等。接收方接收到该链接信息时,根据链接类型执行相关操作;Link function type (LinkType), used to indicate the function type triggered by the link information, for example, the link is a place, team, red envelope or prop, etc. When the receiver receives the link information, it performs related operations according to the link type;

插入位置(Pos),用于表示链接信息插入过滤后的普通聊天内容中的插入位置,以达到混排的效果。Pos通过数字标识链接所在的该信息中的位置,当Pos为“3”时,表示Pos前方有三个字符,即该链接插入的位置是第三个字符的后面。The insertion position (Pos) is used to indicate the insertion position of the link information inserted into the filtered common chat content, so as to achieve the effect of shuffling. Pos identifies the position in the information of the link by a number. When Pos is "3", it means that there are three characters in front of Pos, that is, the position where the link is inserted is behind the third character.

链接信息(LinkInfo),用于携带其它功能的参数信息。Link information (LinkInfo), used to carry parameter information of other functions.

可选地,该链接中的信息内容采用特殊字符分割包围,也即,用于包围信息内容的特殊字符即为信息内容的识别符,该识别符可自定义设置,例如可以是“{}”、“[]”或“<>”等形式。Optionally, the information content in the link is separated and surrounded by special characters, that is, the special characters used to surround the information content are the identifiers of the information content, and the identifier can be customized, for example, it can be "{}" , "[]" or "<>" and other forms.

信息内容可以包括位置坐标、红包金额等相关数据。The information content may include relevant data such as location coordinates and red envelope amount.

示意性的,当输入的普通聊天内容为“我在这里战斗”,功能链接内容的表现形式为“A”,链接类型为位置,Pos为“4”时,接收方终端和发送方终端界面呈现出的状态为:“我在这里A战斗”。Schematically, when the input ordinary chat content is "I am fighting here", the expression form of the function link content is "A", the link type is position, and the Pos is "4", the interface between the receiver terminal and the sender terminal is presented The output status is: "I am here to fight A".

步骤302,客户端解析成普通聊天内容和功能链接内容。In step 302, the client parses it into common chat content and function link content.

用户在输入的过程中,终端自动将信息分为普通聊天内容和功能链接内容两部分。其中,用户手动输入的内容为普通聊天内容,通过链接插入的内容为功能链接内容,终端将普通聊天内容和功能链接内容发送至服务器。During the user's input process, the terminal automatically divides the information into two parts: common chat content and function link content. Wherein, the content manually input by the user is the common chat content, and the content inserted through the link is the function link content, and the terminal sends the normal chat content and the function link content to the server.

步骤303,服务器过滤普通聊天内容。Step 303, the server filters common chat content.

服务器接收到聊天消息后,将聊天消息进行解析,分为普通聊天内容和功能链接内容两部分,服务器只对普通聊天内容做过滤操作,对功能链接内容不做过滤操作。After the server receives the chat message, it parses the chat message and divides it into two parts: common chat content and functional link content. The server only performs filtering operations on common chat content and does not perform filtering operations on functional link content.

步骤304,服务器解析功能链接内容,判断是否触发游戏功能。不需要则执行步骤305,需要则执行步骤306。Step 304, the server analyzes the content of the function link to determine whether to trigger the game function. If not required, perform step 305, and if necessary, perform step 306.

步骤305,存储缓存信息。Step 305, storing cached information.

服务器将聊天内容存储在数据库中。The server stores the chat content in a database.

可选地,存储采用循环队列的方式进行:采用一段定长的内存,实现一个定长的数组,采用指针的方式用新的聊天数据覆盖旧的聊天数据,以实现只存储最新的数据。如图9所示,该数据库采用循环队列的存储方式进行存储,该存储方式包括:将聊天消息依次存储至定长存储区中,定长存储区用于采用循环形式存储最近的N条聊天消息,N为正整数。当定长存储区存储满之后,新的聊天消息会覆盖最早的聊天消息,从而形成循环队列。Optionally, the storage is performed in the form of a circular queue: a fixed-length memory is used to implement a fixed-length array, and new chat data is used to overwrite the old chat data in the form of pointers, so as to store only the latest data. As shown in Figure 9, the database is stored in a circular queue storage method, which includes: sequentially storing chat messages in a fixed-length storage area, and the fixed-length storage area is used to store the latest N chat messages in a circular form , N is a positive integer. When the fixed-length storage area is full, new chat messages will overwrite the earliest chat messages, thus forming a circular queue.

步骤306,游戏功能处理。Step 306, game function processing.

服务器根据功能链接内容的类型和内容确定是否需要进行功能处理操作,例如,当功能链接内容是红包时,接收方终端领取红包后,服务器需执行与红包相关的功能操作,如反馈领取通知等。服务器执行完游戏功能处理操作后将聊天消息存储在数据库中。The server determines whether to perform function processing operations according to the type and content of the function link content. For example, when the function link content is a red envelope, after the recipient terminal receives the red envelope, the server needs to perform functional operations related to the red envelope, such as feedback receipt notification, etc. After the server executes the game function processing operation, the chat message is stored in the database.

可选地,功能处理操作在服务器或终端内进行,当功能复杂度较低,且不需要其他终端数据信息时,功能处理在终端内进行,例如寻路信息。当功能复杂度较高,或需要其他终端数据信息时,功能处理在服务器中进行,例如组建团队、发红包或装备交易等操作。Optionally, the function processing operation is performed in the server or the terminal. When the function complexity is low and other terminal data information is not needed, the function processing is performed in the terminal, such as pathfinding information. When the function complexity is high, or other terminal data information is required, the function processing is carried out in the server, such as forming a team, sending red envelopes or equipment transactions and other operations.

步骤307,将信息转换成客户端格式发送给客户端。Step 307, converting the information into the format of the client and sending it to the client.

服务器在发送给客户端之前先将信息内容从服务器语言转换成能在终端呈现的状态。即,依然包括普通聊天内容(szContent)和功能链接内容(szLinkInfo)两部分,其中的功能链接内容未做处理。The server converts the information content from the server language into a state that can be presented on the terminal before sending it to the client. That is, it still includes two parts: common chat content (szContent) and functional link content (szLinkInfo), and the functional link content is not processed.

客户端包括发送方终端和接收方终端,服务器发送至接收方终端的同时向发送方终端反馈信息,用于在发送方终端上呈现对话内容。当发送的内容是需要接收方终端领取或执行等操作的内容时,服务器在接收方终端领取或执行操作后向发送方终端发送反馈信息,提示发送方终端发送内容已被领取或执行。The client includes a sender's terminal and a receiver's terminal, and the server feeds back information to the sender's terminal while sending to the receiver's terminal, for presenting dialogue content on the sender's terminal. When the content to be sent needs to be received or executed by the receiver terminal, the server sends feedback information to the sender terminal after the receiver terminal receives or executes the operation, prompting the sender terminal that the sent content has been received or executed.

步骤308,客户端解析并显示。Step 308, the client parses and displays.

客服端在接收到服务器的内容时,得到过滤后的普通聊天内容和功能链接内容,客户端根据功能链接内容中的链接功能类型确定功能链接内容在客户端上显示的图标,示例性的,当链接功能类型是位置相关的坐标数据时,图标采用在地图上常用于表示定位的标识,且功能图标指向链接信息。客户端根据插入位置将表示功能链接类型的图标插入在普通聊天内容中进行显示,示意性的,插入位置是“4”时,指向链接信息的图标插入在普通聊天内容的第四个字符的后面。When the customer service end receives the content from the server, it obtains the filtered general chat content and function link content, and the client determines the icon displayed on the client for the function link content according to the link function type in the function link content. For example, when When the link function type is position-related coordinate data, the icon adopts the mark that is often used to represent the location on the map, and the function icon points to the link information. The client inserts the icon indicating the type of function link into the normal chat content for display according to the insertion position. For example, when the insertion position is "4", the icon pointing to the link information is inserted behind the fourth character of the normal chat content .

图8示出了本申请另一实施例提供的聊天消息的过滤方法的方法流程图,本实施例以该聊天消息的过滤方法应用于图1所示聊天系统中来举例说明。该方法可以包括如下几个步骤:FIG. 8 shows a flow chart of a chat message filtering method provided by another embodiment of the present application. This embodiment is illustrated by taking the chat message filtering method applied to the chat system shown in FIG. 1 as an example. The method may include the following steps:

步骤401,客户端接收服务器信息。Step 401, the client receives server information.

客户端接收服务器发送的第二聊天消息,第二聊天消息是服务器对普通聊天内容进行敏感词过滤后,根据功能链接内容和过滤后的普通聊天内容得到的。The client receives the second chat message sent by the server. The second chat message is obtained by the server after filtering the sensitive words of the common chat content according to the functional link content and the filtered common chat content.

可选地,功能链接内容采用目标数据格式进行表示,目标数据格式包括:插入位置和链接信息,其中,插入位置用于表示链接信息插入过滤后的普通聊天内容中的插入位置;链接信息用于携带其它功能的参数信息。Optionally, the content of the functional link is expressed in a target data format, and the target data format includes: insertion position and link information, wherein the insertion position is used to indicate the insertion position of the link information inserted into the filtered general chat content; the link information is used for Carry parameter information of other functions.

客户端从第二聊天消息中获取插入位置、链接信息和过滤后的普通聊天内容。The client obtains the insertion position, link information and filtered common chat content from the second chat message.

可选地,功能链接内容还包括链接功能类型,链接功能类型用于指示链接信息所触发的功能类型,功能类型包括:位置、组队、道具和红包中的至少一项。Optionally, the function link content further includes a link function type, the link function type is used to indicate the function type triggered by the link information, and the function type includes: at least one of position, team formation, prop and red envelope.

可选地,目标数据格式是JSON格式,链接功能类型、插入位置和链接信息采用JSON格式中的不同字段表示。Optionally, the target data format is JSON format, and the link function type, insertion position and link information are represented by different fields in the JSON format.

其中,互相独立的普通聊天内容和功能链接内容是服务器从接收到的第一聊天消息中得到的。Wherein, the mutually independent common chat content and function link content are obtained by the server from the received first chat message.

步骤402,客户端解析并显示。Step 402, the client parses and displays.

从第二聊天消息中获取链接功能类型,获取与链接功能类型对应的功能图标;Obtain the link function type from the second chat message, and obtain the function icon corresponding to the link function type;

客户端根据插入位置将链接信息插入至过滤后的普通聊天内容中进行显示,可选地,客户端根据插入位置将功能图标插入至过滤后的普通聊天内容中进行显示,功能图标指向所述链接信息。The client inserts the link information into the filtered general chat content for display according to the insertion position. Optionally, the client inserts a function icon into the filtered general chat content for display according to the insertion position, and the function icon points to the link information.

步骤403,用户点击功能链接内容,客户端解析功能链接内容。Step 403, the user clicks on the content of the function link, and the client parses the content of the function link.

客户端接收用户对链接信息的触发操作,当链接信息对应的功能类型是位置时,点击功能链接内容,客户端根据链接信息启用寻路功能和传送功能中的至少一项;当链接信息对应的功能类型是组队时,点击功能链接内容,客户端根据链接信息向服务器请求多人组队功能;当链接信息对应的功能类型是道具时,点击功能链接内容,客户端根据链接信息向服务器请求启用道具交易功能和道具租赁功能中的至少一项;当链接信息对应的功能类型是红包时,点击功能链接内容,客户端根据链接信息向服务器请求启用虚拟资源包领取功能。The client receives the user's trigger operation on the link information. When the function type corresponding to the link information is location, click on the content of the function link, and the client enables at least one of the pathfinding function and the transmission function according to the link information; when the link information corresponds to When the function type is teaming, click on the content of the function link, and the client will request the multiplayer teaming function from the server according to the link information; when the function type corresponding to the link information is props, click on the content of the function link, and the client will request to the server based on the link information Enable at least one of the item transaction function and the item leasing function; when the function type corresponding to the link information is a red envelope, click on the content of the function link, and the client requests the server to enable the virtual resource package collection function according to the link information.

上述功能与前述的图3和图4公开的内容相同,在此不再赘述。The above-mentioned functions are the same as those disclosed in the aforementioned FIG. 3 and FIG. 4 , and will not be repeated here.

步骤404,客户端判断是否需要触发功能。Step 404, the client terminal determines whether a trigger function is required.

客户端点击功能链接内容的图标时,客户端根据功能类型判断是否需要触发相关功能,若需要,则执行步骤405,若否执行步骤406,结束操作。When the client clicks the icon of the function link content, the client judges according to the function type whether to trigger the relevant function, if necessary, execute step 405, if not, execute step 406, and end the operation.

步骤405,显示功能页面。Step 405, displaying the function page.

若链接内容是需要触发功能时,客户显示相关功能页面,以功能链接内容为寻路信息为例。接收方终端解析并得到功能链接内容中的位置坐标后,接收方终端根据位置坐标生成寻路指令,起始点为游戏用户操纵的游戏角色当前所处的寻路点,终点为链接信息中的位置坐标。地图划分为网格化的寻路点,一个寻路点为一个网格,所有地图场景包括地面、森林等填充在寻路点中,用户根据生成的寻路线路到达目标位置。If the link content needs to trigger a function, the customer will display the relevant function page, taking the function link content as the wayfinding information as an example. After the receiving terminal parses and obtains the location coordinates in the function link content, the receiving terminal generates a pathfinding command based on the location coordinates. The starting point is the current pathfinding point of the game character manipulated by the game user, and the ending point is the location in the link information. coordinate. The map is divided into gridded wayfinding points. One wayfinding point is a grid. All map scenes, including the ground and forests, are filled in the wayfinding points. The user reaches the target location according to the generated wayfinding route.

可选地,搜索直达路径的方式可以是通过A星算法实现,A星算法属于本领域普通技术人员的公知常识,此处不再赘述。Optionally, the method of searching for the direct route may be realized through the A-star algorithm, and the A-star algorithm belongs to the common knowledge of those skilled in the art, and will not be repeated here.

综上所述,本实施例中的客户端接收到服务器发送的聊天消息后,根据功能链接内容中的链接功能类型获取功能类型,并确定使用的图标;根据插入位置确定链接信息插入过滤后的普通聊天内容中的位置;根据链接信息确定携带的参数信息,完整的还原服务器发送的聊天消息,简化了客户端还原聊天内容的执行步骤,减轻了客户端的执行负担。To sum up, after the client in this embodiment receives the chat message sent by the server, it obtains the function type according to the link function type in the function link content, and determines the icon to be used; determines the link information according to the insertion position and inserts the filtered The position in the ordinary chat content; determine the carried parameter information according to the link information, completely restore the chat message sent by the server, simplify the execution steps of the client to restore the chat content, and reduce the execution burden of the client.

下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

请参阅图10,其示出了本申请一实施例提供的聊天内容敏感词的过滤装置的示意图。装置700包括:Please refer to FIG. 10 , which shows a schematic diagram of an apparatus for filtering sensitive words in chat content provided by an embodiment of the present application. Apparatus 700 includes:

接收模块710,用于接收客户端发送的第一聊天消息,第一聊天消息包括互相独立的普通聊天内容和功能链接内容,功能链接内容包括插入位置和链接信息,链接信息用于触发除聊天功能之外的其它功能;The receiving module 710 is configured to receive the first chat message sent by the client, the first chat message includes common chat content and function link content independent of each other, the function link content includes insertion position and link information, and the link information is used to trigger the chat function functions other than

处理模块720,用于对普通聊天内容进行敏感词过滤,得到过滤后的普通聊天内容;The processing module 720 is used to filter the sensitive words of the common chat content to obtain the filtered common chat content;

处理模块720,用于根据过滤后的普通聊天内容和功能链接内容得到第二聊天消息;A processing module 720, configured to obtain a second chat message according to the filtered common chat content and function link content;

发送模块730,用于将第二聊天消息发送给客户端,客户端用于在收到第二聊天消息后,根据插入位置将链接信息插入至过滤后的普通聊天内容中进行显示。The sending module 730 is configured to send the second chat message to the client, and the client is configured to insert the link information into the filtered common chat content according to the insertion position for display after receiving the second chat message.

在一个可选的实施例中,功能链接内容采用目标数据格式进行表示,目标数据格式包括:链接功能类型、插入位置和链接信息;In an optional embodiment, the function link content is expressed in a target data format, and the target data format includes: link function type, insertion position and link information;

链接功能类型用于指示链接信息所触发的功能类型;The link function type is used to indicate the function type triggered by the link information;

插入位置用于表示链接信息插入过滤后的普通聊天内容中的插入位置;The insertion position is used to indicate the insertion position of the link information into the filtered general chat content;

链接信息用于携带其它功能的参数信息。Link information is used to carry parameter information of other functions.

在一个可选的实施例中,目标数据格式是JSON格式,链接功能类型、插入位置和链接信息采用JSON格式中的不同字段表示。In an optional embodiment, the target data format is JSON format, and the link function type, insertion position and link information are represented by different fields in the JSON format.

在一个可选的实施例中,功能类型包括:位置、组队、道具和红包中的至少一项,该装置包括:In an optional embodiment, the function type includes: at least one of location, team formation, props, and red envelopes, and the device includes:

处理模块720,用于当链接功能类型用于指示位置时,根据链接信息启用寻路功能和传送功能中的至少一项;A processing module 720, configured to enable at least one of a pathfinding function and a transfer function according to the link information when the link function type is used to indicate a location;

处理模块720,用于当链接功能类型用于指示组队时,根据链接信息启用多人组队功能;A processing module 720, configured to enable multi-person team formation according to the link information when the link function type is used to indicate team formation;

处理模块720,用于当链接功能类型用于指示道具时,根据链接信息启用道具交易功能和道具租赁功能中的至少一项;A processing module 720, configured to enable at least one of the item transaction function and the item leasing function according to the link information when the link function type is used to indicate an item;

处理模块720,用于当链接功能类型用于指示红包时,根据链接信息启用虚拟资源包分发功能。The processing module 720 is configured to enable the virtual resource package distribution function according to the link information when the link function type is used to indicate red packets.

处理模块720,用于将聊天消息存储至定长存储区中,定长存储区用于采用循环形式存储最近的N条聊天消息,N为正整数。The processing module 720 is configured to store the chat messages in a fixed-length storage area, and the fixed-length storage area is used to store the latest N chat messages in a circular form, where N is a positive integer.

请参阅图11,其示出了本申请另一实施例提供的聊天内容敏感词的过滤装置的示意图。装置800包括:Please refer to FIG. 11 , which shows a schematic diagram of an apparatus for filtering sensitive words in chat content provided by another embodiment of the present application. Apparatus 800 includes:

接收模块810,用于接收服务器发送的第二聊天消息,第二聊天消息是服务器对普通聊天内容进行敏感词过滤后,根据过滤后的普通聊天内容和功能链接内容得到的;The receiving module 810 is configured to receive the second chat message sent by the server, the second chat message is obtained according to the filtered common chat content and function link content after the server filters sensitive words on the common chat content;

处理模块820,用于从第二聊天消息中获取插入位置、链接信息和过滤后的普通聊天内容;A processing module 820, configured to obtain the insertion position, link information and filtered common chat content from the second chat message;

处理模块820,用于根据插入位置将链接信息插入至过滤后的普通聊天内容中进行显示;A processing module 820, configured to insert link information into the filtered common chat content according to the insertion position for display;

其中,互相独立的普通聊天内容和功能链接内容是服务器从接收到的第一聊天消息中得到的,功能链接内容包括插入位置和链接信息,链接信息用于触发除聊天功能之外的其它功能。The independent common chat content and function link content are obtained by the server from the received first chat message. The function link content includes insertion position and link information, and the link information is used to trigger other functions except the chat function.

在一个可选的实施例中,功能链接内容采用目标数据格式进行表示,目标数据格式包括:链接功能类型、插入位置和链接信息;In an optional embodiment, the function link content is expressed in a target data format, and the target data format includes: link function type, insertion position and link information;

链接功能类型用于指示链接信息所触发的功能类型;The link function type is used to indicate the function type triggered by the link information;

插入位置用于表示链接信息插入过滤后的普通聊天内容中的插入位置;The insertion position is used to indicate the insertion position of the link information into the filtered general chat content;

链接信息用于携带其它功能的参数信息。Link information is used to carry parameter information of other functions.

在一个可选的实施例中,目标数据格式是JSON格式,链接功能类型、插入位置和链接信息采用JSON格式中的不同字段表示。In an optional embodiment, the target data format is JSON format, and the link function type, insertion position and link information are represented by different fields in the JSON format.

在一个可选的实施例中,处理模块820,用于从第二聊天消息中获取链接功能类型;处理模块820,用于获取与链接功能类型对应的功能图标;处理模块820,用于根据插入位置将功能图标插入至过滤后的普通聊天内容中进行显示,功能图标指向链接信息。In an optional embodiment, the processing module 820 is configured to acquire the link function type from the second chat message; the processing module 820 is configured to acquire the function icon corresponding to the link function type; the processing module 820 is configured to insert The position inserts the function icon into the filtered general chat content for display, and the function icon points to the link information.

在一个可选的实施例中,功能类型包括:位置、组队、道具和红包中的至少一项,In an optional embodiment, the function type includes: at least one of location, team formation, props and red envelopes,

接收模块810,用于接收对链接信息的触发操作;A receiving module 810, configured to receive a trigger operation on link information;

处理模块820,用于当链接信息对应的功能类型是位置时,根据链接信息启用寻路功能和传送功能中的至少一项;A processing module 820, configured to enable at least one of a pathfinding function and a transmission function according to the link information when the function type corresponding to the link information is a location;

处理模块820,用于当链接信息对应的功能类型是组队时,根据链接信息向服务器请求多人组队功能;A processing module 820, configured to request a multi-person teaming function from the server according to the link information when the function type corresponding to the link information is team formation;

处理模块820,用于当链接信息对应的功能类型是道具时,根据链接信息向服务器请求启用道具交易功能和道具租赁功能中的至少一项;The processing module 820 is configured to request the server to enable at least one of the item transaction function and the item leasing function according to the link information when the function type corresponding to the link information is an item;

处理模块820,用于当链接信息对应的功能类型是红包时,根据链接信息向服务器请求启用虚拟资源包领取功能。The processing module 820 is configured to, when the function type corresponding to the link information is a red envelope, request the server to enable the virtual resource package receiving function according to the link information.

在一个可选的实施例中,装置还包括:发送模块830,用于根据用户操作向服务器发送第一聊天消息。In an optional embodiment, the device further includes: a sending module 830, configured to send the first chat message to the server according to a user operation.

需要说明的是:上述实施例提供的聊天内容敏感词的过滤装置和终端在提供语音服务时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的聊天内容敏感词的过滤装置与聊天内容敏感词的过滤方法的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the device for filtering sensitive words in the chat content and the terminal provided by the above-mentioned embodiments provide voice services, the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated according to needs. Completion of different functional modules means that the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for filtering sensitive words in chat content provided by the above embodiment and the method embodiment of the method for filtering sensitive words in chat content belong to the same concept, and the specific implementation process is detailed in the method embodiment, and will not be repeated here.

图12示出了本申请一个示例性实施例提供的终端1900的结构框图。该终端1900可以是:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio LayerIII,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group AudioLayer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端1900还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。Fig. 12 shows a structural block diagram of a terminal 1900 provided by an exemplary embodiment of the present application. The terminal 1900 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, moving picture experts compress standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, moving picture experts compress standard audio layer 4 ) player, laptop or desktop computer. The terminal 1900 may also be called user equipment, portable terminal, laptop terminal, desktop terminal and other names.

通常,终端1900包括有:处理器1901和存储器1902。Generally, the terminal 1900 includes: a processor 1901 and a memory 1902 .

处理器1901可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器1901可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器1901也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central ProcessingUnit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器1901可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器1901还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。The processor 1901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 1901 can adopt at least one hardware form among DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, programmable logic array) accomplish. The processor 1901 may also include a main processor and a coprocessor, the main processor is a processor for processing data in the wake-up state, and is also called a CPU (Central Processing Unit, central processing unit); the coprocessor is used to Low-power processor for processing data in standby state. In some embodiments, the processor 1901 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1901 may further include an AI (Artificial Intelligence, artificial intelligence) processor, where the AI processor is configured to process computing operations related to machine learning.

存储器1902可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1902还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1902中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器1901所执行以实现本申请中方法实施例提供的聊天消息的过滤方法。Memory 1902 may include one or more computer-readable storage media, which may be non-transitory. The memory 1902 may also include high-speed random access memory, and non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1902 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1901 to implement the chat message provided by the method embodiment in this application filtering method.

在一些实施例中,终端1900还可选包括有:外围设备接口1903和至少一个外围设备。处理器1901、存储器1902和外围设备接口1903之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口1903相连。具体地,外围设备包括:射频电路1904、触摸显示屏1905、摄像头1906、音频电路1907和电源1908中的至少一种。In some embodiments, the terminal 1900 may optionally further include: a peripheral device interface 1903 and at least one peripheral device. The processor 1901, the memory 1902, and the peripheral device interface 1903 may be connected through buses or signal lines. Each peripheral device can be connected to the peripheral device interface 1903 through a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1904 , a touch screen 1905 , a camera 1906 , an audio circuit 1907 and a power supply 1908 .

外围设备接口1903可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器1901和存储器1902。在一些实施例中,处理器1901、存储器1902和外围设备接口1903被集成在同一芯片或电路板上;在一些其他实施例中,处理器1901、存储器1902和外围设备接口1903中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。The peripheral device interface 1903 may be used to connect at least one peripheral device related to I/O (Input/Output, input/output) to the processor 1901 and the memory 1902 . In some embodiments, the processor 1901, memory 1902 and peripheral device interface 1903 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 1901, memory 1902 and peripheral device interface 1903 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.

射频电路1904用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路1904通过电磁信号与通信网络以及其他通信设备进行通信。射频电路1904将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路1904包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路1904可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:万维网、城域网、内联网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路1904还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。The radio frequency circuit 1904 is used for receiving and transmitting RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals. The radio frequency circuit 1904 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 1904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 1904 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: World Wide Web, Metropolitan Area Network, Intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), wireless local area network and/or WiFi (Wireless Fidelity, Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1904 may also include circuits related to NFC (Near Field Communication, short-range wireless communication), which is not limited in this application.

显示屏1905用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏1905是触摸显示屏时,显示屏1905还具有采集在显示屏1905的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器1901进行处理。此时,显示屏1905还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏1905可以为一个,设置终端1900的前面板;在另一些实施例中,显示屏1905可以为至少两个,分别设置在终端1900的不同表面或呈折叠设计;在再一些实施例中,显示屏1905可以是柔性显示屏,设置在终端1900的弯曲表面上或折叠面上。甚至,显示屏1905还可以设置成非矩形的不规则图形,也即异形屏。显示屏1905可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。The display screen 1905 is used to display a UI (User Interface, user interface). The UI can include graphics, text, icons, video, and any combination thereof. When the display screen 1905 is a touch display screen, the display screen 1905 also has the ability to collect touch signals on or above the surface of the display screen 1905 . The touch signal can be input to the processor 1901 as a control signal for processing. At this time, the display screen 1905 can also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards. In some embodiments, there may be one display screen 1905, which is provided on the front panel of the terminal 1900; in other embodiments, there may be at least two display screens 1905, which are respectively provided on different surfaces of the terminal 1900 or in a folding design; In some other embodiments, the display screen 1905 may be a flexible display screen, which is arranged on the curved surface or the folding surface of the terminal 1900 . Even, the display screen 1905 can also be set as a non-rectangular irregular figure, that is, a special-shaped screen. The display screen 1905 can be made of LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, organic light-emitting diode) and other materials.

摄像头组件1906用于采集图像或视频。可选地,摄像头组件1906包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件1906还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。The camera assembly 1906 is used to capture images or videos. Optionally, the camera component 1906 includes a front camera and a rear camera. Usually, the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of the main camera, depth-of-field camera, wide-angle camera, and telephoto camera, so as to realize the fusion of the main camera and the depth-of-field camera to realize the background blur function. Combined with the wide-angle camera to realize panoramic shooting and VR (Virtual Reality, virtual reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1906 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. Dual color temperature flash refers to the combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.

音频电路1907可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器1901进行处理,或者输入至射频电路1904以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端1900的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器1901或射频电路1904的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路1907还可以包括耳机插孔。Audio circuitry 1907 may include a microphone and speakers. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals and input them to the processor 1901 for processing, or input them to the radio frequency circuit 1904 to realize voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, which are respectively set at different parts of the terminal 1900 . The microphone can also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signal from the processor 1901 or the radio frequency circuit 1904 into sound waves. The loudspeaker can be a conventional membrane loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, it is possible not only to convert electrical signals into sound waves audible to humans, but also to convert electrical signals into sound waves inaudible to humans for purposes such as distance measurement. In some embodiments, audio circuitry 1907 may also include a headphone jack.

电源1908用于为终端1900中的各个组件进行供电。电源1908可以是交流电、直流电、一次性电池或可充电电池。当电源1908包括可充电电池时,该可充电电池可以是有线充电电池或无线充电电池。有线充电电池是通过有线线路充电的电池,无线充电电池是通过无线线圈充电的电池。该可充电电池还可以用于支持快充技术。The power supply 1908 is used to supply power to various components in the terminal 1900 . Power source 1908 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 1908 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

在一些实施例中,终端1900还包括有一个或多个传感器1910。该一个或多个传感器1910包括但不限于:加速度传感器1911、陀螺仪传感器1912、压力传感器1913、光学传感器1914以及接近传感器1915。In some embodiments, the terminal 1900 further includes one or more sensors 1910 . The one or more sensors 1910 include, but are not limited to: an acceleration sensor 1911 , a gyro sensor 1912 , a pressure sensor 1913 , an optical sensor 1914 and a proximity sensor 1915 .

加速度传感器1911可以检测以终端1900建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器1911可以用于检测重力加速度在三个坐标轴上的分量。处理器1901可以根据加速度传感器1911采集的重力加速度信号,控制触摸显示屏1905以横向视图或纵向视图进行用户界面的显示。加速度传感器1911还可以用于游戏或者用户的运动数据的采集。The acceleration sensor 1911 can detect the acceleration on the three coordinate axes of the coordinate system established by the terminal 1900 . For example, the acceleration sensor 1911 can be used to detect the components of the acceleration of gravity on the three coordinate axes. The processor 1901 may control the touch display screen 1905 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1911 . The acceleration sensor 1911 can also be used for collecting game or user's motion data.

陀螺仪传感器1912可以检测终端1900的机体方向及转动角度,陀螺仪传感器1912可以与加速度传感器1911协同采集用户对终端1900的3D动作。处理器1901根据陀螺仪传感器1912采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyro sensor 1912 can detect the body direction and rotation angle of the terminal 1900 , and the gyro sensor 1912 can cooperate with the acceleration sensor 1911 to collect 3D actions of the user on the terminal 1900 . According to the data collected by the gyroscope sensor 1912, the processor 1901 can realize the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control and inertial navigation.

压力传感器1913可以设置在终端1900的侧边框和/或触摸显示屏1905的下层。当压力传感器1913设置在终端1900的侧边框时,可以检测用户对终端1900的握持信号,由处理器1901根据压力传感器1913采集的握持信号进行左右手识别或快捷操作。当压力传感器1913设置在触摸显示屏1905的下层时,由处理器1901根据用户对触摸显示屏1905的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 1913 may be disposed on the side frame of the terminal 1900 and/or the lower layer of the touch display screen 1905 . When the pressure sensor 1913 is set on the side frame of the terminal 1900 , it can detect the user's grip signal on the terminal 1900 , and the processor 1901 performs left and right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 1913 . When the pressure sensor 1913 is arranged on the lower layer of the touch screen 1905, the processor 1901 controls the operable controls on the UI interface according to the user's pressure operation on the touch screen 1905. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

光学传感器1914用于采集环境光强度。在一个实施例中,处理器1901可以根据光学传感器1914采集的环境光强度,控制触摸显示屏1905的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏1905的显示亮度;当环境光强度较低时,调低触摸显示屏1905的显示亮度。在另一个实施例中,处理器1901还可以根据光学传感器1914采集的环境光强度,动态调整摄像头组件1906的拍摄参数。The optical sensor 1914 is used to collect ambient light intensity. In one embodiment, the processor 1901 can control the display brightness of the touch screen 1905 according to the ambient light intensity collected by the optical sensor 1914 . Specifically, when the ambient light intensity is high, the display brightness of the touch screen 1905 is increased; when the ambient light intensity is low, the display brightness of the touch screen 1905 is decreased. In another embodiment, the processor 1901 may also dynamically adjust shooting parameters of the camera assembly 1906 according to the ambient light intensity collected by the optical sensor 1914 .

接近传感器1915,也称距离传感器,通常设置在终端1900的前面板。接近传感器1915用于采集用户与终端1900的正面之间的距离。在一个实施例中,当接近传感器1915检测到用户与终端1900的正面之间的距离逐渐变小时,由处理器1901控制触摸显示屏1905从亮屏状态切换为息屏状态;当接近传感器1915检测到用户与终端1900的正面之间的距离逐渐变大时,由处理器1901控制触摸显示屏1905从息屏状态切换为亮屏状态。The proximity sensor 1915 , also called a distance sensor, is usually set on the front panel of the terminal 1900 . The proximity sensor 1915 is used to collect the distance between the user and the front of the terminal 1900 . In one embodiment, when the proximity sensor 1915 detects that the distance between the user and the front of the terminal 1900 gradually decreases, the processor 1901 controls the touch display screen 1905 to switch from the bright screen state to the off screen state; when the proximity sensor 1915 detects When the distance between the user and the front of the terminal 1900 gradually increases, the processor 1901 controls the touch display screen 1905 to switch from the off-screen state to the on-screen state.

本领域技术人员可以理解,图12中示出的结构并不构成对终端1900的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art can understand that the structure shown in FIG. 12 does not constitute a limitation on the terminal 1900, and may include more or less components than shown in the figure, or combine certain components, or adopt a different component arrangement.

图13示出了本申请一个实施例提供的服务器的结构示意图。该服务器用于实施上述实施例中提供的聊天消息的过滤方法。具体来讲:FIG. 13 shows a schematic structural diagram of a server provided by an embodiment of the present application. The server is used to implement the method for filtering chat messages provided in the above embodiments. Specifically:

所述服务器1300包括中央处理单元(CPU)1301、包括随机存取存储器(RAM)1302和只读存储器(ROM)1303的系统存储器1304,以及连接系统存储器1304和中央处理单元1301的系统总线1305。所述服务器1300还包括帮助计算机内的各个器件之间传输信息的基本输入/输出系统(I/O系统)1306,和用于存储操作系统1313、应用程序1314和其他程序模块1315的大容量存储设备1307。The server 1300 includes a central processing unit (CPU) 1301, a system memory 1304 including a random access memory (RAM) 1302 and a read only memory (ROM) 1303, and a system bus 1305 connecting the system memory 1304 and the central processing unit 1301. The server 1300 also includes a basic input/output system (I/O system) 1306 that facilitates the transfer of information between various devices within the computer, and mass storage for storing operating systems 1313, application programs 1314, and other program modules 1315 Device 1307.

所述基本输入/输出系统1306包括有用于显示信息的显示器1308和用于用户输入信息的诸如鼠标、键盘之类的输入设备1309。其中所述显示器1308和输入设备1309都通过连接到系统总线1305的输入输出控制器1310连接到中央处理单元1301。所述基本输入/输出系统1306还可以包括输入输出控制器1310以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器1310还提供输出到显示屏、打印机或其他类型的输出设备。The basic input/output system 1306 includes a display 1308 for displaying information and input devices 1309 such as a mouse and a keyboard for users to input information. Both the display 1308 and the input device 1309 are connected to the central processing unit 1301 through the input and output controller 1310 connected to the system bus 1305 . The basic input/output system 1306 may also include an input-output controller 1310 for receiving and processing input from a keyboard, mouse, or electronic stylus and other devices. Similarly, input output controller 1310 also provides output to a display screen, printer, or other type of output device.

所述大容量存储设备1307通过连接到系统总线1305的大容量存储控制器(未示出)连接到中央处理单元1301。所述大容量存储设备1307及其相关联的计算机可读介质为服务器1300提供非易失性存储。也就是说,所述大容量存储设备1307可以包括诸如硬盘或者CD-ROM驱动器之类的计算机可读介质(未示出)。The mass storage device 1307 is connected to the central processing unit 1301 through a mass storage controller (not shown) connected to the system bus 1305 . The mass storage device 1307 and its associated computer-readable media provide non-volatile storage for the server 1300 . That is, the mass storage device 1307 may include a computer readable medium (not shown) such as a hard disk or a CD-ROM drive.

不失一般性,所述计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括RAM、ROM、EPROM、EEPROM、闪存或其他固态存储其技术,CD-ROM、DVD或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知所述计算机存储介质不局限于上述几种。上述的系统存储器1304和大容量存储设备1307可以统称为存储器。Without loss of generality, such computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage technologies, CD-ROM, DVD or other optical storage, tape cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices. Certainly, those skilled in the art know that the computer storage medium is not limited to the above-mentioned ones. The above-mentioned system memory 1304 and mass storage device 1307 may be collectively referred to as memory.

根据本申请的各种实施例,所述服务器1300还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即服务器1300可以通过连接在所述系统总线1305上的网络接口单元1311连接到网络1312,或者说,也可以使用网络接口单元1311来连接到其他类型的网络或远程计算机系统(未示出)。According to various embodiments of the present application, the server 1300 can also run on a remote computer connected to the network through a network such as the Internet. That is to say, the server 1300 can be connected to the network 1312 through the network interface unit 1311 connected to the system bus 1305, or in other words, the network interface unit 1311 can also be used to connect to other types of networks or remote computer systems (not shown) .

所述存储器还包括一个或者一个以上的程序,所述一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行。上述一个或者一个以上程序包含用于进行以下操作的指令。The memory also includes one or more programs stored in the memory and configured to be executed by the one or more processors. The one or more programs described above contain instructions for doing the following.

应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。It should be understood that the "plurality" mentioned herein refers to two or more than two. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character "/" generally indicates that the contextual objects are an "or" relationship.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, and can also be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.

以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the application, and are not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the application shall be included in the protection of the application. within range.

Claims (16)

1. A chat message filtering method is applied to a server with a chat function, and comprises the following steps:
receiving a first chat message sent by a client, wherein the first chat message comprises mutually independent common chat content and function link content, the function link content comprises an insertion position and link information, and the link information is used for triggering other functions except the chat function;
sensitive word filtering is carried out on the common chat content to obtain filtered common chat content;
obtaining a second chat message according to the filtered common chat content and the functional link content;
and sending the second chat message to the client, wherein the client is used for inserting the link information into the filtered common chat content according to the insertion position for displaying after receiving the second chat message.
2. The method of claim 1, wherein the function-linked content is represented in a target data format, the target data format comprising: a link function type, the insertion location, and the link information;
the link function type is used for indicating the function type triggered by the link information;
the inserting position is used for indicating the inserting position of the link information into the filtered common chat content;
the link information is used for carrying parameter information of the other functions.
3. The method of claim 2, wherein the target data format is a JSON format, and wherein the link function type, the insertion location, and the link information are represented in different fields of the JSON format.
4. The method according to claim 2 or 3, wherein the function types comprise: at least one of a location, a team, a prop, and a red envelope, the method further comprising:
enabling at least one of a routing function and a transfer function according to the link information when the link function type is used to indicate the location;
when the link function type is used for indicating the team formation, a multi-team formation function is started according to the link information;
when the link function type is used for indicating the prop, enabling at least one of a prop transaction function and a prop renting function according to the link information;
and when the link function type is used for indicating the red packet, enabling a virtual resource packet distribution function according to the link information.
5. The method of any of claims 1 to 3, further comprising:
and storing the chat messages into a fixed-length storage area, wherein the fixed-length storage area is used for storing the latest N chat messages in a circular mode, and N is a positive integer.
6. A chat message filtering method is applied to a client with a chat function, and comprises the following steps:
receiving a second chat message sent by a server, wherein the second chat message is obtained by the server according to the filtered common chat content and the functional link content after sensitive words of the common chat content are filtered;
acquiring an insertion position, link information and the filtered common chat content from the second chat message;
inserting the link information into the filtered common chat content according to the inserting position to be displayed;
wherein the common chat content and the function link content independent of each other are obtained by the server from a first chat message received, and the function link content includes an insertion position and link information for triggering functions other than the chat function.
7. The method of claim 6, wherein the function-linked content is represented in a target data format, the target data format comprising: a link function type, the insertion location, and the link information;
the link function type is used for indicating the function type triggered by the link information;
the inserting position is used for indicating the inserting position of the link information inserted into the filtered common chat content;
the link information is used for carrying parameter information of the other functions.
8. The method of claim 7, wherein the target data format is a JSON format, and wherein the link function type, the insertion location, and the link information are represented in different fields of the JSON format.
9. The method of claim 7, further comprising:
obtaining the link function type from the second chat message;
the inserting the link information into the filtered general chat content for displaying according to the inserting position comprises:
acquiring a function icon corresponding to the link function type;
and inserting the functional icon into the filtered common chat content according to the inserting position to be displayed, wherein the functional icon points to the link information.
10. The method according to any of claims 7 to 9, wherein the function types comprise: at least one of a location, a team, a prop and a red envelope, wherein after the link information is inserted into the filtered general chat content according to the insertion position for display, the method further comprises:
receiving a trigger operation on the link information;
when the function type corresponding to the link information is the position, enabling at least one of a routing function and a transmission function according to the link information;
when the function type corresponding to the link information is the team, requesting a multi-team organizing function from a server according to the link information;
when the function type corresponding to the link information is the prop, requesting the server to start at least one of a prop transaction function and a prop lease function according to the link information;
and when the function type corresponding to the link information is the red packet, requesting the server to start a virtual resource packet getting function according to the link information.
11. The method according to any one of claims 6 to 9, further comprising:
and sending the first chat message to the server according to the user operation.
12. An apparatus for filtering chat content sensitive words, the apparatus comprising:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving a first chat message sent by a client, the first chat message comprises mutually independent common chat content and function link content, the function link content comprises an insertion position and link information, and the link information is used for triggering other functions except the chat function;
the filtering module is used for filtering the sensitive words of the common chat content to obtain filtered common chat content, and obtaining a second chat message according to the filtered common chat content and the functional link content;
and the sending module is used for sending the second chat message to the client, and the client is used for inserting the link information into the filtered common chat content for display according to the inserting position after receiving the second chat message.
13. An apparatus for filtering chat content sensitive words, the apparatus comprising:
the receiving module is used for receiving a second chat message sent by the server, wherein the second chat message is obtained by the server according to the filtered common chat content and the functional link content after sensitive words of the common chat content are filtered;
an obtaining module, configured to obtain an insertion location, link information, and the filtered general chat content from the second chat message;
the display module is used for inserting the link information into the filtered common chat content for display according to the inserting position;
wherein the common chat content and the function link content which are independent of each other are obtained by the server from the received first chat message, and the function link content includes an insertion position and link information for triggering functions other than the chat function.
14. A server, characterized in that the server comprises: a processor and a memory;
the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions that is loaded and executed by the processor to implement the method of filtering chat messages according to any of claims 1 to 5.
15. A terminal, characterized in that the terminal comprises: a processor and a memory;
the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions that is loaded and executed by the processor to implement the method of filtering chat messages according to any of claims 6 to 11.
16. A computer readable storage medium having stored thereon at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement a method of filtering chat messages according to any of claims 1 to 11.
CN201910248211.XA 2019-03-29 2019-03-29 Chat message filtering method, system and equipment Expired - Fee Related 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 CN110119508A (en) 2019-08-13
CN110119508B true CN110119508B (en) 2023-03-24

Family

ID=67520760

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN110119508B (en)

Families Citing this family (1)

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

Citations (9)

* 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
CN108574772A (en) * 2017-03-10 2018-09-25 腾讯科技(深圳)有限公司 End message display methods and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017209749A1 (en) * 2016-06-01 2017-12-07 Google Inc. Conversion latency reduction in online chat-based communication infrastructure

Patent Citations (9)

* 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
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
A Chinese Message Sensitive Words Filtering System based on DFA and Word2vec;Fei Wu等;《Procedia Computer Science》;20181018;293-298 *
java实现敏感词过滤(DFA算法);AlanLee;《博客园》;20160328;全文 *
一种基于Java Web的敏感词过滤方法研究与实现;傅明建;《智能计算机与应用》;20170830;第7卷(第4期);21-23 *

Also Published As

Publication number Publication date
CN110119508A (en) 2019-08-13

Similar Documents

Publication Publication Date Title
US11044514B2 (en) Method for displaying bullet comment information, method for providing bullet comment information, and device
CN110585699B (en) Control method, device, device and storage medium for cloud game
CN110213608A (en) Show method, apparatus, equipment and the readable storage medium storing program for executing of virtual present
CN112163406B (en) Interactive message display method and device, computer equipment and storage medium
CN110139116B (en) Live broadcast room switching method and device and storage medium
WO2022227623A1 (en) Method for displaying publish progress, and electronic device
CN112764608B (en) Message processing method, device, equipment and storage medium
CN110061900A (en) Message display method, device, terminal and computer readable storage medium
CN111628925B (en) Song interaction method, device, terminal and storage medium
WO2023050737A1 (en) Resource presentation method based on live streaming room, and terminal
CN111918086A (en) Video connection method, device, terminal, server and readable storage medium
CN108831513A (en) Method, terminal, server and the system of recording audio data
CN113965539A (en) Message sending method, message receiving method, device, equipment and medium
CN112910752A (en) Voice expression display method and device and voice expression generation method and device
CN113709020A (en) Message sending method, message receiving method, device, equipment and medium
CN111444289A (en) Incidence relation establishing method
CN111831385A (en) Business credit information processing method, device, equipment and storage medium
CN110912830B (en) Method and device for transmitting data
CN108111397A (en) Forward the processing method and processing device of notification message
CN110119508B (en) Chat message filtering method, system and equipment
CN112311661B (en) Message processing method, device, equipment and storage medium
CN117978768A (en) Method, device and system for processing instant communication message of order receiving equipment
CN114327197A (en) Message sending method, device, equipment and medium
CN111399796A (en) Voice message aggregation method and device, electronic equipment and storage medium
CN110855544A (en) Message sending method, device and readable 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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20230324

CF01 Termination of patent right due to non-payment of annual fee