On April 20, Shanghai Huandian Information Technology Co., Ltd., an affiliate of Bilibili, published a patent for "a real-time chat method" with the publication number CN106059909B.
According to the patent summary of the company, the present invention optimizes the current display form of messages arranged on the time axis, increases the utilization of screen space, reduces the operation of users constantly scrolling upwards due to the excessive number of messages, and improves the user experience.
According to the introduction of Bilibili, the present invention discloses a real-time chat method, which includes the following steps: S1, enter the real-time conversation channel established through the TCP/IP and UDP protocols, which is a chat window interface in the appearance of the device; S2, confirm whether a message display area is created on the device screen. If not, create a message display area; S3, create an ordered message queue, filter and calculate the message queue, and add to the message display area of the device screen in a waterfall flow in chronological order, stop moving when the message flow exceeds the device screen, and remove the device screen range.