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 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 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 is arranged in the entity of the current field and is all represented by a location records in corresponding directory node.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 location records 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, reference mark 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 matters that the present invention mainly solves provides a kind of CIM resource name and analytic method; Make resource name can 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 a kind of CIM resource name and analytic method, 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 the subordinate hierarchical relationship 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 resources 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 named track of being made up of one or at least two the deployment object oriented with hierarchical relationship, and the resource name sign of common resources object comprises the named track be made up of one or at least two the deployment object oriented with hierarchical relationship and the title of this common resources object; 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; Receive resource access request by root name resolution server from client; According to the resource name sign in the quoting resource title in this request, resolve and obtain named track, according to the hierarchical relationship of disposing object oriented in this named track; Name the resolution server address to return to client next stage; If this next stage name resolution server is that resolution server is named in the corresponding this locality of this CIM resource, then the quoting resource title of this CIM resource is resolved by this this locality name resolution server, analysis result is returned to client; If this next stage name resolution server is not that resolution server is named in the corresponding this locality of this CIM resource, then the client contacts next stage is named resolution server, until obtaining local name resolution server.
As further improvement, local name resolution server is resolved this quoting resource title, analysis result is returned in the step of 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; Resource ID is returned to client, and client is according to 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 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 client according to preset this resource designational expression of rule searching.
As further improvement; When in 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.
As further improvement, it is one of following that the 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.
Embodiment of the present invention compared with prior art; The key distinction and effect thereof are: be each CIM resources 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 named track of being made up of one or at least two the deployment object oriented with hierarchical relationship, and the resource name sign of common resources object comprises the named track be made up of one or at least two the deployment object oriented with hierarchical relationship and the title of this common resources object; 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; Receive resource access request by root name resolution server from client; According to the resource name sign in the quoting resource title in this request, resolve and obtain named track, according to the hierarchical relationship of disposing object oriented in this named track; Name the resolution server address to return to client next stage; If this next stage name resolution server is that resolution server is named in the corresponding this locality of this CIM resource, then the quoting resource title of this CIM resource is resolved by this this locality name resolution server, analysis result is returned to client; If this next stage name resolution server is not that resolution server is named in the corresponding this locality of this CIM resource, then the client contacts next stage is named resolution server, until obtaining local name resolution server.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 embodiment of the present invention is done to describe in detail further below.
The present invention's one preferred embodiments relates to name of CIM resource and analytic method in a kind of distributed system." resource " described in this embodiment 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 mutual relationship form based on the CIM modeling, are that infosystem 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 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 embodiment 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 embodiment; 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 named track of being made up of one or at least two the deployment object oriented with hierarchical relationship; At least the title that comprises this deployment object in this named track, the title of can the clipped higher level disposing object, adopt following grammatical form:
[. the higher level disposes object [...]]. this deployment object
The resource name of common resources object sign comprises the named track is made up of one or at least two the deployment object oriented with hierarchical relationship and the title of this common resources object; Can omit the affiliated higher level's common resources object oriented of this common resources object; With and the part of 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 synoptic diagram 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 ":
XXXX power supply administration. transformer station's 2.504 protective devices
Introducing " resource designational expression (Naming Expression) " in this embodiment 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 key word 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 embodiment can contain CIM actual resource and virtual resource all in the system.
Concrete name process of analysis signal 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, receive resource access request from client by root name resolution server.According to the resource name sign in the quoting resource title in this request; Parsing obtains named track; Named track is made up of one or two the deployment object oriented with hierarchical relationship at least; According to the hierarchical relationship of disposing object oriented in this named track, find next stage to dispose the corresponding next stage name resolution server address of object, name the resolution server address to return to client next stage.
For example, suppose that the quoting resource name is called in the request: .XXXX power supply administration of A company. 2. workstation1 .M (utilization rate) .value of transformer station; Can find out wherein .XXXX power supply administration of A company. transformer station's 2. workstation1s are the resource name sign, and M (utilization rate) .value is the resource designational expression.A company, XXXX power supply administration and transformer station 2 are for having the deployment object of hierarchical relationship, i.e. named track.According to this named track, find next stage to dispose the corresponding next stage name resolution server address of object, promptly the corresponding name resolution server address of XXXX power supply administration returns to client.
In the step 202; Client contacts next stage name resolution server; Next stage name resolution server is attempted this quoting resource title is resolved, if can correctly resolve, shows that then this name resolution server is the corresponding this locality name resolution server of this CIM resource; If can not correctly resolve; Show that then this name resolution server is not the corresponding this locality name resolution server of this CIM resource; Continuation names the resolution server address to return to client next stage according to this named track, until obtaining local name resolution server.Generally speaking, the corresponding this locality name resolution server of this CIM resource is that orlop is disposed the corresponding name resolution server of object in its named track.
According to above-mentioned example; The name resolution server address that client contacts XXXX power supply administration is corresponding; This name resolution server is attempted this quoting resource title is resolved, and can't correctly resolve, and continues according to this named track; Next stage is named the resolution server address, and promptly transformer station 2 corresponding name resolution server addresses return to client.Can find out that transformer station's 2 corresponding name resolution servers are this locality name resolution server of this CIM resource.
In the step 203, this quoting resource title is resolved, analysis result is returned to client by this locality name resolution server.According to above-mentioned example, by transformer station's 2 corresponding name resolution servers this quoting resource title is resolved, analysis result is returned to this client.
When the quoting resource title is resolved; 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.
Need to prove; In this embodiment; When in resource access request, comprising a plurality of quoting resource title, the sign of the resource name in each quoting resource title is carried out merger, to identical resource name sign; Only need to carry out the step of once obtaining local name resolution server, respectively the identical quoting resource title of said each resource name sign is resolved by this this locality name resolution server.
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.