Summary of the invention
The invention provides a kind of method and system of automatic configuration parameter to solve the problem.
The invention provides a kind of method of automatic configuration parameter, comprise the following steps.After controller receiving system Disposition Instructions, send subsystem Disposition Instructions to distribution server, wherein, described subsystem Disposition Instructions carries company's relationship type information.Described distribution server, according to described subsystem Disposition Instructions, is inquired about the communication server corresponding to company's relationship type and whether is reached preset upper limit when predecessor company's number in the parameter configuration table that controller stores.If predecessor company's number worked as by the communication server that described company relationship type is corresponding reach preset upper limit, described distribution server calculates the comprehensive assessment value of other each communication server according to preset strategy, and selects the communication server that comprehensive assessment value is larger.Described distribution server sends to controller after obtaining the parameter information of the larger communication server of described comprehensive assessment value, the control terminal that described parameter information sends to web server corresponding by described controller, described web server obtains described parameter information by described control terminal.
The invention provides a kind of system of automatic configuration parameter, comprise controller, distribution server, control terminal, web server and at least one communication server, described controller connects described distribution server and control terminal respectively, described distribution server connects the described communication server, and described control terminal connects described web server.Described controller, after receiving system Disposition Instructions, send subsystem Disposition Instructions to distribution server, wherein, described subsystem Disposition Instructions carries company's relationship type information, described controller, also for storing described parameter configuration table.Described distribution server, for according to described subsystem Disposition Instructions, in the parameter configuration table that controller stores, inquire about the communication server corresponding to company's relationship type whether reach preset upper limit when predecessor company's number, if, described distribution server calculates the comprehensive assessment value of other each communication server according to preset strategy, and selects the communication server that comprehensive assessment value is larger.Described control terminal, the parameter information of the communication server selected for providing described distribution server to web server.Described web server, for obtaining the parameter information of the described communication server by described control terminal.
Compared to prior art, according to the method and system of automatic configuration parameter provided by the invention, after controller receiving system Disposition Instructions, send subsystem Disposition Instructions to distribution server, wherein, described subsystem Disposition Instructions carries company's relationship type information.Described distribution server, according to described subsystem Disposition Instructions, is inquired about the communication server corresponding to company's relationship type and whether is reached preset upper limit when predecessor company's number in the parameter configuration table that controller stores.Carry out system deployment by communication server load condition, can maximum resource utilization be reached.If predecessor company's number worked as by the communication server that described company relationship type is corresponding reach preset upper limit, described distribution server calculates the comprehensive assessment value of other each communication server according to preset strategy, and selects the communication server that comprehensive assessment value is larger.Described distribution server sends to controller after obtaining the parameter information of the larger communication server of described comprehensive assessment value, the control terminal that described parameter information sends to web server corresponding by described controller, described web server obtains described parameter information by described control terminal.So, thus improve communication efficiency between enterprise, achieve and configuration is optimized to communication server resource, ensure that the accuracy of parameter configuration simultaneously.
Embodiment
Hereinafter also describe the present invention in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Figure 1 shows that the flow chart of the method for the automatic configuration parameter that preferred embodiment according to the present invention provides.As shown in Figure 1, the method for automatic configuration parameter that preferred embodiment of the present invention provides comprises step 101 ~ 104.
Step 101: after controller receiving system Disposition Instructions, send subsystem Disposition Instructions to distribution server, wherein, described subsystem Disposition Instructions carries company's relationship type information.
Specifically, described system Disposition Instructions and subsystem Disposition Instructions include company's relationship type information.System manager processes when deployment company, according to treating deployment company and disposing company's relationship type information, sends to controller after company's relationship type information is added into system Disposition Instructions.In the present embodiment, described company relationship type information comprises parent company and branch company's relation, cooperative relationship and irrelevant, in other embodiments, can define described company relationship type separately, is not construed as limiting this present invention.
Wherein, treat deployment company and dispose company's relationship type information by treating that deployment company provides, also can be obtained by third party by system manager.
Step 102: described distribution server, according to described subsystem Disposition Instructions, is inquired about the communication server corresponding to company's relationship type and whether reached preset upper limit when predecessor company's number in the parameter configuration table that controller stores.
Specifically, described controller stored parameter allocation list, described parameter configuration table comprise communication server address, company's relationship type, importance degree coefficient, when predecessor company's number and preset upper limit.Parameter configuration tableau format is such as shown in table 1.
Table 1
Step 103: if the communication server corresponding to described company relationship type reaches preset upper limit when predecessor company's number, described distribution server calculates the comprehensive assessment value of other each communication server according to preset strategy, and selects the communication server that comprehensive assessment value is larger.
Specifically, described preset strategy is, and comprehensive assessment value=(1-importance degree coefficient) * (preset upper limit-when predecessor company's number).For example, according to table 1, if the company's relationship type comprised in the subsystem Disposition Instructions of distribution server reception is irrelevant, predecessor company's number of working as that described distribution server inquires about the corresponding communication server in Table 1 reaches preset upper limit.Distribution server respectively calculated address is communication server comprehensive assessment value=(1-0.8) * (23-10)=2.6 of 10.1.49.5, and address is communication server comprehensive assessment value=(1-0.5) * (36-30)=3 of 10.1.49.6.The address that described distribution server selects comprehensive assessment value larger is the communication server of 10.1.49.6.
The address that distribution server selects comprehensive assessment value larger is after the communication server of 10.1.49.6, sweep test instruction is sent to this communication server, after the communication server receives described sweep test instruction, to the instruction of distribution server feedback response, distribution server, according to described response instruction, determines that available communication port is 1888.Described distribution server sends to controller after obtaining the parameter information (comprising address 10.1.49.6 and communication port 1888) of this communication server, is handled accordingly by controller.
Simultaneously, the address that described distribution server selects comprehensive assessment value larger is after the communication server of 10.1.49.6, to treat that the address of deployment company and distribution is the communication server message notice controller of 10.1.49.6, controller, according to described notice, carries out the renewal of parameter configuration table.
Parameter configuration table after renewal, treat that deployment company (irrelevant) has been dispensed to the communication server that address is 10.1.49.6, now, address is that the communication server of 10.1.49.6 not only exists the company with cooperative relationship disposed, and also deploys unalliedly to treat deployment company.
If predecessor company's number worked as by the communication server that company's relationship type is corresponding do not reach preset upper limit, the parameter information of the communication server corresponding for described company relationship type is sent to controller by described distribution server, the control terminal that described parameter information sends to web server corresponding by described controller, described web server obtains described parameter information by described control terminal.
Step 104: described distribution server sends to controller after obtaining the parameter information of the larger communication server of described comprehensive assessment value, the control terminal that described parameter information sends to web server corresponding by described controller, described web server obtains described parameter information by described control terminal.
Specifically, described web server by the get parms mode of information of control terminal can be: parameter information is directly sent to web server after obtaining parameter information by described control terminal; Or described web server Request Control terminal sends, parameter information is sent to web server after receiving the request of web server transmission by control terminal, is stored by described web server; By control terminal, parameter information can also be saved in third party entity, and by the address information of third party entity notice web server, by web server according to described address information, read.
When user is by browser access web server, the described parameter information obtained is sent to described browser by described web server, described parameter information is cached to this locality by browser, when user accesses next time, without the need to asking Web server Transfer Parameters information, the communication server can be connected to by the parameter information of this locality buffer memory.
Figure 2 shows that the schematic diagram of the system of the automatic configuration parameter that preferred embodiment according to the present invention provides.As shown in Figure 2, the system of the automatic configuration parameter that preferred embodiment of the present invention provides comprises controller 201, distribution server 202, control terminal 203, web server 204 and at least one communication server 205, described controller 201 connects described distribution server 202 and control terminal 203 respectively, described distribution server 202 connects the described communication server 205, and described control terminal 203 connects described web server 204.Described controller 201, after receiving system Disposition Instructions, sends subsystem Disposition Instructions to distribution server 202, and wherein, described subsystem Disposition Instructions carries company's relationship type information, described controller 201, also for storing described parameter configuration table.Described distribution server 202, for according to described subsystem Disposition Instructions, whether in the parameter configuration table that controller 201 stores, inquire about the communication server corresponding to company's relationship type 205 when predecessor company's number reaches preset upper limit, if, described distribution server 202 calculates the comprehensive assessment value of other each communication server according to preset strategy, and selects the communication server that comprehensive assessment value is larger.Described control terminal 203, the parameter information of the communication server 205 selected for providing described distribution server 202 to web server 204.Described web server 204, for obtaining the parameter information of the described communication server 205 by described control terminal 203.About the operating process of said system with described in said method, therefore repeat no more in this.
In sum, according to the method and system of the automatic configuration parameter that present pre-ferred embodiments provides, after controller receiving system Disposition Instructions, send subsystem Disposition Instructions to distribution server, wherein, described subsystem Disposition Instructions carries company's relationship type information.Described distribution server, according to described subsystem Disposition Instructions, is inquired about the communication server corresponding to company's relationship type and whether is reached preset upper limit when predecessor company's number in the parameter configuration table that controller stores.Carry out system deployment by communication server load condition, can maximum resource utilization be reached.If predecessor company's number worked as by the communication server that described company relationship type is corresponding reach preset upper limit, described distribution server calculates the comprehensive assessment value of other each communication server according to preset strategy, and selects the communication server that comprehensive assessment value is larger.Described distribution server sends to controller after obtaining the parameter information of the larger communication server of described comprehensive assessment value, the control terminal that described parameter information sends to web server corresponding by described controller, described web server obtains described parameter information by described control terminal.So, thus improve communication efficiency between enterprise, achieve and configuration is optimized to communication server resource, ensure that the accuracy of parameter configuration simultaneously.
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 amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.