CN111240637B - Formula calculation method and system under cloud management platform - Google Patents
Formula calculation method and system under cloud management platform Download PDFInfo
- Publication number
- CN111240637B CN111240637B CN202010095391.5A CN202010095391A CN111240637B CN 111240637 B CN111240637 B CN 111240637B CN 202010095391 A CN202010095391 A CN 202010095391A CN 111240637 B CN111240637 B CN 111240637B
- Authority
- CN
- China
- Prior art keywords
- calculation
- formula
- parameters
- handler
- type
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004364 calculation method Methods 0.000 title claims abstract description 170
- 238000000034 method Methods 0.000 claims abstract description 36
- 238000007781 pre-processing Methods 0.000 claims description 7
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 230000000694 effects Effects 0.000 description 3
- 238000001914 filtration Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005111 flow chemistry technique Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
- G06F7/57—Arithmetic logic units [ALU], i.e. arrangements or devices for performing two or more of the operations covered by groups G06F7/483 – G06F7/556 or for performing logical operations
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computational Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a formula calculation method and a formula calculation system under a cloud management platform, wherein the method comprises the steps of obtaining all calculation parameters required by a current calculation result; judging a calculation type according to the calculation parameters, loading handlers corresponding to the calculation type, and loading a calculation formula corresponding to each handler; and substituting the calculation parameters into the calculation formula for calculation, and collecting and combining calculation results. The processor is utilized to establish the corresponding relation between the calculation type and the calculation formula, the corresponding formula is loaded according to the obtained calculation parameters for calculation, the calculation processes are put together, meanwhile, a uniform data processing process is provided, the calculation efficiency is effectively improved, and the reusability of the calculation process is increased.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a formula calculation method and system under a cloud management platform.
Background
In a cloud computing management platform, various data, such as resource utilization rate, system overall health degree and the like, need to be displayed for a user, results of various formula calculations are behind each data, when the displayed data is only one single data, the data is simple, only parameters need to be substituted into the formula for calculation, and when the data to be displayed is obtained after multiple resources and a plurality of calculation formulas are summarized, the data to be displayed is complex.
For example, when the health degree of the system needs to be calculated, if the health degree of the system consists of network health degree plus storage health degree plus calculation health degree, and the proportion is respectively 30%, 30% and 40%, the health degree needs to be calculated by processing parameters and then respectively substituting the parameters into the working hours of a network module, a storage module and a calculation module; type conversion, rounding of results, and the like are also carried out in the whole process.
The existing method is obtained by calculating and summarizing layer by layer, if displayed data are diversified, the calculation process is numerous and complicated and is difficult to operate and maintain, even part of the same calculation process is difficult to multiplex, and a lot of redundancy exists in the following process; therefore, all formula calculations are required to be solved in the calculation system or process of the system.
Disclosure of Invention
The invention provides a formula calculation method and system under a cloud management platform, which are used for solving the problems of complex calculation process and large amount of redundancy caused by the existing calculation process.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention provides a formula calculation method under a cloud management platform in a first aspect, which comprises the following steps:
acquiring a calculation parameter;
judging a calculation type according to the calculation parameters, loading handlers corresponding to the calculation type, and loading a calculation formula corresponding to each handler;
and substituting the calculation parameters into the calculation formula for calculation, and outputting a calculation result.
Further, before the determining the calculation type, the method further includes:
and preprocessing the calculation parameters.
Further, the preprocessing includes calculation precision processing and unit conversion processing of calculation parameters.
Further, the calculation type and the handler form a key-value pair, and the calculation type is a key value and the handler is a value.
Further, the substituting the calculation parameter into the calculation formula for calculation specifically includes:
sequentially substituting the calculation parameters into a formula chain corresponding to a handler for calculation, and collecting a current calculation result;
and repeating the steps until all the calculation parameters are calculated, and combining the collected calculation results.
The invention provides a formula computing system under a cloud management platform in a second aspect, which comprises:
the actuator is used for acquiring calculation parameters and starting calculation;
the processor is used for judging a calculation type according to the calculation parameters, loading handlers corresponding to the calculation type and loading a calculation formula corresponding to each handler; and substituting the calculation parameters into the calculation formula for calculation, and outputting a calculation result.
Further, the system also comprises a filter, and the filter preprocesses the calculation parameters according to calculation rules.
Further, the calculation rules exist in a chain structure.
The effect provided in the summary of the invention is only the effect of the embodiment, not all the effects of the invention, and one of the above technical solutions has the following advantages or beneficial effects:
1. the embodiment of the invention establishes the corresponding relation between the calculation type and the calculation formula by using the processor, loads the corresponding formula for calculation according to the acquired calculation parameters, places the calculation processes together, and provides a uniform data processing process, thereby effectively improving the calculation efficiency and increasing the reusability of the calculation process.
2. The obtained calculation parameters are preprocessed before the operation of the processor, so that the calculation process is simplified, the calculation efficiency is further improved, and the individualized requirements of different parameters or calculation results are met.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of example 1 of the process of the present invention;
FIG. 2 is a schematic flow chart of example 2 of the method of the present invention;
fig. 3 is a schematic diagram of the system of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
As shown in fig. 1, the formula calculation method under the cloud management platform of the present invention includes the following steps:
s1, acquiring all calculation parameters required by a current calculation result;
s2, judging the calculation type according to the calculation parameters, loading handlers corresponding to the calculation type, and loading a calculation formula corresponding to each handler;
and S3, substituting the calculation parameters into the calculation formula for calculation, and collecting and combining calculation results.
In step S1, all calculation parameters required for calculating the current result are passed into the executor (processor) and the calculation process is started.
In the step S2, the calculation type and the handler form a key value pair, the calculation type is a key value, and the handler is a value; for example, storage- > StorageHandler. And putting a formula chain into a specific handler, wherein the formula chain comprises a storage pool health degree formula > a storage domain health degree formula- > a virtual disk health degree formula, for example, the storage module health degree is taken as an example.
In the step S3, the calculation parameters are sequentially substituted into a formula chain corresponding to the handler for calculation, and the current calculation result is collected; and combining the collected calculation results until all the calculation parameters are calculated. For different results, the specific combination manner is determined by the calculation type, and the combination manner may be different, such as in the above calculation of health degree, the combination is obtained by adding the health degrees of the three modules of network, calculation and storage.
As shown in fig. 2, the method further includes the following steps before step S2:
and S12, preprocessing the calculation parameters.
The preprocessing includes calculation precision processing, unit conversion processing of calculation parameters, and the like. The addition of the step can preprocess the calculation process according to the requirement, simplify the calculation process, further improve the calculation efficiency and meet the individual requirements of different parameters or calculation results.
As shown in fig. 3, the formula computing system under the cloud management platform of the present invention includes an executor (executor) 1, a processor (filter) 2, and a filter (handler) 3.
Creating an executor class, creating an executor, wherein the executor class comprises two member variables: the filter class and the handler class, the executor is a driving class of the whole computing process and is responsible for scheduling the computing task. And acquiring all calculation parameters required by the current calculation result through an actuator, and starting calculation.
Newly-built filter class, establish the filter, filter class loading calculation parameter carries out the preliminary treatment to calculation parameter, and the concrete filtering rule that contains exists with the chain structure in the filter, and the current filtering rule carries out the completion back and carries out next filtering rule automatically, also can contain empty filter in the filter class, does not carry out any processing promptly to calculation parameter.
Creating a new handler class, creating a processor, using the new handler class as an idiom class of the executor, wherein the handler has an object with a map structure, and the calculation type is used as a key value, and the specific type of handler is used as a value, for example, storage- > StorageHandler. The processor judges the calculation type according to the calculation parameters, loads the handlers corresponding to the calculation type and loads the calculation formula corresponding to each handler; substituting the calculation parameters into a calculation formula for calculation, and collecting and combining calculation results.
The system of the embodiment uses an exectue method in an executor as an entry, when the method is performed, the calculation parameters are transmitted into the executor to be executed, each filter (optional) preprocessing is performed on the calculation parameters, after the processing is completed, the parameters are loaded into a handler, and the calculation type of the parameters is judged according to the parameters, for example, the calculation type is storage, so that the storage handler can be loaded.
By using the system of the embodiment, all formula calculation processes can be classified into a set of unified flow processing under the cloud platform, so that the calculation processes can be simplified, the calculation processes can be modified conveniently according to requirements, and the reusability of formula calculation is increased.
And the process of computing can be preprocessed by adding the fliter according to the requirement, and the filer supports multiplexing. Different formulas can be loaded according to different handlers, and each formula can be reused and can be put into different handlers.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive changes in the technical solutions of the present invention.
Claims (7)
1. A formula calculation method under a cloud management platform is characterized by comprising the following steps:
acquiring a calculation parameter;
judging a calculation type according to the calculation parameters, loading handlers corresponding to the calculation type, and loading a calculation formula corresponding to each handler;
substituting the calculation parameters into the calculation formula for calculation, and outputting a calculation result;
and the calculation type and the handler form a key value pair, the calculation type is a key value, and the handler is a value.
2. The method for calculating the formula under the cloud management platform according to claim 1, wherein before the step of judging the calculation type, the method further comprises the following steps:
and preprocessing the calculation parameters.
3. The method for calculating the formula under the cloud management platform according to claim 2, wherein the preprocessing includes processing of calculation precision and processing of unit conversion of calculation parameters.
4. The method for calculating the formula under the cloud management platform according to claim 1, wherein the step of substituting the calculation parameters into the calculation formula is specifically as follows:
sequentially substituting the calculation parameters into a formula chain corresponding to a handler for calculation, and collecting a current calculation result;
and repeating the steps until all the calculation parameters are calculated, and combining the collected calculation results.
5. A formula computing system under a cloud management platform is characterized by comprising:
the actuator is used for acquiring calculation parameters and starting calculation;
the processor is used for judging a calculation type according to the calculation parameters, loading handlers corresponding to the calculation type and loading a calculation formula corresponding to each handler; substituting the calculation parameters into the calculation formula for calculation, and outputting a calculation result; and the calculation type and the handler form a key value pair, the calculation type is a key value, and the handler is a value.
6. The system for formula computation under the cloud management platform of claim 5, wherein the system further comprises a filter, and the filter preprocesses the computation parameters according to computation rules.
7. The formula computing system under the cloud management platform of claim 6, wherein the computing rules exist in a chain structure.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010095391.5A CN111240637B (en) | 2020-02-16 | 2020-02-16 | Formula calculation method and system under cloud management platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010095391.5A CN111240637B (en) | 2020-02-16 | 2020-02-16 | Formula calculation method and system under cloud management platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111240637A CN111240637A (en) | 2020-06-05 |
CN111240637B true CN111240637B (en) | 2023-01-10 |
Family
ID=70876422
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010095391.5A Active CN111240637B (en) | 2020-02-16 | 2020-02-16 | Formula calculation method and system under cloud management platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111240637B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102456013A (en) * | 2010-10-20 | 2012-05-16 | 金蝶软件(中国)有限公司 | Processing method and device for computational formula in data table |
CN108595268A (en) * | 2018-04-24 | 2018-09-28 | 咪咕文化科技有限公司 | Data distribution method and device based on MapReduce and computer-readable storage medium |
CN110132345A (en) * | 2018-02-02 | 2019-08-16 | 亚德诺半导体无限责任公司 | Measuring system |
-
2020
- 2020-02-16 CN CN202010095391.5A patent/CN111240637B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102456013A (en) * | 2010-10-20 | 2012-05-16 | 金蝶软件(中国)有限公司 | Processing method and device for computational formula in data table |
CN110132345A (en) * | 2018-02-02 | 2019-08-16 | 亚德诺半导体无限责任公司 | Measuring system |
CN108595268A (en) * | 2018-04-24 | 2018-09-28 | 咪咕文化科技有限公司 | Data distribution method and device based on MapReduce and computer-readable storage medium |
Non-Patent Citations (1)
Title |
---|
云计算平台在海上大数据挖掘模式中的应用研究;徐丽等;《舰船科学技术》;20160323(第06期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111240637A (en) | 2020-06-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105022670B (en) | Heterogeneous distributed task processing system and its processing method in a kind of cloud computing platform | |
CN115150471B (en) | Data processing method, apparatus, device, storage medium, and program product | |
CN108021509B (en) | Test case dynamic sequencing method based on program behavior network aggregation | |
CN103034534A (en) | Electric power system analysis parallel computing method and system based on grid computation | |
CN105468756A (en) | Design and implementation method of mass data processing system | |
CN111240637B (en) | Formula calculation method and system under cloud management platform | |
CN111158800A (en) | Method and device for constructing task DAG based on mapping relation | |
CN107153679B (en) | Extraction statistical method and system for semi-structured big data | |
CN110334001A (en) | A kind of method and apparatus that batch automatically generates echo test | |
CN112086178A (en) | Medical care automatic scheduling method and device, computer readable storage medium and equipment | |
WO2023241030A1 (en) | Picking task execution method and apparatus, electronic device and computer readable medium | |
CN116820500A (en) | Cluster mirror image deployment method, device, equipment and storage medium | |
CN110879753A (en) | GPU acceleration performance optimization method and system based on automatic cluster resource management | |
CN110868330B (en) | Evaluation method, device and evaluation system for CPU resources which can be divided by cloud platform | |
CN115495151A (en) | Rule engine migration method, device, equipment, storage medium and program product | |
CN115391069A (en) | Parallel communication method and system based on ocean mode ROMS | |
CN115016890A (en) | Virtual machine resource allocation method and device, electronic equipment and storage medium | |
CN114860851A (en) | Data processing method, device, equipment and storage medium | |
CN115292072A (en) | Visual business flow arrangement method, device and storage medium | |
CN115543345A (en) | Distributed computing system for power time sequence data and implementation method thereof | |
CN112148475B (en) | Loongson big data integrated machine task scheduling method and system integrating load and power consumption | |
CN113672472A (en) | Disk monitoring method and device | |
CN117435367B (en) | User behavior processing method, device, equipment, storage medium and program product | |
CN111399826B (en) | Visual dragging flow diagram ETL online data exchange method and system | |
CN113920717B (en) | Information processing method, device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |