CN103812756A - Web-based instant messaging method and device - Google Patents

Web-based instant messaging method and device Download PDF

Info

Publication number
CN103812756A
CN103812756A CN201210450602.8A CN201210450602A CN103812756A CN 103812756 A CN103812756 A CN 103812756A CN 201210450602 A CN201210450602 A CN 201210450602A CN 103812756 A CN103812756 A CN 103812756A
Authority
CN
China
Prior art keywords
information
instant messaging
account
client
binary system
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
CN201210450602.8A
Other languages
Chinese (zh)
Other versions
CN103812756B (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.)
ZTE ICT Technologies Co Ltd
Original Assignee
ZTE ICT Technologies 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 ZTE ICT Technologies Co Ltd filed Critical ZTE ICT Technologies Co Ltd
Priority to CN201210450602.8A priority Critical patent/CN103812756B/en
Publication of CN103812756A publication Critical patent/CN103812756A/en
Application granted granted Critical
Publication of CN103812756B publication Critical patent/CN103812756B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a web-based instant messaging method. The web-based instant messaging method comprises analyzing information according to a binary system instant messaging protocol when a server receives information sent from clients and judging whether information obtained through analysis is a login request or conversion information or not; sending account friend information of an account to the corresponding client according to the binary system instant messaging protocol through the server if the analysis information is the login request and the server judges that the account is a legal account according to the login request; retransmitting the conversion information to the client which is corresponding to a receiving account according to the binary system instant messaging protocol if the analysis information is the conversion information. The invention also discloses a web-based instant messaging device. According to the web-based instant messaging method and device, transmission resources are saved and client and server processing loads are relieved.

Description

