[go: up one dir, main page]

WO2012167660A1 - Method and apparatus for obtaining cim resources - Google Patents

Method and apparatus for obtaining cim resources Download PDF

Info

Publication number
WO2012167660A1
WO2012167660A1 PCT/CN2012/073543 CN2012073543W WO2012167660A1 WO 2012167660 A1 WO2012167660 A1 WO 2012167660A1 CN 2012073543 W CN2012073543 W CN 2012073543W WO 2012167660 A1 WO2012167660 A1 WO 2012167660A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
value
cimom
request message
key
Prior art date
Application number
PCT/CN2012/073543
Other languages
French (fr)
Chinese (zh)
Inventor
李永安
刘生俊
刘战杰
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2012167660A1 publication Critical patent/WO2012167660A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks

Definitions

  • the present invention relates to communication networks, and in particular, to a method and apparatus for acquiring CIM resources. Background technique
  • the Di s tr iaded Management Task Force defines a set of specifications and frameworks to standardize the interface between management applications and various managed elements (MEs), existing general information.
  • the Common Inf or Moderation Mode (CIM) system includes a CIM client, a CIM Object Manager (CIM0M), a CIM Provider plugin (CIM Provider), and a managed network element, where the CIM client is CIM0M.
  • the CIM client obtains model and instance data, subscriptions, and receive events for each ME from the CIM0M through a standard interface.
  • CIM0M is the core of the entire CIM system architecture.
  • the CIM provider plug-in is an adaptation module between the CIM0M and the ME. It is integrated into the CIM0M by means of a plug-in.
  • the ME is used to obtain the instance data and events of the ME and report it to CIM0M.
  • the information model of the managed network element is described by the M0F ( Managed Object Forma t ) format defined in the CIM Infras gagture specification (DMIF Specification Document DSP0004, CIM Infras truncation Spec I ica t ion ).
  • CIM-XML Co ⁇ on Inf ormatometric Model - Extensible Markup Language, described in DMTF specification document DSP0200
  • WS-Management Web Services for Management, in DMTF specification.
  • Document DSP0226 SM CLP (Server Management Command Line l) Protocol Spec if i cat ion, described in the DMTF specification document DSP0214).
  • the programming interface between the two is mainly CSR-XML JSR48 (Java Spec if ication Reques t 48, The Java TM API for Web Based Enterpr i se Management).
  • the technical problem to be solved by the present invention is to provide a method and apparatus for acquiring CIM resources.
  • the present invention provides a method of obtaining a common information model CIM resource, the method comprising:
  • the first node receives the request message for querying the CIM resource sent by the CIM client;
  • the first node extracts the keyword content in the request message, and determines, according to the keyword content, that the request message is a resource for querying a single general information model object manager CIM0M or a CIM0M resource for querying all nodes.
  • step a If the resource of a single CIM0M is queried, step a is performed. If the resources of the CIM0M of all nodes are queried, step b is performed.
  • the first node searches for the location information of the destination CIMOM according to the keyword content, and forwards the request message to the destination CIM0M according to the found location information, and receives the destination.
  • a response message returned by the CIMOM, and forwarding the response message to the CIM client b, the first node searching for location information of all nodes, and forwarding the request message to all nodes according to the found location information
  • the CIMOM receives a response message returned by the CIMOM of all the nodes, and forwards the response message to the CIM client.
  • the method further includes: the first node performing a hash operation on the IP address of the first node to generate a Va lue value;
  • the service location protocol discovers all CIMOMs on the first node; acquires a universal resource identifier URI or a uniform resource locator URL of all CIMOMs on the first node, and hashes the URI or URL to obtain a Key value.
  • the step a includes: the first node performs a hash operation on the URI or the URL in the keyword content in the request message to obtain a Key value; the first node according to the Key value and the The Key-Va lue information table in the distributed hash table network searches for a corresponding Va lue value; the first node forwards the request message to a destination CIMOM corresponding to the Va lue value; The response message returned by the destination CIMOM forwards the received response message to the CIM client.
  • the step b includes: the first node uses a Va lue value in a first item of the Key-Va lue information table of the first node in the distributed hash table network as a location information query result; The first node forwards the request message to the CIMOM of the node corresponding to the location information query result; the first node compares the location information query result to the first item in the Key-Va lue information table maintained by the node itself The Va lue value is used as the location information query result, and then the request message forwarding step is repeated until the first node receives the location information query result corresponding to the Va lue value in the first item of the Key-Va lue information table maintained by the node itself.
  • the node is the first node; the first node receives a response message returned by the CIMOM of all the nodes, and forwards the received response message to the CIM client.
  • the step b includes: the first node in a distributed hash table network
  • the Va lue value in the first item of the Key-Va lue information table of the first node is used as a location information query result; the first node forwards the received request message to the CIM0M of the node corresponding to the location information query result.
  • the CIM0M of the node corresponding to the lue value forwards the request message to which the first node address information is attached, and the nodes that receive the request message to which the first node address information is attached are maintained to themselves
  • the CIM0M of the node corresponding to the Va1 ue value in the first item of the Key-Va lue information table forwards the request message to which the first node address information is attached until the above-mentioned first node address information is attached.
  • the Va lue value corresponding node in the first item in the Key-Va lue information table maintained by the node of the request message is the first node; the first node receives the CIM0M of all the nodes according to the attached A node address information response message returned, it forwards the received response message to the C IM client.
  • step b further includes: generating a new message identifier according to the message identifier of the request message, the address and port information of the CIM client, to identify a client that initiates the request message.
  • the CIM0M that forwards the request message to all the nodes according to the found location information specifically includes: querying, according to the message identifier in the request message, whether the new message identifier table of the first node includes the message identifier Corresponding new message identifier; if not, forwarding the request message to the CIM0M of the first node, and saving the new message identifier corresponding to the message identifier in the new message identifier table of the first node; otherwise, The request message is not forwarded to the CIM0M of the first node.
  • the present invention provides an apparatus for obtaining a common information model CIM resource, the apparatus comprising:
  • the CIM0M proxy is configured to receive a request message for querying the CIM resource sent by the CIM client to the first node, extract the keyword content in the request message, and determine, according to the keyword content, that the request message is a query for a single universal information model.
  • the resource of the object manager CIM0M is also the resource of the CIM0M of all nodes;
  • a DHT proxy configured to: when the CIMMOM agent determines that the request message is a resource for querying a single CIM0M, search for location information of the destination CIM0M according to the keyword content; or when the CIMMOM agent determines that the request message is to query all nodes CIM0M Find the location information of all nodes when the resource is used;
  • the CIM0M proxy is further configured to forward the request message to the CIM0M corresponding to the location information according to the location information searched by the DHT proxy, receive a response message returned by the CIM0M corresponding to the location information, and forward the received response message to the The C IM client.
  • the DHT proxy is further configured to perform a hash operation on the first node IP address to generate a Va lue value, and discover all CIM0Ms on the first node according to a service location protocol, and obtain all the first nodes.
  • CIM0M's Universal Resource Identifier URI or Uniform Resource Locator URL hashing the URI or URL to get the Key value to generate the CIM0M Key-Va lue information table, and publishing the generated Key-Va lue information table to The distributed hash table network.
  • the determining, by the DHT agent, the location information of the destination CIM0M according to the keyword content includes: performing a hash operation on the URI/URL in the keyword content to obtain a Key value; and according to the Key value and the distribution
  • the Key-Va lue information table in the hash table network looks up the corresponding Va lue value.
  • the CIM0M proxy is further configured to generate a new message identifier according to the message identifier of the request message, the address and port information of the CIM client, to identify a client that initiates the request message.
  • the CIM0M agent forwarding the request message to the CIM0M of all the nodes according to the location information found by the DHT proxy specifically includes: according to the message identifier in the request message Querying whether the new message identifier table of the first node includes a new message identifier corresponding to the message identifier; if not, forwarding a request message to the CIMOM of the first node and identifying a new message identifier corresponding to the message identifier And saving in the new message identifier table of the first node; otherwise, the request message is not forwarded to the CIMOM of the first node.
  • the DHT proxy is specifically configured to: use a Key-Va lue information table of the first node in the distributed hash table network The Value value in the first item is used as the location information query result, so that the CIMOM agent forwards the request message to the CIMOM of the corresponding node of the location information query result, and then the location information query result corresponds to the Key-Va lue information maintained by the node itself.
  • the Va lue value in the first item of the table is used as the location information query result, so that the CIMOM agent repeats the above request message forwarding step until the DHT agent receives the Key-Va lue information maintained by the node corresponding to the location information query result.
  • the node corresponding to the Va lue value in the first item of the table is the first node; or
  • the DHT agent is specifically configured to: use the first item of the Key-Va lue information table of the first node in the distributed hash table network
  • the Va lue value is used as a result of the location information query so that the CIMOM agent forwards the received request message to the CIMOM of the node corresponding to the location information query result and appends the first node address information to the request message;
  • the node corresponding to the Va lue value in the first item forwards the CIMOM of the node corresponding to the Va lue value in the first item of the Key-Va lue information table maintained by itself to the node to which the first node address information is attached.
  • the C IM0M forwards the request message to which the first node address information is attached, until the node that receives the request message to which the first node address information is attached is maintained by itself
  • the first item in the Key-Va lue information table corresponding to the value Va lue node is the first node.
  • the method and apparatus of the present invention have the following beneficial effects:
  • the CIMOM agent and the DHT agent enable the CIM client to obtain CIM resource information of a single CIMOM or CIMOM of all nodes in the network at any node, thereby realizing the acquisition of CIM resources in a large-scale, distributed multi-host environment.
  • FIG. 1 is a schematic diagram showing the relationship between a device for acquiring CIM resources and a CIM client and a CIM object manager according to an embodiment of the present invention.
  • FIG. 1 is a schematic diagram showing a process of discovering CIMOM on a node and publishing a information table according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of a method for acquiring CIM resources according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an apparatus for acquiring CIM resources according to an embodiment of the present invention. detailed description
  • FIG. 1 a schematic diagram of a relationship between a device for acquiring CIM resources and a CIM client and a CIM object manager according to an embodiment of the present invention is illustrated.
  • the CIM client can obtain the resources of the CIM object manager CIMOM through the device that obtains the CIM resource.
  • CIMOM runs on acquiring CIM resources.
  • a device that acquires C IM resources can run one C IM0M or multiple CIM0Ms.
  • the device for obtaining the C IM resource may be any node running CIM0M, where the node may be a host or a virtual machine.
  • the CIM0M agent, the DHT agent, and the CIM0M agent that perform the function of acquiring CIM resources of the node may be performed by the processor of the host. Even though the device that acquires the CIM resource can be a virtual machine, the virtual machine is still a virtual machine running on the computer processor, so the CIM0M agent, the DHT agent, and the CIM0M agent still run in the processor of the computer.
  • the method for obtaining CIM resources provided in the embodiments of the present invention is implemented by using any node in a distributed network.
  • the method can be implemented by a software form on a node or a combination of software and hardware.
  • a node that receives a request message for querying a C IM resource sent by a CIM client is referred to as a first node, so as to distinguish from other nodes that receive a request message forwarded by the first node, where the first node may be distributed.
  • Any node within the network cannot be construed as a restrictive explanation.
  • the device may also include the first device that obtains the CIM resource on the first node.
  • FIG. 2 a schematic diagram of a CIM0M discovery and information table publishing process on a node according to an embodiment of the present invention is illustrated, which may specifically include:
  • S200 Perform a hash operation on the first node IP address to generate a Va lue value.
  • the IP address of the first node is hashed to generate a Va lue value of the Key-Va lue information table of the CIM0M on the node.
  • one or more CIM0Ms may be running on one node, and each C IM0M on the same node is not associated with each other.
  • the device that obtains the CIM resource by the node can discover all the CIM0Ms running on the same node according to the Servicing Protocol (SLP).
  • SLP Serviced Generation Protocol
  • the first node address needs to be added Entering a multicast address, that is, maintaining a multicast group having only the first node address, and then the first node, that is, the device acquiring the CIM resource, sends an SLP multicast request to the CIM0M in the multicast address; receiving the SLP multicast request
  • the CIM0M returns its own CIM resource information in a unicast manner to the device of the first node that acquires the CIM resource.
  • the method may be implemented by adding a Directory Retrieval Agent module on the first node. Specifically, all CIM0Ms on the first node register their own CIM resource information with the directory proxy module on the node.
  • S204 Obtain a URI or a URL of all the CIM0Ms on the first node, perform a hash operation on the URI or the URL to obtain a Key value, and generate a Key-Va lue information table of the CIM0M.
  • the first node obtains the URI or URL in the CIM resource information returned by each CIM0M through the unicast form, and hashes the obtained URI or URL.
  • the operation obtains a Key value to generate a Key-Va lue information table for each CIM0M.
  • the CIM0M discovery is implemented by using the directory proxy module, the first node obtains the URI or URL of each CIM0M from the directory proxy module on the node, and hashes the obtained URI or URL to generate a Key value to generate a Key of each CIM0M. -Va lue information sheet.
  • the first node sends the generated Key-Va lue information table of each CIM0M to the DHT network corresponding to the CIM0M according to the DHT algorithm known to those skilled in the art, where the DHT network corresponding to the CIM0M is existing.
  • Distributed network The issuance of the Key-Va lue information table refers to storing the Key-Va lue information table in a distributed manner on multiple nodes according to the DHT algorithm, and each node is responsible for storing a part of the Key-Va lue information table, thereby realizing the entire DHT network. Addressing and storage.
  • Each node periodically runs a detection algorithm corresponding to each of the DHT algorithms to detect a CIM0M on a newly joined node or a CIM0M on an exit or a failed node, thereby updating the Key-Va lue information table of each node itself.
  • the DHT algorithm includes, but is not limited to, Chord, CAN, Tapes try and Pas try algorithms.
  • FIG. 6 a flow chart of a method for acquiring CIM resources according to an embodiment of the present invention is illustrated. The method includes the steps of:
  • the first node receives the request message for querying the CIM resource sent by the CIM client.
  • the first node may be any node in the distributed network, and the device that obtains the CIM resource may be in the distributed network. Any one node. Any node in the implementation of the present invention can acquire CIM resources.
  • the first node After being started on the first node, the first node can perform step 400 and subsequent steps of acquiring CIM resources.
  • the request message for querying the CIM resource sent by the CIM client that is, the request message for inquiring the CIM resource on the CIM0M or the CIM resource on the CIM0M of all the nodes initiated by the CIM client, the request message for querying the CIM resource is simply referred to as the request.
  • the format of the message can be in the standard format of the Windows Management System (Windows Management Specification) or the WBEM (Web-Based Enterprise Management) standard format.
  • the request message includes a message header and a message body, wherein the message body includes a key content identifying the request resource, a URI or URL information for identifying a single CIM0M, or an identifier of the CIM0M of all nodes.
  • the host address is Al lHos tPath to identify the CIM0M of all nodes; in addition, the host address is null (Nul l ) to identify the CIM0M of all nodes. If the CIM resource on a single CIM0M is queried, the keyword content includes a URI or URL information that identifies a single CIM0M. If the CIM resource on the CIM0M of all nodes is queried, the keyword content includes all nodes. The identifier of the CIM0M, ie Al lHos tPath or Nul l.
  • the first node extracts the keyword content in the request message, and determines, according to the keyword content, whether the request message is a resource of a single CIM0M or a resource of a CIM0M of all nodes, and if a resource of a single CIM0M is queried, Step S404, if the resources of all nodes CIM0M are queried, step S406 is performed;
  • the device that acquires the CIM resource of the first node extracts the keyword content of the message body in the request message, and determines that the request message is a single query according to the keyword content.
  • the CIM0M resource is also a resource for querying CIM0M of all nodes, if the keyword content is included If the URI or the URL information of the single CIMOM is identified, it is determined to query the resources of the single CIMOM, and step S404 is performed. If the keyword content includes the identifier of the CIMOM that identifies all the nodes, it is determined to query the CIMOM of all the nodes. The resource is executed in step S406.
  • the first node searches for location information of the destination CIMOM according to the keyword content, forwards the request message to the destination CIMOM according to the found location information, receives a response message returned by the destination CIMOM, and sends the response message. Forwarded to the CIM client;
  • the step S404 performed by the first node may specifically include:
  • the distributed hash table search algorithm well known to those skilled in the art may be used to improve the search efficiency, and is not limited to the embodiment of the present invention.
  • the found Va lue value corresponds to the location information of the node where the CIM0M of the request message is requested in the request message, and the Va lue value generation process can be used to determine the IP address of the node by using the Va lue value. address.
  • the destination CIM0M After forwarding the request message to the destination CIM0M corresponding to the Va lue value, receiving the response message to the request message returned by the destination CIM0M, and then forwarding the received response message to the CIM client, that is, the CIM client that initiates the request message End, wherein the response message includes CIM resource information in the request message requesting the query.
  • the first node searches for location information of all the nodes, forwards the request message to the CIM0M of all nodes according to the found location information, receives a response message returned by the CIM0M of all the nodes, and forwards the response message to The CIM client.
  • the keyword content of the request message includes an identifier
  • the identifier of the CIMOM of the node, Al lHos tPath or Nul l requests the message request to query the CIM resources on the CIMOM of all nodes.
  • the table may include the Key-Va lue information table of the same CIMOM. To avoid forwarding the request message to the corresponding CIMOM in the Key-Va lue information table of all nodes, some CIMOMs will receive the same request message multiple times, and each node Key- The first item Va lue value in the Va lue information table is usually not repeated.
  • the present invention avoids the above problem by forwarding the request message only to the CIMOM corresponding node of the Value value in the first item of the node Key-Va lue information table.
  • Two embodiments are provided in the embodiments of the present invention.
  • the first embodiment can be processed as follows:
  • the Va lue value in the first item of the Key-Va lue information table of the first node in the DHT network is used as the location information query result;
  • the first node that receives the request message (referred to as "N1" node for convenience of description, is merely for convenience of description, and may be represented by any other symbol, and should not be construed as a restrictive explanation.)
  • the Va lue value in the first item of the Key-Va lue information table of the N1 node (the Key-Va lue information table may include the CIM0M of one node or the Key-Va lue information of the CIM0M of one or more nodes) as the request message Purpose CIM0M location information query result, and then query the location corresponding node to the location information (ie, the next section in the N1 node Key-Va lue information table)
  • the CIMOM forwarding request message which is referred to as the "N2" node, is: N1->N2, and obtains the location information query result returned by N2, that is, in the first item of the Key-Va lue information table maintained by the N
  • the first node uses the Va lue value in the first item of the Key-Va lue information table maintained by the N2 node as the location information query result of the destination CIMOM of the request message, and the first in the N2 node Key-Va lue information table.
  • the Va lue value in the entry corresponds to the CIMOM forwarding request message of the node (referred to as the "N3" node), namely: N1->N3.
  • the first node continually uses the Va lue value in the first item in the Key-Va lue information table of the node that received the request message as the location information query result until the Key-Va lue of the node that received the request message
  • the Va lue value corresponding node in the first item in the information table is the initial node N1 that receives the CIM client request message. It should be noted that, in the request message forwarding process, after the location information Va lue value is learned, a person skilled in the art may use a known technical means to forward the request message to the CIM0M on the corresponding node of the Va lue value.
  • the device for acquiring the CIM resource of the first node receives the response message returned by each CIM0M that has received the request message, and then forwards the received response message to the CIM client that initiated the request, where the response message includes the request message requesting the query. CIM resource information. It should be noted that, in the process of forwarding the received response message to the CIM client that initiated the request, the device that obtains the CIM resource may forward the returned response message to the initiation request after receiving the response message returned by the CIM0M.
  • the CIM client can also package all CIM0M response messages on the same node into a response message and forward it to the requesting request after receiving all the response messages returned by all CIM0Ms on the same node (more than one CIM0M can be included on one node). CIM client.
  • the first node uses the Va lue value in the first item of the Key-Va lue information table of the first node in the distributed hash table network as the location information query result;
  • the first node forwards the received request message to the CIM0M of the corresponding node of the location information query result, and adds the first node address information to the request message;
  • the Va lue value in the first item corresponds to the Key-Va lue information table maintained by the node to itself.
  • the Va lue value in the first item corresponds to the CIMOM of the node forwarding the request message to which the first node address information is attached;
  • Each node that receives the request message to which the first node address information is attached forwards the first node address to the CIMOM of the corresponding node of the Va lue value in the first item of the Key-Va lue information table maintained by itself a request message of information, until the Va lue value corresponding node in the first item in the Key-Va lue information table maintained by the node itself that receives the request message to which the first node address information is attached is the first node;
  • the first node receives the response message returned by the CIMOM of all the nodes according to the additional first node address information, and forwards the received response message to the C IM client.
  • the Va lue value in the first item of the Key-Va lue information table of the first node (referred to as a "K1" node for convenience of description) in the DHT network (where the Key-Va of the first node)
  • the Va lue value in the first item of the lue information table is the result of the location information query.
  • the corresponding node (referred to as the "K2" node) forwards the request message to which the K1 node address information is attached, that is, K1->K2, then ⁇ 2
  • the device for acquiring the CIM resource of the node forwards the request message to which the K1 node address information is attached to the Va lue value corresponding node (referred to as "K3, node") in the first item of the Key-Va lue information table maintained by the node 2 itself.
  • the Va in the first item of the Key-Va ue information table maintained by the device that acquires the C ⁇ resource on each node of the request message to which the K1 node address information is attached is received
  • the CIM0M corresponding to the node of the lue value forwards the request message to which the K1 node address information is attached, until the Va lue value corresponding node in the first item in the Key-Va lue information table of the node to which the K1 node address information is attached is received. Is the K1 node.
  • the CIM0M of the request message may return the response message to the device for acquiring the CIM resource of the first node according to the node address information attached to the request message, and the device that obtains the CIM resource of the first node receives the response message returned by each CIM0M, and may After receiving the response message, the received response message is forwarded to the CIM client that initiated the request, and may also receive all the response messages of all CIM0Ms (which may include more than one CIM0M on the same node) on the same node. All response messages are packaged as a response message forwarded to the CIM client that initiated the request.
  • the CIM0M forwarding request message of all Va lue value corresponding nodes in the Key-Va lue information table of all nodes may be generated by generating a new node identifier. Avoid some CIM0Ms receiving the same request message multiple times during the process.
  • the same may exist in the Key-Va lue information table of different nodes.
  • the Key-Va lue information table of CIM0M in other words, the Key-Va lue information table of the same CIM0M can be stored in the Key-Va lue information table of multiple nodes.
  • the same CIM0M is saved because the Key-Va lue information of the same CIM0M is stored in the Key-Va lue information table of the multiple nodes.
  • the request message forwarded by each of the plurality of nodes is received.
  • the first node generates a new message identifier NewMes sagelD to identify the client that initiated the request message by identifying the Mes sagelD according to the message of the request message, the address and port information of the CIM client that initiated the request message, and then the Mes The sagelD and NewMes sagelD are stored in the first node's Mes sagelD and NewMes sagelD correspondence tables, namely the new message identification table, Mes sagelD and NewMes sagelD - in the table, and replace the message identifier in the request message with NewMes sagelD.
  • the CIM0M of the first node In the process of forwarding the request message to the CIM0M of all the nodes, querying, according to the message identifier in the request message, whether the new message identifier table of the first node includes a new message identifier corresponding to the message identifier, and if not, The CIM0M of the first node forwards the request message, and saves the new message identifier corresponding to the message identifier to the new message identifier table of the first node. Otherwise, the request message is not forwarded to the CIM0M of the first node. After determining, by the first node, whether the CIM0M forwarding request message on the first node is processed, the first node forwards the request message to the corresponding CIM0M of the Key-Va lue information table of the first node.
  • the generation and judgment of the foregoing new message identifiers are applicable to all nodes, and are not limited to the first node that receives the CIM client request message, or may be other nodes that receive the request message forwarded by the first node.
  • the manner in which the CIM client is identified by using the above new message identifier is to forward the request message to all the Va lue values of the information table of all nodes corresponding to the CIM0M of the node.
  • the first node address information of the CIM client request message may be additionally received in the request message, so that the CIM0M of each node that receives the request message may respond according to the additional first node address information. The message is returned.
  • the device that acquires the CIM resource of the first node identifies the received message as a response message of NewMes sagelD
  • the message identifier in the response message is replaced with Mes sagelD and forwarded to the CIM client that initiates the request message.
  • the new message identifier NewMes sagelD may be generated according to the message identifier Mes sagelD in the message body of the request message, and the address and port information of the CIM client that initiates the request message to identify the client that initiated the request message.
  • the new message identifier NewMes sagelD may be generated by using the message identifier Mes sageID in the message body of the request message, the address of the CIM client that initiates the request message, and the port information to identify the client that initiates the request message.
  • the apparatus 400 for acquiring a CIM resource may be a first node that runs the CIM0M, and specifically includes:
  • the CIM0M proxy 502 is configured to receive a request message for querying a CIM resource sent by the CIM client to the first node, extract a keyword content in the request message, and determine, according to the keyword content, that the request message is a query for a single general information.
  • the resource of the model object manager CIM0M is also the resource of the C IM0M of all nodes;
  • the DHT proxy 504 is configured to: when the CIMM0M agent determines that the request message is a resource for querying a single CIM0M, search for location information of the target CIM0M according to the keyword content; or when the CIMM0M agent determines that the request message is to query all nodes. When looking for resources of C IM0M, find all Location information of the node;
  • the CIMOM proxy 502 is further configured to forward the request message to the CIM0M corresponding to the location information according to the location information searched by the DHT proxy, receive the response message returned by the CIM0M corresponding to the location information, and forward the received response message. To the CIM client.
  • the CIMOM Agent receives the request message for querying the CIM resource sent by the CIM client, parses the request message to extract the keyword content in the message body, and determines the request according to the extracted keyword content.
  • the message is to query CIM resources on a single CIM0M or to query CIM resources on CIM0M of all nodes.
  • the keyword content includes a URI or a URL or an identifier that identifies all CIM0Ms.
  • the identifiers of all CIM0Ms are Al lHos tPath or Nul l.
  • the request message is a CIM resource on a single CIM0M. If the content of the keyword is Al lHos tPath or Nul l , the request message is a CIM resource on all CIM0Ms.
  • the DHT agent provided by the present invention can be used not only to implement the above-mentioned search function, but also to implement the discovery of the CIM0M on the node and the release of the information table.
  • the DHT network is a network formed by hashing the URI or URL of the CIM0M to generate a Key value and an IP address of a node where the CIM0M is located, and generating a Key-Va lue information table by generating a Va lue.
  • multiple CIM0Ms may be running on one node.
  • One or more CIM0Ms may be running on a node, where there is no correlation between CIMOMs on the same node.
  • a device that acquires a CIM resource can discover all the same nodes running according to the service location protocol.
  • the first node address needs to be added to the multicast Address, that is, maintaining a multicast group having only the first node address, and then the first node, that is, the device acquiring the CIM resource, sends an SLP multicast request to the CIMOM in the multicast address; the CIMOM receiving the SLP multicast request will The CIM resource information of the CIM is returned to the DHT proxy of the first node in a unicast manner; the DHT proxy obtains the URI or URL of each CIMOM, performs a hash operation on the URI or the URL to obtain a Key value, and generates a Key-Va lue corresponding to the CIMOM.
  • the information table is then distributed to the DHT network according to the DHT algorithm, and the CIM resource information on the CIMOM uniquely identified by the Key value is stored in a plurality of nodes according to the DHT algorithm.
  • Each node is responsible for storing a small number of Key-Va lue information tables, thereby realizing addressing and storage of the entire DHT network, and the DHT agents on each node periodically run the respective detection algorithms corresponding to the DHT algorithms to detect new ones.
  • the discovery of all CIM0M resource information running on the same node may be implemented by adding a directory proxy module to the node, in addition to being implemented in the above multicast manner. Specifically, all CIM0Ms running on the first node register their own CIM resource information with the directory proxy module, and then the DHT proxy extracts the CIM0M registered resource information from the directory proxy module, and obtains the CIM0M URI or the extracted resource information. The URL, the obtained URI or URL is hashed to obtain a Key value, and then a Key-Va lue information table of CIM0M is generated, and then the generated Key-Va lue information table is published to the DHT network. It should be noted that although the first node is taken as an example in the embodiment, all the CIM0Ms running on the node can be found on all nodes in the above manner.
  • the DHT proxy searches for the location information of the destination CIM0M according to the URI or the URL in the keyword content, and specifically includes: a URI or a URL in the keyword content. Performing a hash operation to obtain a Key value; searching for a corresponding Va lue value according to the Key value and a Key-Va lue information table in the DHT network, where the Va lue value is a location information of a destination CIM0M requesting a query in the request message.
  • the CIMOM proxy forwards the request message to the destination CIMOM corresponding to the Va lue value, receives the response message returned by the destination CIMOM, and forwards the received response message to the CIM client that initiated the request message.
  • the DHT agent searches for location information of all nodes in the DHT network, and the CIMOM agent forwards the request message according to the location information searched by the DHT proxy, receives the returned response message, and forwards the received response message to the originating message.
  • the requested CIM client If the resources of all nodes CIMOM are queried, the DHT agent searches for location information of all nodes in the DHT network, and the CIMOM agent forwards the request message according to the location information searched by the DHT proxy, receives the returned response message, and forwards the received response message to the originating message.
  • the requested CIM client is the resources of all nodes CIMOM.
  • the table may include the Key-Va lue information table of the same CIMOM.
  • some CIM0Ms may receive the same request message multiple times, and each node Key- The first item Va lue value in the Va lue information table is usually not repeated.
  • the present invention avoids the above problem by forwarding the request message only to the CIM0M corresponding to the value of the node in the first item of the node Key-Va lue information table. Two embodiments are provided in the embodiments of the present invention.
  • the first embodiment may include the steps: the DHT proxy of the first node uses the Va lue value in the first item of the Key-Va lue information table of the first node in the distributed hash table network as the location information query result so that The CIM0M proxy of the first node forwards the request message to the CIM0M of the node corresponding to the location information query result, and the DHT proxy of the first node further compares the location information query result to the Key-Va lue information table maintained by the node itself.
  • the Va lue value in one item is used as the location information query result, so that the CIM0M agent of the first node repeats the foregoing request message forwarding step (that is, the forwarding step of forwarding the request message to the CIM0M corresponding to the location information query result node), until the The node corresponding to the Va lue value in the first item of the Key-Va lue information table maintained by the node corresponding to the location information query result is the first node.
  • the second embodiment may include the following steps: the DHT proxy of the first node uses the Va lue value in the first item of the Key-Va lue information table of the first node in the distributed hash table network as the location information query result.
  • a node's CIM0M agent queries the node corresponding to the location information query result
  • the CIMOM forwards the received request message and appends the first node address information to the request message; to facilitate the node corresponding to the Va lue value in the first item to maintain the Key-Va lue information table of itself
  • the CIM0M of the node corresponding to the Va lue value in the first item forwards the request message to which the first node address information is attached, and in order to receive the request message to which the first node address information is attached
  • the node forwards the request message to which the first node address information is attached to the CIM0M of the node corresponding to the Va lue value in the first item of the Key-
  • the lookup and forwarding process can be applied to the DHT proxy and the CIM0M proxy of any node in the distributed network.
  • the CIM0M proxy may be further configured to generate a new message identifier according to the message identifier of the request message, the address and port information of the CIM client that initiates the request message, to identify the client that initiates the request message.
  • the CIM0M agent performs a hash operation on the message identifier Mes sageID in the message body of the request message, the address and port information of the CIM client that initiates the request message, and generates a new message identifier NewMes sagelD to identify the request message.
  • the new message identifier corresponding to the message identifier is included, if not, forwarding the request message to the CIMOM of the first node, and saving the new message identifier corresponding to the message identifier to the new message identifier of the first node Table, otherwise, does not forward the request message to the CIMOM of the first node, and after all the determination processing of the CIMOM forwarding request message to the first node is completed, all Va lue values of the Key-Va lue information table of the first node are The corresponding node forwards the request message.
  • the generation and judgment of the foregoing new message identifiers are applicable to all nodes, and are not limited to the first node that receives the CIM client request message, or may be other nodes that receive the request message forwarded by the first node.
  • the CMI client request may be directly received in the request message.
  • the first node address information of the message is such that the CIM0M of each node receiving the request message can return the response message to the CIM0M agent of the first node according to the additional first node address information, and the CIM0M agent will receive the message.
  • the response message is identified as NewMes sagelD
  • the message identifier in the response message is replaced with Mes sagelD and forwarded to the CIM client that initiated the request message.
  • the CIM0M proxy in order for the CIM client to discover the service capability of the node, can perform the service capability release in two ways, namely, the CIM0M service release attribute field that defines the SLP service type and the extended DMTF template.
  • the DHT-CIMOM field is used to indicate the service capabilities of the node.
  • the method and device for acquiring the CIM resource of the present invention can be flexibly managed by the CHT0M in the network according to the DHT algorithm by any node of the distributed network, and can also be connected from any node.
  • the incoming CIM client can obtain CIM resources on a single CIMOM or all CIMOMs in a distributed network, and realizes the acquisition of CIM resources in a large-scale, distributed multi-host environment.
  • the device ie, the node for acquiring the CIM resource in the foregoing embodiment of the present invention may be a network device in the network, or may be a device such as a computer.
  • the agents of the above-mentioned embodiments of the present invention may be functional modules that are executed in the processor of the above device, and the present invention is not limited thereto.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

