CN102981831B - The method reading underlying resource under cloud computing environment - Google Patents

The method reading underlying resource under cloud computing environment Download PDF

Info

Publication number
CN102981831B
CN102981831B CN201210433982.4A CN201210433982A CN102981831B CN 102981831 B CN102981831 B CN 102981831B CN 201210433982 A CN201210433982 A CN 201210433982A CN 102981831 B CN102981831 B CN 102981831B
Authority
CN
China
Prior art keywords
business object
attribute
type
peculiar
underlying resource
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
Application number
CN201210433982.4A
Other languages
Chinese (zh)
Other versions
CN102981831A (en
Inventor
李绍辉
孙国忠
樊兴军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shuguang Cloud Computing Group Co ltd
Original Assignee
SHUGUANG CLOUD COMPUTING TECHNOLOGY Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SHUGUANG CLOUD COMPUTING TECHNOLOGY Co Ltd filed Critical SHUGUANG CLOUD COMPUTING TECHNOLOGY Co Ltd
Priority to CN201210433982.4A priority Critical patent/CN102981831B/en
Publication of CN102981831A publication Critical patent/CN102981831A/en
Application granted granted Critical
Publication of CN102981831B publication Critical patent/CN102981831B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of method reading underlying resource under cloud computing environment, the method includes: be the total attribute in business object by the total Parameters Transformation in underlying resource;And be the particular attribute in business object by the peculiar Parameters Transformation in underlying resource.A kind of method increasing business object in cloud computing environment is provided by technical scheme described in the invention, the multiple business object solving multiple operation systems in cloud computing environment needs unification to store at underlying resource, and the problem needing on upper strata to use OO business object.Present invention achieves the conversion between underlying resource and upper-layer service object, shield the diversity of different business object.When business object occurs change, it is only necessary to amendment upper-layer service object self, without having influence on bottom storage and interface, it is ensured that system has good autgmentability.

Description

The method reading underlying resource under cloud computing environment
Technical field
The invention relates essentially to field of cloud calculation, more specifically for, relate to a kind of at cloud computing ring The method reading underlying resource under border.
Background technology
In the exploitation of cloud computing system, face multiple business object to be managed, including: Hypervisor, virtual machine, shared storage and network etc..According to OO development philosophy, cloud Every kind of business object is managed by calculating system respectively, every kind of business object have self attribute and Interface;And at system bottom, in order to provide autgmentability and motility well, need to shield multiple industry The diversity of business, carries out unifying storage and providing Uniform Access interface to storage;Therefore system extraction industry The common trait of business object, is resource by miscellaneous service object unified definition, and resource has identical depositing Storage structure, data structure and interface.So, existing for a problem, system upper-layer service is only concerned Business object self and operation, and it is unfamiliar with the structure of underlying resource, and underlying resource is indifferent to upper strata Business has which business object and operation actually, how to shield the upper-layer service operation to underlying resource, Make the two the most transparent, be industry problem demanding prompt solution.
Existing system great majority are to directly invoke resource management's interface at operation layer, such operation layer Developer is necessary for it is to be understood that the data structure of underlying resource and interface, these data structures often than More complicated, need to take some time to grasp;And work as the data structure of underlying resource and connect When mouth changes, directly affecting operation layer needs to revise code, brings test therewith etc. a series of Problem, adds the workload of operation layer.
Summary of the invention
For the defect of above-mentioned prior art, the present invention proposes a kind of increase industry in cloud computing environment The method of business object, solves the technical problem increasing business object under how cloud computing environment.
The invention provides a kind of tts resource object and the method for business object, the cloud computing related to is grasped Make system according to actual scene, divided 21 kinds of upper-layer service objects altogether, including physical resource subregion, Hypervisor, virtual machine, shared storage, IP, VLAN etc..Underlying resource is by different business pair Generating as extracting common denominator according to certain method, a resource can be divided into three parts: substantially believes Breath, configuration parameter information, incidence relation information.Essential information describes the predicable of business object, Such as title, type etc.;Configuration parameter information describes the particular attribute of business object, incidence relation information The incidence relation existed between business object and type thereof etc. are described.
System one business object base class of definition, the generic attribute in this base class is with resource essential information one by one Correspondence, all business objects are both needed to inherit this base class;System is respectively each business object definition one Individual business object class, the attribute of business object defined in class and interface, the attribute of business object except with Outside the attribute that resource configuration parameter information is corresponding, it is also possible to define other and need attribute to be processed;Base class It is provided which corresponding getter and setter method with the generic attribute corresponding with resource of business object class.
Underlying resource storage organization, data structure and the access interface that system definition is unified, essential information Store respectively with configuration parameter information, the data structure of each own correspondence, in interface realizes also It is respectively processed.
The present invention realizes, when storage, business object is converted into underlying resource, is provided by bottom when reading Source is converted into the function of business object, when conversion, it is contemplated that different operating (increase, revise) Data structure diversity, business object attribute data type and underlying resource data type diversity etc., Processed respectively.When business object occurs change, owing to the present invention is accomplished that the general end Layer resource and the transducer of business object, it is only necessary to change business object self, without to bottom Resource carries out any amendment, same when business object kind increases.
In cloud computing environment, business object is increased according to an aspect of the invention, it is provided a kind of Method, it is characterised in that including: the total attribute in the described business object that will be increased is converted to Total parameter in underlying resource;And the particular attribute conversion in the described business object that will be increased For the peculiar parameter in described underlying resource.
Preferably, the total attribute in the described business object that will be increased is converted in underlying resource Total parameter includes: at parameter object total defined in described underlying resource;By in described business object Described total attribute be arranged in described total parameter object;And by described total parameter object Content write described underlying resource data base in as described total parameter.
Preferably, the particular attribute in the described business object that will be increased is converted to described underlying resource In peculiar parameter include: at parameter list peculiar defined in described underlying resource;By described business pair Described particular attribute in as writes in described peculiar parameter list;And by described peculiar parameter list In content write described underlying resource data base in as described peculiar parameter.
Preferably, the described particular attribute in described business object is write in described peculiar parameter list Including: obtain the classification of described business object;The attribute of described business object is obtained according to described classification Array and formwork structure;And if judging in described attribute array according to described formwork structure One attribute is particular attribute, then write in described peculiar parameter list by the property value of described first attribute.
Preferably, the described particular attribute in described business object is write in described peculiar parameter list Also include: if judging that the first attribute in described attribute array is not special according to described formwork structure There is attribute, then judge whether the second attribute in described attribute array is particular attribute;And if root Judge that the second attribute in described attribute array is particular attribute, then by described according to described formwork structure The property value of the second attribute writes in described peculiar parameter list.
Preferably, judge that the first attribute in described attribute array is peculiar according to described formwork structure Attribute includes: obtain the Property Name of described first attribute;And the attribute according to described first attribute Title and described formwork structure judge that described first attribute is particular attribute.
Preferably, the property value of described first attribute is write described peculiar parameter list to include: root The reading method of described first attribute is obtained according to described classification;Described the is obtained by calling described reading method The property value of one attribute;Described property value is converted to String type;And by the institute through conversion State property value to write in described peculiar parameter list.
Preferably, the described property value through conversion is write described peculiar parameter list to include: Peculiar parameter object defined in described underlying resource;Described property value through conversion is arranged on described In peculiar parameter object;And the content in described peculiar parameter object is write described peculiar parameter row In table.
According to a further aspect in the invention, it is provided that a kind of revise business object under the cloud computing environment Method, it is characterised in that including: arrange according to the total attribute in the described business object revised Total parameter in underlying resource;And the particular attribute in the business object that will be revised is converted to the end Peculiar parameter in layer resource.
Preferably, arrange in underlying resource according to the total attribute in the described business object revised Total parameter includes: judge to deposit under described cloud computing environment according to unique mark of described business object In described business object;According to the total attribute in the described business object revised, described bottom is set Total parameter in resource.
Preferably, it is peculiar that the particular attribute in the business object will revised is converted in underlying resource Parameter includes: obtain the first peculiar parameter list from described underlying resource;By described first peculiar ginseng Ordered series of numbers table is converted to Map form;If the first attribute of the attribute array of the classification of described business object The first property value be present in described first peculiar parameter list, then take out described first peculiar parameter The peculiar parameter of correspondence in list, if described first property value is not present in described first peculiar parameter In list, then define and arrange corresponding peculiar parameter;Peculiar for described correspondence parameter is arranged to second special Have in parameter list;And the content in described second peculiar parameter list is write described underlying resource Data base in.
Preferably, arrange corresponding peculiar parameter to include: arrange unique mark of corresponding peculiar parameter, mould Plate, parameter value and modification time.
Preferably, it is peculiar that the particular attribute in the business object will revised is converted in underlying resource Parameter also includes: obtain the described classification of described business object;And obtain the described genus of described classification Property array.
Preferably, it is peculiar that the particular attribute in the business object will revised is converted in underlying resource Parameter also includes: obtain the first attribute in described attribute array;If the attribute of described first attribute Title corresponds to peculiar parameter, then obtain the reading method that described first attribute is corresponding;And call described Reading method obtains the first property value of described first attribute.
Preferably, it is peculiar that the particular attribute in the business object will revised is converted in underlying resource Parameter also includes: described first property value is converted to String form.
According to another aspect of the invention, it is provided that a kind of read underlying resource under the cloud computing environment Method, it is characterised in that including: be business object by the total Parameters Transformation in described underlying resource In total attribute;And be in described business object by the peculiar Parameters Transformation in described underlying resource Particular attribute.
Preferably, it is the total attribute in business object by the total Parameters Transformation in described underlying resource Including: obtain the general type example of described business object;And described common according in described underlying resource There is parameter that the total attribute of described general type example of described business object is set.
Preferably, it is peculiar in described business object by the peculiar Parameters Transformation in described underlying resource Parameter includes: obtain peculiar parameter list from described underlying resource;From described peculiar parameter list Obtain peculiar parameter name and peculiar parameter value;Described peculiar parameter value is converted to described business object The data type corresponding to particular attribute of classification;And by the particular attribute in described business object It is arranged via the peculiar parameter value of conversion.
Preferably, described peculiar parameter value is converted to the particular attribute institute of the classification of described business object Corresponding data type includes: obtain the data class of the classification of business object corresponding to described peculiar parameter Type;And described peculiar parameter value is converted to the data type corresponding to classification of described business object.
Preferably, the particular attribute in described business object is arranged via the peculiar parameter value of conversion Including: the classification of business object corresponding to described peculiar parameter is obtained according to described peculiar parameter name Write method;And call described write method, the particular attribute in described business object is arranged via The peculiar parameter value of conversion.
Preferably, the type of described peculiar parameter value includes String type.
Preferably, the data type corresponding to the classification of described business object include String type, Integer type, Long type, Float type, Boolean type, List type, Enum class Type or Date type.
Present invention achieves three conversion methods between underlying resource and business object, be respectively and increase Time business object to underlying resource conversion method, amendment time business object to the conversion side of underlying resource Method and underlying resource are to the conversion method of business object.Wherein, three conversion methods can individually be implemented, Or three conversion methods can be combined two-by-two, or be that three Combination of Methods become a method come Implement.
Provide one by technical scheme described in the invention to increase in cloud computing environment, revise The method of business object and the method for reading underlying resource, solve multiple business in cloud computing environment The multiple business object of system needs unified storage at underlying resource, and needs on upper strata to use towards right The problem of the business object of elephant.Wherein, present invention achieves between underlying resource and upper-layer service object Conversion, bottom storage and interface to upper-layer service system mask, upper-layer service have only to pay close attention to from Body business object, and use unified storage and interface at bottom, shield the difference of different business object The opposite sex.When business object occurs change, it is only necessary to amendment upper-layer service object self, without shadow Ring to bottom storage and interface, it is ensured that system has good autgmentability.
Accompanying drawing explanation
Accompanying drawing is for providing a further understanding of the present invention, and constitutes a part for description, with Embodiments of the invention are used for explaining the present invention together, are not intended that limitation of the present invention.At accompanying drawing In:
Fig. 1 is the method increasing business object according to an embodiment of the invention in cloud computing environment Overview flow chart;
Fig. 2 is the method increasing business object according to an embodiment of the invention in cloud computing environment Particular flow sheet;
Fig. 3 is the method increasing business object according to an embodiment of the invention in cloud computing environment The particular flow sheet of example;
Fig. 4 is the method revising business object according to an embodiment of the invention in cloud computing environment Overview flow chart;
Fig. 5 is the method revising business object according to an embodiment of the invention in cloud computing environment Flow chart;
Fig. 6 is the method revising business object according to an embodiment of the invention in cloud computing environment The particular flow sheet of example;
Fig. 7 is the method reading underlying resource according to an embodiment of the invention under cloud computing environment Overview flow chart;
Fig. 8 is the method reading underlying resource according to an embodiment of the invention under cloud computing environment Particular flow sheet;
Fig. 9 is the method reading underlying resource according to an embodiment of the invention under cloud computing environment The particular flow sheet of example.
Detailed description of the invention
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are illustrated, it will be appreciated that this place is retouched The preferred embodiment stated is merely to illustrate and explains the present invention, is not intended to limit the present invention.
Present invention achieves three conversion methods between underlying resource and business object, be respectively and increase Time business object to underlying resource conversion method, amendment time business object to the conversion side of underlying resource Method and underlying resource are to the conversion method of business object.Wherein, three conversion methods can individually be implemented, Or three conversion methods can be combined two-by-two, or be that three Combination of Methods become a method come Implement.
In technical scheme described in the invention, cloud computing system includes upper-layer service object and lower floor Underlying resource.Wherein, underlying resource can be divided into three parts: essential information (i.e. having parameter), Configuration parameter information (the most peculiar parameter) and incidence relation information (i.e. incidence relation parameter).Substantially Information describes the total attribute (such as title and type etc.) of business object;Configuration parameter information describes The particular attribute of business object, incidence relation information describe between business object exist incidence relation and Type etc..
When Fig. 1 to Fig. 3 describes increase, business object is to the conversion method of underlying resource.
Fig. 1 is the method increasing business object according to an embodiment of the invention in cloud computing environment Overview flow chart.In FIG:
Step S100: add business object on upper strata according to user's instruction, such as increase by is virtual Machine etc..Then, the total attribute in the business object that cloud computing system will be increased is converted to bottom Total parameter in resource.Wherein, this step specifically may comprise steps of: in underlying resource The total parameter object of definition;Total attribute in business object is arranged in total parameter object;With And the content in total parameter object is write in the data base of underlying resource as total parameter.
Step S102: the particular attribute in the business object that will be increased is converted to the spy in underlying resource There is parameter.Wherein, this step specifically may comprise steps of: in ginseng peculiar defined in underlying resource Ordered series of numbers table;Particular attribute in business object is write in peculiar parameter list;And by peculiar parameter As peculiar parameter in the data base of the content write underlying resource in list.
A kind of increase business in cloud computing environment is provided by the technical scheme described by the present embodiment The method of object, the multiple business object solving multiple operation systems in cloud computing environment provides at bottom Source needs unification to store, and the problem needing on upper strata to use OO business object.Wherein, Present invention achieves the conversion between underlying resource and upper-layer service object, to upper-layer service system mask Bottom storage and interface, upper-layer service has only to pay close attention to own service object, and uses system at bottom The storage of one and interface, shield the diversity of different business object.When there is change in business object, Have only to revise upper-layer service object self, without having influence on bottom storage and interface, it is ensured that be System has good autgmentability.
Fig. 2 is the method increasing business object according to an embodiment of the invention in cloud computing environment Particular flow sheet.In fig. 2:
Wherein, the total attribute during step S200 to step S204 is the business object that will be increased turns The concrete steps of the total parameter being changed in underlying resource;Step S206 to step S226 is to be increased Particular attribute in the business object added is converted to the concrete steps of the peculiar parameter in underlying resource.
Step S200: at parameter object total defined in underlying resource.
Step S202: the total attribute in business object is arranged in total parameter object.
Step S204: the content in total parameter object is write in the data base of underlying resource as altogether There is parameter.
Total attribute in above three step, the business object that will be newly increased has been arranged on the end In layer resource.
Step S206: at parameter list peculiar defined in underlying resource.
Step S208: obtain the classification of the business object increased.
Step S210: obtain attribute array and the formwork structure of business object according to classification.Wherein, industry The formwork structure of business object contains all particular attributes of the business object of the category.Thus, may be used To utilize this formwork structure to judge whether an attribute is particular attribute.
Step S212: obtain the Property Name of the first attribute.
Step S214: whether Property Name and formwork structure according to the first attribute judge the first attribute For particular attribute.
Wherein, if the first attribute judged in attribute array according to formwork structure is particular attribute, Then follow the steps below.If the first attribute judged in attribute array according to formwork structure is not special There is attribute, then judge whether the second attribute in attribute array is particular attribute.If tied according to template Structure judges that the second attribute in attribute array is particular attribute, then write by the property value of the second attribute In peculiar parameter list.
In other words, by judge the Property Name of each attribute of business object whether in formwork structure, Can interpolate that out whether this attribute is particular attribute, be only particular attribute when this attribute, just should The property value of attribute writes in peculiar parameter list.
Step S216: obtain the reading method of the first attribute according to classification.Due to different classes of attribute pair The reading/writing method answered is different, accordingly, it would be desirable to by the reading method obtaining the first attribute obtain this first First property value of attribute.
Step S218: obtain the first property value of the first attribute by calling reading method.
Step S220: this first property value is converted to String type.
Because the type string type of the configuration parameter value in resource, and the Attribute class of business object Type is the most varied, including String, Integer, Long, Float, Boolean, List, self-defined Various Enum types, Date etc., it is therefore desirable to the type carrying out configuration parameter value and property value turns Change.The present embodiment realizes other data type value are converted to String type.
Step S222: at parameter object peculiar defined in underlying resource.
Step S224: will be arranged in peculiar parameter object through the property value of conversion.
Step S226: the content in peculiar parameter object is write in peculiar parameter list.
Step S228: the content in peculiar parameter list is write in the data base of underlying resource as special There is parameter.
A kind of increase business in cloud computing environment is provided by the technical scheme described by the present embodiment The method of object, the multiple business object solving multiple operation systems in cloud computing environment provides at bottom Source needs unification to store, and the problem needing on upper strata to use OO business object.Wherein, Present invention achieves the conversion between underlying resource and upper-layer service object, to upper-layer service system mask Bottom storage and interface, upper-layer service has only to pay close attention to own service object, and uses system at bottom The storage of one and interface, shield the diversity of different business object.When there is change in business object, Have only to revise upper-layer service object self, without having influence on bottom storage and interface, it is ensured that be System has good autgmentability.
Hereinafter will specifically describe above-described embodiment by an example.
Fig. 3 is the method increasing business object according to an embodiment of the invention in cloud computing environment The particular flow sheet of example.In other words, Fig. 3 describe a kind of when increasing business object to bottom money Source converter.
Owing to the information of underlying resource is divided into essential information and configuration parameter information, the attribute of business object The data structure of the most corresponding both information, therefore conversion is divided into two steps, respectively: tissue In business object, the attribute of corresponding essential information is essential information structure;Endemic genus in organization business object Property is configuration parameter message structure.
Corresponding interface:
1) transformation service object is to resource essential information
private Resource Vo convertAddBOToResourceVo(T bo)
2) transformation service object is resource configuration parameter
private List<ParamDataVo>convertAddBOToParamData(T bo)
Flow process describes:
1) definition resource essential information object ResourceVo resVo, arranges every attribute of resVo Value is business object correspondence property value;
2) the Class object clazz of business object is obtained;
3) Field array fields of Class object is obtained;
4) configuration parameter template name and the Map structure of id of the resource type of business object are obtained mapParamTempl;
5) definition configuration parameter data list List<ParamDataVo>lsParamData;
6) traversal fields, to each of which item Field field:
A) title fieldName of field is obtained;
B) judge whether fieldName is configuration parameter, if it is, perform below step, Otherwise, next field is continued with;
C) reading method readMethod of field is obtained;
D) call readMethod and obtain value fieldValue of field;
E) calling data type converter, processing fieldValue is String type;
F) definition configuration parameter object ParamDataVo paramData;
G) property values such as the resource of paramData, configuration parameter template, value are organized;
H) paramData is added in lsParamData.
A kind of increase business pair in cloud computing environment is provided by the technical scheme described by this example The method of elephant, solves the multiple business object of multiple operation systems in cloud computing environment at underlying resource Unification is needed to store, and the problem needing on upper strata to use OO business object.Wherein, originally Invention achieves the conversion between underlying resource and upper-layer service object, to upper-layer service system mask Bottom storage and interface, upper-layer service has only to pay close attention to own service object, and uses unified at bottom Storage and interface, shield the diversity of different business object.When there is change in business object, Have only to revise upper-layer service object self, without having influence on bottom storage and interface, it is ensured that be System has good autgmentability.
When Fig. 4 to Fig. 6 describes amendment, business object is to the conversion method of underlying resource.
Fig. 4 is the method revising business object according to an embodiment of the invention in cloud computing environment Overview flow chart.In the diagram:
Step S400: being total in underlying resource is set according to the total attribute in the business object revised There is parameter.Wherein, this step can specifically include following steps: according to unique mark of business object Judge to exist under cloud computing environment business object, and according to having in the business object revised Attribute arranges the total parameter in underlying resource.
Step S402: the particular attribute in the business object that will be revised is converted to the spy in underlying resource There is parameter.Wherein, this step can specifically include following steps: obtains first from underlying resource special There is parameter list;First peculiar parameter list is converted to Map form;If the classification of business object First property value of the first attribute of attribute array be present in the first peculiar parameter list, then take out The peculiar parameter of correspondence in first peculiar parameter list, if to be not present in first peculiar for the first property value In parameter list, then define and arrange corresponding peculiar parameter;Corresponding peculiar parameter is arranged to second special Have in parameter list and the content in the second peculiar parameter list is write the data base of underlying resource In.Wherein, arrange corresponding peculiar parameter include but not limited to arrange corresponding peculiar parameter unique mark, Template, parameter value and modification time.
A kind of amendment business pair in cloud computing environment is provided by the technical scheme described by this example The method of elephant, solves the multiple business object of multiple operation systems in cloud computing environment at underlying resource Unification is needed to store, and the problem needing on upper strata to use OO business object.Wherein, originally Invention achieves the conversion between underlying resource and upper-layer service object, to upper-layer service system mask Bottom storage and interface, upper-layer service has only to pay close attention to own service object, and uses unified at bottom Storage and interface, shield the diversity of different business object.When there is change in business object, Have only to revise upper-layer service object self, without having influence on bottom storage and interface, it is ensured that be System has good autgmentability.
Fig. 5 is the method revising business object according to an embodiment of the invention in cloud computing environment Flow chart.In Figure 5:
Step S500: judge to there is business pair under cloud computing environment according to unique mark of business object As.
Step S502: being total in underlying resource is set according to the total attribute in the business object revised There is parameter.
Step S504: obtain the first peculiar parameter list from underlying resource.
Step S506: the first peculiar parameter list is converted to Map form.
Step S508: obtain the classification of business object.
Step S510: obtain the attribute array of classification.
Step S512: obtain the first attribute in attribute array.
Step S514: if the Property Name of the first attribute is corresponding to peculiar parameter, then obtain the first genus The reading method that property is corresponding.
Step S516: call reading method and obtain the first property value of the first attribute.
Step S518: the first property value is converted to String form.Because the configuration parameter in resource The type of value is String type, and the attribute type of business object is the most varied, including String, Integer, Long, Float, Boolean, List, self-defining various Enum types, Date etc., It is thus desirable to carry out the type conversion of configuration parameter value and property value.The present embodiment realizes other data Types value is converted to String type.
Step S520: if the first property value of the first attribute of the attribute array of the classification of business object It is present in the first peculiar parameter list, then takes out the peculiar parameter of correspondence in the first peculiar parameter list, If the first property value is not present in the first peculiar parameter list, then define and arrange corresponding peculiar ginseng Number.Wherein, arrange corresponding peculiar parameter include but not limited to arrange corresponding peculiar parameter unique mark, Template, parameter value and modification time.
Step S522: corresponding peculiar parameter is arranged in the second peculiar parameter list.
Step S524: the content in the second peculiar parameter list is write in the data base of underlying resource.
A kind of amendment business pair in cloud computing environment is provided by the technical scheme described by this example The method of elephant, solves the multiple business object of multiple operation systems in cloud computing environment at underlying resource Unification is needed to store, and the problem needing on upper strata to use OO business object.Wherein, originally Invention achieves the conversion between underlying resource and upper-layer service object, to upper-layer service system mask Bottom storage and interface, upper-layer service has only to pay close attention to own service object, and uses unified at bottom Storage and interface, shield the diversity of different business object.When there is change in business object, Have only to revise upper-layer service object self, without having influence on bottom storage and interface, it is ensured that be System has good autgmentability.
Fig. 6 is the method revising business object according to an embodiment of the invention in cloud computing environment The particular flow sheet of example.
It is that underlying resource step is similar with transformation service object when increasing operation, is also classified into two steps, Idiographic flow is the most different.
Corresponding interface:
1) during amendment, transformation service object is resource essential information
private ResourceVo convertUpdateBOToResourceVo(T bo)
2) during amendment, transformation service object is resource configuration parameter information
private List<ParamDataVo>convertUpdateBOToParamData(T bo)
Flow process describes:
1) uniquely identify according to business object get correspondence resource information resVo;
2) if resource information resVo exists, then arrange its value be corresponding business object every substantially Property value;
3) the existing configuration parameter data list List<ParamDataVo>lsParamData of resource is obtained;
4) lsParamData being converted into Map form mapParamData, the key of Map is for joining Putting parameter name, value is corresponding configuration parameter ParamData;
5) the Class object clazz of business object is obtained;
6) Field array fields of clazz is obtained;
7) configuration parameter template name corresponding to resource category and the Map structure of id composition are obtained mapParamTempl;
8) definition configuration parameter data list lsRetParamData;
9) to each Field field in field array fields:
A) field name fieldName of field is obtained;
If b) judging that field name fieldName is configuration parameter, then perform following step, Otherwise, next Field is continued with;
C) reading method readMethod corresponding to field is obtained;
D) call readMethod and obtain field field value fieldValue;
E) call data type converter, fieldValue is converted into String form;
F) judge whether fieldValue deposits in existing configuration parameter data mapParamData , if existed, then take out paramData;Otherwise, definition configuration parameter object ParamData ParamData, arranges the information such as the resource of paramData, template;
G) information such as the value of paramData, time are set;
H) above-mentioned configuration parameter paramData is added to above-mentioned configuration parameter data list In lsRetParamData.
A kind of amendment business pair in cloud computing environment is provided by the technical scheme described by this example The method of elephant, solves the multiple business object of multiple operation systems in cloud computing environment at underlying resource Unification is needed to store, and the problem needing on upper strata to use OO business object.Wherein, originally Invention achieves the conversion between underlying resource and upper-layer service object, to upper-layer service system mask Bottom storage and interface, upper-layer service has only to pay close attention to own service object, and uses unified at bottom Storage and interface, shield the diversity of different business object.When there is change in business object, Have only to revise upper-layer service object self, without having influence on bottom storage and interface, it is ensured that be System has good autgmentability.
Fig. 7 to Fig. 9 describes the underlying resource conversion method to business object.
Fig. 7 is the method reading underlying resource according to an embodiment of the invention under cloud computing environment Overview flow chart.In the figure 7:
Step S700: be the total attribute in business object by the total Parameters Transformation in underlying resource. This step can specifically include following steps: obtains the general type example of business object;And according to bottom Total parameter in resource arranges the total attribute of the general type example of business object.
Step S702: be the particular attribute in business object by the peculiar Parameters Transformation in underlying resource. This step can specifically include following steps: obtains peculiar parameter list from underlying resource;From peculiar Parameter list obtains peculiar parameter name and peculiar parameter value;Peculiar parameter value is converted to business pair Data type corresponding to the particular attribute of the classification of elephant;And the particular attribute in business object is set It is set to the peculiar parameter value through conversion.
Provide a kind of bottom that reads under cloud computing environment by the technical scheme described by this example to provide The method in source, solves the multiple business object of multiple operation systems in cloud computing environment at underlying resource Unification is needed to store, and the problem needing on upper strata to use OO business object.Wherein, originally Invention achieves the conversion between underlying resource and upper-layer service object, to upper-layer service system mask Bottom storage and interface, upper-layer service has only to pay close attention to own service object, and uses unified at bottom Storage and interface, shield the diversity of different business object.When there is change in business object, Have only to revise upper-layer service object self, without having influence on bottom storage and interface, it is ensured that be System has good autgmentability.
Fig. 8 is the method reading underlying resource according to an embodiment of the invention under cloud computing environment Particular flow sheet.In fig. 8:
Step S800: obtain the general type example of business object.Such as, the general type example of this business object It can be virtual machine etc..
Step S802: this general type example of business object is set according to the total parameter in underlying resource Total attribute.
Step S804: obtain peculiar parameter list from underlying resource.
Step S806: obtain peculiar parameter name and peculiar parameter value from peculiar parameter list.
Step S808: obtain the data type of the classification of business object corresponding to peculiar parameter.
Step S810: peculiar parameter value is converted to the data type corresponding to the classification of business object.
Because the type of the configuration parameter value in resource is mostly String type, and the genus of business object Property type the most varied, including String, Integer, Long, Float, Boolean, List, from The various Enum types of definition, Date etc., it is therefore desirable to carry out the class of configuration parameter value and property value Type is changed.In a specific embodiment, it is achieved String type is converted to other data types.
Step S812: obtain the classification of business object corresponding to peculiar parameter according to peculiar parameter name Write method.
Step S814: call write method, is arranged via conversion by the particular attribute in business object Peculiar parameter value.
Wherein, the type of above-mentioned peculiar parameter value includes but not limited to String type.Business object Data type corresponding to classification include but not limited to String type, Integer type, Long type, Float type, Boolean type, List type, Enum type or Date type.
Provide a kind of bottom that reads under cloud computing environment by the technical scheme described by this example to provide The method in source, solves the multiple business object of multiple operation systems in cloud computing environment at underlying resource Unification is needed to store, and the problem needing on upper strata to use OO business object.Wherein, originally Invention achieves the conversion between underlying resource and upper-layer service object, to upper-layer service system mask Bottom storage and interface, upper-layer service has only to pay close attention to own service object, and uses unified at bottom Storage and interface, shield the diversity of different business object.When there is change in business object, Have only to revise upper-layer service object self, without having influence on bottom storage and interface, it is ensured that be System has good autgmentability.
Fig. 9 is the method reading underlying resource according to an embodiment of the invention under cloud computing environment The particular flow sheet of example.
Corresponding interface:
1) tts resource essential information is business object essential information
Public T convertResourceVoToBO (ResourceVo resVo, Class<T>clazz)
2) tts resource configuration parameter information is business object information
Private T convertParamDataToBO (Long resId, T bo)
Flow process describes:
1) instantiation gives class, obtains business object example T resBase;
2) it is business object example resBase every basic information value that corresponding resource is set;
3) the configuration parameter data list List<ParamDataVo>lsParamData of resource is obtained;
4) each the ParamDataVo paramData to lsParamData:
A) configuration parameter title paramName and configuration parameter value paramValue are obtained;
B) according to paramName, writing of business object generic attribute corresponding to configuration parameter is obtained Method writeMethod;
C) data type Class of business object generic attribute corresponding to configuration parameter is obtained FieldType and typonym fieldTypeName;
D) call data type converter, the property value of String type is converted into business object The data type of corresponding generic attribute;
E) call writeMethod, configuration parameter value is arranged the business object attribute of correspondence Value.
Provide a kind of bottom that reads under cloud computing environment by the technical scheme described by this example to provide The method in source, solves the multiple business object of multiple operation systems in cloud computing environment at underlying resource Unification is needed to store, and the problem needing on upper strata to use OO business object.Wherein, originally Invention achieves the conversion between underlying resource and upper-layer service object, to upper-layer service system mask Bottom storage and interface, upper-layer service has only to pay close attention to own service object, and uses unified at bottom Storage and interface, shield the diversity of different business object.When there is change in business object, Have only to revise upper-layer service object self, without having influence on bottom storage and interface, it is ensured that be System has good autgmentability.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for For those skilled in the art, the present invention can have various modifications and variations.All essences in the present invention Within god and principle, any modification, equivalent substitution and improvement etc. made, should be included in the present invention Protection domain within.

Claims (1)

1. the method reading underlying resource under cloud computing environment, it is characterised in that including:
It is the total attribute in business object by the total Parameters Transformation in described underlying resource;And
It is the particular attribute in described business object by the peculiar Parameters Transformation in described underlying resource;
Wherein, it is the endemic genus in described business object by the peculiar Parameters Transformation in described underlying resource Property includes:
Peculiar parameter list is obtained from described underlying resource;
Peculiar parameter name and peculiar parameter value is obtained from described peculiar parameter list;
Number corresponding to the particular attribute of the classification that described peculiar parameter value is converted to described business object According to type;And
Particular attribute in described business object is arranged via the peculiar parameter value of conversion;
The peculiar parameter value that particular attribute in described business object is arranged via conversion includes:
The writing of classification of business object corresponding to described peculiar parameter is obtained according to described peculiar parameter name Method;And
Call described write method, the particular attribute in described business object is arranged via the spy of conversion There is parameter value;
Wherein, it is the total attribute bag in business object by the total Parameters Transformation in described underlying resource Include:
Obtain the general type example of described business object;And
The described general type arranging described business object according to the described total parameter in described underlying resource is real The total attribute of example;
Number corresponding to the particular attribute of the classification that described peculiar parameter value is converted to described business object Include according to type:
Obtain the data type of the classification of business object corresponding to described peculiar parameter;And
Described peculiar parameter value is converted to the data type corresponding to the classification of described business object;
The type of described peculiar parameter value includes String type;
Data type corresponding to the classification of described business object include String type, Integer type, Long type, Float type, Boolean type, List type, Enum type, Date type.
CN201210433982.4A 2012-11-02 2012-11-02 The method reading underlying resource under cloud computing environment Active CN102981831B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210433982.4A CN102981831B (en) 2012-11-02 2012-11-02 The method reading underlying resource under cloud computing environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210433982.4A CN102981831B (en) 2012-11-02 2012-11-02 The method reading underlying resource under cloud computing environment

