Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart illustrating a message processing method applied to an electronic device according to an embodiment of the present invention is shown, where the message processing method is applied to an electronic device, and the electronic device may be various electronic devices that support an application with an instant messaging function installed thereon, for example, the electronic device may include, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a desktop computer, and the like. The message processing method provided by the embodiment of the invention can comprise the following steps:
step 101, after a user finishes editing a first message to be sent, receiving a first input of the user to the first message.
In the embodiment of the invention, a user communicates with a preset contact of a target receiving end through an instant communication display interface of a target application program and receives and transmits instant communication messages; the target application program can be an application program with an instant messaging function; the first message is an instant messaging message which is received by the electronic equipment and is edited by a user and is to be sent to a target receiving terminal, and the first message may be at least one of a text message, a voice message and a file message, wherein the text message may include but is not limited to text content and emoticon content, and the file message may include but is not limited to images, videos and documents.
In an embodiment of the present invention, the first input may be at least one of a preset voice input, a touch input acting on the electronic device, a gesture input, and a motion input acting on the electronic device; here, the touch input applied to the electronic device may include, but is not limited to, a touch input applied to a screen or a housing, a gesture motion input may include, but is not limited to, a gesture motion input, a head motion input, a face motion input, and the like, and a motion input applied to the electronic device may include, but is not limited to, a flick motion input, a flip motion input, a fold motion input, and the like, applied to the electronic device.
In this step, when the user needs to delay sending the edited first message, the user performs a first input operation on the first message, so that the electronic device receives the first input, that is, the electronic device receives a trigger instruction for delaying sending the first message, so as to subsequently trigger a processing operation for delaying sending the first message.
In response to the first input, a first message is displayed in a first mode,step 102.
In this step, in response to the first input to the first message received instep 101, the electronic device displays the first message in the first mode to indicate that the first message is delayed to be sent, that is, in the first mode, the first message is not sent to the target receiving end and is in a state to be sent. Optionally, in this embodiment of the present invention, the first message may be cached in at least one of a local server and a server of the electronic device.
Step 103, receiving a second input of the first message displayed according to the first mode from the user.
In an embodiment of the present invention, the second input may be at least one of a preset voice input, a gesture input, a touch input acting on the electronic device, and a motion input acting on the electronic device; here, the touch input applied to the electronic device may include, but is not limited to, a touch input applied to a screen or a housing, a gesture motion input may include, but is not limited to, a gesture motion input, a head motion input, a face motion input, and the like, and a motion input applied to the electronic device may include, but is not limited to, a flick motion input, a flip motion input, a fold motion input, and the like, applied to the electronic device.
In this step, when the user needs to send the first message displayed in the first mode, the user performs a second input operation on the first message, so that the electronic device receives the second input, that is, the electronic device receives a trigger instruction for sending the first message to the target receiving end, so as to subsequently trigger a processing operation for sending the first message.
And 104, responding to the second input, sending the first message to the target receiving end, and displaying the first message according to the second mode.
In this step, the electronic device performs a sending process of sending the first message to the target receiving end in response to the second input of the first message received instep 103, where the electronic device may send the first message to the target receiving end via the server, or the electronic device directly sends the first message to the target receiving end; and the electronic equipment displays the first message in the second mode to indicate that the first message is sent, namely, the first message is sent to the target receiving end in the sent state in the second mode.
In the embodiment of the invention, the electronic equipment receives and responds to the first input of the edited first message, displays the first message according to the first mode, receives and responds to the second input of the first message, sends the first message to the target receiving end, and displays the first message according to the second mode, thereby realizing draft caching of the instant messaging message, simplifying the caching operation of the instant messaging message by a user, avoiding influencing the input of other instant messaging messages and improving the instant messaging quality.
Optionally, in some embodiments of the present invention, after the electronic device receives the first input of the first message, the first message may be sent to the server, and the first message may be cached by the server. For example, before displaying the first message in the first mode instep 102, the following steps may be further included: adding a preset state identifier in the first message, wherein the state identifier is used for indicating a server to delay sending of the first message to a target receiving end; and sending the first message carrying the state identifier to a server. Here, in response to the first input to the first message received instep 101, the electronic device performs preset status identifier adding processing in the first message and sends the first message to the server, so as to instruct the server to save the first message and stop pushing the first message to the preset contact through the preset status identifier, which facilitates the server to perform distinguishing processing on the first message and other instant messaging messages performing sending based on the preset status identifier. Therefore, the first message is stored in the server instead of being pushed to the preset contact person, the delayed sending of the first message is realized, the user can realize draft caching of one or more instant messaging messages, and meanwhile, the input of other instant messaging messages can be prevented from being influenced.
Accordingly, since the first message is already sent to the server and buffered in the server, in the case that the electronic device receives the second input and needs to send the first message to the target receiving end, the cached first message may be sent to the target receiving end through the server, that is, instep 104, the sending of the first message to the target receiving end may include the following steps: and sending a first request message to the server, wherein the first request message is used for indicating the server to send the first message to the target receiving end.
Optionally, in some embodiments of the present invention, a feature code for instructing the server to delay sending the first message may be pre-agreed, and then the server is implemented to delay sending the first message by using a feature code flag. That is to say, in the embodiment of the present invention, the preset state identifier may include a preset feature code; adding a preset state identifier in the first message may include: and adding the preset feature code into the information code of the first message. Therefore, the server can accurately determine the delay processing mode of the first message after receiving the first message. Here, the electronic device may attach a preset feature code at a preset position of the information code of the first message; wherein, to avoid that the preset feature code destroys the information code of the first message, the preset position may include at least one of the following: is positioned at the head part of the information code and is positioned at the tail part of the information code. In an example, taking the information coding of the first message as a binary coding form, the preset feature code is in a binary coding form, which may include two parts, after receiving the first input, the electronic device may append a first part of the preset feature code to a head part of the information coding of the first message, and append a second part of the preset feature code to a tail part of the information coding of the first message, for example, setting the first part of the preset feature code to be "0011" and the second part to be "1100", and after receiving the first input, the electronic device appends the first part and the second part of the preset feature code to the information coding, respectively, to obtain the information coding to which the preset feature code is appended as "0011 xxxxxxxx 1100", where "x" represents the information coding in the binary coding form of the message to be sent, for example, the information coding of the first message is "010101", the information to which the preset feature code is added is encoded as '00110101011100'.
In addition, after the electronic device receives the first input of the first message, the first message is cached locally in the electronic device, and the electronic device may implement sending of the first message in a manner of sending the first message to the target receiving end via the server, then step 104, sending the first message to the target receiving end, may include the following steps: and sending the first message to the server, and sending a second request message to the server to indicate that the first message is sent to the target receiving end through the server.
In the embodiment of the present invention, the first message subjected to the delayed sending processing and the first message subjected to the sending processing may be displayed in different mark manners. For example, thestep 102 of displaying the first message according to the first mode may include the following steps: displaying a first message in a chat information area of an instant messaging display interface by using a preset first mark, wherein the first mark is used for indicating that the first message is in a delayed sending state; instep 104, displaying the first message according to the second mode may include the following steps: and displaying the first message in a chat information area of the instant messaging display interface by using a preset second mark, wherein the second mark is used for indicating that the first message is in a sent state. Here, the first mark is different from the second mark for the convenience of the user to distinguish, and the first mark and the second mark may include at least one of a text mark, a graphic mark, and a background mark. The text label may include at least one of an additional text label displayed at a preset position of the display area corresponding to the first message and a display font label corresponding to the first message. The graphic mark may include at least one of an additional graphic mark (e.g., a preset graphic overlaid on an upper layer of the first message) displayed at a preset position of the display area corresponding to the first message and a frame graphic mark of a frame of the message corresponding to the first message. The background mark may include at least one of a background color mark and a background pattern mark.
For example, the first mark and the second mark may include text marks, for example, a text mark "delayed sending" may be used as the first mark, and a text mark "sent" may be used as the second mark, and the text marks corresponding to the first mark and the second mark may be displayed at a preset position of a display area corresponding to the first message in the chat information area, for example, at a side position of a message outer frame corresponding to the first message. Illustratively, the first mark and the second mark may include a background mark, for example, a preset background pattern may be adopted as the first mark, as exemplified by "message 5" in fig. 2 and 3, a partial dot-like background pattern may be adopted as the first mark; as illustrated in fig. 2 and 3 as "message 2" and "message 4", a blank background pattern may be employed as the second mark. Illustratively, the first mark and the second mark may include graphic marks, for example, as illustrated in fig. 2 and 3 as "message 5", a square outline graphic may be employed as the first mark; as illustrated in fig. 2 and 3 as "message 2" and "message 4", oval outline graphics may be employed as the second mark. In fig. 2 and 3, "message 5" indicates a message of the delayed transmission state, and "messages 2" and "message 4" indicate messages of the transmitted state.
In the embodiment of the invention, in order to better improve the human-computer interaction experience, an additional graphic mark displayed at a preset position of a display area corresponding to the first message can be used as the first mark; preferably, an additional graphic mark in the form of a progress bar may be used as the first mark, that is, the first message is displayed with a preset first mark, and the following steps may be included: and displaying a progress bar corresponding to the first message in a first area corresponding to the first message. Here, the progress bar has a slider thereon that is movable on the progress bar; the first area may be a display area corresponding to the first message, for example, as shown in fig. 4, theprogress bar 40 may be displayed in an upper layer of the display area corresponding to the first message (i.e., "message 5"); alternatively, the first area may be a side area of the display area corresponding to the first message, as shown in fig. 5, theprogress bar 40 may be displayed in a bottom area of the display area corresponding to the first message (i.e., "message 5"); preferably, the progress bar can be displayed with preset transparency according to actual setting requirements. As shown in fig. 4 and 5, theprogress bar 40 includes afirst end 42, asecond end 43, and aslider 41 movable between thefirst end 42 and thesecond end 43.
Optionally, in some embodiments of the present invention, to improve human-computer interaction experience and operation convenience, the second input may be a touch input acting on the electronic device, and specifically, the sending operation of the first message may be implemented based on the touch input of the progress bar, for example,step 103, receiving the second input of the first message displayed according to the first mode by the user, which may include the following steps: receiving a second input of the user to the sliding block on the progress bar, wherein the second input is used for controlling the sliding block to move; here, the second input to the first message may be a second input to move the slider on the progress bar. On this basis, the user performs triggering on the triggering instruction for sending the first message to the target receiving end by sliding to the target position on the progress bar, that is,step 104, in response to the second input, sends the first message to the target receiving end through the server, and displays the first message according to the second mode, which may include the following steps: and under the condition that the slider moves to the target position on the progress bar, sending the first message to a target receiving end, and displaying the first message according to a second mode. Therefore, the method and the device are beneficial to intuitively and conveniently realizing the sending operation of the first message displayed according to the first mode by the user, and can avoid false triggering.
Optionally, in some embodiments of the present invention, in a case where the user determines to delete the first message displayed in the first mode according to the user's own needs, the user may trigger a deletion instruction by executing a third input, so that the electronic device receives the third input for the first message, and in response to the third input, deletes the first message displayed in the chat information area. Here, the third input may be at least one of a voice input, a gesture motion input, a touch input applied to the electronic device, and a motion input applied to the electronic device, which are set in advance. In addition, for the use example that the electronic device sends the first message to the server after receiving the first input of the first message and the first message is cached by the server, in order to implement the deletion processing of the first message, a third request message is sent to the server in response to a third input, and the third request message is used for instructing the server to delete the cached first message, so that the electronic device can notify the server to delete the cached first message based on the third request message.
In some optional embodiments of the present invention, to improve human-computer interaction experience and operation convenience, a deletion operation of the first message may be implemented based on a touch input of the progress bar, for example, instep 102, after the first message is displayed according to the first mode, the message processing method may further include the following steps: receiving a third input of the progress bar by the user; in response to a third input, the first message displayed in the chat information area is deleted. Here, the third input to the first message may be a third input to the progress bar, and the third input may be at least one of a movement input acting on the slider and a press input, a click input, a double-click input, a drag input, etc. acting on the progress bar or the slider.
For example, in the embodiment of the present invention, as shown in fig. 4 and 5, in the first mode, theslider 41 may be located at a middle position of theprogress bar 40 to indicate that the first message is in a delayed transmission state; in this example, the target position may be thefirst end 42 of the progress bar, and the second input of the user to the slider on the progress bar is received, that is, the second input of the slider moving from the middle position to thefirst end 42 on the progress bar is received; a third input to the progress bar by the user is received, i.e. a third input to the slider moving from the intermediate position to thesecond end 43 on the progress bar is received. Preferably, in order to improve the interaction effect, during the second input, the area of the progress bar over which the slider moves is displayed with a preset mark, wherein, as shown in fig. 4 and 5, when theslider 41 is located at the middle position of theprogress bar 40, the area between thesecond end 43 and the middle position (i.e., the slider 41) on the progress bar is displayed with the preset mark, and the preset mark is indicated by hatching with oblique lines in fig. 4 and 5.
In addition, in the embodiment of the present invention, the operation of sending the first message displayed according to the first mode to the target receiving end may further include other various operation modes. For example,step 103, receiving a second input of the first message displayed according to the first mode by the user, may include the steps of: receiving touch input of a first preset gesture to a first message displayed according to a first mode, and receiving touch input of a second preset gesture to a sending control after a sending control is displayed in response to the touch input of the first preset gesture; here, the second input may include a touch input of a first preset gesture to the first message and a touch input of a second preset gesture to the sending control, the touch input of the first preset gesture may include at least one of a click input, a double-click input, a drag input, a press input, and the like, and the touch input of the second preset gesture may include at least one of a click input, a double-click input, a drag input, a press input, and the like. For another example, in the instant messaging display interface, a delayed sending key may be displayed on the information input area, and then step 103, receiving a second input of the first message displayed according to the first mode by the user, may include the following steps: and receiving a touch input of a third preset gesture to the delayed sending key, wherein the touch input of the third preset gesture can comprise at least one of double-click input, drag input, press input and the like.
Optionally, in some embodiments of the present invention, for the electronic device, the use example of sending the first message to the target receiving end is implemented by sending the first message to the target receiving end via the server, and for the use example of sending the first message to the server after the electronic device receives the first input to the first message, and the electronic device may perform, through the use example of caching the first message by the server, the display processing indicating that the first message is in the sent state again based on the sending feedback of the server to the first message. That is,step 104, in response to the second input, of sending the first message to the target receiving end and displaying the first message in the second mode, may include the steps of: after the first message is sent to the first message through the server, receiving a feedback message sent by the server; under the condition that the feedback information indicates that the first message is sent to the target receiving end, the first message is displayed behind the second message according to a second mode on a chat information area of the instant messaging display interface; wherein the second message is the last message sent before the first input is sent to the target receiving end. In the embodiment of the present invention, after the first message is sent to the target receiving end through the server, the feedback message returned by the server according to the sending condition of the first message is received, and the electronic device may switch the display of the first message from the first mode to the display according to the second mode according to the feedback message sent by the server to indicate that the first message is in a sent state, and display the first message after the second message according to the sending time, so that the user can know the sending condition of the first message.
In the embodiment of the present invention, as shown in fig. 2 and fig. 3, an instant messaging display interface for a user to communicate with a preset contact may include achat information area 22 for displaying an instant message to be sent and received in communication with the preset contact, and aninformation input area 23 for the user to input a message to be sent. In addition, in order to improve the smoothness of the instant messaging of the user, the instant messaging display interface can further comprise: acontact information area 21 for displaying contact information and akeyboard area 24 for text entry by the user. In addition, theinformation input area 23 may display asend key 231 for enabling sending of the instant messenger message that has been input.
Optionally, in some embodiments of the present invention, the electronic device may implement the first input of the first message by receiving a touch input of a preset gesture operated by a user. For example, the touch input of the preset gesture may be a dragging input of the first message, and thestep 101 of receiving the first input of the first message by the user may include the following steps: receiving dragging input of a first message input in an information input area of an instant messaging display interface by a user, wherein the dragging input is used for dragging the first message from the information input area to a preset second area. In the embodiment of the present invention, as shown in fig. 2, after a user finishes editing a first message in an information input area, the user may drag the first message input in the information input area to a preset second area, where the drag input may be the first input, and the second area may be an area on a screen other than the information input area, for example, the second area illustrated in fig. 2 may be a chat information area, so that an electronic device receives and responds to the drag input, and determines that a trigger instruction for delaying sending the first message to a preset contact (i.e., a target receiving end) is received; therefore, the operation convenience of the user can be improved, the human-computer interaction experience can be improved, and the operation interestingness of the user is improved.
Optionally, in some embodiments of the present invention, to simplify an operation of triggering a trigger instruction for sending the first message in a delayed manner by a user, in an instant messaging display interface, a delayed sending key may be displayed on an information input area, and the user may trigger the delayed sending instruction by operating the delayed sending key, that is,step 101, receiving a first input of the first message by the user may include: receiving touch input of a delayed sending key displayed on an information input area on an instant messaging display interface; therefore, the user can use the touch input of the delayed sending key as the first input through the touch input of the delayed sending key, so that the delayed sending of the first message is triggered simply, conveniently and quickly, and the operation convenience of the user is improved. Here, the touch input may include, but is not limited to, a click input, a double-click input, a press input, and the like. In an example, as shown in fig. 2, in the instant messaging display interface, asend button 231 and a delayedsend button 232 may be displayed on theinformation input area 23, and the delayedsend button 232 may be hidden or displayed; if the user performs the click input operation on the delayed sending key 232, the electronic device receives and responds to the click input, so as to realize the delayed sending processing of the first message; if the user performs a click input operation on thesending button 231, the electronic device may send the first message to the target receiving end.
In addition, in some embodiments of the present invention, the message processing method may further include the following steps: receiving a fourth input from the user; and responding to the fourth input, and displaying at least one message to be sent which is displayed according to the first mode within a preset time period. Therefore, the user can conveniently and quickly find the first message to be sent in the preset time period. For example, receiving a fourth input from the user may include at least one of: receiving touch input of a first preset gesture to a first message displayed according to a first mode on a chat information area of an instant messaging display interface, wherein the touch input of the first preset gesture can include but is not limited to drag input, long-press input and the like; and receiving touch input of a second preset gesture of the delayed sending key displayed on the information input area on the instant messaging display interface, wherein the touch input of the second preset gesture can include but is not limited to long-press input, double-click input and the like.
According to the message processing method applied to the electronic equipment, the electronic equipment receives and responds to the first input of the edited first message, the first message is displayed according to the first mode, the electronic equipment receives and responds to the second input of the first message, the first message is sent to the target receiving end, and the first message is displayed according to the second mode, so that draft caching of the instant messaging message is achieved, caching operation of a user on the instant messaging message is simplified, meanwhile, input of other instant messaging messages can be avoided being influenced, and instant messaging quality is improved.
Referring to fig. 6, it is a schematic flowchart illustrating a message processing method applied to a server according to an embodiment of the present invention, where the message processing method applied to the server according to the embodiment of the present invention includes the following steps:
step 601, receiving a first message sent by an electronic device.
In the embodiment of the invention, a user communicates with the preset contact through the instant messaging display interface of the target application program, and the server realizes the receiving and sending of instant messaging messages between the electronic equipment and the preset contact of the target receiving end; the first message is an instant messaging message which is received by the electronic equipment and is edited by a user and is to be sent to a target receiving terminal, and the first message may be at least one of a text message, a voice message and a file message, wherein the text message may include but is not limited to text content and emoticon content, and the file message may include but is not limited to images, videos and documents.
Step 602, buffering the first message and setting the first message to a delayed sending state.
In this step, after receiving the first message, the server stores the first message, and sets the first message to a delayed sending state, that is, stops pushing the first message to a preset contact of the target receiving end. Thus, the delayed sending of the first message can be realized, the user can realize draft caching of one or more instant messaging messages, and meanwhile, the input of other instant messaging messages can be prevented from being influenced.
In the embodiment of the invention, the server receives the first message sent by the electronic equipment, caches the first message, and sets the first message to be in the delayed sending state, thereby realizing draft caching of the instant messaging message, simplifying the caching operation of the instant messaging message by a user, and simultaneously avoiding influencing the input of other instant messaging messages.
Optionally, in some embodiments of the present invention,step 602, buffering the first message and setting the first message to the delayed sending state, may include the following steps: under the condition that the first message carries a preset state identifier, caching the first message, and setting the first message to be in a delayed sending state, wherein the state identifier is used for indicating a server to delay sending of the first message to a target receiving end. In the embodiment of the invention, the server receives the first message which is sent by the electronic equipment and is added with the preset state identifier, stores the first message based on the preset state identifier and stops pushing the first message to the preset contact of the target receiving end, namely, the delayed sending of the first message is realized, so that the server can distinguish and process the first message and other instant communication messages which are sent.
Optionally, in some embodiments of the present invention, a feature code for instructing the server to delay sending the first message may be pre-agreed, and then the server may implement whether to perform the delayed sending processing on the first message by detecting whether the feature code exists in the information code of the first message. That is to say, in the embodiment of the present invention, the preset state identifier may include a preset feature code; if the first message carries the preset status flag, caching the first message, and setting the first message to a delayed sending status, which may include: and under the condition that the information code of the first message comprises a preset feature code, caching the first message and setting the first message in a delayed sending state. Here, the server may detect the information code of the first message after receiving the first message, and if it is detected that the preset feature code exists in the information code of the first message, cache the first message and set the first message to a delayed sending state to stop pushing the first message to a preset contact of the target receiving end, so that the server may accurately determine a delayed processing mode for the first message after receiving the first message. Wherein the preset feature code may be a preset position appended to the information code of the first message, for example, to avoid the preset feature code from destroying the information code of the first message, the preset position may be located at the head of the information code and/or located at the tail of the information code; in an example, taking the information coding of the first message as a binary coding form, the preset feature code is in a binary coding form, which may include two parts, a first part of the preset feature code may be attached to a head of the information coding, and a second part of the preset feature code may be attached to a tail of the information coding, for example, if the first part of the preset feature code is "0011" and the second part is "1100", then the information coding of the first message carrying the preset feature code received by the server is "001xx1 xx 1100", where "x" represents the information coding of the message to be sent in a binary coding form, and if the information coding of the first message is "010101", then the information coding of the first message carrying the preset feature code received by the server is "00110101011100".
Optionally, in some embodiments of the present invention, since the first message is cached in the server before being sent to the target receiving end (i.e. when the first message is in the delayed sending state), in a case that the user needs to send the first message to the target receiving end, the electronic device is caused to send the first request message to the server by performing the second input on the first message on the electronic device, at this time, the server may send the first message to the target receiving end based on the first request message, that is, after thestep 602 caches the first message and sets the first message to the delayed sending state, the message processing method may further include: under the condition of receiving a first request message sent by electronic equipment, sending the first message to a target receiving end; the first request message is used for instructing the server to send the first message to the target receiving end. In the embodiment of the invention, the server sends the cached first message to the preset contact of the target receiving end based on the first request message, and sets the first message to be in a sent state under the condition that the first message is successfully sent to the target receiving end, thereby finishing the sending operation of the first message.
Optionally, in some embodiments of the present invention, after sending the first message to the target receiving end, the message processing method may further include: and sending a feedback message to the electronic equipment under the condition that the first message is successfully sent to the target receiving end, wherein the feedback message indicates that the first message is sent to the target receiving end. In the embodiment of the invention, after the server receives the first request message of the first message and sends the first message to the target receiving terminal based on the first request message, the sending condition of the first message can be detected, and feedback information is returned to the electronic equipment, wherein the feedback information comprises a message indicating that the first message is sent to the target receiving terminal and a message indicating that the first message is not successfully sent to the target receiving terminal, so that the electronic equipment can correspondingly display and process the first message based on the feedback information, and a user can know the sending condition of the first message.
Optionally, in some embodiments of the present invention, instep 602, after buffering the first message and setting the first message to the delayed sending state, the message processing method may further include: receiving a third request message sent by the electronic equipment; and deleting the cached first message according to the third request message. In the embodiment of the present invention, the third request message is used to instruct the server to delete the cached first message, and after receiving the third request message for the cached first message, the server deletes the first message stored in the server based on the third request message, thereby completing the deletion operation for the first message.
According to the message processing method applied to the server, the server receives the first message sent by the electronic equipment, caches the first message, and sets the first message to be in the delayed sending state, so that draft caching of the instant messaging message is achieved, caching operation of a user on the instant messaging message is simplified, and meanwhile input and viewing of other instant messaging messages can be prevented from being influenced.
Based on the method applied to the electronic device, an embodiment of the invention provides the electronic device for implementing the method. Referring to fig. 7, a schematic structural diagram of an electronic device according to an embodiment of the invention is shown. An embodiment of the present invention provides anelectronic device 700, which may include: afirst receiving module 710, afirst processing module 720, asecond receiving module 730, and asecond processing module 740. Therefore, the draft caching of the instant messaging message can be realized, the caching operation of the instant messaging message by a user is simplified, meanwhile, the input of other instant messaging messages can be prevented from being influenced, and the instant messaging quality is improved.
Thefirst receiving module 710 is configured to receive a first input of a user to a first message to be sent after the user finishes editing the first message;
afirst processing module 720 for displaying a first message in a first mode in response to a first input;
asecond receiving module 730, configured to receive a second input of the first message displayed according to the first mode from the user;
thesecond processing module 740 is configured to respond to the second input, send the first message to the target receiving end, and display the first message according to the second mode.
Optionally, in some embodiments of the present invention, thefirst processing module 720 may include: the adding unit and the first transmitting unit, thesecond processing module 740 may include: and a second transmitting unit. Therefore, the first message is stored in the server instead of being pushed to the preset contact person, the delayed sending of the first message is realized, the user can realize draft caching of one or more instant messaging messages, and meanwhile, the input of other instant messaging messages can be prevented from being influenced.
The adding unit is used for adding a preset state identifier in the first message, wherein the state identifier is used for indicating the server to delay the sending of the first message to the target receiving end;
the first sending unit is used for sending a first message carrying the state identifier to the server;
and the second sending unit is used for sending a first request message to the server, wherein the first request message is used for indicating the server to send the first message to the target receiving end.
Preferably, in some embodiments of the present invention, a feature code for instructing the server to delay sending the first message may be pre-agreed, and then the server is enabled to delay sending the first message by using a feature code flag. That is to say, in the embodiment of the present invention, the state identifier may include a preset feature code; the adding unit may include: and the addition of the sub-unit is convenient for enabling the server to accurately determine the delay processing mode of the first message after receiving the first message.
And the adding subunit is used for adding the preset feature code to the information code of the first message.
Optionally, in some embodiments of the present invention, the first message subjected to the delayed sending processing and the first message subjected to the sending processing may be displayed in different marking manners, so as to facilitate the user to distinguish and identify. For example, thefirst processing module 720 may include: the first display unit, thesecond processing module 740 may include: and a second display unit.
The first display unit is used for displaying a first message in a chat information area of the instant messaging display interface by using a preset first mark, and the first mark is used for indicating that the first message is in a delayed sending state;
and the second display unit is used for displaying the first message in a chat information area of the instant messaging display interface by using a preset second mark, and the second mark is used for indicating that the first message is in a sent state.
In the embodiment of the invention, in order to better improve the human-computer interaction experience, an additional graphic mark displayed at a preset position of a display area corresponding to the first message can be used as the first mark; preferably, an additional graphic mark in the form of a progress bar is used as the first mark, that is, in some embodiments of the present invention, the first display unit may include: and the display subunit is used for facilitating the visual viewing of the first message in the delayed sending state by the user.
And the display subunit is used for displaying the progress bar corresponding to the first message in the first area corresponding to the first message.
Optionally, in some embodiments of the present invention, thesecond receiving module 730 may include: the first receiving unit, thesecond processing module 740 may include: the first processing unit is beneficial to visually and conveniently realizing the sending operation of the first message displayed according to the first mode by the user and can avoid false triggering.
The first receiving unit is used for receiving a second input of the user to the sliding block on the progress bar, and the second input is used for controlling the sliding block to move;
and the first processing unit is used for sending the first message to the target receiving end under the condition that the slider moves to the target position on the progress bar, and displaying the first message according to the second mode.
Optionally, in some embodiments of the present invention, to improve human-computer interaction experience and operation convenience, theelectronic device 700 may further include: a third receiving module and a third processing module.
The third receiving module is used for receiving a third input of the progress bar by the user;
and the third processing module is used for responding to the third input and deleting the first message displayed in the chat information area.
Optionally, in some embodiments of the present invention, in order to facilitate the user to know the sending condition of the first message, thesecond processing module 740 may include: the second receiving unit and the second processing unit are used for facilitating the user to know the sending condition of the first message.
The second receiving unit is used for receiving the feedback message sent by the server under the condition that the first message is sent to the target receiving end through the server;
the second processing unit is used for displaying the first message behind the second message according to the second mode on the chat information area of the instant messaging display interface under the condition that the feedback message indicates that the first message is sent to the target receiving end;
wherein the second message is the last message sent before the first input is sent to the target receiving end.
Optionally, in some embodiments of the present invention, in order to facilitate the user to view the first message that has not been sent within the preset time period, theelectronic device 700 may further include: a fourth receiving module and a display module.
The fourth receiving module is used for receiving a fourth input of the user;
and the display module is used for responding to the fourth input and displaying at least one message to be sent which is displayed according to the first mode within a preset time period.
Optionally, in some embodiments of the present invention, to improve the convenience of the user operation, thefirst receiving module 710 may include: and a third receiving unit.
And the third receiving unit is used for receiving dragging input of a first message input in an information input area of the instant messaging display interface by a user, and the dragging input is used for dragging the first message from the information input area to a preset second area.
The electronic device provided in the embodiment of the present invention can implement each process implemented by the electronic device in the method embodiments applied to the electronic device in fig. 1 to fig. 5, and for avoiding repetition, details are not described here again.
According to the electronic equipment provided by the embodiment of the invention, the electronic equipment receives and responds to the first input of the edited first message, displays the first message according to the first mode, receives and responds to the second input of the first message, sends the first message to the target receiving end and displays the first message according to the second mode, so that draft caching of the instant messaging message is realized, the caching operation of a user on the instant messaging message is simplified, meanwhile, the input of other instant messaging messages can be avoided being influenced, and the instant messaging quality is improved.
Based on the method applied to the server, the embodiment of the invention provides the server for implementing the method. Referring to fig. 8, which is a schematic structural diagram of a server according to an embodiment of the present invention, an embodiment of the present invention provides aservice 800, which may include: afifth receiving module 810 and afourth processing module 820. Therefore, the draft caching of the instant messaging message can be realized, the caching operation of the instant messaging message by a user is simplified, and meanwhile, the input of other instant messaging messages can be prevented from being influenced.
Afifth receiving module 810, configured to receive a first message sent by an electronic device;
afourth processing module 820, configured to buffer the first message and set the first message to a delayed sending state.
Optionally, in some embodiments of the present invention, thefourth processing module 820 may include: and the third processing unit is used for facilitating the server to distinguish and process the first message and other instant communication messages which are sent.
And the third processing unit is used for caching the first message and setting the first message as a delayed sending state under the condition that the first message carries a preset state identifier, and the state identifier is used for indicating the server to delay sending of the first message to the target receiving end.
Preferably, in some embodiments of the present invention, a feature code for instructing the server to delay sending the first message may be pre-agreed, and then the server may detect whether the feature code exists in the information code of the first message to implement whether to perform the delayed sending processing on the first message. That is to say, in the embodiment of the present invention, the state identifier may include a preset feature code; the third processing unit may include: the processing subunit is beneficial to the fact that the server can accurately determine the delay processing mode of the first message after receiving the first message.
And the processing subunit is used for caching the first message and setting the first message in a delayed sending state under the condition that the information code of the first message comprises a preset feature code.
Optionally, in some embodiments of the present invention, theserver 800 may further include: and a sending module.
The sending module is used for sending a first message to a target receiving end under the condition of receiving the first request message sent by the electronic equipment;
the first request message is used for instructing the server to send the first message to the target receiving end.
Optionally, in some embodiments of the present invention, in order to facilitate the user to know the sending situation of the first message, theserver 800 may further include: and a feedback module.
And the feedback module is used for sending a feedback message to the electronic equipment under the condition that the first message is sent to the target receiving end, wherein the feedback message comprises a message indicating that the first message is sent to the target receiving end and a message indicating that the first message is not successfully sent to the target receiving end.
The server provided in the embodiment of the present invention can implement each process implemented by the server in the method embodiment applied to the server in fig. 6, and is not described herein again to avoid repetition.
According to the server provided by the embodiment of the invention, the server receives the first message sent by the electronic equipment, caches the first message, and sets the first message to be in the delayed sending state, so that draft caching of the instant messaging message is realized, caching operation of a user on the instant messaging message is simplified, input of other instant messaging messages can be avoided, and instant messaging quality and user experience are improved.
Optionally, an embodiment of the present invention further provides a server, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the computer program, when executed by the processor, implements each process of the above-mentioned message processing method embodiment applied to the server, and can achieve the same technical effect, and details are not repeated here 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 the computer program is executed by a processor, the computer program implements each process of the above-mentioned message processing method applied to a server, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
Theelectronic device 900 includes, but is not limited to: aradio frequency unit 901, anetwork module 902, anaudio output unit 903, aninput unit 904, asensor 905, adisplay unit 906, auser input unit 907, aninterface unit 908, amemory 909, aprocessor 910, and apower supply 911. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 9 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, a pedometer, and the like.
Theuser input unit 907 is configured to receive a first input of a user to a first message to be sent after the user finishes editing the first message; aprocessor 910 configured to control thedisplay unit 906 to display a first message in a first mode in response to a first input; auser input unit 907 for receiving a second input of the user to the first message displayed in the first mode; theprocessor 910 is configured to, in response to the second input, control theradio frequency unit 901 to send the first message to the target receiving end, and control thedisplay unit 906 to display the first message according to the second mode. In the embodiment of the invention, draft caching of the instant messaging message can be realized, caching operation of the instant messaging message by a user is simplified, input of other instant messaging messages can be avoided, and instant messaging quality is improved.
It should be understood that, in the embodiment of the present invention, theradio frequency unit 901 may be used for receiving and sending signals during a message transmission and reception process or a call process, and specifically, after receiving downlink data from a base station, the downlink data is processed by theprocessor 910; in addition, the uplink data is transmitted to the base station. Generally, theradio frequency unit 901 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, theradio frequency unit 901 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via thenetwork module 902, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
Theaudio output unit 903 may convert audio data received by theradio frequency unit 901 or thenetwork module 902 or stored in thememory 909 into an audio signal and output as sound. Also, theaudio output unit 903 may provide audio output related to a specific function performed by the electronic device 900 (e.g., a call signal reception sound, a message reception sound, etc.). Theaudio output unit 903 includes a speaker, a buzzer, a receiver, and the like.
Theinput unit 904 is used to receive audio or video signals. Theinput Unit 904 may include a Graphics Processing Unit (GPU) 9041 and amicrophone 9042, and theGraphics processor 9041 processes image data of a still picture or video obtained by an image capturing device (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on thedisplay unit 906. The image frames processed by thegraphic processor 9041 may be stored in the memory 909 (or other storage medium) or transmitted via theradio frequency unit 901 or thenetwork module 902. Themicrophone 9042 can receive sounds and can process such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via theradio frequency unit 901 in case of the phone call mode.
Theelectronic device 900 also includes at least onesensor 905, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of thedisplay panel 9061 according to the brightness of ambient light, and the proximity sensor may turn off thedisplay panel 9061 and/or the backlight when theelectronic device 900 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); thesensors 905 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described in detail herein.
Thedisplay unit 906 is used to display information input by the user or information provided to the user. TheDisplay unit 906 may include aDisplay panel 9061, and theDisplay panel 9061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Theuser input unit 907 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, theuser input unit 907 includes atouch panel 9071 andother input devices 9072. Thetouch panel 9071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 9071 (e.g., operations by a user on or near thetouch panel 9071 using a finger, a stylus, or any other suitable object or accessory). Thetouch panel 9071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to theprocessor 910, receives a command from theprocessor 910, and executes the command. In addition, thetouch panel 9071 may be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. Theuser input unit 907 may includeother input devices 9072 in addition to thetouch panel 9071. Specifically, theother input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control key, a switch key, and the like), a track ball, a mouse, and a joystick, which are not described herein again.
Further, thetouch panel 9071 may be overlaid on thedisplay panel 9061, and when thetouch panel 9071 detects a touch operation on or near thetouch panel 9071, the touch panel is transmitted to theprocessor 910 to determine the type of the touch event, and then theprocessor 910 provides a corresponding visual output on thedisplay panel 9061 according to the type of the touch event. Although in fig. 9, thetouch panel 9071 and thedisplay panel 9061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, thetouch panel 9071 and thedisplay panel 9061 may be integrated to implement the input and output functions of the electronic device, which is not limited herein.
Theinterface unit 908 is an interface for connecting an external device to theelectronic apparatus 900. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. Theinterface unit 908 may be used to receive input from external devices (e.g., data information, power, etc.) and transmit the received input to one or more elements within theelectronic device 900 or may be used to transmit data between theelectronic device 900 and external devices.
Thememory 909 may be used to store software programs as well as various data. Thememory 909 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, thememory 909 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
Theprocessor 910 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in thememory 909 and calling data stored in thememory 909, thereby performing overall monitoring of the electronic device.Processor 910 may include one or more processing units; preferably, theprocessor 910 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated intoprocessor 910.
Theelectronic device 900 may further include a power supply 911 (e.g., a battery) for supplying power to various components, and preferably, thepower supply 911 may be logically connected to theprocessor 910 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.
In addition, theelectronic device 900 includes some functional modules that are not shown, and thus are not described in detail herein.
Optionally, an embodiment of the present invention further provides an electronic device, which includes aprocessor 910, amemory 909, and a computer program that is stored in thememory 909 and can be run on theprocessor 910, and when the computer program is executed by theprocessor 910, the computer program implements each process of the above-mentioned message processing method embodiment applied to the electronic device, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
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 the computer program is executed by a processor, the computer program implements the processes of the above-mentioned message processing method applied to the electronic device, and can achieve the same technical effects, and in order to avoid repetition, the 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.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.