WO2016090995A1 - Procédé de communication entre une page et un serveur de longue connexion, et extrémité client - Google Patents

Procédé de communication entre une page et un serveur de longue connexion, et extrémité client Download PDF

Info

Publication number
WO2016090995A1
WO2016090995A1 PCT/CN2015/090819 CN2015090819W WO2016090995A1 WO 2016090995 A1 WO2016090995 A1 WO 2016090995A1 CN 2015090819 W CN2015090819 W CN 2015090819W WO 2016090995 A1 WO2016090995 A1 WO 2016090995A1
Authority
WO
WIPO (PCT)
Prior art keywords
connection server
long connection
page
server
long
Prior art date
Application number
PCT/CN2015/090819
Other languages
English (en)
Chinese (zh)
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 WO2016090995A1 publication Critical patent/WO2016090995A1/fr

Links

Images

Classifications

    • 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
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Definitions

  • the present invention relates to the field of Internet applications, and in particular, to a communication method and a client between a page and a long connection server.
  • Common pages include browser pages, online game pages, gift collection pages and/or user information collection pages in mobile games, chat pages of video applications, and shopping malls. Pages, chat rooms, and more.
  • the page can interact with the outside world.
  • the page communicates directly with the long connection server.
  • the page also known as the front end
  • communication between the page and the long connection server necessarily requires manual maintenance.
  • the front end is connected to the long connection server through a channel, and the front end is inquired whether there is data update every fixed time (for example, 30 seconds), and the message push or transmission between the front end and the long connection server is implemented based on the polling access mechanism. .
  • the present invention has been made in order to provide a communication method and corresponding client between a page and a long connection server that overcomes the above problems or at least partially solves or alleviates the above problems.
  • a method for communication between a page and a long connection server including:
  • a page and a long connection server Communication client including:
  • connection establishing component configured to find a corresponding long connection server according to the long connection server address sent by the current page, and establish a long connection channel between the local connection server and the long connection server;
  • a transmitting component configured to receive a transmission message sent by the persistent connection server, and forward the transmission message to the current page.
  • a computer program comprising computer readable code, when said computer readable code is run on a computing device, causing said computing device to perform a long connection according to any of said pages Communication method between servers.
  • a computer readable medium storing a computer program as described above is provided.
  • the host with the communication capability replaces the page and communicates with the long connection server, and the page only needs to process the forwarding message for the main body, and does not need to periodically and actively query the long connection server for existence.
  • New messages improve the real-time nature of message reception.
  • the long connection channel established between the main body and the long connection server is stable, does not require manual maintenance, reduces resource loss, and the stable long connection channel is not prone to packet loss and packet leakage events, which greatly increases the security of message transmission and reliability.
  • FIG. 1 is a flow chart showing the processing of a method of communication between a page and a long connection server according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram showing the implementation of flash as a main body according to an embodiment of the present invention. Schematic diagram of a message transmission path of a communication method between a page and a long connection server;
  • FIG. 3 is a schematic block diagram showing the structure of a communication client between a page and a long connection server according to an embodiment of the present invention
  • FIG. 4 is a block diagram schematically showing a computing device for performing a method of communication between a page and a persistent connection server according to the present invention
  • Fig. 5 schematically shows a storage unit for holding or carrying program code for implementing a communication method between a page according to the present invention and a long connection server.
  • an embodiment of the present invention provides a communication method between a page and a long connection server.
  • 1 is a flow chart showing the processing of a method of communication between a page and a persistent connection server in accordance with one embodiment of the present invention.
  • the communication method between the page and the persistent connection server includes at least steps S102 to S106:
  • Step S102 Find a long connection server according to the long connection server address sent by the current page, and establish a long connection channel between the local and the long connection server.
  • the current page finds its corresponding long connection server address and forwards it.
  • the long connection server address sent by the current page is received, and the corresponding long connection server is found correspondingly, thereby establishing a long connection channel between the local and the long connection server.
  • the embodiment of the present invention does not need to establish a long connection channel between the page and the long connection server, but establishes a long connection channel with the long connection server in other applications or clients or devices or devices other than the page. For the page, this connection method will not be good at liberating the pages that communicate with the long connection server, reducing the load on the page and improving the work efficiency of the page.
  • step S102 in order to reduce the load of the page, before the implementation of step S102, it is also necessary to select a main body capable of establishing a stable long connection channel with the long connection server as an implementation body of the communication method between the page and the long connection server. That is, the main body has independent communication capabilities and can communicate with the long connection server. Stable long connection channel is not required Manual maintenance reduces manual wear and tear compared to communication between a normal page and a long connection server in the prior art.
  • the long connection channel is stable, and it is not necessary to use a polling mechanism to periodically ask whether there is data update, whether message transmission or push is needed, and the purpose of pushing or transmitting updated data or messages in real time can be achieved, and the delay is reduced.
  • flash can be used as a main body to implement a communication method between the page and the long connection server.
  • the reason for choosing flash is to consider the function of flash, which can communicate directly with the server, such as receiving the content sent by the long connection server, and so on; and can communicate with the page (also called the front end), for example, from The content received by the long connection server goes to page processing and so on. Further, at this time, a long connection channel can be established between the flash and the long connection server by using the FLASH socket protocol adapted to the flash.
  • the long connection server address is obtained as follows.
  • the page first sends a request message requesting a long connection server address to the corresponding service server.
  • the service server allocates a long connection server to the page, and sends the assigned long connection server address to the page by using a response message.
  • the page receives the response message including the long connection server address returned by the service server, and then sends the long connection server address to the body selected as the implementation body selected in this embodiment.
  • the principal uses the long connection server address to find the assigned long connection server and establishes a long connection channel (ie, step S102).
  • Step S104 Receive a transmission message sent by the persistent connection server.
  • the long connection server will identify different subjects and send the corresponding messages to different subjects.
  • the identifier (ID) of the current page is sent to the long connection server, so that the long connection server finds the content delivery object according to the ID, where The local identifier corresponds to the ID one by one. That is, each body is bound to the page, and its ID is the same.
  • the long connection server identifies the destination address of each transmission message according to the ID, reduces the probability of packet loss, and improves the security and reliability of message transmission.
  • Step S106 Forward the transmission message to the current page.
  • the subject After receiving the transmitted message, the subject forwards it to the current page for processing by the current page.
  • the host with the communication capability replaces the page and communicates with the long connection server, and the page only needs to process the forwarding message for the main body, and does not need to periodically and actively query the long connection server for existence.
  • New messages improve the real-time nature of message reception.
  • the long connection established between the main body and the long connection server The channel is stable, does not require manual maintenance, reduces resource loss, and the stable long connection channel is not prone to packet loss and packet leakage events, which greatly increases the security and reliability of message transmission.
  • the page mentioned in the embodiment of the present invention includes a browser page, and further includes an online game page, a package receiving page and/or a user information collecting page in a mobile game, a chat page of a video application, a shopping mall page, a chat room page, and the like. .
  • the first is the business message sent by other pages through the business server.
  • the online notification message sent by the game page for the friend, the message pushing or transmitting object is the specified user group (the number of friends usually ranges from one to several hundred);
  • the second type is the system message broadcast by the service server.
  • the system notification issued by the game page the upgrade maintenance notice of the game page, the new server notification, the user function increase notification, etc.
  • the message push or transmission object is the entire system user.
  • the transport message (service message and/or system message) sent by the long connection server to the page includes the ID of the page, and the long connection server uses the ID to identify the body corresponding to the ID, and transmits the message (service message). And/or system messages) are sent to the principal.
  • chat page Take the chat page as an example.
  • This page needs to interact with other pages.
  • This page can be used as a message sender or as a message receiver.
  • the message is sent to the service server, which is forwarded by the service server to the long connection server, and then forwarded to other pages by the long connection server.
  • this page is used as the message receiver, it receives the message sent from the long connection server, of course, the message comes from other pages. That is, in the embodiment of the present invention, the page can perform information interaction with other pages, so that it can be applied to functions such as chat, chat room, and live room.
  • the chat pages are interacted according to the following steps:
  • the long connection server pushes the service message to different flashes. Different users have their own flash.
  • the long connection server can identify different pages for targeted transmission, that is, through a long connection channel, targeted to someone. (page user).
  • FIG. 2 is a schematic diagram showing a message transmission path of a flash as a main communication method between a page and a long connection server according to an embodiment of the present invention. It should be noted that the message transmitted in this example is a service between pages. Message. Referring to Figure 2, the transmission process of each path in the figure is as follows:
  • Step S202 The page sends a request message for requesting a long connection server address to the service server;
  • Step S204 The service server returns an address of the persistent connection server.
  • Step S206 the page notifies the flash of the address of the long connection server
  • Step S208 the flash establishes a socket connection with the long connection server corresponding to the address
  • Step S210 The page sends a service message to the service server.
  • Step S212 The service server forwards the service message sent by the service page to the service server to the persistent connection server.
  • Step S214 The long connection server pushes the service message to other pages.
  • Step S216 the long connection server finds that there is a service message corresponding to the page, and pushes the corresponding service message to the flash;
  • Step S218 The flash sends the service message pushed by the long connection server to the page.
  • Steps S202 to S208 are a long connection establishment process between the flash and the long connection server
  • steps S210 to S214 are page sending service messages to other pages
  • steps S216 to S218 are page reception.
  • the steps S210 to S214 and the steps S216 to S218 are independent, and there is no time or order limitation between them.
  • the page is no longer responsible for the communication task with the long connection server, but the flash is responsible for communication, and the long connection channel between the flash and the long connection server is a natural connection.
  • the channel itself can initiate maintenance, which is much simpler than traditional manual maintenance.
  • FIG. 3 is a block diagram showing the structure of a communication client between a page and a persistent connection server according to an embodiment of the present invention.
  • the schematic diagram at least includes:
  • the connection establishing component 310 is configured to find a corresponding long connection server according to the long connection server address sent by the current page, and establish a long connection channel between the local and the long connection server;
  • a transport component 320 coupled to the connection establishment component 310, for receiving a persistent connection server The delivered message is forwarded and the transfer message is forwarded to the current page.
  • the transmission component 320 is further configured to send the identifier ID of the current page to the long connection server, so that the long connection server finds the content delivery object according to the ID, wherein the local identifier corresponds to the ID one-to-one.
  • the transmission messages sent by the long connection server include:
  • the service message and/or the system message include the ID of the current page.
  • the communication client between the page and the persistent connection server is flash.
  • connection establishment component 320 is further configured to establish a long connection channel between the flash and the persistent connection server using the FLASH socket protocol.
  • the host with the communication capability replaces the page and communicates with the long connection server, and the page only needs to process the forwarding message for the main body, and does not need to periodically and actively query the long connection server for existence.
  • New messages improve the real-time nature of message reception.
  • the long connection channel established between the main body and the long connection server is stable, does not require manual maintenance, reduces resource loss, and the stable long connection channel is not prone to packet loss and packet leakage events, which greatly increases the security of message transmission and reliability.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the components of the communication client between the page and the persistent connection server in accordance with an embodiment of the present invention. Or all features.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 4 illustrates a computing device that can implement a method of communication between a page and a persistent connection server in accordance with the present invention.
  • the computing device conventionally includes a processor 410 and a computer program product or computer readable medium in the form of a memory 420.
  • the memory 420 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • Memory 420 has a memory space 430 for program code 431 for performing any of the method steps described above.
  • storage space 430 for program code may include various program code 431 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such computer program products are typically portable or fixed storage units as described with reference to FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 420 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 431', ie, code readable by a processor, such as 410, that when executed by a computing device causes the computing device to perform each of the methods described above step.

Abstract

L'invention concerne un procédé de communication entre une page et un serveur de longue connexion, et une extrémité client. Le procédé consiste à : sur la base d'une adresse de serveur de longue connexion envoyée par la page courante, trouver le serveur de longue connexion correspondant, et établir localement un canal de longue connexion vers le serveur de longue connexion; recevoir un message de transmission émis par le serveur de longue connexion; et transférer ledit message de transmission à la page courante. L'utilisation de la présente invention renforce la sécurité et la fiabilité de transmission de message.
PCT/CN2015/090819 2014-12-10 2015-09-25 Procédé de communication entre une page et un serveur de longue connexion, et extrémité client WO2016090995A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410758655.5 2014-12-10
CN201410758655.5A CN104486327B (zh) 2014-12-10 2014-12-10 页面与长连接服务器间的通信方法及客户端

Publications (1)

Publication Number Publication Date
WO2016090995A1 true WO2016090995A1 (fr) 2016-06-16

Family

ID=52760831

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/090819 WO2016090995A1 (fr) 2014-12-10 2015-09-25 Procédé de communication entre une page et un serveur de longue connexion, et extrémité client

Country Status (2)

Country Link
CN (1) CN104486327B (fr)
WO (1) WO2016090995A1 (fr)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383617A (zh) * 2020-11-12 2021-02-19 百度在线网络技术(北京)有限公司 进行长连接的方法、装置、终端设备以及介质
CN113472893A (zh) * 2021-07-22 2021-10-01 咪咕数字传媒有限公司 数据处理方法、装置、计算设备及计算机存储介质
CN114040007A (zh) * 2021-11-02 2022-02-11 北京华云安信息技术有限公司 多节点间数据传输方法和设备

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486327B (zh) * 2014-12-10 2019-02-05 北京奇虎科技有限公司 页面与长连接服务器间的通信方法及客户端
CN105099885B (zh) * 2015-07-13 2018-06-12 小米科技有限责任公司 信息发送方法及装置
CN108965413B (zh) * 2018-07-03 2021-08-03 北京小米移动软件有限公司 信息交互方法、装置及存储介质
CN110012115A (zh) * 2019-05-06 2019-07-12 广州华多网络科技有限公司 直播间推送信息的更新方法和系统
CN116708533A (zh) * 2022-10-31 2023-09-05 荣耀终端有限公司 连接切换方法、服务器停机方法、终端设备和服务器

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297453A (zh) * 2012-02-24 2013-09-11 阿里巴巴集团控股有限公司 实现即时通讯的方法、浏览器端和系统
CN103905435A (zh) * 2014-03-14 2014-07-02 北京六间房科技有限公司 一种前端页面与后端服务器通信方法
CN104009938A (zh) * 2014-06-17 2014-08-27 合一网络技术(北京)有限公司 基于路由层面的长连接的方法和系统
CN104486327A (zh) * 2014-12-10 2015-04-01 北京奇虎科技有限公司 页面与长连接服务器间的通信方法及客户端

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7743254B2 (en) * 2005-03-23 2010-06-22 Microsoft Corporation Visualization of trust in an address bar
CN102761564B (zh) * 2011-04-25 2015-04-22 阿里巴巴集团控股有限公司 图形共享方法、系统与终端
CN103634384B (zh) * 2013-11-21 2016-09-14 山东康威通信技术股份有限公司 一种基于Flash技术在浏览器上实时远程监控终端设备的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297453A (zh) * 2012-02-24 2013-09-11 阿里巴巴集团控股有限公司 实现即时通讯的方法、浏览器端和系统
CN103905435A (zh) * 2014-03-14 2014-07-02 北京六间房科技有限公司 一种前端页面与后端服务器通信方法
CN104009938A (zh) * 2014-06-17 2014-08-27 合一网络技术(北京)有限公司 基于路由层面的长连接的方法和系统
CN104486327A (zh) * 2014-12-10 2015-04-01 北京奇虎科技有限公司 页面与长连接服务器间的通信方法及客户端

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383617A (zh) * 2020-11-12 2021-02-19 百度在线网络技术(北京)有限公司 进行长连接的方法、装置、终端设备以及介质
CN113472893A (zh) * 2021-07-22 2021-10-01 咪咕数字传媒有限公司 数据处理方法、装置、计算设备及计算机存储介质
CN113472893B (zh) * 2021-07-22 2023-08-01 咪咕数字传媒有限公司 数据处理方法、装置、计算设备及计算机存储介质
CN114040007A (zh) * 2021-11-02 2022-02-11 北京华云安信息技术有限公司 多节点间数据传输方法和设备
CN114040007B (zh) * 2021-11-02 2024-04-16 北京华云安信息技术有限公司 多节点间数据传输方法和设备