A method for obtaining Common Information Model (CIM) resources is provided by the present invention. The method generates a Distributed Hash Table network (DHT) network of a Common Information Model Object Manager (CIMOM) by performing Hash calculation to information of intra-network CIMOM by any node in a distributed network, and also provides a procedure for obtaining the CIM resources of the intra-network CIMOM by DHT algorithm. The corresponding apparatus for obtaining the CIM resources is also provided by the present invention. By performing the method and apparatus of the present invention, the CIM resources information of the intra-network CIMOM can be obtained at any node by a CIM client, and the obtaining of the CIM resources under the extensive and distributed multi-host environment is realized.

Description

一种获取 CIM资源的方法和装置  Method and device for acquiring CIM resources

本申请要求于 2011 年 07 月 21 日提交中国专利局、 申请号为 201110205057. 1 , 发明名称为 "一种获取 CIM资源的方法和装置" 的中国 专利申请的优先权, 其全部内容通过引用结合在本申请中。  This application claims priority to Chinese Patent Application No. 201110205057.1, entitled "A Method and Apparatus for Obtaining CIM Resources" on July 21, 2011, the entire contents of which are incorporated by reference. In this application.

技术领域 Technical field

本发明涉及通信网络, 尤其涉及一种获取 CIM资源的方法和装置。 背景技术  The present invention relates to communication networks, and in particular, to a method and apparatus for acquiring CIM resources. Background technique

