WO2020014900A1 - 一种消息的显示方法及终端 - Google Patents

一种消息的显示方法及终端 Download PDF

Info

Publication number
WO2020014900A1
WO2020014900A1 PCT/CN2018/096151 CN2018096151W WO2020014900A1 WO 2020014900 A1 WO2020014900 A1 WO 2020014900A1 CN 2018096151 W CN2018096151 W CN 2018096151W WO 2020014900 A1 WO2020014900 A1 WO 2020014900A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
terminal
time
character
characters
Prior art date
Application number
PCT/CN2018/096151
Other languages
English (en)
French (fr)
Inventor
黄岩
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/096151 priority Critical patent/WO2020014900A1/zh
Priority to CN201880075198.6A priority patent/CN111373703B/zh
Priority to US17/260,910 priority patent/US11310177B2/en
Publication of WO2020014900A1 publication Critical patent/WO2020014900A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units

Definitions

  • the present application relates to the field of terminals, and in particular, to a method and a terminal for displaying a message.
  • RTT real time text
  • a chat scenario when user A's terminal receives a message from user B's terminal, every character entered by user B on his own terminal can be displayed on user A's terminal in real time, and user A does not need to wait for user B's input. After you complete the message and press the Send button, you can see the specific content of the message on the terminal of user A.
  • the left side is the terminal of user A
  • the right side is the terminal of user B.
  • Two users can send messages to each other using the same chat application. Take user B who wants to enter the complete message 1 of "hello, nice to meet you" as an example. As shown in (a) of FIG. 1, user B enters "hello, nice to" in the input box 101. , User A's terminal can display every character entered by User B in real time. If before the user B enters the complete message 1, the terminal of the user A sends the message "Oh" entered by the user A, as shown in (b) of Fig.
  • the message 2 displayed on the terminal of the user A It is located after the message 1, but since the user B has not finished inputting the message 1, only the message 2 sent from the user A is displayed in the dialog area 102 displayed on the terminal of the user B.
  • the terminal of user B displays message 1 on the basis of the time when user B clicks send button 103.
  • the terminal uses the time of receiving the first character in message 1 as the time for receiving message 1, and for the message sent by the terminal (for example, on the terminal of user B Message 1), the terminal uses the time when the user clicks the send button after entering the message 1 as the message 1 sending time. Furthermore, the terminal can display each message in the message box in the chronological order of the reception time and the transmission time. This makes the same message (for example, the above message 1) have different display orders on the terminals of user A and user B, cannot effectively reflect the timing relationship of the chat process, and affects the input efficiency of the user when chatting.
  • the present application provides a message display method and a terminal, which can display the true timing relationship between multiple messages on the terminal, thereby improving the input efficiency and user experience when the user chats on the terminal.
  • the present application provides a method for displaying a message, including: a first terminal displaying a chat interface with a second terminal, the chat interface including an input box and a dialog area; the first terminal receiving a user request at a first moment
  • the first character of the first message entered in the input box (the first message includes X characters, X is an integer greater than 0), that is, the input time of the first character in the first message is the first time mentioned above; and
  • the terminal can send the characters entered by the user in the input box to the second terminal in real time from the first moment; subsequently, the first terminal receives the first time sent by the second terminal at the second moment (the second moment is later than the first moment).
  • the first character of the two messages (the second message includes Y characters, where Y is an integer greater than 0), that is, the reception time of the first character in the second message is the above-mentioned second time; further, the first terminal is at the third time ( The third time is later than the second time) a first preset character (such as a character of a line feed key) input by the user into the input box is received, and the first preset character is used to indicate the end of the first message sent this time;
  • a first preset character such as a character of a line feed key
  • the first terminal displays the first message and the second message in the dialog area
  • the first message may be displayed as an earlier message than the second message.
  • the order of the messages displayed by the first terminal in the conversation area is arranged according to the time when the user initiates the chat, and the timing relationship between the messages will not be disordered, so that multiple messages are displayed on the terminal. The correct timing relationship between them to improve the input efficiency and user experience when users use the terminal chat.
  • the sending time of the first message is the first time (that is, the input time of the first character in the first message)
  • the receiving time of the second message is the second time (that is, the first time in the second message). Character received time).
  • the first terminal may further receive X-1 characters except the first character in the first message input by the user into the input box. ; At this time, the first terminal displays the first message in the dialog area, which specifically includes: when each of the X characters is displayed in the input box, the first terminal synchronously displays the character in the dialog area. First message box. In this way, when the user inputs the first message sent to the second terminal this time in the input box, the user can see the first message displayed synchronously in the dialog area in real time.
  • the first terminal After the first terminal receives the first preset character input by the user into the input box at the third moment, since the first preset character is used to instruct the user to input this time in the input box The first message ends, so the first terminal can clear all characters in the input box in response to the input of the preset character. Subsequently, when the first terminal detects that the user inputs a new character in the input box, the character may be used as the first character of the next message to be sent.
  • the method further includes: the first terminal receives the second character sent by the second terminal at the fourth moment.
  • a preset character and the second preset character is used to indicate the end of the second message sent by the second terminal this time. Subsequently, if the first terminal receives a new character from the second terminal, the first terminal may use the new character as the first character in the next received message.
  • the first terminal may further receive Y-1 characters except the first character in the second message sent by the second terminal; At this time, the first terminal displays the second message in the dialog area, which specifically includes: each time the first terminal receives one of the Y characters, the first terminal may simultaneously display the character in the dialog area. Second message box. That is, before the first terminal receives the second preset character used to indicate the end of the second message, the first terminal may simultaneously display the second message sent by the second terminal in the dialog area.
  • the first terminal may display the second message as the latest message in the conversation area, and the first terminal may further display the second message.
  • the message is being entered at this time. That is, before the first terminal receives the second preset character indicating the end of the second message, because the second message sent by the other party has not ended, the user's focus is on the specific content in the second message, so The first terminal may display the second message being input as the current latest message, so as to prevent the second message from being overwhelmed by other messages whose sending time is later than the receiving time of its first character.
  • the first terminal may display the third message as an earlier message than the second message in the dialogue area, that is, the latest message at this time is still the second message.
  • the first terminal After the first terminal receives the second preset character sent by the second terminal at the fourth moment, it indicates that the second message sent by the second terminal this time has ended. Then, the first terminal The display order of the third message and the second message may be rearranged according to the reception time of the first character in the second message and the input time of the first character in the third message in the above-mentioned dialog area, and the updated third message is displayed to be longer than the second message. Messages later, thereby restoring the actual timing relationship between chat messages in the conversation area.
  • the sending time of the first message and the receiving time of the second message may also be displayed in the dialogue area.
  • the present application provides a method for displaying a message, including: a first terminal displaying a chat interface with a second terminal, the chat interface including a conversation area; and the first terminal receiving The first character of the first message (the first message includes Y characters, where Y is an integer greater than 0); subsequently, the first terminal may receive Y-1 other than the first character in the first message sent by the second terminal Character; when the first terminal receives one of the above Y characters, because the first message sent by the other party has not ended, the user's focus is on the specific content of the first message, so the first terminal can The entered first message is displayed as the current latest message, so that the first message is not overwhelmed by other messages whose sending time is later than the receiving time of the first character.
  • the method further includes: the first terminal is at a second time (the second time is later than the first time) Time) A preset character sent by the second terminal is received, and the preset character is used to indicate the end of the first message sent by the second terminal this time. Subsequently, if the first terminal receives a new character from the second terminal, the first terminal may use the new character as the first character in the next received message.
  • the first terminal can display the second message as an earlier message than the first message in the above conversation area, that is, the latest message at this time is still The first message.
  • the first terminal may receive the first character in the first message and the first character in the second message in the dialogue area.
  • the display of the input time is updated so that the first message is displayed as an earlier message than the second message, thereby restoring the actual timing relationship between the chat messages in the conversation area.
  • the present application provides a message display method, including: a first terminal displaying a chat interface with a second terminal, the chat interface including an input box and a dialogue area; the first terminal receiving the first message input by the user and real-time Send to the second terminal, the first terminal may display the first message box corresponding to the first message in the above-mentioned dialog area according to the input time of the first character in the first message, and in the first message box (and (Or input box), update and display the content of the first message until a preset character indicating the end of the first message is received; in addition, the first terminal may also receive a second message sent by the second terminal, and further, based on the second message When the first Chinese character is received, the second message box corresponding to the second message is displayed in the above conversation area, and the content of the received second message is displayed in real time in the second message box, where the first message box and the second message box
  • the display order of the message boxes in the dialog area is consistent with the relationship between the input time of the first character of the
  • updating and displaying the content of the first message until receiving a preset character indicating the end of the first message specifically includes: The first message box and the input box display the content of the first message input by the user in real time.
  • displaying the content of the first message in the first message box and / or the input box as the user inputs and updates until receiving a preset character indicating the end of the first message specifically includes: upon receiving the instruction indicating the first message Before the end of the preset character, only the first character of the first message is displayed in the first message box. However, the content of the first message may be updated and displayed in the input box as the user enters until the end of the first message is received. After receiving the preset character indicating the end of the first message, all the contents of the first message are displayed in the first message box, and all characters of the first message in the input box are cleared.
  • the present application provides a message display method, including: a first terminal displaying a chat interface with a second terminal, the chat interface including an input box and a dialogue area; the first terminal receiving the first message input by the user and real-time Send to the second terminal, the first terminal may display the first message box corresponding to the first message in the above-mentioned dialog area according to the input time of the first character of the first message, and in the first message box (and // Or input box), update and display the content of the first message until a predetermined character indicating the end of the first message is received; in addition, the first terminal may also receive the second message sent by the second terminal, and the first character of the second message The receiving time is earlier than the input time of the first character of the first message;
  • the first terminal Before receiving the preset character indicating the end of the second message, because the second message sent by the other party has not ended, the user's focus is on the specific content in the second message, so the first terminal can change the first message corresponding to the second message.
  • the two message boxes are displayed as message boxes of the latest message, and the content of the received second message is displayed in real time in the second message box; after receiving a preset character indicating the end of the second message, the first terminal may The receiving time of the first character of the first message, and the second message box corresponding to the second message is updated and displayed in the dialogue area, so that the display order of the first message box and the second message box in the dialogue area and the input time of the first character of the first message The relationship is consistent with the reception time of the first character of the second message, thereby restoring the actual timing relationship between the chat messages in the conversation area.
  • the present application provides a terminal, including: a touch screen, one or more processors, a memory, and one or more programs; wherein the processor is coupled to the memory, and the one or more programs are stored in the memory
  • the processor executes one or more programs stored in the memory, so that the terminal executes any one of the foregoing message display methods.
  • an embodiment of the present application provides a graphical user interface (GUI) on a terminal.
  • the terminal includes a touch screen, one or more processors, a memory, and one or more programs.
  • the graphical user interface includes a user interface according to any of the foregoing. User interface displayed by a message display method.
  • the present application provides a computer storage medium including computer instructions, and when the computer instructions are run on a terminal, the terminal causes the terminal to execute the data recovery method when the terminal restores factory settings according to any one of the foregoing.
  • the present application provides a computer program product that, when the computer program product runs on a computer, causes the computer to execute the data recovery method when the terminal restores factory settings according to any one of the above.
  • the terminal described in the fifth aspect, the graphical user interface described in the sixth aspect, the computer storage medium described in the seventh aspect, and the computer program product described in the eighth aspect are used to execute the above.
  • the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, which will not be repeated here.
  • FIG. 1 is a schematic diagram of a message sending and receiving process in an RTT scenario in the prior art
  • FIG. 2 is a first schematic scenario of a message display method according to an embodiment of the present application.
  • FIG. 3 is a first schematic structural diagram of a terminal according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an operating system in a terminal according to an embodiment of the present application.
  • FIG. 5 is a schematic interaction diagram of a method for displaying a message according to an embodiment of the present application.
  • FIG. 6 is a second scenario diagram of a message display method according to an embodiment of the present application.
  • FIG. 7 is a third scenario diagram of a message display method according to an embodiment of the present application.
  • FIG. 8 is a fourth schematic scenario diagram of a message display method according to an embodiment of the present application.
  • FIG. 9 is a fifth schematic scenario diagram of a message display method according to an embodiment of the present application.
  • FIG. 10 is a sixth schematic scenario diagram of a message display method according to an embodiment of the present application.
  • FIG. 11 is a schematic view 7 of a method for displaying a message according to an embodiment of the present application.
  • FIG. 12 is a schematic diagram 8 of a method for displaying a message according to an embodiment of the present application.
  • FIG. 13 is a schematic diagram IX of a method for displaying a message according to an embodiment of the present application.
  • FIG. 14 is a second schematic structural diagram of a terminal according to an embodiment of the present application.
  • FIG. 15 is a third schematic structural diagram of a terminal according to an embodiment of the present application.
  • the message display method provided in the embodiment of the present application can be applied to a chat scene composed of at least two terminals.
  • user A uses a chat application in terminal 100 to chat with user B
  • user B uses the same chat application in terminal 200 to communicate with user A. to chat with.
  • the terminal 100 and the terminal 200 may establish a communication connection through a base station or a server, and may also establish a communication connection through Wi-Fi (wireless-fidelity, wireless fidelity) or Bluetooth.
  • Wi-Fi wireless-fidelity, wireless fidelity
  • Bluetooth wireless-fidelity
  • the above chat application may be an instant messaging application or an application such as a short message, which is not limited in the embodiment of the present invention.
  • the messages generated when user A chats with user B include both sent messages and received messages.
  • the message sent by user A to terminal 200 using terminal 100 is a send message
  • the message received by terminal 100 from terminal 200 is a receive message
  • user B uses terminal 200 to send a message to terminal 100.
  • the message is a sending message
  • the message received by the terminal 200 from the terminal 100 is a receiving message.
  • terminal 100 uses terminal 100 to send a message to user B's terminal 200.
  • terminal 100 displays the information including the operator information, the Bluetooth function on flag, the network system, time, and power status.
  • the chat interface with user B includes the name and avatar information of user B, a first input box 201, a first dialog area 202, and a first virtual keyboard 203.
  • the first dialog area 202 is used to display the sending message and the receiving message of the terminal 100
  • the first input box 201 is used to display the sending message input by the user A this time.
  • the first virtual keyboard 203 may be closed.
  • the chat interface with the user A displayed by the terminal 200 may also include a second input box 204, a second dialog area 205, a second virtual keyboard (not shown in (b) in FIG. 2), and the like.
  • the example does not place any restrictions on this.
  • the terminal 100 when the terminal 100 detects that the user A inputs one or more characters into the first input box 201 through voice or a key, the terminal 100 may record the first Character input time (for example, "H" input time), and the terminal 100 may create a message box in the first dialog area 202, and synchronously display the characters received in the first input box 201 (that is, send Message 1).
  • the sending time of sending message 1 is the input time of the first character “H” in sending message 1.
  • the message box created by the terminal 100 for the above-mentioned sending message 1 in the first conversation area 202 may be a bubble, and the terminal 100 may display each character entered by the user A in the first input box 201 one by one in the bubble.
  • the terminal 100 presets one or more preset characters (for example, characters of an enter key or a line feed key), and the preset characters are used to indicate that the sending message input by the user this time has ended. If the terminal 100 receives the above-mentioned preset character input by the user A in the first input box 201, the terminal 100 can clear all contents in the first input box 201, and at this time the sending message 1 displayed in the first dialog area 202 The content in will not change again.
  • the terminal 100 may also send these characters to the terminal 200 in real time according to the user's input order. For example, once the user A finishes entering a character, the terminal 100 sends the character to the terminal 200.
  • the terminal 100 may sequentially receive the “H” received , "E”, “l", “l”, and "o” are sent to the terminal 200.
  • the terminal 200 When the terminal 200 receives the first character "H" from the terminal 100, it can record the reception time of the first character. Further, as shown in FIG. 2 (b), the terminal 200 can set the reception time of the first character "H” As the receiving time for receiving message 1, and create a message box in the second dialog area 204, the terminal 200 can synchronously display the characters sent by the terminal 100, so that the user B can see the user A's Coming news.
  • the terminal 200 When the terminal 200 receives a preset character sent from the terminal 100, such as the character of a line feed key (/ n), it can be considered that the content in the received message 1 sent by the terminal 100 has ended. The contents of the received message 1 will not change. Subsequently, if the terminal 200 receives a new character from the terminal 100, the terminal 200 may record and display the new character as the first character in the next received message.
  • a preset character sent from the terminal 100 such as the character of a line feed key (/ n)
  • the terminal 200 may record and display the new character as the first character in the next received message.
  • the terminal 100 sends a message to the terminal 200, and the terminal 200 receives the message as an example of the receiving end. It can be understood that the terminal 100 can also receive the message sent by the terminal 200 as the receiving end. Message, this embodiment of the application does not make any restrictions on this.
  • the terminal when the terminal sends a message, the input time of the first character in the message is used as the sending time of the message, and the input time of the first character in the sending message can reflect that the user on the sending end initiates a chat time.
  • the terminal displays multiple sent messages the multiple sent messages can be sorted according to the sequence of the sending time of each message.
  • the reception time of the first character in the message is used as the reception time of the message, and the reception time of the first character in the received message can reflect the time when the user at the receiving end initiates a chat.
  • the terminal displays multiple received and sent messages, the multiple received messages can be sorted according to the sequence of the receiving time of each message.
  • the order of each message displayed by the terminal in the conversation area is arranged according to the time when the user initiates the chat, and the timing relationship between the messages will not be disordered, so that multiple messages are displayed on the terminal. Correct timing relationships to improve user input efficiency and user experience when using terminal chat.
  • the chat scenario shown in (a)-(b) in FIG. 2 can be regarded as a typical application scenario in the RTT technology.
  • the RTT technology means that when a text message to be transmitted is created or input, once a character input by a user is received, the character can be immediately sent (for example, within a fraction of a second) and displayed to the receiving end. This means that the user at the receiving end can read the text entered by the sender while the sender is entering text information. In this way, real-time text has the same conversational directivity and interactivity as voice.
  • RTT technology related standards have been introduced in multiple protocols such as multimedia application text conversation protocol (protocol for multimedia application text conversation).
  • a deaf person can use a text phone application that supports RTT technology to display the voice or text information input by the other party in real time in the form of text through RTT technology.
  • a message input by each user in the group can also be displayed in real time through RTT technology.
  • the message display method provided in the embodiment of the present application can be applied to various application scenarios of the RTT technology, and the embodiment of the present application does not place any limitation on this.
  • the terminal 100 and the terminal 200 in the above embodiments may specifically be mobile phones, tablet computers, desktops, laptops, laptops, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, Personal digital assistants (personal digital assistants, PDAs), wearable electronic devices, virtual reality devices, and the like, the specific form of the terminal is not particularly limited in the embodiments of the present application.
  • UMPCs ultra-mobile personal computers
  • PDAs personal digital assistants, PDAs
  • wearable electronic devices virtual reality devices, and the like
  • the specific form of the terminal is not particularly limited in the embodiments of the present application.
  • FIG. 3 is a structural block diagram of the terminal 100 and the terminal 200 in the above embodiment.
  • the terminal 100 and the terminal 200 may include a processor 110, an external memory interface 120, an internal memory 121, an antenna 1, an antenna 2, a radio frequency module 150, a communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, and a headphone interface 170D.
  • the structures illustrated in the embodiments of the present invention do not limit the terminal 100 and the terminal 200. It may include more or fewer parts than shown, or some parts may be combined, or some parts may be split, or different parts may be arranged.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU) Wait.
  • AP application processor
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • DSP digital signal processor
  • NPU neural network processing unit
  • different processing units may be independent devices or integrated in one or more processors.
  • the wireless communication function of the terminal 100 and the terminal 200 may be implemented by the antenna module 1, the antenna module 2 radio frequency module 150, the communication module 160, a modem, a baseband processor, and the like.
  • the antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals.
  • Each antenna in the terminal 100 and the terminal 200 may be used to cover a single or multiple communication frequency bands. Different antennas can be multiplexed to improve antenna utilization. For example, a cellular network antenna can be multiplexed into a wireless LAN diversity antenna. In some embodiments, the antenna may be used in conjunction with a tuning switch.
  • the radio frequency module 150 may provide a communication processing module for a wireless communication solution including 2G / 3G / 4G / 5G and the like applied to the terminal 100 and the terminal 200.
  • the radio frequency module may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like.
  • the radio frequency module receives electromagnetic waves from the antenna 1, and processes the received electromagnetic waves by filtering, amplifying, etc., and transmitting them to the modem for demodulation.
  • the radio frequency module can also amplify the signal modulated by the modem and turn it into electromagnetic wave radiation through the antenna 1.
  • at least part of the functional modules of the radio frequency module 150 may be disposed in the processor 150.
  • at least part of the functional modules of the radio frequency module 150 may be provided in the same device as at least part of the modules of the processor 110.
  • the modem may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs sound signals through audio equipment (not limited to speakers, receivers, etc.), or displays images or videos through a display screen.
  • the modem may be a separate device.
  • the modem may be independent of the processor and disposed in the same device as the radio frequency module or other functional modules.
  • the communication module 160 may provide wireless local area networks (WLAN), Bluetooth (bluetooth, BT), global navigation satellite system (GNSS), frequency modulation (frequency modulation) applied to the terminal 100 and the terminal 200. , FM), a near field wireless communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions of the communication processing module.
  • the communication module 160 may be one or more devices that integrate at least one communication processing module.
  • the communication module receives the electromagnetic wave through the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor.
  • the communication module 160 may also receive a signal to be transmitted from the processor, frequency-modulate it, amplify it, and turn it into electromagnetic wave radiation through the antenna 2.
  • the antenna 100 of the terminal 100 and the terminal 200 are coupled to a radio frequency module, and the antenna 2 is coupled to a communication module, so that the terminal 100 and the terminal 200 can communicate with a network and other devices through a wireless communication technology.
  • the wireless communication technology may include a global mobile communication system (GSM), a general packet radio service (GPRS), a code division multiple access (CDMA), and broadband. Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and / or IR technology.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation navigation system (BDS), and a quasi-zenith satellite system (quasi -zenith satellite system (QZSS)) and / or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Bertdou navigation navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the terminal 100 and the terminal 200 implement display functions through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display includes a display panel.
  • the display panel can adopt LCD (liquid crystal display), OLED (organic light-emitting diode), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode) emitting diodes (AMOLED), flexible light-emitting diodes (FLEDs), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (QLEDs), etc.
  • the terminal 100 and the terminal 200 may include one or N display screens, and N is a positive integer greater than 1.
  • the terminal 100 and the terminal 200 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen, and an application processor.
  • the ISP is used to process data from camera feedback.
  • the camera 193 is used to capture still images or videos.
  • An object generates an optical image through a lens and projects it onto a photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs digital image signals to the DSP for processing.
  • DSP converts digital image signals into image signals in standard RGB, YUV and other formats.
  • the terminal 100 may include one or N cameras, where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, and a video codec is used to compress or decompress digital video.
  • the terminal 100 may support one or more codecs. In this way, the terminal 100 can play or record videos in multiple encoding formats, such as: MPEG1, MPEG2, MPEG3, MPEG4, and so on.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to achieve the expansion of the storage capacity of the terminal 100 and the terminal 200.
  • the external memory card communicates with the processor through an external memory interface to implement a data storage function. For example, save music, videos and other files on an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the terminal 100 and the terminal 200 by executing instructions stored in the internal memory 121.
  • the memory 121 may include a storage program area and a storage data area.
  • the storage program area may store an operating system, at least one application required by a function (such as a sound playback function, an image playback function, etc.) and the like.
  • the storage data area can store data (such as audio data, phone book, etc.) created during the use of the terminal 100 and the terminal 200.
  • the memory 121 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, other volatile solid-state storage devices, a universal flash memory (universal flash storage, UFS), etc. .
  • a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, other volatile solid-state storage devices, a universal flash memory (universal flash storage, UFS), etc.
  • the terminal 100 and the terminal 200 can implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. Such as music playback, recording, etc.
  • the sensor module 180 of the terminal 100 and the terminal 200 may specifically include: a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor (such as a Hall sensor), an acceleration sensor, a distance sensor, a proximity light sensor, an ambient light sensor, a fingerprint sensor, and a temperature Sensors, bone conduction sensors, and touch sensors.
  • Touch sensors are also called “touch panels.” Can be set on the display. Used to detect touch operations on or near it. The detected touch operation can be passed to the application processor to determine the type of touch event and provide corresponding visual output through the display screen.
  • the terminal 100 and the terminal 200 may further include components such as a USB interface 130, a charging management module 140, a power management module 141, a battery 142, and a SIM card interface 195, which are not limited in the embodiment of the present application.
  • the touch sensor 180K can detect each character entered by the user in the input box, and will detect The outgoing characters are reported to the processor 110.
  • the processor 110 may record the input time of the first character, and create a sending message in the dialog area for synchronously displaying each character appearing in the input box.
  • the sending time of the sending message is the input time of the first character in the sending message.
  • the positions of the sending message in multiple messages are also arranged according to the input time of the first character.
  • the processor 110 may send the character to the terminal of the contact B for synchronous display through the communication module 160 or the radio frequency module 150.
  • the terminal 100 may also receive each character in a message (that is, the reception message of the terminal 100) sent by another terminal (for example, the terminal 200) through the communication module 160 or the radio frequency module 150, and report the received character to the processor. ⁇ 110 ⁇ 110.
  • the processor 110 may record the receiving time of the first character in the receiving message, and create a receiving message in the dialog area to synchronously display each character sent by the terminal 200.
  • the receiving time of the received message is the receiving time of the first character in the received message.
  • the positions of the received message in the multiple messages are arranged according to the receiving time of the first character.
  • the sending messages displayed by the terminal 100 are arranged in the order in which the input party initiates the chat, and the receiving messages displayed by the terminal 100 are also arranged in the order in which the sender initiates the chat. Therefore, the terminal 100 displays The sequence of each message can reflect the true timing relationship in the actual chat process, thereby improving the input efficiency and user experience when the user chats on the terminal.
  • the software system of the terminal 100 and the terminal 200 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
  • a layered-architecture Android system is taken as an example, and the software structures of the terminal 100 and the terminal 200 are exemplarily described.
  • FIG. 4 is a software structure block diagram of the terminal 100 and the terminal 200 according to the embodiment of the present invention.
  • the layered architecture divides the software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through interfaces.
  • the Android system is divided into four layers, which are an application layer, an application framework layer, an Android runtime and a system library, and a kernel layer from top to bottom.
  • the application layer can include a series of application packages.
  • the application package may include applications such as a camera, a gallery, a calendar, a call, a map, navigation, WLAN, Bluetooth, music, video, text messaging, and instant messaging.
  • applications such as a camera, a gallery, a calendar, a call, a map, navigation, WLAN, Bluetooth, music, video, text messaging, and instant messaging.
  • the application framework layer provides an application programming interface (API) and a programming framework for applications at the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display size, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • the data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, and so on.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can consist of one or more views.
  • the display interface including the SMS notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide communication functions of the terminal 100 and the terminal 200.
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages that can disappear automatically after a short stay without user interaction. For example, the notification manager is used to inform download completion, message reminders, etc.
  • the notification manager can also be a notification that appears in the status bar at the top of the system as a chart or scroll bar text, such as a notification from an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are displayed in the status bar, a tone is emitted, the terminal vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library contains two parts: one is the functional functions that the Java language needs to call, and the other is the Android core library.
  • the application layer and the application framework layer can run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • Virtual machines are used to perform object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (media manager), media library (media library), three-dimensional graphics processing library OpenGL ES, 2D graphics engine SGL, etc.
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports a variety of commonly used audio and video formats for playback and recording, as well as still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • OpenGL ES is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • SGL is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the application layer may include any application that supports RTT technology, such as a call application, a chat application, and the like, and a user may use these applications to chat with other users through text.
  • the application framework layer also includes an input method manager (IMM), which can provide input method services to various applications.
  • IMM input method manager
  • chat application after the user opens the chat application, the chat application can be run as an activity at the application layer. If it is detected that the user clicks an input box in the chat application, the chat application can call the input method manager to display a corresponding virtual keyboard. The user can use the virtual keyboard to enter the content of the send message that needs to be sent into the input box.
  • the chat application may also synchronously display the sent message input by the user in the input box in the conversation area of the chat application.
  • the sending time of the sending message is the input time of the first character in the sending message in the input box.
  • the sent message and other messages in the conversation area are also arranged according to the sending time (that is, the input time of the first character).
  • the chat application may also receive a receive message from another terminal, and display the receive message in the conversation area simultaneously.
  • the receiving time of the received message is the receiving time of the first character in the received message.
  • the received message and other messages in the conversation area are also arranged according to the received time (that is, the received time of the first character). Because the input time of the first character in the sent message can reflect the time when the user on the sending end initiates the chat, and the reception time of the first character in the received message can reflect the time when the user on the receiving end initiates the chat, so the above method displays in the chat interface.
  • the order of the messages can reflect the timing relationship in the actual chat process.
  • FIG. 5 is a schematic flowchart of a message display method according to an embodiment of the present application. As shown in FIG. 5, the method for displaying the message may include:
  • Mobile phone A displays a first chat interface with a first contact.
  • a user may choose to enter a first chat interface of a first contact (for example, Mike).
  • the first chat interface 601 displayed by the mobile phone A includes a first input box 602 and a first conversation area 603 with a contact Mike.
  • the user Sara may use an input method application to input a message sent to Mike (that is, a message sent by the mobile phone A) into the first input box 602.
  • the mobile phone B of the first contact Mike may also display the second chat interface 604 with the user Sara.
  • the second chat interface 604 includes a second input box 605 and a second conversation area 606 with the contact Sara.
  • Mike can use an input method application to input a message sent to Sara (that is, a message received by mobile phone A) into the second input box 605.
  • the first contact is taken as an example by Mike. It can be understood that the first contact may further include multiple contacts, that is, the user Sara and each of the first contacts belong to the same group group. As shown in FIG. 7, the user Sara can open a group 701 named “My Friends” and enter a chat interface with the group 701. The group 701 may include multiple contacts, and messages sent by any contact in the group 701 may be displayed in the chat interface of the group 701.
  • the mobile phone A receives a first message input by the user into the first input box of the first chat interface.
  • the characters input into the first input box 602 include two types.
  • One type is a text character, for example, a letter, a text, or a symbol.
  • the symbol may include punctuation, a unit, and an emoji.
  • the other type is a command. Characters, such as the characters of the delete key, the characters of the newline key, or the characters of the enter key, and so on.
  • the specific content of the first message 802 may change with the input operation of the user Sara.
  • the mobile phone A when the mobile phone A detects the first text character (that is, the first character “H”) that Sara enters into the first input box 602, the mobile phone A can record the first character “H”. Input time (for example, 12:08:12), at this time, the first message 802 includes only the letter "H”.
  • mobile phone A When mobile phone A receives the Nth (N> 1) text character entered by Sara in the first input box 602, mobile phone A may additionally display the received text characters after the first character "H" in the input order. The content of the first message 802 increases accordingly.
  • the mobile phone A may perform a corresponding operation on the first message 802 in the input box. For example, if Sara enters the character of the delete key into the first input box 602, the mobile phone A may delete one character in the current first message 802 forward. For another example, if Sara enters a preset character such as a line feed key or a carriage return key into the first input box 602 to indicate the end of the current message, then the mobile phone A may treat all characters in the first input box 602 as complete at this time. The first message 802, and clear the first message 802 from the first input box 602.
  • the mobile phone A may use the character as the first character of the next chat message, and then execute the method of steps S502-S507 again to display the next chat. Message.
  • the mobile phone A may further perform steps S503 and S504 described below. That is, in response to the user inputting the first message, the mobile phone A may perform the following steps S503 and S504, so as to display the first message on the sending end (mobile phone A) and the receiving end (mobile phone B).
  • the mobile phone A displays the first message in the first conversation area of the first chat interface, and the sending time of the first message is the input time of the first character in the first message.
  • each sending message (including the first message) in the first conversation area is arranged in order of sending time.
  • the mobile phone A displays each message sent by the user in the order of the input of the first character when initiating the chat.
  • the input time of the first character in the first message may refer to a point in time when the mobile phone A detects that the first character appears in the first input box.
  • the input time of the first character in the first message may also be the time point when the first character in the first message is recognized by the mobile phone A through the voice recognition technology, and this embodiment of the present application does not place any restrictions on this.
  • the mobile phone A may detect the user Sara inputting a character for a line break key of the first message 802 into the first input box 602, and then insert the first input box into the first input box. All characters “Hi, how are you” in 602 are displayed in the first dialog area 603 as the first message 802. In addition, when the first message 802 is displayed in the first conversation area 603, the mobile phone A may also display the sending time of the first message 802: 12:08:12 (that is, the input time of the first character "H").
  • the time for clicking the line feed key is 12:08:56, but as shown in FIG. 9, mobile phone A is in the first chat interface 601.
  • the input time of the first character "H": 12:08:12 is displayed as the sending time. Since the first message 802 sent at 12:08:12 is the latest message sent by mobile phone A, and after 12:08:12, mobile phone A has not received other messages from Mike, so as shown in Figure 9
  • the mobile phone A may display the first message 802 as the latest chat record in the current first conversation area 603.
  • the latest chat record may be displayed at the top or the bottom of the first conversation area 603, which is not limited in the embodiment of the present application.
  • the mobile phone A may also synchronize the first message 802 in the first input box 602 with Sara in the first input A first message 802 is displayed in the conversation area 603. At this time, the content of the first message 802 in the first dialog area 603 changes as the characters in the first input box 602 change, but the first message 802 and other messages in the first dialog area 603 are still based on each message.
  • the sending time (or receiving time) is arranged in order.
  • the time sequence of the user initiated chat can be accurately reflected in the first conversation area 603, but also when the user enters a chat message, the content of the chat message can be displayed in real time in the first conversation area 603, thereby improving user chat Time of use.
  • the mobile phone A sends the first message to the mobile phone B of the first contact.
  • the process of sending the first message by the mobile phone A is synchronized with the process of the user entering the first message.
  • the mobile phone A may also input the first input box 602 based on the RTT technology.
  • Each detected character is synchronously sent to the mobile phone B of the first contact Mike.
  • the mobile phone A when mobile phone A detects that Sara enters the first text character (ie, the first character "H") of the first message 802 into the first input box 602, it can send the first character "H” to Mike's mobile phone B. . After the mobile phone B receives the first character "H", it can record the reception time (for example, 12:08:13) when the first character "H" is received.
  • the reception time for example, 12:08:13
  • the mobile phone A may send the received text characters to the mobile phone B in the order of input.
  • the mobile phone A may also send the command character to the mobile phone B.
  • the mobile phone A may synchronously send the character of the delete key to the mobile phone B, so that the mobile phone B deletes the most recently received character in response to the command character.
  • Sara enters a preset character such as a line feed key (or a return key) into the first input box 602 to end the current message
  • the mobile phone A may also send the character of the line feed key to the mobile phone B, so that the mobile phone B learns that the first message 802 sent by mobile phone A this time has ended.
  • the mobile phone B may use the character as the first character of the next received message, and then re-execute the method of steps S505-S507 to display the next received message.
  • the mobile phone B displays the first message in the second conversation area of the second chat interface.
  • the receiving time of the first message may be the receiving time of the first character in the first message received by the mobile phone B, for example, the receiving time of the first character "H": 12:08:13; or, the receiving time of the first message It may also be the sending time when mobile phone A sends the first character in the first message to mobile phone B; or the reception time of the first message may also be the input time when mobile phone A detects that the user inputs the first character in the first message, for example The input time of the first character "H": 12:08:12, this embodiment of the present application does not limit this.
  • the mobile phone displays each message in the second conversation area, it is also sorted according to the receiving time or sending time of each message.
  • the mobile phone B may simultaneously synchronize the first message 802 in the second chat interface 604 with each character in the first message 802 sent from the mobile phone A.
  • a first message 802 is displayed in the second conversation area 606. That is, each time mobile phone B receives a character, it can immediately display the character in the first message 802 of the second conversation area 606. In this way, the first message 802 that Mike reads from the second conversation area 606 The content of is also changed according to the characters entered by Sara in the first input box 602.
  • the reception time (12:08:13) of the first character "H" in the first message 802 of the mobile phone B may be used as the first The reception time of the message 802, and the reception time is displayed around the first message 802.
  • the position of the first message 802 in the second conversation area 606 is also determined according to the reception time of the first message 802. For example, if the mobile phone B receives a certain received message before 12:08:13, the mobile phone B may display the first message 802 after the received message.
  • the mobile phone B may display the first message 802 before the sending message.
  • the receiver Mike can already see the first message 802 being sent by the sender Sara in real time.
  • the reception time of the first character in the first message 802 can reflect the time when the sender Sara initiates the chat, so after taking the reception time of the first character as the reception time of the first message 802, the first message 802 is in the second time.
  • the order of arrangement with other messages in the conversation area 606 can reflect the actual timing relationship during the chat.
  • the mobile phone B can receive all the characters received this time (for example, "Hi, how are you” ) Is displayed as the first message 802 in the second chat interface 604.
  • the mobile phone B still displays the reception time (12:08:13) of the first character "H" in the first message 802 as the reception time of the first message 802 at In the second dialogue area 606.
  • the mobile phone A since the mobile phone A has recorded the input time when Sara enters the first character "H” in the first message 802 in the first input box 602 (for example, 12:08:12) ), Then, when the mobile phone A sends the first message 802 to the mobile phone B, the input time of the first character "H” may also be sent to the mobile phone B. Then, as shown in FIG. 11, the mobile phone B may use the input time of the first character "H" as the reception time of the first message 802, and arrange the first message 802 and other messages in the second conversation area 606 according to this reception time Display order. In this way, the reception time of the first message 802 that Mike saw in the second conversation area 606 is the input time when Sara started to input the first character in the first message 802, which can avoid the delay of each chat message caused by the transmission delay. The timing is out of order.
  • the mobile phone A receives the second message from the mobile phone B.
  • step S506 Mike can also be in the second chat interface 604 displayed on the mobile phone B Enter the second message sent to Sara.
  • Mike may use the input method application to input the second message 1201 into the second input box 605.
  • the mobile phone B detects the first character "O" in the second input box 605, it can record the input time of the first character "O” (for example, 12:09:01), and use the input time of the first character "O" as The mobile phone B sends the sending time of the second message 1201.
  • the mobile phone B may create a message box of the second message 1201 in the second conversation area 606 according to the sending time, and synchronously display the second message 1201 input by Mike in the second input box 605 in the message box.
  • the mobile phone B can synchronously send the characters received in the second input box 605 to the mobile phone A of the receiving Sara, that is, send the second message 1201 input by Mike to the mobile phone A.
  • the mobile phone A may also record the reception time of the first character “O” (for example, 12:09:02), and execute the following step S507.
  • the mobile phone A displays the second message in the first chat interface.
  • the method for displaying the second message 1201 in the first conversation area 603 by the mobile phone A is described in the mobile phone A in the second conversation area in step S505.
  • the related description of the first message 802 is displayed in 606.
  • the reception time of the second message 1201 in the first conversation area 603 is the reception time of the first character "O": 12:09:02.
  • the mobile phone A may display the second message 1201 being received as the latest received message.
  • the mobile phone A may also display a prompt 1301 around the second message 1201 to remind the user that the second message 1201 sent by Sara ’s counterparty is not over.
  • the mobile phone A may display the chat message 1302 in front of the second message 1201, so that Sara can read the second message 1201 being sent by Mike.
  • the mobile phone A when the mobile phone A receives the characters of the line feed key sent by the mobile phone B, it can be considered that the second message 1201 sent by the mobile phone B this time has ended. Then, as shown in FIG. 13 (b), the mobile phone A can follow the first Receiving time of the first character "O" in the second message 1201: 12:09:02, rearrange the display position of the second message 1201 in the first conversation area 603. At this time, since the reception time of the first character "O" in the second message 1201 is earlier than the input time of the first character in the above chat message 1302, the mobile phone A displays the second message 1201 before the chat message 1302, thereby restoring the first The actual timing relationship between the chat messages in the conversation area 603.
  • the mobile phone A displays the chat message entered by Sara (for example, the above first message 802), if Sara has not detected the character of the line feed key in the first input box 602, it means that the first message 802 has not been entered, then , The mobile phone A may also display the first message 802 being input as the latest chat message in the first conversation area 603 after all the chat messages.
  • the mobile phone A may display the first message 802 as the latest message in the first chat interface 601 after all the chat messages, and may also use the second message 1201 as the first message.
  • the latest message in a chat interface 601 is displayed after all the chat messages.
  • chat message is displayed as the last chat message after all the chat messages, and this embodiment of the present application does not place any restrictions on this.
  • an embodiment of the present application discloses a terminal.
  • the terminal is configured to implement the methods described in the foregoing method embodiments, and includes a display unit 1401 and an obtaining unit 1402. And sending unit 1403.
  • the display unit 1401 is used to support the terminal to execute the processes S501, S503, and S507 in FIG. 5;
  • the obtaining unit 1402 is used to support the terminal to execute the processes S502 and S506 in FIG. 5; .
  • all relevant content of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
  • an embodiment of the present application discloses a terminal.
  • the terminal may include: a touch screen 1501, wherein the touch screen 1501 includes a touch-sensitive surface 1506 and a display screen 1507;
  • One or more processors 1502 ; a memory 1503; one or more application programs (not shown); and one or more computer programs 1504, each of which may be connected through one or more communication buses 1505.
  • the one or more computer programs 1504 are stored in the memory 1503 and configured to be executed by the one or more processors 1502.
  • the one or more computer programs 1504 include instructions, and the instructions can be used to execute 5 and the corresponding steps in the respective embodiments.
  • Each functional unit in each of the embodiments of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated unit When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solutions of the embodiments of the present application essentially or partly contribute to the existing technology or all or part of the technical solutions may be embodied in the form of a software product.
  • the computer software product is stored in a storage device.
  • the medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to perform all or part of the steps of the method described in the embodiments of the present application.
  • the foregoing storage media include: flash media, mobile hard disks, read-only memories, random access memories, magnetic disks, or optical discs, which can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种消息的显示方法及终端,涉及终端领域,可在终端上显示出多条消息之间的真实的时序关系。该方法包括:第一终端显示与第二终端的聊天界面,聊天界面中包括输入框和对话区域;第一终端在第一时刻接收到用户向输入框中输入的第一消息的首字符,第一消息包括X个字符;第一终端从第一时刻开始向第二终端实时发送用户在输入框中输入的字符;第一终端在第二时刻接收到第二终端发送的第二消息的首字符,第二时刻晚于第一时刻,第二消息包括Y个字符;第一终端在第三时刻接收到用户向输入框中输入的第一预设字符,第一预设字符用于指示第一消息结束,第三时刻晚于第二时刻;第一终端在对话区域中将第一消息显示为比第二消息更早的消息。

Description

一种消息的显示方法及终端 技术领域
本申请涉及终端领域,尤其涉及一种消息的显示方法及终端。
背景技术
RTT(real time text,文字实时传输)技术能够在聊天场景下让用户实时看到发送者输入的消息。也就是说,用户A的终端在接收用户B的终端发来的消息时,用户B在自己的终端上输入的每一个字符都可以实时显示在用户A的终端上,用户A无需等待用户B输入完整的消息并按下发送按钮后,便可在用户A的终端上看到该消息的具体内容。
示例性的,如图1中的(a)-(c)所示,左边为用户A的终端,右边为用户B的终端,两个用户可使用同一个聊天应用相互发送消息。以用户B想输入“hello,nice to meet you”这一完整的消息1为例,如图1中的(a)所示,用户B在输入框101中输入“hello,nice to”的过程中,用户A的终端上可实时显示用户B输入的每一个字符。如果在用户B输入完整的消息1之前,用户A的终端发送了用户A输入的“Oh”这一消息2,则如图1中的(b)所示,用户A的终端上显示的消息2位于消息1之后,但由于用户B还未输入完消息1,因此,在用户B的终端显示出的对话区域102内仅显示了来自用户A发送的消息2。当用户B输入了完整的消息1并点击发送按钮103后,如图1中的(c)所示,用户B的终端按照用户B点击发送按钮103的时间将消息1显示在了用户A发送的消息2之后。
也就是说,对于终端的接收消息(例如用户A终端上的消息1),终端是将消息1中首字符的接收时间作为消息1的接收时间,而对于终端的发送消息(例如用户B终端上的消息1),终端是将用户输入完消息1中后点击发送按钮的时间作为消息1的发送时间。进而,终端可按照接收时间和发送时间的时间顺序在消息框中显示各条消息。这就使得同一条消息(例如上述消息1)在用户A和用户B的终端上有不同的显示顺序,无法有效的反映聊天过程的时序关系,并且影响了用户聊天时的输入效率。
发明内容
本申请提供一种消息的显示方法及终端,可在终端上显示出多条消息之间的真实的时序关系,从而提高用户使用终端聊天时的输入效率和使用体验。
为达到上述目的,本申请采用如下技术方案:
第一方面,本申请提供一种消息的显示方法,包括:第一终端显示与第二终端的聊天界面,该聊天界面中包括输入框和对话区域;第一终端在第一时刻接收到用户向输入框中输入的第一消息(第一消息包括X个字符,X为大于0的整数)的首字符,也就是说第一消息中首字符的输入时间为上述第一时刻;并且,第一终端从第一时刻开始可向第二终端实时发送用户在输入框中输入的字符;后续,第一终端在第二时刻(第二时刻晚于第一时刻)接收到第二终端发送来的第二消息(第二消息包括Y个字符,Y为大于0的整数)的首字符,也就是说第二消息中首字符的接收时间为上述第二时刻;进而,第一终端在第三 时刻(第三时刻晚于第二时刻)接收到用户向输入框中输入的第一预设字符(例如换行键的字符),该第一预设字符用于指示本次发送的第一消息结束;
在上述发送第一消息和接收第二消息的过程中,由于第一时刻早于上述第二时刻,说明第一终端的用户发起聊天的时间早于第二终端的用户发起聊天的时间,因此,第一终端在上述对话区域中显示第一消息和第二消息时,可将第一消息显示为比第二消息更早的消息。这样一来,第一终端在对话区域中显示的各个消息的顺序都是按照用户发起聊天的时间排列的,消息之间的时序关系也不会发生错乱,从而在终端上显示出多条消息之间的正确时序关系,以提高用户使用终端聊天时的输入效率和使用体验。
在一种可能的设计方法中,上述第一消息的发送时间为第一时刻(即第一消息中首字符的输入时间),第二消息的接收时间为第二时刻(即第二消息中首字符的接收时间)。
在一种可能的设计方法中,在上述第一时刻和第三时刻之间,第一终端还可接收用户向输入框中输入的上述第一消息中除首字符之外的X-1个字符;此时,第一终端在上述对话区域中显示第一消息,具体包括:当输入框中每显示出上述X个字符中的一个字符时,第一终端将该字符同步显示在该对话区域的第一消息框中。这样,用户在输入框中输入本次向第二终端发送的第一消息的过程中可以实时在对话区域看到同步显示出的第一消息。
在一种可能的设计方法中,第一终端在第三时刻接收到用户向该输入框中输入的第一预设字符之后,由于第一预设字符用于指示用户在输入框中本次输入的第一消息结束,因此,第一终端响应于该预设字符的输入可清空输入框中的所有字符。后续,当第一终端检测到用户在输入框输入新的字符时,可将该字符作为下一条发送消息的首字符。
在一种可能的设计方法中,第一终端在第二时刻接收到第二终端发送的第二消息的首字符之后,还包括:第一终端在第四时刻接收到第二终端发送的第二预设字符,第二预设字符用于指示第二终端本次发来的第二消息结束。后续,如果第一终端接收到第二终端发来的新字符,则第一终端可将该新字符作为下一个接收消息中的首字符。
在一种可能的设计方法中,在上述第二时刻和第四时刻之间,第一终端还可接收到第二终端发送的上述第二消息中除首字符之外的Y-1个字符;此时,第一终端在上述对话区域中显示第二消息,具体包括:当第一终端每接收到上述Y个字符中的一个字符时,第一终端可将该字符同步显示在该对话区域的第二消息框中。也就是说,在第一终端接收到用于指示第二消息结束的第二预设字符之前,第一终端可同步在对话区域中显示第二终端发来的第二消息。
在一种可能的设计方法中,在上述第二时刻和第四时刻之间,第一终端可在上述对话区域中将第二消息显示为最新的消息,并且,第一终端还可以显示第二消息此时正在被输入的提示语。也就是说,在第一终端接收到用于指示第二消息结束的第二预设字符之前,由于对方发来的第二消息还没有结束,用户的焦点在于第二消息中的具体内容,因此第一终端可将正在被输入的第二消息显示为当前的最新消息,避免第二消息被发送时间晚于其首字符接收时间的其他消息淹没。
例如,在上述第二时刻和第四时刻之间,如果第一终端接收到用户向输入框中输入的第三消息(第三消息包括Z个字符,Z为大于0的整数)的首字符,则第一终端可在上述对话区域中将第三消息显示为比第二消息更早的消息,即此时的最新消息仍为第二消息。
在一种可能的设计方法中,在第一终端在第四时刻接收到第二终端发送的第二预设字符之后,说明第二终端本次发送的第二消息已经结束,那么,第一终端可在上述对话区域中按照第二消息中首字符的接收时间和第三消息中首字符的输入时间重新排列第三消息和第二消息的显示顺序,更新后的第三消息显示为比第二消息更晚的消息,从而恢复对话区域中各个聊天消息之间的实际时序关系。
示例性的,第一终端在上述对话区域中显示第一消息和第二消息时,还可在该对话区域中显示第一消息的发送时间和第二消息的接收时间。
第二方面,本申请提供一种消息的显示方法,包括:第一终端显示与第二终端的聊天界面,该聊天界面中包括对话区域;第一终端在第一时刻接收到第二终端发送的第一消息(第一消息包括Y个字符,Y为大于0的整数)的首字符;后续,第一终端可接收到第二终端发送的第一消息中除首字符之外的Y-1个字符;当第一终端每接收到上述Y个字符中的一个字符时,由于对方发来的第一消息还没有结束,用户的焦点在于第一消息中的具体内容,因此第一终端可将正在被输入的第一消息显示为当前的最新消息,避免第一消息被发送时间晚于其首字符接收时间的其他消息淹没。
在一种可能的设计方法中,在第一终端接收到第二终端发送的第一消息中的Y-1个字符之后,还包括:第一终端在第二时刻(第二时刻晚于第一时刻)接收到第二终端发送的预设字符,该预设字符用于指示本次第二终端发来的第一消息结束。后续,如果第一终端接收到第二终端发来的新字符,则第一终端可将该新字符作为下一条接收消息中的首字符。
在一种可能的设计方法中,在上述第一时刻和第二时刻之间,如果第一终端接收到用户输入的第二消息(第二消息包括X个字符,X为大于0的整数)的首字符,由于第二终端发来的第二消息还未结束,因此第一终端可在上述对话区域中将第二消息显示为比第一消息更早的消息,即此时的最新消息仍为第一消息。
在一种可能的设计方法中,第一终端在第二时刻接收到第二终端发送的预设字符之后,可在上述对话区域按照第一消息中首字符的接收时间和第二消息中首字符的输入时间更新显示,使得第一消息显示为比第二消息更早的消息,从而恢复对话区域中各个聊天消息之间的实际时序关系。
第三方面,本申请提供一种消息的显示方法,包括:第一终端显示与第二终端的聊天界面,该聊天界面包括输入框和对话区域;第一终端接收用户输入的第一消息并实时发送给第二终端,第一终端可根据第一消息中首字符的输入时间,在上述对话区域中显示第一消息对应的第一消息框,并随着用户的输入在第一消息框(和/或输入框)中,更新显示第一消息的内容直至接收到指示第一消息结束的预设字符;另外,第一终端还可接收第二终端发送的第二消息,进而,根据第二消息中首字符的接收时间,在上述对话区域中显示第二消息对应的第二消息框,并在第二消息框中实时显示接收到的第二消息的内容,其中,第一消息框和第二消息框在对话区域中的显示顺序与第一消息的首字符的输入时间和第二消息的首字符的接收时间的关系一致,也就是说,第一消息框和第二消息框在对话区域中的显示顺序是按照收发双方用户发起聊天的时间排列的,消息之间的时序关系也不会发生错乱,从而在终端上显示出多条消息之间的正确时序关系,以提高用户使用终端聊天时的输入效率和使用体验。
在一种可能的设计方法中,在第一消息框和/或该输入框中随着用户的输入,更新显示第一消息的内容直至接收到指示第一消息结束的预设字符,具体包括:在第一消息框和输入框中实时显示用户输入的第一消息的内容。
或者,在第一消息框和/或该输入框中随着用户的输入、更新显示第一消息的内容直至接收到指示第一消息结束的预设字符,具体包括:在接收到指示第一消息结束的预设字符之前,在第一消息框中只显示第一消息的首字符,但是,在输入框中可随着用户的输入,更新显示第一消息的内容直至接收到指示第一消息结束的预设字符;在接收到指示第一消息结束的预设字符之后,在第一消息框中显示第一消息的所有内容,并清空在输入框中第一消息的所有字符。
第四方面,本申请提供一种消息的显示方法,包括:第一终端显示与第二终端的聊天界面,该聊天界面包括输入框和对话区域;第一终端接收用户输入的第一消息并实时发送给第二终端,第一终端可根据第一消息首字符的输入时间,在上述对话区域中显示第一消息对应的第一消息框,并随着用户的输入在第一消息框(和/或输入框)中,更新显示第一消息的内容直至接收到指示第一消息结束的预设字符;另外,第一终端还可接收第二终端发送的第二消息,第二消息的首字符的接收时间早于第一消息首字符的输入时间;
在接收到指示第二消息结束的预设字符之前,由于对方发来的第二消息还没有结束,用户的焦点在于第二消息中的具体内容,因此第一终端可将第二消息对应的第二消息框作为最新消息的消息框显示,并在第二消息框中实时显示接收的第二消息的内容;在接收到指示第二消息结束的预设字符之后,第一终端可根据第二消息的首字符的接收时间,在对话区域中更新显示第二消息对应的第二消息框,使得第一消息框和第二消息框在对话区域中的显示顺序与第一消息的首字符的输入时间和第二消息的首字符的接收时间的关系一致,从而恢复对话区域中各个聊天消息之间的实际时序关系。
第五方面,本申请提供一种终端,包括:触摸屏、一个或多个处理器、存储器、以及一个或多个程序;其中,处理器与存储器耦合,上述一个或多个程序被存储在存储器中,当终端运行时,该处理器执行该存储器存储的一个或多个程序,以使终端执行上述任一项消息的显示方法。
第六方面,本申请实施例提供一种终端上的图形用户界面(GUI),该终端包括触摸屏、一个或多个处理器、存储器、以及一个或多个程序,该图形用户界面包括根据上述任一项消息的显示方法显示出的用户界面。
第七方面,本申请提供一种计算机存储介质,包括计算机指令,当计算机指令在终端上运行时,使得终端执行上述任一项所述的终端恢复出厂设置时的数据恢复方法。
第八方面,本申请提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述任一项所述的终端恢复出厂设置时的数据恢复方法。
可以理解地,上述提供的第五方面所述的终端、第六方面所述的图形用户界面、第七方面所述的计算机存储介质,以及第八方面所述的计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
附图说明
图1为现有技术中在RTT场景下消息收发过程的示意图;
图2为本申请实施例提供的一种消息的显示方法的场景示意图一;
图3为本申请实施例提供的一种终端的结构示意图一;
图4为本申请实施例提供的一种终端内操作系统的结构示意图;
图5为本申请实施例提供的一种消息的显示方法的交互示意图;
图6为本申请实施例提供的一种消息的显示方法的场景示意图二;
图7为本申请实施例提供的一种消息的显示方法的场景示意图三;
图8为本申请实施例提供的一种消息的显示方法的场景示意图四;
图9为本申请实施例提供的一种消息的显示方法的场景示意图五;
图10为本申请实施例提供的一种消息的显示方法的场景示意图六;
图11为本申请实施例提供的一种消息的显示方法的场景示意图七;
图12为本申请实施例提供的一种消息的显示方法的场景示意图八;
图13为本申请实施例提供的一种消息的显示方法的场景示意图九;
图14为本申请实施例提供的一种终端的结构示意图二;
图15为本申请实施例提供的一种终端的结构示意图三。
具体实施方式
下面将结合附图对本申请实施例的实施方式进行详细描述。
本申请实施例提供的一种消息的显示方法可应用于至少两个终端组成的聊天场景下。示例性的,如图2中的(a)-(b)所示,用户A使用终端100中的一个聊天应用与用户B聊天,同时,用户B使用终端200中的同一个聊天应用与用户A聊天。其中,终端100与终端200之间可以通过基站或服务器建立通信连接,也可以通过Wi-Fi(wireless-fidelity,无线保真)或蓝牙等方式建立通信连接。上述聊天应用可以为即时通信类应用,也可以为短消息等应用,本发明实施例对此不作限定。
一般,用户A与用户B聊天时产生的消息既包括发送的消息也包括接收的消息。对于用户A而言,用户A使用终端100向终端200发送的消息为发送消息,终端100从终端200接收到的消息为接收消息;对于用户B而言,用户B使用终端200向终端100发送的消息为发送消息,终端200从终端100接收到的消息为接收消息。
以用户A使用终端100向用户B的终端200发送消息举例,如图2中的(a)所示,终端100显示有包括运营商信息,蓝牙功能开启的标志,网络制式,时间和电量的状态栏,状态栏下是与用户B的聊天界面。与用户B的聊天界面中包括用户B的名称和头像信息,第一输入框201、第一对话区域202以及第一虚拟键盘203。其中,第一对话区域202用于显示终端100的发送消息以及接收消息,第一输入框201用于显示用户A本次输入的发送消息。当用户A不需要向输入框201输入发送消息时,可关闭第一虚拟键盘203。类似的,终端200显示的与用户A的聊天界面中也可以包括第二输入框204、第二对话区域205以及第二虚拟键盘(图2中的(b)未示出)等,本申请实施例对此不做任何限制。
在本申请实施例中,仍如图2中的(a)所示,当终端100检测到用户A向第一输入框201中通过语音或者按键输入一个或多个字符时,终端100可记录首字符的输入时间(例如“H”的输入时间),并且,终端100可在第一对话区域202中创建一个消息框,在消息 框中同步显示第一输入框201中接收到的字符(即发送消息1)。其中,发送消息1的发送时间为发送消息1中首字符“H”的输入时间。
例如,终端100在第一对话区域202中为上述发送消息1创建的消息框可以是一个气泡,终端100可在该气泡中逐一显示第一输入框201中用户A输入的每个字符。并且,终端100会预先设置一个或多个预设字符(例如,回车键或换行键的字符),该预设字符用于指示用户本次输入的发送消息已经结束。如果终端100在第一输入框201中接收到用户A输入了上述预设字符,则终端100可清除第一输入框201中的所有内容,此时在第一对话区域202中显示的发送消息1中的内容不会再出现变化。
在终端100接收到用户A向第一输入框201中输入的一个或多个字符时,终端100还可以实时的将这些字符按照用户的输入顺序发送给终端200。例如,一旦用户A完成输入一个字符,终端100就将该字符发送给终端200,其具体实现过程可参考RTT的相关技术,本发明实施例不再详述。仍如图2中的(a)-(b)所示,用户A在第一输入框201中依次输入“Hello”这个单词中的每个字母时,终端100可依次将接收到的“H”、“e”、“l”、“l”、“o”这5个字符发送给终端200。终端200接收到终端100发来的首字符“H”时,可记录该首字符的接收时间,进而,如图2中的(b)所示,终端200可将首字符“H”的接收时间作为接收消息1的接收时间,并在第二对话区域204中创建一个消息框,在该消息框中终端200可同步显示终端100发送来的各个字符,使得用户B可以实时的看到用户A发来的消息。
当终端200接收到终端100发来的预设字符,例如换行键的字符(/n)时,可以认为终端100发送的接收消息1中的内容已经结束,此时第二对话区域204中显示的接收消息1中的内容不会再出现变化。后续,如果终端200接收到终端100发来的新字符,则终端200可将该新字符作为下一个接收消息中的首字符进行记录并显示。
需要说明的是,上述实施例中是以终端100向终端200发送消息,同时终端200作为接收端接收该消息举例说明的,可以理解的是,终端100也可以作为接收端接收终端200发来的消息,本申请实施例对此不做任何限制。
可以看出,在本申请实施例中,终端在发送一条消息时,将该消息中首字符的输入时间作为该消息的发送时间,发送消息中首字符的输入时间可以反映出发送端的用户发起聊天的时间。当终端显示多条发送消息时,可按照每条消息的发送时间的先后顺序对这多条发送消息进行排序。同样,终端在接收一条消息时,将该消息中首字符的接收时间作为该消息的接收时间,接收消息中首字符的接收时间可以反映出接收端的用户发起聊天的时间。当终端显示多条接收发送消息时,可按照每条消息的接收时间的先后顺序对这多条接收消息进行排序。这样一来,终端在对话区域中显示的各个消息的顺序都是按照用户发起聊天的时间排列的,消息之间的时序关系也不会发生错乱,从而在终端上显示出多条消息之间的正确时序关系,以提高用户使用终端聊天时的输入效率和使用体验。
另外,图2中的(a)-(b)所示出的聊天场景可视为RTT技术中一个典型的应用场景。其中,RTT技术是指在创建或输入需要传输的文本信息时,一旦接收到用户输入的字符,可立即(例如在几分之一秒内)将该字符发送并显示给接收端。这意味着接收端的用户可以在发送方正在输入文本信息时读取到其输入的文本。通过这种方式,实时文本具有 与语音相同的会话直接性和交互性。
目前,多媒体应用文本会话协议(protocol for multimedia application text conversation)等多个协议中已经引入了RTT技术的相关标准。例如,聋哑人可以使用支持RTT技术的文字电话应用,将对方输入的语音或文本信息通过RTT技术以文字的形式进行即时显示。又例如,在群组聊天这种多人会话场景中也可通过RTT技术实时显示群组内每个用户输入的消息。本申请实施例中提供的消息的显示方法可应用在RTT技术的各个应用场景下,本申请实施例对此不做任何限制。
进一步地,上述实施例中的终端100和终端200具体可以为手机、平板电脑、桌面型、膝上型、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、手持计算机、上网本、个人数字助理(personal digital assistant,PDA)、可穿戴电子设备、虚拟现实设备等,本申请实施例中对终端的具体形式不做特殊限制。
图3是上述实施例中终端100和终端200的结构框图。终端100和终端200可以包括处理器110,外部存储器接口120,内部存储器121,天线1,天线2,射频模块150,通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,摄像头193,以及显示屏194等。
本发明实施例示意的结构并不构成对终端100和终端200的限定。可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(Neural-network Processing Unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
终端100和终端200的无线通信功能可以通过天线模块1,天线模块2射频模块150,通信模块160,调制解调器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端100和终端200中的每个天线可用于覆盖单个或多个通信频带。不同的天线可以复用,以提高天线的利用率。例如:可以将蜂窝网天线复用为无线局域网分集天线。在一些实施例中,天线可以和调谐开关结合使用。
射频模块150可以提供应用在终端100和终端200上的包括2G/3G/4G/5G等无线通信的解决方案的通信处理模块。射频模块可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(Low Noise Amplifier,LNA)等。射频模块由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调器进行解调。射频模块还可以对经调制解调器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,射频模块150的至少部分功能模块可以被设置于处理器150中。在一些实施例中,射频模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调器可以包括调制器和解调器。调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到 的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器,受话器等)输出声音信号,或通过显示屏显示图像或视频。在一些实施例中,调制解调器可以是独立的器件。在一些实施例中,调制解调器可以独立于处理器,与射频模块或其他功能模块设置在同一个器件中。
通信模块160可以提供应用在终端100和终端200上的包括无线局域网(wireless local area networks,WLAN),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案的通信处理模块。通信模块160可以是集成至少一个通信处理模块的一个或多个器件。通信模块经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器。通信模块160还可以从处理器接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,终端100和终端200的天线1和射频模块耦合,天线2和通信模块耦合,使得终端100和终端200可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS))和/或星基增强系统(satellite based augmentation systems,SBAS)。
终端100和终端200通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏包括显示面板。显示面板可以采用LCD(liquid crystal display,液晶显示屏),OLED(organic light-emitting diode,有机发光二极管),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端100和终端200可以包括1个或N个显示屏,N为大于1的正整数。
终端100和终端200可以通过ISP,摄像头193,视频编解码器,GPU,显示屏以及应用处理器等实现拍摄功能。
ISP用于处理摄像头反馈的数据。摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。 ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端100可以包括1个或N个摄像头,N为大于1的正整数。数字信号处理器用于处理数字信号,视频编解码器用于对数字视频压缩或解压缩。终端100可以支持一种或多种编解码器。这样,终端100可以播放或录制多种编码格式的视频,例如:MPEG1,MPEG2,MPEG3,MPEG4等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端100和终端200的存储能力。外部存储卡通过外部存储器接口与处理器通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行终端100和终端200的各种功能应用以及数据处理。存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端100和终端200使用过程中所创建的数据(比如音频数据,电话本等)等。此外,存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,其他易失性固态存储器件,通用闪存存储器(universal flash storage,UFS)等。
终端100和终端200可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
终端100和终端200的传感器模块180具体可以包括:压力传感器、陀螺仪传感器、气压传感器、磁传感器(例如霍尔传感器)、加速度传感器、距离传感器、接近光传感器、环境光传感器、指纹传感器、温度传感器、骨传导传感器以及触摸传感器等。触摸传感器也称“触控面板”。可设置于显示屏。用于检测作用于其上或附近的触摸操作。可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型,并通过显示屏提供相应的视觉输出。
终端100和终端200还可以包括USB接口130、充电管理模块140、电源管理模块141、电池142以及SIM卡接口195等部件,本申请实施例对此不做任何限制。
在本申请实施例中,以终端100为例,终端100在显示屏194上显示与联系人B的聊天应用的界面后,触摸传感器180K可检测用户在输入框中输入的各个字符,并将检测出的字符上报给处理器110。检测到输入框中出现的首字符后,处理器110可记录该首字符的输入时间,并在对话区域中创建一条发送消息用于同步显示输入框中出现的各个字符。该发送消息的发送时间即为发送消息中首字符的输入时间,那么,该发送消息在多条消息中的位置也是按照其首字符的输入时间排列的。
同时,每检测到用户向输入框中输入新字符时,处理器110可通过通信模块160或射频模块150将该字符发送给联系人B的终端进行同步显示。同样的,终端100也可以通过通信模块160或射频模块150接收其他终端(例如终端200)发送来的消息(即终端100的接收消息)中的每一个字符,并将接收到的字符上报给处理器110。与上述发送消息类似的,处理器110可记录上述接收消息中首字符的接收时间,并在对话区域中创建一条接收消息同步显示终端200发送来的各个字符。该接收消息的接收时间即为接收消息中首字 符的接收时间,那么,该接收消息在多条消息中的位置是按照其首字符的接收时间排列的。
这样一来,终端100显示的各条发送消息都是按照输入方发起聊天的顺序排列的,终端100显示的各条接收消息也都是按照发送方发起聊天的顺序排列的,因此,终端100显示出的各条消息的顺序能够反映出实际聊天过程中真实的时序关系,从而提高了用户使用终端聊天时的输入效率和使用体验。
上述终端100和终端200的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明终端100和终端200的软件结构。
图4是本发明实施例的终端100和终端200的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图4所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息,即时通信等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图4所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
其中,窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。电话管理器用于提供终端100和终端200的通信功能。例如通话状态的管理(包括接通,挂断等)。资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层可运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库OpenGL ES,2D图形引擎SGL等。
其中,表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。OpenGL ES用于实现三维图形绘图,图像渲染,合成,和图层处理等。SGL是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
在本申请实施例中,应用程序层中可以包括支持RTT技术的任意应用,例如通话应用、聊天应用等,用户可使用这些应用与其他用户通过文本进行聊天。并且,应用程序框架层中还包括输入法管理器(input method manager,IMM),输入法管理器可向各个应用提供输入法服务。
以聊天应用为例,用户打开聊天应用后,该聊天应用可作为一个activity运行在应用程序层。如果检测到用户点击该聊天应用中的输入框,则该聊天应用可调用输入法管理器显示出相应的虚拟键盘。用户使用虚拟键盘可向输入框中输入需要发送的发送消息的内容。并且,该聊天应用还可以将用户在输入框中输入的发送消息同步显示在该聊天应用的对话区域内。其中,该发送消息的发送时间即为发送消息中首字符在输入框内的输入时间。该发送消息在对话区域中与其他消息也是按照其发送时间(即首字符的输入时间)排列的。
另外,上述聊天应用还可以接收来自其他终端的接收消息,并将该接收消息也同步显示在上述对话区域中。其中,该接收消息的接收时间即为接收消息中首字符的接收时间。该接收消息在对话区域中与其他消息也是按照接收到其接收时间(即首字符的接收时间)排列的。由于发送消息中首字符的输入时间可以反映出发送端的用户发起聊天的时间,接收消息中首字符的接收时间可以反映出接收端的用户发起聊天的时间,因此,通过上述方法在聊天界面中显示出的各条消息的排列顺序能够反映出实际聊天过程中的时序关系。
为了便于理解,以下结合附图对本申请实施例提供的一种消息的显示方法进行具体介绍。以下实施例中均以手机A与手机B之间的聊天过程举例说明。
图5为本申请实施例提供的一种消息的显示方法的流程示意图。如图5所示,该消息的显示方法的方法可以包括:
S501、手机A显示与第一联系人的第一聊天界面。
手机A打开某一通话应用或聊天应用后,用户(例如Sara)可选择进入第一联系人(例如Mike)的第一聊天界面。如图6中的(a)所示,手机A显示的第一聊天界面601中包括第一输入框602以及与联系人Mike的第一对话区域603。用户Sara可使用输入法应用向第一输入框602中输入向Mike发送的消息(即手机A的发送消息)。
相应的,如图6中的(b)所示,第一联系人Mike的手机B也可以显示与用户Sara的第二聊天界面604。第二聊天界面604中包括第二输入框605以及与联系人Sara的第二对话区域606。Mike可使用输入法应用向第二输入框605中输入向Sara发送的消息(即手机A的接收消息)。
另外,上述实施例中是以第一联系人为Mike举例说明的,可以理解的是,第一联系人还可以包括多个联系人,即用户Sara与第一联系人中的各个联系人属于同一群组。如图7所示,用户Sara可打开名称为“我的朋友们”的群组701,进入与群组701的聊天界面。群组701中可以包括多个联系人,群组701中任意联系人发送的消息均可显示在群组701的聊天界面中。
S502、手机A接收用户向上述第一聊天界面的第一输入框中输入的第一消息。
用户Sara使用手机A向第一联系人Mike发送消息时,可点击第一聊天界面601中的第一输入框602。响应于用户在第一输入框602的点击操作,如图8中的(a)所示,手机A可调出输入法应用,并在第一聊天界面601上显示输入法应用提供的虚拟键盘801。这样,用户Sara可使用虚拟键盘801在第一输入框602中输入向Mike发送的第一消息802。
一般,向第一输入框602中输入的字符包括两类,一类字符是文本字符,例如,字母、文字或者符号等,其中符号可包括标点、单位以及表情符等,另一类字符是命令字符,例如,删除键的字符、换行键的字符或者回车键的字符等。在用户Sara向第一输入框602中输入字符的过程中,第一消息802的具体内容可随着用户Sara的输入操作而变化。
如图8中的(a)所示,当手机A检测到Sara向第一输入框602中输入的第一个文本字符(即首字符“H”)时,手机A可记录首字符“H”的输入时间(例如,12点08分12秒),此时第一消息802中仅包括字母“H”。
当手机A接收到Sara向第一输入框602中输入的第N(N>1)个文本字符时,手机A可将接收到的文本字符按照输入顺序追加显示至首字符“H”之后,此时第一消息802的内容随之增加。
当手机A接收到Sara向第一输入框602中输入的命令字符时,手机A可对输入框中的第一消息802执行相对应的操作。例如,如果Sara向第一输入框602中输入删除键的字符,手机A可向前删除当前第一消息802中一个字符。又例如,如果Sara向第一输入框602中输入换行键或回车键等用于指示本次消息结束的预设字符,则手机A可将此时第一输入框602中的所有字符作为完整的第一消息802,并将第一消息802从第一输入框602中清除。
后续,如果手机A再接收到用户Sara向第一输入框602中输入的字符,则手机A可将该字符作为下一条聊天消息的首字符,进而重新执行步骤S502-S507的方法显示下一条聊天消息。
另外,在手机A接收Sara向上述第一输入框602中输入的第一消息的同时,手机A还可执行下述步骤S503和S504。也就是说,响应于用户输入第一消息的操作,手机A可执行下述步骤S503和S504,以便在发送端(手机A)和接收端(手机B)上显示该第一消息。
S503、手机A在上述第一聊天界面的第一对话区域中显示上述第一消息,第一消息的发送时间为第一消息中首字符的输入时间。
其中,上述第一对话区域中各条发送消息(包括上述第一消息)是按照发送时间的先后排列的。也就是说,手机A在显示用户发送的各条消息时均按照发起聊天时首字符的输入先后顺序进行显示的。
示例性的,第一消息中首字符的输入时间可以是指手机A检测到第一输入框中出现首字符的时间点。当第一消息为语音消息时,第一消息中首字符的输入时间也可以是手机A通过语音识别技术识别出第一消息中首字符的时间点,本申请实施例对此不做任何限制。
在本申请的一些实施例中,如图9所示,手机A可以在检测到用户Sara向第一输入框602中输入用于结束第一消息802的换行键的字符后,将第一输入框602中的所有字符“Hi,how are you”作为第一消息802显示在第一对话区域603中。并且,在第一对话区域603中显示第一消息802时,手机A还可以显示第一消息802的发送时间:12点08分12秒(即首字符“H”的输入时间)。
例如,虽然Sara在第一输入框602中输入完“Hi,how are you”后点击换行键的时间是12点08分56秒,但如图9所示,手机A在第一聊天界面601中显示“Hi,how are you”这一条第一消息802时还是将首字符“H”的输入时间:12点08分12秒作为发送时间进行显示。由于12点08分12秒发送的第一消息802是手机A最近一条发送的消息,并且,在12点08分12秒之后手机A没有接收到Mike发送来的其他消息,因此,如图9所示,手机A可将第一消息802作为当前第一对话区域603中的最新一条聊天记录进行显示。其中,最新一条聊天记录可以显示在第一对话区域603的顶部或底部,本申请实施例对此不做任何限制。
这样,即使Sara在12点08分12秒至12点08分56秒之间接收到Mike发来的其他聊天消息,但由于Sara输入首字符“H”的输入时间较早,说明Sara发起聊天的时间更早,因此,手机A还是会将上述第一消息802按照12点08分12秒的发送时间显示在Mike发来的其他聊天消息之前,从而在第一对话区域603中准确的反映出各条聊天消息之间的实际发生的顺序。
在本申请的另一些实施例中,如图8中的(a)所示,手机A也可以在Sara向第一输入框602中输入第一消息802中每个字符的同时,同步在第一对话区域603中显示第一消息802。此时,第一对话区域603中第一消息802的内容随着第一输入框602中字符的变化而变化,但第一对话区域603中第一消息802与其他消息仍然是按照每一条消息的发送时间(或接收时间)的先后顺序排列的。这样,不仅可以在第一对话区域603中准确反映出用户发起聊天的时间顺序,用户在输入聊天消息时还可以在第一对话区域603中实时的显示该聊天消息中的内容,从而提高用户聊天时的使用体验。
S504、手机A向第一联系人的手机B发送上述第一消息,手机A发送第一消息的过程与用户输入第一消息的过程同步。
如图8中的(a)-(b)所示,在Sara向第一输入框602中输入第一消息802中每个字符的同时,手机A还可以基于RTT技术将第一输入框602中检测到的每个字符同步发送给第一联系人Mike的手机B。
例如,当手机A检测到Sara向第一输入框602中输入第一消息802的第一个文本字符(即首字符“H”)后,便可将首字符“H”发送给Mike的手机B。手机B接收到首字符“H”后,可以记录接收到首字符“H”的接收时间(例如12点08分13秒)。
当手机A接收到Sara向第一输入框602中输入的第N(N>1)个文本字符时,手机A可将收到的文本字符按照输入顺序依次发送给手机B。
当手机A接收到Sara向第一输入框602中输入的命令字符时,手机A也可将该命令字符发送给手机B。例如,如果Sara向第一输入框602中输入删除键的字符,手机A可将删除键的字符同步发送给手机B,使得手机B响应于该命令字符将接收到的最近一个字符删除。又例如,如果Sara向第一输入框602中输入换行键(或回车键)等用于结束本次消息的预设字符,则手机A同样可将换行键的字符发送给手机B,使得手机B获知手机A本次发送来的第一消息802已经结束。
后续,如果手机B再接收到手机A发送来的字符,则手机B可将该字符作为下一条接收消息的首字符,进而重新执行步骤S505-S507的方法显示下一条接收消息。
S505、手机B在第二聊天界面的第二对话区域中显示上述第一消息。
其中,第一消息的接收时间可以是手机B接收到第一消息中首字符的接收时间,例如上述首字符“H”的接收时间:12点08分13秒;或者,第一消息的接收时间也可以是手机A向手机B发送第一消息中的首字符时的发送时间;又或者,第一消息的接收时间也可以是手机A检测到用户输入第一消息中首字符的输入时间,例如上述首字符“H”的输入时间:12点08分12秒,本申请实施例对此不做任何限制。手机在上述第二对话区域中显示各条消息时,也是按照各条消息的接收时间或发送时间的先后进行排序的。
在本申请的一些实施例中,如图8中的(b)所示,手机B可以在接收手机A发来的第一消息802中每个字符的同时,同步在第二聊天界面604的第二对话区域606中显示第一消息802。也就是说,手机B每接收到一个字符后便可立即将该字符显示在第二对话区域606的第一消息802内,这样,Mike从第二对话区域606中读取到的第一消息802的内容也是随着Sara在第一输入框602内输入的字符而变化的。
另外,手机B在第二对话区域606内显示接收到的第一消息802时,可以将手机B接收第一消息802中首字符“H”的接收时间(12点08分13秒)作为第一消息802的接收时间,并将该接收时间显示在第一消息802的周围。同时,第一消息802在第二对话区域606中的位置也是按照第一消息802的接收时间确定的。例如,如果在12点08分13秒之前手机B接收到某一接收消息,则手机B可将第一消息802显示在该接收消息之后。相应的,如果在12点08分13秒之后手机B接收到Mike向Sara输入的某一发送消息,则手机B可将第一消息802显示在该发送消息之前。
这样,即使手机A还没有发来完整的第一消息802,接收人Mike已经可以实时看到发送人Sara正在发送的第一消息802。并且,由于第一消息802中首字符的接收时间可以反映出发送方Sara的发起聊天的时间,因此,将首字符的接收时间作为第一消息802的接收时间后,第一消息802在第二对话区域606中与其他消息的排列顺序能够反映出聊天过程中的实际时序关系。
在本申请的另一些实施例中,如图10所示,手机B可以在接收到手机A发送来的换行键的字符后,将本次接收到的所有字符(例如“Hi,how are you”)作为第一消息802显示在第二聊天界面604中。在第二聊天界面604中显示第一消息802时,手机B仍然是将第一消息802中首字符“H”的接收时间(12点08分13秒)作为第一消息802的接收时间显示在第二对话区域606中。
例如,虽然手机B接收到“Hi,how are you”之后,接收到换行键的字符“/n”的时 间是12点08分59秒,但如图10所示,手机B在第二对话区域606中显示“Hi,how areyou”这一第一消息802时,还是按照首字符“H”的接收时间12点08分13秒显示的。这样,即使手机B在12点08分13秒至12点08分59秒之间产生了新的聊天消息,例如图10中Mike在12点08分42秒发送的聊天消息1001,但由于手机B接收首字符“H”的接收时间较早,说明Sara发起聊天的时间更早,因此,手机B还是会将上述第一消息802按照12点08分13秒的接收时间显示在Mike发送的聊天消息1001之前,从而在第二聊天界面604中准确的反映出各条聊天消息之间的实际聊天顺序。
又或者,在本申请的另一些实施例中,由于手机A已经记录了Sara在第一输入框602中输入第一消息802中首字符“H”的输入时间(例如,12点08分12秒),那么,手机A在向手机B发送第一消息802时还可以将首字符“H”的输入时间发送给手机B。那么,如图11所示,手机B可以将首字符“H”的输入时间作为第一消息802的接收时间,并按照这一接收时间在第二对话区域606中排列第一消息802与其他消息的显示顺序。这样,Mike在第二对话区域606中看到的第一消息802的接收时间即为Sara开始输入第一消息802中首字符时的输入时间,可避免因传输时延导致的各条聊天消息之间的时序发生错乱的问题。
S506、手机A接收手机B发来的第二消息。
与上述步骤S502-S504中Sara在手机A显示的第一聊天界面601中输入向Mike发送第一消息802的过程类似,在步骤S506中,Mike也可以在手机B显示的第二聊天界面604中输入向Sara发送的第二消息。
示例性的,如图12中的(b)所示,Mike可以使用输入法应用向第二输入框605中输入第二消息1201。手机B在检测到第二输入框605中的首字符“O”之后,可记录首字符“O”的输入时间(例如12点09分01秒),并将首字符“O”的输入时间作为手机B发送第二消息1201的发送时间。那么,手机B可以按照该发送时间在第二对话区域606中创建第二消息1201的消息框,在该消息框中同步显示Mike在第二输入框605中输入的第二消息1201。
同时,手机B可以将第二输入框605中接收到的字符同步发送给接收方Sara的手机A,即向手机A发送Mike输入的第二消息1201。手机A接收到第二消息1201中的首字符“O”之后,也可以记录首字符“O”的接收时间(例如12点09分02秒),并执行下述步骤S507。
S507、手机A在上述第一聊天界面中显示上述第二消息。
在本申请的一些实施例中,如图12中的(a)所示,手机A在上述第一对话区域603中显示第二消息1201的方法,可参见步骤S505中手机B在第二对话区域606中显示上述第一消息802的相关描述,此时,第二消息1201在第一对话区域603中的接收时间为首字符“O”的接收时间:12点09分02秒。
在本申请的另一些实施例中,如图13中的(a)所示,手机A在第一聊天界面601中显示上述第二消息1201的过程中,如果还未接收到手机B发送来的换行键的字符,则可认为第二消息1201的发送方Mike还在输入第二消息1201中的内容。此时,为了保证第二消息1201的接收方Sara能够完整的阅读到第二消息1201中的内容,手机A可将正在接收的第二消息1201作为第一对话区域603中的最新一条接收消息显示在所有消息之后。
仍如图13中的(a)所示,手机A可将正在接收的第二消息1201显示为最新一条接收消息。并且,手机A还可以在第二消息1201周围显示提示语1301,以提示用户Sara对方发来的第二消息1201还未结束。此时,如果用户Sara在第一输入框602中输入新的聊天消息1302,虽然聊天消息1302中首字符的输入时间晚于第二消息1201中首字符“O”的接收时间,但由于第二消息1201还处于正在接收的状态,因此,手机A可将聊天消息1302显示在第二消息1201的前面,方便Sara阅读Mike正在发送的第二消息1201。
后续,当手机A接收到手机B发送的换行键的字符后,可认为手机B本次发送的第二消息1201已经结束,那么,如图13中的(b)所示,手机A可按照第二消息1201中首字符“O”的接收时间:12点09分02秒,重新排列第二消息1201在第一对话区域603中的显示位置。此时,由于第二消息1201中首字符“O”的接收时间早于上述聊天消息1302中首字符的输入时间,因此,手机A将第二消息1201显示在聊天消息1302之前,从而恢复第一对话区域603中各个聊天消息之间的实际时序关系。
当然,手机A在显示Sara输入的聊天消息(例如上述第一消息802)时,如果没有检测到Sara在第一输入框602中输入换行键的字符,说明第一消息802还未输入完毕,那么,手机A也可将正在输入的第一消息802作为第一对话区域603中的最新一条聊天消息显示在所有聊天消息之后。
又或者,如果手机A既没有检测到手机B发送的换行键的字符,也没有检测到Sara在第一输入框602中输入换行键的字符,则说明Sara正在输入的第一消息802和Mike发来的第二消息1201都处于未完成的状态,那么,手机A可以将第一消息802作为第一聊天界面601中的最新一条消息显示在所有聊天消息之后,也可以将第二消息1201作为第一聊天界面601中的最新一条消息显示在所有聊天消息之后,还可以按照第一消息802中首字符的输入时间和第二消息1201中首字符的接收时间之间的先后顺序,确定将哪一条聊天消息作为最后一条聊天消息显示在所有聊天消息之后,本申请实施例对此不做任何限制。
在本申请的一些实施例中,本申请实施例公开了一种终端,如图14所示,该终端用于实现以上各个方法实施例中记载的方法,其包括:显示单元1401、获取单元1402以及发送单元1403。其中,显示单元1401用于支持终端执行图5中的过程S501、S503以及S507;获取单元1402支持终端执行图5中的过程S502和S506;发送单元1403用于支持终端执行图5中的过程S504。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在本申请的另一些实施例中,本申请实施例公开了一种终端,如图15所示,该终端可以包括:触摸屏1501,其中,所述触摸屏1501包括触敏表面1506和显示屏1507;一个或多个处理器1502;存储器1503;一个或多个应用程序(未示出);以及一个或多个计算机程序1504,上述各器件可以通过一个或多个通信总线1505连接。其中该一个或多个计算机程序1504被存储在上述存储器1503中并被配置为被该一个或多个处理器1502执行,该一个或多个计算机程序1504包括指令,上述指令可以用于执行如图5及相应实施例中的各个步骤。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便 和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。