Also Published As

Publication number Publication date
CN104486327B (zh) 2019-02-05
CN104486327A (zh) 2015-04-01

Similar Documents

Publication Publication Date Title
WO2016090995A1 (fr) Procédé de communication entre une page et un serveur de longue connexion, et extrémité client
US9137313B2 (en) Data transmission system and method using relay server
US9591524B2 (en) Method and apparatus for transmitting data in network system, and data transmission system
CN101997768B (zh) 一种上送地址解析协议报文的方法和装置
KR101317178B1 (ko) 지그비 게이트웨이 및 이의 메시지 동일화 방법
WO2017128178A1 (fr) Procédé, client et dispositif d'interaction d'informations
EP2234332A1 (fr) Procédé, dispositif et système pour diagnostiquer si, dans le réseau p2p, des noeuds sont anormaux ou non
KR20160039280A (ko) 데이터 교환을 위한 컨텍스트를 설정하는 http 프로토콜을 통한 메시징 api
CN103580988A (zh) 消息接收、推送、传输的方法、装置、服务器组及系统
US20230031062A1 (en) Data processing method and apparatus, related device, and storage medium
CN104410562A (zh) 一种能够与业务进行关联的即时信息处理方法
US8650313B2 (en) Endpoint discriminator in network transport protocol startup packets
CN103581361A (zh) 一种域名解析代理方法、设备及系统
JP2014123363A5 (fr)
WO2015172629A1 (fr) Procédé, appareil, et système de transmission de message
US8861503B2 (en) Method and system for synchronizing data between mobile terminal and internet phone
US9439049B2 (en) System and method for message service gateway
WO2019242279A1 (fr) Procédé et dispositif de traitement de message
WO2017005118A1 (fr) Procédé, dispositif, terminal, et serveur permettant de maintenir une connexion de communication
US10021067B2 (en) Internet protocol address distribution for wireless network
AU2014231331B2 (en) System and method for reliable messaging between application sessions across volatile networking conditions
CN103873355A (zh) 一种信息配对方法
CN106657179A (zh) 文件传输方法和系统
JP6591067B2 (ja) 情報送信方法及び装置
CN114793234B (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: 15867682

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

Country of ref document: EP

Kind code of ref document: A1