CN103442452A - Terminal, server and connection management method - Google Patents
Terminal, server and connection management method Download PDFInfo
- Publication number
- CN103442452A CN103442452A CN201310390415XA CN201310390415A CN103442452A CN 103442452 A CN103442452 A CN 103442452A CN 201310390415X A CN201310390415X A CN 201310390415XA CN 201310390415 A CN201310390415 A CN 201310390415A CN 103442452 A CN103442452 A CN 103442452A
- Authority
- CN
- China
- Prior art keywords
- communication connection
- terminal
- server
- connection
- type
- 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.)
- Pending
Links
- 238000007726 management method Methods 0.000 title claims abstract description 29
- 238000004891 communication Methods 0.000 claims abstract description 437
- 238000012545 processing Methods 0.000 claims abstract description 192
- 230000004044 response Effects 0.000 claims description 62
- 230000001143 conditioned effect Effects 0.000 claims description 40
- 230000005856 abnormality Effects 0.000 description 64
- 238000000034 method Methods 0.000 description 24
- 238000012790 confirmation Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 16
- 230000008569 process Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a terminal, a server and a connection management method. The terminal comprises a judging unit and a connection processing unit, wherein the judging unit is used for judging whether the current state of the terminal meets a preset condition or not and judging whether a preset processing strategy for communication connection between the terminal and the server exists or not when the current state of the terminal meets the preset condition, and the connection processing unit is used for disconnecting or maintaining communication connection according to the preset processing strategy when the judging unit judges that the preset processing strategy exists. According to the terminal, the server and the connection management method, the connection between the user terminal and the server can be processed in time according to the preset processing strategy or prompt of a user when the user terminal is in a certain preset state so as to avoid the unnecessary disturbance or economic losses of the user due to the fact that the server pushes information to the user terminal when the user terminal is in the certain preset state.
Description
Technical field
The present invention relates to communicate to connect the administrative skill field, in particular to a kind of terminal, a kind of server and a kind of connection management method.
Background technology
From the mobile operator angle, the standardization of mobile Internet application sending out notice service is extremely urgent, need on the one hand to control reduce needn't otherwise the application layer of managed control signaling (as Keep alive message) reduce the impact to the mobile network; On the other hand, need to reduce unnecessary terminal resource (flow, electric weight) waste to promote user's business experience.The mode of head it off is exactly to replace a plurality of (one of each application) the long connection by a unified push channel, and that provide that this unifies push channel is exactly always online AOI(Always Online Infrastructure) system.
And when user's terminal is used the AOI system, at user terminal, during in a certain preset state, such as roaming state, server may produce more expensive expense to the user terminal PUSH message, and the user does not have to process in time, may cause larger economic loss to the user.
Summary of the invention
The present invention just is being based on the problems referred to above, a kind of connection management technology has been proposed, can be at user terminal during in a certain preset state, according to default strategy or by the prompting user, process in time being connected of user terminal and server, avoid server user's terminal to the user terminal PUSH message, the user to be caused to unnecessary bothering or economic loss when a certain preset state.
In view of this, the present invention proposes a kind of terminal, comprise: judging unit, for judging whether the current state of described terminal meets pre-conditioned, and in the current state of judging described terminal, meet describedly when pre-conditioned, judge in described terminal the default processing policy whether existed the communication connection between described terminal and server; Connect processing unit, while for judging at described judging unit, having described default processing policy, according to described default processing policy, disconnect or maintain described communication connection.
In this technical scheme, the pre-conditioned rate abnormality that comprises, when terminal during in the rate abnormality, than in as roaming state, the arrearage state, the state that remaining sum is lower etc., if ignorant its terminal of user is under the rate abnormality, and terminal is while still continuing the information of reception server, may impact the user, such as the ignorant terminal of user under roaming state, and terminal still continues the information that reception server pushes, will consume so the more rate of user, the lower state in remaining sum such as the ignorant terminal of user again, and terminal still continues the information that reception server pushes, continue so to accept the remaining sum that message will continue to consume the user, so that subscriber arrearage shutdown.
Terminal can judge that whether self is in the rate abnormality, and the user can set in advance under the rate abnormality for the processing policy communicated to connect and in being kept at terminal, by disconnect or maintain the current communication connection of terminal and server during in the rate abnormality according to strategy pre-stored in terminal in terminal, can (illustrate that the user is when expense is larger when disconnecting at pre-stored strategy, need the communication connection of disconnected end and server), disconnect current communication connection, too much consumption user's rate have been avoided, and be (to illustrate that the user need to keep the communication connection of terminal and server constantly while maintaining connection at pre-stored strategy, and without the consideration expense), continue to maintain current communication connection, guaranteed that terminal receives the information from server at any time.
Preferably, pre-conditionedly also comprise: the current residing pattern of described terminal (such as current in conference model or in offline mode), the current remaining electric weight of described terminal (such as electric weight is less than 10%), the system time (such as in the operating time) that described terminal is current etc., when the current state of terminal meets above-mentioned at least one in pre-conditioned, illustrate that so the user now may seldom use being connected of terminal and server, therefore can carry out being connected of disconnected end and server according to default processing policy.
In technique scheme, preferably, also comprise: Tip element, while for judging at described judging unit, not having described default processing policy, send information, with the prompting user input instruction, wherein, described connection processing unit is also for disconnecting according to the instruction that receives or maintaining described communication connection.
In this technical scheme, while in terminal, not having the processing policy set in advance, can send information to the user, reminding subscriber terminal is in a certain preset state, whether disconnect the communication connection with server, if the user confirms to disconnect communication connection, disconnect the communication connection with server, if the user confirms to maintain communication connection, continue to receive the information from server.
In technique scheme, preferably, described connection processing unit comprises: the first request transmitting unit, being used in the described instruction received is while disconnecting described communication connection, send the connection closed request to described server, wherein, the type that comprises described communication connection in described connection closed request, so that described server is determined described communication connection according to described type, discharge the resource relevant to described communication connection; The first resource releasing unit, for receiving the response message from described server, discharge the resource relevant to described communication connection.
In this technical scheme, when the user confirms to disconnect this communication connection, terminal can be obtained the type of this communication connection, at first terminal sends the connection closed request to server, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make server determine that according to connection type closing which bar connects, on the other hand can so that server according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, server is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to terminal simultaneously, to inform that terminal connects, close, terminal is after receiving the response message of server, the confirmation server has been closed connection, discharge and communicate to connect relevant resource with this, complete the opening operation of the communication connection of terminal and server.
In technique scheme, preferably, described connection processing unit, also for the type according to described communication connection, obtains the default processing policy corresponding with the type of described communication connection, and disconnects or maintain described communication connection according to described corresponding default processing policy.
In this technical scheme, terminal and the type of the communication connection of server can be that TCP is connected, UDP connects or PushOTA connects etc., different connections can corresponding different processing policy, such as the user in advance by opening operation and TCP connection type association store, to maintain attended operation and UDP connection type association store, so when terminal in a certain when default, if the type of current communication connection detected, be that TCP connects, disconnect current communication connection, be that UDP connects if the type of current communication connection detected, maintain current communication connection.Obtain corresponding default processing policy by the type according to communication connection, can make terminal disconnect or maintain the operation of connection, more can meet user's actual needs.
In technique scheme, preferably, described connection processing unit comprises: the second request transmitting unit, being used at described default processing policy is while disconnecting described communication connection, send the connection closed request to described server, wherein, the type that comprises described communication connection in described connection closed request, so that described server is determined described communication connection according to described type, discharge the resource relevant to described communication connection; The Secondary resource releasing unit, for receiving the response message from described server, discharge the resource relevant to described communication connection.
In this technical scheme, when presetting the communication connection that processing policy is disconnection and server, at first terminal sends the connection closed request to server, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make server determine that according to connection type closing which bar connects, on the other hand can so that server according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, server is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to terminal simultaneously, to inform that terminal connects, close, terminal is after receiving the response message of server, the confirmation server has been closed connection, discharge and communicate to connect relevant resource with this, complete the opening operation of the communication connection of terminal and server.
The application has also proposed a kind of server, comprise: judging unit, for judgement and described server, exist the current state of the terminal of communication connection whether to meet pre-conditioned, and, to judge that described current state meets described when pre-conditioned, judge in described server the default processing policy whether existed the communication connection between described server and terminal; Connect processing unit, while for judging at described judging unit, having described default processing policy, according to described default processing policy, disconnect or maintain described communication connection.
In this technical scheme, the pre-conditioned rate abnormality that comprises, when terminal during in the rate abnormality, than in as roaming state, the arrearage state, the state that remaining sum is lower etc., if ignorant its terminal of user is under the rate abnormality, and terminal is while still continuing the information of reception server, may impact the user, such as the ignorant terminal of user under roaming state, and terminal still continues the information that reception server pushes, will consume so the more rate of user, the lower state in remaining sum such as the ignorant terminal of user again, and terminal still continues the information that reception server pushes, continue so to accept the remaining sum that message will continue to consume the user, so that subscriber arrearage shutdown.
Server can judge that whether the terminal communicated to connect with its existence is in the rate abnormality, and the provider of server is (such as terminal and server by the communication connection of AOI system made, the provider of the server so here can be the provider of AOI service) set in advance under the rate abnormality for the processing policy communicated to connect and in being kept at server, server disconnects or maintains the current communication connection of terminal and server when judging terminal in the rate abnormality according to pre-stored strategy, can (illustrate that the user is when expense is larger when disconnecting at pre-stored strategy, need the communication connection of disconnected end and server), disconnect current communication connection, too much consumption user's rate have been avoided, and be (to illustrate that the user need to keep the communication connection of terminal and server constantly while maintaining connection at pre-stored strategy, and without the consideration expense), continue to maintain current communication connection, guaranteed that terminal receives the information from server at any time.
Preferably, pre-conditionedly also comprise: the current residing pattern of described terminal (such as current in conference model or in offline mode), the current remaining electric weight of described terminal (such as electric weight is less than 10%), the system time (such as in the operating time) that described terminal is current etc., when the current state of terminal meets above-mentioned at least one in pre-conditioned, illustrate that so the user now may seldom use being connected of terminal and server, therefore can carry out being connected of disconnected end and server according to default processing policy.
In technique scheme, preferably, also comprise: Tip element, while for judging at described judging unit, not having described default processing policy, send the prompting request to described terminal, so that described terminal is sent information, the prompting user input instruction, wherein, the instruction that described connection processing unit also receives for obtaining described terminal, disconnect or maintain described communication connection according to the described instruction that receives.
In this technical scheme, while in server, not having the processing policy set in advance, can send the prompting request to terminal, make terminal send information to the user, reminding subscriber terminal is in a certain preset state, whether disconnect the communication connection with server, and obtain from terminal the instruction that the user inputs, if the user confirms to disconnect communication connection, disconnect the communication connection with terminal, if the user confirms to maintain communication connection, continue to the terminal pushed information.
In technique scheme, preferably, described connection processing unit comprises: the first request transmitting unit, being used in the described instruction received is while disconnecting described communication connection, send the connection closed request to described terminal, wherein, the type that comprises described communication connection in described connection closed request, so that described terminal is determined described communication connection according to described type, discharge the resource relevant to described communication connection; The first resource releasing unit, for receiving the response message from described terminal, discharge the resource relevant to described communication connection.
In this technical scheme, when the user confirms to disconnect this communication connection, server can obtain the type of this communication connection, at first server sends the connection closed request to terminal, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make terminal determine that according to connection type closing which bar connects, on the other hand can so that terminal according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, terminal is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to server simultaneously, connect and close with notification server, server is after receiving the response message of terminal, the confirmation terminal has been closed connection, discharge and communicate to connect relevant resource with this, the opening operation of the communication connection of completion service device and terminal.
In technique scheme, preferably, described connection processing unit, also for the type according to described communication connection, obtains the default processing policy corresponding with the type of described communication connection, and disconnects or maintain described communication connection according to described corresponding default processing policy.
In this technical scheme, server can be that TCP is connected with the type of the communication connection of terminal, UDP connection or PushOTA connection etc., different connections can corresponding different processing policy, such as the service provider in advance by opening operation and TCP connection type association store, to maintain attended operation and UDP connection type association store, so when server is judged terminal in a certain preset state, if the type of current communication connection detected, be that TCP connects, disconnect current communication connection, if the type of current communication connection detected, be that UDP connects, maintain current communication connection.Obtain corresponding default processing policy by the type according to communication connection, can make server disconnect or maintain the operation of connection, more can meet user's actual needs.
In technique scheme, preferably, described connection processing unit comprises: the second request transmitting unit, being used at described default processing policy is while disconnecting described communication connection, send the connection closed request to described terminal, wherein, the type that comprises described communication connection in described connection closed request, so that described terminal is determined described communication connection according to described type, discharge the resource relevant to described communication connection; The Secondary resource releasing unit, for receiving the response message from described terminal, discharge the resource relevant to described communication connection.
In this technical scheme, when presetting the communication connection that processing policy is disconnection and server, at first server sends the connection closed request to terminal, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make terminal determine that according to connection type closing which bar connects, on the other hand can so that terminal according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, terminal is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to server simultaneously, connect and close with notification server, server is after receiving the response message of terminal, the confirmation terminal has been closed connection, discharge and communicate to connect relevant resource with this, the opening operation of the communication connection of completion service device and terminal.
The application has also proposed a kind of connection management method, comprise: step 302, it is pre-conditioned whether the terminal judges current state meets, and, to judge that described current state meets described when pre-conditioned, judge in described terminal the default processing policy whether existed the communication connection of described terminal and server; Step 304, if there is described default processing policy, disconnects or maintain described communication connection according to described default processing policy.
In this technical scheme, the pre-conditioned rate abnormality that comprises, when terminal during in the rate abnormality, than in as roaming state, the arrearage state, the state that remaining sum is lower etc., if ignorant its terminal of user is under the rate abnormality, and terminal is while still continuing the information of reception server, may impact the user, such as the ignorant terminal of user under roaming state, and terminal still continues the information that reception server pushes, will consume so the more rate of user, the lower state in remaining sum such as the ignorant terminal of user again, and terminal still continues the information that reception server pushes, continue so to accept the remaining sum that message will continue to consume the user, so that subscriber arrearage shutdown.
Terminal can judge that whether self is in the rate abnormality, and the user can set in advance under the rate abnormality for the processing policy communicated to connect and in being kept at terminal, by disconnect or maintain the current communication connection of terminal and server during in the rate abnormality according to strategy pre-stored in terminal in terminal, can (illustrate that the user is when expense is larger when disconnecting at pre-stored strategy, need the communication connection of disconnected end and server), disconnect current communication connection, too much consumption user's rate have been avoided, and be (to illustrate that the user need to keep the communication connection of terminal and server constantly while maintaining connection at pre-stored strategy, and without the consideration expense), continue to maintain current communication connection, guaranteed that terminal receives the information from server at any time.
Preferably, pre-conditionedly also comprise: the current residing pattern of described terminal (such as current in conference model or in offline mode), the current remaining electric weight of described terminal (such as electric weight is less than 10%), the system time (such as in the operating time) that described terminal is current etc., when the current state of terminal meets above-mentioned at least one in pre-conditioned, illustrate that so the user now may seldom use being connected of terminal and server, therefore can carry out being connected of disconnected end and server according to default processing policy.
In technique scheme, preferably, it is characterized in that, also comprise: step 306, if there is not described default processing policy, described terminal is sent information, with the prompting user input instruction, and disconnects or maintains described communication connection according to the instruction that receives.
In this technical scheme, while in terminal, not having the processing policy set in advance, can send information to the user, reminding subscriber terminal is in the rate abnormality, whether disconnect the communication connection with server, if the user confirms to disconnect communication connection, disconnect the communication connection with server, if the user confirms to maintain communication connection, continue to receive the information from server.
In technique scheme, preferably, described step 306 comprises: the instruction received if described is for disconnecting described communication connection, described terminal sends the connection closed request to described server, wherein, the type that comprises described communication connection in described connection closed request, so that described server is determined described communication connection according to described type, discharge the resource relevant to described communication connection, and, after the response message received from described server, discharge the resource relevant to described communication connection.
In this technical scheme, when the user confirms to disconnect this communication connection, can obtain the type of this communication connection, at first terminal sends the connection closed request to server, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make server determine that according to connection type closing which bar connects, on the other hand can so that server according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, server is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to terminal simultaneously, to inform that terminal connects, close, terminal is after receiving the response message of server, the confirmation server has been closed connection, discharge and communicate to connect relevant resource with this, complete the opening operation of the communication connection of terminal and server.
In technique scheme, preferably, described step 304 also comprises: described terminal, according to the type of described communication connection, is obtained the default processing policy corresponding with the type of described communication connection, and disconnects or maintain described communication connection according to described corresponding default processing policy.
In this technical scheme, terminal and the type of the communication connection of server can be that TCP is connected, UDP connects or PushOTA connects etc., different connections can corresponding different processing policy, such as the user in advance by opening operation and TCP connection type association store, to maintain attended operation and UDP connection type association store, so when terminal during in a certain preset state, if the type of current communication connection detected, be that TCP connects, disconnect current communication connection, be that UDP connects if the type of current communication connection detected, maintain current communication connection.Obtain corresponding default processing policy by the type according to communication connection, can make terminal disconnect or maintain the operation of connection, more can meet user's actual needs.
In technique scheme, preferably, described step 304 comprises: if described default processing policy is for disconnecting described communication connection, described terminal sends the connection closed request to described server, wherein, the type that comprises described communication connection in described connection closed request, so that described server is determined described communication connection according to described type, discharge the resource relevant to described communication connection, and, after the response message received from described server, discharge the resource relevant to described communication connection.
In this technical scheme, when presetting the communication connection that processing policy is disconnection and server, at first terminal sends the connection closed request to server, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make server determine that according to connection type closing which bar connects, on the other hand can so that server according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, server is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to terminal simultaneously, to inform that terminal connects, close, terminal is after receiving the response message of server, the confirmation server has been closed connection, discharge and communicate to connect relevant resource with this, complete the opening operation of the communication connection of terminal and server.
The application has also proposed a kind of connection management method, comprise: step 402, whether the server judgement exists the current state of the terminal of communication connection to meet pre-conditioned with described server, and, to judge that described current state meets described when pre-conditioned, judge in described server the default processing policy whether existed the communication connection of described server and terminal; Step 404, if there is described default processing policy, disconnects or maintain described communication connection according to described default processing policy.
In this technical scheme, the pre-conditioned rate abnormality that comprises, when terminal during in the rate abnormality, than in as roaming state, the arrearage state, the state that remaining sum is lower etc., if ignorant its terminal of user is under the rate abnormality, and terminal is while still continuing the information of reception server, may impact the user, such as the ignorant terminal of user under roaming state, and terminal still continues the information that reception server pushes, will consume so the more rate of user, the lower state in remaining sum such as the ignorant terminal of user again, and terminal still continues the information that reception server pushes, continue so to accept the remaining sum that message will continue to consume the user, so that subscriber arrearage shutdown.
Server can judge that whether the terminal communicated to connect with its existence is in the rate abnormality, and the provider of server is (such as terminal and server by the communication connection of AOI system made, the provider of the server so here can be the provider of AOI service) set in advance under the rate abnormality for the processing policy communicated to connect and in being kept at server, server disconnects or maintains the current communication connection of terminal and server when judging terminal in the rate abnormality according to pre-stored strategy, can (illustrate that the user is when expense is larger when disconnecting at pre-stored strategy, need the communication connection of disconnected end and server), disconnect current communication connection, too much consumption user's rate have been avoided, and be (to illustrate that the user need to keep the communication connection of terminal and server constantly while maintaining connection at pre-stored strategy, and without the consideration expense), continue to maintain current communication connection, guaranteed that terminal receives the information from server at any time.
Preferably, pre-conditionedly also comprise: the current residing pattern of described terminal (such as current in conference model or in offline mode), the current remaining electric weight of described terminal (such as electric weight is less than 10%), the system time (such as in the operating time) that described terminal is current etc., when the current state of terminal meets above-mentioned at least one in pre-conditioned, illustrate that so the user now may seldom use being connected of terminal and server, therefore can carry out being connected of disconnected end and server according to default processing policy.
In technique scheme, preferably, also comprise: step 406, if there is not described default processing policy, described server sends the prompting request to described terminal, so that described terminal is sent information, and the prompting user input instruction, and obtain the instruction that described terminal receives, disconnect or maintain described communication connection according to the described instruction received.
In this technical scheme, while in server, not having the processing policy set in advance, can send the prompting request to terminal, make terminal send information to the user, reminding subscriber terminal is in a certain preset state, whether disconnect the communication connection with server, and obtain from terminal the instruction that the user inputs, if the user confirms to disconnect communication connection, disconnect the communication connection with terminal, if the user confirms to maintain communication connection, continue to the terminal pushed information.
In technique scheme, preferably, described step 406 comprises: the instruction received if described is for disconnecting described communication connection, described server sends the connection closed request to described terminal, wherein, and the type that comprises described communication connection in described connection closed request, so that described terminal is determined described communication connection according to described type, discharge the resource relevant to described communication connection, and, after the response message received from described terminal, discharge the resource relevant to described communication connection.
In this technical scheme, when the user confirms to disconnect this communication connection, server can obtain the type of this communication connection, at first server sends the connection closed request to terminal, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make terminal determine that according to connection type closing which bar connects, on the other hand can so that terminal according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, terminal is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to server simultaneously, connect and close with notification server, server is after receiving the response message of terminal, the confirmation terminal has been closed connection, discharge and communicate to connect relevant resource with this, the opening operation of the communication connection of completion service device and terminal.
In technique scheme, preferably, described step 404 also comprises: described server, according to the type of described communication connection, obtains the default processing policy corresponding with the type of described communication connection, and disconnects or maintain described communication connection according to described corresponding default processing policy.
In this technical scheme, server can be that TCP is connected with the type of the communication connection of terminal, UDP connection or PushOTA connection etc., different connections can corresponding different processing policy, such as the service provider in advance by opening operation and TCP connection type association store, to maintain attended operation and UDP connection type association store, so when server is judged terminal in a certain preset state, if the type of current communication connection detected, be that TCP connects, disconnect current communication connection, if the type of current communication connection detected, be that UDP connects, maintain current communication connection.Obtain corresponding default processing policy by the type according to communication connection, can make server disconnect or maintain the operation of connection, more can meet user's actual needs.
In technique scheme, preferably, described step 404 comprises: if described default processing policy is for disconnecting described communication connection, described server sends the connection closed request to described terminal, wherein, and the type that comprises described communication connection in described connection closed request, so that described terminal is determined described communication connection according to described type, discharge the resource relevant to described communication connection, and, after the response message received from described terminal, discharge the resource relevant to described communication connection.
In this technical scheme, when presetting the communication connection that processing policy is disconnection and server, at first server sends the connection closed request to terminal, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make terminal determine that according to connection type closing which bar connects, on the other hand can so that terminal according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, terminal is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to server simultaneously, connect and close with notification server, server is after receiving the response message of terminal, the confirmation terminal has been closed connection, discharge and communicate to connect relevant resource with this, the opening operation of the communication connection of completion service device and terminal.
By above technical scheme, can be at user terminal during in a certain preset state, according to default strategy or by the prompting user, process in time being connected of user terminal and server, avoid server user's terminal to the user terminal PUSH message, the user to be caused to unnecessary economic loss when a certain preset state.
The accompanying drawing explanation
Fig. 1 shows the schematic block diagram according to the terminal of the embodiment of the present invention;
Fig. 2 shows the schematic block diagram according to the server of the embodiment of the present invention;
Fig. 3 shows the schematic flow diagram of connection management method according to an embodiment of the invention;
Fig. 4 shows the schematic flow diagram of connection management method in accordance with another embodiment of the present invention;
Fig. 5 shows the concrete schematic flow diagram of connection management method according to an embodiment of the invention;
Fig. 6 shows the concrete schematic flow diagram disconnected according to an embodiment of the invention;
Fig. 7 shows the concrete schematic flow diagram of connection management method in accordance with another embodiment of the present invention;
Fig. 8 shows the concrete schematic flow diagram disconnected in accordance with another embodiment of the present invention.
Embodiment
In order more clearly to understand above-mentioned purpose of the present invention, feature and advantage, below in conjunction with the drawings and specific embodiments, the present invention is further described in detail.It should be noted that, in the situation that do not conflict, the application's embodiment and the feature in embodiment can combine mutually.
A lot of details have been set forth in the following description so that fully understand the present invention; but; the present invention can also adopt other to be different from other modes described here and implement, and therefore, protection scope of the present invention is not subject to the restriction of following public specific embodiment.
Fig. 1 shows the schematic block diagram according to the terminal of the embodiment of the present invention.
As shown in Figure 1, according to the terminal 100 of the embodiment of the present invention, comprise: judging unit 102, for judging whether the current state of terminal 100 meets pre-conditioned, and meet when pre-conditioned in the current state of judging terminal 100, judge in terminal 100 the default processing policy whether existed the communication connection between terminal 100 and server; Connect processing unit 104, while for judging at judging unit 102, having default processing policy, according to default processing policy disconnection or maintain communication connection.
The pre-conditioned rate abnormality that comprises, when terminal 100 during in the rate abnormality, than in as roaming state, the arrearage state, the state that remaining sum is lower etc., if ignorant its terminal of user is under the rate abnormality, and terminal 100 is while still continuing the information of reception server, may impact the user, such as the ignorant terminal 100 of user under roaming state, and terminal 100 still continues the information that reception server pushes, will consume so the more rate of user, the lower state in remaining sum such as the ignorant terminal 100 of user again, and terminal 100 still continues the information that reception server pushes, continue so to accept the remaining sum that message will continue to consume the user, so that subscriber arrearage shutdown.
Terminal 100 can judge that whether self is in the rate abnormality, and the user can set in advance under the rate abnormality for the processing policy of communication connection and be kept in terminal 100, by disconnect or maintain the current communication connection of terminal 100 and server during in the rate abnormality according to strategy pre-stored in terminal 100 in terminal 100, can (illustrate that the user is when expense is larger when disconnecting at pre-stored strategy, need the communication connection of disconnected end 100 and server), disconnect current communication connection, too much consumption user's rate have been avoided, and be (to illustrate that the user need to keep the communication connection of terminal 100 and server constantly while maintaining connection at pre-stored strategy, and without the consideration expense), continue to maintain current communication connection, guaranteed that terminal 100 receives the information from server at any time.
Preferably, pre-conditionedly also comprise: the current residing pattern of terminal 100 (such as current in conference model or in offline mode), the current remaining electric weight of terminal 100 (such as electric weight is less than 10%), the system time (such as in the operating time) that terminal 100 is current etc., when the current state of terminal 100 meets above-mentioned pre-conditioned, illustrate that so the user now may seldom use being connected of terminal 100 and server, therefore can carry out being connected of disconnected end 100 and server according to default processing policy.
Preferably, also comprise: Tip element 106, while for judging at judging unit 102, not having default processing policy, send information, with the prompting user input instruction, wherein, connect processing unit 104 and also for the instruction according to receiving, disconnect or maintain communication connection.
While in terminal 100, not having the processing policy set in advance, can send information to the user, reminding subscriber terminal 100 is in the rate abnormality, whether disconnect the communication connection with server, if the user confirms to disconnect communication connection, the communication connection of disconnection and server, if the user confirms to maintain communication connection, continue to receive the information from server.
Preferably, connecting processing unit 104 comprises: the first request transmitting unit 1042, for when the instruction received communicates to connect for disconnecting, send the connection closed request to server, wherein, the type that comprises described communication connection in described connection closed request, so that server is determined described communication connection according to described type, discharge the resource relevant to communication connection; First resource releasing unit 1044, for receiving the response message from server, discharge the resource relevant to communication connection.
When the user confirms to disconnect this communication connection, terminal 100 can be obtained the type of this communication connection, at first terminal 100 sends the connection closed request to server, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal 100 and server, existing many to be connected, make server determine that according to connection type closing which bar connects, on the other hand can so that server according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, server is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to terminal 100 simultaneously, to inform that terminal connects, close, terminal 100 is after receiving the response message of server, the confirmation server has been closed connection, discharge and communicate to connect relevant resource with this, complete the opening operation of the communication connection of terminal 100 and server.
Preferably, connect processing unit 104 also for the type according to communication connection, obtain the default processing policy corresponding with the type communicated to connect, and disconnect or maintain communication connection according to corresponding default processing policy.
Terminal 100 and the type of the communication connection of server can be that TCP is connected, UDP connects or PushOTA connects etc., different connections can corresponding different processing policy, such as the user in advance by opening operation and TCP connection type association store, to maintain attended operation and UDP connection type association store, so when terminal 100 during in the rate abnormality, if the type of current communication connection detected, be that TCP connects, disconnect current communication connection, be that UDP connects if the type of current communication connection detected, maintain current communication connection.Obtain corresponding default processing policy by the type according to communication connection, can make terminal 100 disconnect or maintain the operation of connection, more can meet user's actual needs.
Preferably, connecting processing unit 104 comprises: the second request transmitting unit 1046, for when default processing policy communicates to connect for disconnecting, send the connection closed request to server, wherein, the type that comprises described communication connection in described connection closed request, so that server is determined described communication connection according to described type, discharge the resource relevant to communication connection; Secondary resource releasing unit 1048, for receiving the response message from server, discharge the resource relevant to communication connection.
When presetting the communication connection that processing policy is disconnection and server, at first terminal 100 sends the connection closed request to server, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal 100 and server, existing many to be connected, make server determine that according to connection type closing which bar connects, on the other hand can so that server according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, server is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to terminal 100 simultaneously, to inform that terminal 100 connects, close, terminal 100 is after receiving the response message of server, the confirmation server has been closed connection, discharge and communicate to connect relevant resource with this, complete the opening operation of the communication connection of terminal 100 and server.
It should be noted that, the first request transmitting unit 1042 and the second request transmitting unit 1046 can be same request transmitting unit, and first resource releasing unit 1044 and Secondary resource releasing unit 1048 can be same resource releasing units.And in terminal 100, do not exist while presetting processing policy, also can obtain default processing policy from server, and according to the default processing policy got from server, communication connection be processed.And server can be the AOI server, terminal 100 can be the AOI client.
Fig. 2 shows the schematic block diagram according to the server of the embodiment of the present invention.
As shown in Figure 2, according to the server 200 of the embodiment of the present invention, comprise: judging unit 202, for judgement and server 200, exist the current state of the terminal of communication connection whether to meet pre-conditioned, and, to judge that described current state meets described when pre-conditioned, judge in server 200 the default processing policy whether existed the communication connection between server 200 and terminal; Connect processing unit 204, while for judging at judging unit 202, having default processing policy, according to default processing policy disconnection or maintain communication connection.
The pre-conditioned rate abnormality that comprises, when terminal during in the rate abnormality, than in as roaming state, the arrearage state, the state that remaining sum is lower etc., if ignorant its terminal of user is under the rate abnormality, and terminal is while still continuing the information of reception server 200, may impact the user, such as the ignorant terminal of user under roaming state, and terminal still continues the information that reception server 200 pushes, will consume so the more rate of user, the lower state in remaining sum such as the ignorant terminal of user again, and terminal still continues the information that reception server 200 pushes, continue so to accept the remaining sum that message will continue to consume the user, so that subscriber arrearage shutdown.
Server 200 can judge that whether the terminal communicated to connect with its existence is in the rate abnormality, and the provider of server 200 is (such as terminal and server 200 by the communication connection of AOI system made, the provider of the server 200 so here can be the provider of AOI service) set in advance under the rate abnormality for the processing policy of communication connection and be kept in server 200, server 200 disconnects or maintains the current communication connection of terminal and server 200 when judging terminal in the rate abnormality according to pre-stored strategy, can (illustrate that the user is when expense is larger when disconnecting at pre-stored strategy, need the communication connection of disconnected end and server 200), disconnect current communication connection, too much consumption user's rate have been avoided, and be (to illustrate that the user need to keep the communication connection of terminal and server 200 constantly while maintaining connection at pre-stored strategy, and without the consideration expense), continue to maintain current communication connection, guaranteed that terminal receives the information from server 200 at any time.
Preferably, pre-conditionedly also comprise: the current residing pattern of terminal (such as current in conference model or in offline mode), the current remaining electric weight of terminal (such as electric weight is less than 10%), the system time (such as in the operating time) that terminal is current etc., when the current state of terminal meets above-mentioned at least one in pre-conditioned, illustrate that so the user now may seldom use being connected of terminal and server 200, therefore can carry out being connected of disconnected end and server 200 according to default processing policy.
Preferably, also comprise: Tip element 206, while for judging at judging unit 202, not having default processing policy, send the prompting request to terminal, so that terminal is sent information, the prompting user input instruction, wherein, connect the instruction that processing unit 204 also receives for obtaining terminal, according to the instruction received, disconnect or maintain communication connection.
While in server 200, not having the processing policy set in advance, can send the prompting request to terminal, make terminal send information to the user, reminding subscriber terminal is in the rate abnormality, whether disconnects the communication connection with server 200, and obtains the instruction of user's input from terminal, if the user confirms to disconnect communication connection, the communication connection of disconnection and terminal, if the user confirms to maintain communication connection, continue to the terminal pushed information.
Preferably, connecting processing unit 204 comprises: the first request transmitting unit 2042, for when the instruction received communicates to connect for disconnecting, send the connection closed request to terminal, wherein, the type that comprises described communication connection in described connection closed request, so that terminal is determined described communication connection according to described type, discharge the resource relevant to communication connection; First resource releasing unit 2044, for receiving the response message of self terminal, discharge the resource relevant to communication connection.
When the user confirms to disconnect this communication connection, server 200 can obtain the type of this communication connection, at first server 200 sends the connection closed request to terminal, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server 200, existing many to be connected, make terminal determine that according to connection type closing which bar connects, on the other hand can so that terminal according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, terminal is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to server 200 simultaneously, connect and close with notification server 200, server 200 is after receiving the response message of terminal, the confirmation terminal has been closed connection, discharge and communicate to connect relevant resource with this, the opening operation of the communication connection of completion service device 200 and terminal.
Preferably, connect processing unit 204 also for the type according to communication connection, obtain the default processing policy corresponding with the type communicated to connect, and disconnect or maintain communication connection according to corresponding default processing policy.
Server 200 can be that TCP is connected with the type of the communication connection of terminal, UDP connection or PushOTA connection etc., different connections can corresponding different processing policy, such as the service provider in advance by opening operation and TCP connection type association store, to maintain attended operation and UDP connection type association store, so when server 200 is judged terminal in the rate abnormality, if the type of current communication connection detected, be that TCP connects, disconnect current communication connection, if the type of current communication connection detected, be that UDP connects, maintain current communication connection.Obtain corresponding default processing policy by the type according to communication connection, can make server 200 disconnect or maintain the operation of connection, more can meet user's actual needs.
Preferably, connecting processing unit 204 comprises: the second request transmitting unit 2046, for when default processing policy communicates to connect for disconnecting, send the connection closed request to terminal, wherein, the type that comprises described communication connection in described connection closed request, so that terminal is determined described communication connection according to described type, discharge the resource relevant to communication connection; Secondary resource releasing unit 2048, for receiving the response message of self terminal, discharge the resource relevant to communication connection.
When presetting the communication connection that processing policy is disconnection and server, at first server 200 sends the connection closed request to terminal, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server 200, existing many to be connected, make terminal determine that according to connection type closing which bar connects, on the other hand can so that terminal according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, terminal is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to server 200 simultaneously, connect and close with notification server 200, server 200 is after receiving the response message of terminal, the confirmation terminal has been closed connection, discharge and communicate to connect relevant resource with this, the opening operation of the communication connection of completion service device 200 and terminal.
It should be noted that, the first request transmitting unit 2042 and the second request transmitting unit 2046 can be same request transmitting unit, and first resource releasing unit 2044 and Secondary resource releasing unit 2048 can be same resource releasing units.And in server 200, do not exist while presetting processing policy, also can obtain default processing policy from terminal, and according to the default processing policy got from terminal, communication connection be processed.And server 200 can be the AOI server, terminal can be the AOI client.
Fig. 3 shows the schematic flow diagram of connection management method according to an embodiment of the invention.
As shown in Figure 3, the connection management method comprises according to an embodiment of the invention: step 302, it is pre-conditioned whether the terminal judges current state meets, and judging that described current state meets when pre-conditioned, judges in terminal the default processing policy whether existed the communication connection of terminal and server; , if there is default processing policy in step 304, according to default processing policy disconnection or maintain communication connection.
The pre-conditioned rate abnormality that comprises, when terminal during in the rate abnormality, than in as roaming state, the arrearage state, the state that remaining sum is lower etc., if ignorant its terminal of user is under the rate abnormality, and terminal is while still continuing the information of reception server, may impact the user, such as the ignorant terminal of user under roaming state, and terminal still continues the information that reception server pushes, will consume so the more rate of user, the lower state in remaining sum such as the ignorant terminal of user again, and terminal still continues the information that reception server pushes, continue so to accept the remaining sum that message will continue to consume the user, so that subscriber arrearage shutdown.
Terminal can judge that whether self is in the rate abnormality, and the user can set in advance under the rate abnormality for the processing policy communicated to connect and in being kept at terminal, by disconnect or maintain the current communication connection of terminal and server during in the rate abnormality according to strategy pre-stored in terminal in terminal, can (illustrate that the user is when expense is larger when disconnecting at pre-stored strategy, need the communication connection of disconnected end and server), disconnect current communication connection, too much consumption user's rate have been avoided, and be (to illustrate that the user need to keep the communication connection of terminal and server constantly while maintaining connection at pre-stored strategy, and without the consideration expense), continue to maintain current communication connection, guaranteed that terminal receives the information from server at any time.
Preferably, pre-conditionedly also comprise: the current residing pattern of terminal (such as current in conference model or in offline mode), the current remaining electric weight of terminal (such as electric weight is less than 10%), the system time (such as in the operating time) that terminal is current etc., when the current state of terminal meets above-mentioned at least one in pre-conditioned, illustrate that so the user now may seldom use being connected of terminal and server, therefore can carry out being connected of disconnected end and server according to default processing policy.
Preferably, it is characterized in that, also comprise: step 306, if there is not default processing policy, terminal is sent information, with the prompting user input instruction, and disconnects or maintains communication connection according to the instruction that receives.
While in terminal, not having the processing policy set in advance, can send information to the user, reminding subscriber terminal is in the rate abnormality, whether disconnect the communication connection with server, if the user confirms to disconnect communication connection, the communication connection of disconnection and server, if the user confirms to maintain communication connection, continue to receive the information from server.
Preferably, step 306 comprises: if the instruction received is for disconnecting communication connection, terminal to server sends the connection closed request, wherein, the type that comprises described communication connection in described connection closed request, so that server is determined described communication connection according to described type, discharge the resource relevant to communication connection, and, after the response message received from server, discharge the resource relevant to communication connection.
When the user confirms to disconnect this communication connection, can obtain the type of this communication connection, at first terminal sends the connection closed request to server, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make server determine that according to connection type closing which bar connects, on the other hand can so that server according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, server is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to terminal simultaneously, to inform that terminal connects, close, terminal is after receiving the response message of server, the confirmation server has been closed connection, discharge and communicate to connect relevant resource with this, complete the opening operation of the communication connection of terminal and server.
Preferably, step 304 also comprises: terminal, according to the type of communication connection, is obtained the default processing policy corresponding with the type communicated to connect, and disconnects or maintain communication connection according to corresponding default processing policy.
Terminal and the type of the communication connection of server can be that TCP is connected, UDP connects or PushOTA connects etc., different connections can corresponding different processing policy, such as the user in advance by opening operation and TCP connection type association store, to maintain attended operation and UDP connection type association store, so when terminal during in the rate abnormality, if the type of current communication connection detected, be that TCP connects, disconnect current communication connection, be that UDP connects if the type of current communication connection detected, maintain current communication connection.Obtain corresponding default processing policy by the type according to communication connection, can make terminal disconnect or maintain the operation of connection, more can meet user's actual needs.
Preferably, step 304 comprises: if default processing policy is for disconnecting communication connection, terminal to server sends the connection closed request, wherein, the type that comprises described communication connection in described connection closed request, so that server is determined described communication connection according to described type, discharge the resource relevant to communication connection, and, after the response message received from server, discharge the resource relevant to communication connection.
When presetting the communication connection that processing policy is disconnection and server, at first terminal sends the connection closed request to server, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make server determine that according to connection type closing which bar connects, on the other hand can so that server according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, server is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to terminal simultaneously, to inform that terminal connects, close, terminal is after receiving the response message of server, the confirmation server has been closed connection, discharge and communicate to connect relevant resource with this, complete the opening operation of the communication connection of terminal and server.
It should be noted that, while not having default processing policy in terminal, also can obtain default processing policy from server, and according to the default processing policy got from server, communication connection be processed.And server can be the AOI server, terminal can be the AOI client.
Fig. 4 shows the schematic flow diagram of connection management method in accordance with another embodiment of the present invention.
As shown in Figure 4, the connection management method comprises in accordance with another embodiment of the present invention: step 402, whether the server judgement exists the current state of the terminal of communication connection to meet pre-conditioned with service, and judging that current state meets when pre-conditioned, judges in server the default processing policy whether existed the communication connection of server and terminal; , if there is default processing policy in step 404, according to default processing policy disconnection or maintain communication connection.
The pre-conditioned rate abnormality that comprises, when terminal during in the rate abnormality, than in as roaming state, the arrearage state, the state that remaining sum is lower etc., if ignorant its terminal of user is under the rate abnormality, and terminal is while still continuing the information of reception server, may impact the user, such as the ignorant terminal of user under roaming state, and terminal still continues the information that reception server pushes, will consume so the more rate of user, the lower state in remaining sum such as the ignorant terminal of user again, and terminal still continues the information that reception server pushes, continue so to accept the remaining sum that message will continue to consume the user, so that subscriber arrearage shutdown.
Server can judge that whether the terminal communicated to connect with its existence is in the rate abnormality, and the provider of server is (such as terminal and server by the communication connection of AOI system made, the provider of the server so here can be the provider of AOI service) set in advance under the rate abnormality for the processing policy communicated to connect and in being kept at server, server disconnects or maintains the current communication connection of terminal and server when judging terminal in the rate abnormality according to pre-stored strategy, can (illustrate that the user is when expense is larger when disconnecting at pre-stored strategy, need the communication connection of disconnected end and server), disconnect current communication connection, too much consumption user's rate have been avoided, and be (to illustrate that the user need to keep the communication connection of terminal and server constantly while maintaining connection at pre-stored strategy, and without the consideration expense), continue to maintain current communication connection, guaranteed that terminal receives the information from server at any time.
Preferably, pre-conditionedly also comprise: the current residing pattern of terminal (such as current in conference model or in offline mode), the current remaining electric weight of terminal (such as electric weight is less than 10%), the system time (such as in the operating time) that terminal is current etc., when the current state of terminal meets above-mentioned at least one in pre-conditioned, illustrate that so the user now may seldom use being connected of terminal and server, therefore can carry out being connected of disconnected end and server according to default processing policy.
Preferably, also comprise: step 406, if there is not default processing policy, server sends the prompting request to terminal, so that terminal is sent information, and the prompting user input instruction, and obtain the instruction that terminal receives, disconnect or maintain communication connection according to the instruction received.
While in server, not having the processing policy set in advance, can send the prompting request to terminal, make terminal send information to the user, reminding subscriber terminal is in the rate abnormality, whether disconnects the communication connection with server, and obtains the instruction of user's input from terminal, if the user confirms to disconnect communication connection, the communication connection of disconnection and terminal, if the user confirms to maintain communication connection, continue to the terminal pushed information.
Preferably, step 406 comprises: if the instruction received is for disconnecting communication connection, server sends the connection closed request to terminal, wherein, the type that comprises described communication connection in described connection closed request, so that terminal is determined described communication connection according to described type, discharge the resource relevant to communication connection, and, after receiving the response message of self terminal, discharge the resource relevant to communication connection.
When the user confirms to disconnect this communication connection, server can obtain the type of this communication connection, at first server sends the connection closed request to terminal, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make terminal determine that according to connection type closing which bar connects, on the other hand can so that terminal according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, terminal is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to server simultaneously, connect and close with notification server, server is after receiving the response message of terminal, the confirmation terminal has been closed connection, discharge and communicate to connect relevant resource with this, the opening operation of the communication connection of completion service device and terminal.
Preferably, step 404 also comprises: server, according to the type of communication connection, obtains the default processing policy corresponding with the type communicated to connect, and disconnects or maintain communication connection according to corresponding default processing policy.
Server and the type of the communication connection of terminal can be that TCP is connected, UDP connects or PushOTA connects etc., different connections can corresponding different processing policy, such as the service provider in advance by opening operation and TCP connection type association store, to maintain attended operation and UDP connection type association store, so when server is judged terminal in the rate abnormality, if the type of current communication connection detected, be that TCP connects, disconnect current communication connection, be that UDP connects if the type of current communication connection detected, maintain current communication connection.Obtain corresponding default processing policy by the type according to communication connection, can make server disconnect or maintain the operation of connection, more can meet user's actual needs.
Preferably, step 404 comprises: if default processing policy is for disconnecting communication connection, server sends the connection closed request to terminal, wherein, the type that comprises described communication connection in described connection closed request, so that terminal is determined described communication connection according to described type, discharge the resource relevant to communication connection, and, after receiving the response message of self terminal, discharge the resource relevant to communication connection.
When presetting the communication connection that processing policy is disconnection and server, at first server sends the connection closed request to terminal, due to the type that comprises above-mentioned communication connection in the connection closed request, in the time of on the one hand can between terminal and server, existing many to be connected, make terminal determine that according to connection type closing which bar connects, on the other hand can so that terminal according to connection type, in the mode corresponding with connection type (such as TCP connects, it is different that UDP connects the mode of closing be connected with PushOTA etc.) close the communication connection that this connection type is corresponding, terminal is after determining the communication connection of closing, discharge and communicate to connect relevant resource with this, send response message to server simultaneously, connect and close with notification server, server is after receiving the response message of terminal, the confirmation terminal has been closed connection, discharge and communicate to connect relevant resource with this, the opening operation of the communication connection of completion service device and terminal.
It should be noted that, while not having default processing policy in server, also can obtain default processing policy from terminal, and according to the default processing policy got from terminal, communication connection be processed.And server can be the AOI server, terminal can be the AOI client.
Fig. 5 shows the concrete schematic flow diagram of connection management method according to an embodiment of the invention.
As shown in Figure 5, the connection management method specifically comprises according to an embodiment of the invention:
Step 502, terminal, when judging self in the rate abnormality, judges in terminal and whether has default processing policy;
Step 504, if there is not default processing policy in terminal, send information, and whether the current terminal of prompting user, in the rate abnormality, disconnects the communication connection with server;
Step 506, judge whether the communication connection of disconnection and server according to the instruction received, if the instruction of user's input finishes for maintaining communication connection;
Step 508, if the instruction of user's input is for disconnecting communication connection, terminal is initiated to connect opening operation, concrete opening operation flow process is as shown in Figure 6;
Step 510, if there is default processing policy in terminal, the type that obtaining communication connects;
Step 512, determine according to the type of communication connection whether corresponding default processing policy is to disconnect communication connection, if default processing policy, for disconnecting communication connection, enters step 508 accordingly, if default processing policy, for maintaining communication connection, finishes accordingly.
Fig. 6 shows the concrete schematic flow diagram disconnected according to an embodiment of the invention.
As shown in Figure 6, the concrete exemplary flow disconnected according to an embodiment of the invention comprises: terminal 100 as shown in Figure 1 sends the connection closed request to server 200 as shown in Figure 2, the identification information that comprises terminal 100 in this connection closed request, and the type information of communication connection, the type connected can be " TCP ", " UDP " or " PushOTA " etc., so that server 200 is determined required communication connection of closing according to receiving the connection closed request, then server 200 sends and closes connection response to terminal 100, and the release resource relevant to the communication connection of terminal 100, comprise the information of whether successfully closing connection in this response, receive response, terminal 100 discharges the resource relevant to the communication connection of server 200.
Fig. 7 shows the concrete schematic flow diagram of connection management method in accordance with another embodiment of the present invention.
Step 608, if the instruction of user's input is for disconnecting communication connection, server initiates to connect opening operation, concrete opening operation flow process is as shown in Figure 8;
Fig. 8 shows the concrete schematic flow diagram disconnected in accordance with another embodiment of the present invention.
As shown in Figure 8, the concrete exemplary flow disconnected according to an embodiment of the invention comprises: server 200 as shown in Figure 2 sends the connection closed request to terminal 100 as shown in Figure 1, the type information that comprises communication connection in this connection closed request, the type connected can be " TCP ", " UDP " or " PushOTA " etc., so that terminal 100 is determined required communication connection of closing according to the connection closed request received, then terminal 100 sends and closes connection response to server 200, and the release resource relevant to the communication connection of server 200, comprise the information of whether successfully closing connection in this response, receive response, server 200 discharges the resource relevant to the communication connection of terminal 100.
More than be described with reference to the accompanying drawings technical scheme of the present invention, consider in correlation technique, when user terminal enters the rate abnormality, such as roaming state, server may produce more expensive expense to the user terminal PUSH message, and the user does not have to process in time, may cause larger economic loss to the user.Technical scheme by the application, can be at user terminal during in the rate abnormality, according to default strategy or by the prompting user, process in time being connected of user terminal and server, avoid server user's terminal to the user terminal PUSH message, the user to be caused to unnecessary economic loss when the rate abnormality.
In the present invention, term " first ", " second " be only for describing purpose, and can not be interpreted as indication or hint relative importance.Term " a plurality of " refers to two or more, unless clear and definite restriction separately arranged.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.
Claims (20)
1. a terminal, is characterized in that, comprising:
Judging unit, for judging whether the current state of described terminal meets pre-conditioned, and in the current state of judging described terminal, meet describedly when pre-conditioned, judge in described terminal the default processing policy whether existed the communication connection between described terminal and server;
Connect processing unit, while for judging at described judging unit, having described default processing policy, according to described default processing policy, disconnect or maintain described communication connection.
2. terminal according to claim 1, is characterized in that, also comprises:
Tip element, while for judging at described judging unit, not having described default processing policy, send information, with the prompting user input instruction,
Wherein, described connection processing unit is also for disconnecting according to the instruction that receives or maintaining described communication connection.
3. terminal according to claim 2, is characterized in that, described connection processing unit comprises:
The first request transmitting unit, being used in the described instruction received is while disconnecting described communication connection, send the connection closed request to described server, wherein, the type that comprises described communication connection in described connection closed request, so that described server is determined described communication connection according to described type, discharge the resource relevant to described communication connection;
The first resource releasing unit, for receiving the response message from described server, discharge the resource relevant to described communication connection.
4. terminal according to claim 1, it is characterized in that, described connection processing unit is also for the type according to described communication connection, obtain the default processing policy corresponding with the type of described communication connection, and disconnect or maintain described communication connection according to described corresponding default processing policy.
5. terminal according to claim 4, is characterized in that, described connection processing unit comprises:
The second request transmitting unit, being used at described default processing policy is while disconnecting described communication connection, send the connection closed request to described server, wherein, the type that comprises described communication connection in described connection closed request, so that described server is determined described communication connection according to described type, discharge the resource relevant to described communication connection;
The Secondary resource releasing unit, for receiving the response message from described server, discharge the resource relevant to described communication connection.
6. a server, is characterized in that, comprising:
Judging unit, for judgement and described server, exist the current state of the terminal of communication connection whether to meet pre-conditioned, and, to judge that described current state meets described when pre-conditioned, judge in described server the default processing policy whether existed the communication connection between described server and terminal;
Connect processing unit, while for judging at described judging unit, having described default processing policy, according to described default processing policy, disconnect or maintain described communication connection.
7. server according to claim 6, is characterized in that, also comprises:
Tip element, while for judging at described judging unit, not having described default processing policy, send the prompting request to described terminal, so that described terminal is sent information, and the prompting user input instruction,
Wherein, the instruction that described connection processing unit also receives for obtaining described terminal, disconnect or maintain described communication connection according to the described instruction that receives.
8. server according to claim 7, is characterized in that, described connection processing unit comprises:
The first request transmitting unit, being used in the described instruction received is while disconnecting described communication connection, send the connection closed request to described terminal, wherein, the type that comprises described communication connection in described connection closed request, so that described terminal is determined described communication connection according to described type, discharge the resource relevant to described communication connection;
The first resource releasing unit, for receiving the response message from described terminal, discharge the resource relevant to described communication connection.
9. server according to claim 6, it is characterized in that, described connection processing unit is also for the type according to described communication connection, obtain the default processing policy corresponding with the type of described communication connection, and disconnect or maintain described communication connection according to described corresponding default processing policy.
10. server according to claim 9, is characterized in that, described connection processing unit comprises:
The second request transmitting unit, being used at described default processing policy is while disconnecting described communication connection, send the connection closed request to described terminal, wherein, the type that comprises described communication connection in described connection closed request, so that described terminal is determined described communication connection according to described type, discharge the resource relevant to described communication connection;
The Secondary resource releasing unit, for receiving the response message from described terminal, discharge the resource relevant to described communication connection.
11. a connection management method, is characterized in that, comprising:
Step 302, it is pre-conditioned whether the terminal judges current state meets, and, to judge that described current state meets described when pre-conditioned, judge in described terminal the default processing policy whether existed the communication connection of described terminal and server;
Step 304, if there is described default processing policy, disconnects or maintain described communication connection according to described default processing policy.
12. connection management method according to claim 11, is characterized in that, also comprises:
Step 306, if there is not described default processing policy, described terminal is sent information, with the prompting user input instruction, and disconnects or maintains described communication connection according to the instruction that receives.
13. connection management method according to claim 12, it is characterized in that, described step 306 comprises: the instruction received if described is for disconnecting described communication connection, described terminal sends the connection closed request to described server, wherein, the type that comprises described communication connection in described connection closed request, so that described server is determined described communication connection according to described type, discharge the resource relevant to described communication connection, and, after the response message received from described server, discharge the resource relevant to described communication connection.
14. connection management method according to claim 11, it is characterized in that, described step 304 also comprises: described terminal is according to the type of described communication connection, obtain the default processing policy corresponding with the type of described communication connection, and disconnect or maintain described communication connection according to described corresponding default processing policy.
15. connection management method according to claim 14, it is characterized in that, described step 304 comprises: if described default processing policy is for disconnecting described communication connection, described terminal sends the connection closed request to described server, wherein, the type that comprises described communication connection in described connection closed request, so that described server is determined described communication connection according to described type, discharge the resource relevant to described communication connection, and, after the response message received from described server, discharge the resource relevant to described communication connection.
16. a connection management method, is characterized in that, comprising:
Step 402, whether the server judgement exists the current state of the terminal of communication connection to meet pre-conditioned with described server, and, to judge that described current state meets described when pre-conditioned, judge in described server the default processing policy whether existed the communication connection of described server and terminal;
Step 404, if there is described default processing policy, disconnects or maintain described communication connection according to described default processing policy.
17. connection management method according to claim 16, is characterized in that, also comprises:
Step 406, if there is not described default processing policy, described server sends the prompting request to described terminal, so that described terminal is sent information, the prompting user input instruction, and obtain the instruction that described terminal receives, and according to the described instruction received, disconnects or maintain described communication connection.
18. connection management method according to claim 17, it is characterized in that, described step 406 comprises: the instruction received if described is for disconnecting described communication connection, described server sends the connection closed request to described terminal, wherein, the type that comprises described communication connection in described connection closed request, so that described terminal is determined described communication connection according to described type, discharge the resource relevant to described communication connection, and, after the response message received from described terminal, discharge the resource relevant to described communication connection.
19. connection management method according to claim 16, it is characterized in that, described step 404 also comprises: described server is according to the type of described communication connection, obtain the default processing policy corresponding with the type of described communication connection, and disconnect or maintain described communication connection according to described corresponding default processing policy.
20. connection management method according to claim 19, it is characterized in that, described step 404 comprises: if described default processing policy is for disconnecting described communication connection, described server sends the connection closed request to described terminal, wherein, the type that comprises described communication connection in described connection closed request, so that described terminal is determined described communication connection according to described type, discharge the resource relevant to described communication connection, and, after the response message received from described terminal, discharge the resource relevant to described communication connection.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310390415XA CN103442452A (en) | 2013-08-30 | 2013-08-30 | Terminal, server and connection management method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310390415XA CN103442452A (en) | 2013-08-30 | 2013-08-30 | Terminal, server and connection management method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103442452A true CN103442452A (en) | 2013-12-11 |
Family
ID=49696098
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310390415XA Pending CN103442452A (en) | 2013-08-30 | 2013-08-30 | Terminal, server and connection management method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103442452A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105391706A (en) * | 2015-10-30 | 2016-03-09 | 宁波萨瑞通讯有限公司 | Arrearage Internet access limiting method, system and mobile terminal |
CN105744509A (en) * | 2014-12-08 | 2016-07-06 | 中兴通讯股份有限公司 | Method, device and system of managing terminal |
CN105847285A (en) * | 2016-05-16 | 2016-08-10 | 乐视控股(北京)有限公司 | Push service configuration method and device |
CN107302795A (en) * | 2016-04-15 | 2017-10-27 | 华为技术有限公司 | Configured information sending method, configured information treating method and apparatus |
CN107613511A (en) * | 2017-09-20 | 2018-01-19 | 北京珠穆朗玛移动通信有限公司 | Network management, mobile terminal and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101119388A (en) * | 2006-08-04 | 2008-02-06 | 佳能株式会社 | Communication apparatus and communication control method |
CN101616468A (en) * | 2009-07-20 | 2009-12-30 | 中兴通讯股份有限公司 | A mobile communication terminal and its data service control method |
WO2013030659A1 (en) * | 2011-09-02 | 2013-03-07 | Alcatel Lucent | Method and apparatus for controlling terminal's access to a wireless network |
CN103078807A (en) * | 2013-01-06 | 2013-05-01 | 中国人民解放军91655部队 | Method for managing clients by using server |
-
2013
- 2013-08-30 CN CN201310390415XA patent/CN103442452A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101119388A (en) * | 2006-08-04 | 2008-02-06 | 佳能株式会社 | Communication apparatus and communication control method |
CN101616468A (en) * | 2009-07-20 | 2009-12-30 | 中兴通讯股份有限公司 | A mobile communication terminal and its data service control method |
WO2013030659A1 (en) * | 2011-09-02 | 2013-03-07 | Alcatel Lucent | Method and apparatus for controlling terminal's access to a wireless network |
CN103078807A (en) * | 2013-01-06 | 2013-05-01 | 中国人民解放军91655部队 | Method for managing clients by using server |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105744509A (en) * | 2014-12-08 | 2016-07-06 | 中兴通讯股份有限公司 | Method, device and system of managing terminal |
CN105391706A (en) * | 2015-10-30 | 2016-03-09 | 宁波萨瑞通讯有限公司 | Arrearage Internet access limiting method, system and mobile terminal |
CN107302795A (en) * | 2016-04-15 | 2017-10-27 | 华为技术有限公司 | Configured information sending method, configured information treating method and apparatus |
CN107302795B (en) * | 2016-04-15 | 2021-03-05 | 华为技术有限公司 | Indication information sending method, indication information processing method and device |
CN105847285A (en) * | 2016-05-16 | 2016-08-10 | 乐视控股(北京)有限公司 | Push service configuration method and device |
CN107613511A (en) * | 2017-09-20 | 2018-01-19 | 北京珠穆朗玛移动通信有限公司 | Network management, mobile terminal and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103442452A (en) | Terminal, server and connection management method | |
GB2491993B (en) | Subscriber identification management broker for fixed/mobile networks | |
TW200746783A (en) | System and method for location identification | |
US9338118B2 (en) | Apparatus and method for transmitting push notification message | |
CN103179270B (en) | Mobile phone power-off or exceed the reminding method of service area in call | |
CN102957623B (en) | A kind of maintaining method of neighborhood of border gate protocol and equipment | |
CN103747512A (en) | Data traffic processing method, data traffic processing system and terminal | |
CN104898435B (en) | Home services system and its fault handling method, household appliance, server | |
CN103685570A (en) | Server, terminal and message pushing method | |
CN105430596A (en) | Communication method and communication apparatus bases on virtual SIM card | |
CN105025506A (en) | A method for remote management of AP equipment by cloud AC | |
CN105792015B (en) | Far-end network connection method and system based on smart television | |
CN105578449A (en) | Method and device for changing virtual SIM card | |
CN106896740A (en) | House water resource managing and control system and its method | |
CN103391303B (en) | Service fault noticing method and server using same | |
CN105072148B (en) | Method and device for establishing connection with terminal | |
CN107547264B (en) | Data backup method and device based on Internet of things | |
CN103024696A (en) | Method, system and related equipment for server to transmit messages to mobile terminal | |
CN101699905A (en) | Wireless intelligent terminal, webmaster platform and management method by webmaster platform | |
CN105404253B (en) | A control command sending method, response method and device | |
CN101610530B (en) | Session management apparatus, communication system, and session clear-out method | |
KR101058275B1 (en) | Communication terminal and its control method, P2P server system and its control method | |
CN103686863A (en) | Control signaling transfer method and control signaling transfer system | |
CN108632355B (en) | A home appliance network routing method, control terminal, readable storage medium and device | |
CN105577485A (en) | Method and device for realizing household networking and G.hn equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20131211 |