A kind of method of the instant messaging based on webpage and device
Technical field
The present invention relates to instant messaging in communication information field, relate in particular to a kind of method and device of the instant messaging based on webpage (Web).
Background technology
At present, most of instant messaging technology are all based on application program, conventionally use transmission control protocol (TCP, Transmission Control Protocol)/Internet protocol (IP, Internet Protocol), and use time corresponding application software need be installed.Instant messaging based on Web adopts HTTP (HTTP, Hyper Text Transport Protocol), and can use immediately without down loading mounting software.
But, the above-mentioned instant messaging based on Web uses HTTP, because HTTP occupied bandwidth is large, conversion consumption system resource between text and binary system, so in the time that the instant messaging based on Web is used for mobile terminal, will consume a large amount of communication of mobile terminal bandwidth, and use the processing resource of a large amount of mobile terminals, thereby affect the use of other application of mobile terminal.
Visible, the instant messaging based on Web in prior art, owing to using http protocol, causes consuming a large amount of transmission and processes resource, and then causing Web instant messaging not to be suitable for mobile terminal.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of method and device of the instant messaging based on Web, can save transfer resource, and alleviate the processing load of client and server.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of method that the invention provides instant messaging based on Web, the method comprises:
In the time that server is received the information that client sends, according to binary system instant messaging protocol analysis information, judge resolve obtain for logging request or session information, if logging request, when described server according to described in when logging in request and judging described account as legal account, according to binary system instant messaging agreement, the account the friend information corresponding account is sent to corresponding client;
If session information, when described server is according to binary system instant messaging agreement is transmitted to session information and receives client corresponding to account.
In such scheme, described binary system instant messaging agreement is: the information content that will send according to preset binary message form is written as the information of sending; And information type and the information content of the information of receiving according to preset binary message form, extraction.
In such scheme, described according to binary system instant messaging agreement, the account the friend information corresponding account is sent to corresponding client after, the method also comprises: the information that client is received according to binary system instant messaging protocol analysis, after determining and receive that information is account friend information according to information type, from account friend information, obtain and show buddy list.
In such scheme, after described server is transmitted to client corresponding to reception account according to binary system instant messaging agreement by session information, the method also comprises: the information that client is received according to binary system instant messaging protocol analysis, after determining and receive that information is session information according to information type, from session information, obtain and show the particular content of post a letter good friend and instant messages.
The present invention also provides a kind of device of the instant messaging based on Web, and this device comprises: server instant messaging module and client instant communication module; Wherein,
Server instant messaging module, for in the time receiving the information that client instant communication module is sent, according to binary system instant messaging protocol analysis information, judge resolve obtain for logging request or session information, if logging request, in the time that described account is judged in the request that logs in described in basis as legal account, according to binary system instant messaging agreement, the account the friend information corresponding account is sent to corresponding client instant communication module, if session information, during according to binary system instant messaging agreement, session information is transmitted to and receives client instant communication module corresponding to account,
Client instant communication module, for sending logging request or session information according to binary system instant messaging agreement to server instant messaging module, the account friend information that reception server instant messaging module is returned, or the session information of reception server instant messaging module forwards.
In such scheme, described server instant messaging module, specifically for the binary system instant messaging agreement saving presets, the information content that described binary system instant messaging agreement will be sent according to preset binary message form is written as the information of sending, and information type and the information content of the information of receiving according to preset binary message form, extraction.
In such scheme, described client instant communication module specifically for the information of receiving according to binary system instant messaging protocol analysis, after determining and receive that information is account friend information, is obtained and shows buddy list according to information type from account friend information.
In such scheme, described client instant communication module, specifically for the information of receiving according to binary system instant messaging protocol analysis, after determining and receive that information is session information according to information type, from session information, obtain and show the particular content of post a letter good friend and instant messages.
The method of the instant messaging based on Web provided by the present invention and device can use binary system instant messaging agreement between client and server, initiate logging request and session information.Due to binary system instant messaging agreement and the content in multiple bytes in two former HTTP of byte representation for HTTP phase specific energy, while therefore transmitting same content, binary agreement can be saved transmission bandwidth over half; During simultaneously due to client and server process HTTP information, all needing the text-converted in HTTP is binary system, therefore directly uses binary system instant messaging protocol transmission information, can also reduce the processing load of client and server.
Accompanying drawing explanation
Fig. 1 is the method flow schematic diagram of the instant messaging based on Web of the present invention;
Fig. 2 is the installation composition structural representation of the instant messaging based on Web of the present invention.
Embodiment
Basic thought of the present invention is: in the time that server is received the information that client sends, according to binary system instant messaging protocol analysis information, judge resolve obtain for logging request or session information, if logging request, when described server according to described in when logging in request and judging described account as legal account, according to binary system instant messaging agreement, the account the friend information corresponding account is sent to corresponding client; If session information, when described server is according to binary system instant messaging agreement is transmitted to session information and receives client corresponding to account.
Below in conjunction with drawings and the specific embodiments, the present invention is further described in more detail.
The present invention proposes a kind of method of the instant messaging based on Web, as shown in Figure 1, comprises the following steps:
Step 101: in the time that server is received the information that any one client sends, according to binary system instant messaging protocol analysis information, judge that resolving what obtain is logging request or session information, if logging request performs step 102; If session information, performs step 104.
Here, described binary system instant messaging agreement is preset at client and server according to actual needs, the information content that will send according to preset binary message form is written as the information of sending, and information type and the information content of the information of receiving according to preset binary message form, extraction; Wherein, described preset binary message form can comprise: source address, destination address, information type, data, check code.
Before above-mentioned steps 101 is carried out, client according to the actual requirements, sends logging request or session information according to binary system instant messaging agreement to server.
Step 102: described in described server basis, log in request and judge whether described account is legal account, if not, end process flow process; If so, perform step 103.
Here the request of logging in, comprises: client numbering, name on account and account password.
Describedly judge whether described account is that legal account is prior art, can comprise: according to the name on account in logging request, check whether self preserves the record of account title, if having, check that whether account password is consistent with the account password in record, if consistent, the account is legal account, and execution step 103, if inconsistent, notify the account place client password mistake, end process flow process; If there is no the record of account title, notify account place client without accounts information, end process flow process.
Step 103: server sends to corresponding client according to binary system instant messaging agreement by the account the friend information corresponding account, end process flow process.
Concrete, server is searched record corresponding to name on account of self preserving according to logging request, extract buddy list corresponding to account title, according to binary system instant messaging agreement, buddy list is written as to account friend information, account friend information is sent to corresponding client.
In addition, after step 103 completes, the information that client is received according to binary system instant messaging protocol analysis, according to information type determine receive that information is account friend information after, from account friend information, obtain and show buddy list, then return execution step 101.
Above-mentioned client and server transmission information links channel transfer by TCP, and the method for the foundation of TCP link passage is prior art, does not repeat here.
Step 104: described server is transmitted to session information to receive client corresponding to account according to binary system instant messaging agreement.
Here, described forwarding is according to the binary message form of binary system instant messaging agreement, session information to be sent to and to receive client corresponding to account.
In addition, after step 104 completes, the information that client is received according to binary system instant messaging protocol analysis, according to information type determine receive that information is session information after, from session information, obtain and show the particular content of post a letter good friend and instant messages, then return to execution step 101; Wherein, described in obtain and be shown as prior art, do not repeat here.
As shown in Figure 2, the invention provides a kind of device of the instant messaging based on Web, this device comprises: server instant messaging module 21 and client instant communication module 22; Wherein,
Server instant messaging module 21, for in the time receiving the information that any one client instant communication module 22 is sent, according to binary system instant messaging protocol analysis information, judge resolve obtain for logging request or session information, if logging request, in the time that described account is judged in the request that logs in described in basis as legal account, the account the friend information corresponding account is sent to corresponding client instant communication module 22, if session information, is transmitted to session information and receives client instant communication module 22 corresponding to account;
Client instant communication module 22, for sending logging request or session information according to binary system instant messaging agreement to server instant messaging module 21, the account friend information that reception server instant messaging module 21 is returned, or the session information that forwards of reception server instant messaging module 21.
Described server instant messaging module 21, specifically for the binary system instant messaging agreement saving presets, the information content that described binary system instant messaging agreement will be sent according to preset binary message form is written as the information of sending, and information type and the information content of the information of receiving according to preset binary message form, extraction.
Described server instant messaging module 21, specifically for according to preset binary system instant messaging agreement, obtaining information type and the concrete information content from the information of receiving; Described information type can be defined as the type such as logging request and session information.
Described server instant messaging module 21, specifically for according to the name on account in logging request, check whether self preserves the record of account title, if having, check that whether account password is consistent with the account password in record, if consistent, the account is legal account, if inconsistent, notify the account place client instant communication module 22 password mistakes, if there is no the record of account title, notify account place client instant communication module 22 without accounts information; Accordingly, described client instant communication module 22, the password mistake of also sending for reception server instant messaging module 21 or without notices such as accounts informations.
Described server instant messaging module 21, specifically for search record corresponding to name on account of self preserving according to logging request, extract buddy list corresponding to account title, according to binary system instant messaging agreement, buddy list is written as to account friend information, account friend information is sent to corresponding client instant communication module 22; Accordingly, described client instant communication module 22 specifically for the information of receiving according to binary system instant messaging protocol analysis, after determining and receive that information is account friend information, is obtained and shows buddy list according to information type from account friend information.
The particular content of post a letter good friend and instant messages is obtained and shown to described client instant communication module 22 specifically for the information of receiving according to binary system instant messaging protocol analysis, after determining and receive that information is session information, according to information type from session information; Wherein, described in obtain and be shown as prior art, do not repeat here.
Above-mentioned client instant communication module 22 can be used as logical block and is installed in existing computer or in mobile terminal; Above-mentioned server instant messaging module 21 can be used as logical block and is installed in server.
The above, be only preferred embodiment of the present invention, is not intended to limit protection scope of the present invention.