Claims (31)

  1. 一种消息的显示方法,其特征在于,包括:
    第一终端显示与第二终端的聊天界面,所述聊天界面中包括输入框和对话区域;
    所述第一终端在第一时刻接收到用户向所述输入框中输入的第一消息的首字符,所述第一消息包括X个字符,X为大于0的整数;
    所述第一终端从第一时刻开始向所述第二终端实时发送用户在所述输入框中输入的字符;
    所述第一终端在第二时刻接收到所述第二终端发送的第二消息的首字符,所述第二时刻晚于所述第一时刻,所述第二消息包括Y个字符,Y为大于0的整数;
    所述第一终端在第三时刻接收到用户向所述输入框中输入的第一预设字符,所述第一预设字符用于指示所述第一消息结束,所述第三时刻晚于所述第二时刻;
    所述第一终端在所述对话区域中显示所述第一消息和所述第二消息,使得所述第一消息显示为比所述第二消息更早的消息。
  2. 根据权利要求1所述的消息的显示方法,其特征在于,所述第一消息的发送时间为所述第一时刻,所述第二消息的接收时间为所述第二时刻或所述第一时刻。
  3. 根据权利要求1或2所述的消息的显示方法,其特征在于,所述方法还包括:
    在所述第一时刻和所述第三时刻之间,所述第一终端接收用户向所述输入框中输入的所述第一消息中除首字符之外的X-1个字符;
    其中,所述第一终端在所述对话区域中显示所述第一消息,包括:
    当所述输入框中每显示出所述X个字符中的一个字符时,所述第一终端将该字符同步显示在所述对话区域的第一消息框中。
  4. 根据权利要求1-3中任一项所述的消息的显示方法,其特征在于,在所述第一终端在第三时刻接收到用户向所述输入框中输入的第一预设字符之后,还包括:
    所述第一终端清空所述输入框中的所有字符。
  5. 根据权利要求1-4中任一项所述的消息的显示方法,其特征在于,在所述第一终端在第二时刻接收到所述第二终端发送的第二消息的首字符之后,还包括:
    所述第一终端在第四时刻接收到所述第二终端发送的第二预设字符,所述第二预设字符用于指示所述第二消息结束。
  6. 根据权利要求5所述的消息的显示方法,其特征在于,所述方法还包括:
    在所述第二时刻和所述第四时刻之间,所述第一终端接收所述第二终端发送的所述第二消息中除首字符之外的Y-1个字符;
    其中,所述第一终端在所述对话区域中显示所述第二消息,包括:
    当所述第一终端每接收到所述Y个字符中的一个字符时,所述第一终端将该字符同步显示在所述对话区域的第二消息框中。
  7. 根据权利要求5或6所述的消息的显示方法,其特征在于,所述方法还包括:
    在所述第二时刻和所述第四时刻之间,所述第一终端在所述对话区域中将所述第二消息显示为最新的消息,并且,所述第一终端显示所述第二消息正在被输入的提示语。
  8. 根据权利要求7所述的消息的显示方法,其特征在于,所述方法还包括:
    在所述第二时刻和所述第四时刻之间,所述第一终端接收到用户向所述输入框中输入 的第三消息的首字符,所述第三消息包括Z个字符,Z为大于0的整数;
    所述第一终端在所述对话区域中将所述第三消息显示为比所述第二消息更早的消息。
  9. 根据权利要求8所述的消息的显示方法,其特征在于,在所述第一终端在第四时刻接收到所述第二终端发送的第二预设字符之后,还包括:
    所述第一终端在所述对话区域更新显示,使得所述第三消息显示为比所述第二消息更晚的消息。
  10. 根据权利要求1-9中任一项所述的消息的显示方法,其特征在于,所述方法还包括:
    所述第一终端在所述对话区域中显示所述第一消息的发送时间和所述第二消息的接收时间。
  11. 一种消息的显示方法,其特征在于,包括:
    第一终端显示与第二终端的聊天界面,所述聊天界面中包括对话区域;
    所述第一终端在第一时刻接收到第二终端发送的第一消息的首字符,所述第一消息包括Y个字符,Y为大于0的整数;
    所述第一终端接收到第二终端发送的所述第一消息中除首字符之外的Y-1个字符;
    当所述第一终端每接收到所述Y个字符中的一个字符时,所述第一终端将该字符同步显示在所述对话区域的第一消息框中,所述第一消息为所述对话区域中的最新消息,所述第一消息的接收时间为所述第一时刻。
  12. 根据权利要求11所述的消息的显示方法,其特征在于,在所述第一终端接收到第二终端发送的所述第一消息中的Y-1个字符之后,还包括:
    所述第一终端在第二时刻接收到第二终端发送的预设字符,所述预设字符用于指示所述第一消息结束,所述第二时刻晚于所述第一时刻。
  13. 根据权利要求12所述的消息的显示方法,其特征在于,所述方法还包括:
    在所述第一时刻和所述第二时刻之间,所述第一终端接收到用户输入的第二消息的首字符,所述第二消息包括X个字符,X为大于0的整数;
    所述第一终端在所述对话区域中将所述第二消息显示为比所述第一消息更早的消息。
  14. 根据权利要求13所述的消息的显示方法,其特征在于,在所述第一终端在第二时刻接收到第二终端发送的预设字符之后,所述方法还包括:
    所述第一终端在所述对话区域更新显示,使得所述第一消息显示为比所述第二消息更早的消息。
  15. 一种终端,所述终端为第一终端,其特征在于,所述第一终端包括:
    触摸屏,其中,所述触摸屏包括触敏表面和显示器;
    一个或多个处理器;
    一个或多个存储器;
    以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述一个或多个存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述终端执行时,使得所述终端执行以下步骤:
    显示与第二终端的聊天界面,所述聊天界面中包括输入框和对话区域;
    在第一时刻接收到用户向所述输入框中输入的第一消息的首字符,所述第一消息包括 X个字符,X为大于0的整数;
    从第一时刻开始向所述第二终端实时发送用户在所述输入框中输入的字符;
    在第二时刻接收到所述第二终端发送的第二消息的首字符,所述第二时刻晚于所述第一时刻,所述第二消息包括Y个字符,Y为大于0的整数;
    在第三时刻接收到用户向所述输入框中输入的第一预设字符,所述第一预设字符用于指示所述第一消息结束,所述第三时刻晚于所述第二时刻;
    在所述对话区域中显示所述第一消息和所述第二消息,使得所述第一消息显示为比所述第二消息更早的消息。
  16. 根据权利要求15所述的终端,其特征在于,所述终端还用于执行:
    在所述第一时刻和所述第三时刻之间,接收用户向所述输入框中输入的所述第一消息中除首字符之外的X-1个字符;
    其中,所述第一终端在所述对话区域中显示所述第一消息,具体包括:
    当所述输入框中每显示出所述X个字符中的一个字符时,将该字符同步显示在所述对话区域的第一消息框中。
  17. 根据权利要求15或16所述的终端,其特征在于,所述终端还用于执行:
    在所述第三时刻清空所述输入框中的所有字符。
  18. 根据权利要求15-17中任一项所述的终端,其特征在于,所述终端还用于执行:
    在第四时刻接收到所述第二终端发送的第二预设字符,所述第二预设字符用于指示所述第二消息结束。
  19. 根据权利要求18所述的终端,其特征在于,所述终端还用于执行:
    在所述第二时刻和所述第四时刻之间,接收所述第二终端发送的所述第二消息中除首字符之外的Y-1个字符;
    其中,所述第一终端在所述对话区域中显示所述第二消息,具体包括:
    当所述第一终端每接收到所述Y个字符中的一个字符时,将该字符同步显示在所述对话区域的第二消息框中。
  20. 根据权利要求18或19所述的终端,其特征在于,所述终端还用于执行:
    在所述第二时刻和所述第四时刻之间,在所述对话区域中将所述第二消息显示为最新的消息,并且,所述第一终端显示所述第二消息正在被输入的提示语。
  21. 根据权利要求20所述的终端,其特征在于,所述终端还用于执行:
    在所述第二时刻和所述第四时刻之间,接收到用户向所述输入框中输入的第三消息的首字符,所述第三消息包括Z个字符,Z为大于0的整数;
    在所述对话区域中将所述第三消息显示为比所述第二消息更早的消息。
  22. 根据权利要求21所述的终端,其特征在于,所述终端还用于执行:
    在所述第四时刻更新显示所述对话区域,使得所述第三消息显示为比所述第二消息更晚的消息。
  23. 根据权利要求15-22中任一项所述的终端,其特征在于,所述终端还用于执行:
    在所述对话区域中显示所述第一消息的发送时间和所述第二消息的接收时间,所述第一消息的发送时间为所述第一时刻,所述第二消息的接收时间为所述第二时刻或所述第一时刻。
  24. 一种终端,所述终端为第一终端,其特征在于,所述第一终端包括:
    触摸屏,其中,所述触摸屏包括触敏表面和显示器;
    一个或多个处理器;
    一个或多个存储器;
    以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述一个或多个存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述终端执行时,使得所述终端执行以下步骤:
    显示与第二终端的聊天界面,所述聊天界面中包括对话区域;
    在第一时刻接收到第二终端发送的第一消息的首字符,所述第一消息包括Y个字符,Y为大于0的整数;
    接收到第二终端发送的所述第一消息中除首字符之外的Y-1个字符;
    当所述第一终端每接收到所述Y个字符中的一个字符时,将该字符同步显示在所述对话区域的第一消息框中,所述第一消息为所述对话区域中的最新消息,所述第一消息的接收时间为所述第一时刻。
  25. 根据权利要求24所述的终端,其特征在于,所述终端还用于执行:
    在第二时刻接收到第二终端发送的预设字符,所述预设字符用于指示所述第一消息结束,所述第二时刻晚于所述第一时刻。
  26. 根据权利要求25所述的终端,其特征在于,所述终端还用于执行:
    在所述第一时刻和所述第二时刻之间,接收到用户输入的第二消息的首字符,所述第二消息包括X个字符,X为大于0的整数;
    在所述对话区域中将所述第二消息显示为比所述第一消息更早的消息。
  27. 根据权利要求26所述的终端,其特征在于,所述终端还用于执行:
    在所述第二时刻更新显示所述对话区域,使得所述第一消息显示为比所述第二消息更早的消息。
  28. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在终端上运行时,使得所述终端执行如权利要求1-10或11-14中任一项所述的一种消息的显示方法。
  29. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在终端上运行时,使得所述终端执行如权利要求1-10或11-14中任一项所述的一种消息的显示方法。
  30. 一种图形用户界面GUI,所述图形用户界面存储在第一终端中,所述第一终端包括触摸屏、存储器、一个或多个处理器,所述一个或多个处理器用于执行存储在所述存储器中的一个或多个计算机程序,其特征在于,所述图形用户界面包括:
    显示在所述触摸屏上的第一GUI,所述第一GUI包括与第二终端的聊天界面,所述聊天界面中包括输入框和对话区域;
    响应于用户在所述输入框中输入第一消息的输入操作,在所述触摸屏上显示第二GUI,在所述第二GUI中所述对话区域内显示的所述第一消息随着所述输入操作实时更新,所述第一消息包括X个字符,X为大于0的整数;
    响应于所述第二终端发送的第二消息,在所述触摸屏上显示第三GUI,在所述第三GUI中所述对话区域内显示的所述第二消息随着接收到的第二消息中的内容实时更新,所 述第二消息包括Y个字符,Y为大于0的整数;
    其中,所述第一消息和所述第二消息在所述对话区域中的显示顺序与所述第一消息中首字符的输入时间和所述第二消息中首字符的接收时间的关系一致。
  31. 根据权利要求30所述的GUI,其特征在于,
    在接收到指示所述第二消息结束的预设字符之前,所述第二消息在所述对话区域中显示为最新的消息;
    在接收到指示所述第二消息结束的预设字符之后,所述第一消息和所述第二消息在所述对话区域中的显示顺序与所述第一消息中首字符的输入时间和所述第二消息中首字符的接收时间的关系一致。