Publications (2)

Publication Number Publication Date
CN102981831A CN102981831A (en) 2013-03-20
CN102981831B true CN102981831B (en) 2016-08-31

Family

ID=47855896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210433982.4A Active CN102981831B (en) 2012-11-02 2012-11-02 The method reading underlying resource under cloud computing environment

Country Status (1)

Country Link
CN (1) CN102981831B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10148527B2 (en) * 2014-12-05 2018-12-04 Accenture Global Services Limited Dynamic network component placement
CN108845791B (en) * 2018-05-31 2022-03-18 浪潮金融信息技术有限公司 Application program code development processing method and device, readable storage medium and terminal
CN108900386B (en) * 2018-08-10 2020-07-31 北京金山云网络技术有限公司 Method and device for generating alarm information and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1905727A (en) * 2006-08-16 2007-01-31 亿阳信通股份有限公司 Method for network managing resource message access
CN102646052A (en) * 2011-02-16 2012-08-22 中国移动通信集团公司 Virtual machine deployment method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101427220A (en) * 2004-01-30 2009-05-06 国际商业机器公司 Componentized automatic provisioning and management of computing environments for computing utilities

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1905727A (en) * 2006-08-16 2007-01-31 亿阳信通股份有限公司 Method for network managing resource message access
CN102646052A (en) * 2011-02-16 2012-08-22 中国移动通信集团公司 Virtual machine deployment method, device and system

Also Published As

Publication number Publication date
CN102981831A (en) 2013-03-20

Similar Documents

Publication Publication Date Title
US20170031663A1 (en) Method and Tool for Engineering Software Architectures with Its Various Software Artifacts of Complex Cyber-Physical Systems of Different Technical Domains
US20040044990A1 (en) Model-based composable code generation
Dörnemann et al. Grid workflow modelling using grid-specific BPEL extensions
Schaeffer Towards a transactional web processing service
CN102054224A (en) SOA (Service Oriented Architecture)-based clothes enterprise collaborative management system development method and system
CN102981831B (en) The method reading underlying resource under cloud computing environment
Li et al. A divide-and-conquer strategy to deadlock prevention in flexible manufacturing systems
CN114491065A (en) Multi-field digital twin body integration method based on cognitive cues and electronic equipment
Zhang Software Visualization: From Theory to Practice
Dahiya et al. Mobility Management in Green IoT
Binder et al. Enabling architecture based co-simulation of complex Smart Grid applications
CN113626128B (en) Audio-visual media micro-service third-party module access method, system and electronic equipment
CN101719059B (en) Method for manipulating objects in a soa registry
CN102984206B (en) The method increasing business object in cloud computing environment
Raut et al. Enterprise business process integration
CN102981832B (en) The method revising business object under cloud computing environment
Mahalik et al. A prototype for hardware-in-the-loop simulation of a distributed control architecture
JP2011159275A (en) Computer method and system for providing access to data of target system
US7987083B2 (en) Method for simulating a complex system with construction of at least one model including at least one modelled router, corresponding computer software package and storage means
Nyssen et al. Are aspects useful for managing variability in software product lines? A case study
Wan et al. A resource-centric architecture for service-oriented cyber physical system
Hassanain et al. Implementation of a distributed, model-based integrated asset management system
Fabra et al. BPEL2DENEB: translation of BPEL processes to executable high-level Petri nets
Gachet et al. A Jini‐based software framework for developing distributed cooperative decision support systems
Dietrich et al. Formal methods for communication services: meeting the industry expectations

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100193 Beijing, Haidian District, northeast Wang West Road, building 8, building 36, floor 5

Patentee after: Shuguang Cloud Computing Group Co.,Ltd.

Address before: 100193 Beijing, Haidian District, northeast Wang West Road, building 8, building 36, floor 5

Patentee before: DAWNING CLOUD COMPUTING TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder
CP03 Change of name, title or address

Address after: 100193 5 floor, 36 building, No. 8 Northeast Road, Haidian District, Beijing.

Patentee after: Shuguang Cloud Computing Group Co.,Ltd.

Country or region after: China

Address before: 100193 5 floor, 36 building, No. 8 Northeast Road, Haidian District, Beijing.

Patentee before: Shuguang Cloud Computing Group Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address