Summary of the invention
The object of the present invention is to provide control method, system, equipment and the storage medium of a kind of peripheral hardware of shared I O board, withHelp the modification that user successfully carries out outer setting parameter, and the information shown on each node is consistent, and is not broughtAmbiguity.
In order to solve the above technical problems, the invention provides the following technical scheme:
A kind of control method of the peripheral hardware of shared I O board, comprising:
Receive the modification instruction carried for the parameter modification information of target peripheral;
Judge whether itself is main controlled node;
If it is, after modifying by the parameter of the target peripheral according to the parameter modification information and store modificationParameter, and the parameter of the modified target peripheral is sent to each from control node, described saved from control so that eachThe parameter of the target peripheral of itself storage is replaced with the parameter received by point;
If it is not, then modification instruction is sent to the main controlled node, so that the main controlled node is described in the receptionAfter modification instruction, the parameter of the target peripheral is modified according to the parameter modification information and stores modified ginsengNumber, and the parameter of the modified target peripheral is sent to each from control node, make each described will from control nodeThe parameter of the target peripheral of itself storage replaces with the parameter received.
Preferably, the target peripheral is fan or hard disk.
Preferably, when the target peripheral is fan, the parameter of the target peripheral include the control model of fan withAnd the revolving speed of fan.
Preferably, the quantity from control node is 1.
Preferably, the reception carries the modification instruction for the parameter modification information of target peripheral, comprising:
The modification instruction carried for the parameter modification information of target peripheral is received by the end webpage Web.
It is preferably, described that modification instruction is sent to the main controlled node, comprising:
Modification instruction is sent in the plate grade information back-up structural body of itself, and passes through System Backplane for the plateModification instruction in grade information back-up structural body is sent to the main controlled node.
A kind of control system of the peripheral hardware of shared I O board, comprising:
Command reception module, for receiving the modification instruction carried for the parameter modification information of target peripheral;
Node judgment module, for judging whether itself is main controlled node, if it is, the first modified module of triggering, such asFruit is no, then triggers the second modified module;
First modified module, for the parameter of the target peripheral to be modified according to the parameter modification informationAnd store modified parameter, and by the parameter of the modified target peripheral be sent to it is each from control node so that respectivelyThe parameter of a target peripheral for storing itself from control node replaces with the parameter received;
Second modified module, for modification instruction to be sent to the main controlled node, so that the master control sectionThe parameter of the target peripheral is modified and is deposited according to the parameter modification information after receiving the modification instruction by pointIt stores up modified parameter, and the parameter of the modified target peripheral is sent to each from control node, make each describedThe parameter for the target peripheral for storing itself from control node replaces with the parameter received.
Preferably, second modified module, is specifically used for:
Modification instruction is sent in the plate grade information back-up structural body of itself, and passes through System Backplane for the plateModification instruction in grade information back-up structural body is sent to the main controlled node, so that the main controlled node is described in the receptionAfter modification instruction, the parameter of the target peripheral is modified according to the parameter modification information and stores modified ginsengNumber, and the parameter of the modified target peripheral is sent to each from control node, make each described will from control nodeThe parameter of the target peripheral of itself storage replaces with the parameter received.
A kind of control equipment of the peripheral hardware of shared I O board, comprising:
Memory, for storing peripheral hardware control program;
Processor, for executing the peripheral hardware control program with the control of the peripheral hardware of shared I O board described in any of the above embodimentsThe step of method.
A kind of computer readable storage medium is stored with computer program on the computer readable storage medium, describedThe step of control method of the peripheral hardware of shared I O board described in any of the above embodiments is realized when computer program is executed by processor.
Using technical solution provided by the embodiment of the present invention, comprising: receive the parameter carried for target peripheral and repairThe modification instruction for converting to breath, judges whether itself is main controlled node;If it is, according to parameter modification information by target peripheralParameter modifies and stores modified parameter, and the parameter of modified target peripheral is sent to and each is saved from controlPoint, so that the parameter of each target peripheral for storing itself from control node replaces with the parameter received;If it is not, then willModification instruction is sent to main controlled node, so that main controlled node is after receiving modification instruction, according to parameter modification information by targetThe parameter of peripheral hardware modifies and stores modified parameter, and by the parameter of modified target peripheral be sent to it is each fromNode is controlled, the parameter of each target peripheral for storing itself from control node is made to replace with the parameter received.
In the scheme of the application, the node for receiving modification instruction judges whether itself is main controlled node, if so, explanationIt itself can be allowed to carry out the parameter modification of target peripheral, just according to the parameter modification information in modification instruction by target peripheralParameter modify.After modification is completed, the parameter of modified target peripheral can be stored, and modified parameter is sent outIt send to each from control node, so that replacing the parameter of the target peripheral of itself storage after each node reception parameter from controlFor the parameter received, it is also achieved that the update of parameter in this way, that is, is directed to same peripheral hardware, the target peripheral that different nodes are shownParameter information it is all the same.
Correspondingly, if receive modification instruction node be not main controlled node but from control node when, from control node can willModification instruction is sent to main controlled node, and main controlled node modifies letter after receiving modification instruction, according to the parameter in modification instructionBreath modifies the parameter of target peripheral.That is, what no matter user logged in is main controlled node or from control node, to stepping onAfter the node of record sends modification instruction, main controlled node can directly or indirectly receive modification instruction.Therefore, originallyThe scheme of application, no matter user log in be main controlled node or from control node, user login node send modification instructionLater, main controlled node can complete the parameter modification to target peripheral, so that user's operation is simple.And it is each from control nodeParameter information will do it update, will not bring ambiguity to user, improve the experience sense of user.
Specific embodiment
Core of the invention is to provide a kind of control method of the peripheral hardware of shared I O board, facilitates user and successfully carries out outsideThe modification of setting parameter, and the information shown on each node is consistent, and does not bring ambiguity.
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawings and detailed descriptionThe present invention is described in further detail.Obviously, described embodiments are only a part of the embodiments of the present invention, rather thanWhole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premiseUnder every other embodiment obtained, shall fall within the protection scope of the present invention.
Referring to FIG. 2, Fig. 2 is a kind of implementation flow chart of the control method of the peripheral hardware of shared I O board in the present invention, the partyMethod the following steps are included:
Step S101: the modification instruction carried for the parameter modification information of target peripheral is received.
User can send modification instruction to node, specifically, user can log in the end Web of node, in the Web of nodeEnd modifies to the parameter of target peripheral, and node can receive the parameter that carry for target peripheral by the end Web and repairConvert to the modification instruction of breath.Since user is common mode, this kind of embodiment by the transmission that the end Web is instructedInterior joint receives modification instruction by the end Web, convenient for implementation of the invention.But it in other embodiments, can also be usedHis approach is modified the transmission of instruction, is instructed i.e. so that any node of shared I O board receives modification by corresponding approachCan, have no effect on implementation of the invention.
Target peripheral refers to the peripheral hardware of main controlled node and controlled nodes sharing IO on server, can be fan, firmlyDisk etc., correspondingly, the parameter modification information of parameter modification information namely corresponding peripheral hardware, such as the rotary speed information of fan, hard diskReading writing information, temperature information etc..And parameter involved in parameter modification information can be one, be also possible to multinomial, exampleAs in a kind of specific embodiment, when target peripheral is fan, the parameter of target peripheral may include the control model of fanAnd the multiple parameters such as revolving speed of fan.Control model is specifically as follows automatic control or manually controls, and revolving speed can be moreThe revolving speed of a rank.
Modification instructs specific format that can also be set according to actual needs, such as in specific embodiment, nodeThe modification instruction received is the message after encapsulation.
Node can execute the operation of step S102 after receiving modification instruction.
Step S102: judge whether itself is main controlled node.If so, thening follow the steps the operation of S103, otherwise executeThe operation of step S104.
The node for receiving modification instruction may be main controlled node, it is also possible to from control node, that is to say, that the application'sScheme, when user need to target peripheral carry out parameter modification when, no matter log in be main controlled node or from control node,To send the modification that modification instruction carries out parameter directly on the node of login.
S103: modifying the parameter of target peripheral according to parameter modification information and stores modified parameter, andBy the parameter of modified target peripheral be sent to it is each from control node so that it is each from control node by itself store targetThe parameter of peripheral hardware replaces with the parameter received.
When it is main controlled node that the node for receiving modification instruction, which judges itself, illustrate the peripheral hardware for itself having in I O boardControl.Therefore, just the parameter of target peripheral is modified according to the parameter modification information in modification instruction.Specifically, canTo parse to modification instruction, instruction type is obtained, modify object, and specific parameter modification information etc., be parsedLater, just the parameter of target peripheral is modified, such as calls the I/O interface of fan processing module, modified and believed according to parameterBreath, by relative parameters setting into fan control chip.
After main controlled node modifies the parameter of target peripheral, modified parameter can be also stored.It needs to illustrateIt is that the modified parameter of storage described herein refers to storing the parameters of target peripheral.
Meanwhile main controlled node the parameter of modified target peripheral can be sent to it is each from control node, it is each from control saveAfter point receives the parameter of target peripheral, the parameter of the target peripheral of itself storage is just replaced with into the parameter received, thisThe parameter information that sample allows for the target peripheral of each node storage is consistent.
In general, the quantity of the main controlled node in server is only 1, to avoid the conflict of control, and from control nodeQuantity can be set according to the actual situation, in a specific embodiment, it is contemplated that double four roads server it is extensiveAnd mature application, therefore from the quantity of control node can be 1.
S104: will modification instruction being sent to main controlled node so that main controlled node receive modification instruction after, according to parameterThe parameter of target peripheral is modified and stores modified parameter by modification information, and by the ginseng of modified target peripheralNumber is sent to each from control node, replaces with the parameter of each target peripheral for storing itself from control node and receivesParameter.
When the node for receiving modification instruction judges that itself is not main controlled node, just the modification received is instructed and is sent outIt send to main controlled node, for example, the data after parsing can be re-packaged into former modification instruction from control node, and adds and be sent toRelated data is sent to main controlled node by System Backplane by the message header of main controlled node.
Main controlled node receives the description that the operation executed after modification instruction is referred to step S103, that is, is receivingAfter being instructed from the modification that control node sends over, according to the parameter modification information in modification instruction, by the ginseng of target peripheralNumber is modified, while storing modified parameter.Also, the parameter of modified target peripheral can be sent to by main controlled nodeIt is each from control node, it is each that the parameter of target peripheral that itself is stored is replaced with into the parameter received from control node, completeThe synchronization of the parameter information of the target peripheral of each node storage.
Using method provided by the embodiment of the present invention, comprising: receive the parameter modification letter carried for target peripheralThe modification of breath instructs, and judges whether itself is main controlled node;If it is, according to parameter modification information by the parameter of target peripheralModify and store modified parameter, and the parameter of modified target peripheral is sent to it is each from control node, withThe parameter of each target peripheral for storing itself from control node is set to replace with the parameter received;If it is not, then will modificationInstruction is sent to main controlled node, so that main controlled node is after receiving modification instruction, according to parameter modification information by target peripheralParameter modify and store modified parameter, and the parameter of modified target peripheral is sent to and each is saved from controlPoint makes the parameter of each target peripheral for storing itself from control node replace with the parameter received.
In the scheme of the application, the node for receiving modification instruction judges whether itself is main controlled node, if so, explanationIt itself can be allowed to carry out the parameter modification of target peripheral, just according to the parameter modification information in modification instruction by target peripheralParameter modify.After modification is completed, the parameter of modified target peripheral can be stored, and modified parameter is sent outIt send to each from control node, so that replacing the parameter of the target peripheral of itself storage after each node reception parameter from controlFor the parameter received, it is also achieved that the update of parameter in this way, that is, is directed to same peripheral hardware, the target peripheral that different nodes are shownParameter information it is all the same.
Correspondingly, if receive modification instruction node be not main controlled node but from control node when, from control node can willModification instruction is sent to main controlled node, and main controlled node modifies letter after receiving modification instruction, according to the parameter in modification instructionBreath modifies the parameter of target peripheral.That is, what no matter user logged in is main controlled node or from control node, to stepping onAfter the node of record sends modification instruction, main controlled node can directly or indirectly receive modification instruction.Therefore, originallyThe scheme of application, no matter user log in be main controlled node or from control node, user login node send modification instructionLater, main controlled node can complete the parameter modification to target peripheral, so that user's operation is simple.And it is each from control nodeParameter information will do it update, will not bring ambiguity to user, improve the experience sense of user.
In a kind of specific embodiment of the invention, modification instruction is sent to main controlled node in step S104, is wrappedIt includes:
Modification instruction is sent in the plate grade information back-up structural body of itself, and by System Backplane that plate grade information is standbyModification instruction in part structural body is sent to main controlled node.
Since data protocol may be different between different nodes, in this kind of specific embodiment, when from control nodeWhen needing to send modification instruction to main controlled node, modification instruction can be sent in the plate grade information back-up structural body of itself,The modification instruction received is just carried out data transmission the modification of format, the i.e. modification of agreement by the plate grade information back-up structural body.Specifically, identifiable agreement in System Backplane would generally be revised as, later, the plate grade information back-up structural body of main controlled node is justThe modification instruction that have passed through protocol modification can be received from System Backplane, and by the plate grade information back-up structural body of main controlled nodeFurther progress protocol modification, the related data after allowing to carry out protocol modification can be identified by main controlled node.Certainly, main controlled nodeWith it is each from control node between other data transmit, can also be based on plate grade information back-up structural body, such as main controlled node toThe modified parameters of each target peripheral sent from control node.
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of control systems of the peripheral hardware of shared I O boardThe control method of system, the control system of the peripheral hardware of shared I O board described below and the peripheral hardware of above-described shared I O board can phaseMutually to should refer to.
It is shown in Figure 3, for a kind of structural schematic diagram of the control system of the peripheral hardware of shared I O board in the present invention, comprising:
Command reception module 201, for receiving the modification instruction carried for the parameter modification information of target peripheral;
Node judgment module 202, for judging whether itself is main controlled node, if it is, the first modified module of triggering203, if it is not, then the second modified module 204 of triggering;
First modified module 203, is repaired for the parameter of target peripheral to be modified and stored according to parameter modification informationParameter after changing, and by the parameter of modified target peripheral be sent to it is each from control node so that it is each from control node it is equalThe parameter of the target peripheral of itself storage is replaced with into the parameter received;
Second modified module 204 is sent to main controlled node for that will modify instruction, so that main controlled node refers in reception modificationAfter order, the parameter of target peripheral is modified according to parameter modification information and stores modified parameter, and will modificationThe parameter of target peripheral afterwards be sent to it is each from control node, make it is each from control node by itself store target peripheral ginsengNumber replaces with the parameter received.
In a kind of specific embodiment of the invention, target peripheral is fan or hard disk.
In a kind of specific embodiment of the invention, when target peripheral is fan, the parameter of target peripheral includes windThe control model of fan and the revolving speed of fan.
In a kind of specific embodiment of the invention, the quantity from control node is 1.
In a kind of specific embodiment of the invention, command reception module 201 is specifically used for:
The modification instruction carried for the parameter modification information of target peripheral is received by the end webpage Web.
In a kind of specific embodiment of the invention, the second modified module 204 is specifically used for:
Modification instruction is sent in the plate grade information back-up structural body of itself, and by System Backplane that plate grade information is standbyModification instruction in part structural body is sent to main controlled node, so that main controlled node is repaired after receiving modification instruction according to parameterIt converts to breath the parameter of target peripheral is modified and stores modified parameter, and by the parameter of modified target peripheralIt is sent to each from control node, makes each the parameter of target peripheral that itself is stored to be replaced with the ginseng received from control nodeNumber.
Corresponding to above method and system embodiment, the embodiment of the invention also provides a kind of peripheral hardwares of shared I O boardControl equipment and a kind of computer readable storage medium.
It is shown in Figure 4, for a kind of structural schematic diagram of the control equipment of the peripheral hardware of shared I O board in the present invention, comprising:
Memory 301, for storing peripheral hardware control program;
Processor 302, for executing peripheral hardware control program to realize the peripheral hardware of the shared I O board in any of the above-described embodimentControl method the step of.
It is stored with computer program on the computer readable storage medium, is realized when computer program is executed by processorThe step of stating the control method of the peripheral hardware of the shared I O board in any embodiment.Computer readable storage medium packet mentioned hereInclude random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable ROM, register,Any other form of storage medium well known in hard disk, moveable magnetic disc, CD-ROM or technical field.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to oneEntity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operationThere are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to containLid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including thoseElement, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipmentIntrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded thatThere is also other identical elements in process, method, article or equipment including the element.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosureAnd algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware andThe interchangeability of software generally describes each exemplary composition and step according to function in the above description.TheseFunction is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.ProfessionTechnical staff can use different methods to achieve the described function each specific application, but this realization is not answeredThink beyond the scope of this invention.
Used herein a specific example illustrates the principle and implementation of the invention, and above embodiments are saidIt is bright to be merely used to help understand technical solution of the present invention and its core concept.It should be pointed out that for the common of the art, without departing from the principle of the present invention, can be with several improvements and modifications are made to the present invention for technical staff, theseImprovement and modification are also fallen within the protection scope of the claims of the present invention.