PCT/CN2018/096151 2018-07-18 2018-07-18 一种消息的显示方法及终端 WO2020014900A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2018/096151 WO2020014900A1 (zh) 2018-07-18 2018-07-18 一种消息的显示方法及终端
CN201880075198.6A CN111373703B (zh) 2018-07-18 2018-07-18 一种消息的显示方法及终端
US17/260,910 US11310177B2 (en) 2018-07-18 2018-07-18 Message display method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/096151 WO2020014900A1 (zh) 2018-07-18 2018-07-18 一种消息的显示方法及终端

Publications (1)

Publication Number Publication Date
WO2020014900A1 true WO2020014900A1 (zh) 2020-01-23

Family

ID=69164229

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/096151 WO2020014900A1 (zh) 2018-07-18 2018-07-18 一种消息的显示方法及终端

Country Status (3)

Country Link
US (1) US11310177B2 (zh)
CN (1) CN111373703B (zh)
WO (1) WO2020014900A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118214736A (zh) * 2021-03-08 2024-06-18 华为技术有限公司 消息的保序方法、可读介质和电子设备
CN115378896B (zh) * 2022-08-26 2024-01-30 北京字跳网络技术有限公司 一种消息展示方法、装置、电子设备和存储介质
CN117714271B (zh) * 2023-07-28 2024-09-17 荣耀终端有限公司 消息处理方法及相关装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932232A (zh) * 2011-08-10 2013-02-13 腾讯科技(深圳)有限公司 即时通信终端和实时显示会话消息的方法
CN104854824A (zh) * 2012-11-30 2015-08-19 奥兰治 用于在延迟模式中或在实时模式中传送文本消息的方法、对应产生装置以及计算机程序
US20170126596A1 (en) * 2015-10-30 2017-05-04 Line Corporation Display method, information processing device, information processing terminal, display program
CN108111396A (zh) * 2017-12-13 2018-06-01 北京小米移动软件有限公司 对话消息排序方法、装置及设备

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU6276601A (en) 2000-05-29 2001-12-11 Yongseob Lee Communication service apparatus capable of interactive communication with any email user(s) at real time and method thereof
GB0414715D0 (en) 2004-07-01 2004-08-04 Ibm Method and apparatus for instant messaging
US9288078B2 (en) 2005-03-25 2016-03-15 Qualcomm Incorporated Apparatus and methods for managing content exchange on a wireless device
CN103873341B (zh) 2012-12-10 2015-07-29 腾讯科技(深圳)有限公司 一种消息处理方法及系统
JP6097679B2 (ja) * 2013-02-28 2017-03-15 エルジー アプラス コーポレーション 端末間機能共有方法及びその端末
CN103457835B (zh) 2013-08-18 2018-05-04 苏州量跃信息科技有限公司 即时通信中交互记录汇总的方法及系统
CN105681160B (zh) 2014-11-21 2019-02-05 中国移动通信集团公司 一种即时通信系统中纠正会话消息乱序的方法及装置
CN104506330B (zh) 2014-11-28 2018-08-17 北京奇艺世纪科技有限公司 一种消息同步方法和系统
CN105391620B (zh) 2015-12-02 2019-08-30 小米科技有限责任公司 信息提示方法及装置
CN107193818A (zh) 2016-03-14 2017-09-22 百度在线网络技术(北京)有限公司 一种搜索方法、装置和终端设备
CN107547353A (zh) 2016-06-25 2018-01-05 徐超 一种有助于传达用户真实想法的聊天系统的方法
CN106506323A (zh) 2016-09-12 2017-03-15 努比亚技术有限公司 一种聊天内容整理装置及方法
CN106791052A (zh) * 2016-12-07 2017-05-31 惠州Tcl移动通信有限公司 一种移动终端筛选即时通信应用中聊天记录的方法及系统
KR102136413B1 (ko) * 2017-04-06 2020-07-21 주식회사 스무디 다자간 커뮤니케이션 서비스를 제공하기 위한 방법, 시스템 및 비일시성의 컴퓨터 판독 가능 기록 매체
US10796103B2 (en) * 2017-07-12 2020-10-06 T-Mobile Usa, Inc. Word-by-word transmission of real time text
US10404632B2 (en) * 2017-07-12 2019-09-03 T-Mobile Usa, Inc. Determining when to partition real time text content and display the partitioned content within separate conversation bubbles
US11153235B1 (en) * 2020-06-09 2021-10-19 Apple Inc. User interfaces for messages

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932232A (zh) * 2011-08-10 2013-02-13 腾讯科技(深圳)有限公司 即时通信终端和实时显示会话消息的方法
CN104854824A (zh) * 2012-11-30 2015-08-19 奥兰治 用于在延迟模式中或在实时模式中传送文本消息的方法、对应产生装置以及计算机程序
US20170126596A1 (en) * 2015-10-30 2017-05-04 Line Corporation Display method, information processing device, information processing terminal, display program
CN108111396A (zh) * 2017-12-13 2018-06-01 北京小米移动软件有限公司 对话消息排序方法、装置及设备

