CN110225185B - Message text processing method and terminal equipment - Google Patents

Message text processing method and terminal equipment Download PDF

Info

Publication number
CN110225185B
CN110225185B CN201910393208.7A CN201910393208A CN110225185B CN 110225185 B CN110225185 B CN 110225185B CN 201910393208 A CN201910393208 A CN 201910393208A CN 110225185 B CN110225185 B CN 110225185B
Authority
CN
China
Prior art keywords
message
text
feature
priority level
texts
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910393208.7A
Other languages
Chinese (zh)
Other versions
CN110225185A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910393208.7A priority Critical patent/CN110225185B/en
Publication of CN110225185A publication Critical patent/CN110225185A/en
Application granted granted Critical
Publication of CN110225185B publication Critical patent/CN110225185B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/52User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72469User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a message text processing method and terminal equipment, comprising the following steps: receiving a plurality of message texts; determining at least one target message text from the plurality of message texts according to text characteristics of the plurality of message texts; the target message text with higher importance degree is determined from the plurality of message texts through the text characteristics of the message texts, so that the target message text can be displayed, the aim of displaying the message texts in a grading way is fulfilled, the probability of missing important chat messages is reduced, and the browsing time of the message text is saved.

Description

Message text processing method and terminal equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a message text processing method and terminal equipment.
Background
In the communication application, most users are in a chat group, and when everyone chats in the chat group, the terminal device of each user receives a large amount of chat messages.
In the prior art, after the terminal device receives a plurality of chat messages in sequence according to the receiving sequence, the chat messages can be displayed in sequence according to the receiving sequence through the chat interface.
However, in the current scheme, because the amount of information in the chat group is large, if the chat messages are sequentially displayed according to the receiving sequence, important chat messages are often missed, or more chat messages need to be viewed backwards during browsing, which results in time waste.
Disclosure of Invention
The embodiment of the invention provides a message text processing method and terminal equipment, and aims to solve the problem that in the prior art, chat messages are sequentially displayed according to a receiving sequence, so that important chat messages are often missed, or more chat messages need to be browsed backwards during browsing, and time is wasted.
In a first aspect, an embodiment of the present invention provides a method for processing a message text, which is applied to a terminal device, and the method includes:
receiving a plurality of message texts;
determining at least one target message text from the plurality of message texts according to text characteristics of the plurality of message texts;
and displaying the target message text.
Preferably, the step of determining at least one target message text from the plurality of message texts according to the text features of the plurality of message texts comprises:
matching the feature type of the text feature with a corresponding relation between a preset feature type and a preset weight value, and adding the corresponding weight value to the text feature to obtain a weighted text feature;
determining the priority level value of each message text according to the weighted text characteristics;
and determining at least one target message text from the plurality of message texts according to the priority level value.
Preferably, the step of matching the feature type of the text feature with the corresponding relationship between a preset feature type and a preset weight value, and adding a corresponding weight value to the text feature to obtain a weighted text feature includes:
establishing a weighted feature matrix with dimension (m multiplied by n) according to the text features of the n message texts and the m feature categories, wherein n and m are integers larger than 0;
for each matrix element of the weighted feature matrix, when the feature category of the text feature is matched with the preset feature category, adding a preset weight value corresponding to the preset feature category to the matrix element;
and when the feature type of the text feature is not matched with the preset feature type, adding a preset constant to the matrix element.
Preferably, the step of determining a priority level value of each message text according to the weighted text features includes:
performing summation calculation on each row in the n rows of data of the weighted feature matrix to obtain n priority degree values;
the step of determining at least one target message text from the plurality of message texts according to the priority level value comprises:
and determining the message text corresponding to the priority level value with the maximum value as the target message text in the n priority level values.
Preferably, the step of determining at least one target message text from a plurality of message texts according to the priority level value includes:
if a plurality of priority level values with the largest value exist in the priority level values of each message text determined according to the weighted text characteristics, arranging the message texts according to the sequence of the priority level values from large to small to obtain a message text sequence;
according to a preset constant k, starting from the end with the maximum priority degree value in the message text sequence, (1+ k) message texts are selected, and the average priority degree value M of each message text is determineda
The average priority level value M with the maximum value is selected from (1+ k) message textsaThe corresponding message text is determined as the target message text;
wherein, for the a-th message text in the (1+ k) message texts, the corresponding average priority level value of the a-th message text
Figure BDA0002057253530000031
Said raAnd the preset constant k is an integer greater than 0 and is the priority level value corresponding to the a-th message text.
Preferably, of (1+ k) of said message texts, the largest average priority level value M is assignedaThe step of determining the corresponding message text as the target message text specifically includes:
determining (1+ k) of said average priority level values MaThe adjacent average priority level value MaThe difference between them;
if the number of the difference values smaller than or equal to the preset difference value threshold value is larger than or equal to the preset number threshold value in all the difference values, the average priority level value M with the maximum value is obtainedaAnd determining the corresponding message text as the target message text.
Preferably, after the step of determining the priority level value of each message text according to the weighted text features, the method further includes:
if a plurality of priority level values with the maximum values exist, determining a plurality of message texts corresponding to the priority level values with the maximum values, and reducing a target preset weight value matched with text features of the message texts.
Preferably, the preset weight value includes a positive weight value and a negative weight value.
In a second aspect, an embodiment of the present invention provides a terminal device, where the terminal device includes:
a receiving module for receiving a plurality of message texts;
the determining module is used for determining at least one target message text from the plurality of message texts according to the text characteristics of the plurality of message texts;
and the display module is used for determining the priority level value of each message text according to the weighted text characteristics and determining at least one target message text from the plurality of message texts according to the priority level value.
Preferably, the determining module includes:
the weighting submodule is used for matching the feature category of the text feature with the corresponding relation between a preset feature category and a preset weight value, and adding a corresponding weight value to the text feature to obtain a weighted text feature;
the calculation submodule is used for determining the priority level value of each message text according to the weighted text characteristics;
and the classification submodule is used for determining at least one target message text from the plurality of message texts according to the priority level value.
Preferably, the weighting submodule includes:
the matrix establishing unit is used for establishing a weighted feature matrix with dimension (m multiplied by n) according to the text features of the n message texts and the m feature categories, wherein n and m are integers larger than 0;
the matrix weighting unit is used for adding a preset weight value corresponding to the preset characteristic category to each matrix element of the weighted characteristic matrix when the characteristic category of the text characteristic is matched with the preset characteristic category;
and the constant adding unit is used for adding a preset constant to the matrix element when the feature type of the text feature is not matched with the preset feature type.
Preferably, the calculation submodule comprises:
the summation calculation unit is used for carrying out summation calculation on each row in the n rows of data of the weighted feature matrix to obtain n priority degree values;
the classification submodule includes:
and the first dividing unit is used for determining the message text corresponding to the priority level value with the maximum value as the target message text in the n priority level values.
Preferably, the classification sub-module further includes:
the sorting unit is used for sorting the message texts according to the priority degree values from large to small to obtain a message text sequence if a plurality of priority degree values with the largest value exist in the priority degree values of each message text determined according to the weighted text characteristics;
an adding and averaging unit, configured to select (1+ k) message texts from the end with the largest priority level value in the message text sequence message texts according to a preset constant k, and obtain and determine an average priority level value M of each message texta
A second dividing unit for dividing the average priority level value M having the largest value among the (1+ k) message textsaThe corresponding message text is determined as the target message text;
wherein, for the a-th message text in the (1+ k) message texts, the corresponding average priority level value of the a-th message text
Figure BDA0002057253530000051
Said raAnd the preset constant k is an integer greater than 0 and is the priority level value corresponding to the a-th message text.
Preferably, the second dividing unit further includes:
a difference value calculating subunit for determining (1+ k) of the average priority level values MaThe adjacent average priority level value MaThe difference between them;
a third dividing subunit, configured to, if the number of difference values smaller than or equal to the preset difference threshold value is greater than or equal to the preset number threshold value, divide the average priority level value M with the largest value among all the difference valuesaAnd determining the corresponding message text as the target message text.
Preferably, the determining module further includes:
and the weight adjusting submodule is used for determining a plurality of message texts corresponding to the priority level values with the maximum values and reducing a target preset weight value matched with the text characteristics of the message texts if the priority level values with the maximum values exist.
Preferably, the preset weight value includes a positive weight value and a negative weight value.
In a third aspect, an embodiment of the present invention further provides a terminal device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the method for processing a message text provided by the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the method for processing a message text. .
In the embodiment of the invention, the terminal equipment can receive a plurality of message texts; determining at least one target message text from the plurality of message texts according to text characteristics of the plurality of message texts; the target message text with higher importance degree is determined from the plurality of message texts through the text characteristics of the message texts, so that the target message text can be displayed, the aim of displaying the message texts in a grading way is fulfilled, the probability of missing important chat messages is reduced, and the browsing time of the message text is saved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for processing a message text according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of another method for processing message texts according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating steps of another method for processing message texts according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating steps of another method for processing message text according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating steps of another method for processing message text according to an embodiment of the present invention;
fig. 6 is a block diagram of a terminal device according to an embodiment of the present invention;
fig. 7 is a block diagram of a terminal device of another embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 is a flowchart of steps of a method for processing a message text according to an embodiment of the present invention, and as shown in fig. 1, the method may include:
step 101, receiving a plurality of message texts.
In the embodiment of the present invention, according to an implementation manner of the embodiment of the present invention, after being authorized by a host user, a terminal device may extract a message text in a communication application by calling an interface of the communication application, where the message text may be a read message text or an unread message text, and the embodiment of the present invention is not limited thereto.
It should be noted that the message text is not limited to the chat type message in the communication type application, and the message text may also be other notification type texts, such as the commodity information pushed by the online shopping application.
Step 102, determining at least one target message text from the plurality of message texts according to the text characteristics of the plurality of message texts.
In the embodiment of the invention, the characteristics are corresponding characteristics or characteristics of a certain class of objects different from other classes of objects or a set of the characteristics and the characteristics, the characteristics are data which can be extracted through measurement or processing, the main purpose of characteristic extraction is dimension reduction, and the main idea is to project an original sample to a low-dimensional characteristic space to obtain the low-dimensional sample characteristics which can reflect the essence of the sample or distinguish the sample.
For the message text information, the text feature of the message text information is used for expressing the text in a form which can be understood by a computer, namely vectorization of the text, and the extraction of the text feature can also be realized by a corresponding text extraction algorithm model, for example, an embedded network model.
Specifically, in a processing scenario of a message text, text features may be divided into different feature categories according to different feature values of the text features. In particular, the feature values may be used to express different attribute differences of the message text, including but not limited to text length differences between message texts, special words in the message text, appearance frequency differences of special expressions, semantic emotional tendency of the message text, and the like. From the text characteristics, the importance of the respective message text can be determined, thereby determining at least one more important target message text from the plurality of message texts.
And 103, displaying the target message text.
In the step, the target message text is displayed, so that the purpose of displaying the message text in a grading way is achieved, the probability that important chat messages are missed is reduced, and the browsing time of the message text is saved.
In the embodiment of the present invention, the target message text is displayed, and specifically, the target message text may be displayed in the terminal device first, and then other texts except the target message text are displayed. The target message text can also be top-displayed in the chat interface of the terminal device. And a highlight identifier can be added to the displayed target message text in the chat interface of the terminal equipment.
To sum up, a method for processing a message text provided by the embodiment of the present invention includes: receiving a plurality of message texts; determining at least one target message text from the plurality of message texts according to text characteristics of the plurality of message texts; the target message text with higher importance degree is determined from the plurality of message texts through the text characteristics of the message texts, so that the target message text can be displayed, the aim of displaying the message texts in a grading way is fulfilled, the probability of missing important chat messages is reduced, and the browsing time of the message text is saved.
Fig. 2 is a flowchart of steps of a method for processing a message text according to an embodiment of the present invention, and as shown in fig. 2, the method may include:
step 201, receiving a plurality of message texts.
This step can refer to step 101 described above, and is not described here.
Step 202, matching the feature type of the text feature with a corresponding relation between a preset feature type and a preset weight value, and adding a corresponding weight value to the text feature to obtain a weighted text feature.
In the embodiment of the invention, in a processing scene of a message text, text features can be divided into different feature categories according to different feature values of the text features. In particular, the feature values may be used to express different attribute differences of the message text, including but not limited to text length differences between message texts, special words in the message text, appearance frequency differences of special expressions, semantic emotional tendency of the message text, and the like.
For example, for two message texts "notify everybody at 4 pm, receive please reply" and "good, receive", it is generally known that the message with the keywords "notify", "please reply" is often the more important message, and in addition, the longer message is often the more important message, therefore, the importance of "notify everybody at 4 pm, receive please reply" is greater than that of "good, receive", and for the difference of these 2 message attributes in this example, the preset feature categories can be established as: 1. the keywords "notify", "please reply" are present in the message text. 2. The text length of the message text is greater than a certain threshold. For the feature class 1, a larger weight value a may be preset. For the feature class 2, a smaller weight value b may be preset. When a new message text is received, if the message text meets the feature type 1, the weight value a may be weighted to the message text, if the message text meets the feature type 2, the weight value b may be weighted to the message text, and if the message text meets both the feature type 1 and the feature type 2, both the weight values a and b may be weighted to the message text.
Further, for the processing scenario of the message text in the embodiment of the present invention, an embodiment of the present invention may provide a table 1, where the table 1 includes 5 types of feature categories divided for the processing scenario of the message text, and feature values, feature directions, and weight values corresponding to the 5 types of feature categories.
Figure BDA0002057253530000091
Figure BDA0002057253530000101
As can be seen from table 1 above, for a processing scenario of a message text, feature categories can be divided into 5 categories, including speaker attribute, message content, message emotion tendency, message length, and expression, each of which includes a plurality of feature values for expressing different attribute differences of the message text, where, in the feature direction, the forward direction refers to that the text feature is a beneficial class feature for importance. The negative direction means that the text feature is a non-beneficial class feature aiming at importance, the weight value can be divided into three grades of high, medium and low, and the grade of the weight value can be reflected through specific assignment.
For example, in the feature category of the message content, the text feature of the target message text obtained by determination is analyzed, it can be determined whether the target message text includes reply phrases such as "good", "thank you", "received", and the like, if so, the importance of the target message text is considered to be possibly low, a negative and large weight value is given to the text feature of the target message text, so that a weighted text feature is obtained, and then the priority level value of the message text is calculated according to the weighted text feature.
It should be noted that, for one message text, through extracting a plurality of text features of the message text in the above step 202, and analyzing the plurality of text features, the plurality of text features may be associated with corresponding feature categories one by one, for example, referring to table 1, assuming that one message text has three text features (K1, K2, K3), where K1 may be associated with a message length feature category, K2 may be associated with a message content feature category, K3 may be associated with a message emotional tendency feature category, and K3 may be associated with a message emotional tendency feature category, when the text features K1, K2, and K3 are all matched with feature values in the respective feature categories, and assuming that the weight values corresponding to the matched feature values are a1, a2, a3, respectively, the text features K1, K2, K3, and a1 corresponding to the weighted values are respectively a1, K2, K3, and a1 corresponding to the weighted values are respectively, a2 and a3, and obtaining weighted text characteristics (K1a1, K2a2 and K3a 3).
Optionally, the preset weight value includes a positive weight value and a negative weight value.
In the embodiment of the present invention, the preset weight value has a positive direction and a negative direction, where the positive direction is a positive weight value, and the text feature used for representing the weighting thereof is a beneficial class feature for the importance degree. The negative direction is a negative weight value, the text features used for representing the weighting are non-beneficial class features aiming at the importance degree, generally speaking, the value of the positive weight value is a positive number, and the value of the negative weight value is a negative value.
Step 203, determining the priority level value of each message text according to the weighted text characteristics.
In this step, the priority level value of each message text may be calculated according to the weighted text feature of each message text, and in an implementation manner of the embodiment of the present invention, the priority level value of each message text may be obtained by adding, for example, the message text provided in the above step 203 and the weighted text feature (K1a1, K2a2, K3a3) corresponding to the message text, the priority level value of the message text may be (K1a1+ K2a2+ K3a 3).
Step 204, determining at least one target message text from the plurality of message texts according to the priority level value.
In this step, when there are a plurality of message texts, a priority level value of each message text may be obtained according to summation calculation, the greater the priority level value is, the greater the importance level of the corresponding message text is, the message texts are arranged according to the order of the priority level values from large to small, and a message text sequence with the importance levels from large to small may be obtained, where the message text with the largest priority level value may be determined as the target message text, or one or more message texts with priority level values greater than or equal to a preset threshold may be determined as the target message text.
Further, the message texts may be classified into different priority classes according to different priority level values according to actual service requirements, for example, for three message texts a1, a2, and A3. The priority level value of a1 is 10, the priority level value of a2 is 5, the priority level value of A3 is 1, and assuming that three priority classes B1, B2 and B3 are established, B1 represents a high priority class, B2 represents a general priority class, and B3 represents a low priority class, the message text a1 may be classified into the high priority class B1, the message text a2 may be classified into the general priority class B2, and the message text A3 may be classified into the low priority class B3. During the subsequent display operation of the message text, the message text in the high-priority category B1 can be displayed first, then the message text in the general-priority category B2 can be displayed, and finally the message text in the low-priority category B3 can be displayed, so that the purpose of displaying the message text in a grading manner according to the importance can be achieved.
Step 205, displaying the target message text.
This step can refer to step 103, which is not described herein.
To sum up, a method for processing a message text provided by the embodiment of the present invention includes: receiving a plurality of message texts; determining at least one target message text from the plurality of message texts according to text characteristics of the plurality of message texts; the invention displays the target message text, by establishing the corresponding relation between the preset characteristic category and the preset weight value, matching the characteristic category corresponding to the text characteristic of the message text with the preset characteristic category, adding the preset weight value corresponding to the preset characteristic category to the matched text characteristic, and calculating the priority level value of the message text according to the weighted text characteristic, thereby determining the priority level of the message text and realizing the purpose of classifying the message text according to the priority level, because the invention realizes the weighting of the message text according to the characteristic category of the message text and accurately represents the importance degree of the message text according to the priority level value obtained by the weighted text characteristic, thereby realizing the classification of the message text and solving the problem of inaccurate classification result caused by classifying the message text based on semantic analysis, the classification precision of the message text is improved.
Fig. 3 is a flowchart of steps of another method for processing a message text according to an embodiment of the present invention, and as shown in fig. 3, the method may include:
step 301, receiving a plurality of message texts.
The implementation manner of this step is similar to the implementation process of step 101 described above, and the embodiment of the present invention is not described in detail here.
Step 302, according to the text features of the n message texts and the m feature categories, establishing a weighted feature matrix with dimension (m × n), wherein n and m are integers greater than 0.
In this step, if the terminal device receives n message texts and the text features extracted from each message text can have m feature categories, a weighted feature matrix with dimension (m × n) is established according to the text features of the n message texts and the m feature categories, where the weighted feature matrix has n rows and m columns.
For example, n message texts (M1, M2, M3 … Mn) are collected, and assuming that M feature classes are divided, each message text can be extracted to obtain M text features, for example, the message text M1 can be extracted to obtain text features (K11, K12, K13 … K1M), and then a weighted feature matrix with dimension (M × n) is established according to the text features of the n message texts and the M feature classes as follows:
<k11,k12,…,k1m>
<k21,k22,…,k2m>
<kn1,kn2,…,knm>
wherein, a row of data in the weighted feature matrix is used for reflecting the text feature of a piece of message text.
Step 303, for each matrix element of the weighted feature matrix, when the feature class of the text feature matches the preset feature class, adding a preset weight value corresponding to the preset feature class to the matrix element.
In the embodiment of the present invention, the feature class of the text feature is matched with the preset feature class, specifically, the feature value included in the feature class of the text feature is matched with the feature value included in the preset feature class, to determine if there is a dimensional match between the two in terms of feature values, e.g., the message text "notify everybody at 4 pm, receive reply" can extract each keyword feature according to the feature category of the message content, the feature value of the message text may include each keyword feature, and the preset feature category includes a feature category of the preset message content, the characteristic value comprises whether the message text comprises certain preset keyword characteristics or not, if the characteristic value of the message text comprises the preset keyword characteristics in each keyword characteristic, the message content feature class of the message text may be considered to match the preset message content feature class.
Further, according to the corresponding relationship between the preset feature categories and the preset weight values, weight addition may be performed on each matrix element of the weighted feature matrix to obtain a weighted feature matrix with dimension (m × n).
For example, for the weighted feature matrix provided in the example of step 302:
<k11,k12,…,k1m>
<k21,k22,…,k2m>
<kn1,kn2,…,knm>
assuming that the feature classes of each message text are matched with m corresponding preset feature classes, and the m feature classes respectively correspond to preset weight values (a1, a2, a3 … am), after weighting processing is performed on each matrix element of the weighted feature matrix, the weighted feature matrix can be obtained as follows:
<k11a1,k12a2,…,k1m am>
<k21a1,k22a2,…,k2m am>
<kn1a1,kn2a2,…,knm am>
each matrix element of a line of data in the weighted feature matrix is used for reflecting the text feature after a piece of message text is weighted.
In addition, in the embodiment of the present invention, when the feature type of the text feature does not match the preset feature type, a preset constant is added to the matrix element.
In the embodiment of the invention, when some complicated message texts exist, the feature types of the text features extracted from the message texts cannot be completely matched with the preset feature types, and under the condition that the feature types of the text features of some message texts are not matched with the preset feature types, the preset constant can be set and added to the matrix element. For example, in the case where the feature class of the text feature of the message text does not match the preset feature class, the importance of the text feature may be considered to be low, and therefore a preset constant value may be set to 0, which is added to the matrix element so that the influence of the text feature is ignored in calculating the importance of the message text.
And step 304, determining the priority level value of each message text according to the weighted text characteristics.
This step can refer to step 203, which is not described herein again.
Optionally, step 304 may specifically include:
substep 3041, performing summation calculation on each row in the n rows of data of the weighted feature matrix to obtain n priority level values.
At this time, by summing up each line to obtain n priority degree values, the priority of the message text can be clearly defined, thereby facilitating the determination of the target text.
In the embodiment of the present invention, a specific implementation of the summation calculation process in this step is shown as an example, for example, assuming that there are 4 consecutive messages, message 1: "notify xxxxxx, receive please reply". Message 2: "received". Message 3: "good". And message 4: if m preset feature categories exist, the m feature categories respectively correspond to preset weight values (a1, a2 and a3 … am), and the feature category of each message text is matched with the corresponding m preset feature categories, the established weighted feature matrix is as follows:
< k11a1, k12a2, …, k1mam >/(indicating the weighted feature of message 1)
< k21a1, k22a2, …, k2mam >/(indicating the weighted character of message 2)
< k31a1, k32a2, …, k3mam >/(indicating the weighted feature of message 3)
< k41a1, k42a2, …, k4mam >/(indicating the weighted character of message 4)
The priority value R1 of message 1 is k11a1+ k12a2+ … + k1 mam.
The priority value R2 of message 2 is k21a1+ k22a2+ … + k2 mam.
The priority level value R3 of message 3 is k31a1+ k32a2+ … + k3 mam.
The priority value R4 of message 4 is k41a1+ k42a2+ … + k4 mam.
In conjunction with the actual content of the message, it may be determined that R1> > R2 ≈ R3 ≈ R4.
Step 305, determining at least one target message text from the plurality of message texts according to the priority level value.
This step can refer to step 204, which is not described herein.
Optionally, when step 304 specifically includes 3041, step 305 may specifically include:
3051, determining the message text corresponding to the priority level value with the maximum value as the target message text in the n priority level values.
In this step, for the example provided in the above sub-step 3041, the priority level value R1 with the largest value among the 4 priority level values may be selected, and the message 1 corresponding to the priority level R1 with the largest value may be determined as the highest priority, and the message 1 may be determined as the target message text.
It should be noted that a non-priority category may also be established according to actual requirements, and the messages 2, 3, and 4 with low and similar priority level values may be divided into the non-priority categories.
Step 306, displaying the target message text.
This step can refer to step 103, which is not described herein.
In summary, another method for processing a message text provided in the embodiment of the present invention includes: receiving a plurality of message texts; determining at least one target message text from the plurality of message texts according to text characteristics of the plurality of message texts; the invention displays the target message text, by establishing the corresponding relation between the preset characteristic category and the preset weight value, matching the characteristic category corresponding to the text characteristic of the message text with the preset characteristic category, adding the preset weight value corresponding to the preset characteristic category to the matched text characteristic, and calculating the priority level value of the message text according to the weighted text characteristic, thereby determining the priority level of the message text and realizing the purpose of classifying the message text according to the priority level, because the invention realizes the weighting of the message text according to the characteristic category of the message text and accurately represents the importance degree of the message text according to the priority level value obtained by the weighted text characteristic, thereby realizing the classification of the message text and solving the problem of inaccurate classification result caused by classifying the message text based on semantic analysis, the classification precision of the message text is improved.
Fig. 4 is a flowchart of steps of another method for processing a message text according to an embodiment of the present invention, and as shown in fig. 4, the method may include:
step 401, receiving a plurality of message texts.
The implementation manner of this step is similar to the implementation process of step 101 described above, and the embodiment of the present invention is not described in detail here.
Step 402, matching the feature type of the text feature with a corresponding relation between a preset feature type and a preset weight value, and adding a corresponding weight value to the text feature to obtain a weighted text feature.
The implementation manner of this step is similar to the implementation process of step 202 described above, and the embodiment of the present invention is not described in detail here.
And 403, determining the priority level value of each message text according to the weighted text characteristics.
This step can refer to step 203, which is not described herein again.
And 404, if a plurality of priority level values with the largest value exist in the priority level values of each message text determined according to the weighted text characteristics, arranging the message texts according to the sequence of the priority level values from large to small to obtain a message text sequence.
In this step, in some practical scenarios, if there are multiple priority level values with the largest value in the priority level values of each of the message texts determined according to the weighted text features, for example, it is assumed that there are consecutive messages: message 1: xxxxxx is notified and a reply request message is received. 2: supplement XXX, please confirm. Message 3: and XX confirms. And message 4: XX receives. The priority level value R1 of the message 1, the priority level value R2 of the message 2, the priority level value R3 of the message 3, and the priority level value R4 of the message 4, wherein R1 is R2 and R3 is R4 are calculated.
At this time, the message texts may be arranged in order of the priority level values from large to small to obtain a message text sequence (message 1, message 2, message 3, message 4).
Step 405, according to a preset constant k, starting from the end with the maximum priority degree value in the message text sequence, (1+ k) message texts are selected, and the average priority degree value M of each message text is determineda
In this step, for the example of the above step 404, the message 1 is the first important information, the message 2 is the supplementary information (not the most important information), and if the priority level values R of the two are simply calculated, the calculation processes between the two are isolated from each other, so that the priority level values R of the two are equal, but the message 1 is the most important source information, in which case, according to the size of the average priority level value, a message with more importance can be further screened out from the message 1 and the message 2 with equal priority level values R by calculating at least the average priority level value corresponding to the message 1 and the message 2 (in this case, k is equal to 1).
Specifically, for the a-th message text in the (1+ k) message texts, the average priority level value corresponding to the a-th message text
Figure BDA0002057253530000171
Said raAnd the preset constant k is an integer greater than 0 and is the priority level value corresponding to the a-th message text.
Then, in the case where k is 1, (1+ k) message texts, i.e., message 1 and message 2, are selected, starting from the end of the message text sequence where the priority level value is the largest.
Average priority level value of message 1
Figure BDA0002057253530000172
Average priority level value of message 2
Figure BDA0002057253530000173
It should be noted that, in the embodiment of the present invention, (1+ k) message texts are selected from the message texts, all the message texts may be arranged in the order of the corresponding priority level values from large to small, and the (1+ k) message texts are selected from the side with the largest priority level value.
In addition, the value of the constant k may be adjusted according to actual requirements, the larger the value of k, the higher the accuracy of the judgment of the importance of the message is, for example, when k is 1, in the process of calculating the average priority level values of the messages 1 to 2, only the message 1 and the message 2 are associated with the other adjacent messages, and when k is 2, in the process of calculating the average priority level values of the messages 1 to 3, the message 1, the message 2 and the message 3 are associated with the other adjacent messages.
Optionally, step 405 may specifically include:
sub-step 4051, determining the difference between adjacent ones of (1+ k) of said average priority level values M _ a.
In this step, it is assumed that there are new consecutive messages: message 1: notification XX, receipt of the reply to request. Message 2: XXX was received. Message 3: and XX confirms. And message 4: and (4) receiving. The average priority degree value M1 of the message 1, the average priority degree value M2 of the message 2, the average priority degree value M3 of the message 3 and the average priority degree value M4 of the message 4 are obtained through calculation. Where messages 2 and 3 are noisy data and need to be filtered out, the difference between 4(k is 3) average priority level values may be further calculated. Namely, the difference 1 is M1-M2, the difference 2 is M2-M3, the difference 3 is M4-M3, the difference 4 is M4-M2, and the difference 5 is M1-M4.
Substep 4052, if the number of target difference values is greater than or equal to the predetermined number threshold, then determining the average priority level value M with the largest value among all the difference valuesaAnd determining the corresponding message text as the target message text, wherein the target difference is smaller than or equal to a preset difference threshold.
In this step, in combination with the example provided in step 4051, if the number of target difference values smaller than or equal to the preset difference threshold is greater than or equal to the preset number threshold, it is determined that the average priority level values of the 4 messages are not uniformly distributed, and the average priority level values of the 4 messages are distributed in a manner that the average priority level values are gradually smaller, so that it can be determined that there is more noise data in the 4 messages, and at this time, the message text corresponding to the average priority level value with the largest value can be directly determined as the message text with the highest importance level, and the message text is determined as the target message text.
Step 406, in (1+ k) message texts, the average priority level value M with the maximum value is selectedaAnd determining the corresponding message text as the target message text.
In this step, in connection with the example provided in step 405 above, since messages 1 to 4 are four consecutive messages, the average priority level value M of message 1 above is obtained1Reflects that the priority level value of the message 1 is related to the priority level value of the adjacent message 2, and the average priority level value M of the message 22Is calculated by reflecting the messageThe priority level value of 2 is associated with the priority level value of the message 3 adjacent to it, and the final calculation result is M1>M2Therefore, according to the calculation of the average priority level value, the message 1 is the first important information and the message 2 is the supplementary information which are distinguished by combining the context content of the message, and the message 1 can be determined to be in the target message text, so that the message importance can be judged according to the context of the message, and the accuracy of message text processing is improved.
And step 407, displaying the target message text.
This step may specifically refer to step 103, which is not described herein again.
In summary, another method for processing a message text provided in the embodiment of the present invention includes: receiving a plurality of message texts; determining at least one target message text from the plurality of message texts according to text characteristics of the plurality of message texts; the invention displays the target message text, by establishing the corresponding relation between the preset characteristic category and the preset weight value, matching the characteristic category corresponding to the text characteristic of the message text with the preset characteristic category, adding the preset weight value corresponding to the preset characteristic category to the matched text characteristic, and calculating the priority level value of the message text according to the weighted text characteristic, thereby determining the priority level of the message text and realizing the purpose of classifying the message text according to the priority level, because the invention realizes the weighting of the message text according to the characteristic category of the message text and accurately represents the importance degree of the message text according to the priority level value obtained by the weighted text characteristic, thereby realizing the classification of the message text and solving the problem of inaccurate classification result caused by classifying the message text based on semantic analysis, the classification precision of the message text is improved.
In addition, the embodiment of the invention further calculates the average priority level values of the message texts, so as to realize the purpose of further screening out more important message texts from a plurality of message texts with equal priority level values.
Fig. 5 is a flowchart of steps of another method for processing a message text according to an embodiment of the present invention, and as shown in fig. 5, the method may include:
step 501, receiving a plurality of message texts.
The implementation manner of this step is similar to the implementation process of step 101 described above, and the embodiment of the present invention is not described in detail here.
Step 502, matching the feature type of the text feature with a corresponding relationship between a preset feature type and a preset weight value, and adding a corresponding weight value to the text feature to obtain a weighted text feature.
The implementation manner of this step is similar to the implementation process of step 202 described above, and the embodiment of the present invention is not described in detail here.
Step 503, determining the priority level value of each message text according to the weighted text features.
The implementation manner of this step is similar to the implementation process of step 203 described above, and the embodiment of the present invention is not described in detail here.
Step 504, determining at least one target message text from the plurality of message texts according to the priority level value.
The implementation manner of this step is similar to the implementation process of step 204 described above, and the embodiment of the present invention is not described in detail here.
Step 505, if a plurality of priority level values with the maximum value exist, determining a plurality of message texts corresponding to the priority level values with the maximum value, and reducing a target preset weight value matched with text features of the message texts.
In the embodiment of the present invention, if there are multiple priority degree values with the largest value, it may be considered that the message texts corresponding to the equal priority degree values have repeatability in the matched preset feature categories, and the repeatability destroys uniqueness in the message text importance determination process (if the message texts have uniqueness, it indicates that the importance of the message texts is higher), the values of the target preset weight values corresponding to the preset feature categories with repeatability may be reduced, so as to achieve the purpose of optimizing the correspondence between the preset feature categories and the preset weight values, and improve the accuracy of the subsequent message text importance determination process according to the correspondence.
In addition, if there are a plurality of priority level values with the largest value, the message texts corresponding to the equal priority level values may also be subjected to folding processing, specifically, the message texts are stored in an openable tag, and only the openable tag is displayed to the user.
It should be noted that, after the target preset weight value matched with the text feature of the message text is reduced, optionally, the processes from step 502 to step 504 may be performed again, so as to achieve the purpose of re-determining the target message text according to the reduced target preset weight value.
Step 506, displaying the target message text.
This step may specifically refer to step 103, which is not described herein again.
In summary, another method for processing a message text provided in the embodiment of the present invention includes: receiving a plurality of message texts; determining at least one target message text from the plurality of message texts according to text characteristics of the plurality of message texts; the invention displays the target message text, by establishing the corresponding relation between the preset characteristic category and the preset weight value, matching the characteristic category corresponding to the text characteristic of the message text with the preset characteristic category, adding the preset weight value corresponding to the preset characteristic category to the matched text characteristic, and calculating the priority level value of the message text according to the weighted text characteristic, thereby determining the priority level of the message text and realizing the purpose of classifying the message text according to the priority level, because the invention realizes the weighting of the message text according to the characteristic category of the message text and accurately represents the importance degree of the message text according to the priority level value obtained by the weighted text characteristic, thereby realizing the classification of the message text and solving the problem of inaccurate classification result caused by classifying the message text based on semantic analysis, the classification precision of the message text is improved.
In addition, the invention can reduce the value of the target preset weight value corresponding to the repeated preset feature category so as to achieve the purpose of optimizing the corresponding relation between the preset feature category and the preset weight value and improve the precision of the subsequent message text importance judgment process according to the corresponding relation.
Fig. 6 is a block diagram of a terminal device according to an embodiment of the present invention, and as shown in fig. 6, the terminal device 60 includes:
a receiving module 601, configured to receive a plurality of message texts;
a determining module 602, configured to determine at least one target message text from a plurality of message texts according to text features of the plurality of message texts;
optionally, the determining module 602 includes:
the weighting submodule is used for matching the feature category of the text feature with the corresponding relation between a preset feature category and a preset weight value, and adding a corresponding weight value to the text feature to obtain a weighted text feature;
optionally, the preset weight value includes a positive weight value and a negative weight value.
Optionally, the weighting sub-module includes:
and the matrix establishing unit is used for establishing a weighted feature matrix with dimension (m multiplied by n) according to the text features of the n message texts and the m feature categories, wherein n and m are integers larger than 0. In the embodiment of the invention, the weighted feature matrix is established, so that the text features of all message texts can be gathered in one set, and the calculation amount of the subsequent processing process is reduced.
The matrix weighting unit is used for adding a preset weight value corresponding to the preset characteristic category to each matrix element of the weighted characteristic matrix when the characteristic category of the text characteristic is matched with the preset characteristic category; in the embodiment of the invention, the weighting operation is carried out on the weighting characteristic matrix, so that the priority degree value of the message text can be calculated subsequently according to the weighting characteristic matrix, and the priority of the message text is determined.
And the constant adding unit is used for adding a preset constant to the matrix element when the feature type of the text feature is not matched with the preset feature type. In the embodiment of the invention, the weighting operation is carried out on the weighting characteristic matrix, so that the priority degree value of the message text can be calculated subsequently according to the weighting characteristic matrix, and the priority of the message text is determined.
The calculation submodule is used for determining the priority level value of each message text according to the weighted text characteristics;
optionally, the calculation submodule includes:
the summation calculation unit is used for carrying out summation calculation on each row in the n rows of data of the weighted feature matrix to obtain n priority degree values;
and the classification submodule is used for determining at least one target message text from the plurality of message texts according to the priority level value. In the embodiment of the invention, according to the weighted feature matrix, the priority degree value of the message text can be calculated, so that the priority of the message text is determined.
The classification submodule includes:
and the first dividing unit is used for determining the message text corresponding to the priority level value with the maximum value as the target message text in the n priority level values. In the embodiment of the invention, according to the weighted feature matrix, the priority degree value of the message text can be calculated, so that the priority of the message text is determined, and the classification operation of the message text is realized.
Optionally, the classification sub-module includes:
and the sorting unit is used for sorting the message texts according to the sequence of the priority degree values from large to small to obtain a message text sequence if the priority degree values with the largest values exist in the priority degree values of each message text determined according to the weighted text characteristics. The embodiment of the invention further sequences the message texts according to the priority degree value, thereby realizing the purpose of selecting the target message text according to the priority degree value.
An adding and averaging unit, configured to select (1+ k) message texts from the end with the largest priority level value in the message text sequence message texts according to a preset constant k, and obtain and determine an average priority level value M of each message texta. The embodiment of the invention further calculates the average priority level value of the message texts, thereby realizing the purpose of further screening out more important message texts from a plurality of message texts with equal priority level values.
A second dividing unit for dividing the average priority level value M having the largest value among the (1+ k) message textsaAnd determining the corresponding message text as the target message text. The embodiment of the invention further calculates the average priority level value of the message texts, thereby realizing the purpose of further screening out more important message texts from a plurality of message texts with equal priority level values.
Wherein, for the a-th message text in the (1+ k) message texts, the corresponding average priority level value of the a-th message text
Figure BDA0002057253530000231
Said raAnd the preset constant k is an integer greater than 0 and is the priority level value corresponding to the a-th message text.
The second dividing unit further includes:
a difference value calculating subunit for determining (1+ k) of the average priority level values MaThe adjacent average priority level value MaBetweenA difference of (d); the embodiment of the invention further calculates the difference between the average priority level degree values of the message texts, and judges whether the average priority level degree values of the plurality of messages are abnormal in distribution or not according to the difference, thereby realizing the purpose of screening the noise data from the plurality of message texts.
A third dividing subunit, configured to, if the number of difference values smaller than or equal to the preset difference threshold value is greater than or equal to the preset number threshold value, divide the average priority level value M with the largest value among all the difference valuesaAnd determining the corresponding message text as the target message text. The embodiment of the invention further calculates the difference between the average priority level degree values of the message texts, and judges whether the average priority level degree values of the plurality of messages are abnormal in distribution or not according to the difference, thereby realizing the purpose of screening the noise data from the plurality of message texts.
Optionally, the determining module 602 includes:
and the weight adjusting submodule is used for determining a plurality of message texts corresponding to the priority level values with the maximum values and reducing a target preset weight value matched with the text characteristics of the message texts if the priority level values with the maximum values exist. The embodiment of the invention can achieve the aim of optimizing the corresponding relation between the preset characteristic category and the preset weight value and improve the precision of the subsequent message text importance judgment process according to the corresponding relation.
A display module 603, configured to determine a priority level value of each message text according to the weighted text feature, and determine at least one target message text from the plurality of message texts according to the priority level value.
In summary, the terminal device provided in the embodiment of the present invention includes receiving a plurality of message texts; determining at least one target message text from the plurality of message texts according to text characteristics of the plurality of message texts; the invention displays the target message text, by establishing the corresponding relation between the preset characteristic category and the preset weight value, matching the characteristic category corresponding to the text characteristic of the message text with the preset characteristic category, adding the preset weight value corresponding to the preset characteristic category to the matched text characteristic, and calculating the priority level value of the message text according to the weighted text characteristic, thereby determining the priority level of the message text and realizing the purpose of classifying the message text according to the priority level, because the invention realizes the weighting of the message text according to the characteristic category of the message text and accurately represents the importance degree of the message text according to the priority level value obtained by the weighted text characteristic, thereby realizing the classification of the message text and solving the problem of inaccurate classification result caused by classifying the message text based on semantic analysis, the classification precision of the message text is improved.
Fig. 7 is a block diagram of a terminal device of another embodiment of the present invention. The terminal device 700 shown in fig. 7 includes: at least one processor 701, a memory 702, at least one network interface 704, a user interface 703, and a camera 706. The various components in the terminal device 700 are coupled together by a bus system 705. It is understood that the bus system 705 is used to enable communications among the components. The bus system 705 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various busses are labeled in figure 7 as the bus system 705.
The user interface 703 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or flexible screen, among others.
It is to be understood that the memory 702 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM ), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 702 of the systems and methods described in this embodiment of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 702 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 7021 and application programs 7022.
The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 7022 includes various applications, such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. Programs that implement methods in accordance with embodiments of the present invention can be included within application program 7022.
In the embodiment of the present invention, the processor 701 is configured to, by calling a program or an instruction stored in the memory 702, specifically, a program or an instruction stored in the application 7022: determining a plurality of message texts; extracting text features of each message text; matching the feature type of the text features with the corresponding relation between the preset feature type and the preset weight value, and adding the corresponding weight value to the text features to obtain weighted text features; and determining the priority level value of each message text according to the weighted text characteristics, and dividing the message texts into corresponding priority classes according to the priority level values.
The method disclosed in the above embodiments of the present invention may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The processor 701 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and performs the steps of the above method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within 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), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described in this disclosure may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described in this disclosure. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The terminal device 700 can implement each process implemented by the terminal device in the foregoing embodiments, and details are not described here to avoid repetition.
In the embodiment of the invention, the invention receives a plurality of message texts; determining at least one target message text from the plurality of message texts according to text characteristics of the plurality of message texts; the target message text with higher importance degree is determined from the plurality of message texts through the text characteristics of the message texts, so that the target message text can be displayed, the aim of displaying the message texts in a grading way is fulfilled, the probability of missing important chat messages is reduced, and the browsing time of the message text is saved.
For the above device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides a terminal device, which, with reference to fig. 7, includes a processor 701, a memory 702, and a computer program that is stored in the memory and is executable on the processor, where the computer program, when executed by the processor 701, implements each process of the above-mentioned message text processing method embodiment, and can achieve the same technical effect, and is not described herein again to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the above-mentioned message text processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As is readily imaginable to the person skilled in the art: any combination of the above embodiments is possible, and thus any combination between the above embodiments is an embodiment of the present invention, but the present disclosure is not necessarily detailed herein for reasons of space.
The methods of processing message text provided herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The structure required to construct a system incorporating aspects of the present invention will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the method of processing message text according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (6)

1. A processing method of message text is applied to terminal equipment, and is characterized in that the method comprises the following steps:
receiving a plurality of message texts;
determining at least one target message text from the plurality of message texts according to text characteristics of the plurality of message texts;
displaying the target message text;
the step of determining at least one target message text from the plurality of message texts according to the text characteristics of the plurality of message texts comprises:
matching the feature type of the text feature with a corresponding relation between a preset feature type and a preset weight value, and adding the corresponding weight value to the text feature to obtain a weighted text feature;
determining the priority level value of each message text according to the weighted text characteristics;
determining at least one target message text from the plurality of message texts according to the priority level value;
the step of determining at least one target message text from the plurality of message texts according to the priority level value comprises:
if a plurality of priority level values with the largest value exist in the priority level values of each message text determined according to the weighted text characteristics, arranging the message texts according to the sequence of the priority level values from large to small to obtain a message text sequence;
according to a preset constant k, starting from the end with the maximum priority degree value in the message text sequence, (1+ k) message texts are selected, and the average priority degree value M of each message text is determineda
The average priority level value M with the maximum value is selected from (1+ k) message textsaThe corresponding message text is determined as the target message text;
wherein, for the a-th message text in the (1+ k) message texts, the corresponding average priority level value of the a-th message text
Figure FDA0002710315370000011
Said raAnd the preset constant k is an integer greater than 0 and is the priority level value corresponding to the a-th message text.
2. The method according to claim 1, wherein the step of matching the feature class of the text feature with a corresponding relationship between a preset feature class and a preset weight value and adding a corresponding weight value to the text feature to obtain a weighted text feature comprises:
establishing a weighted feature matrix with dimension (m multiplied by n) according to the text features of the n message texts and the m feature categories, wherein n and m are integers larger than 0;
for each matrix element of the weighted feature matrix, when the feature category of the text feature is matched with the preset feature category, adding a preset weight value corresponding to the preset feature category to the matrix element;
and when the feature type of the text feature is not matched with the preset feature type, adding a preset constant to the matrix element.
3. A terminal device, characterized in that the terminal device comprises:
a receiving module for receiving a plurality of message texts;
the determining module is used for determining at least one target message text from the plurality of message texts according to the text characteristics of the plurality of message texts;
the display module is used for determining the priority level value of each message text according to the weighted text characteristics and determining at least one target message text from a plurality of message texts according to the priority level value;
the determining module includes:
the weighting submodule is used for matching the feature category of the text feature with the corresponding relation between a preset feature category and a preset weight value, and adding a corresponding weight value to the text feature to obtain a weighted text feature;
the calculation submodule is used for determining the priority level value of each message text according to the weighted text characteristics;
the classification submodule is used for determining at least one target message text from the plurality of message texts according to the priority level value;
the classification submodule further includes:
the sorting unit is used for sorting the message texts according to the priority degree values from large to small to obtain a message text sequence if a plurality of priority degree values with the largest value exist in the priority degree values of each message text determined according to the weighted text characteristics;
an adding and averaging unit, configured to select (1+ k) message texts from the end with the largest priority degree value in the message text sequence message texts according to a preset constant k, and obtain and determine each message textAverage priority level value Ma
A second dividing unit for dividing the average priority level value M having the largest value among the (1+ k) message textsaThe corresponding message text is determined as the target message text;
wherein, for the a-th message text in the (1+ k) message texts, the corresponding average priority level value of the a-th message text
Figure FDA0002710315370000031
Said raAnd the preset constant k is an integer greater than 0 and is the priority level value corresponding to the a-th message text.
4. The terminal device of claim 3, wherein the weighting submodule comprises:
the matrix establishing unit is used for establishing a weighted feature matrix with dimension (m multiplied by n) according to the text features of the n message texts and the m feature categories, wherein n and m are integers larger than 0;
the matrix weighting unit is used for adding a preset weight value corresponding to the preset characteristic category to each matrix element of the weighted characteristic matrix when the characteristic category of the text characteristic is matched with the preset characteristic category;
and the constant adding unit is used for adding a preset constant to the matrix element when the feature type of the text feature is not matched with the preset feature type.
5. A terminal device, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method of processing a message text according to any one of claims 1 to 2.
6. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the method of processing a message text according to one of claims 1 to 2.
CN201910393208.7A 2019-05-13 2019-05-13 Message text processing method and terminal equipment Active CN110225185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910393208.7A CN110225185B (en) 2019-05-13 2019-05-13 Message text processing method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910393208.7A CN110225185B (en) 2019-05-13 2019-05-13 Message text processing method and terminal equipment

Publications (2)

Publication Number Publication Date
CN110225185A CN110225185A (en) 2019-09-10
CN110225185B true CN110225185B (en) 2021-01-08

Family

ID=67820828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910393208.7A Active CN110225185B (en) 2019-05-13 2019-05-13 Message text processing method and terminal equipment

Country Status (1)

Country Link
CN (1) CN110225185B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112364128B (en) * 2020-11-06 2024-05-24 北京乐学帮网络技术有限公司 Information processing method, device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107835495A (en) * 2017-12-08 2018-03-23 维沃移动通信有限公司 A kind of message prompt method, device and mobile terminal
CN108337374A (en) * 2018-01-23 2018-07-27 维沃移动通信有限公司 A kind of message prompt method and mobile terminal
CN109274814A (en) * 2018-08-20 2019-01-25 维沃移动通信有限公司 A kind of message prompt method, device and terminal device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102036337B1 (en) * 2013-04-04 2019-10-24 삼성전자주식회사 Apparatus and method for providing additional information using caller identification
US10028112B2 (en) * 2016-02-18 2018-07-17 Vivint, Inc. Event triggered messaging
CN107426448A (en) * 2016-05-23 2017-12-01 上海神计信息系统工程有限公司 A kind of automatic calling allocation method being lined up based on dynamic priority
CN108574732B (en) * 2018-03-22 2021-05-04 平安科技(深圳)有限公司 Push message processing method, computer readable storage medium and terminal equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107835495A (en) * 2017-12-08 2018-03-23 维沃移动通信有限公司 A kind of message prompt method, device and mobile terminal
CN108337374A (en) * 2018-01-23 2018-07-27 维沃移动通信有限公司 A kind of message prompt method and mobile terminal
CN109274814A (en) * 2018-08-20 2019-01-25 维沃移动通信有限公司 A kind of message prompt method, device and terminal device

