CN102571376A - Method and system for implementing multi-window chat - Google Patents
Method and system for implementing multi-window chat Download PDFInfo
- Publication number
- CN102571376A CN102571376A CN2012100424692A CN201210042469A CN102571376A CN 102571376 A CN102571376 A CN 102571376A CN 2012100424692 A CN2012100424692 A CN 2012100424692A CN 201210042469 A CN201210042469 A CN 201210042469A CN 102571376 A CN102571376 A CN 102571376A
- Authority
- CN
- China
- Prior art keywords
- server
- sleep
- connects
- client
- connection
- 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
Links
Images
Abstract
The invention provides a method and a system for implementing multi-window chat. The method comprises the following steps that: a server establishes at least one connection corresponding to user windows with a client; the server regularly calculates the activity of a connection which is not activated currently and sets the state of the connection which is not activated currently according to the activity; and if receiving the activate request of a sleeping connection transmitted by the client in the sleeping time of any sleeping connection, the server activates the sleeping connection.
Description
Technical field
The invention belongs to the instant messaging field, relate in particular to a kind of implementation method and system of multiwindow chat.
Background technology
Along with the continuous progress of networking society, during increasing network communication tool is applied to work and lives, such as Fetion, MSN, QQ etc.In various communications applications instruments, easy to use because the instant messaging of webpage version does not need install software, received people's favor.In the daily use of webpage version instant messaging, when realizing that a plurality of browser windows have certain limitation when chatting.In the prior art, many browser window chats are not supported in the communication of part webpage version, after having landed number of the account at window 1, land same number of the account at window 2 again, and the number of the account of window 1 can be compelled to roll off the production line.Perhaps the chat of many browser windows is supported in the instant messaging of webpage version, but each window all set up one with server and be connected, and has caused the waste of server resource.Under the prerequisite of making rational use of resources, how to realize chat under many browser windows, improve the convenient degree that the user uses, become the problem that needs solution.
Summary of the invention
The present invention provides a kind of implementation method and system of multiwindow chat, to address the above problem.
The present invention provides a kind of implementation method of multiwindow chat.Said method may further comprise the steps: server set up with client between at least one be connected with user window is corresponding; Server regularly calculates the liveness of non-current activation connection and sets the state that non-current activation connects according to said liveness; If server receives the activation request that the said sleep of client transmission connects in the length of one's sleep that arbitrary sleep connects, server activates said sleep and connects.
The present invention also provides a kind of realization system of multiwindow chat, comprises client and server.Client Connection Service device.Server comprises receiver, timer, calculator and processor, and receiver connects calculator, and calculator is connection processing device and timer respectively.Receiver be used to set up with client between at least one be connected with user window is corresponding.Calculator is used for regularly calculating the liveness of non-current activation connection and setting the state that non-current activation connects according to said liveness through timer.When processor is used in the length of one's sleep that arbitrary sleep connects, receiving the activation request that said sleep that client sends connects, activates said sleep and connect.
Compared to prior art, according to the implementation method and the system of multiwindow chat provided by the invention, server regularly calculates the liveness of non-current activation connection and sets the state that non-current activation connects according to said liveness.In addition, if server receives the activation request that this sleep of client transmission connects in the length of one's sleep that any one sleep connects, then activating should the sleep connection.If server does not receive the activation request of client in the said length of one's sleep, then break off and sleep to connect; After the length of one's sleep that surpasses said sleep connection, client is initiated to connect the request of setting up to server once more, and then server is set up new connection.Server passes through regularly non-activation to be connected the calculating of the length of one's sleep, has kept the only normal connection of theactivewindow existence, has realized the multiwindow chat feature, and has effectively avoided the waste of server resource.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
The flow chart of the implementation method of the multiwindow chat that provides for preferred embodiment according to the present invention shown in Figure 1;
The sketch map of the realization system of the multiwindow chat that provides for preferred embodiment according to the present invention shown in Figure 2.
Embodiment
Hereinafter will and combine embodiment to specify the present invention with reference to accompanying drawing.Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.
The flow chart of the implementation method of the multiwindow chat that provides for preferred embodiment according to the present invention shown in Figure 1.As shown in Figure 1, the implementation method of the multiwindow chat that preferred embodiment of the present invention provides comprises step 101~103.
Step 101: server set up with client between at least one be connected with user window is corresponding.
Particularly; The user is after client is opened first browser window login; User end to server is initiated connection request; The said state of user of server modifications is to obtain said user's online friend information after online, and foundation first connection corresponding with first browser window of said client.For example; The user opens the page www.ppmeet.com of video conferencing system and login first; After the server authentication user name password success, revise User Status and be online and obtain said user's online friend information, server is successfully set up with first of client and is connected.In this, server returns the user's online friend information to first browser window of said client, and sends user's notice of reaching the standard grade to said user's online good friend.In addition, server receives the follow-up connection request of said client and sets up follow-up other when connecting, and client is obtained said user's online friend information from browser rs cache.
Step 102: server regularly calculates the liveness of non-current activation connection and sets the state that non-current activation connects according to said liveness.
In present embodiment, when existing at least one to be connected between server and the client, server regularly calculates the liveness that non-current activation connects, and sets the corresponding state that connects according to the liveness that obtains, and for example breaks off or sleeps.Wherein, liveness is by message number that connects in timing length, the said timing length and data traffic decision.Particularly, the table of comparisons that server prestores the liveness and the length of one's sleep, and server confirms according to the table of comparisons whether connection reaches sleep request.Do not reach sleep request if connect, then server breaks off and connecting.The table of comparisons of the liveness and the length of one's sleep is for example shown in the following table.
Liveness | The length of one's sleep |
Liveness>0.5 | 1800 seconds |
0.3<liveness<=0.5 | 1200 seconds |
0.15<liveness<=0.3 | 600 seconds |
0.01<liveness<=0.15 | 300 seconds |
Liveness<=0.01 | Do not sleep, directly break off connection |
Wherein, said liveness has different account forms according to timing length.That is, timing length is during less than 1800 seconds, liveness=(the data traffic * 10 in the message count+timing length in the timing length)/timing length; Timing length is during more than or equal to 1800 seconds, liveness=(message count in 1800 seconds+1800 second in data traffic * 10)/1800.Wherein, message count and data traffic in 1800 seconds in above-mentioned 1800 seconds are message count and the data traffic in before the calculation time of liveness 1800 seconds.Yet the present invention is not limited thereto.In other embodiment, message count and data traffic in 1800 seconds also can be message count mean value per 1800 seconds in the timing length and data traffic mean value in said 1800 seconds.In addition, the obtaining value method of said message count and data traffic can be provided with according to practical application, and the present invention is not defined in this.In addition, the table of comparisons of the above-mentioned liveness and the length of one's sleep can be set according to actual needs, and the present invention also is not limited to this.
For example, in the time of 10, there are three between server and the client and are connected A~C, wherein connect A and be in state of activation.If the timing of server is 1 hour (that is, 3600 seconds), then server can calculate the state that current non-activation connects at 11.Particularly, be in state of activation if connect C at 11, connect A and B and be in unactivated state, then server can calculate and connect A and the liveness that is connected B.Wherein, because the timing length of server, therefore connects A and the liveness that is connected B greater than 1800 seconds calculates according to (message count in 1800 seconds+1800 second in data traffic * 10)/1800.For example, in 1800 seconds, the user adds up to 500 through the message that connects the A transmission and receive, and the flow size of said message is 0.5M, and the data traffic that Video chat produces is 50M, and the liveness that then connects A is: (500+ (50+0.5) * 10)/1800=0.56; The user adds up to 200 through the message that connects the B transmission and receive, and the flow size of said message is 0.2M, and the data traffic that Video chat produces is 20M, and the liveness that then connects B is (200+ (20+0.2) * 10)/1800=0.22.The table of comparisons according to the above-mentioned liveness and the length of one's sleep can know that be 1800 seconds the length of one's sleep that connects A, and be 600 seconds the length of one's sleep that connects B.Afterwards, when reaching at 12, server calculates the connection of current unactivated state once more.
Step 103: if server receives the activation request that the said sleep of said client transmission connects in the length of one's sleep that arbitrary sleep connects, server activates said sleep and connects.
Particularly, if server does not receive the activation request that said sleep that client sends connects in the length of one's sleep that sleep connects, then server breaks off said sleep and connects.If client is sent activation request that this sleep connects to said server after surpassing the length of one's sleep that said sleep connects, said server receives to rebulid with the new of said client after the said activation request and is connected.
A is an example with the described connection of step 102, and server calculates the length of one's sleep that obtains connection A in the time of 11 be 1800 seconds, if server received the activation request of the connection A of client transmission in 1800 seconds, server activates and connects A.As if the 1809th second after beginning to sleep at connection A, user end to server sent the activation request that connects A, and at this moment, server has broken off and connected A, and server need be set up with the new of client and be connected.
The sketch map of the realization system of the multiwindow chat that provides for preferred embodiment according to the present invention shown in Figure 2.As shown in Figure 2, the realization system of the multiwindow chat that preferred embodiment of the present invention provides comprises client 1 and server 2.Client 1 Connection Service device 2.Server 2 comprises receiver 21, calculator 22, processor 23 and timer 24.Receiver 21 connects calculator 22, calculator 22 connection processing devices 23 and timer 24.Receiver 21 be used to set up with client 1 between at least one be connected with user window is corresponding.Calculator 22 is used for regularly calculating the liveness of non-current activation connection and setting the state that non-current activation connects according to said liveness through timer 24.When processor 23 was used in the length of one's sleep that arbitrary sleep connects, receiving the activation request that sleep that said client 1 sends connects, activated sleep connected.Specific operation process about said system is said with above-mentioned method, so repeat no more in this.
In sum, the implementation method and the system of the multiwindow chat that preferred embodiment provides according to the present invention, server regularly calculates the liveness of non-current activation connection and sets the state that non-current activation connects according to said liveness.In addition, if server receives the activation request that this sleep of client transmission connects in the length of one's sleep that any one sleep connects, then activating should the sleep connection.If server does not receive the activation request of client in the said length of one's sleep, then break off and sleep to connect; After the length of one's sleep that surpasses said sleep connection, client is initiated to connect the request of setting up to server once more, and then server is set up new connection.Server passes through regularly non-activation to be connected the calculating of the length of one's sleep, has kept the only normal connection of theactivewindow existence, has realized the multiwindow chat feature, and has effectively avoided the waste of server resource.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (7)
1. the implementation method of a multiwindow chat is characterized in that, may further comprise the steps:
Server set up with client between at least one be connected with user window is corresponding;
Said server regularly calculates the liveness of non-current activation connection and sets the state that non-current activation connects according to said liveness;
If said server receives the activation request that the said sleep of said client transmission connects in the length of one's sleep that arbitrary sleep connects, said server activates said sleep and connects.
2. method according to claim 1 is characterized in that, if said server is being in the activation request that does not receive the client transmission in the length of one's sleep of dormant connection, then said server breaks off said connection.
3. method according to claim 2; It is characterized in that; If said client is sent the request of activation to said server after surpassing the length of one's sleep that said sleep connects, then said server receives to rebulid with the new of said client after the said activation request and is connected.
4. method according to claim 1 is characterized in that, said liveness is by message number that connects in timing length, the said timing length and data traffic decision.
5. method according to claim 1; It is characterized in that, the table of comparisons that said server prestores the liveness and the length of one's sleep, said server is set said connection status according to the said table of comparisons; If said connection does not reach said sleep request, said server breaks off said connection.
6. method according to claim 1; It is characterized in that; Said server is set up with after first of said client is connected; Said server returns to said client with said user's online friend information, and said server is set up with said client after other is connected, and said client is obtained the online friend information of said user from browser rs cache.
7. the realization system of multiwindow chat; It is characterized in that, comprise client and server, said client connects said server; Said server comprises receiver, timer, calculator and processor; Said receiver connects said calculator, and said calculator connects said processor and said timer respectively
Said receiver, be used to set up with client between at least one be connected with user window is corresponding,
Said calculator is used for regularly calculating the liveness of non-current activation connection and setting the state that non-current activation connects according to said liveness through said timer,
Said processor when being used in the length of one's sleep that arbitrary sleep connects, receiving the activation request that said sleep that said client sends connects, activating said sleep and connects.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210042469.2A CN102571376B (en) | 2012-02-24 | 2012-02-24 | Method and system for implementing multi-window chat |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210042469.2A CN102571376B (en) | 2012-02-24 | 2012-02-24 | Method and system for implementing multi-window chat |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102571376A true CN102571376A (en) | 2012-07-11 |
CN102571376B CN102571376B (en) | 2014-12-03 |
Family
ID=46415914
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210042469.2A Expired - Fee Related CN102571376B (en) | 2012-02-24 | 2012-02-24 | Method and system for implementing multi-window chat |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102571376B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013120365A1 (en) * | 2012-02-17 | 2013-08-22 | 苏州阔地网络科技有限公司 | Method and system for multi-window chatting |
CN104766256A (en) * | 2015-04-13 | 2015-07-08 | 天脉聚源(北京)教育科技有限公司 | Method and device for determining activeness |
CN105610950A (en) * | 2015-12-30 | 2016-05-25 | 腾讯科技(深圳)有限公司 | Session processing method and system in motorcade travel |
CN106534132A (en) * | 2016-11-17 | 2017-03-22 | 京东方科技集团股份有限公司 | Taxi order-based video processing methods, apparatuses, server and system |
CN110011791A (en) * | 2019-02-18 | 2019-07-12 | 西安电子科技大学 | Electronics authority secure flows shifting method and system, electronics voucher system based on D2D |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2004086221A2 (en) * | 2003-03-27 | 2004-10-07 | International Business Machines Corporation | Method and apparatus for managing windows |
CN101009670A (en) * | 2007-01-22 | 2007-08-01 | 阿里巴巴公司 | A method and system for implementing the group communication based on the instant communication |
CN101188577A (en) * | 2007-12-29 | 2008-05-28 | 腾讯科技(深圳)有限公司 | Multi-page instant communication method and system |
-
2012
- 2012-02-24 CN CN201210042469.2A patent/CN102571376B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2004086221A2 (en) * | 2003-03-27 | 2004-10-07 | International Business Machines Corporation | Method and apparatus for managing windows |
CN101009670A (en) * | 2007-01-22 | 2007-08-01 | 阿里巴巴公司 | A method and system for implementing the group communication based on the instant communication |
CN101188577A (en) * | 2007-12-29 | 2008-05-28 | 腾讯科技(深圳)有限公司 | Multi-page instant communication method and system |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013120365A1 (en) * | 2012-02-17 | 2013-08-22 | 苏州阔地网络科技有限公司 | Method and system for multi-window chatting |
CN104766256A (en) * | 2015-04-13 | 2015-07-08 | 天脉聚源(北京)教育科技有限公司 | Method and device for determining activeness |
CN104766256B (en) * | 2015-04-13 | 2018-08-24 | 天脉聚源(北京)教育科技有限公司 | A kind of method and device of determining liveness |
CN105610950A (en) * | 2015-12-30 | 2016-05-25 | 腾讯科技(深圳)有限公司 | Session processing method and system in motorcade travel |
CN106534132A (en) * | 2016-11-17 | 2017-03-22 | 京东方科技集团股份有限公司 | Taxi order-based video processing methods, apparatuses, server and system |
CN110011791A (en) * | 2019-02-18 | 2019-07-12 | 西安电子科技大学 | Electronics authority secure flows shifting method and system, electronics voucher system based on D2D |
CN110011791B (en) * | 2019-02-18 | 2021-07-09 | 西安电子科技大学 | D2D-based electronic credential secure circulation method and system and electronic credential system |
Also Published As
Publication number | Publication date |
---|---|
CN102571376B (en) | 2014-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10834031B2 (en) | Information exchange method, client, and apparatus | |
CN102571376A (en) | Method and system for implementing multi-window chat | |
CN103001860A (en) | Achieving system for converged communication Web instant messages | |
KR102208935B1 (en) | Messaging api over http protocol to establish context for data exchange | |
CN102739560B (en) | Instant communication method, system and device | |
WO2019024931A1 (en) | Power-saving processing method and apparatus, terminal device and computer-readable storage medium | |
CN102185801A (en) | Information processing method in instant messaging and instant messaging tool | |
CN101594320A (en) | A kind of method for message interaction based on snmp protocol | |
CN103312528A (en) | Heartbeat message sending method and user terminal | |
EP4243511A3 (en) | Standby control method and terminal device and relay device | |
CN103647701A (en) | Method and device for controlling message forwarding of instant messaging system | |
CN103312586B (en) | A kind of method of instant messaging, system and server | |
CN103179009A (en) | Dynamic adaptive calling method of distributed management system | |
CN104486819A (en) | Wireless network access method and system | |
CN102594731A (en) | Method and system for realizing multi-window chatting | |
US9473430B2 (en) | Method and system for group number-based microblog aggregation | |
CN102594894A (en) | Multi-window chatting method and system | |
CN103281686B (en) | The rapid transmission method of urgency traffic in a kind of wireless body area network | |
CN102594732B (en) | Method and system for multiwindow chatting | |
CN105357387A (en) | Method, apparatus and system for wakening terminal | |
CN108989467B (en) | Centralized addressing method | |
CN103023746A (en) | IM (Instant Messaging) system and drawing board implementation method based on same | |
CN108076503B (en) | Communication method, communication device, access point and station of wireless local area network | |
CN104158810A (en) | Multimedia communication method based on mobile Internet | |
CN105611983B (en) | Email 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 | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C56 | Change in the name or address of the patentee | ||
CP01 | Change in the name or title of a patent holder |
Address after: Suzhou City, Jiangsu province 215121 Fengting Avenue Suzhou Industrial Park No. 666 Weiting Intelligent Industrial Park Building 8 Patentee after: CODYY EDUCATION TECHNOLOGY Co.,Ltd. Address before: Suzhou City, Jiangsu province 215121 Fengting Avenue Suzhou Industrial Park No. 666 Weiting Intelligent Industrial Park Building 8 Patentee before: SUZHOU CODYY NETWORK SCIENCE & TECHNOLOGY Co.,Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20141203 |
|
CF01 | Termination of patent right due to non-payment of annual fee |