The content of the invention
In view of the foregoing, it is necessary to a kind of system and method for reducing package transmission is provided, communication dress can identifiedPut be because lose signal and caused by data bus connection disconnect when, application program wouldn't be notified, so as to avoid signal recover and dataThe application program sends out the package of repetition again after line recovers.
A kind of system for reducing package transmission, applied in communication device, the communication device is provided with various application programs,The system includes:Determining module, for when the communication device is in data bus connection state, updating answering for package it is determined that sendingIt is more new procedures with program;Judge module, for after the communication device receives disconnection information, judging whether to receive useBroken string operation of the family on the communication device, and when being not received by user in the broken string operation on the communication deviceDetermine that the disconnection information is not sent by user;Module is checked, for checking whether the communication device currently has signal;And controlMolding block, for when the communication device is currently without signal, controlling communication device waiting signal in preset timeRecover and reconnect network, and do not notify the renewal program communication device to break in preset time.
A kind of method for reducing package transmission, applied in communication device, the communication device is provided with various application programs,This method comprises the following steps:When the communication device is in data bus connection state, it is determined that sending the application journey of renewal packageSequence is more new procedures;After the communication device receives disconnection information, judge whether to receive user in the communication deviceOn broken string operation;If be not received by user on the communication device broken string operation, determine the disconnection information not byUser sends;Check whether the communication device currently has signal;And if the communication device is currently without signal, described in controlCommunication device waiting signal in preset time recovers and reconnects network, and does not notify that updating program is somebody's turn to do in preset timeCommunication device has broken.
Compared to prior art, the described system and method for reducing package transmission, can identify communication device be becauseWhen losing signal and causing the data bus connection to disconnect, application program wouldn't be notified, so as to avoid recovering in signal and data bus connection is extensiveThe application program sends out the package of repetition again after multiple.In this way, the described system and method for reducing package transmission is utilized, canThe package amount and the power consumption of the communication device that reduction wireless base station receives.
Embodiment
As shown in figure 1, it is the hardware structure diagram of the better embodiment for the system that the present invention reduces package transmission.DescribedThe system 10 for reducing package transmission is applied in communication device 1, for identifying it is because the communication device 1 loses signalWhen causing the data bus connection of the communication device 1 to disconnect, the communication device 1 is controlled not notify the communication to fill in preset timePut each application program in 1 so that the application program does not repeat to send renewal package after data bus connection recovery.
The communication device 1 can be mobile phone, personal digital assistant(PDA, Personal Digital Assistant)Deng device.The communication device 1 includes the processor 11 and storage device 12.
Described processor 11 is used to perform to be installed in the system 10 and the communication device 1 of the reduction package transmissionTypes of applications program, such as operating system etc..Described storage device 12, it can be the internal memory of the communication device 1, may be used alsoTo be the storage card that can be external in the communication device 1, such as SM cards(Smart Media Card, smart media card), SD card(Secure Digital Card, safe digital card)Deng.Described storage device 12 is used to store Various types of data, for example, figurePiece, mail, set using the system 10 of the reduction package transmission, the information such as the data that obtain.
The communication device 1 further comprises phone framework(Telephony Framework)Layer 13, radio interface layer(RIL, Radio Interface Layer)14 and modem 15.With reference to hierarchical relationship schematic diagram as shown in Figure 3,Described phone ccf layer 13, radio interface layer 14 and modem(Modem)The interaction of data can be realized between 15To perform dependent instruction.For example, after the data bus connection of the communication device 1 disconnects, described modem 15 can be viaHierarchical relationship as shown in Figure 3 sends disconnection information to application program.
As shown in Fig. 2 it is the functional block diagram of the better embodiment for the system that the present invention reduces package transmission.In this realityApply in mode, the system 10 for reducing package transmission includes multiple functional modules, is respectively:Determining module 102, judge module104th, module 106 and control module 108 are checked.
Described determining module 102, for when the communication device 1 is in data bus connection state, it is determined that sending renewalThe application program of package is more new procedures.For example, Android is being installed(Android)In the mobile phone of operating system, each handAfter machine establishes data bus connection, the application program of installation sends service of the renewal package to correlation by the data bus connection in mobile phoneDevice, so as to realize the renewal of application program.Go to judge the mobile phone in addition, the mail software in mobile phone can also send renewal packageWhether have and receive new mail.
Described judge module 104, for after the communication device 1 receives disconnection information, judging the disconnection informationWhether sent by user.Described phone ccf layer 13 is sent to for example, the disconnection information can be the modem 15.For example, the disconnection information can be " intent==ACTION_ANY_DATA_CONNECTION_STATE_CHANGE &&intent state == DISCONNECTED”。
Described judge module 104 by judge whether to receive broken string of the user on the communication device 1 operate comeWhether identification disconnection information is sent by user.It is described if being not received by broken string operation of the user on the communication deviceJudge module 104 determine the disconnection information not sent by user.If receive broken string of the user on the communication deviceOperation, then the described judge module 104 determination disconnection information is sent by user.
Described inspection module 106, for it is determined that disconnection information checks the communication device 1 when not being and being sent by userCurrently whether there is signal.
Described control module 108, for when the communication device 1 is currently without signal, controlling the communication device 1In preset time(For example, 2 seconds)Interior waiting signal recovers and reconnects network, and does not notify renewal journey in preset timeThe sequence communication device 1 has broken.In the present embodiment, lose in order to avoid signal is of short duration and recover again, or when described logicalNews device 1 is in the signal received during the region of signal coverage rate difference and cut in and out, and necessarily causes more new procedures can be described logicalThe data bus connection of news device 1 is disconnected the problem of sending identical renewal package to unlimited base station when reconnecting repeatedly, describedControl module 108 can be when it be to cause data bus connection to disconnect because of no signal to identify the communication device 1, in preset timeInside disconnection information is not issued into more new procedures, that is, give 1 one buffer time of communication device, so as in the communication device1 recovers the quantity of reduction transmission renewal package after data bus connection again.
If in addition, the disconnection information is sent by user, if or the communication device 1 currently have signal, it is describedThe current state that control module 108 is additionally operable to change the communication device 1 is broken string state, and notifies described more new procedures shouldCommunication device 1 has broken, so that the more new procedures send renewal package after the communication device 1 again line.That is, instituteThe control module 108 stated is just not send disconnection information during turn-off data line because of no signal in the communication device 1To more new procedures.
Further, described control module 108 can also be used to have arrived in preset time and the communication device 1 stillWhen being so in broken string state, the described more new procedures communication device 1 is notified to break, so that the more new procedures are describedCommunication device 1 sends renewal package after line again.
In other embodiments, described inspection module 106 is additionally operable to receive service state in the communication device 1When changing notice, check whether the communication device 1 currently has signal, and record the current signal condition of the communication device 1.For example, it can be " intent that the service state, which changes notice,: ACTION_SERVICE_STATE_CHANGED”.
As shown in figure 4, it is the flow chart of the better embodiment for the method that the present invention reduces package transmission.First, stepS2, when the communication device 1 is in data bus connection state, described determining module 102 determines to send the application of renewal packageProgram is more new procedures.
Step S4, described communication device 1 receive disconnection information.
Step S6, described judge module 104 judge whether the disconnection information is sent by user.Described judge module104 by judging whether that receiving broken string of the user on the communication device 1 operates to identify disconnection information whether by userSend.
If the disconnection information is sent by user, in step S8, described control module 108 changes the communication device 1Current state be broken string state, and notify described more new procedures communication device 1 to break, then, terminate this flow.
If the disconnection information is sent by user, in step S10, described inspection module 106 checks the communication dressPut whether 1 currently have signal.If the communication device 1 currently has signal, flow goes to step S8.
If the communication device 1 is currently without signal, in step S12, described control module 108 controls the communication dress1 is put in preset time(For example, 2 seconds)Interior waiting signal recovers and reconnects network, and is not notified more in preset timeThe new procedures communication device 1 has broken, and then, terminates this flow.
As shown in figure 5, it is the step S12 of the better embodiment for the method that the present invention reduces package transmission refinement flowFigure.First, step S120, described control module 108 judge whether preset time reaches.
If preset time not yet reaches, in step S122, described control module 108 controls the communication device 1 to waitSignal recovers and reconnects network, and does not notify the renewal program communication device 1 to break, and then, flow goes to stepS120。
If preset time reaches, in step S124, described control module 108 judges whether the communication device 1 is still locatedIn broken string state.
If the communication device 1 is still in broken string state, in step S126, described control module 108 notifies describedThe more new procedures communication device 1 has broken, so that the more new procedures send renewal after the communication device 1 again linePackage, then, terminate this flow.
If the communication device 1 is not in broken string state, terminate this flow.
Embodiment of above is merely illustrative of the technical solution of the present invention and unrestricted, although the preferable embodiment party with reference to more thanThe present invention is described in detail formula, it will be understood by those within the art that, can be to technical schemeModify or equivalent substitution should not all depart from the spirit and scope of technical solution of the present invention.