Also Published As

Publication number Publication date
CN110225185A (en) 2019-09-10

Similar Documents

Publication Publication Date Title
US10516638B2 (en) Techniques to select and prioritize application of junk email filtering rules
US20180248879A1 (en) Method and apparatus for setting access privilege, server and storage medium
CN112868004B (en) Resource recommendation method and device, electronic equipment and storage medium
WO2019169978A1 (en) Resource recommendation method and device
CN106874253A (en) Recognize the method and device of sensitive information
US11423096B2 (en) Method and apparatus for outputting information
CN111190689B (en) Digital twin system simulation method and device
CN109558384B (en) Log classification method, device, electronic equipment and storage medium
CN110569334A (en) method and device for automatically generating comments
CN111242709A (en) Message pushing method and device, equipment and storage medium thereof
CN110245684B (en) Data processing method, electronic device, and medium
CN107656918A (en) Obtain the method and device of targeted customer
CN110225185B (en) Message text processing method and terminal equipment
CN108228869B (en) Method and device for establishing text classification model
CN110048862B (en) Message display method and device and electronic equipment
CN112214770A (en) Malicious sample identification method and device, computing equipment and medium
CN109344327B (en) Method and apparatus for generating information
CN114117062A (en) Text vector representation method and device and electronic equipment
CN114143571B (en) User processing method, device, equipment and storage medium
CN115080835A (en) Information recommendation method and device, user side and equipment
CN111882360A (en) User group expansion method and device
CN111897910A (en) Information pushing method and device
CN111198941A (en) Problem discovery method and device, electronic equipment and storage medium
CN109740671B (en) Image identification method and device
CN112529646A (en) Commodity classification method and device

Legal Events

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