Summary of the invention
Technical problem to be solved by this invention is to provide and a kind ofly logs in the method that control carries out server log, in order to suitably to adjust server access frequency, avoids because frequent code error causes account to be sealed.After user confirms and inputs proper password, return to normal poll frequency, ensured that user account safety can not affect user's experience again.
Accordingly, present invention also offers and a kind ofly log in the device that control carries out server log, in order to ensure said method application in practice.
In order to solve the problem, the invention discloses and a kind ofly log in the method that control carries out server log, specifically can comprise:
Log in control and initiate logging request according to the log-on message poll preserved in advance to server;
Detect log-on message mistake during logon server, record continuous logon error number of times;
According to described logon error number of times, the default time adjusted to described server initiation logging request is spaced apart prefixed time interval, and wherein said prefixed time interval increases progressively with described logon error number of times;
The log-on message mistake of preserving in advance described in pointing out to user, and the renewal of the log-on message of preserving in advance described in carrying out.
Preferably, described method, can also comprise:
Detect that described login control is according to upgrading the log-on message logon server success of preserving;
Recovering the described prefixed time interval to described server initiation logging request is default time interval.
Preferably, described log-on message mistake can comprise:
Described logging request is logged the information of server refusal; Or
The information that socket between described login control and logon server disconnects passively.
Preferably, log-on message mistake during described detection logon server, the step recording continuous logon error number of times can comprise:
Confirm that the network connection state between described login control and described server is normal;
After detecting that described login control initiates logging request to described server continuously, receive the information that the information refused by described logon server or the socket between described login control and logon server disconnect passively;
Record detects the number of times of above-mentioned information, as continuous logon error number of times.
Preferably, described record detects the number of times of above-mentioned information, and the step as continuous logon error number of times can comprise:
Define a global counter, described global counter comprises count value, and the initial value of described count value is 0;
Detect that the number of times of above-mentioned information increases continuously 1 time, described count value correspondingly adds 1.
Preferably, when the count value of described global counter can be 0, the time interval that described login control initiates logging request to described server can be default time interval;
When the count value of described global counter often increases by 1, then default time interval can be adjusted to the prefixed time interval increased progressively.
Preferably, described point out to user described in the log-on message mistake of preserving in advance, and the step of the renewal of the log-on message of preserving in advance described in carrying out can comprise:
The message of display log-on message mistake is to user;
Obtain the log-on message that user upgrades;
The log-on message of preserving in advance described in the log-on message of described renewal is replaced.
Preferably, described server can be POP3 server or imap server.
Preferably, described time interval default value can for the time interval value defined in POP3 agreement or IMAP agreement.
Preferably, described prefixed time interval can be: time interval when logging in mistake is for the first time 5 minutes; Time interval when logging in mistake is for the second time 30 minutes; Third time and the time interval be greater than when logging in mistake are for the third time 60 minutes.
The present invention discloses and a kind ofly log in the device that control carries out server log, specifically can comprise:
Logging request initiation module, it is configured to log in control and initiates logging request according to the log-on message poll preserved in advance to server;
Errors number logging modle, it is configured to log-on message mistake when detecting logon server, records continuous logon error number of times;
Time interval adjusting module, it is configured to according to described logon error number of times, and the default time adjusted to described server initiation logging request is spaced apart prefixed time interval, and wherein said prefixed time interval increases progressively with described logon error number of times;
Log-on message update module, its be configured to point out to user described in the log-on message mistake of preserving in advance, and the renewal of the log-on message of preserving in advance described in carrying out.
Preferably, described device, can also comprise:
Login successfully detection module, it is configured to detect that described login control is according to upgrading the log-on message logon server success of preserving;
The time interval recovers module, and it is configured to recover the described prefixed time interval to described server initiation logging request is default time interval.
Preferably, described log-on message mistake can comprise:
Described logging request is logged the information of server refusal; Or
The information that socket between described login control and logon server disconnects passively.
Preferably, described errors number logging modle can comprise:
Network connection state confirms submodule, and it is configured to confirm that the network connection state between described login control and described server is normal;
Socket disconnection detection submodule, after it is configured to detect that described login control initiates logging request to described server continuously, receive the information that the information refused by described logon server or the socket between described login control and logon server disconnect passively;
Continuous errors number detection sub-module, it is configured to the number of times above-mentioned information being detected, as continuous logon error number of times.
Preferably, described continuous errors number detection sub-module can comprise:
Counter definition unit, it is configured to definition one global counter, and described global counter comprises count value, and the initial value of described count value is 0;
Continuous errors number counting unit, it is configured to detect that the number of times of above-mentioned information increases continuously 1 time, and described count value correspondingly adds 1.
Preferably, when the count value of described global counter can be 0, the time interval that described login control initiates logging request to described server can be default time interval;
When the count value of described global counter often increases by 1, then default time interval can be adjusted to the prefixed time interval increased progressively.
Preferably, described log-on message update module can comprise:
Message display sub-module, its message being configured to display log-on message mistake is to user;
Log-on message obtains submodule, and it is configured to the log-on message obtaining user's renewal;
Log-on message replaces submodule, and it is configured to the log-on message of will preserve in advance described in the replacement of the log-on message of described renewal.
Preferably, described server can be POP3 server or imap server.
Preferably, described time interval default value can for the time interval value defined in POP3 agreement or IMAP agreement.
Preferably, described prefixed time interval can be: time interval when logging in mistake is for the first time 5 minutes; Time interval when logging in mistake is for the second time 30 minutes; Third time and the time interval be greater than when logging in mistake are for the third time 60 minutes.
Compared with prior art, the present invention has the following advantages:
The present invention, by misregistration access times, adjusts the time interval of mailbox client-access mailbox server according to the count value of abuse number of times.For in E-mail address client when acquisition new mail messages, according to the situation of abuse number of times, suitably adjustment server access frequency, prevents because frequent code error causes account to be sealed.
Further, the count value of abuse number of times corresponding mailbox client global counter; According to the time interval of count value adjustment mailbox client-access mailbox server.After user confirms and inputs proper password, count value can reset, and the time interval of mailbox client-access mailbox server is adjusted to preset default time interval.Mailbox client-access mailbox server returns to normal poll frequency, has ensured that user account safety can not affect user's experience again.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, and below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
One of core idea of the embodiment of the present invention is, by misregistration access times, according to the time interval of the count value adjustment mailbox client-access mailbox server of abuse number of times.For in E-mail address client when acquisition new mail messages, according to the situation of abuse number of times, suitably adjustment server access frequency, prevents because frequent code error causes account to be sealed.Further, the count value of abuse number of times corresponding mailbox client global counter; According to the time interval of count value adjustment mailbox client-access mailbox server.After user confirms and inputs proper password, count value can reset, and the time interval of mailbox client-access mailbox server is adjusted to preset default time interval.Mailbox client-access mailbox server returns to normal poll frequency, has ensured that user account safety can not affect user's experience again.
With reference to Fig. 1, show and a kind ofly log in the flow chart that control carries out the embodiment of the method 1 of server log, specifically can comprise the following steps:
Step 101, login control initiate logging request according to the log-on message poll preserved in advance to server;
Log-on message mistake when step 102, detection logon server, records continuous logon error number of times;
In one preferred embodiment of the invention, described log-on message mistake can comprise: described logging request is logged the information of server refusal; Or the information that the socket between described login control and logon server disconnects passively.
In specific implementation, mailbox client needs timer access mailbox server, obtains new e-mail messages.But when code error or some Network Abnormals, all can by mailbox server as tentative attack.When in this case, when mailbox client is also frequently accessed, server can block account, even may forever be sealed.Code error or some Network Abnormals cause accessing failed situation and usually can show as mailbox client and to be refused by mailbox server or the Interprocess Communication Mechanism of mailbox is passive disconnects.
In one preferred embodiment of the invention, described step 102 specifically can comprise following sub-step:
Sub-step S11, confirm that the network connection state between described login control and described server is normal;
Sub-step S12, detect that described login control initiates logging request to described server continuously after, receive the information that the information refused by described logon server or the socket between described login control and logon server disconnect passively;
Sub-step S13, record detect the number of times of above-mentioned information, as continuous logon error number of times.
In one preferred embodiment of the invention, described sub-step S13 may further include with lower unit:
Define a global counter, described global counter comprises count value, and the initial value of described count value is 0;
In specific implementation, the time interval of general mailbox client-access mailbox server can be set to fixed value, under normal circumstances, and timer access mailbox server; When network connection interruption, access mailboxes server failure also can not cause, by mailbox server as tentative attack.Now, the access of mailbox client there will not be and to be refused by mailbox server or the passive situation about disconnecting of Interprocess Communication Mechanism of mailbox; The count value of global counter is initial value 0.
Detect that the number of times of above-mentioned information increases continuously 1 time, described count value correspondingly adds 1.
In specific implementation, time network connects unimpeded, because the situation of the mailbox client-access mailbox server failure of mistake appears in Network Abnormal, password, regard tentative attack by by mailbox server; This visit will be regarded as abuse, and global counter can record current abuse, and count value adds 1.When abuse recurs, the count value of global counter constantly can add 1 on basis before, and count value constantly becomes large.
Step 103, according to described logon error number of times, adjust the default time of initiating logging request to described server and be spaced apart prefixed time interval, wherein said prefixed time interval increases progressively with described logon error number of times;
In specific implementation, when the count value of described global counter is 0, the time interval that described login control initiates logging request to described server is default time interval;
When the count value of described global counter often increases by 1, then default time interval is adjusted to the prefixed time interval increased progressively.
In specific implementation, when the count value of global counter is 0, mailbox client can according to preset access mailboxes server interval time.When count value occurs to become large, often increase by 1, the time interval of mailbox client adjustment access mailboxes server.The preset time can be increased again on the basis in the existing time interval; Also can become large according to the multiple in the existing time interval, described multiple is greater than 1.
Step 104, to point out to user described in the log-on message mistake of preserving in advance, and the renewal of the log-on message of preserving in advance described in carrying out.
In one preferred embodiment of the invention, described step 104 specifically can comprise following sub-step:
The message of sub-step S21, display log-on message mistake is to user;
The log-on message that sub-step S22, acquisition user upgrade;
Sub-step S23, the log-on message of will preserve in advance described in the replacement of the log-on message of described renewal.
In one preferred embodiment of the invention, described server is POP3 server or imap server.
In the present invention, preferred embodiment is, described time interval default value can for the time interval value defined in POP3 agreement or IMAP agreement.Described prefixed time interval can be: time interval when logging in mistake is for the first time 5 minutes; Time interval when logging in mistake is for the second time 30 minutes; Third time and the time interval be greater than when logging in mistake are for the third time 60 minutes.
With reference to Fig. 2, show and a kind ofly log in the flow chart that control carries out the embodiment of the method 2 of server log, specifically can comprise the following steps:
Step 201, login control initiate logging request according to the log-on message poll preserved in advance to server;
In a preferred embodiment of the invention, mailbox client-access mailbox server, runs into network connection interruption, and the access request of mailbox client can not send to mailbox server.Access and unsuccessfully also can not cause, mailbox server is regarded tentative attack by mailbox server.Now, the access of mailbox client there will not be to be refused by mailbox server or the passive situation about disconnecting of Interprocess Communication Mechanism of mailbox, so the situation of mailbox client-access mailbox service that network connection interruption causes does not belong to abuse.
And network is when connecting unimpeded, because there is the situation of the mailbox client-access mailbox server failure of mistake in Network Abnormal, password, will by mailbox server as tentative attack; Now show as mailbox server to be refused by mailbox server or the Interprocess Communication Mechanism of mailbox is passive disconnects.The access of mailbox client will be regarded as abuse, and the global counter of mailbox client can record current abuse.
Log-on message mistake when step 202, detection logon server, records continuous logon error number of times;
Step 203, according to described logon error number of times, adjust the default time of initiating logging request to described server and be spaced apart prefixed time interval, wherein said prefixed time interval increases progressively with described logon error number of times;
Step 204, to point out to user described in the log-on message mistake of preserving in advance, and the renewal of the log-on message of preserving in advance described in carrying out;
Step 205, detect described login control according to upgrade preserve log-on message logon server success;
Step 206, to recover described prefixed time interval of initiating logging request to described server be default time interval.
In specific implementation, mailbox client can arrange global counter and carry out mistake of statistics access times, can generate count value to represent the abuse number of times occurred continuously, once the success of mailbox client-access mailbox server, count value can reset by global counter.
In specific implementation, when the success of mailbox client-access mailbox server, the count value of mailbox client global counter resets, and become when 0 in count value, the time interval of mailbox client-access mailbox server is adjusted to preset time interval.Preset time interval can be the default parameters of mailbox client, also can need setting according to client.Preset time interval can make mailbox client be in higher access frequency to mailbox server.
Conveniently those skilled in the art understand the present invention better, illustrate further the present invention below by way of a complete example:
1, mailbox customer end A access mailboxes server FW, runs into network connection interruption, puts and asks unsuccessfully; The count value of mailbox customer end A global counter is constant, is 0; Again access after waiting for 5 minutes interval times of acquiescence.
2, mailbox customer end A, after 5 minutes, access mailboxes server FW, mailbox server FW authentication password is correct again, accesses successfully; The count value of mailbox customer end A global counter is constant, is 0; Again access after waiting for 5 minutes interval times of acquiescence.
3, mailbox customer end B access mailboxes server FW, mailbox server FW authentication password mistake, accesses unsuccessfully; The count value of mailbox customer end B global counter adds 1, is 1; Wait for 3 times of times of 5 minutes interval times of acquiescence, again access after 15 minutes.
4, mailbox customer end B, access mailboxes server FW, mailbox server FW authentication password mistake again after 15 minutes, accesses unsuccessfully; The count value of mailbox customer end B global counter adds 1, is 2; Wait for 3 times of times of 15 minutes interval times of last time, again access after 45 minutes.
5, mailbox customer end B, after 45 minutes, access mailboxes server FW, mailbox server FW authentication password is correct again, accesses successfully; The count value of mailbox customer end B global counter resets, and is 0; 5 minutes interval times reverting to acquiescence interval time of access next time, again access after 5 minutes.
It should be noted that, for embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and involved action might not be that the present invention is necessary.
With reference to Fig. 3, show and a kind ofly log in the structured flowchart that control carries out the device embodiment 1 of server log, specifically can comprise:
Logging request initiation module 301, it is configured to log in control and initiates logging request according to the log-on message poll preserved in advance to server;
Errors number logging modle 302, it is configured to log-on message mistake when detecting logon server, records continuous logon error number of times;
In one preferred embodiment of the invention, described errors number logging modle 302 specifically can comprise following submodule:
Network connection state confirms submodule, and it is configured to confirm that the network connection state between described login control and described server is normal;
Socket disconnection detection submodule, after it is configured to detect that described login control initiates logging request to described server continuously, receive the information that the information refused by described logon server or the socket between described login control and logon server disconnect passively;
Continuous errors number detection sub-module, it is configured to the number of times above-mentioned information being detected, as continuous logon error number of times.
Time interval adjusting module 303, it is configured to according to described logon error number of times, and the default time adjusted to described server initiation logging request is spaced apart prefixed time interval, and wherein said prefixed time interval increases progressively with described logon error number of times;
Log-on message update module 304, its be configured to point out to user described in the log-on message mistake of preserving in advance, and the renewal of the log-on message of preserving in advance described in carrying out.
In one preferred embodiment of the invention, described log-on message update module 304 specifically can comprise following submodule:
Message display sub-module, its message being configured to display log-on message mistake is to user;
Log-on message obtains submodule, and it is configured to the log-on message obtaining user's renewal;
Log-on message replaces submodule, and it is configured to the log-on message of will preserve in advance described in the replacement of the log-on message of described renewal.
With reference to Fig. 4, show and a kind ofly log in the structured flowchart that control carries out the device embodiment 2 of server log, specifically can comprise:
Logging request initiation module 401, it is configured to log in control and initiates logging request according to the log-on message poll preserved in advance to server;
Errors number logging modle 402, it is configured to log-on message mistake when detecting logon server, records continuous logon error number of times;
Time interval adjusting module 403, it is configured to according to described logon error number of times, and the default time adjusted to described server initiation logging request is spaced apart prefixed time interval, and wherein said prefixed time interval increases progressively with described logon error number of times;
Log-on message update module 404, its be configured to point out to user described in the log-on message mistake of preserving in advance, and the renewal of the log-on message of preserving in advance described in carrying out;
Login successfully detection module 405, it is configured to detect that described login control is according to upgrading the log-on message logon server success of preserving;
The time interval recovers module 406, and it is configured to recover the described prefixed time interval to described server initiation logging request is default time interval.
Because described device embodiment is substantially corresponding to preceding method embodiment, therefore not detailed part in the description of the present embodiment, see the related description in previous embodiment, just can not repeat at this.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Method in the invention described above embodiment, device and server are applicable in various network or client environment, such as can be implemented in the computer equipment of such as PC device and so on, or can be implemented in other portable electric appts such as such as mobile phone, mobile communication equipment, PDA(Personal Digital Assistant) or non-portable electronic equipment.Therefore those skilled in the art want it is clear that; the login control that protection scope of the present invention is not limited on PC in running browser carries out server log function, is only that the login control that have employed in embodiments of the present invention on PC in running browser carries out server log function and is described for describe succinct and convenient.
Above a kind of control that logs in provided by the present invention is carried out to the method for server log and a kind ofly logs in the device that control carries out server log and be described in detail, apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.