WO2012000228A1 - 一种通用的网页上实现群组通讯的方法 - Google Patents

一种通用的网页上实现群组通讯的方法 Download PDF

Info

Publication number
WO2012000228A1
WO2012000228A1 PCT/CN2010/076645 CN2010076645W WO2012000228A1 WO 2012000228 A1 WO2012000228 A1 WO 2012000228A1 CN 2010076645 W CN2010076645 W CN 2010076645W WO 2012000228 A1 WO2012000228 A1 WO 2012000228A1
Authority
WO
WIPO (PCT)
Prior art keywords
group
user
socket
web page
server
Prior art date
Application number
PCT/CN2010/076645
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 苏州阔地网络科技有限公司
Publication of WO2012000228A1 publication Critical patent/WO2012000228A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1813Arrangements for providing special services to substations for broadcast or conference, e.g. multicast for computer conferences, e.g. chat rooms
    • H04L12/1822Conducting the conference, e.g. admission, detection, selection or grouping of participants, correlating users to one or more conference sessions, prioritising transmission
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/185Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with management of multicast group membership

Definitions

  • the present invention belongs to the field of network technologies, and in particular, to a method for implementing group communication on a general webpage. Background technique
  • the biggest value is to provide convenient communication channels. .
  • chat records and important files can be stored on the webpage without downloading to the local computer, which greatly improves the security of data and the convenience of data reading.
  • the functional requirements of Web IM have gradually increased, from the simple one-on-one chat, to group communication and multi-person communication.
  • the current network video conferencing and network distance education began to gradually change from the original terminal download mode to the web browser-based mode.
  • web-based group communication and multi-person communication technologies are essential technical requirements.
  • the object of the present invention is: A method for implementing group communication on a general web page.
  • a method for implementing group communication on a general webpage comprising the following steps:
  • the socket server After receiving the group ID and user name, the socket server adds the user name and the socket connection to the online list, and checks whether there is an array corresponding to the group ID. If it exists, the user name is added to the already In the existing array; if it does not exist, create a new array and store the username into the array; [09] 4) The user selects a group, sends the message and the group ID to the server;
  • the server After receiving the group ID, the server finds all the user names in the array corresponding to the group ID, queries the online list to find the socket connection corresponding to each user name, and sends the message separately through the socket connection. For each user.
  • step 1) includes the following process:
  • the web page program obtains the ID of the group to which the user name of the visitor user is added from the database.
  • step 2) includes the following process:
  • step 3 includes the following process:
  • the socket server After receiving the message, the socket server saves the username and socket connection to an array
  • the socket server appends the username to the array corresponding to the group ID.
  • step 4) includes the following process:
  • fla sh sends a text and group ID message to the socket server.
  • Embodiment 1 a method for implementing group communication, comprising the following steps:
  • the socket server After receiving the group ID and user name, the socket server adds the user name and socket connection to the online list, and checks whether there is an array corresponding to the group ID. If it exists, append the username to the existing array; if it does not exist, create a new array and store the username into the array. [36] 4) The user selects a group, sends the message and the group ID to the server.
  • the server After receiving the group ID, the server finds all the user names in the array corresponding to the group ID, queries the online list to find the socket connection corresponding to each user name, and sends the message separately through the socket connection. For each user.
  • the browser user logs in the website and records the user name of the web page user.
  • the web program obtains the ID of the group added by the user name of the visitor user from the database. Load a fla sh to the web page, flah connects to the socket server, and the web script sends all group IDs and login user's username to the socket server by calling the flash interface. After the socket server receives the message, it saves the username and socket connection to an array.
  • the socket server checks whether the array corresponding to the group ID exists. If it already exists, the user name is appended to the array corresponding to the group ID. Otherwise, a new array corresponding to the group ID is created, and the username is Append to the array corresponding to the group ID.
  • the user selects a group, the user enters the text, and fla sh sends a text and group ID to the socket server.
  • the server finds all the user names in the group corresponding to the group ID, queries the online list to find the socket connection corresponding to each user name, and sends the message to each user through the socket connection. After the user receives the message, it is displayed on the web page.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明属于网络技术领域,具体涉及一种通用的网页上实现群组通讯的方法,具体包括以下步骤:用户打开网页,网页加载flash,网页程序从数据库获取该用户所加入群组的所有ID,将所有ID和该用户的用户名发送给socket服务器,socket服务器将所有ID、用户名、socket线程号保存到哈希表中。用户发送消息到一个群组时,socket服务器查询哈希表并找出该群组ID所对应的所有用户的用户名所对应的socket线程号,将消息通过socket线程号所对应的socket线程转发给群组ID所对应的所有用户。该方法能实现网页上群组和多人的高效通讯,给网页即时通讯的多人互通和群组聊天提供了切实可行的方法。

