CN110650083B - Message filtering method and device - Google Patents

Message filtering method and device Download PDF

Info

Publication number
CN110650083B
CN110650083B CN201910980200.0A CN201910980200A CN110650083B CN 110650083 B CN110650083 B CN 110650083B CN 201910980200 A CN201910980200 A CN 201910980200A CN 110650083 B CN110650083 B CN 110650083B
Authority
CN
China
Prior art keywords
message
filtering
message content
user
configuration 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.)
Active
Application number
CN201910980200.0A
Other languages
Chinese (zh)
Other versions
CN110650083A (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 CN201910980200.0A priority Critical patent/CN110650083B/en
Publication of CN110650083A publication Critical patent/CN110650083A/en
Application granted granted Critical
Publication of CN110650083B publication Critical patent/CN110650083B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/21Monitoring or handling of messages
    • H04L51/212Monitoring or handling of messages using filtering or selective blocking

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a message filtering method, which comprises the following steps: receiving a message sending request sent by a client, wherein the message sending request comprises a message identifier, a group identifier and message content; acquiring a message filtering configuration information set corresponding to the group identification from the message block chain, wherein the message filtering configuration information set comprises message filtering configuration information associated with a plurality of users and a plurality of message content categories; identifying the message content category corresponding to the message content through a message classification model, and obtaining message filtering configuration information corresponding to the message content category from a message filtering configuration information set; and determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content category, and sending the message content to a receiving terminal of the receiving user. By adopting the method and the device, the user-defined filtering of the group message is realized, so that invalid messages received in the group are reduced, and the searching efficiency of the group message is improved.

Description

Message filtering method and device
Technical Field
The present application relates to the field of block chain technologies, and in particular, to a method and an apparatus for filtering a message.
Background
With the development of the internet, more and more people choose to communicate through the internet, so that the communication between people is very convenient and fast, and therefore, many groups appear, each group may aim at one purpose, each user more or less has several groups, and the online communication with different groups is convenient, such as relatives and friends, girlfrieds, learning groups and the like. Since any user may have different groups, and each group may include a plurality of group members, there are often situations where there are a lot of group message records in the group, so that the user may have difficulty in searching or acquiring the desired message, and may even miss important messages. For this situation, the user generally shields the whole group or defines to receive the message of the designated group member to reduce the number of the group messages received by the user, however, by this method, important messages may be omitted because part of the messages cannot be received, and if this method is not used, when the number of the group messages is large, the user is difficult to search for the messages required by the user, thereby causing message management difficulty.
Disclosure of Invention
The embodiment of the application provides a message filtering method and device, which can improve the message filtering efficiency.
A first aspect of an embodiment of the present application provides a message filtering method, including:
receiving a message sending request sent by a client, wherein the message sending request comprises a message identifier, a group identifier and message content;
acquiring a message filtering configuration information set corresponding to the group identifier from a message block chain, wherein the message filtering configuration information set comprises message filtering configuration information associated with a plurality of users and a plurality of message content categories;
identifying the message content category corresponding to the message content through a message classification model, and obtaining message filtering configuration information corresponding to the message content category from the message filtering configuration information set;
and determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content category, and sending the message content to a receiving terminal of the receiving user.
Wherein, the determining the receiving user of the message content according to the message filtering configuration information corresponding to the message content category includes:
acquiring message filtering configuration information corresponding to the message content category, and acquiring a plurality of associated users associated with the message content category based on the message filtering configuration information;
determining the message acquisition state of each associated user aiming at the message content category based on the message filtering configuration information, and determining the associated user of which the message acquisition state is a rejection state as a rejection associated user among the associated users, wherein the rejection state is a state of rejecting the message content corresponding to the message content category;
and acquiring the group members in the group corresponding to the group identification, and determining the group members, except the group members for which the rejection switch is used, as the receiving users of the message content.
Wherein, the identifying the message content category corresponding to the message content through the message classification model includes:
if the message content is a video message, each video frame in the video message is combined into a combined image;
and inputting the combined image into the message classification model to obtain a message content category corresponding to the message content, wherein the message classification model is an image classification model, and the image classification model is obtained based on an image sample and an image category sample.
Wherein, the identifying the message content category corresponding to the message content through the message classification model includes:
if the message content is a text message, splitting the text message to obtain a plurality of word segments;
extracting key participles in the participles according to the parts of speech of the participles, converting the key participles into key participle vectors, inputting the key participle vectors into the message classification model to obtain message content categories corresponding to the message content, wherein the message classification model is a text classification model, and the text classification model is obtained by training based on text message samples and text message category samples.
Wherein the message sending request further comprises a sending user;
the method further comprises the following steps:
generating a block to be verified according to the group identifier, the sending user, the message content and message filtering configuration information corresponding to the message content category;
and verifying the block to be verified according to a consensus mechanism, if the verification is passed, generating a message filtering block according to the block to be verified and the message block chain, adding the message filtering block into the message block chain, and executing the step of determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content type.
Wherein the method further comprises:
acquiring a message filtering result sent by the receiving terminal, generating a filtering result block according to the message filtering result, and uploading the filtering result block to a message block chain; the message filtering result is used for representing the accuracy of the filtering result fed back by the receiving terminal aiming at the message content, and the message filtering result comprises a message filtering abnormal result or a message filtering normal result;
if the message filtering result is the message filtering abnormal result, adjusting the class label of the message content according to the message filtering abnormal result, and updating the message classification model according to the message content and the adjusted class label.
Wherein the method further comprises:
acquiring target message configuration parameters received in a target time range, wherein the target message configuration parameters comprise a configuration user, the group identifier, a target message content category and a target message acquisition state, and the target message configuration parameters carry a digital signature, and the digital signature is obtained by encrypting the target message configuration parameters by the configuration user based on a private key of the configuration user;
and generating a message configuration block according to the target message configuration parameter, verifying the message configuration block through a consensus mechanism, adding the message configuration block into the message block chain if the verification is passed, and generating the message filtering configuration information set according to the target message configuration parameter.
Wherein the generating the message filtering configuration information set according to the target message configuration parameter includes:
taking the group identification as an index, and establishing an index relation between the group identification and the target message content category;
and associating the target message content type with the configuration user, and establishing a corresponding relationship between the configuration user and the target message acquisition state to generate a message filtering configuration information set corresponding to the group identifier, wherein the target message acquisition state is a receiving state or a rejecting state, the receiving state is used for representing that the configuration user receives the message content corresponding to the target message content type, and the rejecting state is used for representing that the configuration user rejects the message content corresponding to the target message content type.
A second aspect of the embodiments of the present application provides a message filtering apparatus, where the apparatus includes:
the receiving module is used for receiving a message sending request sent by a client, wherein the message sending request comprises a message identifier, a group identifier and message content;
a first obtaining module, configured to obtain, from a message block chain, a message filtering configuration information set corresponding to the group identifier, where the message filtering configuration information set includes message filtering configuration information associated with multiple users and multiple message content categories;
the identification module is used for identifying the message content category corresponding to the message content through a message classification model;
the second acquisition module is used for acquiring the message filtering configuration information corresponding to the message content category from the message filtering configuration information set;
the determining module is used for determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content category;
and the sending module is used for sending the message content to a receiving terminal of the receiving user.
Wherein the determining module comprises:
the acquisition unit is used for acquiring message filtering configuration information corresponding to the message content category and acquiring a plurality of associated users associated with the message content category based on the message filtering configuration information;
a first determining unit, configured to determine, based on the message filtering configuration information, a message acquisition status of each associated user for the message content category, and determine, among the multiple associated users, an associated user whose message acquisition status is a rejection status as a rejection associated user, where the rejection status is a status of rejecting message content corresponding to the message content category;
and the second determining unit is used for acquiring the group members in the group corresponding to the group identifier and determining the group members except the group member for rejecting the switch as the receiving users of the message content.
Wherein the identification module comprises:
the extraction unit is used for combining each video frame in the video message into a combined image if the message content is the video message;
and the learning unit is used for inputting the combined image into the message classification model to obtain a message content category corresponding to the message content, the message classification model is an image classification model, and the image classification model is obtained based on an image sample and an image category sample through training.
Wherein, the identification module further comprises:
the splitting unit is used for splitting the text message to obtain a plurality of participles if the message content is the text message;
the conversion unit is used for extracting key participles in the participles according to the parts of speech of the participles and converting the key participles into key participle vectors;
the learning unit is further configured to input the key word segmentation vector into the message classification model to obtain a message content category corresponding to the message content, where the message classification model is a text classification model, and the text classification model is obtained by training based on a text message sample and a text message category sample.
Wherein the message sending request further comprises a sending user;
the device further comprises:
the first generation module is used for generating a block to be verified according to the group identifier, the sending user, the message content and the message filtering configuration information corresponding to the message content category;
the verification module is used for verifying the to-be-verified block according to a consensus mechanism;
the first generating module is further configured to generate a message filtering block according to the block to be verified and the message block chain if the verification passes;
and an uplink module, configured to add the message filtering block to the message block chain, and execute, by the determining module, the step of determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content type.
Wherein the apparatus further comprises:
a third obtaining module, configured to obtain a message filtering result sent by the receiving terminal; the message filtering result is used for representing the accuracy of the filtering result fed back by the receiving terminal aiming at the message content, and the message filtering result comprises a message filtering abnormal result or a message filtering normal result;
the first generating module is further configured to generate a filtering result block according to the message filtering result;
the uplink module is further configured to upload the filtering result block to a message block chain;
and the updating module is used for adjusting the class label of the message content according to the message filtering abnormal result and updating the message classification model according to the message content and the adjusted class label if the message filtering result is the message filtering abnormal result.
Wherein the apparatus further comprises:
a fourth obtaining module, configured to obtain a target message configuration parameter received within a target time range, where the target message configuration parameter includes a configuration user, the group identifier, a target message content category, and a target message obtaining state, and the target message configuration parameter carries a digital signature, where the digital signature is obtained by encrypting, by the configuration user, the target message configuration parameter based on a private key of the configuration user;
the first generating module is further configured to generate a message configuration block according to the target message configuration parameter;
the verification module is further configured to verify the message configuration block through a consensus mechanism;
the uplink module is further configured to add the message configuration block to the message block chain if the verification is passed;
and the second generation module is used for generating the message filtering configuration information set according to the target message configuration parameters.
Wherein the second generating module comprises:
the index unit is used for taking the group identification as an index and establishing an index relation between the group identification and the target message content category;
and the association unit is configured to associate the target message content category with the configuration user, and establish a corresponding relationship between the configuration user and the target message acquisition state to generate a message filtering configuration information set corresponding to the group identifier, where the target message acquisition state is a reception state or a rejection state, the reception state is used to represent that the configuration user receives the message content corresponding to the target message content category, and the rejection state is used to represent that the configuration user rejects the message content corresponding to the target message content category.
A third aspect of the embodiments of the present application provides an electronic device, including a processor, a memory, and an input/output interface;
the processor is connected to the memory and the input/output interface, respectively, where the input/output interface is configured to interact with each participating node, the memory is configured to store a program code, and the processor is configured to call the program code to execute the message filtering method according to the first aspect of the embodiment of the present application.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program includes program instructions, which, when executed by a processor, perform the message filtering method as described in the first aspect of the embodiments of the present application.
The embodiment of the application has the following beneficial effects:
the method comprises the steps of receiving a message sending request sent by a client, wherein the message sending request comprises a message identifier, a group identifier and message content; acquiring a message filtering configuration information set corresponding to the group identification from the message block chain, wherein the message filtering configuration information set comprises message filtering configuration information associated with a plurality of users and a plurality of message content categories; identifying the message content type corresponding to the message content through a message classification model, and obtaining message filtering configuration information corresponding to the message content type from a message filtering configuration information set; and determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content category, and sending the message content to a receiving terminal of the receiving user. The method realizes that when the group message sent by the client is received, the group member which is set to receive the group message or not set to reject the group message is determined as the receiving user through each message filtering configuration information which is self-defined by the user, the group message is sent to the receiving terminal of the receiving user, thereby realizing the self-defined group message filtering of the user, reducing invalid messages which are received by the user through the group, for example, the user does not receive advertisement and scenery messages when setting in the group, other group members send advertisement or scenery messages in the group, the server does not send the message to the user, thereby each group member in the group can realize the reduction of the number of uninterested or invalid messages received by the group member through the self-defined message filtering setting, and improving the high efficiency of group message management and the intellectualization and the effectiveness of group message sending, thereby improving the searching efficiency of the group message.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a diagram of a message filtering architecture provided by an embodiment of the present application;
fig. 2 is a flowchart of a message filtering method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a message filtering configuration information set according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a determined recipient user provided by an embodiment of the present application;
fig. 5 is a schematic diagram of a detailed flow of message filtering according to an embodiment of the present application;
fig. 6 is a schematic diagram of a message filtering configuration scenario provided in an embodiment of the present application;
fig. 7 is a schematic diagram of a target message configuration parameter according to an embodiment of the present application;
fig. 8 is a schematic diagram of another message filtering configuration information set provided in an embodiment of the present application;
FIG. 9a is a diagram illustrating an example of generating a message filtering configuration information set according to an embodiment of the present application;
FIG. 9b is a diagram illustrating another example of generating a message filtering configuration information set according to an embodiment of the present application;
fig. 10 is a schematic diagram of a video message filtering scene according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a message filtering apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Specifically, referring to fig. 1, fig. 1 is a message filtering architecture diagram provided in an embodiment of the present application, as shown in fig. 1, the present solution is described based on a message filtering system as a main body, where the message filtering system 11 includes a message block chain, a message processing node 111, a message classification node 112, and a configuration node 113, when a client 10 sends a message sending request to the message filtering system 11, where the message sending request includes a message identifier, a group identifier, and a message content, the message sending request is used to indicate that the client 10 sends a message in a group corresponding to the group identifier, the sent message is the message content, and the message identifier is used to mark the message content. After receiving a message sending request sent by the client 10, the message filtering system 11 performs consensus on the message content through the message processing node 111, and then obtains a message filtering configuration information set corresponding to the group identifier from the message block chain through the configuration node 113, where the message filtering configuration information set includes message filtering configuration information associated with multiple users and multiple message content categories, and then inputs the message content into the message classification model through the message classification node 112 to perform learning to obtain a message content category corresponding to the message content, and the message filtering system 11 obtains the message filtering configuration information corresponding to the message content category from the obtained message filtering configuration information set, where one message content may correspond to multiple message content categories. Acquiring message filtering configuration information corresponding to the message filtering configuration information set from the message filtering configuration information set, wherein each message filtering configuration information is determined based on a group identifier and a message content category and comprises receiving state settings of a plurality of users for the message content category in the group corresponding to the group identifier, so that a receiving user of the message content is determined according to the message filtering configuration information corresponding to the message content category, and the message content is sent to a receiving terminal 12 of the determined receiving user. The message processing node 111 is configured to receive a message sent by a client, perform consensus confirmation on the message, determine message filtering configuration information corresponding to the message, and the like, the message classification node 112 is configured to obtain a message content category corresponding to the message sent by the client through a message classification model, and the configuration node 113 is configured to obtain a message filtering configuration information set according to the obtained message filtering configuration information set for a group sent by the client. The message processing node 111, the message classification node 112, and the configuration node 113 may be different modules in the message filtering system 11, or may be servers or terminal devices in the message filtering system 11, and implement filtering of group messages by executing the above processes. For example, when a user a sends a group message to a group 1 through a client 10, after monitoring the group message, the message filtering system 11 performs consensus on the group message through the message processing node 111, determines that the group message is accurate, acquires a message filtering configuration information set corresponding to a group identifier from a message block chain according to the group identifier corresponding to the group message, inputs the group message into a message classification model through the message classification node 112, and acquires message content categories corresponding to the group message, where the message content categories include "landscape" and "advertisement", and acquires message filtering configuration information corresponding to message content categories "landscape" and "advertisement", and the acquired message filtering configuration information corresponding to the "landscape" includes "user B: refusing; and a user C: receiving message filtering configuration information corresponding to the advertisement, wherein the message filtering configuration information comprises user C: refusing; and a user D: refusing to receive the group message, so as to determine that the receiving user of the group message is a group member except the user B, the user C and the user D in the group 1, and sending the group message to the terminal equipment logged in by the group member except the user B, the user C and the user D in the group 1.
Further, please refer to fig. 2, fig. 2 is a flowchart of a message filtering method according to an embodiment of the present application. As shown in fig. 2, the message filtering process includes the following steps:
step S201, receiving a message sending request sent by a client, where the message sending request includes a message identifier, a group identifier, and a message content.
Specifically, when a user sends message content to a group through a client, the client monitors the message content sending process and sends a message sending request to a message filtering system, the message filtering system receives the message sending request sent by the client, the message sending request comprises a message identifier, a group identifier and message content, the message identifier is used for indicating the message content, and the group identifier is used for indicating the group for sending the message content by the client. Wherein, since different users may send the same message content, a message content can be uniquely specified by the message identifier. Optionally, after receiving a message sending request sent by the client, the message filtering system may generate a message sending block according to the message sending request, perform consensus on the message sending block through a message processing node in the system to determine the authenticity of the message sending request, if it is determined that the message sending request is authentic, upload the message sending block to a message block chain, and execute step S202, if it is determined that the message sending request is not authentic, end the message sending process this time, and send a prompt of message sending failure to the client; the message sending block comprises a message identifier, a group identifier, message content, a user identifier and the like, wherein the user identifier is used for indicating a login user when the client sends the message content in a group corresponding to the group identifier.
For example, when a user a logs in a client, a message content is sent to a group 1 through the client, the message content is a picture, when the client monitors a message sending process that the user a sends the message content to the group 1, a message sending request is sent to a message filtering system, the message sending request includes a message identifier, a group identifier and the message content, and the message sending request also carries a user identifier of the user a and is used for indicating a sending user of the message content in the message sending request. After receiving the message sending request, the message filtering system generates a message sending block according to the message sending request, where the message sending block includes "the user identifier of the user a, the message identifier, the group identifier 1 corresponding to the group 1, and the message content", and performs consensus on the message sending block through the message processing node, if the consensus passes, it is determined that the message sending request is accurate, the message sending block is uploaded to a message block chain to record an event that the user a sends the message content to the group 1, and step S202 is executed.
Step S202, obtaining the message filtering configuration information set corresponding to the group identification from the message block chain.
Specifically, a message filtering configuration information set corresponding to the group identifier is obtained from the message block chain, and the message filtering configuration information set includes message filtering configuration information associated with a plurality of users and a plurality of message content categories. Specifically, a plurality of message filtering configuration information sets are stored in the message blockchain, each message filtering configuration information set corresponds to a group identifier and is used for recording relevant message filtering configuration information of a group corresponding to the group identifier, each group identifier is associated with a plurality of message content categories, and each message content category is associated with at least one user. Optionally, the message filtering configuration information set may also be stored at the configuration node, and a message block chain stores message configuration blocks, each message configuration block is used to store data generated when an event that a user configures the message filtering information occurs, and when a message sending request sent by a client is received, the message filtering configuration information set corresponding to the group identifier is obtained from the configuration node, where the configuration node stores therein a message filtering configuration information set corresponding to at least one group identifier, and at least one message filtering configuration information set is generated and updated according to the message configuration blocks in the message block chain, that is, when a message configuration block is uploaded to the message block chain, the data in the message configuration block is added to at least one message filtering configuration information set by the configuration node.
Specifically, if the message filtering configuration information set is only stored in the message block chain, at least one block associated with the group identifier is acquired from the message block chain through the group identifier, the message filtering information set corresponding to the group identifier is determined according to the at least one block, the message filtering configuration information is identified in common, and if the common identification passes, step S203 is executed, wherein each block in the at least one block stores data generated when an event for configuring the message filtering information by the user occurs; if the message filtering configuration information set is stored in the message block chain and the configuration node, the message filtering information set corresponding to the group identifier may be directly obtained from the configuration node, and the message filtering configuration information is identified, and if the identification passes, step S203 is executed.
Referring specifically to fig. 3, fig. 3 is a schematic diagram of a message filtering configuration information set provided in an embodiment of the present application, and as shown in fig. 3, a group identifier corresponds to a message filtering configuration information set, the message filtering configuration information set includes at least one message content category associated with the group identifier, each message content category is associated with at least one configuration user, where each message content category includes a number ID, a content category description, and a configuration user, the number ID is used to identify the message content category, the content category description is a description of the corresponding message content category, and the configuration user includes at least one configuration user associated with the corresponding message content category and a message acquisition status configured by each configuration user with respect to the corresponding message content category. Taking fig. 3 as an example, the message filtering configuration information set corresponding to the group identifier 1 is obtained from the message block chain through the group identifier 1, the message filtering configuration set includes message filtering configuration information associated with n message content categories and a plurality of users, i.e. the group identity 1 is associated with n message content categories, including message content category 1, message content category 2, … and message content category n, each message content category corresponding to a message filtering configuration information, each message filtering configuration information containing at least one configuration user associated with the corresponding message content category, if the message filtering configuration information corresponding to the message content category 1 includes the user a, the user B and the user C associated with the message content category 1, and the message acquisition state configured by each user comprises a receiving state and a rejecting state.
Step S203, identifying the message content category corresponding to the message content through the message classification model, and obtaining the message filtering configuration information corresponding to the message content category from the message filtering configuration information set.
Specifically, the message content is input into the message classification model for learning to obtain a message content category corresponding to the message content, and the message filtering configuration information corresponding to the message content category is obtained from the message filtering configuration information set corresponding to the group identifier according to the message content category. The message classification model may be an image classification model, a text classification model, or the like, and the message classification model includes, but is not limited to, a Convolutional Neural Network (CNN), or the like. The message filtering system inputs the message content into a message classification model for learning, classifies the message content to obtain a message content category corresponding to the message content, wherein the message content may correspond to one or more message content categories, and obtains message filtering configuration information associated with the message content category corresponding to the message content from a message filtering configuration information set corresponding to the obtained group identifier. Optionally, after the message content category corresponding to the message content is obtained, the serial numbers ID of the message content category corresponding to the message content may be integrated to generate a message classification block, and after the message classification block is identified, the message classification block is uploaded to a message block chain.
For example, as shown in fig. 3, after inputting the message content into the message classification model for learning, the message content category corresponding to the message content is obtained to include the message content category 1 and the message content category 2, and the data associated with the message content category 1 and the message content category 2 is obtained from the message filtering configuration information set corresponding to the obtained group identifier 1, so as to obtain the message filtering configuration information corresponding to the message content category 1 and the message filtering configuration information corresponding to the message content category 2. Specifically, based on the example shown in step S202, assuming that the message content category 1 is landscape, the message content category 2 is advertisement, …, and the message content category n is animal, after inputting the message content into the message classification model and learning, the message content category corresponding to the message content is "landscape and advertisement", and the message filtering configuration information corresponding to the message content category is obtained from the message filtering configuration information set, and includes the message filtering configuration information "number ID1 corresponding to the message content category" landscape ", and the content category description-information such as landscape-only images, text, or links, and the user is configured: refusing by user A, refusing by user B and receiving by user C, message filtering configuration information ' number ID2 corresponding to message content type ' advertisement ', message of content type description-advertisement type image, text or link, etc., configuring user: user C refuses, user D refuses ".
Step S204, according to the message filtering information corresponding to the message content category, determining the receiving user of the message content, and sending the message content to the receiving terminal of the receiving user.
Specifically, the group members included in the group corresponding to the group identifier are acquired according to the group identifier, the receiving user of the message content is determined according to the message filtering configuration information and the group members corresponding to the obtained message content category, and the message content is sent to the receiving terminal of the determined receiving user. Referring to fig. 4 in particular, fig. 4 is a schematic diagram of a certain receiving user according to an embodiment of the present application. As shown in fig. 4, according to the obtained message filtering configuration information corresponding to the message content category, the configuration user corresponding to the message content category and the message obtaining status configured by each configuration user are determined, the group members in the group corresponding to the group identifier are obtained, the group members except the configuration message obtaining status that is the rejection status are determined as the receiving members of the message content, and the message content is sent to the receiving users of the receiving members.
If the message content corresponds to a message content category, the non-intersection message acquisition state relationship 401 in fig. 4 may be obtained through the message filtering configuration information corresponding to the message content category, so that after the group members in the group corresponding to the group identifier are acquired according to the group identifier, the group members excluding the reject association user in the group members are determined as the receiving users, and the reject association user is the group member whose configured message acquisition state is the reject state. If the message content of the message corresponds to at least two message content categories, a non-intersection message acquisition state relationship 401 and an intersection message acquisition state relationship 402a or an intersection message acquisition state relationship 402b may be obtained, when the non-intersection message acquisition state relationship 401 is obtained, a group member which is out of the group members of the group corresponding to the group identifier and used for rejecting the association is directly determined as a receiving user of the message content, and the rejecting association user is a group member of which the configured message acquisition state is a rejecting state; when the intersection message obtaining state relationship 402a or the intersection message obtaining state relationship 402b is obtained, a group member other than the reject connection used outdoors in the group members may be determined as a receiving user of the message content, the reject connection associated user is a group member whose configured message obtaining state is the reject connection state, if the intersection message obtaining state relationship 402a shows, a group member other than the reject connection associated user and not the receiving associated user in the group members may also be determined as a receiving user of the message content, the reject connection associated user is a group member whose configured message obtaining state is the reject connection state, the receiving associated user is a group member whose configured message obtaining state is the receiving state, and if the intersection message obtaining state relationship 402b shows. In other words, as shown in fig. 4, the group members other than the group member in the dashed line box among the group members of the group corresponding to the group identifier are determined as the receiving users.
For example, based on the example shown in step S203, it is known that the rejectable associated users corresponding to the message content include "user a, user B, user C, and user D", and the receiving associated users include "user C", as shown in fig. 4, the case shown by the intersection message obtaining status relationship 402a or the intersection message obtaining status relationship 402B is obtained, the receiving user of the message content may be determined according to the intersection message obtaining status relationship 402a, the receiving user of the message content is a group member other than "user a, user B, user C, and user D" in the group member, or the receiving user of the message content may be determined according to the intersection message obtaining status relationship 402B, and the receiving user of the message content is a group member other than "user a, user B, and user D" in the group member.
The method comprises the steps of receiving a message sending request sent by a client, wherein the message sending request comprises a message identifier, a group identifier and message content; acquiring a message filtering configuration information set corresponding to the group identification from the message block chain, wherein the message filtering configuration information set comprises message filtering configuration information associated with a plurality of users and a plurality of message content categories; identifying the message content type corresponding to the message content through a message classification model, and obtaining message filtering configuration information corresponding to the message content type from a message filtering configuration information set; and determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content category, and sending the message content to a receiving terminal of the receiving user. When receiving the group message sent by the client, the group member which is set to receive the group message or not set to reject the group message is determined as the receiving user through each message filtering configuration information which is set by the user in a customized way, the group message is sent to the receiving terminal of the receiving user, so that the group message is filtered in a customized way, invalid messages received by the user through the group are reduced, for example, the user does not receive advertisement and scenery messages when setting the group to receive the advertisement and scenery messages, and when other group members send the advertisement or scenery messages in the group, the server does not send the messages to the user, so that each group member in the group can reduce the number of uninterested or invalid messages received by the group member through the customized message filtering setting, the high efficiency of group message management and the intellectualization and effectiveness of group message sending are improved, thereby improving the searching efficiency of the group message. Meanwhile, a message sending request sent by the client, the determined message content type corresponding to the message content and the like are uploaded to the message block chain, so that the data tampering condition in the message sending process is avoided, the data generated in the message sending process can be traced, and the accuracy of message processing is improved.
Further, referring to fig. 5, fig. 5 is a schematic diagram of a specific flow of message filtering provided in an embodiment of the present application. As shown in fig. 5, the method comprises the following steps:
step S501, target message configuration parameters are obtained.
Specifically, target message configuration parameters received in a target time range are acquired, wherein the target message configuration parameters comprise a configuration user, a group identifier, a target message content category and a target message acquisition state, and the target message configuration parameters carry a digital signature, and the digital signature is obtained by encrypting the target message configuration parameters by the configuration user based on a private key of the configuration user; and generating a message configuration block according to the target message configuration parameters, verifying the message configuration block through a consensus mechanism, and adding the message configuration block into a message block chain if the verification is passed.
Specifically, referring to fig. 6, fig. 6 is a schematic view of a message filtering configuration scenario provided in an embodiment of the present application, a configuration user may click a group to be configured in a message prompt page 601, enter a group session page 602, open a message filtering configuration page 603 of the group through the group session page 602, and input message filtering data including a rejection user and/or a rejection message and/or a reception message in the message filtering configuration page 603, where the rejection user is used to characterize a group member of the configuration user that rejects to receive a message, the rejection message is used to characterize a message content category that the configuration user rejects to receive a message, and the reception message is used to characterize a message content category that the configuration user wants to receive a message. When a client used by a configuration user monitors that the configuration user clicks a submit button in a message filtering configuration page 603, obtaining target message configuration parameters according to message filtering data input by the configuration user, obtaining a private key of the configuration user, encrypting the target message configuration parameters based on the private key to obtain a digital signature, and sending the encrypted target message configuration parameters to any one configuration node 604 in a message filtering system; similarly, other configuration users may also submit message filtering data through the message filtering configuration page 603, and a client used by the other configuration users sends the message filtering data to any one of the configuration nodes 604 in the message filtering system. The configuration node 604 obtains a target message configuration parameter received within a target time range, decrypts the target message configuration parameter through a public key of a configuration user, and obtains a configuration user, a group identifier, a target message content category, and a target message obtaining state included in the target message configuration parameter, where the configuration node 604 may receive a plurality of target message configuration parameters within the target time range, generates a message configuration block 605 according to the obtained target message configuration parameter, verifies the message configuration block 605 through each participating node 606 in the message filtering system based on a common identification mechanism, and if the verification is passed, adds the message configuration block 605 into a message block chain 607, and executes step S502. The content type of the target message and the acquisition state of the target message in the target message configuration parameters are obtained according to the reject message and the received message input by the configuration user, and any group member in the group can query the historical message filtering data configured for the group by the group member through the message filtering configuration page 603. Optionally, if the configuration user inputs the denial user, the target message configuration parameters further include the denial user.
Wherein, the client obtains the target message configuration parameters according to the message filtering data input by the configuration user, as shown in fig. 7, fig. 7 is a schematic diagram of a target message configuration parameter provided in an embodiment of the present application, when the client monitors the message filtering data input by the configuration user, the target message configuration parameters shown in fig. 7 are obtained according to the message filtering data, the target message configuration parameters comprise user identification, group identification and message filtering data input by a configuration user, wherein, the user ID is used to represent the configuration user, the group ID is used to represent that the target message configuration parameter is the message acquisition status configuration for the group corresponding to the group ID, the message filtering data inputted by the configuration user represents the message acquisition status configuration for the group by the user, i.e., the rejection message in the message filtering configuration page 603 and the message content category entered in the received message by the configuration user.
For example, suppose that a user a inputs a denial message "advertisement" and a reception message "food" on a message filtering configuration page 603 of a group 1, a client used by the user a obtains a target message configuration parameter "user a, a group identifier 1 corresponding to the group 1, an advertisement-denial state, a food-reception state" according to data input by the user a, the target message configuration parameter of the user a includes two message acquisition state configurations configured by the user a, and the client used by the user a sends the target message configuration parameter to a message filtering system; a user B inputs a rejection message advertisement on a message filtering configuration page 603 of a group 1, a client used by the user B obtains a target message configuration parameter user B, a group identifier 1 corresponding to the group 1 and an advertisement-rejection state according to data input by the user B, the target message configuration parameter of the user B comprises a message acquisition state configuration configured by the user B, and the client used by the user B sends the target message configuration parameter to a message filtering system; a user C inputs a refusing message 'advertisement' and a receiving message 'landscape' in a message filtering configuration page 603 of a group 1, a client used by the user C obtains a target message configuration parameter 'user C, a group identifier 1 corresponding to the group 1, an advertisement-refusing state and a landscape-receiving state' according to data input by the user C, the target message configuration parameter of the user C comprises two message acquisition state configurations configured by the user C, and the client used by the user C sends the target message configuration parameter to a message filtering system; and so on. The message filtering system acquires target message configuration parameters received in a target time range, generates a message configuration block according to the acquired target message configuration parameters if the target message configuration parameters of the user A, the user B and the user C are received in the target time range, verifies the message configuration block through a consensus mechanism, and adds the message configuration block into a message block chain if the message configuration block passes the verification.
Step S502, generating a message filtering configuration information set.
Specifically, the group identifier is used as an index, and an index relationship between the group identifier and the content category of the target message is established; and associating the content type of the target message with a configuration user, and establishing a corresponding relation between the configuration user and the acquisition state of the target message to generate a message filtering configuration information set corresponding to the group identifier, wherein the acquisition state of the target message is a receiving state or a rejecting state, the receiving state is used for representing the configuration user to receive the message content corresponding to the content type of the target message, and the rejecting state is used for representing the configuration user to reject the state of the message content corresponding to the content type of the target message. Before generating a message filtering configuration information set, acquiring a message filtering configuration information set corresponding to the group identifier, if the message filtering configuration information set exists, directly updating the message filtering configuration information set according to the target message configuration parameter, namely adding data in the acquired target message configuration parameter into the message filtering configuration information set, and specifically determining the adding position of the target message configuration parameter in the message filtering configuration information set through the group identifier in the target message configuration parameter, the content type of the target message and a configuration user; if the message filtering configuration information set corresponding to the group identifier does not exist, generating a message filtering configuration information set according to the incidence relation among all parameters in the target message configuration parameters, wherein a branch line arbitrarily associated in the message filtering configuration information set can determine a complete message filtering data, and the branch line comprises the group identifier, the message content category and the incidence relation among the configuration users. The message filtering configuration information set may be as shown in fig. 3, or may also be as shown in fig. 8, where fig. 8 is another message filtering configuration information set diagram provided in this embodiment of the present application.
For example, if the obtained message filtering configuration information set is as shown in fig. 3, based on the example in step S501, an example graph generated from the message filtering configuration information set as shown in fig. 9a may be obtained, as shown in fig. 9a, the group identifier 1 is used as an index, an index relationship between the group identifier 1 and three message content categories of landscape, advertisement and food is established, it is known that the user a, the user B and the user C configure the message acquisition status of landscape messages, the user C configures the message acquisition status of advertisement messages, the user a configures the message acquisition status of food messages, the landscape is respectively associated with the user a, the user B and the user C, and a corresponding relationship between each configured user and each message acquisition status is established, a message filtering configuration information set as shown in fig. 9a is generated, one branch in the message filtering configuration information set may determine a complete message filtering data, for example, "group id 1-landscape-user a-reject", the message filtering data "user a rejects landscape type messages in the group corresponding to the group id 1" is determined. If the obtained message filtering configuration information set is shown in fig. 8, based on the example in step S501, another message filtering configuration information set generation example shown in fig. 9B may be obtained, as shown in fig. 9B, the group identifier 1 is used as an index, an index relationship between the group identifier 1 and three group members, i.e., the user a, the user B, and the user C, is established, it is known that the user a inputs two message acquisition state configurations, the user B inputs one message acquisition state configuration, the user C inputs two message acquisition state configurations, the user a and the two message acquisition state configurations input by the user a are associated, the user B and the one message acquisition state configuration input by the user B are associated, the user C and the two message acquisition state configurations input by the user C are associated, and a message filtering configuration information set shown in fig. 9B is generated, a branch in the message filtering configuration information set may determine a complete message filtering data, such as "group id 1-user a-configuration 1", and determine the message filtering data "user a rejects the landscape message in the group corresponding to the group id 1".
Step S503, receiving a message sending request sent by the client, where the message sending request includes a message identifier, a group identifier, and a message content.
Specifically, refer to the detailed description shown in step S201 in fig. 2, which is not repeated herein.
Step S504 determines the data type of the message content.
Specifically, the data type of the message content is determined according to the message content in the acquired message sending request, and the data type of the message content includes video messages, image messages, text messages, voice messages, link messages and the like. If the message content is a playable message and has a playing time length, the data type of the message content is a video message; if the message content is a single image, the data type of the message content is an image message; if the message content is a plain text, the data type of the message content is a text message; if the message content is voice, the data type of the message content is voice message; if the message content is clickable message, the data type of the message content is link message and the like. Specifically, the suffix name and the component element of the message content may be extracted, and the data type of the message content may be determined, for example, the data type of the message content with the suffix name of jpg is an image message, the data type of the message content with the suffix name of avi is a video message, the data type of the message content with the component element being a text message, and the data type of the message content with the component element being a hyperlink address is a link message.
Step S505, inputting the data type of the message content into the message classification model to obtain the message content category corresponding to the message content, and obtaining the message filtering configuration information corresponding to the message content category from the message filtering configuration information set.
Specifically, according to the data type of the message content, the message content is input into a corresponding message classification model to obtain a message content category corresponding to the message content category, and then message filtering configuration information corresponding to the message content category is obtained from a message filtering configuration information set. The message classification model includes, but is not limited to, an image classification model, a text classification model, and the like.
Specifically, if the message content is a video message, each video frame in the video message is composed into a combined image; and inputting the combined image into a message classification model to obtain a message content class corresponding to the message content, wherein the used message classification model is an image classification model, and the image classification model is obtained based on an image sample and an image class sample. If the message content is a text message, splitting the text message to obtain a plurality of participles; extracting key participles in the participles according to the parts of speech of the participles, converting the key participles into key participle vectors, inputting the key participle vectors into a message classification model to obtain message content classes corresponding to the message content, wherein the used message classification model is a text classification model, and the text classification model is obtained by training based on a text message sample and a text message class sample. If the message content is a link message, determining the legality of the link message according to the format of the hyperlink address of the link message, if the hyperlink address of the link message cannot be accessed or the format of the hyperlink address is incomplete, sending a link message invalidation prompt to a client, and if the link message is legal, acquiring link data corresponding to the link message, extracting character data in the link data to input the character data into a character classification model, extracting image data or video data in the link data to input the image classification model, and acquiring the message content category corresponding to the message content. If the message content is a voice message, the voice message is converted into a text message, and the message content category corresponding to the voice message is obtained through the classification process of the text message.
Taking a video message as an example, a process of obtaining message filtering configuration information corresponding to the video message specifically refers to fig. 10, and fig. 10 is a schematic view of a video message filtering scene provided in an embodiment of the present application, as shown in fig. 10, when it is determined that the message content is the video message 1001, a video image of each frame constituting the video message 1001 is extracted, the video image of each frame is combined into a combined image 1002, message filtering configuration information corresponding to the video message is obtained through the combined image 1002, and a process of determining the message filtering configuration information of the video message is shown in 1004 in fig. 10. The process 1004 for determining the message filtering configuration information of the video message specifically includes inputting each frame of video image in the combined image into a message classification model respectively to obtain a message content category corresponding to each frame of video image, sorting the message content category corresponding to each frame of image to obtain a message content category corresponding to the video message, and obtaining the message filtering configuration information corresponding to the video message from a message filtering configuration information set according to the message content category corresponding to the video message, specifically obtaining the message filtering configuration information corresponding to the video message according to "video message- > message content category- > message filtering configuration information". Wherein, in the process 1004 for determining the message filtering configuration information of the video message, the message content categories corresponding to each frame image are sorted, and the message content categories corresponding to each frame image are deduplicated so that no repeated message content categories appear in the message content categories corresponding to the finally obtained video message, optionally, the message content categories corresponding to each frame image can be weighted to obtain the message content categories corresponding to the video image, for example, smaller weights are added to the message content categories at the start position and the end position of the video message, larger weights are added to the middle position of the video message, the message content categories corresponding to each frame image are weighted to obtain the final weight of each message content category, and the message content category with the weight larger than a preset weight threshold or p message content categories with the largest weight are determined as the message content categories corresponding to the video content, p is a positive integer, and p is a preset number of categories. If the message content is an image message, the image message is directly input into the image classification model, and the message content category corresponding to the image message is obtained.
If the message filtering configuration information set is as shown in fig. 3, after determining the message content type corresponding to the message content, the message filtering configuration information corresponding to the message content is determined directly according to the association relationship between the message content type in the message filtering configuration information set and the configuration user, the content type description, and the like. If the message filtering configuration information set is as shown in fig. 8, after determining the message content category corresponding to the message content, acquiring the user identifier associated with the message content category and the message acquisition state corresponding to the message content category in the configuration, and determining the message filtering configuration information corresponding to the message content according to the user identifier associated with the message content category and the message acquisition state corresponding to the message content category; or, after determining the message content category corresponding to the message content, acquiring a user identifier associated with the message content category, in the structure shown in fig. 8, acquiring adjacent node data, previous node data, and the like of the message content category, and recording the acquired data associated with the message content category through the structure shown in fig. 3, thereby determining the message filtering configuration information corresponding to the message content, for example, after obtaining the message content category 2, acquiring data associated with the message content category 2, including data in configuration 1 of user identifier 2 and user identifier 2 in the message filtering configuration information set with group identifier 1 as an index, and recording data associated with the message content category 2 through the structure shown in fig. 3, thereby obtaining "group identifier 1-message content category 2-user identifier 2-message acquiring state", thereby obtaining the message filtering configuration information corresponding to the message content category 2.
Step S506, a message filtering block is generated according to the message filtering configuration information, and the message filtering block is uploaded to the message block chain.
Specifically, the message sending request further comprises a sending user, and a block to be verified is generated according to the group identifier, the sending user, the message content and the message filtering configuration information corresponding to the message content category; and verifying the block to be verified according to a consensus mechanism, if the block to be verified passes the verification, generating a message filtering block according to the block to be verified and the message block chain, and adding the message filtering block into the message block chain.
Based on the example shown in step S203 in fig. 2, knowing that the group identifier is the group identifier 1, the sending user is the user a, the message content is an image, the message content category is "landscape and advertisement", the message filtering configuration information "number ID1 corresponding to the message content category" landscape "indicates that the user is configured with a message such as a landscape-only image, text, or link: refusing by user A, refusing by user B and receiving by user C, message filtering configuration information ' number ID2 corresponding to message content type ' advertisement ', message of content type description-advertisement type image, text or link, etc., configuring user: and if the user C refuses the connection and the user D refuses the connection, generating a to-be-verified block according to the information filtering configuration information corresponding to the group identifier 1, the user A, the image and the landscape and the information filtering configuration information corresponding to the advertisement, carrying out consensus verification on the to-be-verified block, generating an information filtering block according to the to-be-verified block and the information block chain, and adding the information filtering block into the information block chain.
Step S507, determining a receiving user of the message content, and sending the message content to a receiving terminal of the receiving user.
Specifically, message filtering configuration information corresponding to a message content category is obtained, and a plurality of associated users associated with the message content category are obtained based on the message filtering configuration information; determining the message acquisition state of each associated user for the message content category based on the message filtering configuration information, and determining the associated user with the message acquisition state as a rejection associated user in the plurality of associated users, wherein the rejection state is the state of rejecting the message content corresponding to the message content category; and acquiring the group members in the group corresponding to the group identification, and determining the outdoor group members for excluding the switch in the group members as receiving users of the message content. The specific receiving user determination process can be referred to as the specific description in step S204 in fig. 2. The receiving user 1005 shown in fig. 10 may be participated in, obtain a group member in the group corresponding to the group identifier through the group identifier, determine a rejection associated user "group member 2, …, and group member m" in the group member, determine a group member other than the rejection associated user in the group member as a receiving user of the message content, and send the message content to a receiving terminal of the receiving user. If the receiving user comprises the sending user, the message content is not sent to the receiving terminal of the sending user when the message content is sent to the receiving terminal of the receiving user.
Step S508, obtaining a message filtering result sent by the receiving terminal, and if the message filtering result is a message filtering abnormal result, updating the message classification model.
Specifically, a message filtering result sent by a receiving terminal is obtained, a filtering result block is generated according to the message filtering result, and the filtering result block is uploaded to a message block chain; the message filtering result is used for representing the accuracy of the filtering result fed back by the receiving terminal aiming at the message content, and the message filtering result comprises a message filtering abnormal result or a message filtering normal result; and if the message filtering result is a message filtering abnormal result, adjusting the class label of the message content according to the message filtering abnormal result, and updating the message classification model according to the message content and the adjusted class label. The message filtering result comprises message content, a message content category corresponding to the message content and a receiving result of the message content. Specifically, when a group member receives a message content, the group member finds that the message content belongs to a message content type of a rejection state configured by the group member, and sends a message filtering result to a message filtering system through a receiving terminal, after the message filtering system obtains the message filtering result, the message content type in the message filtering result is used as a type label of the message content, and the type label and the message content are input into a message classification model for training, so that the message classification model is updated; or when the group member knows that a message content which the group member should receive is not sent to the receiving terminal of the group member, the group member sends a message filtering result to the message filtering system through the receiving terminal, and the message filtering system updates the message classification model through the message filtering result.
Optionally, after obtaining the message filtering configuration information corresponding to a certain message content, obtaining multiple associated users associated with the message content category based on the message filtering configuration information, determining the message obtaining states of the multiple associated users for the message content category based on the message filtering configuration information, if there is a receiving associated user whose message obtaining state is a receiving state among the multiple associated users, when sending the message content to a receiving terminal of the receiving user, prompting the receiving associated user, for example, if the user C is the receiving associated user, when sending the message content to the receiving terminal of the user C, a prompting message for the user C, such as "@ user C", may be added, so that the user may obtain the message content of the own key attention in time.
The method comprises the steps of receiving a message sending request sent by a client, wherein the message sending request comprises a message identifier, a group identifier and message content; acquiring a message filtering configuration information set corresponding to the group identification from the message block chain, wherein the message filtering configuration information set comprises message filtering configuration information associated with a plurality of users and a plurality of message content categories; identifying the message content type corresponding to the message content through a message classification model, and obtaining message filtering configuration information corresponding to the message content type from a message filtering configuration information set; and determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content category, and sending the message content to a receiving terminal of the receiving user. When receiving the group message sent by the client, the group member which is set to receive the group message or not set to reject the group message is determined as the receiving user through each message filtering configuration information which is set by the user in a customized way, the group message is sent to the receiving terminal of the receiving user, so that the group message is filtered in a customized way, invalid messages received by the user through the group are reduced, for example, the user does not receive advertisement and scenery messages when setting the group to receive the advertisement and scenery messages, and when other group members send the advertisement or scenery messages in the group, the server does not send the messages to the user, so that each group member in the group can reduce the number of uninterested or invalid messages received by the group member through the customized message filtering setting, the high efficiency of group message management and the intellectualization and effectiveness of group message sending are improved, thereby improving the searching efficiency of the group message. Meanwhile, a message sending request sent by the client, the determined message content type corresponding to the message content and the like are uploaded to the message block chain, so that the data tampering condition in the message sending process is avoided, the data generated in the message sending process can be traced, and the accuracy of message processing is improved.
Referring to fig. 11, fig. 11 is a schematic view of a message filtering apparatus provided in an embodiment of the present application, and as shown in fig. 11, the message filtering apparatus 110 may be used in the electronic device in the embodiment corresponding to fig. 2 or fig. 5, specifically, the apparatus may include: the device comprises a receiving module 1c, a first obtaining module 2c, an identifying module 3c, a second obtaining module 4c, a determining module 5c and a sending module 6 c.
A receiving module 1c, configured to receive a message sending request sent by a client, where the message sending request includes a message identifier, a group identifier, and a message content;
a first obtaining module 2c, configured to obtain, from a message block chain, a message filtering configuration information set corresponding to the group identifier, where the message filtering configuration information set includes message filtering configuration information associated with multiple users and multiple message content categories;
the identification module 3c is used for identifying the message content category corresponding to the message content through a message classification model;
a second obtaining module 4c, configured to obtain, from the message filtering configuration information set, message filtering configuration information corresponding to the message content category;
a determining module 5c, configured to determine, according to the message filtering configuration information corresponding to the message content category, a receiving user of the message content;
a sending module 6c, configured to send the message content to a receiving terminal of the receiving user.
Wherein the determining module 5c includes:
an obtaining unit 51c, configured to obtain message filtering configuration information corresponding to the message content category, and obtain, based on the message filtering configuration information, a plurality of associated users associated with the message content category;
a first determining unit 52c, configured to determine, based on the message filtering configuration information, a message acquisition status of each associated user for the message content category, and determine, among the multiple associated users, an associated user whose message acquisition status is a rejection status as a rejection associated user, where the rejection status is a status of rejecting message content corresponding to the message content category;
the second determining unit 53c is configured to obtain a group member in the group corresponding to the group identifier, and determine, as a receiving user of the message content, a group member of the group member other than the rejecting switch.
Wherein, the identification module 3c comprises:
an extracting unit 31c, configured to, if the message content is a video message, combine each video frame in the video message into a combined image;
the learning unit 32c is configured to input the combined image into the message classification model to obtain a message content category corresponding to the message content, where the message classification model is an image classification model, and the image classification model is obtained by training based on an image sample and an image category sample.
Wherein, the identification module 3c further comprises:
a splitting unit 33c, configured to split the text message to obtain multiple word segments if the message content is a text message;
the conversion unit 34c is configured to extract a key participle from the multiple participles according to the part of speech of the multiple participles, and convert the key participle into a key participle vector;
the learning unit 32c is further configured to input the key word segmentation vector into the message classification model to obtain a message content category corresponding to the message content, where the message classification model is a text classification model, and the text classification model is obtained by training based on a text message sample and a text message category sample.
Wherein the message sending request further comprises a sending user;
the apparatus 110 further comprises:
a first generating module 7c, configured to generate a block to be verified according to the group identifier, the sending user, the message content, and the message filtering configuration information corresponding to the message content category;
the verification module 8c is used for verifying the block to be verified according to a consensus mechanism;
the first generating module 7c is further configured to generate a message filtering block according to the block to be verified and the message block chain if the verification passes;
an uplink module 9c, configured to add the message filtering block to the message block chain, and execute, by the determining module 5c, the step of determining the receiving user of the message content according to the message filtering configuration information corresponding to the message content type.
Wherein the apparatus 110 further comprises:
a third obtaining module 10c, configured to obtain a message filtering result sent by the receiving terminal; the message filtering result is used for representing the accuracy of the filtering result fed back by the receiving terminal aiming at the message content, and the message filtering result comprises a message filtering abnormal result or a message filtering normal result;
the first generating module 7c is further configured to generate a filtering result block according to the message filtering result;
the uplink module 9c is further configured to upload the filtering result block to a message block chain;
and the updating module 11c is configured to, if the message filtering result is the message filtering abnormal result, adjust the category label of the message content according to the message filtering abnormal result, and update the message classification model according to the message content and the adjusted category label.
Wherein the apparatus 110 further comprises:
a fourth obtaining module 12c, configured to obtain target message configuration parameters received within a target time range, where the target message configuration parameters include a configuration user, the group identifier, a target message content category, and a target message obtaining state, and the target message configuration parameters carry a digital signature, where the digital signature is obtained by the configuration user by encrypting the target message configuration parameters based on a private key of the configuration user;
the first generating module 7c is further configured to generate a message configuration block according to the target message configuration parameter;
the verification module 8c is further configured to verify the message configuration block through a consensus mechanism;
the uplink module 9c is further configured to add the message configuration block to the message block chain if the verification is passed;
a second generating module 13c, configured to generate the message filtering configuration information set according to the target message configuration parameter.
Wherein the second generating module 13c includes:
an indexing unit 131c, configured to use the group identifier as an index, and establish an index relationship between the group identifier and the target message content category;
the associating unit 132c is configured to associate the target message content category with the configuration user, and establish a corresponding relationship between the configuration user and the target message obtaining state to generate a message filtering configuration information set corresponding to the group identifier, where the target message obtaining state is a receiving state or a rejecting state, the receiving state is used to represent that the configuration user receives the message content corresponding to the target message content category, and the rejecting state is used to represent that the configuration user rejects the message content corresponding to the target message content category.
The embodiment of the application provides a message filtering device, which receives a message sending request sent by a client, wherein the message sending request comprises a message identifier, a group identifier and message content; acquiring a message filtering configuration information set corresponding to the group identification from the message block chain, wherein the message filtering configuration information set comprises message filtering configuration information associated with a plurality of users and a plurality of message content categories; identifying the message content type corresponding to the message content through a message classification model, and obtaining message filtering configuration information corresponding to the message content type from a message filtering configuration information set; and determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content category, and sending the message content to a receiving terminal of the receiving user. When receiving the group message sent by the client, the group member which is set to receive the group message or not set to reject the group message is determined as the receiving user through each message filtering configuration information which is set by the user in a customized way, the group message is sent to the receiving terminal of the receiving user, so that the group message is filtered in a customized way, invalid messages received by the user through the group are reduced, for example, the user does not receive advertisement and scenery messages when setting the group to receive the advertisement and scenery messages, and when other group members send the advertisement or scenery messages in the group, the server does not send the messages to the user, so that each group member in the group can reduce the number of uninterested or invalid messages received by the group member through the customized message filtering setting, the high efficiency of group message management and the intellectualization and effectiveness of group message sending are improved, thereby improving the searching efficiency of the group message. Meanwhile, a message sending request sent by the client, the determined message content type corresponding to the message content and the like are uploaded to the message block chain, so that the data tampering condition in the message sending process is avoided, the data generated in the message sending process can be traced, and the accuracy of message processing is improved.
Referring to fig. 12, fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 12, the electronic device in the embodiment of the present application may include: one or more processors 1201, memory 1202, and input-output interface 1203. The processor 1201, the memory 1202, and the input/output interface 1203 are connected by a bus 1204. The memory 1202 is for storing a computer program comprising program instructions, the input output interface 1203 being for interacting with the respective participating nodes; the processor 1201 is configured to execute the program instructions stored in the memory 1202 to perform the following operations:
receiving a message sending request sent by a client, wherein the message sending request comprises a message identifier, a group identifier and message content;
acquiring a message filtering configuration information set corresponding to the group identifier from a message block chain, wherein the message filtering configuration information set comprises message filtering configuration information associated with a plurality of users and a plurality of message content categories;
identifying the message content category corresponding to the message content through a message classification model, and obtaining message filtering configuration information corresponding to the message content category from the message filtering configuration information set;
and determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content category, and sending the message content to a receiving terminal of the receiving user.
In some possible embodiments, the processor 1201 may be a Central Processing Unit (CPU), and the processor may be other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 1202 may include both read-only memory and random access memory, and provides instructions and data to the processor 1201 and the input output interface 1203. A portion of the memory 1202 may also include non-volatile random access memory. For example, memory 1202 may also store device type information.
In a specific implementation, the electronic device may execute, through each built-in functional module thereof, the implementation manner provided in each step in fig. 2 or fig. 5, which may be specifically referred to the implementation manner provided in each step in fig. 2 or fig. 5, and is not described herein again.
The embodiment of the present application provides an electronic device, including: the message filtering method comprises a processor, an input/output interface and a memory, wherein the processor acquires computer instructions in the memory, and executes the steps of the method shown in the figure 2 or the figure 5 to perform message filtering operation. Through computer instructions in the memory, the processor executes a received message sending request, acquires a message filtering configuration information set according to the message sending request, obtains a message content category corresponding to the message content in the message sending request, acquires message filtering configuration information corresponding to the message content category from the message filtering configuration information set, thereby determining a receiving user of the message content according to the message filtering configuration information, and performs uplink operation and the like on data generated in the message filtering process, so that each participating node in the message filtering system can acquire message filtering data and the like generated in the message sending process at any time, update a message classification model and the like according to the message filtering data and the like, and simultaneously generate a message filtering configuration information set according to the user-defined message filtering data so as to realize control on message sending in a group through the message filtering configuration information set, the user can only receive the group message which the user wants to receive, so that invalid or useless messages received by the group members are reduced, and the efficiency and the intelligence of message filtering are improved.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a processor, the message filtering method provided in each step in fig. 2 or fig. 5 is implemented, which may specifically refer to the implementation manner provided in each step in fig. 2 or fig. 5, and is not described herein again.
The computer-readable storage medium may be the message filtering apparatus provided in any of the foregoing embodiments or an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device. The computer readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) card, a flash card (flash card), and the like, which are provided on the electronic device. Further, the computer readable storage medium may also include both an internal storage unit and an external storage device of the electronic device. The computer-readable storage medium is used for storing the computer program and other programs and data required by the electronic device. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
The term "comprises" and any variations thereof in the description and claims of the embodiments of the present application and in the drawings is intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or apparatus that comprises a list of steps or elements is not limited to the listed steps or modules, but may alternatively include other steps or modules not listed or inherent to such process, method, apparatus, product, or apparatus.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The method and the related apparatus provided by the embodiments of the present application are described with reference to the flowchart and/or the structural diagram of the method provided by the embodiments of the present application, and each flow and/or block of the flowchart and/or the structural diagram of the method, and the combination of the flow and/or block in the flowchart and/or the block diagram can be specifically implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block or blocks of the block diagram. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block or blocks of the block diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block or blocks.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (10)