分布式管理工作组 ( Di s tr ibuted Management Task Force, DMTF )定 义了一套规范和框架来标准化管理应用与各种被管理网元 (Managed Element , ME )之间的接口,现有的通用信息模型( Common Inf ormat ion Mode L CIM )系统中包括 CIM客户端、通用信息模型对象管理器( CIM Object Manager CIM0M )、 CIM提供商插件 ( CIM Provider )和被管理网元, 其中 CIM客户端 是 CIM0M的访问端。 CIM客户端通过标准接口从 CIM0M获取各 ME的模型和 实例数据、 订阅和接收事件。 CIM0M是整个 CIM系统架构的核心, 用于管理 与各 ME相关的模型和实例数据、 接收订阅并转发事件等, 其中 CIM0M管理 的各被管理网元模型和实例数据保存在存储库 Repos i tory中。 CIM提供商 插件是 CIM0M与 ME之间的适配模块, 以插件方式集成在 CIM0M中, 通过与 ME交互获取 ME的实例数据和事件, 并上报至 CIM0M。 被管理网元的信息模 型通过 CIM Infras tructure 规范 ( DMTF 规范文档 DSP0004 , CIM Infras truc ture Spec if ica t ion ) 中定义的 M0F ( Managed Object Forma t ) 格式描述。  The Di s tr ibuted Management Task Force (DMTF) defines a set of specifications and frameworks to standardize the interface between management applications and various managed elements (MEs), existing general information. The Common Inf or Moderation Mode (CIM) system includes a CIM client, a CIM Object Manager (CIM0M), a CIM Provider plugin (CIM Provider), and a managed network element, where the CIM client is CIM0M. The access side. The CIM client obtains model and instance data, subscriptions, and receive events for each ME from the CIM0M through a standard interface. CIM0M is the core of the entire CIM system architecture. It is used to manage model and instance data related to each ME, receive subscriptions and forward events, etc., and each managed network element model and instance data managed by CIM0M are stored in the repository Repos i tory. . The CIM provider plug-in is an adaptation module between the CIM0M and the ME. It is integrated into the CIM0M by means of a plug-in. The ME is used to obtain the instance data and events of the ME and report it to CIM0M. The information model of the managed network element is described by the M0F ( Managed Object Forma t ) format defined in the CIM Infras tructure specification (DMIF Specification Document DSP0004, CIM Infras truncation Spec I ica t ion ).

CIM 客户端与 CIM0M 之间的接口规范包括 CIM-XML (Co匪 on Inf ormat ion Model - Extens ible Markup Language , 在 DMTF规范文档 DSP0200中描述)、 WS-Management ( Web Servi ces for Management , 在 DMTF 规范文档 DSP0226 中描述)、 SM CLP ( Server Management Command Line l Protocol Spec if i cat ion, 在 DMTF规范文档 DSP0214 中描述)。 二者之间 的编程接口主要 于 CIM-XML的 JSR48( Java Spec i f icat ion Reques t 48 , The Java TM API for Web Based Enterpr i se Management )。 The interface specification between CIM client and CIM0M includes CIM-XML (Co匪on Inf ormatometric Model - Extensible Markup Language, described in DMTF specification document DSP0200), WS-Management (Web Services for Management, in DMTF specification). Document DSP0226), SM CLP (Server Management Command Line l) Protocol Spec if i cat ion, described in the DMTF specification document DSP0214). The programming interface between the two is mainly CSR-XML JSR48 (Java Spec if ication Reques t 48, The Java TM API for Web Based Enterpr i se Management).

已有的用于管理多种主机环境下的公共信息模型的方法通过 CIM聚集 器管理多个 CIMOM的接入, CIM聚集器将远程的 CIMOM注册到 CIM聚集器 的本地知识库中, 收到 CIM客户端发送的对 CIM资源的操作请求后, 查询 本地知识库以判断是由本地节点的 CIMOM处理还是由远程 CIMOM处理, 如 果需要远程 CIMOM处理, 则将请求路由转发到远程 CIMOM, 并从所述远程 CIMOM接收结果数据返回给请求发起者。 然而, 该方案存在两点不足:首先, 采用 CIM聚集器作为 CIM0M的接入点, 在 CIM聚集器出现故障时, 会导致 系统不可用; 其次, 在大规模的分布式系统中, CIM聚集器由于注册等操作 而艮难及时获取全网内 CIM0M的动态信息。 发明内容  Existing methods for managing public information models in a variety of host environments manage access to multiple CIMOMs through a CIM aggregator that registers remote CIMOMs into the local knowledge base of the CIM aggregator and receives CIMs. After the client sends an operation request for the CIM resource, the local knowledge base is queried to determine whether it is processed by the local node's CIMOM or by the remote CIMOM. If remote CIMOM processing is required, the request route is forwarded to the remote CIMOM, and from the The remote CIMOM receives the result data and returns it to the request originator. However, there are two shortcomings in this scheme: First, the CIM aggregator is used as the access point of the CIM0M. When the CIM aggregator fails, the system is unavailable; secondly, in a large-scale distributed system, the CIM aggregator Due to the operation such as registration, it is difficult to obtain the dynamic information of CIM0M in the whole network in time. Summary of the invention

本发明所要解决的技术问题在于, 提供一种获取 CIM资源的方法和装 置。  The technical problem to be solved by the present invention is to provide a method and apparatus for acquiring CIM resources.

根据本发明的第一方面, 本发明提供了一种获取通用信息模型 CIM资 源的方法, 所述方法包括:  According to a first aspect of the present invention, the present invention provides a method of obtaining a common information model CIM resource, the method comprising:

第一节点接收 CIM客户端发送的查询 CIM资源的请求消息;  The first node receives the request message for querying the CIM resource sent by the CIM client;

所述第一节点提取所述请求消息中的关键字内容, 根据所述关键字内 容判断所述请求消息是查询单个通用信息模型对象管理器 CIM0M的资源还 是查询所有节点的 CIM0M的资源,  The first node extracts the keyword content in the request message, and determines, according to the keyword content, that the request message is a resource for querying a single general information model object manager CIM0M or a CIM0M resource for querying all nodes.

若查询单个 CIM0M的资源, 则执行步骤 a, 若查询所有节点的 CIM0M的 资源, 则执行步骤 b,  If the resource of a single CIM0M is queried, step a is performed. If the resources of the CIM0M of all nodes are queried, step b is performed.

a , 所述第一节点根据所述关键字内容查找目的 CIMOM的位置信息, 根 据查找到的位置信息将所述请求消息转发至目的 CIM0M , 接收所述目的 CIMOM返回的响应消息 , 并将所述响应消息转发至所述 CIM客户端, b , 所述第一节点查找所有节点的位置信息, 根据查找到的位置信息将 所述请求消息转发至所有节点的 CIMOM,接收所述所有节点的 CIMOM返回的 响应消息, 并将所述响应消息转发至所述 CIM客户端。 a, the first node searches for the location information of the destination CIMOM according to the keyword content, and forwards the request message to the destination CIM0M according to the found location information, and receives the destination. a response message returned by the CIMOM, and forwarding the response message to the CIM client, b, the first node searching for location information of all nodes, and forwarding the request message to all nodes according to the found location information The CIMOM receives a response message returned by the CIMOM of all the nodes, and forwards the response message to the CIM client.

进一步的, 在第一节点接收 CIM客户端发送的查询 CIM资源的请求消 息之前, 所述方法还包括: 所述第一节点对所述第一节点 IP地址进行哈希 运算生成 Va lue值; 根据服务定位协议发现所述第一节点上所有的 CIMOM; 获取所述第一节点上所有的 CIMOM的通用资源标识符 URI或统一资源定位 符 URL , 将所述 URI 或 URL 进行哈希运算得到 Key值以生成 CIMOM 的 Key-Va lue信息表; 将生成的 Key-Va lue信息表发布到分布式哈希表网络。  Further, before the first node receives the request message for querying the CIM resource sent by the CIM client, the method further includes: the first node performing a hash operation on the IP address of the first node to generate a Va lue value; The service location protocol discovers all CIMOMs on the first node; acquires a universal resource identifier URI or a uniform resource locator URL of all CIMOMs on the first node, and hashes the URI or URL to obtain a Key value. To generate a Key-Va lue information table of the CIMOM; publish the generated Key-Va lue information table to the distributed hash table network.

进一步的, 所述步骤 a 包括: 所述第一节点对所述请求消息中的关键 字内容中的 URI或 URL进行哈希运算得到 Key值; 所述第一节点根据所述 Key值和所述分布式哈希表网络中的 Key-Va lue信息表查找对应的 Va lue 值; 所述第一节点将所述请求消息转发至所述 Va lue值对应的目的 CIMOM; 所述第一节点接收所述目的 CIMOM返回的响应消息, 将接收到的响应消息 转发至所述 CIM客户端。  Further, the step a includes: the first node performs a hash operation on the URI or the URL in the keyword content in the request message to obtain a Key value; the first node according to the Key value and the The Key-Va lue information table in the distributed hash table network searches for a corresponding Va lue value; the first node forwards the request message to a destination CIMOM corresponding to the Va lue value; The response message returned by the destination CIMOM forwards the received response message to the CIM client.

进一步的, 所述步骤 b 包括: 所述第一节点将分布式哈希表网络中所 述第一节点的 Key-Va lue信息表的第一项中的 Va lue值作为位置信息查询 结果; 所述第一节点转发所述请求消息到所述位置信息查询结果对应节点 的 CIMOM; 所述第一节点将所述位置信息查询结果对应节点自身维护的 Key-Va lue信息表的第一项中的 Va lue值作为位置信息查询结果,然后重复 上述请求消息转发步骤, 直至第一节点接收到所述位置信息查询结果对应 节点自身维护的 Key-Va lue信息表的第一项中的 Va lue值对应的节点为所 述第一节点; 所述第一节点接收所述所有节点的 CIMOM返回的响应消息, 将所接收到的响应消息转发至所述 CIM客户端。  Further, the step b includes: the first node uses a Va lue value in a first item of the Key-Va lue information table of the first node in the distributed hash table network as a location information query result; The first node forwards the request message to the CIMOM of the node corresponding to the location information query result; the first node compares the location information query result to the first item in the Key-Va lue information table maintained by the node itself The Va lue value is used as the location information query result, and then the request message forwarding step is repeated until the first node receives the location information query result corresponding to the Va lue value in the first item of the Key-Va lue information table maintained by the node itself. The node is the first node; the first node receives a response message returned by the CIMOM of all the nodes, and forwards the received response message to the CIM client.

进一步的, 所述步骤 b 包括: 所述第一节点将分布式哈希表网络中的 所述第一节点的 Key-Va lue信息表的第一项中的 Va lue值作为位置信息查 询结果; 所述第一节点向所述位置信息查询结果对应的节点的 CIM0M转发 接收到的请求消息, 并在所述请求消息中附加所述第一节点地址信息; 以 便于所述第一项中的 Va lue值对应的节点向其自身维护的 Key-Va lue信息 表的第一项中的 Va lue值对应的节点的 CIM0M转发所述附加了所述第一节 点地址信息的请求消息, 以及以便于接收到所述附加了所述第一节点地址 信息的请求消息的各节点向其自身维护的 Key-Va lue信息表的第一项中的 Va 1 ue值对应的节点的 C IM0M转发所述附加了所述第一节点地址信息的请求 消息, 直至接收到上述附加了第一节点地址信息的请求消息的节点自身维 护的 Key-Va lue信息表中的第一项中的 Va lue值对应节点是第一节点; 所 述第一节点接收所述所有节点的 CIM0M根据所述附加的所述第一节点地址 信息返回的响应消息, 将所接收到的响应消息转发至所述 C IM客户端。 Further, the step b includes: the first node in a distributed hash table network The Va lue value in the first item of the Key-Va lue information table of the first node is used as a location information query result; the first node forwards the received request message to the CIM0M of the node corresponding to the location information query result. And appending the first node address information to the request message; so that the node corresponding to the Va lue value in the first item is Va in the first item of the Key-Va lue information table maintained by itself The CIM0M of the node corresponding to the lue value forwards the request message to which the first node address information is attached, and the nodes that receive the request message to which the first node address information is attached are maintained to themselves The CIM0M of the node corresponding to the Va1 ue value in the first item of the Key-Va lue information table forwards the request message to which the first node address information is attached until the above-mentioned first node address information is attached. The Va lue value corresponding node in the first item in the Key-Va lue information table maintained by the node of the request message is the first node; the first node receives the CIM0M of all the nodes according to the attached A node address information response message returned, it forwards the received response message to the C IM client.

进一步的,所述步骤 b还包括:根据所述请求消息的消息标识、所述 CIM 客户端的地址和端口信息生成新消息标识以标识发起请求消息的客户端。  Further, the step b further includes: generating a new message identifier according to the message identifier of the request message, the address and port information of the CIM client, to identify a client that initiates the request message.

进一步的, 所述根据查找到的位置信息将所述请求消息转发至所有节 点的 CIM0M具体包括: 根据所述请求消息中的消息标识查询所述第一节点 的新消息标识表是否包含该消息标识对应的新消息标识; 若不包含, 则向 所述第一节点的 CIM0M转发请求消息, 并将所述消息标识对应的新消息标 识保存于所述第一节点的新消息标识表中; 否则, 不向所述第一节点的 CIM0M转发请求消息。  Further, the CIM0M that forwards the request message to all the nodes according to the found location information specifically includes: querying, according to the message identifier in the request message, whether the new message identifier table of the first node includes the message identifier Corresponding new message identifier; if not, forwarding the request message to the CIM0M of the first node, and saving the new message identifier corresponding to the message identifier in the new message identifier table of the first node; otherwise, The request message is not forwarded to the CIM0M of the first node.

根据本发明第二方面, 本发明提供了一种获取通用信息模型 CIM资源 的装置, 所述装置包括:  According to a second aspect of the present invention, the present invention provides an apparatus for obtaining a common information model CIM resource, the apparatus comprising:

CIM0M代理,用于接收 CIM客户端发送至第一节点的查询 CIM资源的请 求消息, 提取所述请求消息中的关键字内容, 根据所述关键字内容判断所 述请求消息是查询单个通用信息模型对象管理器 CIM0M的资源还是查询所 有节点的 CIM0M的资源; DHT代理, 用于当 CIMMOM代理判断所述请求消息是查询单个 CIM0M的 资源时,根据所述关键字内容查找目的 CIM0M的位置信息;或用于当 CIMMOM 代理判断所述请求消息是查询所有节点 CIM0M的资源时, 查找所有节点的 位置信息; The CIM0M proxy is configured to receive a request message for querying the CIM resource sent by the CIM client to the first node, extract the keyword content in the request message, and determine, according to the keyword content, that the request message is a query for a single universal information model. The resource of the object manager CIM0M is also the resource of the CIM0M of all nodes; a DHT proxy, configured to: when the CIMMOM agent determines that the request message is a resource for querying a single CIM0M, search for location information of the destination CIM0M according to the keyword content; or when the CIMMOM agent determines that the request message is to query all nodes CIM0M Find the location information of all nodes when the resource is used;

CIM0M代理,还用于根据 DHT代理查找的位置信息将所述请求消息转发 至所述位置信息对应的 CIM0M,接收所述位置信息对应的 CIM0M返回的响应 消息, 并将接收到的响应消息转发至所述 C IM客户端。  The CIM0M proxy is further configured to forward the request message to the CIM0M corresponding to the location information according to the location information searched by the DHT proxy, receive a response message returned by the CIM0M corresponding to the location information, and forward the received response message to the The C IM client.

进一步的, 所述 DHT代理还用于对所述第一节点 IP地址进行哈希运算 生成 Va lue值,根据服务定位协议发现所述第一节点上所有的 CIM0M, 获取 所述第一节点上所有的 CIM0M 的通用资源标识符 URI 或统一资源定位符 URL,将所述 URI或 URL进行哈希运算得到 Key值以生成 CIM0M的 Key-Va lue 信息表, 将生成的 Key-Va lue信息表发布到所述分布式哈希表网络。  Further, the DHT proxy is further configured to perform a hash operation on the first node IP address to generate a Va lue value, and discover all CIM0Ms on the first node according to a service location protocol, and obtain all the first nodes. CIM0M's Universal Resource Identifier URI or Uniform Resource Locator URL, hashing the URI or URL to get the Key value to generate the CIM0M Key-Va lue information table, and publishing the generated Key-Va lue information table to The distributed hash table network.

进一步的, 所述 CIM0M代理还用于实现本节点服务能力的发布, 所述 服务能力的发布包括: 定义服务定位协议服务类型 service type: DHT-CIM0M, 依据所述服务定位协议请求 /响应的形式发布节点的服务能力; 或, 在分布式管理工作组定义的模板中增加 service-type=DHT-CIMOM字段 以标明节点的服务能力。  Further, the CIM0M agent is further configured to implement the release of the service capability of the node, where the release of the service capability includes: defining a service location protocol service type service type: DHT-CIM0M, according to the form of the service location protocol request/response Publish the service capability of the node; or, add the service-type=DHT-CIMOM field in the template defined by the distributed management working group to indicate the service capability of the node.

进一步的, 所述 DHT代理根据所述关键字内容查找目的 CIM0M的位置 信息具体包括: 对所述关键字内容中的 URI/URL进行哈希运算得到 Key值; 根据所述 Key值和所述分布式哈希表网络中的 Key-Va lue信息表查找对应 的 Va lue值。  Further, the determining, by the DHT agent, the location information of the destination CIM0M according to the keyword content, the method includes: performing a hash operation on the URI/URL in the keyword content to obtain a Key value; and according to the Key value and the distribution The Key-Va lue information table in the hash table network looks up the corresponding Va lue value.

进一步的, 所述 CIM0M代理还用于根据所述请求消息的消息标识、 所 述 CIM客户端的地址和端口信息生成新消息标识以标识发起请求消息的客 户端。  Further, the CIM0M proxy is further configured to generate a new message identifier according to the message identifier of the request message, the address and port information of the CIM client, to identify a client that initiates the request message.