Also Published As

Publication number Publication date
US20210266273A1 (en) 2021-08-26
US11310177B2 (en) 2022-04-19
CN111373703A (zh) 2020-07-03
CN111373703B (zh) 2021-11-19

Similar Documents

Publication Publication Date Title
US11880628B2 (en) Screen mirroring display method and electronic device
WO2020244492A1 (zh) 一种投屏显示方法及电子设备
CN112291764B (zh) 一种内容接续系统
EP4060475A1 (en) Multi-screen cooperation method and system, and electronic device
US20230403458A1 (en) Camera Invocation Method and System, and Electronic Device
EP4213489A1 (en) Device recommendation method and electronic device
WO2020006711A1 (zh) 一种消息的播放方法及终端
CN115048067A (zh) 一种投屏显示方法及电子设备
WO2020014900A1 (zh) 一种消息的显示方法及终端
CN113835649A (zh) 一种投屏方法和终端
EP4254927A1 (en) Photographing method and electronic device
WO2022127670A1 (zh) 一种通话方法、相关设备和系统
WO2021042881A1 (zh) 消息通知方法及电子设备
EP4354270A1 (en) Service recommendation method and electronic device
CN116301541A (zh) 共享文件的方法、电子设备及计算机可读存储介质
US20240244017A1 (en) Service Sharing Method and System, and Electronic Device
JP2018503149A (ja) 情報入力方法、装置、プログラム及び記録媒体
CN112786022A (zh) 终端、第一语音服务器、第二语音服务器及语音识别方法
US20240089231A1 (en) Chat interface creation method and electronic device
CN116016418B (zh) 一种信息交互方法及电子设备
CN115134321A (zh) 一种消息处理方法及装置
CN118101641A (zh) 截图分享方法及电子设备
CN118677499A (zh) 一种卫星消息传输方法、系统与终端设备
CN114513479A (zh) 消息收发方法、装置、终端、服务器及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18926921

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18926921

Country of ref document: EP

Kind code of ref document: A1