CN106059909A - Real-time chat method - Google Patents

Real-time chat method Download PDF

Info

Publication number
CN106059909A
CN106059909A CN201610696488.5A CN201610696488A CN106059909A CN 106059909 A CN106059909 A CN 106059909A CN 201610696488 A CN201610696488 A CN 201610696488A CN 106059909 A CN106059909 A CN 106059909A
Authority
CN
China
Prior art keywords
message
screen
time
device screen
queue
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201610696488.5A
Other languages
Chinese (zh)
Other versions
CN106059909B (en
Inventor
谭兆歆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Huandian Information Technology Co Ltd
Original Assignee
Shanghai Huandian Information Technology Co Ltd
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 Shanghai Huandian Information Technology Co Ltd filed Critical Shanghai Huandian Information Technology Co Ltd
Priority to CN201610696488.5A priority Critical patent/CN106059909B/en
Publication of CN106059909A publication Critical patent/CN106059909A/en
Application granted granted Critical
Publication of CN106059909B publication Critical patent/CN106059909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72436User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for text messaging, e.g. SMS or e-mail

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a real-time chat method. The method comprises the steps of S1, entering an instant session channel established through TCP/IP and UDP protocols, wherein the instant session channel is presented as a chat window interface on a device; S2, confirming whether a message display area is established in a device screen or not, and establishing the message display area if the message display area is not established; and S3, establishing an ordered message queue, filtering and calculating the message queue, adding the message queue to the message display area of the device screen in a waterfall flow mode according to a time sequence, stopping shifting when message flow exceeds the range of the device screen, and shifting out of the range of the device screen. According to the method, an existing message display form of carrying out arrangement according to a time shaft is optimized; a space utilization rate of the screen is improved; continuous upturning lookup operations of a user due to excessive quantity of messages are reduced; and the user experience is improved.

Description

A kind of live chat method
Technical field
The present invention relates to real-time information display field, particularly to one, horizontal waterfall type expression forms of information is merely introduced The method of it instrument.
Background technology
Mostly live chat instrument is to carry out communication based on TCP/IP and UDP, TCP/IP and UDP is built upon lower level IP agreement on two kinds of communication transfer agreements.Live chat instrument allows to set up multiple chat sessions passage, and each session is led to Road can transmit instant message between two or several user, and the message that user sends all can instant playback setting both sides On standby screen.
User, when the currently active chat sessions bands window, can send this gap marker symbol, server to server Return the chat sessions path message of this mark in real time.Other chat sessions passage set up for user, server can will connect The message storage received, only returns the quantity of unread message, sends request, clothes when user activates chat sessions passage to server Business device returns again to concrete unread message.
When receiving message, live chat instrument can on time countershaft order with the arrangement mode of horizontal sequence by message display On device screen, after the message number of accumulation exceedes the size limitation of device screen, time shaft message earlier can be hidden Hiding, user can check message earlier by the screen that scrolls up.
Summary of the invention
It is an object of the invention to provide a kind of live chat method, the message optimizing countershaft arrangement the most on time represents shape Formula, increases screen space utilization rate, reduce user because message number too much and constantly on thumb the operation read, promote user's body Test.
In order to realize object above, the present invention is achieved by the following technical solutions:
A kind of live chat method, is characterized in, the method comprises the steps of:
S1, enters through TCP/IP and the instant session channel of udp protocol foundation, is chat window circle in equipment performance Face;
S2, confirming whether create message display region on device screen, if not having, then creating a message display region;
S3, creates an ordered message queue, and described message queue is filtered and calculated, sequentially in time Add on the message display region of device screen with waterfall stream mode, stop mobile after message flow is beyond device screen, And removing device screen ranges.
In described step S2, the API according to described equipment obtains the wide high of device screen, and according to the width of device screen Message display area is marked behind one message display region by high establishment.
Described step S3 specifically comprises:
S3.1, the message queue created;
S3.2, message is added in the array of ordered message queue by message time order;
S3.3, arranges a timer, starts to show that the time is 0, temporally increases, reaches the barrage of displaying time with waterfall Cloth stream mode is added in screen;
S3.4, if user clicks the picture in waterfall flow message or media, then pause timer, starts exhibiting pictures Or broadcasting media, after user closes picture or media;Timer continues timing, continues the flowing of waterfall flow message;
According to timer periods, S3.5, judges that message has flowed out screen, if flowed out, stop message Flowing also removes from screen, removes from ordered queue simultaneously;
S3.6, shows complete if all of message, and ordered queue now is empty, continues waiting for server message.
Also comprise after described step S3.1:
Step S3.7, it is unread message or instant session information that the server when entering session channel returns data, If unread message, then obtain unread message to server request, prepare to add ordered message queue to;Lead to when entering session When server return data during road are instant session informations, then server returns instant session information, by instant session information Prepare to add ordered message queue to.
Comprise after described step S3.6:
Step S3.8, server receives instant message, and repeated execution of steps S3.2.
Described server returns packet containing message number, message sponsor, message content, the JSON word of message time Symbol string.
Described waterfall stream mode occurs from screen right-hand member batch in order, shifts to left end during showing time course Process, or the process of right-hand member occurs from screen left end batch in order, shifts to during showing time course.
Described step 3.2 every message by message time, arrange show Time Calculation go out device screen occur and The time point removed.
The present invention compared with prior art, has the advantage that
The message that present invention optimizes countershaft arrangement the most on time represents form, adds the utilization rate of screen space, subtracts Thumb, on few user is continuous because message number is too much, the operation read, improve Consumer's Experience.
Accompanying drawing explanation
Fig. 1 is the structure chart of ordered message list;
Fig. 2 is the flow chart of the present invention a kind of live chat method.
Detailed description of the invention
Below in conjunction with accompanying drawing, by describing a preferably specific embodiment in detail, the present invention is further elaborated.
As in figure 2 it is shown, a kind of live chat method, the method comprises the steps of:
S1, enters through TCP/IP and the instant session channel of udp protocol foundation, is chat window circle in equipment performance Face;
S2, confirming whether create message display region on device screen, if not having, then creating a message display region; In step S2, the API according to described equipment obtains the wide high of device screen, generates one piece of region after removing non-message display area For message display, and according to behind the wide high establishment one message display region of device screen, message display area is marked;
S3, creates an ordered message queue, and described message queue is filtered and calculated, sequentially in time Add on the message display region of device screen with waterfall stream mode, stop mobile after message flow is beyond device screen, And removing device screen ranges.
Above-mentioned step S3 specifically comprises:
S3.1, the message queue created;Message queue usually uses programming language, and empty number is given in storage allocation space Group, the structure of this message queue is as shown in Figure 1.
S3.2, message is added in the array of ordered message queue by message time order;Every message press message time, Arranging the time point occurring at screen and removing showing that Time Calculation goes out, computing formula and displaying time can be by bandwagon effect Customization.
S3.3, arranges a timer, starts to show that the time is 0, temporally increases, reaches the barrage of displaying time with waterfall Cloth stream mode is added in screen;Waterfall stream mode is to occur from screen right-hand member batch in order, move during showing time course To the process of left end, or the process of right-hand member occurs, shifts to during showing time course from screen left end batch in order.Flowing side To being configured by user, if the message of synchronization reaches the message space upper limit that device screen accommodates, then message queue stops, Until proceeding after having message removal screen position.
S3.4, if user clicks the picture in waterfall flow message or media, then pause timer, starts exhibiting pictures Or broadcasting media, after user closes picture or media;Timer continues timing, continues the flowing of waterfall flow message;
According to timer periods, S3.5, judges that message has flowed out screen, if flowed out, stop message Flowing also removes from screen, removes from ordered queue simultaneously;
S3.6, shows complete if all of message, and ordered queue now is empty, continues waiting for server message.
In a particular embodiment, also comprise after above-mentioned step S3.1:
Step S3.7, it is unread message or instant session information that the server when entering session channel returns data, If unread message, then obtain unread message to server request, prepare to add ordered message queue to;Lead to when entering session When server return data during road are instant session informations, then server returns instant session information, by instant session information Prepare to add ordered message queue to.
In a particular embodiment, comprise after described step S3.6:
Step S3.8, server receives instant message, and repeated execution of steps S3.2.
Described server returns packet containing message number, message sponsor, message content, the JSON word of message time Symbol string, the form of data can use other convenient data type resolved according to the difference of business.
Above-mentioned filtration and calculating refer to every message by message time, arrange show Time Calculation go out at device screen The time point occurred and remove, computing formula and displaying time can be customized by bandwagon effect.
In sum, chat method during one of the present invention, the message optimizing countershaft arrangement the most on time represents form, increases Add screen space utilization rate, reduce user because message number too much and constantly on thumb the operation read, promote Consumer's Experience.
Although present disclosure has been made to be discussed in detail by above preferred embodiment, but it should be appreciated that above-mentioned Description is not considered as limitation of the present invention.After those skilled in the art have read foregoing, for the present invention's Multiple amendment and replacement all will be apparent from.Therefore, protection scope of the present invention should be limited to the appended claims.

Claims (8)

1. a live chat method, it is characterised in that the method comprises the steps of:
S1, enters through TCP/IP and the instant session channel of udp protocol foundation, is chat window interface in equipment performance;
S2, confirming whether create message display region on device screen, if not having, then creating a message display region;
S3, creates an ordered message queue, and described message queue is filtered and calculated, sequentially in time with waterfall Cloth stream mode is added on the message display region of device screen, stops mobile, and move after message flow is beyond device screen Except device screen scope.
2. live chat method as claimed in claim 1, it is characterised in that according to described equipment in described step S2 API obtains the wide high of device screen, and creates behind a message display region message display area according to device screen wide high It is marked.
3. live chat method as claimed in claim 1, it is characterised in that described step S3 specifically comprises:
S3.1, the message queue created;
S3.2, message is added in the array of ordered message queue by message time order;
S3.3, arranges a timer, starts to show that the time is 0, temporally increases, and reaches the barrage of displaying time with waterfall stream Mode is added in screen;
S3.4, if user clicks the picture in waterfall flow message or media, then pause timer, starts exhibiting pictures or broadcasts Put media, after user closes picture or media;Timer continues timing, continues the flowing of waterfall flow message;
According to timer periods, S3.5, judges that message has flowed out screen, if flowed out, stop the flowing of message And remove from screen, remove from ordered queue simultaneously;
S3.6, shows complete if all of message, and ordered queue now is empty, continues waiting for server message.
4. live chat method as claimed in claim 3, it is characterised in that also comprise after described step S3.1:
Step S3.7, it is unread message or instant session information that the server when entering session channel returns data, if It is unread message, then obtains unread message to server request, prepare to add ordered message queue to;When entering session channel Server return data when being instant session information, then server returns instant session information, is prepared by instant session information Add ordered message queue to.
5. live chat method as claimed in claim 4, it is characterised in that comprise after described step S3.6:
Step S3.8, server receives instant message, and repeated execution of steps S3.2.
6. live chat method as claimed in claim 4, it is characterised in that described server returns packet containing message count Amount, message sponsor, message content, the JSON character string of message time.
7. live chat method as claimed in claim 1, it is characterised in that described waterfall stream mode be from screen right-hand member by There is, shifts in showing time course the process of left end in sequential batch, or occurs from screen left end batch in order, showing Time course is shifted to the process of right-hand member.
8. live chat method as claimed in claim 3, it is characterised in that when described step 3.2 every message is by message Between, arrange and show that what Time Calculation went out occurs and the time point that removes at device screen.
CN201610696488.5A 2016-08-19 2016-08-19 Real-time chatting method Active CN106059909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610696488.5A CN106059909B (en) 2016-08-19 2016-08-19 Real-time chatting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610696488.5A CN106059909B (en) 2016-08-19 2016-08-19 Real-time chatting method

Publications (2)

Publication Number Publication Date
CN106059909A true CN106059909A (en) 2016-10-26
CN106059909B CN106059909B (en) 2021-04-20

Family

ID=57195267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610696488.5A Active CN106059909B (en) 2016-08-19 2016-08-19 Real-time chatting method

Country Status (1)

Country Link
CN (1) CN106059909B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112217713A (en) * 2020-10-13 2021-01-12 维沃移动通信有限公司 Method and device for displaying message

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050268237A1 (en) * 2004-05-28 2005-12-01 Microsoft Corporation System and method for generating message notification objects on dynamically scaled timeline
CN101025671A (en) * 2006-02-24 2007-08-29 腾讯科技(深圳)有限公司 Method for displaying newmessage in message window
CN104615400A (en) * 2015-02-10 2015-05-13 解庶 Method and device for displaying visual information
CN104780423A (en) * 2015-01-14 2015-07-15 康佳集团股份有限公司 A method and system for synchronizing mobile terminal instant messaging to smart TV set
CN104935997A (en) * 2015-06-01 2015-09-23 上海幻电信息科技有限公司 Method and device for customizing high-level barrage for a viewer
CN104980500A (en) * 2015-06-08 2015-10-14 腾讯科技(北京)有限公司 Information display method and terminal
CN105187295A (en) * 2015-08-06 2015-12-23 广州华多网络科技有限公司 Method for realizing bubble display on client, client, server and system
CN105357587A (en) * 2015-10-28 2016-02-24 广州华多网络科技有限公司 Method and system for realizing music barrage
CN105635845A (en) * 2014-10-31 2016-06-01 腾讯科技(上海)有限公司 Session content transmission method and device
CN105812885A (en) * 2016-03-11 2016-07-27 武汉斗鱼网络科技有限公司 Bullet screen display method and system in live video
CN105867900A (en) * 2015-12-21 2016-08-17 乐视网信息技术(北京)股份有限公司 Method and device for displaying chat messages in live-broadcast applications

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050268237A1 (en) * 2004-05-28 2005-12-01 Microsoft Corporation System and method for generating message notification objects on dynamically scaled timeline
CN101025671A (en) * 2006-02-24 2007-08-29 腾讯科技(深圳)有限公司 Method for displaying newmessage in message window
CN105635845A (en) * 2014-10-31 2016-06-01 腾讯科技(上海)有限公司 Session content transmission method and device
CN104780423A (en) * 2015-01-14 2015-07-15 康佳集团股份有限公司 A method and system for synchronizing mobile terminal instant messaging to smart TV set
CN104615400A (en) * 2015-02-10 2015-05-13 解庶 Method and device for displaying visual information
CN104935997A (en) * 2015-06-01 2015-09-23 上海幻电信息科技有限公司 Method and device for customizing high-level barrage for a viewer
CN104980500A (en) * 2015-06-08 2015-10-14 腾讯科技(北京)有限公司 Information display method and terminal
CN105187295A (en) * 2015-08-06 2015-12-23 广州华多网络科技有限公司 Method for realizing bubble display on client, client, server and system
CN105357587A (en) * 2015-10-28 2016-02-24 广州华多网络科技有限公司 Method and system for realizing music barrage
CN105867900A (en) * 2015-12-21 2016-08-17 乐视网信息技术(北京)股份有限公司 Method and device for displaying chat messages in live-broadcast applications
CN105812885A (en) * 2016-03-11 2016-07-27 武汉斗鱼网络科技有限公司 Bullet screen display method and system in live video

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112217713A (en) * 2020-10-13 2021-01-12 维沃移动通信有限公司 Method and device for displaying message
CN112217713B (en) * 2020-10-13 2022-05-17 维沃移动通信有限公司 Method and device for displaying message

Also Published As

Publication number Publication date
CN106059909B (en) 2021-04-20

Similar Documents

Publication Publication Date Title
US8463233B2 (en) Methods and apparatus for collecting information about portable device usage
CN102035839B (en) Method, system and equipment for providing stream media service
CN103607691A (en) Flow package recommendation method and device
WO2018095096A1 (en) Method, device and system for processing overlay comment message and apparatus thereof
CN108347580B (en) Method for processing video frame data and electronic equipment
CN103188119A (en) Confidence intervals for key performance indicators in communication networks
CN102404858A (en) Radio resource optimizing method, device and system
WO2008042923A2 (en) Method and system for collecting information about portable device usage
CN104427293A (en) Method and device for establishing video conference interface and video terminal
CN109005422A (en) Video comments processing method and processing device
CN103297290A (en) Intelligent and scalable network monitoring using a hierarchy of devices
CN102480613A (en) Method, device and system for video monitoring on terminal of videoconferencing system
CN105578110B (en) A kind of video call method
CN110602763B (en) Method, system and storage medium for dual-card terminal to select SIM card to access VoWiFi network
CN106059909A (en) Real-time chat method
CN100459695C (en) Method of transmitting video data, and transmission system
CN104144083A (en) Flow statistic method based on application, BRAS and network
CN105407313A (en) Video calling method, equipment and system
CN102802214A (en) System and method for rate self-adaptation based on WLAN (Wireless Local Area Network)
CN103067454A (en) Interactive method of and device for integrating web page and client-side information
CN109754285A (en) Information processing method, device, electronic equipment and computer readable storage medium
CN101316161B (en) Synchronous indication method and system for distributed video
CN103036762A (en) Method and device for information processing in instant messaging
CN101453474B (en) Terminal, information inserting system and method
CN101753363B (en) Method applied to medium transmission quality measurement and device thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant