A kind of dynamic computing device
Technical field
The present invention relates to technical field of data processing more particularly to a kind of dynamic computing devices.
Background technology
With the development of science and technology, all trades and professions such as are required for computer to be stored, calculate at a series of operation, this requirement
Computer has powerful computing capability and processing processing capacity.Especially, cloud storage is as new fashion trend, it is often necessary to
Carry out a large amount of data storage and calculating.
In the prior art, by increasing the quantity of processor, increase the required processing capacity of cloud storage, although calculating effect
Rate increases, but calculates cost and increase.
Invention content
The purpose of the present invention is to provide a kind of Dynamic calculation method and its devices, for not increasing the same of calculating cost
When, improve the data-handling capacity of computer.
In order to achieve the above objectives, the present invention adopts the following technical scheme that:
The first aspect of the present invention provides a kind of Dynamic calculation method, which is characterized in that the Dynamic calculation method includes:
Step 1: estimating the required computing capability of cloud storage.
Step 2: according to the required computing capability estimated out, reconfigurable circuit is built.
Step 3: the reconfigurable circuit of structure is formed virtual processor.
Step 4: virtual processor is distributed to corresponding virtual machine.
Step 5: completing the calculating needed for cloud storage by virtual machine.
According to above-mentioned Dynamic calculation method, the required computing capability of cloud storage is estimated first, according to computer
Group and/or the existing computing capability of computer, are allocated processor from newly, to achieve the purpose that quickly to handle data,
Constantly increase processor in compared with the prior art, this programme not only calculates cost without increasing, and effectively carries
High computational efficiency.
The Dynamic calculation method further includes:Between step 1 and step 2, the quantity of idle logic circuit is counted.
In step 2, reconfigurable circuit includes n idle logic circuit, wherein n is positive integer;If n is equal to 1, select
Select any one logic circuit composition reconfigurable circuit being in idle condition;If n is more than 1, select physical address adjacent
Two or more logic circuit composition reconfigurable circuits being in idle condition.
N logic circuit for forming reconfigurable circuit is arranged to possession state.
Logic circuit is coprocessor circuit, fast Fourier transform circuit, surmounts function circuit, bus control unit electricity
Road, timer circuit or hardware algorithm build modular circuit.
In step 4, virtual processor is one-to-one relationship with virtual machine;Alternatively, multiple virtual processors correspond to one
A virtual machine.
Step 5 further includes, if mistake occurs in virtual machine calculating process, terminates the calculating process, and by the calculating process
The content of involved reconfigurable circuit is removed, and so that reconfigurable circuit is restored to idle state, and rebuild reconfigurable circuit.
The Dynamic calculation method further includes:Step 6: after calculating end or terminating, the content in reconfigurable circuit is clear
It removes, reconfigurable circuit is made to be restored to idle state.
The second aspect of the present invention provides a kind of dynamic computing device, which includes:Unit is estimated, is used for
Estimate the required computing capability of cloud storage;With the construction unit estimated unit and be connected, by according to estimate out it is required based on
Calculation ability builds reconfigurable circuit;The processing unit being connected with construction unit, the virtual processing of reconfigurable circuit composition for that will build
Device;The allocation unit being connected with processing unit, for virtual processor to be distributed to corresponding virtual machine.
The dynamic computing device further includes:With the statistic unit estimated unit and construction unit and be respectively connected with, for counting
N idle logic circuit is formed reconfigurable circuit, wherein n is positive integer by the quantity of logic circuit.
The dynamic computing device further includes:Clearing cell is used for after calculating end or terminating, will be in reconfigurable circuit
Content is removed, and reconfigurable circuit is made to be restored to idle state.
According to above-mentioned dynamic computing device, processor is allocated again, to achieve the purpose that quickly to handle data,
Constantly increase the solution of processor in compared with the prior art, this programme not only calculates cost, Er Qieyou without increasing
Improve computational efficiency to effect.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, embodiment will be described below
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some
Embodiment for those of ordinary skill in the art without creative efforts, can also be attached according to these
Figure obtains other attached drawings.
Fig. 1 is the flow chart of Dynamic calculation method in embodiment;
Fig. 2 is the structural schematic diagram of dynamic computing device in embodiment.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
Embodiment one
A kind of Dynamic calculation method is present embodiments provided, as shown in Figure 1, the Dynamic calculation method includes:
Step 1: estimating the required computing capability of cloud storage.
Step 2: according to the required computing capability estimated out, reconfigurable circuit is built.
Step 3: the reconfigurable circuit of structure is formed virtual processor.
Step 4: virtual processor is distributed to corresponding virtual machine.
Step 5: completing the calculating needed for cloud storage by virtual machine.
According to above-mentioned Dynamic calculation method, the required computing capability of cloud storage is estimated first, according to computer
Group and/or the existing computing capability of computer, are again allocated processor, to achieve the purpose that quickly to handle data,
Constantly increase the solution of processor in compared with the prior art, this programme not only calculates cost, Er Qieyou without increasing
Improve computational efficiency to effect.
In order to clearly illustrate Dynamic calculation method in the present embodiment, above-mentioned Dynamic calculation method is carried out below detailed
Description:
First, according to the main control unit in computer cluster and/or computer to needing to carry out the required meter of cloud storage
Calculation ability is estimated, and certainly, which includes all processors and port corresponding with all processors.
It is preferred in this example, by main control unit, any one idle processor or multiple idle processor compositions it is whole
Body needs the progress required computing capability of cloud storage to estimate to above-mentioned.
Then, according to the above-mentioned computing capability estimated, reconfigurable circuit is built, which can be logic circuit, show
Example property, it can be coprocessor circuit, fast Fourier transform circuit, surmount function circuit, bus control unit circuit, timer
Circuit or hardware algorithm build the combination of one or more of modular circuit.
Illustratively, the present embodiment can also count the quantity of idle logic circuit, and will before building reconfigurable circuit
Idle logic circuit forms reconfigurable circuit.Specifically, the Dynamic calculation method further includes:Between step 1 and step 2,
The quantity of idle logic circuit is counted, the computing capability needed for cloud storage counts the logic electricity needed for the computing capability
Road, and that idle logic circuit is formed into reconfigurable circuit, wherein n is positive integer.
Also, according to required computing capability, the quantity of n can be 1 or multiple, if specifically, when n is equal to 1, selection is appointed
The logic circuit composition reconfigurable circuit that meaning one is in idle condition;If n is more than 1, two that physical address is adjacent are selected
Or multiple logic circuit composition reconfigurable circuits being in idle condition.
In order to not be disturbed in data processing, n logic circuit for forming reconfigurable circuit can be arranged to occupy
State.Wherein, which can be coprocessor circuit, fast Fourier transform circuit, surmount function circuit, bus
Controller circuitry, timer circuit or hardware algorithm build modular circuit.
Further, the reconfigurable circuit built is formed into virtual processor, and virtual processor is distributed to relatively
The virtual machine answered.Calculating needed for cloud storage is completed by virtual machine.At this point, the correspondence of virtual processor and virtual machine can be
One-to-one relationship;Alternatively, the correspondence of virtual processor and virtual machine can be many-to-one relationship.Above-mentioned correspondence
Selection, mainly depend on the quantity with required computing capability and the virtual machine that can be called.If for example, in the calculating process
In, it can only be called there are one virtual machine, then the correspondence of above-mentioned virtual processor and virtual machine is then to a virtual processor
The corresponding same virtual machine.For another example in the calculating process, the virtual machine quantity that can be called is multiple, will can virtually be handled
The correspondence of device and virtual machine is to correspond, and is conducive to the processing speed for improving data in this way, to effectively improve number
According to processing capacity.
Certainly, in step 5, if mistake occurs in calculating process in virtual machine, the calculating process is terminated, and should
The content of reconfigurable circuit involved by calculating process is removed, and so that reconfigurable circuit is restored to idle state, and rebuild reconstruct
Circuit.If that is, in calculating process, there is mistake and be returned in step 2, rebuild reconfigurable circuit.To avoid
Malfunction due to calculating, caused by calculate overlong time, further increase computational efficiency, save and calculate time.
Alternatively, watchdog circuit can also be arranged on a virtual machine, if virtual machine does not export feeding-dog signal for a long time, terminate
Calculating process, and the content for the reconfigurable circuit being involved in is removed, and reconfigurable circuit is made to be restored to idle state, and rebuild weight
Structure circuit.
Illustratively, Dynamic calculation method further includes in this implementation:Step 6: after calculating end or terminating, will weigh
Content in structure circuit is removed, and reconfigurable circuit is made to be restored to idle state.To which the reconfigurable circuit occupied in calculating process be released
It puts, convenient for completing calculating next time.
Inevitably, in the present embodiment data processing complete after, be just stored in server or relative to memory in,
Illustratively, which can be flash storage, i.e., novel nonvolatile memory can be effectively prevented and count after a loss of power
According to loss, the access speed of data is fast.
Embodiment two
The present embodiment provides a kind of dynamic computing device, which is suitable for dynamic described in above-described embodiment one
State computational methods, as shown in Fig. 2, the dynamic computing device includes:
Unit 1 is estimated, for estimating the required computing capability of cloud storage;With the construction unit 2 estimated unit 1 and be connected,
For according to calculated required computing capability, building reconfigurable circuit;The processing unit 3 being connected with construction unit 2, being used for will
The reconfigurable circuit of structure forms virtual processor;The allocation unit 4 being connected with processing unit 3, for distributing virtual processor
To corresponding virtual machine.
The dynamic computing device may also include:Statistic unit with estimating unit 1 and construction unit 2 and being respectively connected with, is used for
N idle logic circuit is formed reconfigurable circuit, wherein n is positive integer by the quantity of statistic logic circuit.
Further, which connect with one or more virtual machines, these virtual machines are deposited for completing cloud
Calculating needed for storage, dynamic computing device are that these virtual machines distribute virtual processor.
Above-mentioned virtual machine can be computer cluster and/or computer.
In addition, the dynamic computing device may also include:Watchdog unit, the watchdog unit are made of watchdog chip,
The watchdog unit receives the regular and/or irregular feeding-dog signal that virtual processor is beamed back, if watchdog unit does not receive
Regular and/or irregular feeding-dog signal, then terminate calculating process;And the termination signal is sent to clearing cell, it removes single
After member receives the signal, the content of the reconfigurable circuit arrived involved in calculating process is removed, reconfigurable circuit is made to be restored to idle shape
State.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.