Description

发明名称: 一种通用的网页上实现群组通讯的方法 技术领域
[01 ] 本发明属于网络技术领域,具体涉及一种通用的网页上实现群组通讯的 方法。 背景技术
[02] 目前, 基于需要下载安装的 IM ( In stant Messaging ) 即时通讯工具, 如 M SN, QQ , 网易泡泡已经深受大家的喜爱, 它为人们的沟通、 信息交流提供 了新的途径, 是除手机、 固话、 电子邮件之外的又一种重要的信息交流方式。 通 过这些工具, 大大降低了人们之间的交流成本, 且提高了效率。 但是, 如使用上 述即时通工具, 用户必须下载安装相应的客户端软件。 这是一个较为复杂的配置 和了解熟悉的过程,对于从来没有使用过这类工具和不经常使用计算机的用户来 说比较困难。 而且, 现在的客户端下载的即时通讯工具软件越来越大, 比如 QQ2010软件达到 32.6MB,MSN软件达到 11.2MB,占用了不小的电脑存储空间; 同时, 因为下载带来的网络安全问题也会困扰着用户; 另外, 由于所有数据信息 (比如聊天记录等) 都存储在电脑终端, 一旦更换了电脑 (如果出差等原因) 或 者重新安装软件, 用户将无法获取原有的数据信息, 非常不便。 在这种强烈的市 场需求下, Web IM (网页版的即时通讯工具) 诞生了。 Web IM 其实就是基于 web浏览器的即时交流工具, 其展示形式是以网页为媒介, 其作用是给那些用不 了或者不方便使用应用程序客户端的用户使用,其最大的价值是提供便捷的交流 渠道。 比如聊天记录和重要文件都可以存储在网页上, 无需下载到本地电脑, 大 大提高了数据的安全性和数据阅读的便捷性。随着 Web IM用户数量的不断增加, 大家对 Web IM的功能需求也逐步增加, 从原先简单的一对一聊天, 开始转向群 组通讯和多人通讯。 为了更好地满足用户对便捷性和安全性的强烈需求, 现行的 网络视频会议以及网络远程教育开始从原先的终端下载模式逐步转变为基于 web 浏览器的模式。 而对于网页版的网络视频会议和网页版的远程教育系统来 说, 基于网页的群组通讯和多人通讯技术是它们必备的技术要求。 [03] 因此需要开发一种能够简单地实现 Web IM 的群组通讯和多人聊天功 能的通用的网页上实现群组通讯的方法, 如果可以成功实现该方法, 那么对于增 强网站用户的活跃度、 用户体验以及网站的互动性有着非常重大的意义; 同时, 也为技术人员提供了一种快速掌握即时通讯中的群组通讯和多人通讯的解决方 案。 发明内容
[04] 本发明的目的是: 一种通用的网页上实现群组通讯的方法。
[05] 为了实现上述目的, 本发明的技术方案为: 一种通用的网页上实现群组 通讯的方法, 包括以下步骤:
[06] 1) 用户登录网页, 网页程序从数据库获取该用户所加入的所有群组的
ID;
[07] 2) 加载 flash, 连接 socket服务器, 将所加入的所有群组 ID和登录用 户的用户名发送给 socket服务器;
[08] 3) socket服务器收到群组 ID和用户名后, 将用户名和 socket连接加入 在线列表, 并检査是否存在群组 ID所对应的数组, 若存在, 则将该用户名追加 到已存在的数组中; 若不存在, 则新建一个数组并存储该用户名到数组中; [09] 4) 用户选择一个群组, 发送消息和群组 ID给服务器;
[10] 5) 服务器收到群组 ID后, 查找出该群组 ID对应的数组中的所有的用 户名, 査询在线列表找到每个用户名对应的 socket连接, 通过 socket连接将消 息分别发送给每个用户。
[11] 上述技术方案中, 步骤 1)包含如下过程:
[12] la) 浏览器用户登录网站后记录网页访问者用户的用户名;
[13] lb)网页程序从数据库获取访问者用户的用户名所加入群组的 ID。
[14] 上述技术方案中, 步骤 2)包含如下过程:
[15] 2a) 加载一个 flash到网页上;
[16] 2b) flash连接 socket服务器;
[17] 2c) 网页脚本将所有群组 ID和登录用户的用户名通过调用 flash接口发 送给 socket服务器。
[ 18] 上述技术方案中, 步骤 3)包含如下过程:
[ 19] 3a ) socket服务器收到消息后, 将用户名和 socket连接保存到一个数组 中;
[20] 3b ) socket服务器检查群组 ID所对应的数组是否存在, 如果已存在, 则继续下一步, 否则, 创建一个和群组 ID所对应的新数组;
[21 ] 3c) socket服务器将用户名追加到群组 ID所对应的数组中。
[22] 上述技术方案中, 步骤 4)包含如下过程:
[23] 4a ) 用户选择一个群组;
[24] 4b ) 用户输入文本;
[25] 4c) fla sh将文本和群组 ID组成一个消息发送给 socket服务器。
[26] 由于上述技术方案的应用, 本发明与现有技术相比具有以下优点:
[27] 1 ) 支持了 Web IM多人聊天和群组聊天功能。
[28] 2) 本发明实现上具有简单性, 应用上具有通用性。
[29] 3 ) 即时性很好, 无滞后。 附图说明
[30] 图 1、 图 2是本发明实施例的详细流程图。 具体实施方式
[31 ] 下面结合附图和实施例对本发明作进一步说明:
[32] 实施例一, 一种实现群组通讯的方法, 包括以下步骤:
[33] 1 ) 用户登录网页, 网页程序从数据库获取该用户所加入的所有群组的
ID。
[34] 2) 加载 fla sh , 连接 socket服务器, 将所加入的所有群组 ID和登录用 户的用户名发送给 socket服务器。
[35] 3) socket服务器收到群组 ID和用户名后, 将用户名和 socket连接加入 在线列表, 并检査是否存在群组 ID所对应的数组。 若存在, 则将该用户名追加 到已存在的数组中; 若不存在, 则新建一个数组并存储该用户名到数组中。 [36] 4) 用户选择一个群组, 发送消息和群组 ID给服务器。
[37] 5 ) 服务器收到群组 ID后, 査找出该群组 ID对应的数组中的所有的用 户名, 查询在线列表找到每个用户名对应的 socket连接, 通过 socket连接将消 息分别发送给每个用户。
[38] 下面进一步详细说明本发明所述的方法:
[39] 参见说明书附图中图 1、 图 2, 浏览器用户登录网站后记录网页访问者 用户的用户名, 网页程序从数据库获取访问者用户的用户名所加入群组的 ID。 加载一个 fla sh到网页上, fla sh连接 socket服务器, 网页脚本将所有群组 ID和 登录用户的用户名通过调用 fla sh接口发送给 socket服务器。 socket服务器收到 消息后, 将用户名和 socket连接保存到一个数组中。 socket服务器检査群组 ID 所对应的数组是否存在, 如果已存在, 则将用户名追加到群组 ID所对应的数组 中, 否则, 创建一个和群组 ID所对应的新数组, 将用户名追加到群组 ID所对应 的数组中。 用户选择一个群组, 用户输入文本, fla sh将文本和群组 ID组成一个 消息发送给 socket服务器。 服务器收到群组 ID后, 査找出该群组 ID对应的数 组中的所有的用户名, 查询在线列表找到每个用户名对应的 socket 连接, 通过 socket连接将消息分别发送给每个用户。 用户收到消息后, 在网页上显示出来。