1. A method for message filtering, the method comprising:
receiving a message sending request sent by a client, wherein the message sending request comprises a message identifier, a group identifier, message content and a sending user;
acquiring a message filtering configuration information set corresponding to the group identifier from a message block chain, wherein the message filtering configuration information set comprises message filtering configuration information associated with a plurality of users and a plurality of message content categories;
identifying the message content category corresponding to the message content through a message classification model, and obtaining message filtering configuration information corresponding to the message content category from the message filtering configuration information set;
generating a block to be verified according to the group identifier, the sending user, the message content and message filtering configuration information corresponding to the message content category;
verifying the block to be verified according to a consensus mechanism, if the block to be verified passes the verification, generating a message filtering block according to the block to be verified and the message block chain, and adding the message filtering block into the message block chain;
and determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content category, and sending the message content to a receiving terminal of the receiving user.
2. The method of claim 1, wherein the determining the receiving user of the message content according to the message filtering configuration information corresponding to the message content category comprises:
acquiring message filtering configuration information corresponding to the message content category, and acquiring a plurality of associated users associated with the message content category based on the message filtering configuration information;
determining the message acquisition state of each associated user aiming at the message content category based on the message filtering configuration information, and determining the associated user of which the message acquisition state is a rejection state as a rejection associated user among the associated users, wherein the rejection state is a state of rejecting the message content corresponding to the message content category;
and acquiring the group members in the group corresponding to the group identification, and determining the group members, except the group members for which the rejection switch is used, as the receiving users of the message content.
3. The method of claim 1, wherein said identifying a message content category to which the message content corresponds via a message classification model comprises:
if the message content is a video message, each video frame in the video message is combined into a combined image;
and inputting the combined image into the message classification model to obtain a message content category corresponding to the message content, wherein the message classification model is an image classification model, and the image classification model is obtained based on an image sample and an image category sample.
4. The method of claim 1, wherein said identifying a message content category to which the message content corresponds via a message classification model comprises:
if the message content is a text message, splitting the text message to obtain a plurality of word segments;
extracting key participles in the participles according to the parts of speech of the participles, converting the key participles into key participle vectors, inputting the key participle vectors into the message classification model to obtain message content categories corresponding to the message content, wherein the message classification model is a text classification model, and the text classification model is obtained by training based on text message samples and text message category samples.
5. The method of claim 1, wherein the method further comprises:
acquiring a message filtering result sent by the receiving terminal, generating a filtering result block according to the message filtering result, and uploading the filtering result block to a message block chain; the message filtering result is used for representing the accuracy of the filtering result fed back by the receiving terminal aiming at the message content, and the message filtering result comprises a message filtering abnormal result or a message filtering normal result;
if the message filtering result is the message filtering abnormal result, adjusting the class label of the message content according to the message filtering abnormal result, and updating the message classification model according to the message content and the adjusted class label.
6. The method of claim 1, wherein the method further comprises:
acquiring target message configuration parameters received in a target time range, wherein the target message configuration parameters comprise a configuration user, the group identifier, a target message content category and a target message acquisition state, and the target message configuration parameters carry a digital signature, and the digital signature is obtained by encrypting the target message configuration parameters by the configuration user based on a private key of the configuration user;
and generating a message configuration block according to the target message configuration parameter, verifying the message configuration block through a consensus mechanism, adding the message configuration block into the message block chain if the verification is passed, and generating the message filtering configuration information set according to the target message configuration parameter.
7. The method of claim 6, wherein said generating the set of message filtering configuration information according to the target message configuration parameter comprises:
taking the group identification as an index, and establishing an index relation between the group identification and the target message content category;
and associating the target message content type with the configuration user, and establishing a corresponding relationship between the configuration user and the target message acquisition state to generate a message filtering configuration information set corresponding to the group identifier, wherein the target message acquisition state is a receiving state or a rejecting state, the receiving state is used for representing that the configuration user receives the message content corresponding to the target message content type, and the rejecting state is used for representing that the configuration user rejects the message content corresponding to the target message content type.
8. An apparatus for filtering messages, the apparatus comprising:
the receiving module is used for receiving a message sending request sent by a client, wherein the message sending request comprises a message identifier, a group identifier, message content and a sending user;
a first obtaining module, configured to obtain, from a message block chain, a message filtering configuration information set corresponding to the group identifier, where the message filtering configuration information set includes message filtering configuration information associated with multiple users and multiple message content categories;
the identification module is used for identifying the message content category corresponding to the message content through a message classification model;
the second acquisition module is used for acquiring the message filtering configuration information corresponding to the message content category from the message filtering configuration information set;
the first generation module is used for generating a block to be verified according to the group identifier, the sending user, the message content and the message filtering configuration information corresponding to the message content category;
the verification module is used for verifying the to-be-verified block according to a consensus mechanism;
the first generating module is further configured to generate a message filtering block according to the block to be verified and the message block chain if the verification passes;
an uplink module, configured to add the message filter block to the message block chain;
the determining module is used for determining a receiving user of the message content according to the message filtering configuration information corresponding to the message content category;
and the sending module is used for sending the message content to a receiving terminal of the receiving user.
9. An electronic device, comprising a processor, a memory, an input-output interface;
the processor is connected to the memory and the input/output interface, respectively, wherein the input/output interface is used for interacting with each participating node, the memory is used for storing program codes, and the processor is used for calling the program codes to execute the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method according to any one of claims 1-7.
CN201910980200.0A 2019-10-15 2019-10-15 Message filtering method and device Active CN110650083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910980200.0A CN110650083B (en) 2019-10-15 2019-10-15 Message filtering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910980200.0A CN110650083B (en) 2019-10-15 2019-10-15 Message filtering method and device

Publications (2)

Publication Number Publication Date
CN110650083A CN110650083A (en) 2020-01-03
CN110650083B true CN110650083B (en) 2021-04-13

Family

ID=69012867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910980200.0A Active CN110650083B (en) 2019-10-15 2019-10-15 Message filtering method and device

Country Status (1)

Country Link
CN (1) CN110650083B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760258B (en) * 2021-01-12 2023-05-09 中国联合网络通信集团有限公司 Group message processing method, device, computer equipment and storage medium
CN115037716B (en) * 2021-07-23 2023-08-11 北京字跳网络技术有限公司 Information processing method, device, terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453064A (en) * 2016-12-06 2017-02-22 腾讯科技(深圳)有限公司 Message propagation method, device, server and system
CN107124349A (en) * 2017-04-25 2017-09-01 北京小米移动软件有限公司 Information transferring method and device
CN108306819A (en) * 2018-04-20 2018-07-20 网易(杭州)网络有限公司 Instant communicating system implementation method, medium and computing device based on block chain
CN109245993A (en) * 2018-09-07 2019-01-18 中链科技有限公司 Instant communication method and device based on block chain

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109274573B (en) * 2018-07-12 2021-03-23 华泰证券股份有限公司 Instant message system and method fusing block chain technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453064A (en) * 2016-12-06 2017-02-22 腾讯科技(深圳)有限公司 Message propagation method, device, server and system
CN107124349A (en) * 2017-04-25 2017-09-01 北京小米移动软件有限公司 Information transferring method and device
CN108306819A (en) * 2018-04-20 2018-07-20 网易(杭州)网络有限公司 Instant communicating system implementation method, medium and computing device based on block chain
CN109245993A (en) * 2018-09-07 2019-01-18 中链科技有限公司 Instant communication method and device based on block chain