Claims (8)

1. a method for the instant messaging based on webpage Web, is characterized in that, the method comprises:
In the time that server is received the information that client sends, according to binary system instant messaging protocol analysis information, judge resolve obtain for logging request or session information, if logging request, when described server according to described in when logging in request and judging described account as legal account, according to binary system instant messaging agreement, the account the friend information corresponding account is sent to corresponding client;
If session information, when described server is according to binary system instant messaging agreement is transmitted to session information and receives client corresponding to account.
2. method according to claim 1, is characterized in that, described binary system instant messaging agreement is: the information content that will send according to preset binary message form is written as the information of sending; And information type and the information content of the information of receiving according to preset binary message form, extraction.
3. method according to claim 1 and 2, it is characterized in that, described according to binary system instant messaging agreement, the account the friend information corresponding account is sent to corresponding client after, the method also comprises: the information that client is received according to binary system instant messaging protocol analysis, after determining and receive that information is account friend information according to information type, from account friend information, obtain and show buddy list.
4. method according to claim 1 and 2, it is characterized in that, after described server is transmitted to client corresponding to reception account according to binary system instant messaging agreement by session information, the method also comprises: the information that client is received according to binary system instant messaging protocol analysis, after determining and receive that information is session information according to information type, from session information, obtain and show the particular content of post a letter good friend and instant messages.
5. a device for the instant messaging based on Web, is characterized in that, this device comprises: server instant messaging module and client instant communication module; Wherein,
Server instant messaging module, for in the time receiving the information that client instant communication module is sent, according to binary system instant messaging protocol analysis information, judge resolve obtain for logging request or session information, if logging request, in the time that described account is judged in the request that logs in described in basis as legal account, according to binary system instant messaging agreement, the account the friend information corresponding account is sent to corresponding client instant communication module, if session information, during according to binary system instant messaging agreement, session information is transmitted to and receives client instant communication module corresponding to account,
Client instant communication module, for sending logging request or session information according to binary system instant messaging agreement to server instant messaging module, the account friend information that reception server instant messaging module is returned, or the session information of reception server instant messaging module forwards.
6. device according to claim 5, is characterized in that,
Described server instant messaging module, specifically for the binary system instant messaging agreement saving presets, the information content that described binary system instant messaging agreement will be sent according to preset binary message form is written as the information of sending, and information type and the information content of the information of receiving according to preset binary message form, extraction.
7. device according to claim 5, it is characterized in that, described client instant communication module, specifically for the information of receiving according to binary system instant messaging protocol analysis, after determining and receive that information is account friend information according to information type, from account friend information, obtain and show buddy list.
8. device according to claim 7, is characterized in that,
The particular content of post a letter good friend and instant messages is obtained and shown to described client instant communication module specifically for the information of receiving according to binary system instant messaging protocol analysis, after determining and receive that information is session information, according to information type from session information.
CN201210450602.8A 2012-11-12 2012-11-12 A kind of method and device of web-based instant messaging Expired - Fee Related CN103812756B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210450602.8A CN103812756B (en) 2012-11-12 2012-11-12 A kind of method and device of web-based instant messaging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210450602.8A CN103812756B (en) 2012-11-12 2012-11-12 A kind of method and device of web-based instant messaging