进一步的, 所述 CIM0M代理根据 DHT代理查找到的位置信息将所述请 求消息转发至所有节点的 CIM0M具体包括: 根据所述请求消息中的消息标 识查询所述第一节点的新消息标识表是否包含该消息标识对应的新消息标 识; 若不包含, 则向所述第一节点的 CIMOM转发请求消息并将所述消息标 识对应的新消息标识保存于所述第一节点的新消息标识表中; 否则, 不向 所述第一节点的 CIMOM转发请求消息。 Further, the CIM0M agent forwarding the request message to the CIM0M of all the nodes according to the location information found by the DHT proxy specifically includes: according to the message identifier in the request message Querying whether the new message identifier table of the first node includes a new message identifier corresponding to the message identifier; if not, forwarding a request message to the CIMOM of the first node and identifying a new message identifier corresponding to the message identifier And saving in the new message identifier table of the first node; otherwise, the request message is not forwarded to the CIMOM of the first node.

进一步的, 当 CIMOM代理判断所述请求消息是查询所有节点的 CIMOM 的资源时, 所述 DHT代理具体用于: 将分布式哈希表网络中所述第一节点 的 Key-Va lue 信息表的第一项中的 Value 值作为位置信息查询结果以便 CIMOM代理转发所述请求消息到所述位置信息查询结果对应节点的 CIMOM, 再将所述位置信息查询结果对应节点自身维护的 Key-Va lue信息表的第一 项中的 Va lue值作为位置信息查询结果以便所述 CIMOM代理重复上述请求 消息转发步骤, 直至所述 DHT代理接收到所述位置信息查询结果对应节点 自身维护的 Key-Va lue信息表的第一项中的 Va lue值对应的节点为所述第 一节点; 或  Further, when the CIMOM agent determines that the request message is a resource for querying CIMOMs of all nodes, the DHT proxy is specifically configured to: use a Key-Va lue information table of the first node in the distributed hash table network The Value value in the first item is used as the location information query result, so that the CIMOM agent forwards the request message to the CIMOM of the corresponding node of the location information query result, and then the location information query result corresponds to the Key-Va lue information maintained by the node itself. The Va lue value in the first item of the table is used as the location information query result, so that the CIMOM agent repeats the above request message forwarding step until the DHT agent receives the Key-Va lue information maintained by the node corresponding to the location information query result. The node corresponding to the Va lue value in the first item of the table is the first node; or

当 CIMOM代理判断所述请求消息是查询所有节点的 CIMOM的资源时, 所述 DHT代理具体用于:将分布式哈希表网络中所述第一节点的 Key-Va lue 信息表的第一项中的 Va lue值作为位置信息查询结果以便 CIMOM代理向所 述位置信息查询结果对应的节点的 CIMOM转发接收到的请求消息以及在所 述请求消息中附加所述第一节点地址信息; 以便于所述第一项中的 Va lue 值对应的节点向其自身维护的 Key-Va lue信息表的第一项中的 Va lue值对 应的节点的 CIMOM转发所述附加了所述第一节点地址信息的请求消息, 以 及以便于接收到所述附加了所述第一节点地址信息的请求消息的各节点向 其自身维护的 Key-Va 1 ue信息表的第一项中的 Va 1 ue值对应的节点的 C IM0M 转发所述附加了所述第一节点地址信息的请求消息, 直至接收到上述附加 了第一节点地址信息的请求消息的节点自身维护的 Key-Va lue信息表中的 第一项中的 Va lue值对应节点是第一节点。  When the CIMOM agent determines that the request message is a resource for querying CIMOMs of all nodes, the DHT agent is specifically configured to: use the first item of the Key-Va lue information table of the first node in the distributed hash table network The Va lue value is used as a result of the location information query so that the CIMOM agent forwards the received request message to the CIMOM of the node corresponding to the location information query result and appends the first node address information to the request message; The node corresponding to the Va lue value in the first item forwards the CIMOM of the node corresponding to the Va lue value in the first item of the Key-Va lue information table maintained by itself to the node to which the first node address information is attached. a request message, and a node corresponding to the Va 1 ue value in the first item of the Key-Va ue information table maintained by each node that has received the request message to which the first node address information is attached The C IM0M forwards the request message to which the first node address information is attached, until the node that receives the request message to which the first node address information is attached is maintained by itself The first item in the Key-Va lue information table corresponding to the value Va lue node is the first node.

实施本发明的方法和装置, 具有如下有益效果: 通过节点上部署的 CIMOM代理和 DHT 代理使得 CIM客户端在任一节点都可以获取网内单个 CIMOM或所有节点的 CIMOM的 CIM资源信息, 实现了在大规模、分布式多主 机环境下 CIM资源的获取。 附图说明 The method and apparatus of the present invention have the following beneficial effects: The CIMOM agent and the DHT agent enable the CIM client to obtain CIM resource information of a single CIMOM or CIMOM of all nodes in the network at any node, thereby realizing the acquisition of CIM resources in a large-scale, distributed multi-host environment. DRAWINGS

为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对 实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员 来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的 附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.

图 1 图示了根据本发明实施方式的获取 CIM资源的装置与 CIM客户端 和 CIM对象管理器的关系示意图。  FIG. 1 is a schematic diagram showing the relationship between a device for acquiring CIM resources and a CIM client and a CIM object manager according to an embodiment of the present invention.

图 1图示了根据本发明实施方式的节点上 CIMOM的发现及信息表发布 流程示意图。  FIG. 1 is a schematic diagram showing a process of discovering CIMOM on a node and publishing a information table according to an embodiment of the present invention.

图 3图示了根据本发明实施方式的获取 CIM资源的方法流程示意图。 图 4图示了根据本发明实施方式的获取 CIM资源的装置的结构示意图。 具体实施方式  FIG. 3 is a schematic flowchart diagram of a method for acquiring CIM resources according to an embodiment of the present invention. FIG. 4 is a schematic structural diagram of an apparatus for acquiring CIM resources according to an embodiment of the present invention. detailed description

下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没 有作出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的 范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.

参见图 1 ,图示了根据本发明实施方式的获取 CIM资源的装置与 CIM客 户端和 CIM对象管理器的关系示意图。 CIM客户端可以通过获取 CIM资源的 装置获取 CIM对象管理器 CIMOM的资源。 其中, CIMOM运行于获取 CIM资源 的装置中,一个获取 C IM资源的装置可以运行一个 C IM0M, 也可以运行多个 CIM0M。 此外, 获取 C IM资源的装置可为在运行 CIM0M的任意一个节点, 其 中节点可以是一台主机或一个虚拟机。 而执行该节点的获取 CIM资源的功 能的 CIM0M代理, DHT代理以及 CIM0M代理都可以由主机的处理器进行。 即 使获取 CIM资源的装置可以为虚拟机, 但该虚拟机仍为运行于计算机处理 器的虚拟机, 因此 CIM0M代理, DHT代理以及 C IM0M代理仍运行于计算机的 处理器中。 Referring to FIG. 1, a schematic diagram of a relationship between a device for acquiring CIM resources and a CIM client and a CIM object manager according to an embodiment of the present invention is illustrated. The CIM client can obtain the resources of the CIM object manager CIMOM through the device that obtains the CIM resource. Among them, CIMOM runs on acquiring CIM resources. In the device, a device that acquires C IM resources can run one C IM0M or multiple CIM0Ms. In addition, the device for obtaining the C IM resource may be any node running CIM0M, where the node may be a host or a virtual machine. The CIM0M agent, the DHT agent, and the CIM0M agent that perform the function of acquiring CIM resources of the node may be performed by the processor of the host. Even though the device that acquires the CIM resource can be a virtual machine, the virtual machine is still a virtual machine running on the computer processor, so the CIM0M agent, the DHT agent, and the CIM0M agent still run in the processor of the computer.

本发明实施方式中提供的获取 CIM资源的方法是通过分布式网络中的 任一节点上来实施的。 具体的, 该方法可以通过节点上的软件形式或软件 同硬件相结合的形式来实现。 为了描述方便, 将接收 CIM客户端发送的查 询 C IM资源的请求消息的节点称为第一节点, 以便与接收第一节点转发的 请求消息的其他节点进行区分, 其中第一节点可以是分布式网络内的任何 一个节点, 并不能将其理解为限制性解释。  The method for obtaining CIM resources provided in the embodiments of the present invention is implemented by using any node in a distributed network. Specifically, the method can be implemented by a software form on a node or a combination of software and hardware. For convenience of description, a node that receives a request message for querying a C IM resource sent by a CIM client is referred to as a first node, so as to distinguish from other nodes that receive a request message forwarded by the first node, where the first node may be distributed. Any node within the network cannot be construed as a restrictive explanation.

本发明实施方式中, 第一节点上获取 CIM资源的装置启动之后, 接收 CIM客户端发送的查询 C IM资源的请求消息之前,还可以包括通过第一节点 上的获取 CIM资源的装置发现第一节点上的 CIM0M和发布所发现的 CIM0M 对应的 Key-Va lue信息表。 参见图 2 , 图示了根据本发明实施方式的节点上 CIM0M的发现及信息表发布流程示意图, 具体可包括:  In the embodiment of the present invention, after the device that acquires the CIM resource on the first node is started, before receiving the request message for querying the CIM resource sent by the CIM client, the device may also include the first device that obtains the CIM resource on the first node. The CIM0M on the node and the Key-Va lue information table corresponding to the discovered CIM0M. Referring to FIG. 2, a schematic diagram of a CIM0M discovery and information table publishing process on a node according to an embodiment of the present invention is illustrated, which may specifically include:

S200 , 对所述第一节点 IP地址进行哈希运算生成 Va lue值;  S200: Perform a hash operation on the first node IP address to generate a Va lue value.

本发明实施方式中, 将第一节点的 IP地址进行哈希运算生成该节点上 的 CIM0M的 Key-Va lue信息表的 Va lue值。  In the embodiment of the present invention, the IP address of the first node is hashed to generate a Va lue value of the Key-Va lue information table of the CIM0M on the node.

S202 , 根据服务定位协议发现所述第一节点上所有的 CIM0M;  S202. Discover all CIM0Ms on the first node according to a service location protocol.

本发明实施方式中, 一个节点上可能运行一个或多个 CIM0M, 其中同一 节点上各 C IM0M之间没有相互关联。 节点即获取 CIM资源的装置可以根据 月良务定位协议 ( Serv i ce Loca t ion Protoco l , SLP )发现同一节点运行的 所有的 CIM0M。 可以采用多播的方法实施, 具体地, 需要将第一节点地址加 入多播地址, 即维护一个只有第一节点地址的多播组, 然后第一节点, 即 获取 CIM资源的装置, 向多播地址中的 CIM0M发送 SLP多播请求; 接收到 SLP多播请求的 CIM0M将其自身的 CIM资源信息以单播形式返回给第一节点 的获取 CIM资源的装置。 In the embodiment of the present invention, one or more CIM0Ms may be running on one node, and each C IM0M on the same node is not associated with each other. The device that obtains the CIM resource by the node can discover all the CIM0Ms running on the same node according to the Servicing Protocol (SLP). Can be implemented by multicast method, specifically, the first node address needs to be added Entering a multicast address, that is, maintaining a multicast group having only the first node address, and then the first node, that is, the device acquiring the CIM resource, sends an SLP multicast request to the CIM0M in the multicast address; receiving the SLP multicast request The CIM0M returns its own CIM resource information in a unicast manner to the device of the first node that acquires the CIM resource.

本发明其他的一些实施方式中, 可以采用在第一节点上增加目录代理 ( Di rec tory Agent )模块的方式实施。具体而言, 第一节点上所有的 CIM0M 向节点上的目录代理模块注册自身的 CIM资源信息。  In some other implementation manners of the present invention, the method may be implemented by adding a Directory Retrieval Agent module on the first node. Specifically, all CIM0Ms on the first node register their own CIM resource information with the directory proxy module on the node.

S204 , 获取所述第一节点上所有的 CIM0M的 URI或 URL, 将所述 URI或 URL进行哈希运算得到 Key值以生成 CIM0M的 Key-Va lue信息表;  S204: Obtain a URI or a URL of all the CIM0Ms on the first node, perform a hash operation on the URI or the URL to obtain a Key value, and generate a Key-Va lue information table of the CIM0M.

本发明实施方式中,如果采用 SLP来发现第一节点上所有的 CIM0M, 第 一节点获取各 CIM0M通过单播形式返回的 CIM资源信息中的 URI或 URL ,将 所获取的 URI或 URL进行哈希运算得到 Key值以生成各 CIM0M的 Key-Va lue 信息表。 如果采用目录代理模块实施 CIM0M的发现, 则第一节点从节点上 的目录代理模块中获取各 CIM0M的 URI或 URL,将所获取的 URI或 URL进行 哈希运算生成 Key值进而生成各 CIM0M的 Key-Va lue信息表。  In the embodiment of the present invention, if the SLP is used to discover all the CIM0Ms on the first node, the first node obtains the URI or URL in the CIM resource information returned by each CIM0M through the unicast form, and hashes the obtained URI or URL. The operation obtains a Key value to generate a Key-Va lue information table for each CIM0M. If the CIM0M discovery is implemented by using the directory proxy module, the first node obtains the URI or URL of each CIM0M from the directory proxy module on the node, and hashes the obtained URI or URL to generate a Key value to generate a Key of each CIM0M. -Va lue information sheet.

S206 , 将生成的 Key-Va lue信息表发布到分布式哈希表网络。  S206. Publish the generated Key-Va lue information table to the distributed hash table network.

本发明实施方式中, 第一节点将生成的各 CIM0M的 Key-Va lue信息表 根据本领域技术人员已知的 DHT算法发布到 CIM0M对应的 DHT网络中, 其 中所述 CIM0M对应的 DHT网络现有的分布式网络。 所述 Key-Va lue信息表 的发布是指将 Key-Va lue信息表按照 DHT算法分散地存储在多个节点上, 每个节点负责存储部分 Key-Va lue信息表, 从而实现整个 DHT网络的寻址 和存储。 每个节点都周期性地运行所述 DHT算法各自对应的检测算法来检 测新加入节点上的 CIM0M或者退出或失效节点上的 CIM0M,从而更新所述每 个节点自身的 Key-Va lue信息表,其中所述 DHT算法包括,但不限于, Chord、 CAN, Tapes try和 Pas try算法。  In the embodiment of the present invention, the first node sends the generated Key-Va lue information table of each CIM0M to the DHT network corresponding to the CIM0M according to the DHT algorithm known to those skilled in the art, where the DHT network corresponding to the CIM0M is existing. Distributed network. The issuance of the Key-Va lue information table refers to storing the Key-Va lue information table in a distributed manner on multiple nodes according to the DHT algorithm, and each node is responsible for storing a part of the Key-Va lue information table, thereby realizing the entire DHT network. Addressing and storage. Each node periodically runs a detection algorithm corresponding to each of the DHT algorithms to detect a CIM0M on a newly joined node or a CIM0M on an exit or a failed node, thereby updating the Key-Va lue information table of each node itself. The DHT algorithm includes, but is not limited to, Chord, CAN, Tapes try and Pas try algorithms.

参见图 6 ,图示了根据本发明实施方式的获取 CIM资源的方法流程示意 图, 所述方法包括步骤: Referring to FIG. 6 , a flow chart of a method for acquiring CIM resources according to an embodiment of the present invention is illustrated. The method includes the steps of:

S400, 第一节点接收 CIM客户端发送的查询 CIM资源的请求消息; 需要指出的是, 第一节点可以是分布式网络内的任何一个节点, 并且 获取 CIM资源的装置可以为分布式网络内的任何一个节点。 本发明实施方 式中的任何一个节点都可以获取 CIM资源。 在第一节点上启动后, 第一节 点就可以执行步骤 400以及后续获取 CIM资源的步骤。 CIM客户端发送的查 询 CIM资源的请求消息, 即 CIM客户端发起的查询单个 CIM0M上的 CIM资 源或所有节点的 CIM0M上的 CIM资源的请求消息, 本文中将查询 CIM资源 的请求消息简称为请求消息, 其格式可以采用 醫 I ( Windows Management Ins t rumentat ion, Windows 管理规范) 标准格式, 也可以采用 WBEM ( Web-Based Enterpr i se Management , 基于 Web的企业管理)标准格式等。  S400, the first node receives the request message for querying the CIM resource sent by the CIM client. It is noted that the first node may be any node in the distributed network, and the device that obtains the CIM resource may be in the distributed network. Any one node. Any node in the implementation of the present invention can acquire CIM resources. After being started on the first node, the first node can perform step 400 and subsequent steps of acquiring CIM resources. The request message for querying the CIM resource sent by the CIM client, that is, the request message for inquiring the CIM resource on the CIM0M or the CIM resource on the CIM0M of all the nodes initiated by the CIM client, the request message for querying the CIM resource is simply referred to as the request. The format of the message can be in the standard format of the Windows Management System (Windows Management Specification) or the WBEM (Web-Based Enterprise Management) standard format.

请求消息包括消息头和消息体, 其中消息体中包括标识请求资源的关 键字内容, 用于标识单个 CIM0M的 URI或 URL信息, 或者标识所有节点的 CIM0M的识别符。 在本发明的实施例中, 可以采用主机地址为 Al lHos tPath 来标识所有节点的 CIM0M;另外还可以采用主机地址为空 (Nul l ) 来标识所 有节点的 CIM0M。 若是查询单个 CIM0M上的 CIM资源, 则所述关键字内容包 含的是标识单个 CIM0M的 URI或 URL信息; 若是查询所有节点的 CIM0M上 的 CIM资源, 则所述关键字内容包含的是标识所有节点的 CIM0M的标识符, 即 Al lHos tPath或 Nul l。  The request message includes a message header and a message body, wherein the message body includes a key content identifying the request resource, a URI or URL information for identifying a single CIM0M, or an identifier of the CIM0M of all nodes. In the embodiment of the present invention, the host address is Al lHos tPath to identify the CIM0M of all nodes; in addition, the host address is null (Nul l ) to identify the CIM0M of all nodes. If the CIM resource on a single CIM0M is queried, the keyword content includes a URI or URL information that identifies a single CIM0M. If the CIM resource on the CIM0M of all nodes is queried, the keyword content includes all nodes. The identifier of the CIM0M, ie Al lHos tPath or Nul l.