Also Published As

Publication number Publication date
CN110650083A (en) 2020-01-03

Similar Documents

Publication Publication Date Title
US11323407B2 (en) Methods, systems, apparatuses, and devices for facilitating managing digital content captured using multiple content capturing devices
CN110781668B (en) Text information type identification method and device
KR20210047350A (en) Attendance management system, method and electronic device
KR20200086660A (en) System for securing a personal digital assistant with stacked data structures
CN109039671A (en) Group message display methods, device, terminal and storage medium
CN110650083B (en) Message filtering method and device
CN112989186B (en) Information recommendation model training method and device, electronic equipment and storage medium
CN111125420A (en) Object recommendation method and device based on artificial intelligence and electronic equipment
CN110943960B (en) Court trial record electronic signature generation method, device, equipment and medium
CN114422271B (en) Data processing method, device, equipment and readable storage medium
CN113472883A (en) Method, device and equipment for storing data based on block chain and storage medium
CN113626624B (en) Resource identification method and related device
CN117009483A (en) Method, device and equipment for generating question-answering service and readable storage medium
CN113571048B (en) Audio data detection method, device, equipment and readable storage medium
CN111510446A (en) Attack detection method and device, electronic equipment and storage medium
Pooja et al. Face detection using deep learning to ensure a coercion resistant blockchain-based electronic voting
CN109544165B (en) Resource transfer processing method, device, computer equipment and storage medium
CN112989308A (en) Account authentication method, device, equipment and medium
CN109388558A (en) A kind of method, apparatus, equipment and storage medium managing electronic equipment
CN108023856B (en) Information sharing method and device
CN108388811A (en) Personalized study under wechat public platform
CN112100604B (en) Terminal equipment information processing method and device
US20150358318A1 (en) Biometric authentication of content for social networks
Haugen Manipulation and deception with social bots: Strategies and indicators for minimizing impact
CN115994367A (en) Threat information system and threat information model training method

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