CN105095366A - Method and device for processing character messages - Google Patents

Method and device for processing character messages Download PDF

Info

Publication number
CN105095366A
CN105095366A CN201510369407.6A CN201510369407A CN105095366A CN 105095366 A CN105095366 A CN 105095366A CN 201510369407 A CN201510369407 A CN 201510369407A CN 105095366 A CN105095366 A CN 105095366A
Authority
CN
China
Prior art keywords
user
identifier
relationship
text message
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510369407.6A
Other languages
Chinese (zh)
Other versions
CN105095366B (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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510369407.6A priority Critical patent/CN105095366B/en
Publication of CN105095366A publication Critical patent/CN105095366A/en
Application granted granted Critical
Publication of CN105095366B publication Critical patent/CN105095366B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/38Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/381Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using identifiers, e.g. barcodes, RFIDs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/38Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a method and device for processing character messages, and belongs to the technical field of computers. The method comprises acquiring a character message to be sent from a first user to a second user in an instant conversation interface of the first user and the second user; acquiring a relationship identifier between the first user and the second user when the character message containing preset sensitive words; and processing the character message according to the relationship identifier. The relationship identifier is used for representing the degree of familiarity between the first user and the second user. The method takes the degree of familiarity between the first user and the second user to account, whether a character message needs correcting or not is determined by the degree of familiarity, so a user can quickly send a character message to a familiar friend, and character message sent to an unfamiliar friend can be corrected by using the method.

Description

Method and device for processing text message
Technical Field
The present disclosure relates to the field of computer technology, and more particularly, to a method and apparatus for processing text messages.
Background
The text communication is a common communication mode among friends, and a user can input text messages on a terminal, send the text messages to a certain friend and check the text messages by the friend. However, when a user inputs an incorrect character due to a too fast input speed or the like while inputting a character message, a friend may misunderstand the meaning of the character message, which may affect communication between two users.
In order to prevent users from inputting wrong characters, an error correction method is proposed at present, which includes establishing a personalized error correction model for users, continuously collecting and analyzing input information of the users to obtain input habit information of the users, and adjusting the established personalized error correction model according to the input habit information of the users. And then, when the user inputs wrong characters, correcting the wrong characters input by the user according to the current personalized error correction model, and sending corrected correct characters to friends.
Disclosure of Invention
In order to solve the problems in the related art, the present disclosure provides a method and an apparatus for processing a text message. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for processing a text message, the method including:
in an instant conversation interface between a first user and a second user, acquiring a text message to be sent to the second user by the first user;
when the text message contains a preset sensitive word, acquiring a relationship identifier between the first user and the second user;
processing the text message according to the relation identifier;
wherein the relationship identification is used to represent a degree of familiarity between the first user and the second user.
In another embodiment, the relationship identifier is a first identifier or a second identifier, the first identifier representing a greater familiarity than the second identifier.
In another embodiment, said processing said text message according to said relationship identifier includes:
when the relation identifier is the first identifier, sending the text message to the second user; or,
and when the relation identifier is the second identifier, performing sensitive vocabulary prompting on the first user.
In another embodiment, said sensitive vocabulary prompting said first user when said relationship identifier is said second identifier comprises:
displaying a prompt window, wherein the prompt window at least comprises one of prompt information, a sending option and a correcting option, and the prompt information is used for prompting that the text message contains sensitive words;
when the confirmation operation of the sending option is detected, sending the text message to the second user; or,
and when the confirmation operation of the correction option is detected, acquiring the corrected text message of the first user in the instant conversation interface.
In another embodiment, the method further comprises:
and determining a relationship identifier between the first user and the second user according to the historical interaction record between the first user and the second user.
In another embodiment, the determining the relationship identification between the first user and the second user according to the historical interaction record between the first user and the second user includes:
determining the occurrence frequency of preset sensitive words in the interaction process of the first user and the second user according to the historical interaction records;
and determining a relationship identifier between the first user and the second user according to the occurrence frequency.
In another embodiment, said determining the relationship identification between the first user and the second user according to the frequency of occurrence comprises:
when the occurrence frequency is greater than a first preset threshold value, determining a relationship identifier between the first user and the second user as a first identifier;
and when the occurrence frequency is not greater than the first preset threshold, determining the relationship identifier between the first user and the second user as a second identifier.
In another embodiment, the determining the relationship identification between the first user and the second user according to the historical interaction record between the first user and the second user includes:
according to the historical interaction records, determining the occurrence frequency and the correction frequency of preset sensitive words in the interaction process of the first user and the second user, wherein the correction frequency is used for indicating the correction frequency of the preset sensitive words when the first user interacts with the second user;
and determining a relationship identifier between the first user and the second user according to the occurrence frequency and the correction frequency.
In another embodiment, said determining an identity of a relationship between said first user and said second user based on said frequency of occurrence and said frequency of correction comprises:
when the occurrence frequency is not greater than a first preset threshold value, determining a relationship identifier between the first user and the second user as a second identifier;
when the occurrence frequency is greater than the first preset threshold, judging whether the correction frequency is greater than a second preset threshold; when the correction frequency is greater than the second preset threshold value, determining a relationship identifier between the first user and the second user as a second identifier; and when the correction frequency is not greater than the second preset threshold, determining the relationship identifier between the first user and the second user as a first identifier.
According to a second aspect of the embodiments of the present disclosure, there is provided a word message processing apparatus, the apparatus comprising:
the message acquisition module is used for acquiring a text message to be sent to a second user by a first user in an instant conversation interface between the first user and the second user;
the identification acquisition module is used for acquiring a relationship identification between the first user and the second user when the text message contains a preset sensitive vocabulary;
the processing module is used for processing the text message according to the relation identifier;
wherein the relationship identification is used to represent a degree of familiarity between the first user and the second user.
In another embodiment, the relationship identifier is a first identifier or a second identifier, the first identifier representing a greater familiarity than the second identifier.
In another embodiment, the processing module comprises:
the first processing unit is used for sending the text message to the second user when the relation identifier is the first identifier; or,
and the second processing unit is used for carrying out sensitive vocabulary prompting on the first user when the relation identifier is the second identifier.
In another embodiment, the second processing unit is further configured to display a prompt window, where the prompt window includes at least one of a prompt message, a sending option, and a correcting option, and the prompt message is used to prompt that the text message includes a sensitive word; when the confirmation operation of the sending option is detected, sending the text message to the second user; or when the confirmation operation of the correction option is detected, acquiring the corrected text message of the first user in the instant conversation interface.
In another embodiment, the apparatus further comprises:
and the determining module is used for determining the relationship identifier between the first user and the second user according to the historical interaction record between the first user and the second user.
In another embodiment, the determining module is further configured to determine, according to the historical interaction record, an occurrence frequency of a preset sensitive vocabulary in an interaction process between the first user and the second user; and determining a relationship identifier between the first user and the second user according to the occurrence frequency.
In another embodiment, the determining module is further configured to determine, when the occurrence frequency is greater than a first preset threshold, a relationship identifier between the first user and the second user as a first identifier; and when the occurrence frequency is not greater than the first preset threshold, determining the relationship identifier between the first user and the second user as a second identifier.
In another embodiment, the determining module is further configured to determine, according to the historical interaction record, an occurrence frequency and a correction frequency of a preset sensitive vocabulary in an interaction process between the first user and the second user, where the correction frequency is used to indicate a correction frequency of the preset sensitive vocabulary when the first user interacts with the second user; and determining a relationship identifier between the first user and the second user according to the occurrence frequency and the correction frequency.
In another embodiment, the determining module is further configured to determine the relationship identifier between the first user and the second user as a second identifier when the frequency of occurrence is not greater than a first preset threshold; when the occurrence frequency is greater than the first preset threshold, judging whether the correction frequency is greater than a second preset threshold; when the correction frequency is greater than the second preset threshold value, determining a relationship identifier between the first user and the second user as a second identifier; and when the correction frequency is not greater than the second preset threshold, determining the relationship identifier between the first user and the second user as a first identifier.
According to a third aspect of the disclosed embodiments, there is provided a word message processing apparatus, the apparatus comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
in an instant conversation interface between a first user and a second user, acquiring a text message to be sent to the second user by the first user;
when the text message contains a preset sensitive word, acquiring a relationship identifier between the first user and the second user;
processing the text message according to the relation identifier;
wherein the relationship identification is used to represent a degree of familiarity between the first user and the second user.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
one embodiment of the present disclosure includes: in an instant conversation interface between a first user and a second user, acquiring a text message to be sent to the second user by the first user. When the text message contains a preset sensitive word, acquiring a relationship identifier between the first user and the second user; and processing the text message according to the relation identifier. Wherein the relationship identification is used to represent a degree of familiarity between the first user and the second user. According to the method and the device, the relation identification between the first user and the second user is determined in advance, when the text message which is sent to the second user by the first user and contains the preset sensitive vocabulary is obtained, the relation identification between the first user and the second user is obtained, and the text message is processed according to the relation identification. And considering the familiarity between the first user and the second user, and determining whether to correct the text message according to the familiarity. The method and the device can meet the requirement that the first user quickly sends the text message to the familiar friend and can also meet the requirement of correcting the text message sent to the unfamiliar friend.
In another embodiment of the present disclosure, the relationship identifier is a first identifier or a second identifier, and the familiarity represented by the first identifier is greater than the familiarity represented by the second identifier. The present disclosure divides the relationship identification between the first user and the friends into a first identification and a second identification, thereby dividing the friends of the first user into two types: and the familiar friends and the unfamiliar friends can determine whether the second user is the familiar friend or the unfamiliar friend of the first user according to the relationship identification between the first user and the second user, and then decide whether to correct the text message. The method and the device can meet the requirement that the first user quickly sends the text message to the familiar friend and can also meet the requirement of correcting the text message sent to the unfamiliar friend.
In another embodiment of the present disclosure, the processing the text message according to the relationship identifier includes: when the relation identifier is the first identifier, sending the text message to the second user; or when the relation identifier is the second identifier, sensitive vocabulary prompting is carried out on the first user. According to the method and the device, when the second user is a friend familiar to the first user, the text message is directly sent to the second user, so that the speed of sending the text message is improved, and the requirement of quickly sending the text message is met. When the second user is a friend unfamiliar with the first user, the first user is prompted, and the first user determines whether to correct the text message, so that the first user is prevented from sending wrong text messages to unfamiliar friends, and the requirement of the first user for correcting the text messages sent to unfamiliar friends is met.
In another embodiment of the disclosure, when the relationship identifier is the second identifier, performing sensitive vocabulary prompting on the first user includes: displaying a prompt window, wherein the prompt window at least comprises one of prompt information, a sending option and a correcting option, and the prompt information is used for prompting that the text message contains sensitive words; when the confirmation operation of the sending option is detected, sending the text message to the second user; or when the confirmation operation of the correction option is detected, acquiring the corrected text message of the first user in the instant conversation interface. According to the method and the device, the prompt window is displayed, so that the first user can select to correct the text message and also can select to directly send the text message, and the operation flexibility is improved.
Another embodiment of the present disclosure, further comprising: and determining a relationship identifier between the first user and the second user according to the historical interaction record between the first user and the second user. The method and the device have the advantages that the historical interaction records between the first user and the second user are considered, the relationship identification between the first user and the second user is determined according to the historical interaction records, so that the relationship identification can accurately represent the familiarity degree between the first user and the second user, and the accuracy is improved.
In another embodiment of the present disclosure, the determining, according to the historical interaction record between the first user and the second user, the relationship identifier between the first user and the second user includes: determining the occurrence frequency of preset sensitive words in the interaction process of the first user and the second user according to the historical interaction records; and determining a relationship identifier between the first user and the second user according to the occurrence frequency. According to the method and the device, the habit that the first user sends the text message containing the sensitive words to the familiar friends and rarely sends the text message containing the sensitive words to the unfamiliar friends is considered, and the relationship identification between the first user and the second user is determined according to the occurrence frequency of the preset sensitive words in the interaction process of the first user and the second user, so that the relationship identification can reflect the familiarity between the first user and the second user more accurately, and the accuracy is improved.
In another embodiment of the present disclosure, the determining, according to the occurrence frequency, a relationship identifier between the first user and the second user includes: when the occurrence frequency is greater than a first preset threshold value, determining a relationship identifier between the first user and the second user as a first identifier; and when the occurrence frequency is not greater than the first preset threshold, determining the relationship identifier between the first user and the second user as a second identifier. The present disclosure provides a method for determining whether the relationship identifier is a first identifier or a second identifier according to the occurrence frequency of a preset sensitive word, and by dividing the relationship identifier, the friends of the first user are divided into two categories: familiar friends and unfamiliar friends to facilitate subsequent processing of text messages sent to friends based on the relationship identification.
In another embodiment of the present disclosure, the determining, according to the historical interaction record between the first user and the second user, the relationship identifier between the first user and the second user includes: according to the historical interaction records, determining the occurrence frequency and the correction frequency of preset sensitive words in the interaction process of the first user and the second user, wherein the correction frequency is used for indicating the correction frequency of the preset sensitive words when the first user interacts with the second user; and determining a relationship identifier between the first user and the second user according to the occurrence frequency and the correction frequency. The method comprises the steps that a first user sends a text message containing sensitive words to a familiar friend, but rarely sends the habit of sending the text message containing the sensitive words to an unfamiliar friend, and the habit that the first user can correct the preset sensitive words sent last time after sending the text message containing the preset sensitive words to the unfamiliar friend is considered, and the relationship identification is determined according to the occurrence frequency and the correction frequency of the preset sensitive words in the interaction process of the first user and the second user, so that the method is more suitable for the input habit of the user, and the determined relationship identification can more accurately represent the familiarity between the first user and the second user.
In another embodiment of the present disclosure, the determining the relationship identifier between the first user and the second user according to the occurrence frequency and the correction frequency includes: when the occurrence frequency is not greater than a first preset threshold value, determining a relationship identifier between the first user and the second user as a second identifier; when the occurrence frequency is greater than the first preset threshold, judging whether the correction frequency is greater than a second preset threshold; when the correction frequency is greater than the second preset threshold value, determining a relationship identifier between the first user and the second user as a second identifier; and when the correction frequency is not greater than the second preset threshold, determining the relationship identifier between the first user and the second user as a first identifier. The present disclosure provides a method for determining whether the relationship identifier is a first identifier or a second identifier according to the occurrence frequency and the correction frequency of a preset sensitive vocabulary, by dividing the relationship identifier, dividing friends of a first user into two categories: familiar friends and unfamiliar friends to facilitate subsequent processing of text messages sent to friends based on the relationship identification.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a method of text message processing in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of word message processing in accordance with an exemplary embodiment;
FIG. 3 is a block diagram illustrating a word message processing device in accordance with an exemplary embodiment;
FIG. 4 is a block diagram illustrating an apparatus for word message processing in accordance with an exemplary embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, the present disclosure is described in further detail below with reference to the embodiments and the accompanying drawings. The exemplary embodiments and descriptions of the present disclosure are provided herein for illustration of the present disclosure, but not for limitation of the present disclosure.
The embodiment of the disclosure provides a method and a device for processing a text message, and the following describes the disclosure in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a text message processing method according to an exemplary embodiment, where the text message processing method is used in a terminal, as shown in fig. 1, and includes the following steps:
in step 101, in an instant conversation interface between a first user and a second user, a text message to be sent to the second user by the first user is obtained.
In step 102, when the text message includes a preset sensitive vocabulary, a relationship identifier between the first user and the second user is obtained.
In step 103, the text message is processed according to the relationship identifier.
Wherein the relationship identifier is used for indicating the familiarity between the first user and the second user.
In one embodiment, the relationship identifier is a first identifier or a second identifier, and the familiarity represented by the first identifier is greater than the familiarity represented by the second identifier. That is, when the relationship identifier between the first user and the second user is the first identifier, it indicates that the first user and the second user are familiar, and when the relationship identifier between the first user and the second user is the second identifier, it indicates that the first user and the second user are unfamiliar. By predetermining the identity of the relationship between the first user and each friend, the friends of the first user can be divided into two categories: familiar friends and unfamiliar friends. When the first user wants to send a text message to any friend, and the text message contains a preset sensitive word, the text message can be processed according to the familiarity between the first user and the friend.
As another embodiment, the relationship identifier may also be a plurality of identifiers such as a first identifier, a second identifier, and a third identifier, that is, the relationship identifier between the first user and the friend may include 3 identifiers, 4 identifiers, or other numbers of identifiers, which is not limited in this embodiment. Each of the identifiers represents a different familiarity, the first identifier representing a greater familiarity than the second identifier, the second identifier representing a greater familiarity than the third identifier, and so on. The familiarity between the first user and the friends can be divided into a plurality of gradients by determining a plurality of relationship identifications, and when the first user sends a text message to any friend, and the text message contains a preset sensitive vocabulary, the text message can be processed according to the familiarity between the first user and the friend.
In the method provided by this embodiment, by determining in advance the relationship identifier between the first user and the second user, when the text message that is to be sent to the second user by the first user and includes the preset sensitive vocabulary is obtained, the relationship identifier between the first user and the second user is obtained, and the text message is processed according to the relationship identifier. And considering the familiarity between the first user and the second user, and determining whether to correct the text message according to the familiarity. The method and the device can meet the requirement that the first user quickly sends the text message to the familiar friend and can also meet the requirement of correcting the text message sent to the unfamiliar friend.
In another embodiment, the processing the text message according to the relationship identifier includes:
when the relation mark is the first mark, the text message is sent to the second user; or,
and when the relation identifier is the second identifier, performing sensitive vocabulary prompting on the first user.
In another embodiment, when the relationship identifier is the second identifier, performing sensitive vocabulary prompting for the first user includes:
displaying a prompt window, wherein the prompt window at least comprises one item of prompt information, a sending option and a correcting option, and the prompt information is used for prompting that the text message contains sensitive words;
when the confirmation operation of the sending option is detected, the text message is sent to the second user; or,
and when the confirmation operation of the correction option is detected, acquiring the corrected text message of the first user in the instant conversation interface.
In another embodiment, the method further comprises:
and determining the relationship identification between the first user and the second user according to the historical interaction record between the first user and the second user.
In another embodiment, the determining the relationship identification between the first user and the second user according to the historical interaction record between the first user and the second user includes:
determining the occurrence frequency of preset sensitive words in the interaction process of the first user and the second user according to the historical interaction record;
and determining the relationship identification between the first user and the second user according to the occurrence frequency.
In another embodiment, the determining the relationship identification between the first user and the second user according to the frequency of occurrence includes:
when the occurrence frequency is greater than a first preset threshold value, determining a relationship identifier between the first user and the second user as a first identifier;
and when the occurrence frequency is not greater than the first preset threshold, determining the relationship identifier between the first user and the second user as a second identifier.
In another embodiment, the determining the relationship identification between the first user and the second user according to the historical interaction record between the first user and the second user includes:
determining the occurrence frequency and the correction frequency of preset sensitive words in the interaction process of the first user and the second user according to the historical interaction record, wherein the correction frequency is used for indicating the correction frequency of the preset sensitive words when the first user interacts with the second user;
and determining the relationship identification between the first user and the second user according to the occurrence frequency and the correction frequency.
In another embodiment, the determining the relationship identification between the first user and the second user according to the occurrence frequency and the correction frequency includes:
when the occurrence frequency is not greater than a first preset threshold, determining a relationship identifier between the first user and the second user as a second identifier;
when the occurrence frequency is greater than the first preset threshold, judging whether the correction frequency is greater than a second preset threshold; when the correction frequency is greater than the second preset threshold, determining a relationship identifier between the first user and the second user as a second identifier; and when the correction frequency is not greater than the second preset threshold, determining the relationship identifier between the first user and the second user as a first identifier.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
Fig. 2 is a flowchart illustrating a text message processing method according to an exemplary embodiment, which is used in a terminal, as shown in fig. 2, and includes the steps of:
in step 201, the terminal obtains a user relationship chain of a first user, and for each second user in the user relationship chain, determines a relationship identifier between the first user and the second user according to a historical interaction record between the first user and the second user.
The first user refers to a user currently using the terminal, the terminal may log in a designated function application based on a first user identifier, where the first user identifier is used to determine the first user, and may be an account, a nickname, and the like of the first user, and the designated function application may be an application used for managing terminal contacts or a social application, and the like, which is not limited in this embodiment. The terminal may obtain a user relationship chain of the first user, where the user relationship chain includes a plurality of users, and the users may be considered as friends of the first user. The user relationship chain may include at least one of a contact in an address book of the terminal and a contact in a social application, which is not limited in this embodiment.
The terminal can interact with any user in the user relationship chain based on the first user identification, and send a message to the user or receive the message sent by the user. The interacted messages may include text messages, picture messages, audio messages, and the like, which is not limited in this embodiment. And the terminal can generate a history interaction record according to the interactive messages between the first user and the users in the user relationship chain, wherein the history interaction record comprises a plurality of messages interacted between the first user and the users.
In this embodiment, each user in the user relationship chain is taken as a second user, in order to know the familiarity between the first user and the second user, the terminal may obtain a history interaction record between the first user and the second user, where the history interaction record includes a plurality of text messages interacted between the first user and the second user, and according to the history interaction record, a relationship identifier between the first user and the second user may be determined, and the relationship identifier represents the familiarity between the first user and the second user.
The relationship identifier may include a first identifier and a second identifier, and the familiarity degree represented by the first identifier is greater than the familiarity degree represented by the second identifier. Then, the relationship identifier between the first user and the second user may be a first identifier or a second identifier, and if the relationship identifier between the first user and the second user is a first identifier, it indicates that the first user and the second user are familiar, and if the relationship identifier between the first user and the second user is a second identifier, it indicates that the first user and the second user are unfamiliar.
Considering that the first user may send a text message containing sensitive words to a familiar friend and rarely to an unfamiliar friend, the terminal determining the relationship identification from the historical interaction records may comprise step 2011:
in step 2011, the terminal determines, according to the historical interaction record, an occurrence frequency of a preset sensitive vocabulary in the interaction process between the first user and the second user, and determines, according to the occurrence frequency, a relationship identifier between the first user and the second user.
The preset sensitive vocabulary refers to a vocabulary which is considered to be inelegant and illicit, the preset sensitive vocabulary can be determined by the terminal according to the dictionary in advance, or the preset sensitive vocabulary is determined by the server according to the dictionary in advance and then is sent to the terminal, and the preset sensitive vocabulary can be continuously updated in the application process, which is not limited in the embodiment. Or presetting an inelegant and uneventful network hot word acquired by the sensitive vocabulary through the network.
In the interaction process of the first user and the second user, the higher the occurrence frequency of the preset sensitive words, the more familiar the first user and the second user can be considered, and therefore, the terminal can determine the relationship identifier of the first user and the second user according to the occurrence frequency of the preset sensitive words in the interaction process of the first user and the second user.
For example, the terminal may obtain, according to the historical interaction record, a total number of the text messages interacted between the first user and the second user, obtain the number of occurrences of a preset sensitive word in the text messages interacted between the first user and the second user, and calculate a quotient between the number of occurrences and the total number as an occurrence frequency of the preset sensitive word. The text messages interacted between the first user and the second user comprise text messages sent to the second user by the first user and text messages sent to the first user by the second user.
When the occurrence frequency of the preset sensitive words is obtained, each text message interacted between the first user and the second user can be judged respectively, the occurrence frequency of the preset sensitive words in each text message is obtained, and the sum of the occurrence frequencies of the preset sensitive words in each text message is used as the occurrence frequency of the preset sensitive words. For each text message, the terminal can acquire the keywords in the text message, judge whether the keywords in the text message are matched with a plurality of preset sensitive vocabularies or not by adopting a keyword matching technology, and determine that the text message contains one preset sensitive vocabulary when any keyword in the text message is matched with one preset sensitive vocabulary, namely, the preset sensitive vocabulary appears once. The terminal can also continuously match other keywords in the text message to determine the number of preset sensitive words contained in the text message, that is, the occurrence frequency of the preset sensitive words in the text message.
The terminal can also acquire the total number of the text messages sent by the first user to the second user according to the historical interaction record, acquire the occurrence frequency of preset sensitive words in the text messages sent by the first user to the second user, and calculate the quotient between the occurrence frequency and the total number to serve as the occurrence frequency of the preset sensitive words.
When the occurrence frequency of the preset sensitive words is obtained, each text message sent by the first user to the second user can be judged respectively, the occurrence frequency of the preset sensitive words in each text message is obtained, and the sum of the occurrence frequencies of the preset sensitive words in each text message is used as the occurrence frequency of the preset sensitive words.
After the occurrence frequency of the preset sensitive vocabulary is determined, the terminal can judge whether the occurrence frequency of the preset sensitive vocabulary is greater than a first preset threshold, if the occurrence frequency is greater than the first preset threshold, it indicates that the first user and the second user frequently interact text messages containing the preset sensitive vocabulary, and the first user and the second user are familiar with each other, and then the relationship identifier between the first user and the second user is determined as the first identifier. And if the occurrence frequency is not greater than the first preset threshold value, the first user and the second user rarely interact text messages containing preset sensitive words, and the first user and the second user are unfamiliar, determining the relationship identifier between the first user and the second user as the second identifier. The first preset threshold may be determined by counting occurrence frequencies of preset sensitive words in an interaction process between the first user and each user in the user relationship chain, and may be an average value of the occurrence frequencies of the preset sensitive words in the interaction process between the first user and the multiple users, where the first preset threshold may be 0.2, 0.4, or another numerical value, and this embodiment is not limited thereto.
In addition, if the first user frequently sends a message containing a preset sensitive vocabulary to the second user due to too fast input speed or unskilled input operation, the first user is likely to resend a new text message after sending a text message containing the preset sensitive vocabulary to the second user when the first user is actually not familiar with the second user, so as to correct the previously sent preset sensitive vocabulary. To this end, the terminal determining the relationship identifier according to the historical interaction record may include step 2012:
step 2012, the terminal determines the occurrence frequency and the correction frequency of the preset sensitive vocabulary in the interaction process between the first user and the second user according to the historical interaction record, and determines the relationship identifier between the first user and the second user according to the occurrence frequency and the correction frequency.
The correction frequency is used for indicating the correction frequency of the preset sensitive words when the first user interacts with the second user. When the first user sends a text message to the second user, the terminal can detect the behavior of the first user for correcting the preset sensitive words, obtain the correction times of the first user, calculate the occurrence times of the preset sensitive words in the text message sent by the first user to the second user, and calculate the quotient between the correction times and the occurrence times as the correction frequency of the preset sensitive words. The step of calculating the occurrence frequency of the preset sensitive words is similar to the step 2011, and is not repeated here.
When a first user sends a text message to a second user, in order to detect the behavior of the first user to correct a preset sensitive word, for each text message sent by the first user to the second user, the terminal can judge whether the text message contains preset sensitive words, if the text message contains the preset sensitive words, the text message with preset number sent after the text message is obtained, whether the text message with the preset number contains normal words similar to the preset sensitive words is judged, if the preset number of text messages contain normal words similar to the preset sensitive words, the first user is indicated to transmit the preset sensitive words, and retransmitting the normal vocabulary similar to the preset sensitive vocabulary, wherein the normal vocabulary is transmitted for correcting the preset sensitive vocabulary, namely the first user corrects the preset sensitive vocabulary once. By adopting the method, the behavior of the first user for correcting the preset sensitive vocabulary can be detected for multiple times, and the correction times of the first user can be determined.
The normal vocabulary is a vocabulary except for the preset sensitive vocabulary, and the preset number is predetermined by the terminal and can be a numerical value of 1, 2, 3, etc., which is not limited in this embodiment.
In this embodiment, the Chinese vocabulary is taken as an example, and when the pinyin of two different vocabularies is the same, the two vocabularies can be considered to be similar. The terminal can obtain the pinyin of the preset sensitive vocabulary when judging whether the preset number of text messages contain the normal vocabulary similar to the preset sensitive vocabulary, searches the preset number of text messages, judges whether the preset number of text messages contain the vocabulary with the pinyin same as the pinyin of the preset sensitive vocabulary, judges whether the vocabulary is the preset sensitive vocabulary if the preset number of text messages contain the vocabulary with the pinyin same as the pinyin of the preset sensitive vocabulary, and determines that the preset number of text messages contain the normal vocabulary similar to the preset sensitive vocabulary if the vocabulary is not the preset sensitive vocabulary.
Alternatively, for example, in the case of english vocabulary, the two vocabularies contain the same english alphabet, but the arrangement order of the english alphabet is different, the two vocabularies may be considered similar. The terminal can search the preset number of text messages when judging whether the preset number of text messages contain normal words similar to the preset sensitive words, judge whether the preset number of text messages contain words which are the same as English letters of the preset sensitive words but different in arrangement sequence of the English letters, judge whether the words are the preset sensitive words if the words contain the words, and determine whether the preset number of text messages contain the normal words similar to the preset sensitive words if the words are not the preset sensitive words.
After the occurrence frequency and the correction frequency of the preset sensitive words are determined, the terminal judges whether the occurrence frequency is greater than a first preset threshold, if the occurrence frequency is not greater than the first preset threshold, the terminal indicates that the first user and the second user rarely interact text messages containing the preset sensitive words, and the first user and the second user are unfamiliar with each other, the terminal directly determines the relationship identifier between the first user and the second user as the second identifier. If the occurrence frequency is greater than the first preset threshold value, the first user and the second user are indicated to frequently interact text messages containing preset sensitive words, and whether the correction frequency is greater than a second preset threshold value is judged. If the correction frequency is greater than the second preset threshold, it indicates that the first user often corrects a preset sensitive word after sending a text message containing the preset sensitive word to the second user, and the first user is unfamiliar with the second user, then the relationship identifier between the first user and the second user is determined as the second identifier. And if the correction frequency is not greater than the second preset threshold, the first user and the second user frequently interact with text messages containing preset sensitive words and rarely correct the sent preset sensitive words, namely the first user and the second user are familiar with, determining the relationship identifier between the first user and the second user as the first identifier. The second preset threshold may be determined by performing statistics on the correction frequency of the preset sensitive vocabulary in the interaction process between the first user and each user in the user relationship chain, and may be an average value of the correction frequencies of the preset sensitive vocabulary in the interaction process between the first user and the multiple users, and the second preset threshold may be 0.5, 0.6, or another numerical value, which is not limited in this embodiment.
For example, in the interaction process between the first user and the second user, if the occurrence frequency of the sensitive vocabulary is preset to be F, the correction frequency is preset to be C, the first preset threshold is 0.2, and the second preset threshold is 0.5, then the following situations may be included when determining the relationship identifier:
(1) f is less than or equal to 0.2, and the relation identifier between the first user and the second user is determined to be a second identifier;
(2)F>0.2:
(2-1) C is less than or equal to 0.5, and determining that the relation identifier between the first user and the second user is a first identifier;
(2-2) C >0.5, determining that the relationship identification between the first user and the second user is the second identification.
After determining the relationship identifier between the first user and each user, the terminal may store the relationship identifier between the first user and each user, and in a subsequent interaction process, the terminal may process a text message sent by the first user to a corresponding user according to the relationship identifier between the first user and each user.
It should be noted that, in this embodiment, only the relationship identifier including the first identifier and the second identifier is taken as an example for description, that is, the relationship identifier between the first user and the friend is divided into the first identifier and the second identifier. In fact, the relationship identifier may further include a plurality of identifiers, that is, the relationship identifier between the first user and the friend may be divided into a plurality of identifiers, and each identifier represents a different familiarity degree, so that the familiarity degree between the first user and the friend may be divided into a plurality of gradients, which is not described herein again.
In step 202, the terminal displays an instant conversation interface between the first user and the second user, and obtains a text message to be sent to the second user by the first user in the instant conversation interface.
When a first user wants to send a message to a second user, the terminal can display an instant conversation interface between the first user and the second user, the instant conversation interface comprises an input field and a sending option, the first user can input a text message in the input field and click the sending option to instruct the terminal to send the text message to the second user. When the terminal detects the click operation on the sending option, the text message to be sent by the first user to the second user can be acquired in the instant session interface.
In step 203, the terminal determines whether the text message includes a preset sensitive vocabulary, if so, step 204 is executed, and if not, step 205 is executed.
In order to correct preset sensitive words in a text message, the terminal firstly judges whether the text message comprises the preset sensitive words, if the text message comprises the preset sensitive words, the terminal acquires a relationship identifier between the first user and the second user, the text message is processed according to the relationship identifier between the first user and the second user, and if the text message does not comprise the preset sensitive words, the terminal directly sends the text message to the second user, so that the text message is quickly sent.
In step 204, the terminal obtains a relationship identifier between the first user and the second user, determines whether the relationship identifier is a first identifier, if so, executes step 205, and if not, executes step 206.
When the text message contains preset sensitive words, the terminal obtains a determined relation identifier between the first user and the second user, judges whether the relation identifier is a first identifier, if the relation identifier is the first identifier, the first user and the second user are familiar, the first user can send the preset sensitive words to the second user, and in order to meet the requirement of the first user on quickly sending the text message, the terminal directly sends the text message to the second user. If the relationship identifier is not the first identifier, that is, if the relationship identifier is the second identifier, it indicates that the first user is unfamiliar with the second user and is not convenient to send preset sensitive words to the second user, the terminal does not send the text message to the second user, but carries out sensitive word prompt on the first user.
It should be noted that, in this embodiment, the terminal determines a relationship identifier between the first user and each user in the user relationship chain, and when a text message that the first user wants to send to the second user includes a preset sensitive word, acquires the determined relationship identifier between the first user and the second user. In practical applications, when it is determined that the text message that the first user wants to send to the second user contains a preset sensitive word, the terminal may determine the relationship identifier according to the historical interaction record of the first user and the second user, that is, the step 201 may also be performed after the step 203, which is not limited in this embodiment.
In step 205, the terminal sends the text message to the second user, and ends.
The terminal can send the text message to a network server through the appointed function application based on the first user identification, the network server sends the text message to a terminal where the second user identification is located when receiving the text message, the terminal where the second user identification is located displays the text message in an instant conversation interface between the second user and the first user, and the second user can view the text message.
The second user identifier is used to determine the second user, and may be an account, a nickname, or the like of the second user, which is not limited in this embodiment. The network server is associated with the designated function application, where the designated function application is an application for managing terminal contacts, the network server may be a base station server, and the network server may be a social application server when the designated function application is a social application, which is not limited in this embodiment.
In this embodiment, only after the terminal sends the text message to the second user, no operation is performed as an example, and in fact, after the terminal sends the text message to the second user, the terminal may further continue to send messages to the second user, and the terminal may further receive the messages sent by the second user and display the messages sent by the second user in the instant session interface, which is not described herein again.
In step 206, the terminal prompts the first user for sensitive vocabulary.
When the relation identifier between the first user and the second user is determined to be the second identifier, the terminal may prompt the first user for sensitive words, prompt the first user that the text message contains sensitive words, and inquire whether to correct the preset sensitive words.
The terminal can display a prompt window, the prompt window at least comprises one of prompt information, a sending option and a correcting option, the prompt information is used for prompting that the text message contains sensitive words and phrases, the first user can determine whether to correct the preset sensitive words and phrases after checking the prompt information, the first user can confirm the sending option if the preset sensitive words and phrases are not required to be corrected, and the text message is sent to the second user when the terminal detects that the terminal confirms the sending option. If the preset sensitive vocabulary is to be corrected, the first user can confirm the correction option, when the terminal detects the confirmation operation of the correction option, the prompt window is closed, the first user can correct the input text message in the instant conversation interface, and the terminal acquires the text message corrected by the first user by clicking the sending option in the instant conversation interface after correction. At this time, the terminal may directly send the text message corrected by the first user to the second user, or may continue to perform the above step 203 and 206 on the corrected text message, which is not limited in this embodiment.
It should be noted that, this embodiment is only described by taking the terminal as an example to execute the above steps, when in actual application, the terminal may install the application with the specified function and the application with the specified input method, and the terminal may log in the application with the specified function based on the first user identifier, obtain the user relationship chain of the first user through the application with the specified function, display the instant session interface between the first user and the second user, and interact with the second user through the application with the specified function, so as to generate the history interaction record.
The designated function application may open an interface to the designated input method application, and the designated input method application may be bound with a first user identifier that logs into the designated function application. The specified input method application can call an interface with the specified function application, obtain a historical interaction record of the first user and the second user, and determine a relationship identifier between the first user and the second user according to the historical interaction record. The specified input method application can also call an interface with the specified function application, capture a text message which is sent to the second user by the first user in the instant conversation interface, and send a verification passing message to the specified function application through the interface when the text message does not comprise a preset sensitive vocabulary or the text message comprises a preset sensitive vocabulary and the relation identifier between the first user and the second user is a first identifier, and send the text message to the second user by the specified function application based on the first user identifier. And when the text message comprises preset sensitive words and the relation identifier between the first user and the second user is a second identifier, displaying a prompt window by the appointed input method application to prompt the first user with the sensitive words, when the first user confirms to send the text message or the first user corrects the text message, sending a verification passing message to the appointed function application through the interface by the appointed input method application, and sending the text message to the second user by the appointed function application based on the first user identifier.
It should be noted that, this embodiment only takes a scenario in which the first user sends the text message to the second user as an example, where a terminal used by the first user determines a relationship identifier between the first user and the second user, and processes the text message to be sent by the first user to the second user according to the relationship identifier. In practical application, the second user may also send a text message to the first user, and the terminal used by the second user may determine the relationship identifier between the second user and the first user, and process the text message to be sent to the first user by the second user according to the relationship identifier. The relationship identifier determined by the terminal used by the first user may be the same as or different from the relationship identifier determined by the terminal used by the second user, which is not limited in this embodiment.
In the related technology, only the character message to be sent is corrected according to the input habit of the sender, and the relation between the sender and the receiver is not considered. In the embodiment, the relation between the sender and the receiver is considered, the familiarity between the sender and the receiver is represented by the relation identifier, and the text message to be sent is processed according to the relation identifier, so that the requirement of the sender can be met, and the user experience is improved.
In the method provided by this embodiment, by determining in advance the relationship identifier between the first user and the second user, when the text message that is to be sent to the second user by the first user and includes the preset sensitive vocabulary is obtained, the relationship identifier between the first user and the second user is obtained, and the text message is processed according to the relationship identifier. And considering the familiarity between the first user and the second user, and determining whether to correct the text message according to the familiarity. The method and the device can meet the requirement that the first user quickly sends the text message to the familiar friend and can also meet the requirement of correcting the text message sent to the unfamiliar friend.
Considering that a first user sends a text message containing sensitive words to a familiar friend and rarely sends a habit of sending the text message containing the sensitive words to an unfamiliar friend and a habit of correcting the preset sensitive words sent last time after the first user sends the text message containing the preset sensitive words to the unfamiliar friend, a relationship identifier is determined according to the occurrence frequency and the correction frequency of the preset sensitive words in the interaction process of the first user and the second user, and the relationship identifier is more suitable for the input habit of the user and can more accurately reflect the familiarity between the two users.
FIG. 3 is a block diagram illustrating a word message processing device according to an exemplary embodiment. Referring to fig. 3, the apparatus includes a message acquisition module 301, an identity acquisition module 302 and a processing module 303.
A message obtaining module 301, configured to obtain, in an instant session interface between a first user and a second user, a text message to be sent by the first user to the second user;
an identifier obtaining module 302, configured to obtain a relationship identifier between the first user and the second user when the text message includes a preset sensitive vocabulary;
a processing module 303, configured to process the text message according to the relationship identifier;
wherein the relationship identifier is used for indicating the familiarity between the first user and the second user.
The device provided in this embodiment, by determining in advance the relationship identifier between the first user and the second user, when a text message that is to be sent by the first user to the second user and includes a preset sensitive vocabulary is obtained, the relationship identifier between the first user and the second user is obtained, and the text message is processed according to the relationship identifier. And considering the familiarity between the first user and the second user, and determining whether to correct the text message according to the familiarity. The method and the device can meet the requirement that the first user quickly sends the text message to the familiar friend and can also meet the requirement of correcting the text message sent to the unfamiliar friend.
In another embodiment, the relationship identifier is a first identifier or a second identifier, the first identifier representing a greater familiarity than the second identifier.
In another embodiment, the processing module 303 includes:
the first processing unit is used for sending the text message to the second user when the relation identifier is the first identifier; or,
and the second processing unit is used for carrying out sensitive vocabulary prompting on the first user when the relation identifier is the second identifier.
In another embodiment, the second processing unit is further configured to display a prompt window, where the prompt window includes at least one of a prompt message, a sending option, and a correcting option, and the prompt message is used to prompt that the text message contains a sensitive word; when the confirmation operation of the sending option is detected, the text message is sent to the second user; or when the confirmation operation of the correction option is detected, acquiring the corrected text message of the first user in the instant conversation interface.
In another embodiment, the apparatus further comprises:
and the determining module is used for determining the relationship identifier between the first user and the second user according to the historical interaction record between the first user and the second user.
In another embodiment, the determining module is further configured to determine, according to the historical interaction record, an occurrence frequency of a preset sensitive vocabulary in the interaction process between the first user and the second user; and determining the relationship identification between the first user and the second user according to the occurrence frequency.
In another embodiment, the determining module is further configured to determine, as the first identifier, the relationship identifier between the first user and the second user when the occurrence frequency is greater than a first preset threshold; and when the occurrence frequency is not greater than the first preset threshold, determining the relationship identifier between the first user and the second user as a second identifier.
In another embodiment, the determining module is further configured to determine, according to the historical interaction record, an occurrence frequency and a correction frequency of a preset sensitive vocabulary in the interaction process between the first user and the second user, where the correction frequency is used to indicate a correction frequency of the preset sensitive vocabulary when the first user interacts with the second user; and determining the relationship identification between the first user and the second user according to the occurrence frequency and the correction frequency.
In another embodiment, the determining module is further configured to determine the relationship identifier between the first user and the second user as a second identifier when the frequency of occurrence is not greater than a first preset threshold; when the occurrence frequency is greater than the first preset threshold, judging whether the correction frequency is greater than a second preset threshold; when the correction frequency is greater than the second preset threshold, determining a relationship identifier between the first user and the second user as a second identifier; and when the correction frequency is not greater than the second preset threshold, determining the relationship identifier between the first user and the second user as a first identifier.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
It should be noted that: in the word message processing apparatus provided in the above embodiment, when processing a word message, only the division of the above functional modules is exemplified, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the above described functions. In addition, the text message processing apparatus and the text message processing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
Fig. 4 is a block diagram illustrating an apparatus 400 for word message processing in accordance with an example embodiment. For example, the apparatus 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, the apparatus 400 may include one or more of the following components: processing components 402, memory 404, power components 406, multimedia components 408, audio components 410, input/output (I/O) interfaces 412, sensor components 414, and communication components 416.
The processing component 402 generally controls overall operation of the apparatus 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the apparatus 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply components 406 provide power to the various components of device 400. The power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 400.
The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 400 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, audio component 410 includes a Microphone (MIC) configured to receive external audio signals when apparatus 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the apparatus 400. For example, the sensor assembly 414 may detect an open/closed state of the apparatus 400, the relative positioning of the components, such as a display and keypad of the apparatus 400, the sensor assembly 414 may also detect a change in the position of the apparatus 400 or a component of the apparatus 400, the presence or absence of user contact with the apparatus 400, orientation or acceleration/deceleration of the apparatus 400, and a change in the temperature of the apparatus 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the apparatus 400 and other devices. The apparatus 400 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described text message processing methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the apparatus 400 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium in which instructions, when executed by a processor of a terminal, enable the terminal to perform a method of word message processing, the method comprising:
in an instant conversation interface between a first user and a second user, acquiring a text message to be sent to the second user by the first user;
when the text message contains a preset sensitive word, acquiring a relationship identifier between the first user and the second user;
processing the text message according to the relation identifier;
wherein the relationship identification is used to represent a degree of familiarity between the first user and the second user.
In another embodiment, the relationship identifier is a first identifier or a second identifier, the first identifier representing a greater familiarity than the second identifier.
In another embodiment, said processing said text message according to said relationship identifier includes:
when the relation identifier is the first identifier, sending the text message to the second user; or,
and when the relation identifier is the second identifier, performing sensitive vocabulary prompting on the first user.
In another embodiment, said sensitive vocabulary prompting said first user when said relationship identifier is said second identifier comprises:
displaying a prompt window, wherein the prompt window at least comprises one of prompt information, a sending option and a correcting option, and the prompt information is used for prompting that the text message contains sensitive words;
when the confirmation operation of the sending option is detected, sending the text message to the second user; or,
and when the confirmation operation of the correction option is detected, acquiring the corrected text message of the first user in the instant conversation interface.
In another embodiment, the method further comprises:
and determining a relationship identifier between the first user and the second user according to the historical interaction record between the first user and the second user.
In another embodiment, the determining the relationship identification between the first user and the second user according to the historical interaction record between the first user and the second user includes:
determining the occurrence frequency of preset sensitive words in the interaction process of the first user and the second user according to the historical interaction records;
and determining a relationship identifier between the first user and the second user according to the occurrence frequency.
In another embodiment, said determining the relationship identification between the first user and the second user according to the frequency of occurrence comprises:
when the occurrence frequency is greater than a first preset threshold value, determining a relationship identifier between the first user and the second user as a first identifier;
and when the occurrence frequency is not greater than the first preset threshold, determining the relationship identifier between the first user and the second user as a second identifier.
In another embodiment, the determining the relationship identification between the first user and the second user according to the historical interaction record between the first user and the second user includes:
according to the historical interaction records, determining the occurrence frequency and the correction frequency of preset sensitive words in the interaction process of the first user and the second user, wherein the correction frequency is used for indicating the correction frequency of the preset sensitive words when the first user interacts with the second user;
and determining a relationship identifier between the first user and the second user according to the occurrence frequency and the correction frequency.
In another embodiment, said determining an identity of a relationship between said first user and said second user based on said frequency of occurrence and said frequency of correction comprises:
when the occurrence frequency is not greater than a first preset threshold value, determining a relationship identifier between the first user and the second user as a second identifier;
when the occurrence frequency is greater than the first preset threshold, judging whether the correction frequency is greater than a second preset threshold; when the correction frequency is greater than the second preset threshold value, determining a relationship identifier between the first user and the second user as a second identifier; and when the correction frequency is not greater than the second preset threshold, determining the relationship identifier between the first user and the second user as a first identifier.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (19)

1. A method for processing a text message, the method comprising:
in an instant conversation interface between a first user and a second user, acquiring a text message to be sent to the second user by the first user;
when the text message contains a preset sensitive word, acquiring a relationship identifier between the first user and the second user;
processing the text message according to the relation identifier;
wherein the relationship identification is used to represent a degree of familiarity between the first user and the second user.
2. The method of claim 1, wherein the relationship identifier is a first identifier or a second identifier, and wherein the familiarity represented by the first identifier is greater than the familiarity represented by the second identifier.
3. The method of claim 2, wherein processing the text message according to the relationship identifier comprises:
when the relation identifier is the first identifier, sending the text message to the second user; or,
and when the relation identifier is the second identifier, performing sensitive vocabulary prompting on the first user.
4. The method of claim 3, wherein said sensitive vocabulary prompting the first user when the relationship identifier is the second identifier comprises:
displaying a prompt window, wherein the prompt window at least comprises one of prompt information, a sending option and a correcting option, and the prompt information is used for prompting that the text message contains sensitive words;
when the confirmation operation of the sending option is detected, sending the text message to the second user; or,
and when the confirmation operation of the correction option is detected, acquiring the corrected text message of the first user in the instant conversation interface.
5. The method of claim 1, further comprising:
and determining a relationship identifier between the first user and the second user according to the historical interaction record between the first user and the second user.
6. The method of claim 5, wherein determining the identity of the relationship between the first user and the second user from the historical record of interactions between the first user and the second user comprises:
determining the occurrence frequency of preset sensitive words in the interaction process of the first user and the second user according to the historical interaction records;
and determining a relationship identifier between the first user and the second user according to the occurrence frequency.
7. The method of claim 6, wherein determining the identity of the relationship between the first user and the second user according to the frequency of occurrence comprises:
when the occurrence frequency is greater than a first preset threshold value, determining a relationship identifier between the first user and the second user as a first identifier;
and when the occurrence frequency is not greater than the first preset threshold, determining the relationship identifier between the first user and the second user as a second identifier.
8. The method of claim 5, wherein determining the identity of the relationship between the first user and the second user from the historical record of interactions between the first user and the second user comprises:
according to the historical interaction records, determining the occurrence frequency and the correction frequency of preset sensitive words in the interaction process of the first user and the second user, wherein the correction frequency is used for indicating the correction frequency of the preset sensitive words when the first user interacts with the second user;
and determining a relationship identifier between the first user and the second user according to the occurrence frequency and the correction frequency.
9. The method of claim 8, wherein determining the identity of the relationship between the first user and the second user based on the frequency of occurrence and the frequency of correction comprises:
when the occurrence frequency is not greater than a first preset threshold value, determining a relationship identifier between the first user and the second user as a second identifier;
when the occurrence frequency is greater than the first preset threshold, judging whether the correction frequency is greater than a second preset threshold; when the correction frequency is greater than the second preset threshold value, determining a relationship identifier between the first user and the second user as a second identifier; and when the correction frequency is not greater than the second preset threshold, determining the relationship identifier between the first user and the second user as a first identifier.
10. A text message processing apparatus, the apparatus comprising:
the message acquisition module is used for acquiring a text message to be sent to a second user by a first user in an instant conversation interface between the first user and the second user;
the identification acquisition module is used for acquiring a relationship identification between the first user and the second user when the text message contains a preset sensitive vocabulary;
the processing module is used for processing the text message according to the relation identifier;
wherein the relationship identification is used to represent a degree of familiarity between the first user and the second user.
11. The apparatus of claim 10, wherein the relationship identifier is a first identifier or a second identifier, and wherein the familiarity represented by the first identifier is greater than the familiarity represented by the second identifier.
12. The apparatus of claim 11, wherein the processing module comprises:
the first processing unit is used for sending the text message to the second user when the relation identifier is the first identifier; or,
and the second processing unit is used for carrying out sensitive vocabulary prompting on the first user when the relation identifier is the second identifier.
13. The apparatus according to claim 12, wherein the second processing unit is further configured to display a prompt window, the prompt window including at least one of a prompt message, a send option, and a correct option, the prompt message being used to prompt the text message to include a sensitive word; when the confirmation operation of the sending option is detected, sending the text message to the second user; or when the confirmation operation of the correction option is detected, acquiring the corrected text message of the first user in the instant conversation interface.
14. The apparatus of claim 10, further comprising:
and the determining module is used for determining the relationship identifier between the first user and the second user according to the historical interaction record between the first user and the second user.
15. The apparatus according to claim 14, wherein the determining module is further configured to determine, according to the historical interaction record, an occurrence frequency of a preset sensitive vocabulary during the interaction between the first user and the second user; and determining a relationship identifier between the first user and the second user according to the occurrence frequency.
16. The apparatus according to claim 15, wherein the determining module is further configured to determine a relationship identifier between the first user and the second user as a first identifier when the occurrence frequency is greater than a first preset threshold; and when the occurrence frequency is not greater than the first preset threshold, determining the relationship identifier between the first user and the second user as a second identifier.
17. The apparatus according to claim 14, wherein the determining module is further configured to determine, according to the historical interaction record, an occurrence frequency and a correction frequency of a preset sensitive vocabulary during the interaction between the first user and the second user, where the correction frequency is used to indicate a correction frequency of the preset sensitive vocabulary when the first user interacts with the second user; and determining a relationship identifier between the first user and the second user according to the occurrence frequency and the correction frequency.
18. The apparatus according to claim 17, wherein the determining module is further configured to determine the relationship identifier between the first user and the second user as a second identifier when the frequency of occurrence is not greater than a first preset threshold; when the occurrence frequency is greater than the first preset threshold, judging whether the correction frequency is greater than a second preset threshold; when the correction frequency is greater than the second preset threshold value, determining a relationship identifier between the first user and the second user as a second identifier; and when the correction frequency is not greater than the second preset threshold, determining the relationship identifier between the first user and the second user as a first identifier.
19. A text message processing apparatus, comprising:
a processor; a memory for storing processor-executable instructions;
wherein the processor is configured to:
in an instant conversation interface between a first user and a second user, acquiring a text message to be sent to the second user by the first user;
when the text message contains a preset sensitive word, acquiring a relationship identifier between the first user and the second user;
processing the text message according to the relation identifier;
wherein the relationship identification is used to represent a degree of familiarity between the first user and the second user.
CN201510369407.6A 2015-06-26 2015-06-26 Word message treating method and apparatus Active CN105095366B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510369407.6A CN105095366B (en) 2015-06-26 2015-06-26 Word message treating method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510369407.6A CN105095366B (en) 2015-06-26 2015-06-26 Word message treating method and apparatus

Publications (2)

Publication Number Publication Date
CN105095366A true CN105095366A (en) 2015-11-25
CN105095366B CN105095366B (en) 2018-05-08

Family

ID=54575803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510369407.6A Active CN105095366B (en) 2015-06-26 2015-06-26 Word message treating method and apparatus

Country Status (1)

Country Link
CN (1) CN105095366B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930697A (en) * 2016-04-11 2016-09-07 厦门幻世网络科技有限公司 Method and device for opening use permission of interactive information
WO2018107580A1 (en) * 2016-12-15 2018-06-21 华为技术有限公司 Information notification method and device
CN109617795A (en) * 2019-02-27 2019-04-12 中国联合网络通信集团有限公司 A kind of method and system sending message
CN109766441A (en) * 2018-12-28 2019-05-17 北京奇安信科技有限公司 File classification method, apparatus and system
CN110177074A (en) * 2019-04-10 2019-08-27 华为技术有限公司 A kind of sending method and electronic equipment of conversation message
CN110597802A (en) * 2018-05-24 2019-12-20 北京京东尚科信息技术有限公司 Message processing method and device
CN111427459A (en) * 2019-01-08 2020-07-17 北京搜狗科技发展有限公司 Method and related device for input optimization during user communication

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1878202A (en) * 2005-06-11 2006-12-13 乐金电子(中国)研究开发中心有限公司 Method for analyzing accepted short message
CN104320766A (en) * 2014-10-16 2015-01-28 小米科技有限责任公司 Spam short message identification method, device and equipment
CN104579933A (en) * 2015-02-03 2015-04-29 上海天奕达电子科技有限公司 User management method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1878202A (en) * 2005-06-11 2006-12-13 乐金电子(中国)研究开发中心有限公司 Method for analyzing accepted short message
CN104320766A (en) * 2014-10-16 2015-01-28 小米科技有限责任公司 Spam short message identification method, device and equipment
CN104579933A (en) * 2015-02-03 2015-04-29 上海天奕达电子科技有限公司 User management method and system

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017177871A1 (en) * 2016-04-11 2017-10-19 厦门幻世网络科技有限公司 Method and device for granting interaction information usage right
CN105930697A (en) * 2016-04-11 2016-09-07 厦门幻世网络科技有限公司 Method and device for opening use permission of interactive information
US11381527B2 (en) 2016-12-15 2022-07-05 Huawei Technologies Co., Ltd. Information prompt method and apparatus
WO2018107580A1 (en) * 2016-12-15 2018-06-21 华为技术有限公司 Information notification method and device
CN109716328A (en) * 2016-12-15 2019-05-03 华为技术有限公司 A kind of method and device of information alert
CN110597802A (en) * 2018-05-24 2019-12-20 北京京东尚科信息技术有限公司 Message processing method and device
CN109766441A (en) * 2018-12-28 2019-05-17 北京奇安信科技有限公司 File classification method, apparatus and system
CN109766441B (en) * 2018-12-28 2021-07-09 奇安信科技集团股份有限公司 Text classification method, device and system
CN111427459A (en) * 2019-01-08 2020-07-17 北京搜狗科技发展有限公司 Method and related device for input optimization during user communication
CN111427459B (en) * 2019-01-08 2024-04-02 北京搜狗科技发展有限公司 Method and related device for optimizing input during user communication
CN109617795A (en) * 2019-02-27 2019-04-12 中国联合网络通信集团有限公司 A kind of method and system sending message
CN109617795B (en) * 2019-02-27 2021-08-31 中国联合网络通信集团有限公司 Method and system for sending message
CN110177074A (en) * 2019-04-10 2019-08-27 华为技术有限公司 A kind of sending method and electronic equipment of conversation message
CN110177074B (en) * 2019-04-10 2021-02-12 华为技术有限公司 Method for sending conversation message and electronic equipment

Also Published As

Publication number Publication date
CN105095366B (en) 2018-05-08

Similar Documents

Publication Publication Date Title
CN105095366B (en) Word message treating method and apparatus
CN105094814B (en) Notification message methods of exhibiting and device
US10783459B2 (en) Method and device for providing ticket information
CN105069106A (en) Application group recommendation method and device
CN106372204A (en) Push message processing method and device
CN106506335A (en) The method and device of sharing video frequency file
CN105426094B (en) Information pasting method and device
CN103995834A (en) Sensitive information detection method and related device
CN107454204B (en) User information labeling method and device
US11335348B2 (en) Input method, device, apparatus, and storage medium
CN106603381B (en) Method and device for processing chat information
CN106547850B (en) Expression annotation method and device
CN108011990B (en) Contact management method and device
CN107493366B (en) Address book information updating method and device and storage medium
CN105187622A (en) Information prompt method and information prompt device
CN107402767B (en) Method and device for displaying push message
CN108270661B (en) Information reply method, device and equipment
CN105101121B (en) A kind of method and device that information is sent
CN106101464A (en) Number mark method and device
CN107179837B (en) Input method and device
CN103970831B (en) Recommend the method and apparatus of icon
CN106506808B (en) Method and device for prompting communication message
CN110213062B (en) Method and device for processing message
CN104636320A (en) Data processing method and device
CN109842688B (en) Content recommendation method and device, electronic equipment and storage medium

Legal Events

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