Claims

WO 2012/000228 权 禾 要 求 书 PCT/CN2010/076645 [权利要求 1 ] 1、 一种通用的网页上实现群组通讯的方法, 其特征在于, 包括以下步骤:
1 ) 用户登录网页, 网页程序从数据库获取该用户所加入的 所有群组的 ID ;
2) 加载 fla sh , 连接 socket 服务器, 将所加入的所有群组 ID和登录用户的用户名发送给 socket服务器;
3) socket服务器收到群组 ID和用户名后,将用户名和 socket 连接加入在线列表,并检査是否存在群组 ID所对应的数组, 若存在, 则将该用户名追加到已存在的数组中, 若不存在, 则新建一个数组并存储该用户名到数组中;
4) 用户选择一个群组, 发送消息和群组 ID给服务器;
5) 服务器收到群组 ID后, 査找出该群组 ID对应的数组中 的所有的用户名, 查询在线列表找到每个用户名对应的 socket连接, 通过 socket连接将消息分别发送给每个用户。
[权利要求 2] 2、 如权利要求 1所述的一种实现群组通讯的方法, 其特征 在于, 其中步骤 1 )包含如下过程:
l a) 浏览器用户登录网站后记录网页访问者用户的用户名; lb ) 网页程序从数据库获取访问者用户的用户名所加入群 组的 ID。
[权利要求 3] 3、 如权利要求 1所述的一种实现群组通讯的方法, 其特征 在于, 其中步骤 2)包含如下过程:
2a) 加载一个 fla sh到网页上;
2b ) fla sh连接 socket服务器;
2c) 网页脚本将所有群组 ID和登录用户的用户名通过调用 fla sh接口发送给 socket服务器。
[权利要求 4] 4、 如权利要求 1所述的一种实现群组通讯的方法, 其特征 在于, 其中步骤 3)包含如下过程:
3a) socket服务器收到消息后, 将用户名和 socket连接保存 到一个数组中; 3b ) socket服务器检查群组 ID所对应的数组是否存在, 如 果已存在, 则继续下一步, 否则, 创建一个和群组 ID所对 应的新数组;
3c) socket服务器将用户名追加到群组 ID所对应的数组中。
[权利要求 5] 5、 如权利要求 1所述的一种实现群组通讯的方法, 其特征 在于, 其中步骤 4)包含如下过程:
4a) 用户选择一个群组;
4b ) 用户输入文本;
4c) fla sh将文本和群组 ID组成一个消息发送给 socket服务 器。
[权利要求 6] 6、 如权利要求 1所述的一种实现群组通讯的方法, 其特征 在于: 用户将自己的在线状态发布到服务器, 同时将好友账 号发送给服务器,服务器从所有在线列表查找出存在在线列 表中的好友账号, 并返回给网页, 网页根据返回的账号作在 线的标记。
PCT/CN2010/076645 2010-07-02 2010-09-06 一种通用的网页上实现群组通讯的方法 WO2012000228A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010223726.3 2010-07-02
CN2010102237263A CN101883058A (zh) 2010-07-02 2010-07-02 一种通用的网页上实现群组通讯的方法

Publications (1)

Publication Number Publication Date
WO2012000228A1 true WO2012000228A1 (zh) 2012-01-05

Family

ID=43054952

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/076645 WO2012000228A1 (zh) 2010-07-02 2010-09-06 一种通用的网页上实现群组通讯的方法

Country Status (2)

Country Link
CN (2) CN101883058A (zh)
WO (1) WO2012000228A1 (zh)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281274A (zh) * 2011-04-06 2011-12-14 苏州阔地网络科技有限公司 一种验证方法、系统及服务器
CN102281319A (zh) * 2011-04-06 2011-12-14 苏州阔地网络科技有限公司 一种网页上实现列表同步的方法及系统
CN102137044A (zh) * 2011-04-25 2011-07-27 苏州阔地网络科技有限公司 一种基于社区平台的群组信息安全交互的方法及系统
CN102185795A (zh) * 2011-04-26 2011-09-14 苏州阔地网络科技有限公司 一种社区平台上实现群组通讯的方法及系统
CN102164100A (zh) * 2011-04-26 2011-08-24 苏州阔地网络科技有限公司 一种基于网页实现的群组信息安全交互的方法及系统
CN102130923A (zh) * 2011-04-27 2011-07-20 苏州阔地网络科技有限公司 一种实现群组通讯的方法及系统
CN102185848A (zh) * 2011-04-27 2011-09-14 苏州阔地网络科技有限公司 一种基于网页的音视频通讯方法及系统
CN102137116A (zh) * 2011-04-27 2011-07-27 苏州阔地网络科技有限公司 一种基于网页实现的多路音视频通讯方法及系统
CN102170409A (zh) * 2011-04-27 2011-08-31 苏州阔地网络科技有限公司 一种网页上基于flash的即时通讯的方法及系统
CN102130854A (zh) * 2011-04-28 2011-07-20 苏州阔地网络科技有限公司 一种能在网页上显示带好友状态的好友列表的方法及系统
WO2012145960A1 (zh) * 2011-04-28 2012-11-01 苏州阔地网络科技有限公司 一种即时通讯组件信息交互方法及系统
CN102137120A (zh) * 2011-04-29 2011-07-27 苏州阔地网络科技有限公司 一种实现群组通讯的方法及系统
CN102170363A (zh) * 2011-04-29 2011-08-31 苏州阔地网络科技有限公司 一种实现群组通讯的方法及系统
CN103905290B (zh) * 2012-12-27 2018-11-06 腾讯科技(深圳)有限公司 一种数据交互方法、装置及客户端
CN103312592B (zh) * 2013-06-03 2016-12-28 政和科技股份有限公司 一种在网页上批量向即时通信客户端发送信息的方法
CN108173737A (zh) * 2016-12-07 2018-06-15 中兴通讯股份有限公司 一种群聊方法及系统、服务器、移动终端
CN109347647A (zh) * 2018-12-21 2019-02-15 北京云中融信网络科技有限公司 群组消息分发方法及装置
CN115022110B (zh) * 2022-08-08 2022-12-27 广州市千钧网络科技有限公司 消息分发方法、可读介质以及电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188620A (zh) * 2006-11-17 2008-05-28 张立伟 利用flash插件技术创建互联网虚拟会客厅在一个界面同时实现同步异步交流
US7472166B1 (en) * 2000-08-31 2008-12-30 Intel Corporation Assisting users with web pages
JP2009265821A (ja) * 2008-04-23 2009-11-12 Yahoo Japan Corp チャットシステム、管理サーバおよびチャットプログラム

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100370790C (zh) * 2004-05-27 2008-02-20 腾讯科技(深圳)有限公司 在即时通讯系统中控制即时消息的方法
CN1744584A (zh) * 2005-08-12 2006-03-08 千乡万才科技(中国)有限公司 一种跨网通信并处理通信记录的系统与方法
CN101217554B (zh) * 2008-01-14 2010-07-14 苏州阔地网络科技有限公司 网页上实现的即时通讯的方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7472166B1 (en) * 2000-08-31 2008-12-30 Intel Corporation Assisting users with web pages
CN101188620A (zh) * 2006-11-17 2008-05-28 张立伟 利用flash插件技术创建互联网虚拟会客厅在一个界面同时实现同步异步交流
JP2009265821A (ja) * 2008-04-23 2009-11-12 Yahoo Japan Corp チャットシステム、管理サーバおよびチャットプログラム

Also Published As

Publication number Publication date
CN102307155A (zh) 2012-01-04
CN101883058A (zh) 2010-11-10

Similar Documents

Publication Publication Date Title
WO2012000228A1 (zh) 一种通用的网页上实现群组通讯的方法
US10938995B2 (en) System and method for associating audio clips with objects
US8209384B2 (en) Persistent group-based instant messaging
CN109962833B (zh) 即时通讯客户端上会话的创建方法及装置
CN1251108C (zh) 一种即时通信的系统和方法
US9398067B2 (en) Web-based sharing of documents
CN103581111B (zh) 一种通信方法及系统
US20050132056A1 (en) Method, system, and apparatus for generating weblogs from interactive communication client software
CN107135145A (zh) 消息推送控制方法及装置
WO2012000226A1 (zh) 一种网页上实现的p2p通讯的方法
CN102130844B (zh) 保存Web聊天记录的方法及系统
WO2012000220A1 (zh) 一种网页上实现的自动接收群组消息的方法
CN102075455A (zh) 一种即时通讯方法
WO2012000227A1 (zh) 一种网页上实现的p2p视频通讯的方法
CN106161186B (zh) 即时通讯方法及装置
CN101808081A (zh) 一种基于邮件发送邀请注册的方法及系统
CN102651713A (zh) 管理用户群组成员的方法、装置及系统
CN103595611B (zh) 即时通信应用的实现方法及系统、与设备
CN102045274B (zh) 基于即时通信实现信息交互的方法和通信系统
CN102255825A (zh) 一种可扩展的交互式通讯方法及系统
WO2012000221A1 (zh) 一种网页上实现的基于p2p技术的网络会议的方法
CN105228024A (zh) 机顶盒用户交互方法
WO2012000229A1 (zh) 一种通用的能在网页上显示带好友状态的好友列表的方法
CN103312592B (zh) 一种在网页上批量向即时通信客户端发送信息的方法
CN106034157A (zh) 数据交换中传输http协议的方法、服务器及存储设备

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: 10853931

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: 10853931

Country of ref document: EP

Kind code of ref document: A1