S402 , 第一节点提取所述请求消息中的关键字内容, 根据所述关键字 内容判断所述请求消息是查询单个 CIM0M的资源还是查询所有节点的 CIM0M 的资源,若查询单个 CIM0M的资源,则执行步骤 S404 ,若查询所有节点 CIM0M 的资源, 则执行步骤 S406;  S402, the first node extracts the keyword content in the request message, and determines, according to the keyword content, whether the request message is a resource of a single CIM0M or a resource of a CIM0M of all nodes, and if a resource of a single CIM0M is queried, Step S404, if the resources of all nodes CIM0M are queried, step S406 is performed;

本发明实施方式中, 第一节点的获取 CIM资源的装置提取请求消息中 消息体的关键字内容, 并根据所述关键字内容判断请求消息是查询单个 In the embodiment of the present invention, the device that acquires the CIM resource of the first node extracts the keyword content of the message body in the request message, and determines that the request message is a single query according to the keyword content.

CIM0M的资源还是查询所有节点的 CIM0M的资源,若所述关键字内容包含的 是标识单个 CIMOM的 URI或 URL信息, 则判断为查询单个 CIMOM的资源, 执行步骤 S404; 若所述关键字内容包含的是标识所有节点的 CIMOM的标识 符, 则判断为查询所有节点的 CIMOM的资源, 执行步骤 S406。 The CIM0M resource is also a resource for querying CIM0M of all nodes, if the keyword content is included If the URI or the URL information of the single CIMOM is identified, it is determined to query the resources of the single CIMOM, and step S404 is performed. If the keyword content includes the identifier of the CIMOM that identifies all the nodes, it is determined to query the CIMOM of all the nodes. The resource is executed in step S406.

S404 , 第一节点根据所述关键字内容查找目的 CIMOM的位置信息, 根 据查找到的位置信息将所述请求消息转发至目的 CIMOM , 接收所述目的 CIMOM返回的响应消息, 并将所述响应消息转发至所述 CIM客户端;  S404. The first node searches for location information of the destination CIMOM according to the keyword content, forwards the request message to the destination CIMOM according to the found location information, receives a response message returned by the destination CIMOM, and sends the response message. Forwarded to the CIM client;

本发明实施方式中, 第一节点执行的步骤 S404具体可包括:  In the embodiment of the present invention, the step S404 performed by the first node may specifically include:

对所述关键字内容中的 URI或 URL进行哈希运算得到 Key值; 根据所述 Key值和所述 DHT 网络中的 Key-Va lue信息表查找对应的 Va lue值;  Performing a hash operation on the URI or the URL in the keyword content to obtain a Key value; and searching for a corresponding Va lue value according to the Key value and the Key-Va lue information table in the DHT network;

将所述请求消息转发至所述 Va lue值对应的目的 CIM0M;  Forwarding the request message to the destination CIM0M corresponding to the Va lue value;

接收所述目的 CIM0M的响应消息,将接收到的响应消息转发至所述 CIM 客户端;  Receiving a response message of the destination CIM0M, and forwarding the received response message to the CIM client;

在根据 Key值和 DHT网络中的 Key-Va lue信息表查找 Va lue值的过程 中, 可以采用本领域技术人员熟知的分布式哈希表查找算法来提高查找效 率, 并不限于本发明实施方式中提到的 DHT查找算法。 本发明实施方式中, 查找到的 Va lue值对应的是请求消息中请求查询的目的 CIM0M所在节点的 位置信息, 并且通过 Va lue值的生成过程可知, 通过 Va lue值可以确定出 所在节点的 IP地址。 在将请求消息转发至 Va lue值对应的目的 CIM0M后, 接收该目的 CIM0M返回的对请求消息的响应消息, 然后将接收到的响应消 息转发至所述 CIM客户端, 即发起请求消息的 CIM客户端, 其中所述响应 消息包括请求消息中请求查询的 CIM资源信息。  In the process of searching for the Va lue value according to the Key value and the Key-Va lue information table in the DHT network, the distributed hash table search algorithm well known to those skilled in the art may be used to improve the search efficiency, and is not limited to the embodiment of the present invention. The DHT lookup algorithm mentioned in . In the embodiment of the present invention, the found Va lue value corresponds to the location information of the node where the CIM0M of the request message is requested in the request message, and the Va lue value generation process can be used to determine the IP address of the node by using the Va lue value. address. After forwarding the request message to the destination CIM0M corresponding to the Va lue value, receiving the response message to the request message returned by the destination CIM0M, and then forwarding the received response message to the CIM client, that is, the CIM client that initiates the request message End, wherein the response message includes CIM resource information in the request message requesting the query.

S406 , 第一节点查找所有节点的位置信息, 根据查找到的位置信息将 所述请求消息转发至所有节点的 CIM0M,接收所述所有节点的 CIM0M返回的 响应消息, 并将所述响应消息转发至所述 CIM客户端。  S406. The first node searches for location information of all the nodes, forwards the request message to the CIM0M of all nodes according to the found location information, receives a response message returned by the CIM0M of all the nodes, and forwards the response message to The CIM client.

在本发明的实施方式中, 如果请求消息的关键字内容包含的是标识所 有节点的 CIMOM的标识符 Al lHos tPath或 Nul l , 则请求消息请求查询的是 所有节点的 CIMOM上的 CIM资源。 In an embodiment of the present invention, if the keyword content of the request message includes an identifier The identifier of the CIMOM of the node, Al lHos tPath or Nul l , requests the message request to query the CIM resources on the CIMOM of all nodes.

在查找所有节点的位置信息并根据查找到的位置信息将请求消息转发 至所有节点的 CIMOM实施方式中, 由上述 Key-Va lue信息表的发布流程描 述可知, 由于不同节点的 Key-Va lue 信息表可能包括同一 CIMOM 的 Key-Va lue信息表, 为避免向所有节点的 Key-Va lue信息表中对应的 CIMOM 转发请求消息将导致有些 CIMOM 多次收到同一请求消息, 又利用各节点 Key-Va lue信息表中第一项 Va lue值通常不重复的特性,本发明通过仅向节 点 Key-Va lue信息表的第一项中的 Value值对应节点的 CIMOM转发请求消 息来避免上述问题。 本发明实施方式中提供了两种实施例。 第一种实施例 可以采用如下步骤进行处理:  Searching for the location information of all nodes and forwarding the request message to the CIMOM implementation of all nodes according to the found location information, as described in the release process description of the Key-Va lue information table, due to the Key-Va lue information of different nodes The table may include the Key-Va lue information table of the same CIMOM. To avoid forwarding the request message to the corresponding CIMOM in the Key-Va lue information table of all nodes, some CIMOMs will receive the same request message multiple times, and each node Key- The first item Va lue value in the Va lue information table is usually not repeated. The present invention avoids the above problem by forwarding the request message only to the CIMOM corresponding node of the Value value in the first item of the node Key-Va lue information table. Two embodiments are provided in the embodiments of the present invention. The first embodiment can be processed as follows:

将 DHT网络中第一节点的 Key-Va lue信息表的第一项中的 Va lue值作 为位置信息查询结果;  The Va lue value in the first item of the Key-Va lue information table of the first node in the DHT network is used as the location information query result;

转发所述请求消息到所述位置信息查询结果对应节点的 C IM0M; 将所述位置信息查询结果对应节点自身维护的 Key-Va lue信息表的第 一项中的 Va lue值作为位置信息查询结果, 然后重复上述请求消息转发步 骤, 直至请求第一节点接收到所述位置信息查询结果对应节点自身维护的 Key-Va 1 ue信息表的第一项中的 Va 1 ue值对应的节点为所述第一节点;  Forwarding the request message to the CIM0M of the location information query result corresponding node; using the location information query result corresponding to the Va lue value in the first item of the Key-Va lue information table maintained by the node itself as the location information query result And repeating the request message forwarding step, until the node that requests the first node to receive the location information query result corresponding to the Va 1 ue value in the first item of the Key-Va ue information table maintained by the node itself is the First node;

接收所述所有节点的 CIM0M回传的响应消息, 将所接收到的响应消息 转发至所述 CIM客户端。  Receiving a response message of the CIM0M backhaul of all the nodes, and forwarding the received response message to the CIM client.

具体地, 接收请求消息的第一节点 (为方便描述, 简称为 "N1" 节点, 此处仅为方便描述, 并且可以采用任何其他的符号进行表示, 不应将其理 解为限制性解释。 )将 N1节点的 Key-Va lue信息表(该 Key-Va lue信息表 可包括一个节点的 CIM0M或一个以上节点的 CIM0M的 Key-Va lue信息) 的 第一项中的 Va lue值作为请求消息的目的 CIM0M的位置信息查询结果, 然 后向位置信息查询结果对应节点(即 N1节点 Key-Va lue信息表中的下一节 点, 简称为 "N2" 节点) 的 CIMOM转发请求消息, 即: N1->N2 , 并获取 N2 返回的位置信息查询结果, 即 N2节点自身维护的 Key-Va lue信息表的第一 项中的 Va lue值。 然后第一节点将 N2节点自身维护的 Key-Va lue信息表的 第一项中的 Va lue值作为请求消息的目的 CIMOM的位置信息查询结果, 向 N2节点 Key-Va lue信息表中的第一项中的 Va lue值对应节点(简称为 "N3" 节点) 的 CIMOM转发请求消息, 即: N1->N3。 如此继续, 第一节点不断地 将接收到请求消息的节点的 Key-Va lue信息表中的第一项中的 Va lue值作 为位置信息查询结果, 直至接收到请求消息的节点的 Key-Va lue信息表中 的第一项中的 Va lue值对应节点是接收 CIM客户端请求消息的初始节点 N1。 需要说明的是, 在请求消息转发过程中, 在获知位置信息 Va lue值之后, 本领域技术人员可采用已知的技术手段将请求消息转发至 Va lue值对应节 点上的 CIM0M。第一节点的获取 CIM资源的装置接收已接收到请求消息的各 CIM0M返回的响应消息,然后将接收到的响应消息转发至发起请求的 CIM客 户端, 其中所述响应消息包括请求消息请求查询的 CIM资源信息。 需要说 明的是,获取 CIM资源的装置在将接收到的响应消息转发至发起请求的 CIM 客户端的过程中, 可以在接收到 CIM0M返回的响应消息后就将返回的该条 响应消息转发至发起请求的 CIM客户端, 也可以在接收到同一节点上所有 CIM0M (一个节点上可包括一个以上 CIM0M )返回的所有响应消息后将同一 节点上所有 CIM0M的响应消息打包为一条响应消息转发至发起请求的 CIM 客户端。 Specifically, the first node that receives the request message (referred to as "N1" node for convenience of description, is merely for convenience of description, and may be represented by any other symbol, and should not be construed as a restrictive explanation.) The Va lue value in the first item of the Key-Va lue information table of the N1 node (the Key-Va lue information table may include the CIM0M of one node or the Key-Va lue information of the CIM0M of one or more nodes) as the request message Purpose CIM0M location information query result, and then query the location corresponding node to the location information (ie, the next section in the N1 node Key-Va lue information table) The CIMOM forwarding request message, which is referred to as the "N2" node, is: N1->N2, and obtains the location information query result returned by N2, that is, in the first item of the Key-Va lue information table maintained by the N2 node itself. Va lue value. Then, the first node uses the Va lue value in the first item of the Key-Va lue information table maintained by the N2 node as the location information query result of the destination CIMOM of the request message, and the first in the N2 node Key-Va lue information table. The Va lue value in the entry corresponds to the CIMOM forwarding request message of the node (referred to as the "N3" node), namely: N1->N3. So, the first node continually uses the Va lue value in the first item in the Key-Va lue information table of the node that received the request message as the location information query result until the Key-Va lue of the node that received the request message The Va lue value corresponding node in the first item in the information table is the initial node N1 that receives the CIM client request message. It should be noted that, in the request message forwarding process, after the location information Va lue value is learned, a person skilled in the art may use a known technical means to forward the request message to the CIM0M on the corresponding node of the Va lue value. The device for acquiring the CIM resource of the first node receives the response message returned by each CIM0M that has received the request message, and then forwards the received response message to the CIM client that initiated the request, where the response message includes the request message requesting the query. CIM resource information. It should be noted that, in the process of forwarding the received response message to the CIM client that initiated the request, the device that obtains the CIM resource may forward the returned response message to the initiation request after receiving the response message returned by the CIM0M. The CIM client can also package all CIM0M response messages on the same node into a response message and forward it to the requesting request after receiving all the response messages returned by all CIM0Ms on the same node (more than one CIM0M can be included on one node). CIM client.

第二种实施例的具体步骤可以包括:  Specific steps of the second embodiment may include:

第一节点将分布式哈希表网络中第一节点的 Key-Va lue信息表的第一 项中的 Va lue值作为位置信息查询结果;  The first node uses the Va lue value in the first item of the Key-Va lue information table of the first node in the distributed hash table network as the location information query result;

第一节点向所述位置信息查询结果对应节点的 CIM0M转发接收到的请 求消息, 并在所述请求消息中附加第一节点地址信息;  The first node forwards the received request message to the CIM0M of the corresponding node of the location information query result, and adds the first node address information to the request message;

所述第一项中的 Va lue值对应节点向其自身维护的 Key-Va lue信息表 的第一项中的 Va lue值对应节点的 CIMOM转发所述附加了第一节点地址信 息的请求消息; The Va lue value in the first item corresponds to the Key-Va lue information table maintained by the node to itself. The Va lue value in the first item corresponds to the CIMOM of the node forwarding the request message to which the first node address information is attached;

接收到所述附加了第一节点地址信息的请求消息的各节点向其自身维 护的 Key-Va lue信息表的第一项中的 Va lue值对应节点的 CIMOM转发所述 附加了第一节点地址信息的请求消息, 直至接收到上述附加了第一节点地 址信息的请求消息的节点自身维护的 Key-Va lue 信息表中的第一项中的 Va lue值对应节点是第一节点;  Each node that receives the request message to which the first node address information is attached forwards the first node address to the CIMOM of the corresponding node of the Va lue value in the first item of the Key-Va lue information table maintained by itself a request message of information, until the Va lue value corresponding node in the first item in the Key-Va lue information table maintained by the node itself that receives the request message to which the first node address information is attached is the first node;

第一节点接收所述所有节点的 CIMOM根据所述附加的第一节点地址信 息返回的响应消息, 将所接收到的响应消息转发至所述 C IM客户端。  The first node receives the response message returned by the CIMOM of all the nodes according to the additional first node address information, and forwards the received response message to the C IM client.

具体而言, 可以向 DHT 网络中第一节点 (为方便描述, 简称为 "K1" 节点) 的 Key-Va lue信息表的第一项中的 Va lue 值(其中, 第一节点的 Key-Va lue信息表的第一项中的 Va lue值为位置信息查询结果)对应节点(简 称为 "K2" 节点) 的 CIM0M转发附加了 K1节点地址信息的请求消息, 即: K1->K2 ,然后 Κ2节点的获取 CIM资源的装置向 Κ2节点自身维护的 Key-Va lue 信息表的第一项中的 Va lue值对应节点(简称为 "K3,,节点)转发附加了 K1 节点地址信息的请求消息, 即: Κ2->Κ3 , 接收到所述附加了 K1节点地址信 息的请求消息的各节点上的获取 C ΙΜ资源的装置向其自身维护的 Key- Va 1 ue 信息表的第一项中的 Va lue值对应节点的 CIM0M转发所述附加了 K1节点地 址信息的请求消息, 直至接收到上述附加了 K1 节点地址信息的节点的 Key-Va lue信息表中的第一项中的 Va lue值对应节点是 K1节点。 已接收到 请求消息的各 CIM0M可根据请求消息中附加的节点地址信息将响应消息返 回至第一节点的获取 CIM资源的装置, 第一节点的获取 CIM资源的装置在 接收到各 CIM0M返回的响应消息, 可以在接收到响应消息后就将所接收到 的响应消息转发到发起请求的 CIM客户端, 也可以在接收到同一节点上所 有 CIM0M (同一节点上可包括一个以上 CIM0M )的所有响应消息后将所述所 有的响应消息打包为一条响应消息转发至发起请求的 C IM客户端。 本发明实施方式中, 除了可采用上述两种实施例之外, 还可以采用生 成新节点标识的方式在向所有节点的 Key-Va lue信息表中所有 Va lue值对 应节点的 CIM0M转发请求消息的过程中避免有些 CIM0M多次收到同一请求 消息。 Specifically, the Va lue value in the first item of the Key-Va lue information table of the first node (referred to as a "K1" node for convenience of description) in the DHT network (where the Key-Va of the first node) The Va lue value in the first item of the lue information table is the result of the location information query. The corresponding node (referred to as the "K2" node) forwards the request message to which the K1 node address information is attached, that is, K1->K2, then Κ2 The device for acquiring the CIM resource of the node forwards the request message to which the K1 node address information is attached to the Va lue value corresponding node (referred to as "K3, node") in the first item of the Key-Va lue information table maintained by the node 2 itself. That is: Κ2->Κ3, the Va in the first item of the Key-Va ue information table maintained by the device that acquires the C ΙΜ resource on each node of the request message to which the K1 node address information is attached is received The CIM0M corresponding to the node of the lue value forwards the request message to which the K1 node address information is attached, until the Va lue value corresponding node in the first item in the Key-Va lue information table of the node to which the K1 node address information is attached is received. Is the K1 node. Received The CIM0M of the request message may return the response message to the device for acquiring the CIM resource of the first node according to the node address information attached to the request message, and the device that obtains the CIM resource of the first node receives the response message returned by each CIM0M, and may After receiving the response message, the received response message is forwarded to the CIM client that initiated the request, and may also receive all the response messages of all CIM0Ms (which may include more than one CIM0M on the same node) on the same node. All response messages are packaged as a response message forwarded to the CIM client that initiated the request. In the embodiment of the present invention, in addition to the foregoing two embodiments, the CIM0M forwarding request message of all Va lue value corresponding nodes in the Key-Va lue information table of all nodes may be generated by generating a new node identifier. Avoid some CIM0Ms receiving the same request message multiple times during the process.

本发明实施方式中, 不同节点的 Key-Va lue 信息表中可能存有同一 In the embodiment of the present invention, the same may exist in the Key-Va lue information table of different nodes.

CIM0M的 Key-Va lue信息表,换而言之, 同一 CIM0M的 Key-Va lue信息表可 以保存在多个节点的 Key-Va lue信息表中。 在向所有节点的 Key-Va lue信 息表中对应的 CIM0M 转发请求消息的过程中, 会由于同一 CIM0M 的 Key-Va lue信息保存在多个节点的 Key-Va lue信息表中而使同一 CIM0M多次 收到所述多个节点各自转发的请求消息。 The Key-Va lue information table of CIM0M, in other words, the Key-Va lue information table of the same CIM0M can be stored in the Key-Va lue information table of multiple nodes. In the process of forwarding the request message to the corresponding CIM0M in the Key-Va lue information table of all the nodes, the same CIM0M is saved because the Key-Va lue information of the same CIM0M is stored in the Key-Va lue information table of the multiple nodes. The request message forwarded by each of the plurality of nodes is received.

为避免上述情况发生, 第一节点通过根据所述请求消息的消息标识 Mes sagelD, 发起请求消息的 CIM客户端的地址和端口信息生成新消息标识 NewMes sagelD 以标识发起请求消息的客户端, 然后将 Mes sagelD 和 NewMes sagelD保存在第一节点的 Mes sagelD和 NewMes sagelD对应表,即新 消息标识表, 表中 Mes sagelD和 NewMes sagelD—一对应, 并将请求消息中 的消息标识替换为 NewMes sagelD。在将请求消息的转发至所有节点的 CIM0M 的过程中, 根据请求消息中的消息标识查询所述第一节点的新消息标识表 是否包含该消息标识对应的新消息标识, 若不包含, 则向所述第一节点的 CIM0M转发请求消息,并将所述消息标识对应的新消息标识保存至所述第一 节点的新消息标识表, 否则, 不向所述第一节点的 CIM0M转发请求消息。 第一节点在是否向第一节点上的 CIM0M转发请求消息的判断处理完成后, 向第一节点的 Key-Va lue信息表的对应 CIM0M转发请求消息。  To avoid the above situation, the first node generates a new message identifier NewMes sagelD to identify the client that initiated the request message by identifying the Mes sagelD according to the message of the request message, the address and port information of the CIM client that initiated the request message, and then the Mes The sagelD and NewMes sagelD are stored in the first node's Mes sagelD and NewMes sagelD correspondence tables, namely the new message identification table, Mes sagelD and NewMes sagelD - in the table, and replace the message identifier in the request message with NewMes sagelD. In the process of forwarding the request message to the CIM0M of all the nodes, querying, according to the message identifier in the request message, whether the new message identifier table of the first node includes a new message identifier corresponding to the message identifier, and if not, The CIM0M of the first node forwards the request message, and saves the new message identifier corresponding to the message identifier to the new message identifier table of the first node. Otherwise, the request message is not forwarded to the CIM0M of the first node. After determining, by the first node, whether the CIM0M forwarding request message on the first node is processed, the first node forwards the request message to the corresponding CIM0M of the Key-Va lue information table of the first node.

需要指出的是, 上述新消息标识的生成及判断适用于所有的节点, 并 不限于接收 CIM客户端请求消息的第一节点, 也可以是接收第一节点转发 的请求消息的其他节点。 采用上述新消息标识来标识 CIM客户端的方式在 将请求消息转发至所有节点的信息表的所有 Va lue值对应节点的 CIM0M的 过程中, 可以采用在所述请求消息中附加接收 CIM客户端请求消息的第一 节点地址信息的方式来使接收到请求消息的各节点的 CIM0M可以根据所述 附加的第一节点地址信息将响应消息返回。 第一节点的获取 CIM资源的装 置将接收到的消息标识为 NewMes sagelD的响应消息时, 将响应消息中的消 息标识替换为 Mes sagelD并转发至发起请求消息的 CIM客户端。 It should be noted that the generation and judgment of the foregoing new message identifiers are applicable to all nodes, and are not limited to the first node that receives the CIM client request message, or may be other nodes that receive the request message forwarded by the first node. The manner in which the CIM client is identified by using the above new message identifier is to forward the request message to all the Va lue values of the information table of all nodes corresponding to the CIM0M of the node. In the process, the first node address information of the CIM client request message may be additionally received in the request message, so that the CIM0M of each node that receives the request message may respond according to the additional first node address information. The message is returned. When the device that acquires the CIM resource of the first node identifies the received message as a response message of NewMes sagelD, the message identifier in the response message is replaced with Mes sagelD and forwarded to the CIM client that initiates the request message.

本发明实施方式中, 可以根据所述请求消息的消息体中的消息标识 Mes sagelD, 发起请求消息的 CIM客户端的地址和端口信息生成新消息标识 NewMes sagelD, 以标识发起请求消息的客户端。 具体的, 可以通过对所述 请求消息的消息体中的消息标识 Mes sageID、发起请求消息的 CIM客户端的 地址和端口信息进行 Hash运算生成新消息标识 NewMes sagelD以标识发起 请求消息的客户端。 在本发明的一种实施例中, 请求消息中的消息标识为 Mes sageID= 、、 87872 " , 可 以 通 过 NewMes sageID=Hash ( 、、 87872+10. 138. 73. 32+5900 " ) =5986324501 生成 NewMes sagelD , 其中 10. 138. 73. 32为客户端的地址信息, 5900为端口信息。  In the embodiment of the present invention, the new message identifier NewMes sagelD may be generated according to the message identifier Mes sagelD in the message body of the request message, and the address and port information of the CIM client that initiates the request message to identify the client that initiated the request message. Specifically, the new message identifier NewMes sagelD may be generated by using the message identifier Mes sageID in the message body of the request message, the address of the CIM client that initiates the request message, and the port information to identify the client that initiates the request message. In an embodiment of the present invention, the message identifier in the request message is Mes sageID= , 87872 " and can be generated by NewMes sageID=Hash ( , , 87872+10. 138. 73. 32+5900 " ) =5986324501 NewMes sagelD, where 10. 138. 73. 32 is the address information of the client, and 5900 is the port information.

以上结合附图对本发明的获取 CIM资源的方法进行了阐述, 下面将结 合附图对本发明的获取 CIM资源的装置进行说明。  The method for acquiring CIM resources of the present invention is described above with reference to the accompanying drawings. The apparatus for acquiring CIM resources of the present invention will be described below with reference to the accompanying drawings.

参见图 4 ,图示了根据本发明实施方式的获取 CIM资源的装置的结构示 意图, 获取 CIM资源的装置 400可以为运行 CIM0M的第一节点, 具体可包 括:  Referring to FIG. 4, a schematic diagram of an apparatus for acquiring a CIM resource according to an embodiment of the present invention is illustrated. The apparatus 400 for acquiring a CIM resource may be a first node that runs the CIM0M, and specifically includes:

CIM0M代理 502 , 用于接收 CIM客户端发送至第一节点的查询 CIM资源 的请求消息, 提取所述请求消息中的关键字内容, 根据所述关键字内容判 断所述请求消息是查询单个通用信息模型对象管理器 CIM0M的资源还是查 询所有节点的 C IM0M的资源;  The CIM0M proxy 502 is configured to receive a request message for querying a CIM resource sent by the CIM client to the first node, extract a keyword content in the request message, and determine, according to the keyword content, that the request message is a query for a single general information. The resource of the model object manager CIM0M is also the resource of the C IM0M of all nodes;

DHT代理 504 ,用于当 CIMM0M代理判断所述请求消息是查询单个 CIM0M 的资源时, 根据所述关键字内容查找目的 CIM0M 的位置信息; 或用于当 CIMM0M代理判断所述请求消息是查询所有节点 C IM0M的资源时, 查找所有 节点的位置信息; The DHT proxy 504 is configured to: when the CIMM0M agent determines that the request message is a resource for querying a single CIM0M, search for location information of the target CIM0M according to the keyword content; or when the CIMM0M agent determines that the request message is to query all nodes. When looking for resources of C IM0M, find all Location information of the node;

CIMOM代理 502 , 还用于根据 DHT代理查找的位置信息将所述请求消息 转发至所述位置信息对应的 CIM0M,接收所述位置信息对应的 CIM0M返回的 响应消息, 并将接收到的响应消息转发至所述 CIM客户端。  The CIMOM proxy 502 is further configured to forward the request message to the CIM0M corresponding to the location information according to the location information searched by the DHT proxy, receive the response message returned by the CIM0M corresponding to the location information, and forward the received response message. To the CIM client.

本发明的实施方式中, CIM0M代理(CIMOM Agent )接收 CIM客户端发 送的查询 CIM资源的请求消息, 对请求消息进行解析来提取消息体中的关 键字内容, 并根据提取的关键字内容判断请求消息是查询单个 CIM0M上的 CIM资源还是查询所有节点的 CIM0M上的 CIM资源。其中所述关键字内容包 括 URI或 URL或标识所有 CIM0M的识别符, 在本发明实施方式中, 所述标 识所有 CIM0M的识别符为 Al lHos tPath或 Nul l。若关键字内容为 URI或 URL 信息, 则该请求消息是查询单个 CIM0M 上的 CIM 资源, 若关键字内容为 Al lHos tPath或 Nul l , 则该请求消息是查询所有 CIM0M上的 CIM资源。  In the embodiment of the present invention, the CIMOM Agent (CIMOM Agent) receives the request message for querying the CIM resource sent by the CIM client, parses the request message to extract the keyword content in the message body, and determines the request according to the extracted keyword content. The message is to query CIM resources on a single CIM0M or to query CIM resources on CIM0M of all nodes. The keyword content includes a URI or a URL or an identifier that identifies all CIM0Ms. In the embodiment of the present invention, the identifiers of all CIM0Ms are Al lHos tPath or Nul l. If the content of the keyword is URI or URL information, the request message is a CIM resource on a single CIM0M. If the content of the keyword is Al lHos tPath or Nul l , the request message is a CIM resource on all CIM0Ms.

本发明提供的 DHT代理不仅可以用于实现上述查找功能, 还可以用于 实现节点上 CIM0M的发现和信息表发布, 具体可包括:  The DHT agent provided by the present invention can be used not only to implement the above-mentioned search function, but also to implement the discovery of the CIM0M on the node and the release of the information table.

对第一节点 IP地址进行 Hash运算生成 Va lue值;  Hashing the first node IP address to generate a Va lue value;

根据服务定位协议请求发现所述第一节点上所有的 CIM0M;  Allocating all CIM0Ms on the first node according to the service location protocol request;

获取所述第一节点上所有的 CIM0M的 URI或 URL,将所述 URI或 URL进 行 Hash运算得到 Key值以生成 CIM0M的 Key-Va lue信息表;  Obtaining a URI or a URL of all the CIM0Ms on the first node, performing a Hash operation on the URI or the URL to obtain a Key value to generate a Key-Va lue information table of the CIM0M;

将生成的 Key-Va lue信息表发布到 DHT网络。  Publish the generated Key-Va lue information table to the DHT network.

本发明实施方式中, DHT网络是指将 CIM0M的 URI或 URL进行哈希运算 生成 Key值以及 CIM0M所在节点的 IP地址进行哈希运算生成 Va lue组成 Key-Va lue信息表而构成的网络。  In the embodiment of the present invention, the DHT network is a network formed by hashing the URI or URL of the CIM0M to generate a Key value and an IP address of a node where the CIM0M is located, and generating a Key-Va lue information table by generating a Va lue.

本发明实施方式中, 一个节点上可能运行多个 CIM0M。一个节点上可能 运行一个或多个 CIM0M, 其中同一节点上各 CIMOM之间没有相互关联。 节点 即获取 CIM资源的装置可以根据服务定位协议发现同一节点运行的所有的 In the embodiment of the present invention, multiple CIM0Ms may be running on one node. One or more CIM0Ms may be running on a node, where there is no correlation between CIMOMs on the same node. A device that acquires a CIM resource can discover all the same nodes running according to the service location protocol.

CIM0M。 可以采用多播的方法实施, 具体地, 需要将第一节点地址加入多播 地址, 即维护一个只有第一节点地址的多播组, 然后第一节点, 即获取 CIM 资源的装置, 向多播地址中的 CIMOM发送 SLP多播请求; 接收到 SLP多播 请求的 CIMOM将其自身的 CIM资源信息以单播形式返回给第一节点的 DHT 代理; DHT代理获取各 CIMOM的 URI或 URL, 将所述 URI或 URL进行 Hash 运算得到 Key值, 进而生成 CIMOM对应的 Key-Va lue信息表, 然后将生成 的 Key-Va lue信息表根据 DHT算法发布到 DHT网络,所述发布是指将由 Key 值唯一标识的 CIMOM上的 CIM资源信息按照 DHT算法分散地存储在多个节 点上, 每个节点负责存储一小部分 Key-Va lue信息表, 从而实现整个 DHT 网络的寻址和存储, 每个节点上的 DHT代理都周期性地运行所述 DHT算法 各自对应的检测算法来检测新加入节点上的 CIM0M或者退出 /失效节点上的 CIM0M, 从而更新所述每个节点自身的 Key-Va lue信息表, 其中所述 DHT算 法包括, 但不限于, Chord, CAN, Tapes try和 Pas try算法。 CIM0M. Can be implemented by multicasting, specifically, the first node address needs to be added to the multicast Address, that is, maintaining a multicast group having only the first node address, and then the first node, that is, the device acquiring the CIM resource, sends an SLP multicast request to the CIMOM in the multicast address; the CIMOM receiving the SLP multicast request will The CIM resource information of the CIM is returned to the DHT proxy of the first node in a unicast manner; the DHT proxy obtains the URI or URL of each CIMOM, performs a hash operation on the URI or the URL to obtain a Key value, and generates a Key-Va lue corresponding to the CIMOM. The information table is then distributed to the DHT network according to the DHT algorithm, and the CIM resource information on the CIMOM uniquely identified by the Key value is stored in a plurality of nodes according to the DHT algorithm. Each node is responsible for storing a small number of Key-Va lue information tables, thereby realizing addressing and storage of the entire DHT network, and the DHT agents on each node periodically run the respective detection algorithms corresponding to the DHT algorithms to detect new ones. Adding a CIM0M on the node or a CIM0M on the exit/failed node, thereby updating the Key-Va lue information table of each node itself, wherein the DHT algorithm includes, but is not limited to, Chord, CAN, Tapes try and Pas try algorithms.

在本发明的实施方式中, 同一节点上运行的所有 CIM0M资源信息的发 现除了可以上述多播形式实施外, 还可以采用在节点上增加目录代理模块 的方式实施。 具体而言, 第一节点上运行的所有的 CIM0M向目录代理模块 注册自身的 CIM资源信息, 然后 DHT代理从目录代理模块中提取 CIM0M注 册的资源信息, 从提取的资源信息中获取 CIM0M的 URI或 URL, 将获取的 URI或 URL进行 Hash运算得到 Key值, 进而生成 CIM0M的 Key-Va lue信息 表, 然后将生成的 Key-Va lue信息表发布到 DHT网络。 需要说明的是, 虽 然实施方式中以第一节点为例进行描述, 但是所有节点上都可以采用上述 方式来发现节点上运行的所有的 CIM0M。  In the embodiment of the present invention, the discovery of all CIM0M resource information running on the same node may be implemented by adding a directory proxy module to the node, in addition to being implemented in the above multicast manner. Specifically, all CIM0Ms running on the first node register their own CIM resource information with the directory proxy module, and then the DHT proxy extracts the CIM0M registered resource information from the directory proxy module, and obtains the CIM0M URI or the extracted resource information. The URL, the obtained URI or URL is hashed to obtain a Key value, and then a Key-Va lue information table of CIM0M is generated, and then the generated Key-Va lue information table is published to the DHT network. It should be noted that although the first node is taken as an example in the embodiment, all the CIM0Ms running on the node can be found on all nodes in the above manner.

本发明实施方式中, 若是查询单个 CIM0M上的 CIM资源, 则 DHT代理 根据关键词内容中的 URI或 URL查找目的 CIM0M的位置信息, 具体地, 包 括: 对所述关键字内容中的 URI或 URL进行 Hash运算得到 Key值; 根据所 述 Key值和 DHT网络中的 Key-Va lue信息表查找对应的 Va lue值,其中 Va lue 值为请求消息中请求查询的目的 CIM0M的位置信息。 在 DHT代理查询到目 的 CIMOM的位置信息后, CIMOM代理将请求消息转发至 Va lue值对应的目的 CIMOM, 接收目的 CIMOM返回的响应消息, 并将接收到的响应消息转发至发 起请求消息的 CIM客户端。 In the embodiment of the present invention, if the CIM resource on the single CIM0M is queried, the DHT proxy searches for the location information of the destination CIM0M according to the URI or the URL in the keyword content, and specifically includes: a URI or a URL in the keyword content. Performing a hash operation to obtain a Key value; searching for a corresponding Va lue value according to the Key value and a Key-Va lue information table in the DHT network, where the Va lue value is a location information of a destination CIM0M requesting a query in the request message. In the DHT agent query to the destination After the location information of the CIMOM, the CIMOM proxy forwards the request message to the destination CIMOM corresponding to the Va lue value, receives the response message returned by the destination CIMOM, and forwards the received response message to the CIM client that initiated the request message.

