消息处理方法、电子设备及服务器Message processing method, electronic equipment and server
相关申请的交叉引用Cross-references to related applications
本申请主张在2019年11月19日在中国提交的中国专利申请No.201911134083.2的优先权,其全部内容通过引用包含于此。This application claims the priority of Chinese Patent Application No. 201911134083.2 filed in China on November 19, 2019, the entire content of which is incorporated herein by reference.
技术领域Technical field
本发明实施例涉及通信技术领域,尤其涉及一种消息处理方法、电子设备及服务器。The embodiments of the present invention relate to the field of communication technologies, and in particular, to a message processing method, electronic equipment, and server.
背景技术Background technique
随着电子设备的普及和发展,即时通讯功能的大量使用,即时通讯功能已成为人们日常生活中不可或缺的一部分。用户在进行即时通讯过程中,某些使用场景下用户需要保存多条消息草稿,并选择其中部分发送或等待后续合适时间发送。With the popularization and development of electronic devices and the extensive use of instant messaging functions, instant messaging functions have become an indispensable part of people's daily lives. In the process of instant messaging, the user needs to save multiple drafts of messages in some usage scenarios, and select some of them to send or wait for a later appropriate time to send.
例如,在用户A与用户B聊天过程中,用户A已经输入了部分消息内容,但用户B突然插入新的话题,此时,用户只能放弃或另外存储当前已输入的部分消息内容,然后在回复新话题之后再重新输入之前的消息内容。再例如,用户A已知用户B已经休息(或在会议中),但有一个重要但不紧急的消息需要通知用户B,同时不想影响到用户B的休息(或会议),此时仅能够在信息输入区域(如输入框)缓存一条消息草稿,如果消息较多则需要另外存储(如存储在电子设备的本地记事本),后续再复制粘贴至信息输入区域以发送至用户B。For example, in the process of chatting between user A and user B, user A has entered part of the message content, but user B suddenly inserts a new topic. At this time, the user can only abandon or otherwise store the currently entered part of the message content, and then Re-enter the previous message content after replying to the new topic. For another example, user A knows that user B has taken a break (or in a meeting), but there is an important but not urgent message that needs to be notified to user B. At the same time, he does not want to affect user B’s break (or meeting). The information input area (such as an input box) caches a draft of a message. If there are many messages, they need to be stored separately (such as stored in a local notepad of the electronic device), and then copied and pasted to the information input area to send to user B.
综上可知,现有技术中,存在发送即时通讯过程中对即时通讯消息草稿的处理操作不便利的问题。To sum up, in the prior art, there is a problem that it is inconvenient to process the draft of the instant messaging message in the process of sending the instant messaging.
发明内容Summary of the invention
本发明实施例提供一种消息处理方法和电子设备,以解决现有技术发送消息过程中对即时通讯消息草稿的处理操作不便利的问题。The embodiments of the present invention provide a message processing method and electronic equipment to solve the problem of inconvenient processing operations on drafts of instant messaging messages in the process of sending messages in the prior art.
为了解决上述技术问题,本发明是这样实现的:In order to solve the above technical problems, the present invention is implemented as follows:
第一方面,本发明实施例提供一种消息处理方法,应用于电子设备,包括:In the first aspect, an embodiment of the present invention provides a message processing method applied to an electronic device, including:
在用户对待发送的第一消息编辑完毕后,接收用户对第一消息的第一输入;After the user finishes editing the first message to be sent, receiving the user's first input of the first message;
响应于第一输入,按照第一模式显示第一消息;In response to the first input, display the first message according to the first mode;
接收用户对按照第一模式显示的第一消息的第二输入;Receiving a user's second input to the first message displayed according to the first mode;
响应于第二输入,将第一消息发送至目标接收端,并按照第二模式显示第一消息。In response to the second input, the first message is sent to the target receiving end, and the first message is displayed in the second mode.
第二方面,本发明实施例提供一种消息处理方法,应用于服务器,包括:In the second aspect, an embodiment of the present invention provides a message processing method, which is applied to a server, and includes:
接收电子设备发送的第一消息;Receiving the first message sent by the electronic device;
缓存第一消息,并将第一消息设置为延迟发送状态。Buffer the first message, and set the first message to a delayed sending state.
第三方面,本发明实施例提供一种电子设备,包括:In a third aspect, an embodiment of the present invention provides an electronic device, including:
第一接收模块,用于在用户对待发送的第一消息编辑完毕后,接收用户对第一消息的第一输入;The first receiving module is configured to receive the user's first input of the first message after the user finishes editing the first message to be sent;
第一处理模块,用于响应于第一输入,按照第一模式显示第一消息;The first processing module is configured to display the first message according to the first mode in response to the first input;
第二接收模块,用于接收用户对按照第一模式显示的第一消息的第二输入;The second receiving module is configured to receive a user's second input to the first message displayed according to the first mode;
第二处理模块,用于响应于第二输入,将第一消息发送至目标接收端,并按照第二模式显示第一消息。The second processing module is configured to send the first message to the target receiving end in response to the second input, and display the first message according to the second mode.
第四方面,本发明实施例提供一种服务器,包括:In a fourth aspect, an embodiment of the present invention provides a server, including:
第五接收模块,用于接收电子设备发送的第一消息;The fifth receiving module is configured to receive the first message sent by the electronic device;
第四处理模块,用于缓存第一消息,并将第一消息设置为延迟发送状态。The fourth processing module is used to buffer the first message and set the first message to a delayed sending state.
第五方面,本发明实施例提供一种电子设备,包括处理器,存储器,存储在存储器上并可在处理器上运行的计算机程序,该计算机程序被处理器执行时实现上述第一方面实施例应用于电子设备的消息处理方法的步骤。In a fifth aspect, an embodiment of the present invention provides an electronic device that includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. The computer program implements the above-mentioned embodiment of the first aspect when the computer program is executed by the processor. The steps of a message processing method applied to an electronic device.
第六方面,本发明实施例提供一种服务器,包括处理器,存储器,存储在存储器上并可在处理器上运行的计算机程序,该计算机程序被处理器执行时实现上述第二方面实施例应用于服务器的消息处理方法的步骤。In a sixth aspect, an embodiment of the present invention provides a server, including a processor, a memory, and a computer program stored in the memory and running on the processor. The computer program is executed by the processor to implement the application of the embodiment in the second aspect. The steps of the message processing method for the server.
第七方面,本发明实施例提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述第一方面实施例应用于电子设备的消息处理方法的步骤。In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium with a computer program stored on the computer-readable storage medium. When the computer program is executed by a processor, the above-mentioned embodiment of the first aspect is applied to the message processing of an electronic device. Method steps.
第八方面,本发明实施例提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述第二方面实施例应用于服务器的消息处理方法的步骤。In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium with a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the message processing method applied to the server in the embodiment of the second aspect above A step of.
本发明实施例中,通过电子设备接收并响应于对编辑完毕的第一消息的第一输入,按照第一模式显示第一消息,通过电子设备接收并响应于对第一消息的第二输入,将第一消息发送至目标接收端,并按照第二模式显示第一消息,从而实现对即时通讯消息的草稿缓存,简化了用户对即时通讯消息的缓存操作,同时可以避免影响其他即时通讯消息的输入。In the embodiment of the present invention, the electronic device receives and responds to the first input of the edited first message, displays the first message in the first mode, and receives and responds to the second input of the first message by the electronic device, Send the first message to the target receiving end, and display the first message in the second mode, so as to realize the draft cache of instant messaging messages, simplify the user's cache operation of instant messaging messages, and avoid affecting other instant messaging messages. enter.
附图说明Description of the drawings
图1表示本发明实施例提供的应用于电子设备的消息处理方法的流程示意图;FIG. 1 shows a schematic flowchart of a message processing method applied to an electronic device according to an embodiment of the present invention;
图2表示本发明实施例提供的即时通讯显示界面的显示样式的示例性示意图之一;FIG. 2 shows one of the exemplary schematic diagrams of the display style of the instant messaging display interface provided by the embodiment of the present invention;
图3表示本发明实施例提供的即时通讯显示界面的显示样式的示例性示意图之二;3 shows the second exemplary schematic diagram of the display style of the instant messaging display interface provided by the embodiment of the present invention;
图4表示本发明实施例提供的待发送消息的显示样式的示例性示意图之一;FIG. 4 shows one of the exemplary schematic diagrams of the display style of the message to be sent provided by the embodiment of the present invention;
图5表示本发明实施例提供的待发送消息的显示样式的示例性示意图之二;FIG. 5 shows the second exemplary schematic diagram of the display style of the message to be sent provided by the embodiment of the present invention;
图6表示本发明实施例提供的应用于服务器的消息处理方法的流程示意图;FIG. 6 shows a schematic flowchart of a message processing method applied to a server according to an embodiment of the present invention;
图7表示本发明实施例提供的电子设备的结构示意图;FIG. 7 shows a schematic structural diagram of an electronic device provided by an embodiment of the present invention;
图8表示本发明实施例提供的服务器的结构示意图;FIG. 8 shows a schematic structural diagram of a server provided by an embodiment of the present invention;
图9表示本发明实施例提供的电子设备的硬件结构示意图。FIG. 9 shows a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
请参见图1,其示出的是本发明实施例提供的应用于电子设备的消息处理方法的流程示意图,本发明实施例提供一种消息处理方法,应用于电子设备,该电子设备可以为支持具备即时通讯功能的应用程序安装于其上的各种电子设备,例如,电子设备可以包括但不限于手机、平板电脑、笔记本电脑以及台式计算机等等。本发明实施例提供的消息处理方法可以包括以下步骤:Please refer to FIG. 1, which shows a schematic flowchart of a message processing method applied to an electronic device according to an embodiment of the present invention. The embodiment of the present invention provides a message processing method applied to an electronic device. The electronic device may support Various electronic devices on which instant messaging applications are installed. For example, electronic devices may include, but are not limited to, mobile phones, tablet computers, notebook computers, desktop computers, and so on. The message processing method provided by the embodiment of the present invention may include the following steps:
步骤101,在用户对待发送的第一消息编辑完毕后,接收用户对第一消息的第一输入。Step 101: After the user finishes editing the first message to be sent, receive the user's first input of the first message.
本发明实施例中,用户通过目标应用程序的即时通讯显示界面与目标接收端的预设联系人进行通讯,收发即时通讯消息;该目标应用程序可以为具备即时通讯功能的应用程序;该第一消息为电子设备接收的用户已经编辑完毕且待发送至目标接收端的即时通讯消息,第一消息可以为文本消息、语音消息和文件消息中的至少一种,其中,文本消息可以包括但不限于文字内容和表情内容,文件消息可以包括但不限于图像、视频和文档。In the embodiment of the present invention, the user communicates with the preset contact of the target receiving end through the instant messaging display interface of the target application, and sends and receives instant messaging messages; the target application may be an application with instant messaging function; the first message It is an instant messaging message received by the electronic device that the user has edited and is to be sent to the target receiving end. The first message may be at least one of a text message, a voice message, and a file message. The text message may include, but is not limited to, text content. And emoticons, file messages can include but are not limited to images, videos, and documents.
本发明实施例中,该第一输入可以为预先设置的语音输入、作用于电子设备的触控输入、姿体动作输入以及作用于电子设备的运动输入中的至少一者;这里,作用于电子设备的触控输入可以包括但不限于作用于屏幕或壳体的触控输入,姿体动作输入可以包括但不限于手势动作输入、头部动作输入和面部动作输入等,作用于电子设备的运动输入可以包括但不限于作用于电子设备的甩动动作输入、翻转动作输入和折叠动作输入等。In the embodiment of the present invention, the first input may be at least one of a preset voice input, a touch input that acts on an electronic device, a gesture motion input, and a motion input that acts on the electronic device; here, it acts on the electronic device. The touch input of the device can include, but is not limited to, the touch input that acts on the screen or housing. The gesture input can include, but is not limited to, gesture movement input, head movement input, and facial movement input, etc., acting on the movement of electronic devices. The input may include, but is not limited to, a shaking motion input, a flip motion input, and a folding motion input that act on the electronic device.
本步骤中,在用户需要对编辑完毕的第一消息进行延迟发送的情况下,则用户执行对第一消息的第一输入操作,以供电子设备接收到第一输入,即电子设备接收到对第一消息延迟发送的触发指令,以便于后续触发对第一消息进行延迟发送的处理操作。In this step, when the user needs to delay sending the edited first message, the user performs the first input operation on the first message, so that the electronic device receives the first input, that is, the electronic device receives the The trigger instruction for delaying the sending of the first message, so as to subsequently trigger the processing operation of delaying the sending of the first message.
步骤102,响应于第一输入,按照第一模式显示第一消息。Step 102: In response to the first input, display a first message in a first mode.
本步骤中,电子设备响应于步骤101接收到的对第一消息的第一输入,通过将第一消息以第一模式进行显示,以表明对第一消息进行延迟发送处理,即第一模式下,该第一消息未发送至目标接收端,处于待发送状态。可选地,本发明实施例中,第一消息可以缓存于电子设备本地和服务器中的至少一个。In this step, in response to the first input to the first message received in step 101, the electronic device displays the first message in the first mode to indicate that the first message is to be sent delayed, that is, in the first mode , The first message has not been sent to the target receiving end, and is in a waiting state. Optionally, in the embodiment of the present invention, the first message may be cached in at least one of the local electronic device and the server.
步骤103,接收用户对按照第一模式显示的第一消息的第二输入。Step 103: Receive a second input from the user to the first message displayed in the first mode.
本发明实施例中,该第二输入可以为预先设置的语音输入、姿体动作输入、作用于电子设备的触控输入以及作用于电子设备的运动输入中的至少一者;这里,作用于电子设备的触控输入可以包括但不限于作用于屏幕或壳体的触控输入,姿体动作输入可以包括但不限于手势动作输入、头部动作输入和面部动作输入等,作用于电子设备的运动输入可以包括但不限于作用于电子设备的甩动动作输入、翻转动作输入和折叠动作输入等。In the embodiment of the present invention, the second input may be at least one of a preset voice input, gesture motion input, touch input acting on the electronic device, and motion input acting on the electronic device; here, acting on the electronic device The touch input of the device can include, but is not limited to, the touch input that acts on the screen or housing. The gesture input can include, but is not limited to, gesture movement input, head movement input, and facial movement input, etc., acting on the movement of electronic devices. The input may include, but is not limited to, a shaking motion input, a flip motion input, and a folding motion input that act on 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 can receive the second input, that is, the electronic device A trigger instruction for sending the first message to the target receiving end is received, so as to subsequently trigger a processing operation for sending the first message.
步骤104,响应于第二输入,将第一消息发送至目标接收端,并按照第二模式显示第一消息。Step 104: In response to the second input, the first message is sent to the target receiving end, and the first message is displayed in the second mode.
本步骤中,电子设备响应于步骤103接收到的对第一消息的第二输入,执行将第一消息发送至目标接收端的发送处理,这里,电子设备可以经服务器将第一消息发送至目标接收端,或者由电子设备直接发送至目标接收端;并且电子设备通过将第一消息以第二模式进行显示,以表明对第一消息进行发送处理,即第二模式下,该第一消息发送至目标接收端,处于已发送状态。In this step, in response to the second input to the first message received in step 103, the electronic device executes the sending process of sending the first message to the target receiver. Here, the electronic device can send the first message to the target receiver via the server. Or the electronic device directly sends the first message to the target receiving end; and the electronic device displays the first message in the second mode to indicate that the first message is sent, that is, in the second mode, the first message is sent to The target receiver is in the sent state.
本发明实施例中,通过电子设备接收并响应于对编辑完毕的第一消息的第一输入,按照第一模式显示第一消息,通过电子设备接收并响应于对第一消息的第二输入,将第一消息发送至目标接收端,并按照第二模式显示第一消息,从而实现对即时通讯消息的草稿缓存,简化了用户对即时讯消息的缓存操作,同时可以避免影响其他即时通讯消息的输入,提升了即时通讯质量。In the embodiment of the present invention, the electronic device receives and responds to the first input of the edited first message, displays the first message in the first mode, and receives and responds to the second input of the first message by the electronic device, Send the first message to the target receiver, and display the first message in the second mode, so as to realize the draft cache of instant messaging messages, simplify the user's cache operation of instant messaging messages, and avoid affecting other instant messaging messages. Input, improve the quality of instant communication.
可选地,在本发明一些实施例中,在电子设备接收到对第一消息的第一输入之后,可以将第一消息发送至服务器,通过服务器对第一消息进行缓存。 举例来说,在步骤102中,按照第一模式显示第一消息之前,还可以包括以下步骤:在第一消息中添加预设的状态标识,状态标识用于指示服务器延迟发送第一消息至目标接收端;将携带状态标识的第一消息发送至服务器。这里,电子设备响应于步骤101接收到的对第一消息的第一输入,通过在第一消息中进行预设的状态标识添加处理并发送至服务器,以通过预设的状态标识指示服务器保存第一消息并停止推送第一消息至预设联系人,便于服务器基于预设的状态标识对第一消息和其他执行发送的即时通讯消息进行区分处理。这样,第一消息将被保存于服务器而并非推送至预设联系人,实现第一消息的延迟发送,用户得以实现对一个或多个即时通讯消息的草稿缓存,同时可以避免影响其他即时通讯消息的输入。Optionally, in some embodiments of the present invention, after the electronic device receives the first input to the first message, the first message may be sent to the server, and the first message may be cached by the server. For example, in step 102, before displaying the first message in the first mode, the following step may be further included: adding a preset status identifier to the first message, the status identifier being used to instruct the server to delay sending the first message to the target The receiving end; sending the first message carrying the status identifier to the server. Here, in response to the first input to the first message received in step 101, the electronic device performs a preset state identification addition process in the first message and sends it to the server to instruct the server to save the first message through the preset state identification. One message and stop pushing the first message to the preset contact, so that the server can distinguish the first message from other instant messaging messages to be sent based on the preset status identifier. In this way, the first message will be stored on the server instead of being pushed to the preset contact. The delayed sending of the first message is realized, and the user can realize the draft cache of one or more instant messaging messages, and at the same time avoid affecting other instant messaging messages. input of.
相应地,由于第一消息已经发送至服务器并缓存于服务器中,在电子设备接收到第二输入,需要对第一消息发送至目标接收端的情况下,可以通过服务器对缓存的第一消息发送至目标接收端,也就是说,步骤104中,将第一消息发送至目标接收端,可以包括以下步骤:向服务器发送第一请求消息,第一请求消息用于指示服务器将第一消息发送至目标接收端。Correspondingly, since the first message has been sent to the server and cached in the server, when the electronic device receives the second input and needs to send the first message to the target receiver, the server can send the cached first message to The target receiving end, that is, sending the first message to the target receiving end in step 104 may include the following steps: sending a first request message to the server, where the first request message is used to instruct the server to send the first message to the target Receiving end.
可选地,在本发明一些实施例中,可以预先约定有用于指示服务器延迟发送第一消息的特征码,然后采用特征码标记的方式实现服务器延迟发送第一消息。也就是说,本发明实施例中,预设的状态标识可以包括预设的特征码;则在第一消息中添加预设的状态标识,可以包括:将预设的特征码添加至第一消息的信息编码中。这样,便于使得服务器接收到第一消息之后能够准确确定对第一消息的延迟处理方式。这里,电子设备可以通过在第一消息的信息编码的预设位置附加预设的特征码;其中,为避免预设的特征码破坏第一消息的信息编码,该预设位置可以包括以下至少一种:位于信息编码的头部,位于信息编码的尾部。在一示例中,以第一消息的信息编码采用二进制编码形式为例,该预设的特征码采用二进制编码形式,其可以包括两部分,电子设备在接收到第一输入之后,可以将预设的特征码的第一部分附加至第一消息的信息编码的头部,将预设的特征码的第二部分附加至第一消息的信息编码的尾部,例如,设置预设的特征码的第一部分为“0011”,第二部分为“1100”,则电子设备在接收到第一输入之后,将预设的特征码的第一部分和 第二部分分别附加至信息编码中,得到添加预设的特征码后的信息编码为“0011xxxxxx1100”,其中“x”代表待发送消息的二进制编码形式的信息编码,如第一消息的信息编码为“010101”,则添加预设的特征码后的信息编码为“00110101011100”。Optionally, in some embodiments of the present invention, a feature code for instructing the server to delay sending the first message may be pre-appointed, and then the feature code mark is used to implement the server to delay sending the first message. That is, in the embodiment of the present invention, the preset status identifier may include a preset feature code; then adding the preset status identifier to the first message may include: adding the preset feature code to the first message The information is being encoded. In this way, it is convenient for the server to accurately determine the delay processing mode for the first message after receiving the first message. Here, the electronic device may add a preset feature code to the preset position of the information code of the first message; wherein, in order to avoid the preset feature code from damaging the information code of the first message, the preset position may include at least one of the following Species: located at the head of the information code and at the end of the information code. In an example, taking the information encoding of the first message in the form of binary encoding as an example, the preset feature code is in the form of binary encoding, which may include two parts. After receiving the first input, the electronic device may set the preset The first part of the feature code is attached to the head of the information code of the first message, and the second part of the preset feature code is attached to the end of the information code of the first message, for example, the first part of the preset feature code is set Is "0011" and the second part is "1100". After receiving the first input, the electronic device adds the first part and the second part of the preset feature code to the information code respectively to obtain the preset feature The information code after the code is "0011xxxxxx1100", where "x" represents the information code in the binary code form of the message to be sent, if the information code of the first message is "010101", the information code after adding the preset feature code is "00110101011100".
另外,在电子设备接收到对第一消息的第一输入之后,第一消息缓存于电子设备本地,电子设备可以采用经服务器将第一消息发送至目标接收端的方式实现对第一消息的发送,则步骤104中,将第一消息发送至目标接收端,可以包括以下步骤:将第一消息发送至服务器,并向服务器发送第二请求消息,以指示通过服务器将第一消息发送至目标接收端。In addition, after the electronic device receives the first input to the first message, the first message is cached locally in the electronic device, and the electronic device can send the first message by sending the first message to the target receiving end via the server. Then in step 104, sending the first message to the target receiving end may include the following steps: sending the first message to the server, and sending a second request message to the server to instruct the server to send the first message to the target receiving end .
本发明实施例中,对于进行延迟发送处理的第一消息和进行发送处理的第一消息可以采用不同标记方式进行显示。举例来说,步骤102中,按照第一模式显示第一消息,可以包括以下步骤:在即时通讯显示界面的聊天信息区域,以预设的第一标记,显示第一消息,第一标记用于指示第一消息为延迟发送状态;步骤104中,按照第二模式显示第一消息,可以包括以下步骤:在即时通讯显示界面的聊天信息区域,以预设的第二标记,显示第一消息,第二标记用于指示第一消息为已发送状态。这里,为便于用户进行区分,第一标记与第二标记不同,第一标记和第二标记可以包括文字标记、图形标记、背景标记中的至少一种。文字标记可以包括显示于第一消息对应的显示区域的预设位置的附加文字标记,以及,第一消息对应的显示字体标记中的至少一种。图形标记可以包括显示于第一消息对应的显示区域的预设位置的附加图形标记(例如覆盖于第一消息上层的预设图形),以及,第一消息对应的消息外框的外框图形标记中的至少一种。背景标记可以包括背景颜色标记和背景图案标记中的至少一种。In the embodiment of the present invention, the first message subjected to delayed sending processing and the first message subjected to sending processing may be displayed in different marking modes. For example, in step 102, displaying the first message according to the first mode may include the following steps: in the chat information area of the instant messaging display interface, the first message is displayed with a preset first mark, and the first mark is used for Indicate that the first message is in the delayed sending state; in step 104, displaying the first message according to the second mode may include the following steps: displaying the first message with a preset second mark in the chat information area of the instant messaging display interface, The second mark is used to indicate that the first message is in the sent state. Here, in order to facilitate the user to distinguish, the first mark is different from the second mark, 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 word mark may include at least one of an additional word mark displayed in a preset position of the display area corresponding to the first message, and at least one of a display font mark corresponding to the first message. The graphic mark may include an additional graphic mark displayed at a preset position of the display area corresponding to the first message (for example, a preset graphic covering the upper layer of the first message), and an outer frame graphic mark of the outer frame of the message corresponding to the first message At least one of them. The background mark may include at least one of a background color mark and a background pattern mark.
示例地,第一标记和第二标记可以包括文字标记,例如,可以采用文字标记“延迟发送”作为第一标记,可以采用文字标记“已发送”作为第二标记,该第一标记和第二标记对应的文字标记可以显示于聊天信息区域中第一消息对应的显示区域的预设位置,例如第一消息对应的消息外框的一侧位置。示例地,第一标记和第二标记可以包括背景标记,例如,可以采用预设背景图案作为第一标记,如图2和3中所示例“消息5”,可以采用局部点状背景 图案作为第一标记;如图2和3中所示例“消息2”和“消息4”,可以采用空白背景图案作为第二标记。示例地,第一标记和第二标记可以包括图形标记,例如,如图2和3中所示例“消息5”,可以采用方形的外框图形作为第一标记;如图2和3中所示例“消息2”和“消息4”,可以采用椭圆形的外框图形作为第二标记。图2和图3中,“消息5”表示延迟发送状态的消息,“消息2”和“消息4”表示已发送状态的消息。For example, the first mark and the second mark may include word marks. For example, the word mark "delayed sending" may be used as the first mark, and the word mark "sent" may be used as the second mark. The first mark and the second mark The text mark corresponding to the mark may be displayed in a preset position of the display area corresponding to the first message in the chat information area, for example, a position on one side of a message frame corresponding to the first message. For example, the first mark and the second mark may include background marks. For example, a preset background pattern may be used as the first mark, as shown in the example "Message 5" in Figures 2 and 3, and a partial dotted background pattern may be used as the first mark. One mark; "Message 2" and "Message 4" as examples in Figures 2 and 3, a blank background pattern can be used as the second mark. Exemplarily, the first mark and the second mark may include graphic marks, for example, "Message 5" as illustrated in Figures 2 and 3, and a square outer frame graphic can be used as the first mark; as illustrated in Figures 2 and 3 For "Message 2" and "Message 4", an oval frame figure can be used as the second mark. In Figures 2 and 3, "message 5" indicates a message in a delayed sending state, and "message 2" and "message 4" indicate a message in a sent state.
本发明实施例中,为更好地提升人机交互体验,可以采用显示于第一消息对应的显示区域的预设位置的附加图形标记作为第一标记;较优地,可以采用进度条形式的附加图形标记作为第一标记,也就是说,以预设的第一标记,显示第一消息,可以包括以下步骤:在第一消息对应的第一区域,显示与第一消息对应的进度条。这里,该进度条上具有可在进度条上移动的滑块;第一区域可以为第一消息对应的显示区域,示例地,如图4所示,该进度条40可以覆盖显示于第一消息(即“消息5”)对应的显示区域的上层;或者,第一区域可以为第一消息对应的显示区域的一侧区域,如图5所示,该进度条40可以显示于第一消息(即“消息5”)对应的显示区域的底部区域;较优地,进度条可以根据实际设置需要,以预设透明度显示。如图4和图5中所示,该进度条40上包括第一端42、第二端43,以及可在第一端42和第二端43之间移动的滑块41。In the embodiment of the present invention, in order to better enhance the human-computer interaction experience, an additional graphic mark displayed at a preset position of the display area corresponding to the first message may be used as the first mark; preferably, a progress bar may be used. Adding a graphic mark as the first mark, that is, displaying the first message with the preset first mark may include the following steps: displaying a progress bar corresponding to the first message in the first area corresponding to the first message. Here, the progress bar has a slider that can be moved on the progress bar; the first area may be a display area corresponding to the first message. For example, as shown in FIG. 4, the progress bar 40 may be displayed overlaid on the first message. (Ie "Message 5") the upper layer of the corresponding display area; or, the first area may be a side area of the display area corresponding to the first message. As shown in FIG. 5, the progress bar 40 may be displayed on the first message ( That is, the bottom area of the display area corresponding to "Message 5"); preferably, the progress bar can be displayed with a preset transparency according to actual setting requirements. As shown in FIGS. 4 and 5, the progress bar 40 includes a first end 42, a second end 43, and a slider 41 that can move between the first end 42 and the second end 43.
可选地,在本发明一些实施例中,为提升人机交互体验以及操作便捷性,第二输入可以为作用于电子设备的触控输入,具体可以基于进度条的触控输入实现对第一消息的发送操作,举例来说,步骤103,接收用户对按照第一模式显示的第一消息的第二输入,可以包括以下步骤:接收用户对进度条上的滑块的第二输入,第二输入用于控制滑块移动;这里,对第一消息的第二输入即可以为对滑块在进度条上进行移动的第二输入。在此基础上,通过用户对滑动移动至进度条上的目标位置,以实现对发送第一消息至目标接收端的触发指令的触发,也就是说,步骤104,响应于第二输入,通过服务器发送第一消息至目标接收端,并按照第二模式显示第一消息,可以包括以下步骤:在滑块移动至进度条上的目标位置的情况下,将第一消息发送至目标接收端,并按照第二模式显示第一消息。这样,利于用户直观、便捷地实现对按照第 一模式显示的第一消息的发送操作,并能够避免误触发。Optionally, in some embodiments of the present invention, in order to enhance the human-computer interaction experience and the convenience of operation, the second input may be a touch input acting on an electronic device, and specifically, the first input may be realized based on the touch input of the progress bar. The message sending operation, for example, step 103, receiving the user's second input to the first message displayed in the first mode, may include the following steps: receiving the user's second input to the slider on the progress bar, and the second The input is used to control the movement of the slider; here, the second input to the first message can be regarded as the second input to move the slider on the progress bar. On this basis, the user slides to the target position on the progress bar to trigger the triggering instruction for sending the first message to the target receiving end, that is, in step 104, in response to the second input, the server sends The first message to the target receiving end and displaying the first message in the second mode may include the following steps: when the slider moves to the target position on the progress bar, the first message is sent to the target receiving end, and the The second mode displays the first message. In this way, it is beneficial for the user to intuitively and conveniently realize the sending operation of the first message displayed according to the first mode, and can avoid false triggering.
可选地,在本发明一些实施例中,当用户根据自身需要确定删除按照第一模式显示的第一消息的情况下,用户可以通过执行一第三输入以触发删除指令,以使电子设备接收到对第一消息的第三输入,并响应于第三输入,删除聊天信息区域中显示的第一消息。这里,第三输入可以通过预先设置的语音输入、姿体动作输入、作用于电子设备的触控输入以及作用于电子设备的运动输入中的至少一者。另外,对于在电子设备接收到对第一消息的第一输入之后,将第一消息发送至服务器,通过服务器对第一消息进行缓存的使用示例,为实现对第一消息的删除处理,响应于第三输入,向服务器发送第三请求消息,第三请求消息用于指示服务器将缓存的第一消息进行删除,这样,电子设备即可基于第三请求消息通知服务器删除缓存的第一消息。Optionally, in some embodiments of the present invention, when the user determines to delete the first message displayed in the first mode according to his own needs, the user may execute a third input to trigger the delete instruction, so that the electronic device receives To the third input to the first message, and in response to the third input, delete the first message displayed in the chat information area. Here, the third input may be at least one of a preset voice input, gesture motion input, touch input acting on the electronic device, and motion input acting on the electronic device. In addition, after the electronic device receives the first input of the first message, the first message is sent to the server, and the first message is cached by the server. In order to realize the deletion processing of the first message, respond to The third input is to send a third request message to the server. The third request message is used to instruct the server to delete the cached first message. In this way, the electronic device can notify the server to delete the cached first message based on the third request message.
在本发明一些可选的实施例中,为提升人机交互体验以及操作便捷性,可以基于进度条的触控输入来实现对第一消息的删除操作,举例来说,步骤102中,按照第一模式显示第一消息之后,该消息处理方法还可以包括以下步骤:接收用户对进度条的第三输入;响应于第三输入,删除聊天信息区域中显示的第一消息。这里,对第一消息的第三输入即可以为对进度条的第三输入,第三输入可以为作用于滑块的移动输入以及作用于进度条或滑块的按压输入、点击输入、双击输入、拖动输入等中的至少一种。In some optional embodiments of the present invention, in order to improve the human-computer interaction experience and the convenience of operation, the first message may be deleted based on the touch input of the progress bar. For example, in step 102, according to the first message After the first message is displayed in a mode, the message processing method may further include the following steps: receiving a third input from the user to the progress bar; in response to the third input, deleting the first message displayed in the chat information area. Here, the third input to the first message can be regarded as the third input to the progress bar, and the third input can be a movement input acting on a slider, a pressing input, a click input, and a double-click input acting on the progress bar or the slider. At least one of, drag input, etc.
示例地,在本发明实施例中,如图4和图5所示,第一模式下,滑块41可以位于进度条40的中间位置,以指示第一消息为延迟发送状态;该示例中,目标位置可以为进度条的第一端42,接收用户对进度条上的滑块的第二输入,即可以为接收对滑块在进度条上由中间位置向第一端42移动的第二输入;接收用户对进度条的第三输入,即可以为接收对滑块在进度条上由中间位置向第二端43移动的第三输入。较优地,为提升交互效果,在第二输入的过程中,对进度条上滑块移动过的区域以预设标识显示,其中,如图4和图5所示,在滑块41位于进度条40的中间位置时,进度条上第二端43和中间位置(即滑块41)之间的区域以预设标识显示,图4和图5中以斜线阴影表示预设标识。For example, in the embodiment of the present invention, as shown in FIGS. 4 and 5, in the first mode, the slider 41 may be located in the middle position of the progress bar 40 to indicate that the first message is in the delayed sending state; in this example, The target position can be the first end 42 of the progress bar, which receives the user's second input to the slider on the progress bar, that is, it receives the second input of the slider moving from the middle position to the first end 42 on the progress bar. ; Receiving the user's third input to the progress bar can be regarded as receiving the third input of the slider moving from the middle position to the second end 43 on the progress bar. Preferably, in order to improve the interactive effect, in the process of the second input, the area moved by the slider on the progress bar is displayed with a preset logo, where, as shown in Figures 4 and 5, the slider 41 is located in the progress bar. When the bar 40 is in the middle position, the area between the second end 43 and the middle position (that is, the slider 41) on the progress bar is displayed with a preset mark. In FIGS. 4 and 5, the preset mark is indicated by a slash.
另外,本发明实施例中,实现对按照第一模式显示的第一消息的发送至 目标接收端的操作还可以包括其他多种操作方式。例如,步骤103,接收用户对按照第一模式显示的第一消息的第二输入,可以包括以下步骤:接收对按照第一模式显示的第一消息的第一预设手势的触控输入,并在响应于第一预设手势的触控输入,显示一发送控件之后,接收对发送控件的第二预设手势的触控输入;这里,第二输入可以包括对第一消息的第一预设手势的触控输入以及对发送控件的第二预设手势的触控输入,第一预设手势的触控输入可以包括点击输入、双击输入、拖动输入和按压输入等中的至少一种,第二预设手势的触控输入可以包括点击输入、双击输入、拖动输入和按压输入等中的至少一种。再例如,在即时通讯显示界面中,信息输入区域上可以显示延迟发送按键,则步骤103,接收用户对按照第一模式显示的第一消息的第二输入,可以包括以下步骤:接收对延迟发送按键的第三预设手势的触控输入,该第三预设手势的触控输入可以包括双击输入、拖动输入和按压输入等中的至少一种。In addition, in the embodiment of the present invention, the operation of sending the first message displayed in the first mode to the target receiving end may also include other multiple operation modes. For example, in step 103, receiving a second input from the user to a first message displayed in the first mode may include the following steps: receiving a touch input of a first preset gesture of the first message displayed in the first mode, and After displaying a send control in response to the touch input of the first preset gesture, receive the touch input of the second preset gesture of the send control; here, the second input may include the first preset of the first message The touch input of the gesture and the touch input of the second preset gesture for sending the control, the touch input of the first preset gesture may include at least one of tap input, double tap input, drag input, and press input, etc., The touch input of the second preset gesture may include at least one of a tap input, a double tap input, a drag input, and a press input. For another example, in the instant messaging display interface, the delayed sending button can be displayed on the information input area, then step 103, receiving the user's second input to the first message displayed in the first mode, can include the following steps: The touch input of the third preset gesture of the key, the touch input of the third preset gesture may include at least one of a double-tap input, a drag input, and a press input.
可选地,在本发明一些实施例中,对于电子设备采用经服务器将第一消息发送至目标接收端的方式实现对第一消息进行发送的使用示例以及对于在电子设备接收到对第一消息的第一输入之后,将第一消息发送至服务器,通过服务器对第一消息进行缓存的使用示例,电子设备可以基于服务器对第一消息的发送反馈再执行表明第一消息处于已发送状态的显示处理。也就是说,步骤104,响应于第二输入,将第一消息发送至目标接收端,并按照第二模式显示第一消息,可以包括以下步骤:在将第一消息经服务器发送至第一消息之后,接收服务器发送的反馈消息;在反馈信息指示第一消息已发送至目标接收端的情况下,在即时通讯显示界面的聊天信息区域上,将第一消息按照第二模式显示于第二消息之后;其中,第二消息为发送第一输入至目标接收端之前的最后一次已发送的消息。本发明实施例中,在将第一消息经服务器发送至目标接收端之后,接收服务器根据第一消息的发送情况返回的反馈消息,电子设备可以根据服务器返回的第一消息已发送至目标接收端的反馈消息,将第一消息由以第一模式显示切换为按照第二模式显示,以指示第一消息为已发送状态,并按照发送时间将该第一消息显示在第二消息之后,以便于用户知悉第一消息的发送情况。Optionally, in some embodiments of the present invention, for the electronic device, the method of sending the first message to the target receiving end via the server is adopted to realize the usage example of sending the first message and for the first message received on the electronic device. After the first input, the first message is sent to the server. Through the example of using the server to cache the first message, the electronic device can perform display processing indicating that the first message is in the sent state based on the server's sending feedback of the first message. . That is, step 104, in response to the second input, sending the first message to the target receiving end, and displaying the first message in the second mode, may include the following steps: sending the first message to the first message via the server After that, the feedback message sent by the server is received; in the case that the feedback information indicates that the first message has been sent to the target receiver, the first message is displayed after the second message in the second mode on the chat information area of the instant messaging display interface ; Wherein, the second message is the last sent message before sending the first input to the target receiving end. In the embodiment of the present invention, after the first message is sent to the target receiving end via the server, the receiving server returns a feedback message according to the sending status of the first message, and the electronic device may send the first message back to the target receiving end according to the server. Feedback message, switch the first message from being displayed in the first mode to being displayed in the second mode, to indicate that the first message is in the sent state, and display the first message after the second message according to the sending time, so as to facilitate the user Know the sending of the first message.
本发明实施例中,如图2和图3所示,在用户与预设联系人进行通讯的即时通讯显示界面中,可以包括有用于显示与预设联系人之间通讯收发的即时讯消息的聊天信息区域22,以及,用于用户输入待发送消息的信息输入区域23。另外,为提升用户即时通讯顺畅性,该即时通讯显示界面还可以包括:用于显示联系人信息的联系人信息区域21以及用于用户进行文本输入的键盘区域24。此外,信息输入区域23可以显示发送按键231,以用于实现对已输入的即时通讯消息的发送。In the embodiment of the present invention, as shown in FIG. 2 and FIG. 3, the instant messaging display interface for the user to communicate with the preset contact may include a display interface for displaying instant messaging messages sent and received between the user and the preset contact. The chat information area 22 and the information input area 23 for the user to input a message to be sent. In addition, in order to improve the user's instant messaging smoothness, the instant messaging display interface may also include: a contact information area 21 for displaying contact information and a keyboard area 24 for the user to input text. In addition, the information input area 23 can display a sending button 231 for sending the entered instant messaging message.
可选地,在本发明一些实施例中,电子设备可以通过接收用户操作的预设手势的触控输入来实现对第一消息的第一输入。举例来说,预设手势的触控输入可以为对第一消息的拖动输入,步骤101,接收用户对第一消息的第一输入,可以包括以下步骤:接收用户对即时通讯显示界面的信息输入区域中所输入的第一消息的拖动输入,拖动输入用于将第一消息由信息输入区域拖动至预设的第二区域。本发明实施例中,结合图2所示,当用户在信息输入区域中对第一消息编辑完毕之后,用户可以通过拖动信息输入区域中所输入的第一消息至预设的第二区域的拖动输入,拖动输入即可以为第一输入,第二区域可以为屏幕上除信息输入区域以外的区域,如图2中所示例的第二区域可以为聊天信息区域,这样,使电子设备接收并响应拖动输入,确定接收到对第一消息延迟发送至预设联系人(即目标接收端)的触发指令;这样,能够提升用户操作便捷性,并能够提升人机交互体验,提升用户操作趣味性。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 the user. For example, the touch input of the preset gesture may be a drag input to the first message. Step 101, receiving the user's first input to the first message, may include the following steps: receiving the user's information on the instant messaging display interface The drag input of the first message input in the input area, and the drag input is used to drag the first message from the information input area to the preset second area. In the embodiment of the present invention, as shown in FIG. 2, after the user edits the first message in the information input area, the user can drag the first message input in the information input area to the preset second area. Drag input, drag input can be regarded as the first input. The second area can be an area on the screen other than the information input area. The second area as shown in Figure 2 can be a chat information area, so that the electronic device Receiving and responding to the drag input, it is determined that the trigger instruction to delay the sending of the first message to the preset contact (ie the target receiving end) is received; in this way, the user's operation convenience can be improved, and the human-computer interaction experience can be improved, and the user can be improved The operation is interesting.
可选地,在本发明一些实施例中,为简化用户触发对第一消息进行延迟发送的触发指令的操作,在即时通讯显示界面中,信息输入区域上可以显示延迟发送按键,用户可以通过操作该延迟发送按键触发延迟发送指令,也就是说,步骤101,接收用户对第一消息的第一输入,可以包括:在即时通讯显示界面上,接收对信息输入区域上显示的延迟发送按键的触摸输入;这样,用户通过对延迟发送按键的触摸输入,对延迟发送按键的触摸输入即可以为第一输入,从而实现简便快捷地触发对第一消息的延迟发送,提升了用户操作便利性。这里,触摸输入可以包括但不限于点击输入、双击输入和按压输入等。在一示例中,如图2所示,该在即时通讯显示界面中,信息输入区域23上可以显示发送按键231和延迟发送按键232,该延迟发送按键232可以 隐藏或显示;若用户通过在延迟发送按键232上进行点击输入操作,使电子设备接收并响应该点击输入,进而实现第一消息的延迟发送处理;若用户通过在发送按键231上进行点击输入操作,即可使电子设备实现将第一消息发送至目标接收端。Optionally, in some embodiments of the present invention, in order to simplify the user's operation of triggering the trigger instruction to delay sending the first message, in the instant messaging display interface, the delayed sending button can be displayed on the information input area, and the user can operate The delayed sending button triggers the delayed sending instruction, that is, step 101, receiving the user's first input of the first message, may include: on the instant messaging display interface, receiving a touch on the delayed sending button displayed on the information input area Input; in this way, the user touches the delayed sending button through the touch input to the delayed sending button as the first input, so that the delayed sending of the first message can be triggered simply and quickly, and the convenience of the user's operation is improved. Here, the touch input may include, but is not limited to, a tap input, a double tap input, a press input, and the like. In an example, as shown in Fig. 2, in the instant messaging display interface, the sending button 231 and the delayed sending button 232 can be displayed on the information input area 23. The delayed sending button 232 can be hidden or displayed; The click input operation on the send button 232 allows the electronic device to receive and respond to the click input, thereby realizing the delayed sending process of the first message; if the user performs a click input operation on the sending button 231, the electronic device can realize the first message A message is sent to the target receiver.
另外,在本发明一些实施例中,该消息处理方法还可以包括以下步骤:接收用户的第四输入;响应于第四输入,显示预设时间段内按照第一模式显示的至少一条待发送消息。这样,便于用户能够快捷地查找到预设时间段内待发送的第一消息。举例来说,接收用户的第四输入,可以包括以下至少一种:在即时通讯显示界面的聊天信息区域上,接收对按照第一模式显示的第一消息的第一预设手势的触控输入,第一预设手势的触控输入可以包括但不限于拖动输入和长按输入等;在即时通讯显示界面上,接收对信息输入区域上显示的延迟发送按键的第二预设手势的触控输入,第二预设手势的触控输入可以包括但不限于长按输入和双击输入等。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; in response to the fourth input, displaying at least one message to be sent displayed in the first mode within a preset time period . In this way, it is convenient for the user to quickly find the first message to be sent within the preset time period. For example, receiving the fourth input of the user may include at least one of the following: on the chat information area of the instant messaging display interface, receiving the touch input of the first preset gesture of the first message displayed in the first mode , The touch input of the first preset gesture may include, but is not limited to, drag input and long-press input, etc.; on the instant messaging display interface, the touch input of the second preset gesture of the delayed sending button displayed on the information input area is received. Control input, the touch input of the second preset gesture may include, but is not limited to, long-press input and double-tap input.
本发明实施例提供的应用于电子设备的消息处理方法,通过电子设备接收并响应于对编辑完毕的第一消息的第一输入,按照第一模式显示第一消息,通过电子设备接收并响应于对第一消息的第二输入,将第一消息发送至目标接收端,并按照第二模式显示第一消息,从而实现对即时通讯消息的草稿缓存,简化了用户对即时通讯消息的缓存操作,同时可以避免影响其他即时通讯消息的输入,提升了即时通讯质量。In the message processing method applied to an electronic device provided by the embodiment of the present invention, the electronic device receives and responds to the first input of the edited first message, displays the first message in a first mode, and receives and responds to the first message by the electronic device For the second input of the first message, the first message is sent to the target receiving end, and the first message is displayed in the second mode, so as to realize the draft cache of the instant messaging message, which simplifies the user's cache operation of the instant messaging message. At the same time, it can avoid affecting the input of other instant messaging messages and improve the quality of instant messaging.
请参见图6,其示出的是本发明实施例提供的应用于服务器的消息处理方法的流程示意图,本发明实施例提供一种消息处理方法,应用于服务器,可以包括以下步骤:Refer to FIG. 6, which shows a schematic flowchart of a message processing method applied to a server according to an embodiment of the present invention. The embodiment of the present invention provides a message processing method applied to a server and may include the following steps:
步骤601,接收电子设备发送的第一消息。Step 601: Receive a first message sent by an electronic device.
本发明实施例中,用户通过目标应用程序的即时通讯显示界面与预设联系人进行通讯,服务器将在电子设备与目标接收端的预设联系人之间实现即时通讯消息的收发;该第一消息为电子设备接收的用户已经编辑完毕且待发送至目标接收端的即时通讯消息,第一消息可以为文本消息、语音消息和文件消息中的至少一种,其中,文本消息可以包括但不限于文字内容和表情内容,文件消息可以包括但不限于图像、视频和文档。In the embodiment of the present invention, the user communicates with the preset contact through the instant messaging display interface of the target application, and the server will realize the sending and receiving of instant messaging messages between the electronic device and the preset contact at the target receiving end; the first message It is an instant messaging message received by the electronic device that the user has edited and is to be sent to the target receiving end. The first message may be at least one of a text message, a voice message, and a file message. The text message may include, but is not limited to, text content. And emoticons, file messages can include but are not limited to images, videos, and documents.
步骤602,缓存第一消息,并将第一消息设置为延迟发送状态。Step 602: Buffer the first message, and set the first message to a delayed sending state.
本步骤中,服务器在接收到第一消息后,对第一消息进行保存,并将第一消息设置为延迟发送状态,即停止推送第一消息至目标接收端的预设联系人。这样,能够实现对第一消息的延迟发送,用户得以实现对一个或多个即时通讯消息的草稿缓存,同时可以避免影响其他即时通讯消息的输入。In this step, after receiving the first message, the server saves the first message and sets the first message to a delayed sending state, that is, stops pushing the first message to the preset contact of the target receiving end. In this way, the delayed sending of the first message can be realized, the user can realize the draft cache of one or more instant messaging messages, and at the same time, it can avoid affecting the input of other instant messaging messages.
本发明实施例中,通过服务器接收电子设备发送的第一消息,缓存第一消息,并将第一消息设置为延迟发送状态,从而实现对即时通讯消息的草稿缓存,简化了用户对即时通讯消息的缓存操作,同时可以避免影响其他即时通讯消息的输入。In the embodiment of the present invention, the first message sent by the electronic device is received through the server, the first message is buffered, and the first message is set to the delayed sending state, thereby realizing the draft cache of the instant messaging message, which simplifies the user’s response to the instant messaging message. The cache operation can avoid affecting the input of other instant messaging messages at the same time.
可选地,在本发明一些实施例中,步骤602,缓存第一消息,并将第一消息设置为延迟发送状态,可以包括以下步骤:在第一消息携带预设的状态标识的情况下,缓存第一消息,并将第一消息设置为延迟发送状态,状态标识用于指示服务器延迟发送第一消息至目标接收端。本发明实施例中,服务器通过接收电子设备发送的添加携带有预设的状态标识的第一消息,服务器基于预设的状态标识保存第一消息并停止推送第一消息至目标接收端的预设联系人,即实现对第一消息的延迟发送,以便于服务器对第一消息和其他执行发送的即时通讯消息进行区分处理。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: in the case where the first message carries a preset state identifier, The first message is buffered and the first message is set to a delayed sending state, and the state identifier is used to instruct the server to delay sending the first message to the target receiving end. In the embodiment of the present invention, the server adds the first message that carries the preset status identifier by receiving the first message sent by the electronic device, and the server saves the first message based on the preset status identifier and stops pushing the first message to the preset contact of the target receiving end People, that is, to realize the delayed sending of the first message, so that the server can distinguish between the first message and other instant messaging messages that are to be sent.
可选地,在本发明一些实施例中,可以预先约定有用于指示服务器延迟发送第一消息的特征码,然后服务器即可通过检测第一信息的信息编码中是否存在特征码的方式来实现是否对第一消息进行延迟发送处理。也就是说,本发明实施例中,预设的状态标识可以包括预设的特征码;则在第一消息携带预设的状态标识的情况下,缓存第一消息,并将第一消息设置为延迟发送状态,可以包括:在第一消息的信息编码中包括预设的特征码的情况下,缓存第一消息,并将第一消息设置为延迟发送状态。这里,服务器可以在接收到第一消息后,对第一消息的信息编码进行检测,若检测到第一信息的信息编码中存在预设的特征码,则缓存第一消息并将第一消息设置为延迟发送状态,以停止推送第一消息至目标接收端的预设联系人,这样,利于服务器在接收到第一消息之后能够准确确定对第一消息的延迟处理方式。其中,预设的特征码可以是附加于第一消息的信息编码的预设位置,例如,为避免预设 的特征码破坏第一消息的信息编码,该预设位置可以是位于在信息编码的头部,和/或,位于在信息编码的尾部;在一示例中,以第一消息的信息编码采用二进制编码形式为例,该预设的特征码采用二进制编码形式,其可以包括两部分,预设的特征码的第一部分可以附加于信息编码的头部,预设的特征码的第二部分可以附加于信息编码的尾部,例如,设置预设的特征码的第一部分为“0011”,第二部分为“1100”,则服务器接收到的携带预设的特征码的第一消息的信息编码为“0011xxxxxx1100”,其中“x”代表待发送消息的二进制编码形式的信息编码,如第一消息的信息编码为“010101”,则服务器接收到的携带预设的特征码的第一消息的信息编码为“00110101011100”。Optionally, in some embodiments of the present invention, a feature code used to instruct the server to delay sending the first message can be pre-appointed, and then the server can detect whether the feature code exists in the information code of the first information to realize whether Delay the sending of the first message. That is to say, in the embodiment of the present invention, the preset status identifier may include a preset feature code; in the case where the first message carries the preset status identifier, the first message is cached, and the first message is set to The delayed sending state may include: buffering the first message and setting the first message to the delayed sending state when the information code of the first message includes a preset feature code. Here, the server may detect the information encoding of the first message after receiving the first message, and if it detects that there is a preset feature code in the information encoding of the first information, it caches the first message and sets the first message In order to delay the sending state, to stop pushing the first message to the preset contact of the target receiving end, so that the server can accurately determine the delay processing method for the first message after receiving the first message. Wherein, the preset feature code may be a preset position attached to the information code of the first message. For example, in order to avoid the preset feature code from destroying the information code of the first message, the preset position may be located in the information code. The header, and/or, is located at the end of the information encoding; in one example, taking the information encoding of the first message in a binary encoding form as an example, the preset feature code is in a binary encoding form, which may include two parts, The first part of the preset feature code can be attached to the head of the information code, and the second part of the preset feature code can be attached to the end of the information code. For example, the first part of the preset feature code is set to "0011", The second part is "1100", the information code of the first message carrying the preset feature code received by the server is "0011xxxxxx1100", where "x" represents the information code in the binary code form of the message to be sent, such as the first The information code of the message is "010101", and the information code of the first message carrying the preset feature code received by the server is "00110101011100".
可选地,在本发明一些实施例中,由于第一消息在未发送至目标接收端之前(即第一消息处于延迟发送状态时)缓存于服务器中,因此,在用户需要对第一消息发送至目标接收端的情况下,将通过在电子设备上对第一消息执行第二输入,使电子设备向服务器发送第一请求消息,此时,服务器可以基于第一请求消息将第一消息发送至目标接收端,也即,步骤602,缓存第一消息,并将第一消息设置为延迟发送状态之后,该消息处理方法还可以包括:在接收到电子设备发送的第一请求消息的情况下,将第一消息发送至目标接收端;第一请求消息用于指示服务器将第一消息发送至目标接收端。本发明实施例中,服务器基于该第一请求消息将缓存的第一消息发送至目标接收端的预设联系人,并在将第一消息成功发送至目标接收端的情况下将第一消息设置为已发送状态,完成对第一消息的发送操作。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 (that is, when the first message is in a delayed sending state), the user needs to send the first message In the case of the target receiving end, the electronic device will 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 can send the first message to the target based on the first request message. The receiving end, that is, step 602, after buffering the first message and setting the first message to the delayed sending state, the message processing method may further include: in the case of receiving the first request message sent by the electronic device, The first message is sent to the target receiving end; the first request message is used to instruct the server to send the first message to the target receiving end. In the embodiment of the present invention, the server sends the buffered first message to the preset contact of the target receiving end based on the first request message, and sets the first message to be already sent to the target receiving end when the first message is successfully sent to the target receiving end. Send status, complete the sending operation of the first message.
可选地,在本发明一些实施例中,将第一消息发送至目标接收端之后,该消息处理方法还可以包括:将第一消息成功发送至目标接收端的情况下,向电子设备发送反馈消息,反馈消息指示第一消息已发送至目标接收端。本发明实施例中,在服务器接收到第一消息的第一请求消息并基于第一请求消息发送第一消息至目标接收端之后,可以检测第一消息的发送情况,并向电子设备返回反馈信息,该反馈消息包括指示第一消息已发送至目标接收端的消息和指示第一消息未成功发送至目标接收端的消息,以便电子设备基于该反馈信息对第一消息进行相应的显示处理,利于用户知悉第一消息的发送情况。Optionally, in some embodiments of the present invention, after the first message is sent to the target receiving end, the message processing method may further include: sending the first message to the target receiving end successfully, sending a feedback message to the electronic device , The feedback message indicates that the first message has been sent to the target receiver. In the embodiment of the present invention, after the server receives the first request message of the first message and sends the first message to the target receiving end based on the first request message, it can detect the sending of the first message and return feedback information to the electronic device The feedback message includes a message indicating that the first message has been sent to the target receiving end and a message indicating that the first message has not been successfully sent to the target receiving end, so that the electronic device performs corresponding display processing on the first message based on the feedback information, which is helpful for the user to know The sending of the first message.
可选地,在本发明一些实施例中,步骤602,缓存第一消息,并将第一消息设置为延迟发送状态之后,该消息处理方法还可以包括:接收电子设备发送的第三请求消息;根据第三请求消息,删除缓存的第一消息。本发明实施例中,该第三请求消息用于指示服务器将缓存的第一消息进行删除,服务器接收到对缓存的第一消息的第三请求消息之后,将基于该第三请求消息删除服务器中保存的第一消息,完成对第一消息的删除操作。Optionally, in some embodiments of the present invention, in step 602, after buffering the first message and setting the first message to a delayed sending state, the message processing method may further include: receiving a third request message sent by the electronic device; According to the third request message, the cached first message is deleted. In the embodiment of the present invention, the third request message is used to instruct the server to delete the cached first message. After the server receives the third request message for the cached first message, it will delete the cached message in the server based on the third request message. The first message saved, the delete operation of the first message is completed.
本发明实施例提供的应用于服务器的消息处理方法,通过服务器接收电子设备发送的第一消息,缓存第一消息,并将第一消息设置为延迟发送状态,从而实现对即时通讯消息的草稿缓存,简化了用户对即时通讯消息的缓存操作,同时可以避免影响其他即时通讯消息的输入和查看。In the message processing method applied to the server provided by the embodiment of the present invention, the server receives the first message sent by the electronic device, buffers the first message, and sets the first message to a delayed sending state, thereby realizing draft caching of instant messaging messages , Which simplifies the user’s caching operation of instant messaging messages, and at the same time avoids affecting the input and viewing of other instant messaging messages.
基于上述应用于电子设备的方法,本发明实施例提供一种用以实现上述方法的电子设备。请参见图7,其示出的是本发明实施例提供的电子设备的结构示意图。本发明实施例提供一种电子设备700,可以包括:第一接收模块710、第一处理模块720、第二接收模块730和第二处理模块740。这样,能够实现对即时通讯消息的草稿缓存,简化了用户对即时讯消息的缓存操作,同时可以避免影响其他即时通讯消息的输入,提升了即时通讯质量。Based on the above method applied to an electronic device, an embodiment of the present invention provides an electronic device for implementing the above method. Please refer to FIG. 7, which shows a schematic structural diagram of an electronic device provided by an embodiment of the present invention. An embodiment of the present invention provides an electronic device 700, which may include: a first receiving module 710, a first processing module 720, a second receiving module 730, and a second processing module 740. In this way, draft caching of instant messaging messages can be realized, which simplifies the user's caching operation of instant messaging messages, and at the same time avoids affecting the input of other instant messaging messages, and improves the quality of instant messaging.
第一接收模块710,用于在用户对待发送的第一消息编辑完毕后,接收用户对第一消息的第一输入;The first receiving module 710 is configured to receive the user's first input of the first message after the user finishes editing the first message to be sent;
第一处理模块720,用于响应于第一输入,按照第一模式显示第一消息;The first processing module 720 is configured to display the first message in the first mode in response to the first input;
第二接收模块730,用于接收用户对按照第一模式显示的第一消息的第二输入;The second receiving module 730 is configured to receive a second input of the user to the first message displayed in the first mode;
第二处理模块740,用于响应于第二输入,将第一消息发送至目标接收端,并按照第二模式显示第一消息。The second processing module 740 is configured to send the first message to the target receiving end in response to the second input, and display the first message in the second mode.
可选地,在本发明一些实施例中,第一处理模块720可以包括:添加单元和第一发送单元,第二处理模块740可以包括:第二发送单元。这样,第一消息将被保存于服务器而并非推送至预设联系人,实现第一消息的延迟发送,用户得以实现对一个或多个即时通讯消息的草稿缓存,同时可以避免影响其他即时通讯消息的输入。Optionally, in some embodiments of the present invention, the first processing module 720 may include: an adding unit and a first sending unit, and the second processing module 740 may include: a second sending unit. In this way, the first message will be stored on the server instead of being pushed to the preset contact. The delayed sending of the first message is realized, and the user can realize the draft cache of one or more instant messaging messages, and at the same time avoid affecting other instant messaging messages. input of.
添加单元,用于在第一消息中添加预设的状态标识,状态标识用于指示 服务器延迟发送第一消息至目标接收端;The adding unit is used to add a preset status identifier to the first message, and the status identifier is used to instruct the server to delay sending the first message to the target receiving end;
第一发送单元,用于将携带状态标识的第一消息发送至服务器;The first sending unit is configured to send the first message carrying the status identifier to the server;
第二发送单元,用于向服务器发送第一请求消息,第一请求消息用于指示服务器将第一消息发送至目标接收端。The second sending unit is configured to send a first request message to the server, and the first request message is used to instruct 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-appointed, and then the feature code mark is used to implement the server to delay sending the first message. That is to say, in the embodiment of the present invention, the status identifier may include a preset feature code; the adding unit may include: adding a subunit, so that the server can accurately determine the delay processing method for the first message after receiving the first message .
添加子单元,用于将预设的特征码添加至第一消息的信息编码中。The adding subunit is used to add the preset feature code to the information code of the first message.
可选地,在本发明一些实施例中,对于进行延迟发送处理的第一消息和进行发送处理的第一消息可以采用不同标记方式进行显示,以便于用户区分识别。举例来说,第一处理模块720可以包括:第一显示单元,第二处理模块740可以包括:第二显示单元。Optionally, in some embodiments of the present invention, the first message subjected to delayed sending processing and the first message subjected to sending processing may be displayed in different marking modes, so as to facilitate the user to distinguish and recognize. For example, the first processing module 720 may include: a first display unit, and the second processing module 740 may include: a second display unit.
第一显示单元,用于在即时通讯显示界面的聊天信息区域,以预设的第一标记,显示第一消息,第一标记用于指示第一消息为延迟发送状态;The first display unit is configured to display the first message with a preset first mark in the chat information area of the instant messaging display interface, and the first mark is used to indicate that the first message is in a delayed sending state;
第二显示单元,用于在即时通讯显示界面的聊天信息区域,以预设的第二标记,显示第一消息,第二标记用于指示第一消息为已发送状态。The second display unit is used to display the first message with a preset second mark in the chat information area of the instant messaging display interface, and the second mark is used to indicate that the first message is in a sent state.
本发明实施例中,为更好地提升人机交互体验,可以采用显示于第一消息对应的显示区域的预设位置的附加图形标记作为第一标记;较佳地,以采用进度条形式的附加图形标记作为第一标记,也就是说,在本发明一些实施例中,第一显示单元可以包括:显示子单元,以便于用户对延迟发送状态的第一消息的直观查看。In the embodiment of the present invention, in order to better enhance the human-computer interaction experience, an additional graphic mark displayed at a preset position of the display area corresponding to the first message may be used as the first mark; preferably, a progress bar is used. The graphic mark is added as the first mark, that is, in some embodiments of the present invention, the first display unit may include: a display sub-unit to facilitate the user to visually check the first message in the delayed sending state.
显示子单元,用于在第一消息对应的第一区域,显示与第一消息对应的进度条。The display subunit is configured to display a progress bar corresponding to the first message in the first area corresponding to the first message.
可选地,在本发明一些实施例中,第二接收模块730可以包括:第一接收单元,第二处理模块740可以包括:第一处理单元,这样,利于用户直观、便捷地实现对按照第一模式显示的第一消息的发送操作,并能够避免误触发。Optionally, in some embodiments of the present invention, the second receiving module 730 may include a first receiving unit, and the second processing module 740 may include a first processing unit. In this way, the The sending operation of the first message displayed in one mode can avoid false triggering.
第一接收单元,用于接收用户对进度条上的滑块的第二输入,第二输入 用于控制滑块移动;The first receiving unit is configured to receive a second input from the user to the slider on the progress bar, and the second input is used to control the movement of the slider;
第一处理单元,用于在滑块移动至进度条上的目标位置的情况下,将第一消息发送至目标接收端,并按照第二模式显示第一消息。The first processing unit is configured to send the first message to the target receiving end when the slider moves to the target position on the progress bar, and display the first message according to the second mode.
可选地,在本发明一些实施例中,为提升人机交互体验以及操作便捷性,电子设备700还可以包括:第三接收模块和第三处理模块。Optionally, in some embodiments of the present invention, in order to improve the human-computer interaction experience and operation convenience, the electronic device 700 may further include: a third receiving module and a third processing module.
第三接收模块,用于接收用户对进度条的第三输入;The third receiving module is used to receive the third input of the user on the progress bar;
第三处理模块,用于响应于第三输入,删除聊天信息区域中显示的第一消息。The third processing module is configured to delete the first message displayed in the chat information area in response to the third input.
可选地,在本发明一些实施例中,为便于用户知悉第一消息的发送情况,第二处理模块740可以包括:第二接收单元和第二处理单元,以便于用户知悉第一消息的发送情况。Optionally, in some embodiments of the present invention, in order to facilitate the user to know the sending of the first message, the second processing module 740 may include: a second receiving unit and a second processing unit, so that the user can know the sending of the first message Happening.
第二接收单元,用于在将第一消息经服务器发送至目标接收端的情况下,接收服务器发送的反馈消息;The second receiving unit is configured to receive the feedback message sent by the server when the first message is sent to the target receiving end via the server;
第二处理单元,用于在反馈消息指示第一消息已发送至目标接收端的情况下,在即时通讯显示界面的聊天信息区域上,将第一消息按照第二模式显示于第二消息之后;The second processing unit is configured to display the first message after the second message in the second mode on the chat information area of the instant messaging display interface when the feedback message indicates that the first message has been sent to the target receiving end;
其中,第二消息为发送第一输入至目标接收端之前的最后一次已发送的消息。Wherein, the second message is the last sent message before sending the first input to the target receiving end.
可选地,在本发明一些实施例中,为便于用户查看预设时间段内尚未发送的第一消息,电子设备700还可以包括:第四接收模块和显示模块。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 a preset time period, the electronic device 700 may further include: a fourth receiving module and a display module.
第四接收模块,用于接收用户的第四输入;The fourth receiving module is used to receive the fourth input of the user;
显示模块,用于响应于第四输入,显示预设时间段内按照第一模式显示的至少一条待发送消息。The display module is configured to display at least one message to be sent displayed in the first mode within a preset time period in response to the fourth input.
可选地,在本发明一些实施例中,为提升用户操作便捷性,第一接收模块710可以包括:第三接收单元。Optionally, in some embodiments of the present invention, in order to improve user operation convenience, the first receiving module 710 may include: a third receiving unit.
第三接收单元,用于接收用户对即时通讯显示界面的信息输入区域中所输入的第一消息的拖动输入,拖动输入用于将第一消息由信息输入区域拖动至预设的第二区域。The third receiving unit is configured to receive a user's drag input of the first message input in the information input area of the instant messaging display interface, and the drag input is used to drag the first message from the information input area to the preset first message Two areas.
本发明实施例提供的电子设备能够实现图1至图5的应用于电子设备的 方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。The electronic device provided by the embodiment of the present invention can implement the various processes implemented by the electronic device in the method embodiments applied to the electronic device in FIG. 1 to FIG. 5, and in order to avoid repetition, details are not described herein again.
本发明实施例提供的电子设备,通过电子设备接收并响应于对编辑完毕的第一消息的第一输入,按照第一模式显示第一消息,通过电子设备接收并响应于对第一消息的第二输入,将第一消息发送至目标接收端,并按照第二模式显示第一消息,从而实现对即时通讯消息的草稿缓存,简化了用户对即时通讯消息的缓存操作,同时可以避免影响其他即时通讯消息的输入,提升了即时通讯质量。The electronic device provided by the embodiment of the present invention receives and responds to the first input of the edited first message through the electronic device, displays the first message according to the first mode, and receives and responds to the first message to the first message through the electronic device. Two input, send the first message to the target receiving end, and display the first message in the second mode, so as to realize the draft cache of instant messaging messages, simplify the user's cache operation of instant messaging messages, and avoid affecting other instant messaging messages. The input of communication messages improves the quality of instant communication.
基于上述应用于服务器的方法,本发明实施例提供一种用以实现上述方法的服务器。请参见图8,其示出的是本发明实施例提供的服务器的结构示意图,本发明实施例提供一种服务800,可以包括:第五接收模块810和第四处理模块820。这样,能够实现对即时通讯消息的草稿缓存,简化了用户对即时通讯消息的缓存操作,同时可以避免影响其他即时通讯消息的输入。Based on the foregoing method applied to a server, an embodiment of the present invention provides a server for implementing the foregoing method. Please refer to FIG. 8, which shows a schematic structural diagram of a server provided in an embodiment of the present invention. The embodiment of the present invention provides a service 800 that may include: a fifth receiving module 810 and a fourth processing module 820. In this way, draft caching of instant messaging messages can be implemented, which simplifies the user's caching operation of instant messaging messages, and at the same time avoids affecting the input of other instant messaging messages.
第五接收模块810,用于接收电子设备发送的第一消息;The fifth receiving module 810 is configured to receive the first message sent by the electronic device;
第四处理模块820,用于缓存第一消息,并将第一消息设置为延迟发送状态。The fourth processing module 820 is configured to buffer the first message and set the first message to a delayed sending state.
可选地,在本发明一些实施例中,第四处理模块820可以包括:第三处理单元,以便于服务器对第一消息和其他执行发送的即时通讯消息进行区分处理。Optionally, in some embodiments of the present invention, the fourth processing module 820 may include: a third processing unit, so that the server can distinguish between the first message and other instant messaging messages to be sent.
第三处理单元,用于在第一消息携带预设的状态标识的情况下,缓存第一消息,并将第一消息设置为延迟发送状态,状态标识用于指示服务器延迟发送第一消息至目标接收端。The third processing unit is configured to buffer the first message when the first message carries a preset status identifier, and set the first message to a delayed sending state, and the status identifier is used to instruct the server to delay sending the first message to the target Receiving end.
较优地,在本发明一些实施例中,可以预先约定有用于指示服务器延迟发送第一消息的特征码,然后服务器即可通过检测第一信息的信息编码中是否存在特征码的方式来实现是否对第一消息进行延迟发送处理。也就是说,本发明实施例中,状态标识可以包括预设的特征码;则第三处理单元可以包括:处理子单元,利于服务器在接收到第一消息之后能够准确确定对第一消息的延迟处理方式。Preferably, in some embodiments of the present invention, a feature code used to instruct the server to delay sending the first message can be pre-appointed, and then the server can detect whether the feature code exists in the information code of the first information to realize whether Delay the sending of the first message. That is to say, in the embodiment of the present invention, the status identifier may include a preset feature code; the third processing unit may include: a processing sub-unit, so that the server can accurately determine the delay to the first message after receiving the first message Processing method.
处理子单元,用于在第一消息的信息编码中包括预设的特征码的情况下,缓存第一消息,并将第一消息设置为延迟发送状态。The processing subunit is configured to buffer the first message and set the first message to a delayed sending state when the information code of the first message includes a preset feature code.
可选地,在本发明一些实施例中,服务器800还可以包括:发送模块。Optionally, in some embodiments of the present invention, the server 800 may further include: a sending module.
发送模块,用于在接收到电子设备发送的第一请求消息的情况下,将第一消息发送至目标接收端;A sending module, configured to send the first message to the target receiving end when the first request message sent by the electronic device is received;
第一请求消息用于指示服务器将第一消息发送至目标接收端。The first request message is used to instruct the server to send the first message to the target receiver.
可选地,在本发明一些实施例中,为便于用户知悉第一消息的发送情况,服务器800还可以包括:反馈模块。Optionally, in some embodiments of the present invention, in order to facilitate the user to know the sending situation of the first message, the server 800 may further include: a feedback module.
反馈模块,用于在将第一消息发送至目标接收端的情况下,向电子设备发送反馈消息,反馈消息包括指示第一消息已发送至目标接收端的消息和指示第一消息未成功发送至目标接收端的消息。The feedback module is used to send a feedback message to the electronic device when the first message is sent to the target receiver, the feedback message includes a message indicating that the first message has been sent to the target receiver and a message indicating that the first message was not successfully sent to the target receiver End of the message.
本发明实施例提供的服务器能够实现图6的应用于服务器的方法实施例中服务器实现的各个过程,为避免重复,这里不再赘述。The server provided by the embodiment of the present invention can implement the various processes implemented by the server in the embodiment of the method applied to the server in FIG. 6. To avoid repetition, details are not described herein again.
本发明实施例提供的服务器,通过服务器接收电子设备发送的第一消息,缓存第一消息,并将第一消息设置为延迟发送状态,从而实现对即时通讯消息的草稿缓存,简化了用户对即时通讯消息的缓存操作,同时可以避免影响其他即时通讯消息的输入,提升了即时通讯质量和用户使用体验。The server provided by the embodiment of the present invention receives the first message sent by the electronic device through the server, buffers the first message, and sets the first message to the delayed sending state, thereby realizing the draft cache of the instant messaging message, which simplifies the user’s instant messaging The caching operation of communication messages can also avoid affecting the input of other instant communication messages, which improves the quality of instant communication and user experience.
可选地,本发明实施例还提供一种服务器,包括处理器,存储器,存储在存储器上并可在处理器上运行的计算机程序,该计算机程序被处理器执行时实现上述应用于服务器的消息处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, an embodiment of the present invention also provides a server, including a processor, a memory, and a computer program stored in the memory and running on the processor. When the computer program is executed by the processor, the message applied to the server is realized. Each process of the embodiment of the processing method can achieve the same technical effect. In order to avoid repetition, it will not be repeated here.
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述应用于服务器的消息处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned message processing method embodiment applied to a server is realized, and can To achieve the same technical effect, in order to avoid repetition, I will not repeat them here.
图9为实现本发明各个实施例的一种电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of the hardware structure of an electronic device implementing various embodiments of the present invention.
该电子设备900包括但不限于:射频单元901、网络模块902、音频输出单元903、输入单元904、传感器905、显示单元906、用户输入单元907、接口单元908、存储器909、处理器910、以及电源911等部件。本领域技术人员可以理解,图9中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部 件布置。在本发明实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、以及计步器等。The electronic device 900 includes, but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, a processor 910, and Power 911 and other components. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 9 does not constitute a limitation on the electronic device. The electronic device may include more or less components than those shown in the figure, or a combination of certain components, or different components. Layout. In the embodiments of the present invention, electronic devices include, but are not limited to, mobile phones, tablet computers, notebook computers, palmtop computers, in-vehicle electronic devices, wearable devices, and pedometers.
其中,用户输入单元907,用于在用户对待发送的第一消息编辑完毕后,接收用户对第一消息的第一输入;处理器910,用于响应于第一输入,控制显示单元906按照第一模式显示第一消息;用户输入单元907,用于接收用户对按照第一模式显示的第一消息的第二输入;处理器910,用于响应于第二输入,控制射频单元901将第一消息发送至目标接收端,并控制显示单元906按照第二模式显示第一消息。本发明实施例中,能够实现对即时通讯消息的草稿缓存,简化了用户对即时通讯消息的缓存操作,同时可以避免影响其他即时通讯消息的输入,提升了即时通讯质量。The user input unit 907 is configured to receive the user's first input of the first message after the user has edited the first message to be sent; the processor 910 is configured to control the display unit 906 according to the first input in response to the first input. The first message is displayed in a mode; the user input unit 907 is configured to receive a second input of the user to the first message displayed in the first mode; the processor 910 is configured to control the radio frequency unit 901 to display the first message in response to the second input The message is sent to the target receiving end, and the display unit 906 is controlled to display the first message in the second mode. In the embodiment of the present invention, draft caching of instant messaging messages can be realized, which simplifies the user's caching operation of instant messaging messages, and can avoid affecting the input of other instant messaging messages, thereby improving the quality of instant messaging.
应理解的是,本发明实施例中,射频单元901可用于收发信息或通话过程中,信号的接收和发送,具体地,将来自基站的下行数据接收后,给处理器910处理;另外,将上行的数据发送给基站。通常,射频单元901包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元901还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in this embodiment of the present invention, the radio frequency unit 901 can be used to receive and send signals during information transmission or communication. Specifically, the downlink data from the base station is received and processed by the processor 910; in addition, Uplink data is sent to the base station. Generally, the radio 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, the radio frequency unit 901 can also communicate with the network and other devices through a wireless communication system.
电子设备通过网络模块902为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The electronic device provides users with wireless broadband Internet access through the network module 902, such as helping users to send and receive emails, browse web pages, and access streaming media.
音频输出单元903可以将射频单元901或网络模块902接收的或者在存储器909中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元903还可以提供与电子设备900执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元903包括扬声器、蜂鸣器以及受话器等。The audio output unit 903 can convert the audio data received by the radio frequency unit 901 or the network module 902 or stored in the memory 909 into an audio signal and output it as sound. Moreover, the audio output unit 903 may also provide audio output related to a specific function performed by the electronic device 900 (for example, call signal reception sound, message reception sound, etc.). The audio output unit 903 includes a speaker, a buzzer, a receiver, and the like.
输入单元904用于接收音频或视频信号。输入单元904可以包括图形处理器(Graphics Processing Unit,GPU)9041和麦克风9042,图形处理器9041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元906上。经图形处理器9041处理后的图像帧可以存储在存储器909(或其它存储介质)中或者经由射频单元901或网络模块902进行发送。麦克风9042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以 在电话通话模式的情况下转换为可经由射频单元901发送到移动通信基站的格式输出。The input unit 904 is used to receive audio or video signals. The input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042. The graphics processor 9041 is configured to provide an image of a still picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The data is processed. The processed image frame may be displayed on the display unit 906. The image frames processed by the graphics processor 9041 may be stored in the memory 909 (or other storage medium) or sent via the radio frequency unit 901 or the network module 902. The microphone 9042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 901 in the case of a telephone call mode for output.
电子设备900还包括至少一种传感器905,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板9061的亮度,接近传感器可在电子设备900移动到耳边时,关闭显示面板9061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器905还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The electronic device 900 also includes at least one sensor 905, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 9061 according to the brightness of the ambient light. The proximity sensor can close the display panel 9061 and the display panel 9061 when the electronic device 900 is moved to the ear. / Or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of electronic devices (such as horizontal and vertical screen switching, related games) , Magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; sensor 905 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.
显示单元906用于显示由用户输入的信息或提供给用户的信息。显示单元906可包括显示面板9061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板9061。The display unit 906 is used to display information input by the user or information provided to the user. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
用户输入单元907可用于接收输入的数字或字符信息,以及产生电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元907包括触控面板9071以及其他输入设备9072。触控面板9071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板9071上或在触控面板9071附近的操作)。触控面板9071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器910,接收处理器910发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板9071。除了触控面板9071,用户输入单元907还可以包括其他输入设备9072。具体地,其他输入设备9072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 907 may be used to receive inputted numeric or character information, and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 907 includes a touch panel 9071 and other input devices 9072. The touch panel 9071, also called a touch screen, can collect the user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 9071 or near the touch panel 9071. operating). The touch panel 9071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 910, the command sent by the processor 910 is received and executed. In addition, the touch panel 9071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 9071, the user input unit 907 may also include other input devices 9072. Specifically, other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be repeated here.
进一步地,触控面板9071可覆盖在显示面板9061上,当触控面板9071检测到在其上或附近的触摸操作后,传送给处理器910以确定触摸事件的类型,随后处理器910根据触摸事件的类型在显示面板9061上提供相应的视觉输出。虽然在图9中,触控面板9071与显示面板9061是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板9071与显示面板9061集成而实现电子设备的输入和输出功能,具体此处不做限定。Further, the touch panel 9071 can cover the display panel 9061. When the touch panel 9071 detects a touch operation on or near it, it is transmitted to the processor 910 to determine the type of the touch event, and then the processor 910 determines the type of the touch event according to the touch. The type of event provides corresponding visual output on the display panel 9061. Although in FIG. 9, the touch panel 9071 and the display panel 9061 are used as two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 9071 and the display panel 9061 can be integrated The implementation of the input and output functions of the electronic device is not specifically limited here.
接口单元908为外部装置与电子设备900连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元908可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到电子设备900内的一个或多个元件或者可以用于在电子设备900和外部装置之间传输数据。The interface unit 908 is an interface for connecting an external device and the electronic device 900. For example, the external device may include a wired or wireless headset port, an external power source (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) port, video I/O port, headphone port, etc. The interface unit 908 can be used to receive input (for example, data information, power, etc.) from an external device and transmit the received input to one or more elements in the electronic device 900 or can be used to connect the electronic device 900 to an external device. Transfer data between devices.
存储器909可用于存储软件程序以及各种数据。存储器909可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器909可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a storage program area and a storage data area. The storage program area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc. In addition, the memory 909 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
处理器910是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器909内的软件程序和/或模块,以及调用存储在存储器909内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器910可包括一个或多个处理单元;优选地,处理器910可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器910中。The processor 910 is the control center of the electronic device, which uses various interfaces and lines to connect the various parts of the entire electronic device, runs or executes software programs and/or modules stored in the memory 909, and calls data stored in the memory 909 , Perform various functions of electronic equipment and process data, so as to monitor the electronic equipment as a whole. The processor 910 may include one or more processing units; preferably, the processor 910 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc., and the modem The processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 910.
电子设备900还可以包括给各个部件供电的电源911(比如电池),优选地,电源911可以通过电源管理系统与处理器910逻辑相连,从而通过电源 管理系统实现管理充电、放电、以及功耗管理等功能。The electronic device 900 may also include a power source 911 (such as a battery) for supplying power to various components. Preferably, the power source 911 may be logically connected to the processor 910 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. And other functions.
另外,电子设备900包括一些未示出的功能模块,在此不再赘述。In addition, the electronic device 900 includes some functional modules that are not shown, which will not be repeated here.
可选地,本发明实施例还提供一种电子设备,包括处理器910,存储器909,存储在存储器909上并可在处理器910上运行的计算机程序,该计算机程序被处理器910执行时实现上述应用于电子设备的消息处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, an embodiment of the present invention also provides an electronic device, including a processor 910, a memory 909, and a computer program stored in the memory 909 and running on the processor 910. The computer program is executed when the processor 910 is executed. Each process of the above-mentioned message processing method embodiment applied to an electronic device can achieve the same technical effect. In order to avoid repetition, it will not be repeated here.
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述应用于电子设备的消息处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned message processing method embodiment applied to an electronic device is realized, and To achieve the same technical effect, in order to avoid repetition, I will not repeat them here. Wherein, the computer-readable storage medium, such as read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk, or optical disk, etc.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, It also includes other elements not explicitly listed, or elements inherent to the process, method, article, or device. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or device that includes the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台电子设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of the present invention essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make an electronic device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present invention.
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。The embodiments of the present invention are described above with reference to the accompanying drawings, but the present invention is not limited to the above-mentioned specific embodiments. The above-mentioned specific embodiments are only illustrative and not restrictive. Those of ordinary skill in the art are Under the enlightenment of the present invention, many forms can be made without departing from the purpose of the present invention and the scope of protection of the claims, all of which fall within the protection of the present invention.