Disclosure of Invention
In order to overcome the problems in the related art, the specification provides a chat message query method, a chat message query device and a chat message query device.
According to a first aspect of embodiments of the present specification, there is provided a message query method, the method including:
if the chat message meets the preset marking condition, marking the chat message;
and if a message query event occurs, searching the marked chat message from the historical message record, and displaying the marked chat message.
Optionally, the preset marking condition includes one or more of the following:
triggering a preset marking control associated with the chat message, wherein the preset marking control is a control for marking the chat message;
the control to which the chat message belongs is executed with a specified trigger operation, and the specified trigger operation is used for indicating that the chat message is marked;
after displaying the chat message and before displaying other chat messages except the specified message, receiving an instruction for displaying the specified message, wherein the specified message is a pre-specified message used for indicating that the chat message is marked.
Optionally, the marking the chat message includes:
recording the identifier of the chat message; or the like, or, alternatively,
newly creating/updating the corresponding relation between the identifier of the chat message and auxiliary information, wherein the auxiliary information comprises one or more of the following: the marked times of the chat messages, the marks of the users who mark the chat messages and the record marks of the historical chat records to which the chat messages belong; or the like, or, alternatively,
and adding a label for the chat message based on a preset label setting interface.
Optionally, the method further includes: and if the chat message meets the preset marking condition, triggering and executing the operation of inputting the specified message, wherein the specified message is a message which is specified in advance and is used for marking the chat message.
Optionally, the listening to the message query event includes: detecting a preset moving track for representing a query message; or, a preset marking message inquiry control is triggered.
Optionally, the message query event includes one or more of the following:
inquiring the message inquiry event of the marked chat message in the history message record;
inquiring a message inquiry event of the chat message marked by the specified user in the historical message record;
and inquiring the marked times of the marked chat messages in the historical message records.
Optionally, the marked chat messages are sorted and displayed according to the marked times, the marked times are obtained based on the times of the user marking the chat messages in the history chat record to which the chat messages belong, and the marked times are obtained by statistics of a client executing the method or by statistics of an instant messaging server communicating with the client.
Optionally, the marked chat messages are displayed in a classified manner according to the labels to which the chat messages belong, and the labels to which the chat messages belong are obtained based on a preset label setting interface.
According to a second aspect of embodiments herein, there is provided a message query apparatus, the apparatus comprising:
a marking module to: if the chat message meets the preset marking condition, marking the chat message;
a query module to: and if a message query event occurs, searching the marked chat message from the historical message record, and displaying the marked chat message.
Optionally, the preset marking condition includes one or more of the following:
triggering a preset marking control associated with the chat message, wherein the preset marking control is a control for marking the chat message;
the control to which the chat message belongs is executed with a specified trigger operation, and the specified trigger operation is used for indicating that the chat message is marked;
after displaying the chat message and before displaying other chat messages except the specified message, receiving an instruction for displaying the specified message, wherein the specified message is a pre-specified message used for indicating that the chat message is marked.
Optionally, the marking module is specifically configured to:
recording the identifier of the chat message; or the like, or, alternatively,
newly creating/updating the corresponding relation between the identifier of the chat message and auxiliary information, wherein the auxiliary information comprises one or more of the following: the marked times of the chat messages, the marks of the users who mark the chat messages and the record marks of the historical chat records to which the chat messages belong; or the like, or, alternatively,
and adding a label for the chat message based on a preset label setting interface.
Optionally, the marking module is further configured to: and if the chat message meets the preset marking condition, triggering and executing the operation of inputting the specified message, wherein the specified message is a message which is specified in advance and is used for marking the chat message.
Optionally, the listening to the message query event includes: detecting a preset moving track for representing a query message; or, a preset marking message inquiry control is triggered.
Optionally, the message query event includes one or more of the following:
inquiring the message inquiry event of the marked chat message in the history message record;
inquiring a message inquiry event of the chat message marked by the specified user in the historical message record;
and inquiring the marked times of the marked chat messages in the historical message records.
Optionally, the marked chat messages are sorted and displayed according to the marked times, the marked times are obtained based on the times of the user marking the chat messages in the history chat record to which the chat messages belong, and the marked times are obtained by performing statistics on a client of the device, or by performing statistics on an instant messaging server communicating with the client.
Optionally, the marked chat messages are displayed in a classified manner according to the labels to which the chat messages belong, and the labels to which the chat messages belong are obtained based on a preset label setting interface.
According to a third aspect of embodiments herein, there is provided an electronic apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
if the chat message meets the preset marking condition, marking the chat message;
and if a message query event occurs, searching the marked chat message from the historical message record, and displaying the marked chat message.
The technical scheme provided by the embodiment of the specification can have the following beneficial effects:
in the embodiment of the specification, when the chat messages meet the preset marking condition, the chat messages are marked, so that when a message query event occurs, the marked chat messages can be searched from the history message record and displayed, the marked chat messages can be chat messages with special significance, the number of the marked chat messages is far smaller than the total number of the chat messages in the history message record, a user searches for expected chat messages from the marked chat messages, the searching efficiency can be improved, and time waste caused by the fact that the user searches for the chat messages from the history message record sequentially according to the time sequence is avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Among various existing communication methods, Instant Message (IM) communication is a communication method commonly used by users due to its advantages of fast usage, powerful functions, low cost, and convenient communication. In existing IM services, a user may communicate with an instant messaging application, such as: the nail, the Aliwang and the like can conveniently communicate the chat messages and transmit various information such as texts, voice, video, data and the like.
Fig. 1 is a block diagram of an instant messaging system according to an exemplary embodiment of the present disclosure. The system can comprise an intelligent terminal (also called a user terminal and a client) and an instant communication server. The intelligent terminal can be various electronic devices which are provided with application programs with instant messaging functions (such as instant messaging applications), and the electronic devices can be handheld electronic devices or other electronic devices. For example, it may be a cellular phone, media player or other handheld portable device, a slightly smaller portable device such as a wristwatch device, pendant device, or other wearable or miniaturized device, gaming equipment, a tablet computer, notebook computer, desktop computer, a computer integrated into a computer display, or other electronic equipment. The intelligent terminal may also be an application program with an instant messaging function, for example, an application that takes instant messaging as a main service, such as nailing and alexan, and an application that takes instant messaging as an auxiliary service, such as a payment treasure. The instant communication server can process and forward the chat message. The instant messaging server may be a general term for a plurality of server devices, or may be a general term for at least one piece of software installed on a server device. The intelligent terminal can perform information interaction with the instant messaging service terminal through a mobile communication network or an internet.
At present, in a chat window provided by the application program, people usually publish important chat messages, and the important chat messages are easily buried in a history message record over time, and especially in a group chat scene, a user needs to search for the important chat messages from a large number of chat messages.
In view of this, embodiments of the present specification provide a message query method, which can mark chat messages when the chat messages satisfy a preset marking condition, so that when a message query event occurs, the marked chat messages can be searched from a history message record and displayed, and the marked chat messages can be chat messages with special meanings, the number of the marked chat messages is far smaller than the total number of the chat messages in the history message record, and a user searches for an expected chat message from the marked chat messages, so that the search efficiency can be improved, and time waste caused by the user sequentially searching the chat messages from the history message record in time sequence is avoided.
The following describes an embodiment of the present specification with reference to the drawings.
As shown in fig. 2A, which is a flowchart of a message query method according to an exemplary embodiment shown in this specification, the method may be applied to a user terminal, and may include the following steps:
in step 202, if the chat message meets the preset marking condition, the chat message is marked.
The query method in the embodiment of the specification can be applied to a one-to-one chat scene and can also be applied to a multi-person chat scene. A chat group (called a private chat group for short) corresponding to the one-to-one chat scene comprises two chat users; the chat group (multi-person chat group for short) corresponding to the multi-person chat scene comprises more than two chat users. For example, the multi-person chat group may be a group, a temporary chat group, a chat room, or the like. The chat message may be chat content sent by any member of the chat group. For convenience of understanding, a user who logs in the instant messaging service end by using the user terminal is called a home-end user, and other chat users in the chat group are called opposite-end users. The chat message can be a chat message sent by a local terminal user or a chat message sent by an opposite terminal user, so that the chat message sent by any member in the chat group can be marked. Divided by type, chat messages may be text, audio, video, image, data, and the like types of messages. It can be understood that the chat message can be a chat message of a current chat interface, and can also be a chat message in a history message record, so that the chat message can be marked in the current chat interface and the history message record.
The preset marking condition may be a preset condition for determining whether the chat message needs to be marked. When the chat message meets the preset marking condition, the chat message can be marked. Several preset marking conditions are listed below for illustration.
As one implementation, the preset marking condition may include: after displaying the chat message and before displaying other chat messages except the specified message, receiving an instruction for displaying the specified message, wherein the specified message is a pre-specified message used for indicating that the chat message is marked.
In this embodiment, after the chat message is displayed and before other chat messages except the specified message are not displayed, if the specified message is displayed, it is determined that the chat message meets the preset marking condition.
In this embodiment, the specified message indicates that the chat message needs to be marked. For example, the designation message may be a designation picture, in particular an emoticon. The designated expression picture can be one of the existing expression pictures in the expression library, or can be an expression picture with a specific meaning newly added for the scheme. For example, the existing praise picture is used as the specified message, so that after the chat message is displayed and before other chat messages except the specified message are not displayed, if the praise picture is input, the preset marking condition is satisfied. For another example, since a newly created markup picture is used as the designation message, if the markup picture is input after the chat message is displayed and before the chat message other than the designation message is not displayed, it indicates that the preset markup condition is satisfied.
In one example, the specified message may be a specified message entered by the home user. Thus, the preset marking conditions may include: generating an input event for inputting the specified message after the chat message is displayed and before other chat messages except the specified message are not displayed.
As can be seen, in this embodiment, the input event for inputting the specified message may be an event triggered and generated by an operation of the home terminal user, so that the home terminal user marks the chat message.
In practical applications, the opposite-end user may also mark the chat message, and the mark of the opposite-end user has a referential meaning for the local-end user, so in an example, the mark operation of other users in the chat group may also be analyzed at the local-end user terminal. For this purpose, the specified message may also be a specified message input by the opposite-end user. The preset marking condition may further include: and after the chat messages are displayed and before other chat messages except the specified messages are not displayed, the specified messages sent by other users in the chat group are received.
Therefore, the embodiment determines whether the user performs the marking operation in the chat group by detecting the specified message. And for the specified message sent by any person in the chat group, if the specified message is received after the chat message is displayed and before other chat messages except the specified message are not displayed, judging that the preset marking condition is met, and marking the target chat message.
However, in practical applications, there may be a case that other members send other chat messages before the chat message is marked, which may result in a failure of marking, and in view of this, another preset marking condition is provided, including: determining to generate a user trigger event that marks the chat message.
Wherein generating the message query event may include: triggering a preset mark control associated with the chat message; and the control to which the chat message belongs is executed with specified operation and the like. As can be seen, the user trigger event for marking the chat message may be an event generated by the user triggering a preset marking control; or an event generated based on a specified trigger operation performed by the user on the chat message. The specified trigger operation may be an operation which is not defined in the prior art, and is defined by the embodiment to represent the message query. For example, it may be a double-click operation for the chat message, a sliding operation for the chat message in a predefined trajectory, etc.
Next, the example is given by taking the example that the preset mark control associated with the chat message is triggered.
The association between the chat message and the preset marking control can be through the association between the chat message and the position of the preset marking control, or through a menu triggered by the chat message.
In one embodiment, the chat message satisfying the preset mark condition may include:
if the control to which the chat message belongs is triggered, displaying a menu comprising a preset marking control;
and determining to generate a user trigger event for marking the chat message based on a preset marking control in the menu.
The triggering operation of the control to which the chat message belongs may be a long press operation, a double-click operation, a right-click operation, and the like. As one implementation manner, if the trigger operation on the control to which the chat message belongs is different from the defined trigger operation, the menu may be a newly created menu. Fig. 2B is a schematic diagram of a chat window according to an exemplary embodiment of the present disclosure. In this embodiment, assuming that double-clicking the chat message does not trigger any event in the existing definition, a new menu including a preset marking control may be presented when the control to which the chat message belongs is double-clicked, and the menu may include the marking control and may also include a cancellation control. When the marking control is selected, it can be determined that a user-triggered event is generated that marks the chat message.
As another implementation manner, if the triggering operation on the control to which the chat message belongs is the same as the defined operation, at least a mark control may be added in the existing menu. In this embodiment, it is assumed that a long press of a chat message in an existing definition pops up a menu of controls including copy and the like. Therefore, the marking control can be additionally arranged in the menu, so that the menu comprising the copying control, the forwarding control, the multi-selection control and the marking control is displayed when the user presses the control belonging to the chat message for a long time. When the marking control is selected, it can be determined that a user-triggered event is generated that marks the chat message.
It is understood that other preset marking conditions may be adopted to determine whether the chat message needs to be marked, which is not listed here.
After the chat message meets the preset marking condition, the chat message can be marked. The marking of chat messages can be divided into two categories, one is a marking operation with invisible front end and the other is a marking operation with visible front end.
Next, the operation of marking with a front invisible will be described.
The marking operation of the background to the chat message is different for different query purposes. As a main means, at least the identifier of the chat message is stored, so that the tagged chat message is queried according to the identifier of the chat message in the query, and further, information related to the tagged chat message, such as information of the user who sent the tagged chat message, can be queried according to the identifier of the chat message. The identifier of the chat message may be an identifier for uniquely identifying the chat message, and may be, for example, a chat message ID.
In one embodiment, if the chat messages in different chat groups are identified differently and the query is for the purpose of: querying all tagged chat messages in the history message record, the tagging of chat messages may include: recording the identifier of the chat message. In view of this, when a message query event for querying the tagged chat messages in all the history message records is monitored, the tagged chat messages are searched from all the history message records according to the recorded chat message identifiers, and the tagged chat messages are displayed. All historical message records may be the historical message records of all chat groups joined by the home user.
Therefore, the embodiment can realize the inquiry of the marked chat messages in all the historical message records at one time, and improve the searching efficiency.
In another embodiment, the correspondence between the identifier of the chat message and the auxiliary information may be newly created/updated, and the auxiliary information includes one or more of the following: the marked times of the chat messages, the marks of the users who mark the chat messages and the record marks of the historical chat records to which the chat messages belong. When the chat message meets the preset marking condition, if the corresponding relation between the identifier of the chat message and the auxiliary information does not exist, the corresponding relation can be newly established; and if the corresponding relation between the identifier of the chat message and the auxiliary information exists, updating the existing corresponding relation. The auxiliary information is illustrated in the following several combinations.
In one example, the query purpose may be: querying historical message records for chat messages that specify user tags, and in view of this, said tagging said chat messages may comprise: and recording the identifier of the chat message and the identifier of the user marking the chat message.
On one hand, the user who marks the chat message can be a home terminal user, so that the marking operation of the home terminal user is recorded, the identifier of the chat message and the identifier of the home terminal user who marks the chat message are recorded, and the subsequent chat information marked by the home terminal user can be found. On the other hand, the user who marks the chat message can be the home terminal user or the opposite terminal user, so that the subsequent chat messages marked by the home terminal user and the opposite terminal user can be searched.
In another example, for the same chat message, there may be different users of the same chat group tagging the chat message, and the tagged number of times of the chat message may reflect the importance degree of the chat message, then tagging the chat message may include: and newly building or updating the corresponding relation between the identifier of the chat message and the marked times of the chat message. In view of this, when a message query event querying the tagged number of times of the tagged chat message in the history message record is monitored, the tagged chat message can be searched from the history message record according to the corresponding relationship between the identifier of the chat message and the tagged number of times, and the tagged chat message and the corresponding relationship between the message and the tagged number of times are displayed.
In this embodiment, the user terminal counts the marked times of the chat messages, for example, after the chat messages are displayed and before the chat messages other than the specified messages are not displayed, every time the specified messages are input, the marked times of the chat messages are added by 1 until the chat messages other than the specified messages are displayed, and the marked times of the chat messages are obtained.
In another example, the query purpose may be: and inquiring the marked chat messages in the history message records of a certain chat group. In view of this, said marking of said chat message may comprise: and recording the corresponding relation between the identifier of the chat message and the record identifier of the historical chat record to which the chat message belongs.
The historical chat records can be divided according to chat groups, and different chat groups correspond to different historical chat records. The chat groups may include a private chat group and a multi-person chat group. The record identifier of the historical chat record is used for uniquely identifying the historical chat record, and may be, for example, an identifier of a chat group to which the historical chat record belongs, such as a group number, a correspondence relationship between user identifiers in the chat group, and the like.
In view of this, the embodiments of this specification further provide an example in which the instant messaging service end determines the number of times that the chat message is marked. After the corresponding relation is recorded, the corresponding relation can be sent to an instant messaging service end, the marked times of the chat messages in the same historical message record are counted through the instant messaging service end, and the mapping relation between the chat messages and the marked times is fed back to the user terminal when an inquiry request sent by the user terminal is received. Specifically, the user terminal may perform the following steps:
if a message query event occurs, sending a message query instruction to an instant messaging server, wherein the message query instruction is used for querying marked chat messages in historical message records;
receiving a mapping relation between the marked chat message fed back by the instant messaging server and the marked times;
the tagged chat messages are sorted and presented according to the number of times they are tagged.
Therefore, in the embodiment, the corresponding relation is uploaded by each user terminal, and the marked times of the chat messages are counted by the server, so that the efficiency of determining the marked times is improved.
In another example, said tagging the chat message comprises: and adding a label for the chat message based on a preset label setting interface.
In this embodiment, the tags may be set for chat messages based on the tag setting service provided. Different labels can be distinguished by characters or by colors. The tags can be divided according to the importance degree, can be divided according to the chat message type, and the like, and can be specifically set according to the user requirements.
Further, the operation of the front visible marking can be described.
In one example, a label or marking information for indicating marking of the chat message is presented at a position associated with the chat message in the chat window.
The purpose of displaying the label or the marking information may be to remind the user that the chat message is marked successfully. The location in the chat window associated with the chat message can be predefined, for example, a specified location of the area where the chat message is located can be determined as the location associated with the chat message. For example, the marker information is displayed at a designated position in the area where the chat message is located. The marking information may be a pattern, a character, or the like. Further, the tagged number of times the chat message is being displayed. For another example, if the chat message is provided with a tag, the tag may be displayed at a designated position of the area where the chat message is located, so as to remind the user of successful setting and the set tag name.
In one embodiment, the method further comprises: and if the chat message meets the preset marking condition, triggering and executing the operation of inputting the specified message, wherein the specified message is a message which is specified in advance and is used for marking the chat message.
In this embodiment, the chat message meeting the preset marking condition is also determined as the input event of the input designation message is monitored, so that when the chat message meets the preset marking condition, the same operation as the operation corresponding to the input event of the input designation message is monitored, and the input designation message is input.
The specific message may be a specific picture, such as a specific emoticon, and particularly a praise picture with pragmatic meaning. Therefore, the method and the device can achieve the purpose of inputting the specified message and prompt the user that the chat message is marked successfully by inputting the specified message.
In step 204, if a message query event occurs, the marked chat message is searched from the history message record, and the marked chat message is displayed.
Wherein the message query event may be an event querying a tagged chat message. In an optional implementation manner, the message query event may be further subdivided, for example, the message query event may include:
inquiring the message inquiry event of the marked chat message in the history message record;
inquiring a message inquiry event of the chat message marked by the specified user in the historical message record;
and inquiring the marked times of the marked chat messages in the historical message records.
The history message record may be a message record corresponding to different chat groups, or a message record corresponding to the same chat group. It is to be understood that the message query event is not limited to the above-mentioned segment query event, and may also include other events for querying the tagged chat message, which are not listed here.
Regarding how to determine that the message query event occurs, in one example, a preset movement track for representing the query message may be detected. The preset movement track is a track which is not defined in advance, and if the preset movement track used for representing the query message is detected, the message query event is judged to occur. For example, a circular movement trajectory, a leftward sliding trajectory at the right edge, and the like. Different message query events can be distinguished based on the interface where the preset movement track is located. For example, when the instant messaging application is on the home page, if a preset movement track representing the query message is detected, it may be determined that a message query event for querying all tagged chat messages in the history message records occurs. For another example, if a preset movement track for representing the query message is detected in the chat interface of the target chat group in the instant messaging application, it may be determined that a message query event or the like for querying the tagged chat message in the history message record of the target chat group occurs.
Therefore, in the embodiment, whether the query event occurs or not can be judged through the preset moving track, and the interactivity is strong.
In another example, a message query event occurs, which may be a preset markup message query control being triggered. The marked message query control is a control which is added in advance and used for querying the marked chat messages. Based on different interfaces of the marked message query control, different message query events can be triggered to be executed. For example, if the tagged message query control is located on the home page of the instant messaging application, the tagged message query control may trigger a query for tagged chat messages in all history message records. If the marked message query control is arranged on a chat interface of a certain chat group, the marked message query control can trigger query of the marked chat messages in the historical message records of the chat group, and the like. In addition, different message query events can be distinguished by marking the name of the message query control. For example, the tagged message query controls may include full queries, split chat group queries, tagged number queries, tagged query, and the like. As can be seen, the embodiment determines whether to trigger the query operation of the marked chat message through the marked message query control.
It can be understood that whether the message query event occurs may also be determined by other means, which is not described herein again.
Different query operations may be performed based on different message query events. For example, for a message query event querying all of the history message records for tagged chat messages, the tagged chat messages can be queried from all of the history message records based on the identity of the tagged chat messages. For another example, for a message query event for querying a tagged chat message in a history message record of a certain chat group, the tagged chat message may be queried from the history chat record corresponding to the record identifier according to a correspondence between the identifier of the tagged chat message and the record identifier of the history chat record to which the chat message belongs. For another example, for a message query event that queries the marked times of the chat message in the history message record, the marked chat message may be queried from the history message record according to the correspondence between the identifier of the chat message and the marked times, and the marked times of the chat message may be obtained. The corresponding relation between the chat message identifier and the marked times can be obtained by local terminal statistics or by instant communication server feedback.
Several ways are listed below to illustrate how the marked chat message is presented.
In one example, the tagged chat messages can be ordered and presented by the time of generation of the chat message.
In another example, the marked chat messages are sorted and displayed according to the marked times, the marked times are obtained based on the times of the users marking the chat messages in the historical chat records to which the chat messages belong, and the marked times are obtained by statistics of a client executing the method or by statistics of an instant messaging service end communicating with the client. Therefore, the importance of the marked chat messages can be embodied by sequencing and displaying the chat messages according to the marked times.
In another example, the tagged chat messages are displayed in a classified manner according to the tags to which the tagged chat messages belong, and the tags to which the tagged chat messages belong are obtained based on a preset tag setting interface. Therefore, the marked chat messages are displayed in a classified mode according to the labels to which the chat messages belong, so that the users can conveniently check the messages based on the labels, and the checking efficiency is improved.
The various technical features in the above embodiments can be arbitrarily combined, so long as there is no conflict or contradiction between the combinations of the features, but the combination is limited by the space and is not described one by one, and therefore, any combination of the various technical features in the above embodiments also belongs to the scope disclosed in the present specification.
One of the combinations is exemplified below.
As shown in fig. 3A, another message query method shown in the present specification according to an exemplary embodiment is a flowchart, and the method may include the following steps:
in step 302, if the control to which the chat message belongs is triggered, a menu including a preset mark control is displayed.
In step 304, if a user trigger event for marking the chat message is determined to be generated based on a preset marking control in the menu, a correspondence between the identifier of the chat message and the record identifier of the history chat record to which the chat message belongs is recorded.
Further, when a user trigger event for marking the chat message is generated, the operation of inputting a specified message is triggered to be executed, wherein the specified message is a message which is specified in advance and used for indicating that the chat message is marked. For example, the specified message may be an emoticon, particularly a praise emoticon.
In step 306, the corresponding relationship is sent to the instant messaging service end.
The instant communication server can receive the corresponding relation sent by each user terminal, count the marked times of the chat messages in the same historical message record and obtain the mapping relation between the marked chat messages and the marked times.
In step 308, when a message query event aiming at the history message record occurs, a message query instruction is sent to the instant messaging service end, the message query instruction is used for querying the marked chat message in the history message record, and the message query instruction carries the record identifier of the history message record.
Wherein the occurrence of the message query event for the history message record may include: and detecting a preset movement track for representing the query message on a chat interface corresponding to the history message record. For example, a track sliding to the left from the right edge.
In step 310, receiving the mapping relationship between the marked chat messages and the marked times in the history message record fed back by the instant messaging server.
Wherein the number of marked times may be the number of voted times.
In step 312, the marked chat messages in the history message record are sorted and displayed according to the mapping relationship, and the marked times of each marked chat message are identified.
Further, the marked chat message is displayed, and simultaneously, the user information of the initiator of the marked chat message can be displayed. For example, if the marked chat message is sent by yellow boy, the nickname "yellow boy" and the avatar of yellow boy may be displayed simultaneously when the marked chat message is displayed.
For ease of understanding, this specification also provides an interaction diagram. FIG. 3B is a diagram illustrating a message query interaction in accordance with an exemplary embodiment of the present specification. In this diagram, when the user pushes or double-clicks the chat message "Good" by a long press, a menu containing a praise control and a cancel control pops up. The user (yellow) can mark the chatting message "Good" by clicking the like control, and simultaneously starts to input the like picture. When the user slides left from the right edge of the screen, the user can enter a praise interface to present the marked chat messages and the praise number.
As can be seen from the above embodiments, in the embodiments of the present specification, a tagging service is provided by providing a tagging control, and when a message query event for a history message record occurs, a message query instruction may be sent to an instant messaging service end to obtain a mapping relationship between tagged chat messages and tagged times, so as to sort and display the tagged chat messages in the history message record according to the mapping relationship, and identify the tagged times of each tagged chat message, thereby reducing the number of messages, and facilitating a user to quickly find a desired chat message.
Corresponding to the embodiment of the message query method, the specification also provides an embodiment of a message query device and an electronic device applied to the message query device.
The embodiment of the message inquiry device in the specification can be applied to electronic equipment, such as terminal equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. From a hardware aspect, as shown in fig. 4, the electronic device in which the message query apparatus is located in this specification is a hardware structure diagram, except for the processor 410, the memory 430, the network interface 420, and the nonvolatile memory 440 shown in fig. 4, in an embodiment, the electronic device in which the apparatus 431 is located may also include other hardware according to an actual function of the device, which is not described again.
As shown in fig. 5, a block diagram of a message query device according to an exemplary embodiment is shown in the present specification, the message query device including:
a marking module 52 for: if the chat message meets the preset marking condition, marking the chat message;
a query module 54 for: and if a message query event occurs, searching the marked chat message from the historical message record, and displaying the marked chat message.
Optionally, the preset marking condition includes one or more of the following:
triggering a preset marking control associated with the chat message, wherein the preset marking control is a control for marking the chat message;
the control to which the chat message belongs is executed with a specified trigger operation, and the specified trigger operation is used for indicating that the chat message is marked;
after displaying the chat message and before displaying other chat messages except the specified message, receiving an instruction for displaying the specified message, wherein the specified message is a pre-specified message used for indicating that the chat message is marked.
Optionally, the marking module is specifically configured to:
recording the identifier of the chat message; or the like, or, alternatively,
newly creating/updating the corresponding relation between the identifier of the chat message and auxiliary information, wherein the auxiliary information comprises one or more of the following: the marked times of the chat messages, the marks of the users who mark the chat messages and the record marks of the historical chat records to which the chat messages belong; or the like, or, alternatively,
and adding a label for the chat message based on a preset label setting interface.
Optionally, the marking module is further configured to: and if the chat message meets the preset marking condition, triggering and executing the operation of inputting the specified message, wherein the specified message is a message which is specified in advance and is used for marking the chat message.
Optionally, the listening to the message query event includes: detecting a preset moving track for representing a query message; or, a preset marking message inquiry control is triggered.
Optionally, the message query event includes one or more of the following:
inquiring the message inquiry event of the marked chat message in the history message record;
inquiring a message inquiry event of the chat message marked by the specified user in the historical message record;
and inquiring the marked times of the marked chat messages in the historical message records.
Optionally, the marked chat messages are sorted and displayed according to the marked times, the marked times are obtained based on the times of the user marking the chat messages in the history chat record to which the chat messages belong, and the marked times are obtained by performing statistics on a client of the device, or by performing statistics on an instant messaging server communicating with the client.
Optionally, the marked chat messages are displayed in a classified manner according to the labels to which the chat messages belong, and the labels to which the chat messages belong are obtained based on a preset label setting interface.
Correspondingly, this specification embodiment also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to:
if the chat message meets the preset marking condition, marking the chat message;
and if a message query event occurs, searching the marked chat message from the historical message record, and displaying the marked chat message.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Accordingly, embodiments of the present specification further provide a computer storage medium having program instructions stored therein, where the program instructions include:
if the chat message meets the preset marking condition, marking the chat message;
and if a message query event occurs, searching the marked chat message from the historical message record, and displaying the marked chat message.
Embodiments of the present description may take the form of a computer program product embodied on one or more storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having program code embodied therein. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of the storage medium of the computer include, but are not limited to: phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by a computing device.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.