Publications (2)

Publication Number Publication Date
CN103812756A true CN103812756A (en) 2014-05-21
CN103812756B CN103812756B (en) 2018-06-19

Family

ID=50708988

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210450602.8A Expired - Fee Related CN103812756B (en) 2012-11-12 2012-11-12 A kind of method and device of web-based instant messaging

Country Status (1)

Country Link
CN (1) CN103812756B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770049A (en) * 2017-10-23 2018-03-06 林楚莲 A kind of invited user obtains the method and system of group information
CN108449262A (en) * 2018-04-08 2018-08-24 成都万维图新信息技术有限公司 A kind of transmission method of instant communication data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040128356A1 (en) * 2001-06-25 2004-07-01 Keith Bernstein Email integrated instant messaging
CN1585384A (en) * 2004-06-11 2005-02-23 陈辉 Real-time telecommunication method based on network telecommunication terminal
CN101083534A (en) * 2006-06-02 2007-12-05 阿里巴巴公司 Method and system for realizing instant communication through browsers
CN101106774A (en) * 2007-08-10 2008-01-16 腾讯科技(深圳)有限公司 Instant messaging system and of mobile phone with browser function and its implementation method
CN101710882A (en) * 2009-11-09 2010-05-19 南京希华通信技术有限公司 Method for realizing multi-IM protocol Web version instant message

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040128356A1 (en) * 2001-06-25 2004-07-01 Keith Bernstein Email integrated instant messaging
CN1585384A (en) * 2004-06-11 2005-02-23 陈辉 Real-time telecommunication method based on network telecommunication terminal
CN101083534A (en) * 2006-06-02 2007-12-05 阿里巴巴公司 Method and system for realizing instant communication through browsers
CN101106774A (en) * 2007-08-10 2008-01-16 腾讯科技(深圳)有限公司 Instant messaging system and of mobile phone with browser function and its implementation method
CN101710882A (en) * 2009-11-09 2010-05-19 南京希华通信技术有限公司 Method for realizing multi-IM protocol Web version instant message

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SANFENGSHOU: "IM即时通讯实现原理", 《URL:HTTP://BLOG.CSDN.NET/SANFENGSHOU/ARTICLE/DETAILS/5664195》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770049A (en) * 2017-10-23 2018-03-06 林楚莲 A kind of invited user obtains the method and system of group information
CN108449262A (en) * 2018-04-08 2018-08-24 成都万维图新信息技术有限公司 A kind of transmission method of instant communication data

Also Published As

Publication number Publication date
CN103812756B (en) 2018-06-19

Similar Documents

Publication Publication Date Title
US9794242B2 (en) Method, apparatus and application platform for realizing logon to an application service website
CN102655481B (en) A kind of instant messaging chat content inspection method based on webpage and system
CN102790798B (en) Transparent proxy implementation, equipment and system in a kind of content distributing network
CN102739560B (en) Instant communication method, system and device
CN103581130B (en) data compression processing method, system and device
CN103516785A (en) Web page proxy system and communication method thereof
CN105024971A (en) Communication protocol conversion method and communication protocol conversion device
CN103347092A (en) Method and device for recognizing cacheable file
US20160241664A1 (en) Method, device, and system for redirecting data by using service proxy
KR100976259B1 (en) System for providing two-way push service based on dynamic IP in wireless network environment
CN101183946B (en) Method and system of obtaining resource listing of download file
CN110769009B (en) User identity authentication method and system
CN101930439B (en) The Website processing device of the various model mobile phone of a kind of adaptation and application thereof
CN104811462A (en) Access gateway redirection method and access gateway
CN104378399A (en) Data push method, platform server, client terminal and system
US8880108B2 (en) Short message processing method and apparatus
US7797405B2 (en) Streaming file transfer apparatus, systems, and methods
CN112261111A (en) Method and system for realizing cross-domain access of browser in application program
CN101699823B (en) Method for realizing caching resource in curl library
CN103812756A (en) Web-based instant messaging method and device
CN103873443A (en) Information processing method, local proxy server and network proxy server
CN105306338B (en) Message reminding method and device
CN103533001A (en) Communication method and communication system based on HTTP multi-proxy, and intermediate proxy server
CN105656762A (en) Message pushing method and message pushing system for mobile office software
CN108924773B (en) Message processing method and device

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180619

Termination date: 20211112