Background technology
Title (especially in distributed system) in all computer systems plays an important role.They be used for shared resource, unique identification entity, point to position etc.Resolve title, need to realize naming system.
Naming system is usually paid close attention to two types of problems: promptly 1) tissue and the realization of user-friendly title, the URI title and the file system of typical example such as World Wide Web (WWW); 2) how title realizes locating them with the irrelevant mode of entity current location.
Common resource naming method mainly contains random identifier method, layered approach.
The random identifier method is following:
Under many circumstances, identifier is a character string at random.An important attribute of this naming method is that it does not comprise any relevant information of how to locate the accessing points of its related entities.Under some occasion, this title can be worked well, and because its easy naming method often is used.The exemplary of this naming method is the access of various machines in the local area network (LAN); Position determining entity is a very simple thing in this environment: the message that comprises the used identifier of this entity can be broadcast on each machine; Whether every machine has this entity through checking, has only for this entity provides the machine of accessing points and just can send the answer message that contains the accessing points address.Along with the expansion of network, broadcasting begins the poor efficiency that becomes.A kind of possible solution is to convert multicast to, through using multicast, has only qualified one group of main frame just can receive request.
Layered approach is following:
In minute layered scheme, the network that named entity is formed is divided into one group of territory.A TLD that covers whole network is arranged.Each territory can further be divided into a plurality of littler subdomains again.Each territory all has related directory node.Node can be followed the tracks of the entity in the territory, has so just formed a directory node tree.The directory node of TLD becomes root (catalogue) node, and it has comprised whole entities.
In order to follow the tracks of the position of entity, each entity that is arranged in the current field is all write down by a position in corresponding directory node to be represented.The directory node in higher level territory has the pointer that points to bottom subdomain directory node.
In this layering nomenclature scheme, name lookup and positioning action carry out in the part, are to carry out in the user-center that sends search request, the ring that progressively increases at one to the search of entity promptly.When search request is forwarded to the directory node of higher level, all can enlarge the region of search.Under the poorest situation, search can be carried out continuously, till request arrives root node.Because superior node has the position record of all entities under it, so can be transmitted to the phyllome node to request along a downward pointer route simply.
Existing common information model (Common Information Model is called for short " CIM ") resource comprises following characteristics:
1, the CIM modeling object comprises the entity (like electric substation, transformer, air-conditioning, RTU etc.) of real world, the software entity (like various systems, service etc.) of information world; Also comprise virtual information point (like data collection point, control point etc.), these CIM entities all have certain professional implication;
2, the CIM model is a kind of hierarchy " tree ", if consider the safety control strategy factor of application system, the CIM model can be expressed as a kind of directed acyclic graph.
Thereby CIM resource name service also is faced with and searches the CIM problem of resource how efficiently except needs solve two types of total problems of above-mentioned general naming system.This is because the data of application system visit are not only the CIM entity object, also needs attribute, measurement and the auxiliary object resource relevant with this object and association attributes or the like virtual objects of reference object.This need resolve to quote relevant with this object to these attached resource descriptions.The pattern replaceability (mode activated Architecture characteristic) of CIM database causes realizing this general relatively name nominating and resolves very difficulty simultaneously.
Summary of the invention
The technical problem that the present invention mainly solves provides name of CIM resource and analytic method in a kind of distributed system; Make and to contain CIM actual resource and virtual resource all in the system; Under distributed environment apace with resource name resolve to name referring to entity, realize searching efficiently resource entity under the distributed environment.
In order to solve the problems of the technologies described above; The invention provides name of CIM resource and analytic method in a kind of distributed system; The CIM resource is stored in each distributed server in the system, and the CIM resource comprises actual resource and virtual resource in the system, and virtual resource is subordinated to actual resource; Actual resource is divided into deployment object and common resources object; Common resources object in the system is subordinated to the deployment object; Between each common resources object and the common resources object, respectively dispose object and dispose between the object and comprise subordinate relation respectively; Common resources object and/or deployment object and the higher level under it dispose object storage in same server, and the method includes the steps of:
Be each CIM resource allocation one quoting resource title, this quoting resource title comprises resource name sign and resource designational expression that can be default, and this resource name sign is used to describe actual resource, and this resource designational expression is used to describe virtual resource; The resource name sign of disposing object comprises the title of this deployment object at least, and the resource name sign of common resources object comprises the title of this common resources object and the title that at least one higher level under it disposes object at least; The quoting resource title of virtual resource is made up of the resource name sign of actual resource under it and the resource designational expression of this virtual resource;
Name analysis service in the system is distributed in each distributed server; When the resource access request of receiving from client; According to the resource name sign in the quoting resource title in this request, confirm the deployment object that this resource is affiliated, locate the corresponding this locality name resolution server of this deployment object; By this this locality name resolution server this quoting resource title is resolved, analysis result is returned to this client.
As further improvement, it is one of following that this resource designational expression comprises at least:
The expression formula of the static attribute of actual resource; And/or
The expression formula of the dynamic attribute of actual resource; And/or
Resource or Resource Properties are searched expression formula; And/or
The directory service query expression.
As further improvement; In the resource access request that receives from client; According to the resource name sign in the quoting resource title in this request; Confirm the deployment object that this resource is affiliated, locate the step of the corresponding this locality name resolution server of this deployment object and carry out by root name resolution server; This step comprises following substep:
Preserve in advance in the root name resolution server and dispose the object structure tree;
Root name resolution server is when receiving resource access request; Extract the quoting resource title in this request; This quoting resource title decomposed obtain resource name sign; Search this deployment object structure tree according to the deployment object oriented in this resource name sign, confirm this locality name resolution server that this deployment object is corresponding.
As further improvement, comprise the subordinate layer aggregated(particle) structure of respectively disposing object in the system in this deployment object structure tree and respectively dispose the corresponding this locality name resolution server information of object.
As further improvement, comprise the subordinate layer aggregated(particle) structure of respectively disposing object in the system and respectively dispose the corresponding resource ID of object in this deployment object structure tree;
Search this deployment object structure tree according to the deployment object oriented in this resource name sign; Confirm in the step of this locality name resolution server that this deployment object is corresponding, the pairing local name resolution server of this resource ID is positioned through resource locator server.
As further improvement, if root name resolution server decomposes this quoting resource title, have to the resource name sign, do not comprise the resource designational expression; And only comprise the title of disposing object in this resource name sign, after then root name resolution server is searched this deployment object structure tree according to the deployment object oriented, directly will dispose the corresponding resource ID of object and return to this client.
As further improvement, local name resolution server is resolved this quoting resource title, analysis result is returned in the step of this client, comprises following substep:
Local name resolution server is resolved this quoting resource title; If only comprise the resource name sign in this quoting resource title; Then should obtain corresponding resource ID according to deployment object oriented in the resource name sign and/or common resources object oriented by name resolution server in this locality; This resource ID is returned to this client, and this client is according to this this actual resource of resource ID visit.
As further improvement, local name resolution server is resolved this quoting resource title, analysis result is returned in the step of this client, comprises following substep:
Local name resolution server is resolved this quoting resource title; If comprise resource name sign and resource designational expression in this quoting resource title; Then, obtain the corresponding virtual resource content, feed back to this client according to preset this resource designational expression of rule searching.
As further improvement, after the step that root name resolution server positions the pairing local name resolution server of this resource ID through resource locator server, also comprise following steps:
Preserve the corresponding relation of this resource ID and local name resolution server, when needs are confirmed to dispose this locality name resolution server of object correspondence, preferentially from the corresponding relation that preserve this locality, search.
As further improvement; When in this resource access request, comprising at least two quoting resource titles; Resource name in each quoting resource title sign is carried out merger; To identical resource name sign, carry out the step of the local name of one-time positioning resolution server, respectively the identical quoting resource title of each resource name sign is resolved by this this locality name resolution server.
Embodiment of the present invention compared with prior art; The main distinction and effect thereof are: be each CIM resource allocation one quoting resource title; This quoting resource title comprises resource name sign and resource designational expression that can be default; This resource name sign is used to describe actual resource, and this resource designational expression is used to describe virtual resource; The resource name sign of disposing object comprises the title of this deployment object at least, and the resource name sign of common resources object comprises the title of this common resources object and the title that at least one higher level under it disposes object at least; The quoting resource title of virtual resource is made up of the resource name sign of actual resource under it and the resource designational expression of this virtual resource; Name analysis service in the system is distributed in each distributed server; When the resource access request of receiving from client; According to the resource name sign in the quoting resource title in this request, confirm the deployment object that this resource is affiliated, locate the corresponding this locality name resolution server of this deployment object; By this this locality name resolution server this quoting resource title is resolved, analysis result is returned to this client.Thereby guarantee that the quoting resource title can contain CIM actual resource and virtual resource all in the system, and can be apace under distributed environment with resource name resolve to name referring to entity, realize searching efficiently resource entity under the distributed environment.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, will combine accompanying drawing that execution mode of the present invention is done to describe in detail further below.
First embodiment of the invention relates to name of CIM resource and analytic method in a kind of distributed system." resource " described in this execution mode comprises the actual resource (like electric substation, transformer, air-conditioning, RTU etc.) of real world, the software entity resource (like various systems, service etc.) of information world; Also comprise virtual resource (like searching of object properties, measurement, auxiliary object resource and attribute and correlated resources etc.); These resources and correlation form based on the CIM modeling, are that information system is moved necessary information model.
Specifically, the CIM resource comprises actual resource and virtual resource in the system, and virtual resource is subordinated to actual resource, comprises the searching etc. of object properties, measurement, auxiliary object resource and attribute and correlated resources of actual resource object.
The distribution of CIM actual resource is a kind of hierarchy " tree ", has subordinate relation between each object resource, comprises a plurality of subordinate object resources under the main object resource, and the subordinate object resource can further comprise next stage subordinate object resource under it.As for certain electric power system; Power supply administration itself i.e. an object resource; Can also comprise transformer station, Surveillance center, transformer station of power office network structure, system under it and land object resources such as figure, can also comprise object resources such as main wiring diagram, network structure under the transformer station.In this execution mode these object resources are divided into deployment object and common resources object, wherein dispose object and be generally main object resource or main subordinate object resource, like transformer station, Surveillance center etc.; Other be the common resources object, like transformer station of power office network structure, main wiring diagram or the like, as shown in Figure 1.In practical application, can divide as required.Common resources object in the system is subordinated to the deployment object; Between each common resources object and the common resources object, respectively dispose object and dispose between the object and can comprise subordinate relation, common resources object, subordinate dispose object and dispose object storage in same server with its affiliated higher level; Belonging to different resources of disposing object can be stored in the different distributed servers.
Consider CIM characteristics of resources and the distributed demand of using based on CIM; In this execution mode; CIM resource name (quoting resource title) mainly comprises two parts: resource name sign Resource-Identifier and resource designational expression Naming-Expression, adopt following grammatical form:
<Resource-Identifier>[.Naming-Expression]
Wherein, the resource designational expression of " [] " expression can omit according to concrete applied environment; Resource name sign in " < ...>" is actual name part, can not omit.
The resource name sign is used to describe actual resource, and the resource designational expression is used to describe virtual resource; Thereby the quoting resource title of actual resource only need comprise the resource name identification division, and the quoting resource title of virtual resource must comprise resource name sign and resource designational expression two parts.
Wherein, the resource name sign of disposing object comprises the title of this deployment object at least, can omit the title that its higher level disposes object, adopts following grammatical form:
[. the higher level disposes object [...]]. this deployment object
The resource name sign of common resources object comprises the title of this common resources object and the title that at least one higher level under it disposes object at least; Can omit the affiliated higher level's common resources object oriented of this common resources object; With and affiliated deployment object on/subordinate disposes object oriented, adopts following grammatical form:
The deployment object [. subordinate's deployment object [... ]]. [. higher level's actual resource object [... ]]. this actual resource object
This naming method is the name that comes organization object as layer of structure with the deployment object, and other actual resource of disposing the object below is done " flattening " handle, and has simplified quoting of CIM entity, uses more convenient and hommization.
In the CIM resource sketch map like Fig. 1, " XXXX power supply administration ", " transformer station 1 ", " transformer station 2 " are the system deployment object, and the example of quoting resource title that meets above-mentioned naming rule is following:
" transformer station 2 ">" one section of 110kV ">" Unit 504 ">" 504 protective device ":
Transformer station's 2.504 protective devices
Introducing " resource designational expression (Naming Expression) " in this execution mode is in order to solve the resource name problem with many complicacies such as searching of object properties, measurement, auxiliary object resource and the attribute and the correlated resources of actual resource object.
The grammer of resource designational expression is following: function name (parameter list). and [attribute]
The designational expression of the following several types of current support:
1) for the static attribute of actual resource object, its expression formula is: A (attribute-name), as " XXXX power supply administration. the 2.504 protective device .A (name) of transformer station " expression quotes " the name attributes of 504 protective devices ";
2) for the dynamic attribute of actual resource object (promptly measuring); Because in the CIM model; Measurement itself is a kind of object resource, but it is again a kind of attached attribute of higher level's actual resource, so its designational expression is: M (measuring name). [value | quality | attribute]; Like " 2. workstation1 .M (CPU usage) .value of transformer station ", represent to quote ". the analog quantity measured value of the CPU usage of workstation1 ".
3) support name resource lookup expression formula, these resources comprise:
---its expression formula of object resource is: search stencil function name (object), wherein object is the preset parameter name, and like " 2.MEAS of transformer station (object) ", all of promptly searching under the transformer station 2 measure object; All the IED objects under the transformer station 2 are searched in " 2.IED of transformer station (object) " expression.
---its expression formula of object Resource Properties is: search stencil function name (object). attribute, like " 2.MEAS of transformer station (object) .value ", the value attribute of all the measurement objects under the transformer station 2 is quoted in expression.
4) support the directory service query expression
The directory service query expression comprises the inquiry for one type of resource in the catalogue, and for inquiry of the resource that satisfies the same terms etc.Its expression formula is: DIR (theme is asserted, object), and wherein " DIR " is the function name keyword of directory service, the resource of directory service inquiry is described with " theme is asserted, object " tlv triple.This tlv triple has " type, attribute, value ", " attribute URI, relational expression, value " etc., like " 2.DIR of transformer station (AnalogLimitSet, type, ROC) ", expression search the promising measurement object that is set to the rate of change alarm event.
The application of " resource designational expression " has realized the versatility target of CIM resource name service when facing the parsing of diversity resource name basically.Thereby guarantee that the quoting resource title in this execution mode can contain CIM actual resource and virtual resource all in the system.
Concrete name process of analysis is as shown in Figure 2; In the distributed deployment environment; Possibly there are a plurality of name analysis service; Be distributed in the different name resolution servers, comprise one in the system and disclose external root name resolution server, the address of preserving this root name resolution server in the client.
In the step 201, preserve in advance in the root name resolution server and dispose the object structure tree.Dispose and comprise the subordinate layer aggregated(particle) structure of respectively disposing object in the system in the object structure tree and respectively dispose the corresponding this locality name resolution server information of object.
In the step 202, client is sent resource access request to root name resolution server, in request, comprises the quoting resource title.
In the step 203; Root name resolution server is when receiving resource access request; Extract the quoting resource title in this request; This quoting resource title decomposed obtain resource name sign, search according to the deployment object oriented in this resource name sign and dispose the object structure tree, confirm that the corresponding this locality of this deployments object names resolution server.
In the step 204, this quoting resource title is resolved by this locality name resolution server.
If only comprise the resource name sign in this quoting resource title; Then should obtain corresponding resource ID according to deployment object oriented in the resource name sign and/or common resources object oriented by name resolution server in this locality; Resultant resource ID is returned to client, and client is according to this actual resource of resource ID visit.(preserving the resource ID that object and common resources object are disposed in the book server linchpin down in the local name resolution server in advance).
If comprise resource name sign and resource designational expression in this quoting resource title, then, obtain the corresponding virtual resource content according to preset this resource designational expression of rule searching, feed back to said client.
Thereby guarantee under distributed environment can be apace with resource name resolve to name referring to entity, realize searching efficiently resource entity under the distributed environment.
Above-mentioned client can referenced patent 201010295955.6 " resource location method in a kind of distributed environment " according to the mode of this actual resource of resource ID visit.
Need to prove; In this execution mode; When in the resource access request of client, comprising a plurality of quoting resource title, root name resolution server carries out merger to the sign of the resource name in each quoting resource title, to identical resource name sign; Carry out the step of the local name of one-time positioning resolution server, respectively the identical quoting resource title of each resource name sign is resolved by this this locality name resolution server.Thereby simplified flow process, improved whole resolution speed.
Second embodiment of the invention relates to name of CIM resource and analytic method in a kind of distributed system equally; Roughly the same with first execution mode; Its difference is; In first execution mode, dispose this locality name resolution server information that comprises the subordinate layer aggregated(particle) structure of respectively disposing object in the system in the object structure tree and respectively dispose the object correspondence, can directly locate according to this deployment object structure number and dispose the corresponding this locality name resolution server of object; In this execution mode; Comprise the subordinate layer aggregated(particle) structure of respectively disposing object in the system in the deployment object structure tree and respectively dispose the corresponding resource ID of object, root name resolution server positions the pairing local resolution server of naming of this resource ID through resource locator server.And root names resolution server to preserve this resource ID and the local corresponding relation of naming resolution server, in the time need confirming to dispose this locality name resolution server of object correspondence, preferentially from the corresponding relation that preserve this locality, searches next time.
In this execution mode, if the quoting resource name that client-requested is resolved is called the title of disposing object, i.e. root name resolution server decomposes this quoting resource title, has to the resource name sign, does not comprise the resource designational expression; And only comprise the title of disposing object in this resource name sign, after then root name resolution server is searched deployment object structure tree according to the deployment object oriented, directly will dispose the corresponding resource ID of object and return to client.
Though through reference some preferred implementation of the present invention; The present invention is illustrated and describes; But those of ordinary skill in the art should be understood that and can do various changes to it in form with on the details, and without departing from the spirit and scope of the present invention.