若是查询所有节点 CIMOM的资源, DHT代理查找 DHT网络内所有节点的 位置信息, CIMOM代理将根据 DHT代理查找的位置信息转发请求消息,接收 返回的响应消息, 并将接收到的响应消息转发至发起请求的 CIM客户端。  If the resources of all nodes CIMOM are queried, the DHT agent searches for location information of all nodes in the DHT network, and the CIMOM agent forwards the request message according to the location information searched by the DHT proxy, receives the returned response message, and forwards the received response message to the originating message. The requested CIM client.

在查找所有节点的位置信息并根据查找到的位置信息将请求消息转发 至所有节点的 CIMOM实施方式中, 由上述 Key-Va lue信息表的发布流程描 述可知, 由于不同节点的 Key-Va lue 信息表可能包括同一 CIMOM 的 Key-Va lue信息表, 为避免向所有节点的 Key-Va lue信息表中对应的 CIM0M 转发请求消息将导致有些 CIM0M 多次收到同一请求消息, 又利用各节点 Key-Va lue信息表中第一项 Va lue值通常不重复的特性,本发明通过仅向节 点 Key-Va lue信息表的第一项中的 Value值对应节点的 CIM0M转发请求消 息来避免上述问题。 本发明实施方式中提供了两种实施例。  Searching for the location information of all nodes and forwarding the request message to the CIMOM implementation of all nodes according to the found location information, as described in the release process description of the Key-Va lue information table, due to the Key-Va lue information of different nodes The table may include the Key-Va lue information table of the same CIMOM. To avoid forwarding the request message to the corresponding CIM0M in the Key-Va lue information table of all nodes, some CIM0Ms may receive the same request message multiple times, and each node Key- The first item Va lue value in the Va lue information table is usually not repeated. The present invention avoids the above problem by forwarding the request message only to the CIM0M corresponding to the value of the node in the first item of the node Key-Va lue information table. Two embodiments are provided in the embodiments of the present invention.

第一种实施例可包括步骤: 第一节点的 DHT代理将分布式哈希表网络 中所述第一节点的 Key-Va lue信息表的第一项中的 Va lue值作为位置信息 查询结果以便第一节点的 CIM0M代理转发所述请求消息到所述位置信息查 询结果对应节点的 CIM0M,第一节点的 DHT代理再将所述位置信息查询结果 对应节点自身维护的 Key-Va lue信息表的第一项中的 Va lue值作为位置信 息查询结果以便第一节点的 CIM0M代理重复上述请求消息转发步骤(即转 发所述请求消息到所述位置信息查询结果对应节点的 CIM0M的转发步骤), 直至第一节点的 DHT代理接收到所述位置信息查询结果对应节点自身维护 的 Key-Va lue信息表的第一项中的 Va lue值对应的节点为所述第一节点。  The first embodiment may include the steps: the DHT proxy of the first node uses the Va lue value in the first item of the Key-Va lue information table of the first node in the distributed hash table network as the location information query result so that The CIM0M proxy of the first node forwards the request message to the CIM0M of the node corresponding to the location information query result, and the DHT proxy of the first node further compares the location information query result to the Key-Va lue information table maintained by the node itself. The Va lue value in one item is used as the location information query result, so that the CIM0M agent of the first node repeats the foregoing request message forwarding step (that is, the forwarding step of forwarding the request message to the CIM0M corresponding to the location information query result node), until the The node corresponding to the Va lue value in the first item of the Key-Va lue information table maintained by the node corresponding to the location information query result is the first node.

第二实施例可包括步骤: 第一节点的 DHT代理将分布式哈希表网络中 所述第一节点的 Key-Va lue信息表的第一项中的 Va lue值作为位置信息查 询结果以便第一节点的 CIM0M代理向所述位置信息查询结果对应的节点的 CIMOM 转发接收到的请求消息以及在所述请求消息中附加所述第一节点地 址信息; 以便于所述第一项中的 Va lue 值对应的节点向其自身维护的 Key-Va lue信息表的第一项中的 Va lue值对应的节点的 CIM0M转发所述附加 了所述第一节点地址信息的请求消息, 以及以便于接收到所述附加了所述 第一节点地址信息的请求消息的各节点向其自身维护的 Key-Va lue信息表 的第一项中的 Va lue值对应的节点的 CIM0M转发所述附加了所述第一节点 地址信息的请求消息, 直至接收到上述附加了第一节点地址信息的请求消 息的节点自身维护的 Key-Va lue信息表中的第一项中的 Va lue值对应节点 是第一节点。 The second embodiment may include the following steps: the DHT proxy of the first node uses the Va lue value in the first item of the Key-Va lue information table of the first node in the distributed hash table network as the location information query result. a node's CIM0M agent queries the node corresponding to the location information query result The CIMOM forwards the received request message and appends the first node address information to the request message; to facilitate the node corresponding to the Va lue value in the first item to maintain the Key-Va lue information table of itself The CIM0M of the node corresponding to the Va lue value in the first item forwards the request message to which the first node address information is attached, and in order to receive the request message to which the first node address information is attached The node forwards the request message to which the first node address information is attached to the CIM0M of the node corresponding to the Va lue value in the first item of the Key-Va lue information table maintained by itself, until receiving the above-mentioned attached first message The Va lue value corresponding node in the first item in the Key-Va lue information table maintained by the node of the request message of the node address information is the first node.

需要说明的是, 虽然上述第一种实施例和第二种实施例的描述是以第 一节点为例, 此查找和转发过程可应用于分布式网络内任一节点的 DHT代 理和 CIM0M代理。  It should be noted that although the foregoing description of the first embodiment and the second embodiment is based on the first node, the lookup and forwarding process can be applied to the DHT proxy and the CIM0M proxy of any node in the distributed network.

本发明实施方式中, CIM0M代理还可以用于根据所述请求消息的消息标 识、 发起请求消息的 CIM客户端的地址和端口信息生成新消息标识以标识 发起请求消息的客户端。 通过此功能, 在向所有节点的 CIM0M转发请求消 息的过程中采用向所有节点的 Key-Va lue信息表中所有 Va lue值对应节点 的 CIM0M转发请求消息时, 可避免有些节点的 CIM0M多次收到同一请求消 自  In the embodiment of the present invention, the CIM0M proxy may be further configured to generate a new message identifier according to the message identifier of the request message, the address and port information of the CIM client that initiates the request message, to identify the client that initiates the request message. Through this function, when the CIM0M forwarding request message corresponding to all Va lue value nodes in the Key-Va lue information table of all nodes is used in the process of forwarding the request message to the CIM0M of all nodes, the CIM0M of some nodes can be avoided from being received multiple times. To the same request

本发明实施方式中, CIM0M代理通过对所述请求消息的消息体中的消息 标识 Mes sageID、 发起请求消息的 CIM客户端的地址和端口信息进行 Hash 运算生成新消息标识 NewMes sagelD以标识发起请求消息的客户端。 在本发 明的一种实施例中, 请求消息中的消息标识为 Mes sageID= 、、 87872" ,可以 通过 NewMes sageID=Hash ( " 87872+10. 138. 73. 32+5900" ) =5986324501 生成 NewMes sagelD, 其中 10. 138. 73. 32为客户端的地址信息, 5900为端 口信息。 可以将 Mes sagelD和 NewMes sagelD保存至第一节点上 Mes sagelD 和 NewMes sagelD 的对应表, 即新消息标识表, 表中 Mes sagelD 和 NewMes sagelD一一对应,并将请求消息中的消息标识替换为 NewMes sageID。 在第一节点的 CIMOM代理根据第一节点的 DHT代理查找到的位置信息将请 求消息转发至所有节点的 CIMOM的过程中, 根据请求消息中的消息标识查 询所述第一节点的新消息标识表是否包括该消息标识对应的新消息标识, 若不包括, 则向所述第一节点的 CIMOM转发请求消息, 并将所述消息标识 对应的新消息标识保存至所述第一节点的新消息标识表, 否则, 不向所述 第一节点的 CIMOM转发请求消息, 在是否向第一节点的 CIMOM转发请求消 息的判断处理完成后, 向第一节点的 Key-Va lue信息表的所有 Va lue值对 应节点转发请求消息。 需要指出的是, 上述新消息标识的生成及判断适用 于所有的节点, 并不限于接收 CIM客户端请求消息的第一节点, 也可以是 接收第一节点转发的请求消息的其他节点。采用上述新消息标识来标识 CIM 客户端的方式在将请求消息转发至所有节点的信息表的所有 Va lue值对应 节点的 CIM0M的过程中, 可以采用在所述请求消息中附加直接接收 CIM客 户端请求消息的第一节点地址信息的方式来使接收到请求消息的各节点的 CIM0M 可以根据所述附加的第一节点地址信息将响应消息返回至第一节点 的 CIM0M代理, CIM0M代理将接收到的消息标识为 NewMes sagelD的响应消 息时, 将响应消息中的消息标识替换为 Mes sagelD并转发至发起请求消息 的 CIM客户端。 In the embodiment of the present invention, the CIM0M agent performs a hash operation on the message identifier Mes sageID in the message body of the request message, the address and port information of the CIM client that initiates the request message, and generates a new message identifier NewMes sagelD to identify the request message. Client. In an embodiment of the present invention, the message identifier in the request message is Mes sageID= , 87872", and NewMes can be generated by NewMes sageID=Hash (" 87872+10. 138. 73. 32+5900" ) =5986324501 sagelD, where 10. 138. 73. 32 is the client's address information, 5900 is the port information. Mes sagelD and NewMes sagelD can be saved to the corresponding table of Mes sagelD and NewMes sagelD on the first node, ie the new message identification table, table Mes sagelD and NewMes sagelD corresponds one-to-one and replaces the message ID in the request message with NewMes sageID. In the process that the CIMOM agent of the first node forwards the request message to the CIMOM of all the nodes according to the location information found by the DHT proxy of the first node, and queries the new message identifier table of the first node according to the message identifier in the request message. Whether the new message identifier corresponding to the message identifier is included, if not, forwarding the request message to the CIMOM of the first node, and saving the new message identifier corresponding to the message identifier to the new message identifier of the first node Table, otherwise, does not forward the request message to the CIMOM of the first node, and after all the determination processing of the CIMOM forwarding request message to the first node is completed, all Va lue values of the Key-Va lue information table of the first node are The corresponding node forwards the request message. It should be noted that the generation and judgment of the foregoing new message identifiers are applicable to all nodes, and are not limited to the first node that receives the CIM client request message, or may be other nodes that receive the request message forwarded by the first node. In the process of using the new message identifier to identify the CIM client, in the process of forwarding the request message to the CIM0M of the node corresponding to all the Va lue values of the information table of all the nodes, the CMI client request may be directly received in the request message. The first node address information of the message is such that the CIM0M of each node receiving the request message can return the response message to the CIM0M agent of the first node according to the additional first node address information, and the CIM0M agent will receive the message. When the response message is identified as NewMes sagelD, the message identifier in the response message is replaced with Mes sagelD and forwarded to the CIM client that initiated the request message.

在本发明的实施方式中,为了使 CIM客户端发现节点的服务能力, CIM0M 代理可以采用两种方式进行服务能力发布, 分别为定义 SLP服务类型和扩 展 DMTF模板的 CIM0M服务发布属性字段。 具体而言, 包括: 定义服务定位 协议服务类型 service type: DHT-CIM0M, 依据所述服务定位协议请求 /响 应的形式发布节点的服务能力; 或, 在 DMTF 定义的模板中增加 serv ice-type=DHT-CIMOM字段以标明节点的服务能力。  In the embodiment of the present invention, in order for the CIM client to discover the service capability of the node, the CIM0M proxy can perform the service capability release in two ways, namely, the CIM0M service release attribute field that defines the SLP service type and the extended DMTF template. Specifically, the method includes: defining a service location protocol service type service type: DHT-CIM0M, and publishing a service capability of the node according to the service location protocol request/response; or adding a serv ice-type= to a template defined by the DMTF The DHT-CIMOM field is used to indicate the service capabilities of the node.

实施本发明的获取 CIM资源的方法和装置, 通过分布式网络的任一节 点对网内 CIM0M按照 DHT算法进行灵活管理, 同时还可以使从任一节点接 入的 CIM客户端都可以获取分布式网络内单个 CIMOM上或所有 CIMOM上 CIM 资源, 实现了在大规模、 分布式多主机环境下 CIM资源的获取。 The method and device for acquiring the CIM resource of the present invention can be flexibly managed by the CHT0M in the network according to the DHT algorithm by any node of the distributed network, and can also be connected from any node. The incoming CIM client can obtain CIM resources on a single CIMOM or all CIMOMs in a distributed network, and realizes the acquisition of CIM resources in a large-scale, distributed multi-host environment.

此外, 本发明上述实施例中的获取 CIM资源的装置(即节点), 本可以 是网络中的网络设备, 也可以是计算机等设备。 本发明上述实施例的各代 理(如 CIMOM代理, DHT代理)都可以为运行于上述设备的处理器中的功能 模块, 本发明在此不做限定。  In addition, the device (ie, the node) for acquiring the CIM resource in the foregoing embodiment of the present invention may be a network device in the network, or may be a device such as a computer. The agents of the above-mentioned embodiments of the present invention (such as the CIMOM agent, the DHT agent) may be functional modules that are executed in the processor of the above device, and the present invention is not limited thereto.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流 程, 是可以通过计算机程序来指令相关的硬件来完成, 所述的程序可存储 于一计算机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的 实施例的流程。 其中, 所述的存储介质可为磁碟、 光盘、 只读存储记忆体 ( Read-Only Memory, ROM )或随机存储记忆体 ( Random Acces s Memory, RAM )等。  A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. In execution, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

以上所述是本发明的优选实施方式, 应当指出, 对于本领域普通技术 人员而言, 在不脱离本发明原理的前提下, 还可以做出若干改进和变化, 这些改进和变化也视为本发明的保护范围。  The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can make several improvements and changes without departing from the principles of the present invention. The scope of protection of the invention.

Claims

权利要求 Rights request 1、 一种获取通用信息模型 CIM资源的方法, 其特征在于, 所述方法包 括:  A method for obtaining a common information model CIM resource, the method comprising: 第一节点接收 CIM客户端发送的查询 CIM资源的请求消息;  The first node receives the request message for querying the CIM resource sent by the CIM client; 所述第一节点提取所述请求消息中的关键字内容, 根据所述关键字内 容判断所述请求消息是查询单个通用信息模型对象管理器 CIMOM的资源 还是查询所有节点的 CIMOM的资源,  The first node extracts the keyword content in the request message, and determines, according to the keyword content, whether the request message is a resource for querying a single general information model object manager CIMOM or a CIMOM resource of all nodes. 若查询单个 CIMOM的资源, 则执行步骤 a, 若查询所有节点的 CIMOM 的资源, 则执行步骤 b,  If the resource of a single CIMOM is queried, step a is performed. If the resources of the CIMOM of all nodes are queried, step b is performed. a, 所述第一节点根据所述关键字内容查找目的 CIMOM的位置信息, 根据查找到的位置信息将所述请求消息转发至目的 CIMOM, 接收所述目的 CIMOM返回的响应消息, 并将所述响应消息转发至所述 CIM客户端, b, 所述第一节点查找所有节点的位置信息, 根据查找到的位置信息将 所述请求消息转发至所有节点的 CIMOM, 接收所述所有节点的 CIMOM返 回的响应消息, 并将所述响应消息转发至所述 CIM客户端。  a first node searches for the location information of the destination CIMOM according to the keyword content, forwards the request message to the destination CIMOM according to the found location information, receives a response message returned by the destination CIMOM, and The response message is forwarded to the CIM client, b, the first node searches for location information of all nodes, forwards the request message to the CIMOM of all nodes according to the found location information, and receives the CIMOM return of all the nodes. a response message and forward the response message to the CIM client. 2、 如权利要求 1所述的方法, 其特征在于, 在第一节点接收 CIM客户 端发送的查询 CIM资源的请求消息之前, 所述方法还包括: 2. The method according to claim 1, wherein before the first node receives the request message for querying the CIM resource sent by the CIM client, the method further includes: 所述第一节点对所述第一节点 IP地址进行哈希运算生成 Value值; 根据服务定位协议发现所述第一节点上所有的 CIMOM;  The first node performs a hash operation on the first node IP address to generate a Value value; and discovers all CIMOMs on the first node according to a service location protocol; 获取所述第一节点上所有的 CIMOM的通用资源标识符 URI或统一资源 定位符 URL, 将所述 URI或 URL进行哈希运算得到 Key值以生成 CIMOM的 Key- Value信息表;  Obtaining a universal resource identifier URI or a uniform resource locator URL of all CIMOMs on the first node, and hashing the URI or URL to obtain a Key value to generate a Key-Value information table of the CIMOM; 将生成的 Key- Value信息表发布到分布式哈希表网络。  Publish the generated Key-Value information table to the distributed hash table network. 3、 如权利要求 2所述的方法, 其特征在于, 所述步骤 a包括: 所述第一节点对所述请求消息中的关键字内容中的 URI或 URL进行哈 希运算得到 Key值; 3. The method according to claim 2, wherein the step a comprises: The first node performs a hash operation on the URI or the URL in the keyword content in the request message to obtain a Key value; 所述第一节点根据所述 Key值和所述分布式哈希表网络中的 Key- Value 信息表查找对应的 Value值;  The first node searches for a corresponding Value value according to the Key value and a Key-Value information table in the distributed hash table network; 所述第一节点将所述请求消息转发至所述 Value值对应的目的 CIMOM; 所述第一节点接收所述目的 CIMOM返回的响应消息,将接收到的响应 消息转发至所述 CIM客户端。  The first node forwards the request message to the destination CIMOM corresponding to the value of the value; the first node receives the response message returned by the destination CIMOM, and forwards the received response message to the CIM client. 4、 如权利要求 2所述的方法, 其特征在于, 所述步骤 b包括: 4. The method of claim 2, wherein the step b comprises: 所述第一节点将分布式哈希表网络中所述第一节点的 Key- Value信息 表的第一项中的 Value值作为位置信息查询结果;  The first node uses the Value value in the first item of the Key-Value information table of the first node in the distributed hash table network as the location information query result; 所述第一节点转发所述请求消息到所述位置信息查询结果对应节点的 CIMOM;  The first node forwards the request message to a CIMOM of a node corresponding to the location information query result; 所述第一节点将所述位置信息查询结果对应节点自身维护的 Key- Value信息表的第一项中的 Value值作为位置信息查询结果,然后重复上 述请求消息转发步骤, 直至第一节点接收到所述位置信息查询结果对应节 点自身维护的 Key-Value信息表的第一项中的 Value值对应的节点为所述第 一节点;  The first node uses the value of the location information query result corresponding to the value of the first item in the Key-Value information table maintained by the node as the location information query result, and then repeats the request message forwarding step until the first node receives the The node corresponding to the value of the value in the first item of the Key-Value information table maintained by the node itself is the first node; 所述第一节点接收所述所有节点的 CIMOM返回的响应消息,将所接收 到的响应消息转发至所述 CIM客户端。  The first node receives a response message returned by the CIMOM of all the nodes, and forwards the received response message to the CIM client. 5、 如权利要求 2所述的方法, 其特征在于, 所述步骤 b包括: 5. The method of claim 2, wherein the step b comprises: 所述第一节点将分布式哈希表网络中的所述第一节点的 Key-Value信 息表的第一项中的 Value值作为位置信息查询结果;  The first node uses the Value value in the first item of the Key-Value information table of the first node in the distributed hash table network as the location information query result; 所述第一节点向所述位置信息查询结果对应的节点的 CIMOM转发接 收到的请求消息, 并在所述请求消息中附加所述第一节点地址信息; 以便 于所述第一项中的 Value值对应的节点向其自身维护的 Key- Value信息表的 第一项中的 Value值对应的节点的 CIMOM转发所述附加了所述第一节点地 址信息的请求消息, 以及以便于接收到所述附加了所述第一节点地址信息 的请求消息的各节点向其自身维护的 Key- Value信息表的第一项中的 Value 值对应的节点的 CIMOM转发所述附加了所述第一节点地址信息的请求消 息, 直至接收到上述附加了第一节点地址信息的请求消息的节点自身维护 的 Key- Value信息表中的第一项中的 Value值对应节点是第一节点; The first node forwards the received request message to the CIMOM of the node corresponding to the location information query result, and attaches the first node address information to the request message; The node corresponding to the Value value in the first item forwards the request to which the first node address information is attached to the CIMOM of the node corresponding to the Value value in the first item of the Key-Value information table maintained by itself. a message, and a node that facilitates receiving the request message to which the first node address information is attached, forwards the CIMOM of the node corresponding to the Value value in the first item of the Key-Value information table maintained by itself a request message to which the first node address information is attached, until the value corresponding to the value in the first item in the Key-Value information table maintained by the node itself to which the request message to which the first node address information is attached is received is the first One node 所述第一节点接收所述所有节点的 CIMOM根据所述附加的所述第一 节点地址信息返回的响应消息,将所接收到的响应消息转发至所述 CIM客户 端。  The first node receives the response message returned by the CIMOM of all the nodes according to the attached first node address information, and forwards the received response message to the CIM client. 6、 如权利要求 2所述的方法, 其特征在于, 所述步骤 b还包括: 根据所述请求消息的消息标识、 所述 CIM客户端的地址和端口信息生 成新消息标识以标识发起请求消息的客户端。  The method of claim 2, wherein the step b further comprises: generating a new message identifier according to the message identifier of the request message, the address of the CIM client, and port information to identify the request message. Client. 7、 如权利要求 6所述的方法, 其特征在于, 所述根据查找到的位置信 息将所述请求消息转发至所有节点的 CIMOM具体包括: The method of claim 6, wherein the CIMOM that forwards the request message to all nodes according to the found location information specifically includes: 根据所述请求消息中的消息标识查询所述第一节点的新消息标识表是 否包含该消息标识对应的新消息标识,  Determining, according to the message identifier in the request message, whether the new message identifier table of the first node includes a new message identifier corresponding to the message identifier, 若不包含, 则向所述第一节点的 CIMOM转发请求消息, 并将所述消息 标识对应的新消息标识保存于所述第一节点的新消息标识表中,  If not included, the request message is forwarded to the CIMOM of the first node, and the new message identifier corresponding to the message identifier is saved in the new message identifier table of the first node, 否则, 不向所述第一节点的 CIMOM转发请求消息。  Otherwise, the request message is not forwarded to the CIMOM of the first node. 8、 一种获取通用信息模型 CIM资源的装置, 其特征在于, 所述装置包 括: 8. An apparatus for obtaining a common information model CIM resource, the apparatus comprising: CIMOM代理, 用于接收 CIM客户端发送至第一节点的查询 CIM资源的 请求消息, 提取所述请求消息中的关键字内容, 根据所述关键字内容判断 所述请求消息是查询单个通用信息模型对象管理器 CIMOM的资源还是查 询所有节点的 CIMOM的资源; a CIMOM proxy, configured to receive a request message for querying a CIM resource sent by the CIM client to the first node, extract a keyword content in the request message, and determine, according to the keyword content The request message is a resource for querying a single general information model object manager CIMOM or a resource for querying CIMOM of all nodes; DHT代理, 用于当 CIMMOM代理判断所述请求消息是查询单个 CIMOM的资源时, 根据所述关键字内容查找目的 CIMOM的位置信息; 或 用于当 CIMMOM代理判断所述请求消息是查询所有节点 CIMOM的资源时, 查找所有节点的位置信息;  a DHT proxy, configured to: when the CIMMOM agent determines that the request message is a resource for querying a single CIMOM, search for location information of the target CIMOM according to the keyword content; or for when the CIMMOM agent determines that the request message is to query all nodes CIMOM Find the location information of all nodes when the resource is used; CIMOM代理,还用于根据 DHT代理查找的位置信息将所述请求消息转 发至所述位置信息对应的 CIMOM, 接收所述位置信息对应的 CIMOM返回 的响应消息, 并将接收到的响应消息转发至所述 CIM客户端。  The CIMOM proxy is further configured to: forward the request message to the CIMOM corresponding to the location information according to the location information of the DHT proxy search, receive a response message returned by the CIMOM corresponding to the location information, and forward the received response message to the The CIM client. 9、 如权利要求 8所述的装置, 其特征在于, 所述 DHT代理还用于对所 述第一节点 IP地址进行哈希运算生成 Value值, 根据服务定位协议发现所述 第一节点上所有的 CIMOM, 获取所述第一节点上所有的 CIMOM的通用资 源标识符 URI或统一资源定位符 URL , 将所述 URI或 URL进行哈希运算得到 Key值以生成 CIMOM的 Key- Value信息表, 将生成的 Key- Value信息表发布 到所述分布式哈希表网络。 The device according to claim 8, wherein the DHT proxy is further configured to perform a hash operation on the first node IP address to generate a Value value, and discover all the first nodes according to a service positioning protocol. CIMOM, obtaining a universal resource identifier URI or a uniform resource locator URL of all CIMOMs on the first node, hashing the URI or URL to obtain a Key value to generate a CIMOM Key-Value information table, The generated Key-Value information table is published to the distributed hash table network. 10、 如权利要求 9所述的装置, 其特征在于, 所述 CIMOM代理还用于 实现本节点服务能力的发布, 所述服务能力的发布包括: The device according to claim 9, wherein the CIMOM agent is further configured to implement the release of the service capability of the node, and the release of the service capability includes: 定义服务定位协议服务类型 service type: DHT-CIMOM, 依据所述服务 定位协议请求 /响应的形式发布节点的服务能力; 或, 在分布式管理工作组 定义的模板中增加 service-type=DHT-CIMOM字段以标明节点的服务能力。  Defining the service location protocol service type service type: DHT-CIMOM, publishing the service capability of the node according to the service location protocol request/response; or adding service-type=DHT-CIMOM to the template defined by the distributed management working group Field to indicate the service capabilities of the node. 11、 如权利要求 9所述的装置, 其特征在于, 所述 DHT代理根据所述关 键字内容查找目的 CIMOM的位置信息具体包括: The device according to claim 9, wherein the DHT agent searches for the location information of the destination CIMOM according to the keyword content, and specifically includes: 对所述关键字内容中的 URI/URL进行哈希运算得到 Key值; 根据所述 Key值和所述分布式哈希表网络中的 Key- Value信息表查找对 应的 Value值。 Performing a hash operation on the URI/URL in the keyword content to obtain a Key value; And searching for a corresponding Value value according to the Key value and a Key-Value information table in the distributed hash table network. 12、 如权利要求 9所述的装置, 其特征在于, 所述 CIMOM代理还用于 根据所述请求消息的消息标识、所述 CIM客户端的地址和端口信息生成新消 息标识以标识发起请求消息的客户端。 The device according to claim 9, wherein the CIMOM proxy is further configured to generate a new message identifier according to the message identifier of the request message, the address and port information of the CIM client, to identify the request message. Client. 13、如权利要求 12所述的装置,其特征在于,所述 CIMOM代理根据 DHT 代理查找到的位置信息将所述请求消息转发至所有节点的 CIMOM具体包 括: The device according to claim 12, wherein the CIMOM agent forwards the request message to all nodes according to the location information found by the DHT agent, and specifically includes: 根据所述请求消息中的消息标识查询所述第一节点的新消息标识表是 否包含该消息标识对应的新消息标识,  Determining, according to the message identifier in the request message, whether the new message identifier table of the first node includes a new message identifier corresponding to the message identifier, 若不包含, 则向所述第一节点的 CIMOM转发请求消息, 并将所述消息 标识对应的新消息标识保存于所述第一节点的新消息标识表中,  If not included, the request message is forwarded to the CIMOM of the first node, and the new message identifier corresponding to the message identifier is saved in the new message identifier table of the first node, 否则, 不向所述第一节点的 CIMOM转发请求消息。  Otherwise, the request message is not forwarded to the CIMOM of the first node. 14、 如权利要求 9所述的装置, 其特征在于, 14. Apparatus according to claim 9 wherein: 当 CIMOM代理判断所述请求消息是查询所有节点的 CIMOM的资源 时, 所述 DHT代理具体用于: 将分布式哈希表网络中所述第一节点的 Key- Value信息表的第一项中的 Value值作为位置信息查询结果以便 CIMOM 代理转发所述请求消息到所述位置信息查询结果对应节点的 CIMOM , 再将 所述位置信息查询结果对应节点自身维护的 Key- Value信息表的第一项中的 Value值作为位置信息查询结果以便所述 CIMOM代理重复上述请求消息转 发步骤, 直至所述 DHT代理接收到所述位置信息查询结果对应节点自身维 护的 Key- Value信息表的第一项中的 Value值对应的节点为所述第一节点;或 当 CIMOM代理判断所述请求消息是查询所有节点的 CIMOM的资源 时, 所述 DHT代理具体用于: 将分布式哈希表网络中所述第一节点的 When the CIMOM agent determines that the request message is a resource for querying CIMOMs of all nodes, the DHT proxy is specifically configured to: in a first item of the Key-Value information table of the first node in the distributed hash table network The Value value is used as the location information query result, so that the CIMOM proxy forwards the request message to the CIMOM of the corresponding node of the location information query result, and then the location information query result corresponds to the first item of the Key-Value information table maintained by the node itself. The value of the value is used as the result of the location information query, so that the CIMOM agent repeats the request message forwarding step, until the DHT agent receives the location information query result in the first item of the Key-Value information table maintained by the node itself. The node corresponding to the Value value is the first node; or when the CIMOM agent determines that the request message is a resource for querying CIMOMs of all nodes The DHT proxy is specifically configured to: use the first node in the distributed hash table network Key- Value信息表的第一项中的 Value值作为位置信息查询结果以便 CIMOM 代理向所述位置信息查询结果对应的节点的 CIMOM转发接收到的请求消 息以及在所述请求消息中附加所述第一节点地址信息; 以便于所述第一项 中的 Value值对应的节点向其自身维护的 Key- Value信息表的第一项中的 Value值对应的节点的 CIMOM转发所述附加了所述第一节点地址信息的请 求消息, 以及以便于接收到所述附加了所述第一节点地址信息的请求消息 的各节点向其自身维护的 Key- Value信息表的第一项中的 Value值对应的节 点的 CIMOM转发所述附加了所述第一节点地址信息的请求消息, 直至接收 到上述附加了第一节点地址信息的请求消息的节点自身维护的 Key- Value信 息表中的第一项中的 Value值对应节点是第一节点。 The value of the value in the first item of the Key-Value information table is used as a result of the location information query, so that the CIMOM agent forwards the received request message to the CIMOM of the node corresponding to the location information query result, and attaches the first message to the request message. a node address information; wherein the node corresponding to the Value value in the first item is forwarded to the CIMOM of the node corresponding to the Value value in the first item of the Key-Value information table maintained by itself; a request message of a node address information, and a value corresponding to a value in the first item of the Key-Value information table maintained by the nodes that are received by the node to which the first node address information is attached The CIMOM of the node forwards the request message to which the first node address information is attached until the first item in the Key-Value information table maintained by the node itself that receives the request message to which the first node address information is attached is received. The value corresponding to the node is the first node.
PCT/CN2012/073543 2011-07-21 2012-04-05 Method and apparatus for obtaining cim resources WO2012167660A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110205057.1A CN102891763B (en) 2011-07-21 2011-07-21 A kind of method and apparatus obtaining CIM resource
CN201110205057.1 2011-07-21

Publications (1)

Publication Number Publication Date
WO2012167660A1 true WO2012167660A1 (en) 2012-12-13

Family

ID=47295456

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/073543 WO2012167660A1 (en) 2011-07-21 2012-04-05 Method and apparatus for obtaining cim resources

Country Status (2)

Country Link
CN (1) CN102891763B (en)
WO (1) WO2012167660A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239428A (en) * 2014-08-26 2014-12-24 国家电网公司 IEC61970 (international electrotechnical commission 61970) CIM (common information model) data query access method
CN110022222B (en) * 2018-01-10 2022-02-25 中兴通讯股份有限公司 Management method, network node, management node and system of DHT network
CN109446103A (en) * 2018-11-14 2019-03-08 郑州云海信息技术有限公司 A kind of CIM Provider test method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1523817A (en) * 2003-02-20 2004-08-25 �Ҵ���˾ Method and system for managing devices in a network
CN1921413A (en) * 2005-08-25 2007-02-28 国际商业机器公司 Method and system for unified support of multiple system management information models in a multiple host environment
CN101917452A (en) * 2008-09-29 2010-12-15 英特尔公司 Platform Discovery Using Network Services in a Preboot Environment
CN101989923A (en) * 2009-07-31 2011-03-23 国际商业机器公司 Method and system for registering computer integrated manufacturing (CIM) agency to management agency and management system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1523817A (en) * 2003-02-20 2004-08-25 �Ҵ���˾ Method and system for managing devices in a network
CN1921413A (en) * 2005-08-25 2007-02-28 国际商业机器公司 Method and system for unified support of multiple system management information models in a multiple host environment
CN101917452A (en) * 2008-09-29 2010-12-15 英特尔公司 Platform Discovery Using Network Services in a Preboot Environment
CN101989923A (en) * 2009-07-31 2011-03-23 国际商业机器公司 Method and system for registering computer integrated manufacturing (CIM) agency to management agency and management system

Also Published As

Publication number Publication date
CN102891763A (en) 2013-01-23
CN102891763B (en) 2016-03-09

Similar Documents

Publication Publication Date Title
US7978631B1 (en) Method and apparatus for encoding and mapping of virtual addresses for clusters
RU2409846C2 (en) Organising resources into collections to facilitate efficient and reliable resource access
JP7634561B2 (en) MESSAGE PROCESSING METHOD AND APPARATUS, NOTIFICATION METHOD AND APPARATUS, NETWORK BRIDGE NODE, SOURCE DEVICE, STORAGE MEDIUM AND MESSAGE PROCESSING SYSTEM
WO2019095889A1 (en) Method and device for discovering nf by nrf, and readable storage medium
US10637794B2 (en) Resource subscription method, resource subscription apparatus, and resource subscription system
US20090319686A1 (en) Communication route selecting method and apparatus
US20190222656A1 (en) Communication Method and Apparatus
WO2009111965A1 (en) Method, device and system of data synchronization
WO2019223661A1 (en) Application identifier identification method, device and system
WO2009062414A1 (en) Integrate client and method of desktop application communicating with net web application
CN103347087B (en) The service registry of a kind of structural P 2 P and UDDI and lookup method and system
JP2009540462A (en) Service discovery using compile scope
EP3054625B1 (en) M2m data query and scheduling method, query and scheduling device and system
CN102594885B (en) Sensor network resolves interoperation A platform, sensor network interoperability methods and system
CN101911593B (en) Network location service methods, devices and systems
CN112533177A (en) Method, device, apparatus and medium for providing and discovering moving edge calculation
CN115622938A (en) Computing power service processing method, device and system
WO2012167660A1 (en) Method and apparatus for obtaining cim resources
CN103841183A (en) SMI-S Provider registration request method oriented to data center
CN103546327A (en) A Method of Establishing JXTA-Based Mixed Topology Network Management Model
Moritz et al. Devices profile for web services in wireless sensor networks: Adaptations and enhancements
WO2015003420A1 (en) Resource deployment method for cloud computing environment
CN104376014A (en) Structured P2P network resource publishing and querying method
US10404659B2 (en) Optimization of resource URLs in machine-to-machine networks
CN105025042B (en) A kind of method and system of determining data information, proxy server

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12797182

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12797182

Country of ref document: EP

Kind code of ref document: A1