Detailed description of the invention
Below with reference to accompanying drawing and describe the present invention in detail in conjunction with the embodiments.It should be noted that in the case of not conflicting, the embodiment in the application and the feature in embodiment can be mutually combined.
Fig. 1 show the flow chart of the implementation method of the communication security according to presently preferred embodiments of the present invention offer.As it is shown in figure 1, the implementation method of the communication security of presently preferred embodiments of the present invention offer includes step 101~103.
In step 101, Service Process Server receives the different types of instruction request that client sends, the number of the different types of instruction request received in obtaining the first preset time period.In this, the type of instruction such as includes login instruction, logout instruction, Text instruction and Group instruction etc..But, this is not limited by the present invention.
In step 102, described Service Process Server determines acceptance and the danger classes of command adapted thereto according to the number of described different types of instruction request and the first control table of storage.
In the present embodiment, Service Process Server stores the first control table, instruction request number, danger classes and the corresponding relation of instruction acceptance in the first control table storage instruction type, instruction importance rate, the first preset time period.In this, as a example by login instruction, logout instruction, Text instruction and Group instruction, the first control table is such as shown in table 1.
Table 1
In this, as shown in table 1, instruction importance rate is the most successively: Group instruction (fourth estate), Text instruction (tertiary gradient), logout instruction (the second grade), login instruct (the first estate).Additionally, the order that danger classes is from low to high is: the first estate, the second grade, the tertiary gradient.But, the present invention is not limited to this.In reality is applied, can be set as required.In addition, the determination mode of instruction acceptance is as follows: determine intermediate value according to two endpoint values of instruction request number range in each first preset time period, obtains the instruction acceptance of correspondence on the basis of intermediate value plus added value, and, along with danger classes raises, added value is gradually lowered.As a example by login instructs, in first preset time period, instruction request number is in the range of more than 10,000 and when no more than 30,000, corresponding intermediate value is 20,000, and added value is 0.5 ten thousand, therefore, instruction acceptance is 2.5 ten thousand, when scope is more than 30,000 and when no more than 50,000, corresponding intermediate value 40,000, added value is 0.4 ten thousand, therefore, instruction acceptance is 4.4 ten thousand.
Specifically, after the number of the different types of instruction request that Service Process Server receives in obtaining the first preset time period, acceptance and the danger classes of different types of instruction are determined according to table 1.For example, Service Process Server obtains the first preset time period (such as, 20 minutes) in receive different types of instruction request number as follows: login number of instructions is 0.8 ten thousand, logout number of instructions is 4.5 ten thousand, Text number of instructions is 4.7 ten thousand, and Group number of instructions is 70,000.Wherein, if the number of command adapted thereto be not included in table 1 corresponding in the range of, then it represents that this instruction is not in precarious position, this instruction of Service Process Server normal process.In this, understanding with reference to table 1, login number of instructions does not belong in table 1 in corresponding number range, and therefore, login instruction is not in precarious position.The number of logout instruction corresponds to more than 40,000 and the scope of no more than 60,000, and therefore, danger classes is the second grade, and instruction acceptance is less than 5.4 ten thousand, and so, Service Process Server still can process 4.5 ten thousand logout instructions.The number of Text instruction corresponds to more than 30,000 and the scope of no more than 50,000, and therefore, danger classes is the first estate, and instruction acceptance is less than 4.5 ten thousand, and so, Service Process Server at most processes the Text instruction of 4.5 ten thousand, abandons unnecessary 0.2 ten thousand instruction.The number of Group instruction corresponds to more than 60,000 and the scope of no more than 80,000, and therefore, danger classes is the second grade, and instruction acceptance is less than 7.4 ten thousand, and so, Service Process Server still can process 70,000 Group instructions.
In step 103, described Service Process Server is according to described first control table and the number of different types of instruction request that obtains in the second preset time period, determine that command adapted thereto is in the number of times of default danger classes, and adjust the importance rate of described command adapted thereto according to the second control table.
In the present embodiment, Service Process Server timing adjusts the importance rate of command adapted thereto according to the second control table.In this, the second control table of Service Process Server storage is such as shown in table 2.But, the present invention is not limited to this.In reality is applied, can accommodation the second control table as required.
In second preset time period, command adapted thereto is in the number of times of the tertiary gradient (danger classes) |
Instruction importance rate adjustable strategies |
Number of times is 0 |
Instruction importance rate reduces one-level |
More than 0 time and no more than 3 times |
Instruction importance rate elevated by one step |
More than 3 times and no more than 6 times |
Instruction importance rate raises two-stage |
More than 6 times |
Instruction importance rate raises three grades |
Table 2
Wherein, the second preset time period is more than the first preset time period.Such as, first preset time period is 20 minutes, second preset time period is 3 hours, includes 9 the first preset time period, and the number that Service Process Server is the different types of instruction request of interval stats with the first preset time period in the second preset time period in the i.e. second preset time period.As a example by login instructs, if in the second preset time period (such as, 3 hours), Service Process Server is with number that the first preset time period (such as, 20 minutes) is interval stats login instruction request.After Service Process Server adds up the number of login instruction request every time, determine the danger classes of login instruction in each first preset time period according to table 1.If reach the second preset time period, Service Process Server determines that login instruction is in the number of times of the tertiary gradient (danger classes) when being 4 times, then according to table 2, Service Process Server determines that the instruction importance rate that login instructs needs to raise two-stage, that is, the instruction importance rate of login instruction is increased to the tertiary gradient.Now, Service Process Server needs the instruction importance rate of the instruction of login in renewal table 1, and the corresponding data that login instructs is revised as instruction request number in the first preset time period that the tertiary gradient (instruction importance rate) is corresponding, danger classes and instruction acceptance simultaneously.
Fig. 2 show the schematic diagram of the system that realizes of the communication security according to presently preferred embodiments of the present invention offer.As in figure 2 it is shown, the system that realizes of the communication security of presently preferred embodiments of the present invention offer includes client 10 and Service Process Server 12.Client 10 connects Service Process Server 12.
In the present embodiment, Service Process Server 12, for receiving the different types of instruction request that client 10 sends, the number of the different types of instruction request received in obtaining the first preset time period.Service Process Server 12, for determining acceptance and the danger classes of command adapted thereto according to the number of different types of instruction request and the first control table of storage.Service Process Server 12, for according to the first control table and the number of different types of instruction request that obtains in the second preset time period, determine that command adapted thereto is in the number of times of default danger classes, and adjust the importance rate of command adapted thereto according to the second control table.About the specific operation process of described system with described in said method, therefore repeat no more in this.
In sum, according to the realization method and system of the communication security that present pre-ferred embodiments provides, Service Process Server determines acceptance and the danger classes of command adapted thereto according to the number of different types of instruction request and the first control table of storage.And, Service Process Server is according to the first control table and the number of different types of instruction request that obtains in the second preset time period, determine that command adapted thereto is in the number of times of default danger classes, and adjust the importance rate of command adapted thereto according to the second control table.So, by adjusting the importance rate of command adapted thereto, it is achieved the reasonable distribution of system resource.And, by the setting of danger classes, it is achieved the monitoring of assault and process.
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.All within the spirit and principles in the present invention, any modification, equivalent substitution and improvement etc. made, should be included within the scope of the present invention.