CN103401925B - A kind of method of the multiple webpages with single connection mode synchronization website - Google Patents
A kind of method of the multiple webpages with single connection mode synchronization website Download PDFInfo
- Publication number
- CN103401925B CN103401925B CN201310331210.4A CN201310331210A CN103401925B CN 103401925 B CN103401925 B CN 103401925B CN 201310331210 A CN201310331210 A CN 201310331210A CN 103401925 B CN103401925 B CN 103401925B
- Authority
- CN
- China
- Prior art keywords
- page
- host
- user
- slave
- host page
- 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.)
- Active
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a kind of method of the multiple webpages with single connection mode synchronization website, the plurality of webpage includes a host page and at least one slave page, comprises the steps:A) be the slave page by the page setting of user's current accessed, connection host page is attempted judging whether host page;If the connection that b) there is host page and the page of host page response user's current accessed is attempted, step d) is entered;If there is no host page, or there is host page but host page is not responding to, then enter step c);C) it is new host page by the page definition of user's current accessed, and the server that the new host page connects the website is carried out data syn-chronization;And d) make the page of current accessed remain the slave page, data syn-chronization is carried out with already present host page.
Description
Technical field
The present invention relates to webpage instant communication field, more particularly to a kind of side with the synchronous multiple webpages of single connection mode
Method.
Background technology
Instant messaging(Instant Messenger, abbreviation IM), it is a kind of industry of the instant exchange message based on internet
Business.Instant messaging allows two people or many people to exchange with video using the instant transmission message language in networking, archives, voice.Due to
Its instantaneity, is that communication two party brings great convenience.Traditional instant communicating system passes through user on computer terminals
The special MSN that installs is being communicated.At present, as a kind of convenient communication tool, instant communicating system is
Mobile terminal, such as mobile phone, panel computer etc. are gradually extended to from PC.Another development trend is webpage version immediate communication tool,
Instant messaging service provider in the middle of IM Integration ofTechnologies to community, forum and generic web page, when realizing that user browses web sites
Immediately exchanged, user is not only facilitated without the need for downloading and installing software, can also improve liveness, the website of site visitor
Usage rate of the user and the conversion ratio of visitor, are commonly applied to the real-time communication of both parties in a lot of e-commerce websites.
User when webpage version instant messaging is carried out using browser, usually on a station terminal using a browser
Open multiple pages.For example, user is interested in the commodity when a commodity page is browsed, it is desirable to which understand the commodity enters one
Step details, in the webpage version immediate communication tool being click in the page, opens the dialogue with commodity or service seller, carries out
Price or the consulting of commodity details.While dialogue, user may put out another commodity of another web page browsing again, or
Another page browsing news is opened again, if the instant messaging other side at this time in first page sends message, and user
Do not stop and reminded on this page yet, then user can be caused to miss information, the decline of Consumer's Experience is caused.
In order to solve this problem, have been proposed in prior art multiple on multiple Webpages to instant messaging window
The technology that mouth is synchronized.Using these technology, no matter user clicks on the new page is browsed or is switched to previous opening
Any page, the window of instant messaging can be all synchronized on the page that user is currently browsing, to avoid user from missing message.
In the prior art, how using several methods of synchronization as follows:
1st, http polling mode synchrodatas are adopted.The operation principle of http polls is that server receives client and sends
Request after if it find that there is data, then server respond request at once;If it find that not sending data, server end will
Kept for a period of time, if it find that there is data then server respond request at once in this period;If the retention time has arrived also
Data are not found, then server response http request, browser retransmits a same http after receiving http responses immediately
Whether requesting query has data.This http polls are also referred to as the long polls of http, and which is limited in that the requirement to server end
Very high, browser end has been simultaneously connected with maximum restriction to the http of same server.In addition, server end is not receiving number
According to when holding process can cause to waste, easily produce server bottleneck, these have been resulted in using http polling mode synchronizations
Server cost very high.Existing instant communication client such as Windows PC, Mac PC, Android operation system,
The forms such as iOS mobile phone operating systems are all kept in communication using the long connected modes of this TCP and server, therefore also to server
Cost requirement very high.
2nd, using Adobe streaming media servers or by rtmp synchronization web datas.This method of synchronization depends on specific
Software, i.e. the product of Adobe companies, therefore versatility is poor.In addition product degree of dependence very high also result in server into
This is high.
3rd, plug-in unit is installed by browser, the function of expanding browser reaches local data synchronization.This method needs to use
Browser plug-in is installed at family manually, and this brings inconvenience for the use of user.User is many times using webpage version IMU
What news instrument was pursued is quick and convenient, and installing plug-in unit then needs to spend user's extra time, causes the Consumer's Experience of product
It is deteriorated.In addition, plug-in unit mode needs regularly to be updated and safeguard, cause the upgrading difficulty in later stage larger.
Accordingly, it would be desirable to a kind of side that can be synchronized instant communication information and window when user browses multiple pages
Method, can be effectively improved or keep the experience of user, while substantially reduce the cost of server, convenient in user with flexible
Mode use instant communicating system.
Content of the invention
It is an object of the invention to provide a kind of method of the multiple webpages with single connection mode synchronization website, the plurality of
Webpage includes a host page and at least one slave page, comprises the steps:A) page of user's current accessed is set
It is set to the slave page, attempts connection host page to judge whether host page;If b) there is host page and host page
The connection of the page of face response user's current accessed is attempted, then enter step d);If there is no host page, or there is host page
Face but host page is not responding to, then enter step c);C) it is new host page by the page definition of user's current accessed, and will
The server that the new host page connects the website carries out data syn-chronization;And d) make the page of current accessed remain slave
The page, carries out data syn-chronization with already present host page.
Preferably, the host page is uniquely to be connected to carry out data in the plurality of webpage with the server of the website
The page of exchange.
Preferably, the host page and the Website server keep the connection of TPC length.
Preferably, host page is judged whether by reading local Web caching file in the step a)
Face.
Preferably, the Web caching file is cookie or ShareObject.
Preferably, the step c) also includes rewriting the Web caching file to record new host page.
Preferably, the slave page includes that the high speed slave page and the low speed slave page, the high speed slave page are
The page of the non-host page that user is currently accessing, the low speed slave page are to be minimized by the user or be not accessed for
Other slave pages.
Preferably, the high speed slave page and the host page keep heartbeat connection.
Preferably, the low speed slave page reads local data by timing and carries out data syn-chronization.
Preferably, when user clicks on a low speed slave page to conduct interviews, the low speed slave page is in certain time
It is changed into the high speed slave page in interval.
According to the method synchronized instant communication information and window when user browses multiple pages of the present invention, can
So that server provides only a kind of access ways of TCP, exploitation maintenance cost is reduced.Meanwhile, the multiple web pages of single client only lead to
The mode and server for crossing unique TCP length connection is kept in communication, and reaches while having the connection of tradition http length, browser to insert
The good Consumer's Experience that the modes such as part are brought, while effectively reduce server cost requirement.Additionally, the method according to the invention is big
The pressure of server Access Layer is reduced greatly, so as to reduce the input of hardware.Synchronous method according to the present invention effectively can change
Enter the experience of user, while substantially reduce the cost of server, convenient in user in a flexible way using instant messaging
System.
It should be appreciated that aforementioned description substantially and follow-up description in detail are exemplary illustration and explanation, should not
It is used as the restriction to claimed content of the invention.
Description of the drawings
With reference to the accompanying drawing that encloses, the present invention more purpose, function and advantages are by by the as follows of embodiment of the present invention
Description is illustrated, wherein:
Fig. 1 schematically shows the browser interface schematic diagram of the application present invention;
Fig. 2 schematically shows the method flow diagram according to synchronization multiple web pages data of the invention.
Specific embodiment
By reference to one exemplary embodiment, the purpose of the present invention and function and the side for realizing these purposes and function
Method will be illustrated.However, the present invention is not limited to one exemplary embodiment disclosed below;Can by multi-form come
Which is realized.The essence of specification is only to aid in the detail of the various equivalent modifications Integrated Understanding present invention.
Hereinafter, embodiments of the invention will be described with reference to the drawings.In the accompanying drawings, identical reference represents identical
Or similar part, or same or like step.
Fig. 1 schematically shows the schematic diagram of the multiple web pages synchronous method of the application present invention.As shown in figure 1, user beats
Browser 100 is driven, the network address for being input into a certain website is browsed.In the first Webpage 101, user opens webpage IMU
News window 110 carries out instant messaging dialogue.Usually be superimposed upon user currently browses the first webpage to webpage instant communication window 110
Independent window above the page 101, can adopt the flash technology of Adobe companies to realize.User is browsing the first Webpage
101 and while instant communication window 110 engages in the dialogue, certain link that may be clicked in the first Webpage 101 is looked into
See other pages interested in the website.In response to the click of user, browser 100 can eject the second new Webpage
102.According to the page synchronization method of the present invention, instant messaging window 110 can now be synchronized to user and be currently viewing
On second Webpage 102.That is, user when the first Webpage 101 is browsed instant communication window 110 carried out right
Words process synchronous with the presentation of the second Webpage 102 can be presented.User can when the second Webpage 102 is browsed without
Continue the dialogue carried out in instant communication window 110 in seam ground.
Similar, user may also open multiple other pages of the website simultaneously, such as the 3rd Webpage 103,
4th Webpage 104 etc..Appointing for the website is chosen in the tab bar 120 that user passes through above click browser 100
During one page of meaning, webpage instant communication window 110 can be now synchronized on the Webpage that user is currently viewing.
According to the present invention, in the multiple Webpages for carrying out instant messaging window synchronization in need, without the need for by each
The page is all communicated with the server of website respectively.The present invention is by defining homepage-keep away from the master slave mode of the page
Exempt from the synchronous frequent access caused by Website server of whole webpages.The present invention is directed to be needed to carry out instant messaging window synchronization
Multiple page divisions of the same website of connection be several as follows:
1. host page.Host page is the Webpage for linking and carrying out data exchange with server holding.Preferably,
Host page and server keep the connection of TPC length.Host page is used for synchronous data locally between server, such as IMU
Session data during news.Meanwhile, main frame is responsible for writing and changes local data, these data be used for make the non-host page it
Other outer pages(The slave page for example defined below)Synchronize and keep.According to the present invention, a certain website is being accessed
All Webpages in, be only defined as host page the page be responsible for carry out data exchange and server between.Therefore, many
A link is only kept in individual webpage, reduces the pressure of server Access Layer.
Generally, when user opens instant telecommunication session window on the Webpage that certain accesses for the first time, current
The page is defined as host page.In the example depicted in fig. 1, user opens instant messaging by the first Webpage 101
Session, then the first Webpage 101 be host page.
Host page is not changeless.As user may close certain page in use at any time,
For example in FIG, user closes the page by clicking on " X " of 101 right of the first Webpage.User closes the page and can select
Closed after being switched to the page, it is also possible to browsing current page(For example during the second Webpage 102)Click directly on
" X " of one Webpage, 101 right is closing the page.When the first Webpage 101, i.e., after current host page is closed,
Current host page is not present, then can select successor from other pages as new host page, so as to take over
The task of synchronous data locally between server.New host page method is selected to will be explained below.
2. the slave page.The slave page is the Webpage that other in addition to host page access the same website.
Due to only having host page and server to carry out data exchange, therefore the slave page be also defined as not connected server all its
His webpage.
Fig. 2 shows the flow process of the multiple web pages synchronous method 200 according to the present invention.Multi-page synchronization side according to the present invention
Method supports the synchronization of data between at least 2 pages.As shown in Fig. 2 when user starts to access a Webpage, according to such as
Under type is synchronized to the data of the Webpage.The method comprises the steps:
Step 201, confirms identity to the page of user's current accessed.User is accessed with a Webpage when front opening
Certain website.The page can be the page that user is input into by browser address bar, or user by visiting before clicking on
Link and the page newly opened in the page that asked, or, opened before being user but be minimized or unactivated
The page.The current web page page that the user accesses is defined as the slave page first, then will attempt connection as the slave page
Host page, has checked for host page.
In step 202, host page is judged whether.The judgement can by read local Web caching file come
Realize.For example, local Web caching file can be cookie, if instant communication function adopts Adobe flash skills
Art realization, then read local ShareObject.If read out there are host page, enter step 203 and judge master
Whether the machine page responds;If read out, user is when the Webpage of front opening
It is the First Contact Connections website, subsequently enters step 204 and define new host page.
In step 203, attempt being attached with the host page for having existed and judging whether host page responds.Order is worked as
The Webpage of front opening passes through locality connection(I.e. without the mode of Website server)Attempt being connected with host page
(" ping " order in similar to tcp/ip agreements), connect host page.If with host page successful connection, illustrated
The host page of presence is still within effective status, then enter step 205, make to continue to remain slave page when the page of front opening
Surface state.Data of the data of current page with host page are synchronized.
If attempt connection host page find do not respond to, illustrate user front opening host page may by
Close, now without host page, then enter step 204.
In step 204, new host page is defined.Specifically, main frame will be switched to when the Webpage of front opening
Page status, rewrite local Web caching file, will the mark of the page write in the Web caching file and be labeled as leading
The machine page, for the reading of other slave pages from now on.It is same that new host page carries out data by Transmission Control Protocol connection server
Step and exchange.Host page and server keep connection, for synchronous data locally between server.Meanwhile, host page
It is responsible for write and modification local data, for the synchronous and persistence of the slave page and host page.
After new host page is defined, local Web caching file is rewritten, and have recorded new host page
Face.User often opens the new page of a website for needing to carry out data syn-chronization from now on, then continue to use the method and step shown in Fig. 2
Carry out type of webpage division and data syn-chronization.
Method according to Fig. 2, if there are host page, the page that user newly opens then is defined and is protected
Hold as slave.According to the present invention, when host page is closed, the slave page can have an opportunity to become new host page, but simultaneously
The chance that the slave page of not all has equality becomes host page.
According to the difference of page current active degree, the slave page according to the definition of the present invention can be subdivided at a high speed again
The slave page and the low speed slave page.As user currently only accesses a page, such as user passes through i.e. just in the page
When communication tool conversate, so the web page definition of the non-host page that user is currently viewing be high speed slave page
Face.High speed slave and host page keep the heartbeat connection with certain time as a cycle, such as 1 second, i.e., fixed by this heartbeat
When repeat method shown in above-mentioned Fig. 2.Once detect main frame not exist or do not respond, then high speed slave conversion of page
For host page.The high speed slave page and host page keep data syn-chronization connection, when operated by the user, the high speed slave
Host page is sent to by the synchronizing channel again after page preferential answering, by host page by data syn-chronization to server and sheet
Ground data storage.Meanwhile, the high speed slave page reads the locally stored notice state come sync server end, example by timing
Such as:Receive good friend's message, receive system message, friend state change etc..
Low speed slave page definition is to be minimized by the user or be not accessed(Activation)Other slave pages.Low speed slave
Without any connection and between host page, reading a local datastore simply by timing carries out state synchronized, such as per 3
Second reads a local data and synchronizes.
When user clicks on a low speed slave page to conduct interviews, such as one page for being opened but not being activated
Face, then the low speed slave page be then changed into the high speed slave page in a certain time interval.For example in 1 second.Then, the page
Face carries out data syn-chronization according to the mode shown in Fig. 2.
According to the method synchronized instant communication information and window when user browses multiple pages of the present invention, can
So that server provides only a kind of access ways of TCP, exploitation maintenance cost is reduced.Meanwhile, the multiple web pages of single client only lead to
The mode and server for crossing unique TCP length connection is kept in communication, and reaches while having the connection of tradition http length, browser to insert
The good Consumer's Experience that the modes such as part are brought, while effectively reduce server cost requirement.Additionally, the method according to the invention is big
The pressure of server Access Layer is reduced greatly, so as to reduce the input of hardware.Synchronous method according to the present invention effectively can change
Enter the experience of user, while substantially reduce the cost of server, convenient in user in a flexible way using instant messaging
System.
In conjunction with the explanation and practice of the present invention for disclosing here, the other embodiment of the present invention is for those skilled in the art
All will be readily apparent and understand.Illustrate and embodiment be to be considered only as exemplary, the present invention true scope and purport equal
It is defined in the claims.
Claims (5)
1. a kind of with single connection mode synchronization website multiple webpages method, the plurality of webpage include a host page and
At least one slave page, comprises the steps:
A) be the slave page by the page setting of user's current accessed, connection master is attempted by reading local website buffer culture
The machine page is judging whether host page;
If the connection that b) there is host page and the page of host page response user's current accessed is attempted, step d) is entered;
If there is no host page, or there is host page but host page is not responding to, then enter step c);
C) it is new host page by the page definition of user's current accessed, and the new host page is connected the website
Server carries out data syn-chronization;With
D) make the page of current accessed remain the slave page, data syn-chronization is carried out with already present host page;
The wherein described slave page includes the high speed slave page and the low speed slave page, and the high speed slave page is that user is current
The page of the non-host page for accessing, the low speed slave page are to be minimized by the user or be not accessed for other slaves
The page;The high speed slave page and the host page keep the heartbeat connection with certain time as a cycle;Described low
The fast slave page reads a local data by timing and carries out data syn-chronization;Carry out when user clicks on a low speed slave page
During access, the low speed slave page is changed into the high speed slave page in a certain time interval.
2. the method for claim 1, wherein described host page be in the plurality of webpage uniquely with the website
Server connection carries out the page of data exchange.
3. method as claimed in claim 1 or 2, wherein described host page and Website server holding TCP length connections.
4. the method for claim 1, wherein described Web caching file are cookie or ShareObject.
5. the method for claim 1, wherein described step c) also include rewriting the Web caching file new to record
Host page.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310331210.4A CN103401925B (en) | 2013-07-31 | 2013-07-31 | A kind of method of the multiple webpages with single connection mode synchronization website |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310331210.4A CN103401925B (en) | 2013-07-31 | 2013-07-31 | A kind of method of the multiple webpages with single connection mode synchronization website |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103401925A CN103401925A (en) | 2013-11-20 |
CN103401925B true CN103401925B (en) | 2017-03-15 |
Family
ID=49565448
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310331210.4A Active CN103401925B (en) | 2013-07-31 | 2013-07-31 | A kind of method of the multiple webpages with single connection mode synchronization website |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103401925B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104376123B (en) * | 2014-12-08 | 2017-10-17 | 畅捷通信息技术股份有限公司 | The method and apparatus of the cross-page face shared data of browser |
CN105704008B (en) * | 2015-12-31 | 2019-05-31 | 北京奇艺世纪科技有限公司 | A kind of webpage instant communication method, system and terminal |
CN112491993A (en) * | 2020-11-17 | 2021-03-12 | 中信银行股份有限公司 | Communication establishing method and device, electronic equipment and computer readable storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102624764A (en) * | 2011-01-30 | 2012-08-01 | 北京千橡网景科技发展有限公司 | Method and apparatus for synchronizing a plurality of copies of same Web application program |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101188577B (en) * | 2007-12-29 | 2010-12-15 | 腾讯科技(深圳)有限公司 | Multi-page instant communication method and system |
CN102882762B (en) * | 2011-07-11 | 2016-09-07 | 腾讯科技(深圳)有限公司 | A kind of method and system synchronizing chat status information between multi-page |
CN102546762A (en) * | 2011-12-16 | 2012-07-04 | 深圳中兴网信科技有限公司 | Instant messaging system and method of webpage |
-
2013
- 2013-07-31 CN CN201310331210.4A patent/CN103401925B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102624764A (en) * | 2011-01-30 | 2012-08-01 | 北京千橡网景科技发展有限公司 | Method and apparatus for synchronizing a plurality of copies of same Web application program |
Also Published As
Publication number | Publication date |
---|---|
CN103401925A (en) | 2013-11-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200371653A1 (en) | Enhanced multi-tab co-browsing between one or more operators and one or more visitors | |
US11265333B2 (en) | Method of achieving synchronization management of account information of WEB interface in multi-system DAS | |
US20140258409A1 (en) | Method, server and browser for pushing message actively | |
US20100031153A1 (en) | Method and system for dispatching events to multiple browser windows/tabs using a single connection | |
US8219692B2 (en) | Method and apparatus for storing and restoring state information of remote user interface | |
US20050086344A1 (en) | Method and system for unrestricted, symmetric remote scripting | |
CN101355565A (en) | Method and server for providing page service for various browsers | |
CN102624918A (en) | Proxy access method based on URL (Uniform Resource Locator) rewriting technique | |
CN106357697A (en) | Multi-terminal page synchronizing method based on WebSocket attribute synchronization | |
CN103401925B (en) | A kind of method of the multiple webpages with single connection mode synchronization website | |
CN107438084A (en) | Multi-client data synchronization method and apparatus | |
EP0939516A2 (en) | User communication and monitoring system for computer networks | |
CN102938788A (en) | Processing method and device of events | |
KR100846799B1 (en) | A method and system for pushing notifications to networked devices | |
CN1889440A (en) | HTTP response synthetizing method used for WEB information | |
CN103067500B (en) | Web browsing method based on cloud terminal | |
EP2131291A2 (en) | Web sharing system, client device, and web sharing method used for the same | |
CN104661089A (en) | Terminal desktop display method, terminal desktop display device and terminal | |
CN103595744A (en) | Information management method and client | |
JPH11177629A (en) | Security gateway server, www server url concealing method using the server and recording medium recording www server url concealing program | |
CN101778122A (en) | Method, device and system for implementing message service | |
JP2000215136A (en) | Internet advertisement management system, internet advertisement management method which uses the same system and record medium where the method is recorded | |
CN103678332A (en) | System, browser and method for displaying page | |
JP6293611B2 (en) | Page synchronization method and program for displaying same page synchronously between terminals | |
JP5945367B2 (en) | Method and system for communicating between web pages |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |