WO2010091564A1 - 一种获取节点信息的方法、服务器以及系统 - Google Patents

一种获取节点信息的方法、服务器以及系统 Download PDF

Info

Publication number
WO2010091564A1
WO2010091564A1 PCT/CN2009/072944 CN2009072944W WO2010091564A1 WO 2010091564 A1 WO2010091564 A1 WO 2010091564A1 CN 2009072944 W CN2009072944 W CN 2009072944W WO 2010091564 A1 WO2010091564 A1 WO 2010091564A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
request
information
markup language
node information
Prior art date
Application number
PCT/CN2009/072944
Other languages
English (en)
French (fr)
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 WO2010091564A1 publication Critical patent/WO2010091564A1/zh

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
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0266Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]
    • 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
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0853Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, a server, and a system for acquiring node information.
  • XCAP Extensible Markup Language Configuration Access Protocol
  • IMS Internet Protocol Multimedia Subsystem
  • XCAP Extensible Markup Language Configuration Access Protocol
  • RFC4825 the Extensible Markup Language
  • XCAP extension standard is also defined in the OMA (Open Mobile Alliance) specification.
  • OMA Open Mobile Alliance
  • the purpose of defining XCAP is to allow the Extensible Markup Language (XML) to manage the XML documents of the XML Document Management Server (XDMS, XML Document Management Server).
  • XDMS XML Document Management Server
  • an operation of an XDMS can only operate on one node in an XML document.
  • the client ie, XDMC
  • the server ie, XDMS
  • XCAP the definition of the XML document, ie
  • the node includes a plurality of child nodes with the same name, the node is called the parent node of the child node, and the root node is the node without the parent node.
  • the XDMS needs to obtain the entire content of the node, or obtain the entire XML where the node is located.
  • the content of the document is then sent to the client, or the content of the entire XML document is sent to the client, and parsed by the client, and the number information and location information of the nodes with the same name included in the node are obtained after parsing. Therefore, with this prior art, valuable network bandwidth is wasted, and at the same time, the load of the client device is increased, and the requirements for the client device are high.
  • the inventors of the present invention found that the prior art The server storing the XML document cannot obtain the quantity information or location information of multiple nodes having the same name included in a node in the XML document.
  • the embodiments of the present invention provide a method, a server, and a system for acquiring node information, which solve the problem that the XDMS cannot acquire the quantity information and/or the location information of multiple nodes in the prior art.
  • An embodiment of the present invention provides a method for acquiring node information, including:
  • the client device And receiving, by the client device, a request for acquiring node information in the extensible markup language document, where the request is an extensible markup language configuration access protocol request, where the node information includes: quantity information of the node or location information of the node;
  • the embodiment of the invention further provides a server, including:
  • a receiving unit configured to receive a request sent by the client device to obtain node information in the extensible markup language document, where the request is an extensible markup language configuration access protocol request, where the node information includes: a quantity information of the node or a location of the node Information
  • an obtaining unit configured to acquire the node information according to the request.
  • the embodiment of the invention further provides a communication system, including:
  • a client device configured to send a request for obtaining node information in the extensible markup language document to the server, where the request is an extensible markup language configuration access protocol request, where the node information includes: a quantity information of the node or location information of the node;
  • a server configured to receive a request sent by the client device to obtain node information in the extensible markup language extensible markup language document, and obtain the node information according to the request.
  • the server obtains the quantity information or the location information of the node according to the received request for acquiring the node information in the XML document, and the obtained result is included in the response message and sent to the XDMC, so that the XML document management server (XDMS) can Obtain the number information or location information of the node selected by the node selection part.
  • the method also avoids the XDMS sending the entire XML document to the client device, saving network bandwidth.
  • FIG. 1 is a flow chart of a method for acquiring node information according to Embodiment 1 of the present invention
  • FIG. 2 is a tree structure diagram of an XML document stored in an XDMS according to Embodiment 2 of the present invention
  • 2 is a flowchart of a method for obtaining node information
  • FIG. 4 is a logic tube diagram of a server according to Embodiment 3 of the present invention
  • FIG. 5 is a structural diagram of a communication system according to Embodiment 4 of the present invention.
  • Embodiment 1 provides a method for acquiring node information, and the embodiment of the invention further provides a corresponding server and a communication system. The details are described below separately.
  • Embodiment 1 provides a method for acquiring node information, and the embodiment of the invention further provides a corresponding server and a communication system. The details are described below separately.
  • An embodiment of the present invention provides a method for acquiring node information. Referring to FIG. 1, the method includes:
  • Step 1 receiving a request sent by the client device to obtain node information in the extensible markup language XML document, where the request is an Extensible Markup Language Configuration Access Protocol (XCAP, XML Configuration Access Protocol) request
  • the node information includes: the number of nodes Information or node location information
  • the format type of the request may specifically refer to a type of MIME (Multipurpose Internet Mail Extensions). That is, a request for obtaining node information can be added to the MIME type request.
  • MIME Multipurpose Internet Mail Extensions
  • Step 2 Obtain the number information or location information of the node according to the received request.
  • the obtaining the node information in the step 2 may specifically: counting the number of nodes that meet the request requirement according to the received request, or recording the location of the node that meets the request requirement, where the request is satisfied
  • the node sought is the node that satisfies the requirements of the node selector in the request.
  • a Uniform Resource Identifier is included in the XCAP request as an address for acquiring an XML document stored in the XDMS.
  • URIs include: The root (?1 001) part, the document selector part, and the node selector (Node Selector), the URI may also include a namespace selector of the node selector (Namespace Bindings for the Selector).
  • the XDMS receives the request containing the URI to obtain the XML document that needs to be operated. That is, the XDMS obtains the XML document according to the URI in the request, and then obtains the node quantity information or the location information.
  • step 2 further includes:
  • the method realizes the ability of the XDMS to have statistical node information, and the number of nodes satisfying the request requirement, or the location of the node, can be counted in the XDMS.
  • the method may further include:
  • Step 3 According to the obtained node information, the node information includes: quantity information or location information of the node, and sends a response to the client device.
  • the response sent in step 3 may be an XML document or a non-XML document.
  • the embodiment of the present invention does not limit the format of the response.
  • the nodes in the XML document that satisfy the node selector requirements in the UIR may be one or more, and in step 2, the number of nodes satisfying the requirements of the node selection part may be obtained. Or, you can get the location information of the node;
  • the XDMS obtains the quantity information or the location information of the node according to the received request for acquiring the node information, and the obtained result is included in the response message.
  • make XML document management services XDMS, XML Document Management Server
  • the method also avoids XDMS sending the entire XML document to the client device, saving network bandwidth.
  • the embodiment of the present invention provides a method for obtaining node information, and the method provided by the second embodiment of the present invention is similar to the method provided in the first embodiment, and can obtain node information in the XDMS, which is different in the second embodiment.
  • the method is a more specific XDMS acquisition node information implementation method, that is, the second embodiment takes a specific XML document as an example to illustrate that the XDMS obtains the node information in the document, and the XML document is as follows:
  • the problem to be solved by the method provided in this embodiment is to obtain the quantity information and the location information of the node that meets the requirements. Therefore, it is not necessary to describe the specific content stored in the XML document exemplified above.
  • the structure of the XML document is mainly involved, and the structure of the XML document is described here for easy understanding.
  • the root node of the XML document is a resource-lists, wherein the resource-lists has four child nodes, and another 1 J For: business (business), ⁇ 1 J table (list), owning (owner), list (list), two of the four sub-nodes have the same name, all of which are list, but in the two nodes
  • the content and structure are different, that is, different data is stored in these two nodes.
  • a child node entry is also included, and the entry node has a child node display-name (display-name); similarly, the node attribute name is close.
  • the -friends list has three sub-nodes, which are: display-name node, the entry value of sip:joe@example.com, and the sip:nancy@example.com Entry node. There is a node display-name under the entry node of the sip :joe@ example.com whose value is sip :joe@ example.com. There is also a node display under the entry node whose sip: nancy @ example.com Name.
  • the structure of the XML document can be seen from the above description.
  • the XML document is stored in the XDMS. For ease of understanding, the specific location of the XML document is assumed to be " http://www.example om/resource-lists/users/sip:imsuser0001 @seetest om/inde x ⁇ .
  • Step A1 The server receives a request sent by the XDMC to obtain the number of all list nodes under the root node.
  • the request may be considered to be the same as the request to obtain node information in the extensible markup language XML document in the embodiment shown in FIG. 1.
  • the server performing step A1 may be an XDMS or other server.
  • the request sent by the XDMC to obtain the number of all list nodes under the root node may be a request (GET) operation, and usually the GET operation is a request for data requested by the XDMC to the XDMS.
  • the specific statement of the GET request is as follows:
  • http: ⁇ www. example.com/resource-lists/users/ sipdmsuserOOO 1 @ seetest.com /index/ ⁇ /Resource-List/list HTTP/1.1 is the address where the server stores the XML document, ie the URI, where The URI is also described in the first embodiment.
  • the URI usually includes: The XCAP Root section, the document selector section, and the Node Selector. Among them, "www.example.com” is XCAP Root in the request;
  • “X-3GPP-Intended-Identity: "sip:imsuser0001 @ seetest.com,” is used to identify which user sent the request. That is, the unique identifier of the user.
  • “Content-Type: application/xcap-count+xml” indicates the type of the request, and indicates that the purpose of the request is to obtain the number information of the nodes selected by the node selector and the location information of these nodes. It should be noted that the specific definition of the request type may be the application/xcap-count+xml in the embodiment, and may be defined as other forms, and should not be construed as limiting the embodiments of the present invention.
  • Step A2 The server obtains the number and location information of the list node under the root node according to the received request.
  • step A2 only the number of the list nodes can be obtained in step A2; of course, the number of list nodes can also be obtained, and the location information of each list node can also be obtained.
  • the client device may also send a request for obtaining the location information of the list node in the XML document, and the XDMS performs location information acquisition.
  • the description of the request in the step A1 in this embodiment is not to be construed as limiting the embodiment of the present invention.
  • the number of the node named node and the location information under the root node may be:
  • A201 according to the type of request in the received request, that is,
  • Content-Type: application/xcap-count+xml determines that the request is to obtain quantity information; A202, parses the Request-URI in the request, that is, the path
  • A204 Obtain, according to the obtained list node of the root node Resource-List, the number and location information of the list node, where the XML document stored in the foregoing specified path, that is, the URI is
  • the server obtains the number and location information of all list nodes under the root node Resource-List in the XML document stored in the specified path according to the parsing of the received request in the above A201 ⁇ A204, as follows:
  • Step A3 The server sends a ring according to the number of the list nodes and the location information under the root node.
  • the message should be sent to the XDMC, and the response message includes at least the number of the obtained list nodes and the location information.
  • the specific format of the response message is as follows:
  • the response message includes: sending the response message to the time of January 15, 2008, Tuesday, 01:45:29 Beijing time; the address of the sent XDMS; the response message response type is application/xcap-count The response message of the +xml type; the quantity information and the location information acquired according to the request are 2[2, 4], wherein a format indicating the acquired quantity information and location information in the response is as follows:
  • the number of elements is statistically [the first statistical element position, ..., the nth statistical element position]
  • the response also includes:
  • the quantity information and the position information are 6 characters in length; disconnect XDML and XDMS The connection between the two.
  • each node in the tree structure of the XML document mentioned in the full text can also be an element, that is, the node list has the same definition as the element list.
  • the XDMS obtains the quantity information and the location information of the node according to the received request for acquiring the node information, and the obtained result is included in the response message and sent to the XDMC, so that the XDMS can obtain the quantity information and the location information of the node selected by the node selection part.
  • the method also avoids the XDMS sending the entire XML document to the client device, saving network bandwidth.
  • the embodiment of the present invention provides a server, as shown in FIG. 4, including: a receiving unit 10 and an obtaining unit 20.
  • the receiving unit 10 is configured to receive, by the client device, a request for acquiring node information in the extensible markup language XML document, where the request is an XCAP (XML Configuration Access Protocol) request, the node
  • the information includes: quantity information of the node or location information of the node;
  • the obtaining unit 20 is configured to acquire the node information according to the received request.
  • the server may further include: a transmitting unit 30.
  • the sending unit 30 is configured to send a response to the client device according to the node information acquired by the obtaining unit 20.
  • the obtaining unit 20 may include: an acquisition document unit 201, an acquisition node unit 202, and an acquisition information unit 203.
  • the obtaining document unit 201 is configured to obtain an XML document according to a request-Uniform Resource Locator (Request-URI) in the XCAP request, and acquire a node unit 202, configured to use a node selector (node Selector) in the XCAP request.
  • Request-URI request-Uniform Resource Locator
  • node Selector node selector
  • Obtaining a node in the XML document; the obtaining information unit 203 is configured to count the number of the acquired nodes, or obtain location information of the node.
  • the workflow of the obtaining unit 20 can refer to the foregoing steps A201 to A204, and details are not described herein.
  • the receiving unit 10 in the server receives a request for acquiring node information sent by the client device, and the request may be of a MIME type.
  • the request specifies the storage address of the XML document that needs to be manipulated and A node in the XML document that needs to be counted.
  • the obtaining unit 20 obtains the number of nodes in the XML document that need to be counted according to the storage address of the XML document that needs to be operated and the node that needs to be counted in the XML document specified in the request received in the receiving unit 10;
  • the obtaining unit 20 can also obtain location information of each node that is counted.
  • the obtaining unit 20 sends the acquired statistical information and location information of the node to the sending unit 30, and the sending unit 30 sends a response including the quantity information of the node and the location information to the client device.
  • the above server can execute the method executed by the server shown in the foregoing FIG. 1 and FIG. 2, and the workflow thereof is not mentioned here.
  • the server obtains the quantity information or the location information of the node according to the received request for acquiring the node information, and the obtained result is included in the response message and sent to the client device.
  • the server is enabled to obtain the quantity information or location information of the node selected by the node selection part. This approach avoids the server sending the entire XML document to the client device, saving network bandwidth.
  • the embodiment of the present invention provides a communication system, as shown in FIG. 5, including: a client device 50 and a server 60.
  • the client device 50 is configured to send a request for acquiring node information in the extensible markup language XML document to the server 60, and the server 60 is configured to receive the request for acquiring the node information in the extensible markup language XML document sent by the client device 50. ; According to the received request, get the quantity information or location information of the node.
  • the communication system realizes the server to obtain the number information or the location information of the node according to the received request for acquiring the node information, and increases the function of the server.
  • the server 60 in the communication system may be further configured to send a response to the client device 50 according to the obtained number information or location information of the node;
  • the client device 50 is further configured to receive a response sent by the server 60, where the response includes the number of acquired nodes or location information.
  • the server 60 in this embodiment may be a server provided in the third embodiment.
  • the communication system shown in FIG. 5 can perform the methods shown in FIG. 1 and FIG. 2, and the workflow thereof will not be described herein.
  • the server in the communication system acquires the quantity information or the location information of the node according to the received request for acquiring the node information, and the obtained result is included in the response message and sent to the response message.
  • the client device enables the server to obtain the number information and location information of the node.
  • the adoption of the communication system also avoids the server sending the entire XML document to the client device, saving network bandwidth.
  • the program may be stored in a computer readable storage medium, and the storage medium may include: ROM, RAM, disk or CD, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Description

一种获取节点信息的方法、 服务器以及系统
本申请要求于 2009 年 02 月 13 日提交中国专利局、 申请号为 200910006943.4、 发明名称为 "一种获取节点信息的方法、 服务器以及系统" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术领域, 具体涉及一种获取节点信息的方法、服务器以 及系统。
背景技术
随着互联网协议多媒体子系统(IMS, IP Multimedia Subsystem )解决方 案中可扩展标记语言配置访问协议 ( XCAP , XML Configuration Access Protocol ) 的应用越来越广泛, XCAP 也在不断进行增强和扩展。 其中, 在 RFC4825 中定义了 XCAP 的标准, 在开发移动联盟 ( OMA, Open Mobile Alliance )规范中也定义了 XCAP的扩展标准。 定义 XCAP的目的是允许可扩 展标记语言 (XML, Extensible Markup Language )文档管理客户端 (XDMC, XML Document Management Client )对 XML文档管理服务器(XDMS, XML Document Management Server )存者的 XML文档进行包括: 读、 写、 爹改、 创造和删除部分数据的操作而制定一套标准。 在现有的 XCAP中规定 XDMS 的一次操作只可以对 XML 文档中的一个节点进行操作。 如果客户端 (即 XDMC )想要通过 XCAP获取服务器(即 XDMS )中存储的 XML文档中某个 节点下包括的多个名称相同的节点的数量信息或者位置信息, (参考 XML文 档的定义,即该节点包括多个名称相同的子节点,该节点称为子节点的父节点, 根节点是没有父节点的节点。)就需要 XDMS获取到该节点的全部内容, 或者 获取该节点所在的整个 XML文档的内容, 然后将获取该节点的全部内容、 或 者整个 XML文档的内容发送给客户端, 由客户端进行解析, 解析后获取该节 点下包括的多个名称相同的节点的数量信息和位置信息, 因此, 采用该现有技 术, 浪费了宝贵的网络带宽, 同时, 增加了客户端设备的负荷, 对客户端设备 的要求高。
在对现有技术的研究和实践过程中, 本发明的发明人发现, 现有技术中存 储 XML文档的服务器不能获取 XML文档中某节点下包括的多个名称相同的 节点的数量信息或位置信息。
发明内容
本发明实施例提供一种获取节点信息的方法、服务器以及系统,解决了现 有技术中 XDMS不能获取多个节点的数量信息和 /或位置信息的问题。
本发明实施例提供了一种获取节点信息的方法, 包括:
接收客户端设备发送的获取可扩充标记语言文档中节点信息的请求,所述 请求为可扩充标记语言配置访问协议请求, 所述节点信息包括: 节点的数量信 息或者节点的位置信息;
根据所述请求, 获取所述节点信息。
本发明实施例还提供了一种服务器, 包括:
接收单元,用于接收客户端设备发送的获取可扩充标记语言文档中节点信 息的请求,所述请求为可扩充标记语言配置访问协议请求,所述节点信息包括: 节点的数量信息或者节点的位置信息;
获取单元, 用于根据所述请求, 获取所述节点信息。
本发明实施例还提供了一种通信系统, 包括:
客户端设备,用于发送获取可扩充标记语言文档中节点信息的请求给服务 器, 所述请求为可扩充标记语言配置访问协议请求, 所述节点信息包括: 节点 的数量信息或者节点的位置信息;
服务器,用于接收所述客户端设备发送的获取可扩充标记语言可扩充标记 语言文档中节点信息的请求, 根据所述请求, 获取所述节点信息。
本发明实施例采用服务器根据接收到的获取 XML文档中节点信息的请 求,获取节点的数量信息或者位置信息,将获取的结果包含在响应消息中发送 给 XDMC, 使得 XML文档管理服务器(XDMS )可以获取节点选择部分选中的 节点的数量信息或者位置信息。 同时,该方法还避免了 XDMS将整个 XML文档 发送给客户端设备, 节约了网络带宽。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作一筒单地介绍,显而易见地, 下面描 述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不 付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例一提供的一种获取节点信息的方法的流程筒图; 图 2是本发明实施例二中存储在 XDMS中的 XML文档的树结构图; 图 3是本发明实施例二提供的一种获取节点信息的方法的流程筒图; 图 4是本发明实施例三提供的一种服务器的逻辑筒图;
图 5是本发明实施例四提供的一种通信系统的组成图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例提供一种获取节点信息的方法,本发明实施例还提供相应的 服务器以及通信系统。 以下分别进行详细说明。 实施例一
本发明实施例提供了一种获取节点信息的方法, 参见图 1所示, 该方法包 括:
步骤 1 : 接收客户端设备发送的获取可扩充标记语言 XML文档中节点信息 的请求, 该请求为可扩充标记语言配置访问协议(XCAP, XML Configuration Access Protocol )请求, 该节点信息包括: 节点的数量信息或者节点的位置信 一个例子中,该请求的格式类型可以具体是参考多用途互联网络电子邮件 格式的扩展( MIME , Multipurpose Internet Mail Extensions )类型。 即可以在 MIME类型的请求中增加一种获取节点信息的请求。
步骤 2: 根据接收到的请求, 获取节点的数量信息或者位置信息。
其中, 步骤 2中获取节点信息具体可以是根据接收的请求, 统计满足该请 求要求的节点的数量, 或者记录满足该请求要求的节点的位置, 该满足请求要 求的节点是指满足请求中节点选择器( node Selector )要求的节点。 还需要说明的是, 在 XCAP请求中包括统一资源定位符 (URI, Uniform Resource Identifier ), 作为获取 XDMS中存储 XML文档的地址。 通常 URI包括: ?根( ?1 001 )部分、 文档选择(document selector )部分、 节点选择 器(Node Selector ), URI还可以包括节点选择器(node selector ) 的名字空间 绑定 Namespace Bindings for the Selector^分。 有关 URI的详细说明可以参考 RFC 4825。 XDMS接收到的请求中包含 URI才可以获取到需要进行操作的 XML 文档, 即 XDMS根据请求中的 URI获取到该 XML文档, 再获取节点数量信息或 者位置信息。
一个具体的例子中, 前述步骤 2进一步包括:
201、 根据所述 XCAP请求中的请求-统一资源定位符( Request-URI )获取 XML文档;
202、 根据所述 XCAP请求中的节点选择器(node Selector )获取所述 XML 文档中的节点;
203、 统计所述获取的节点的数量, 或者, 获取节点的位置信息。
通过以上步骤 1至步骤 2, 该方法实现了 XDMS具有统计节点信息的能力, 可以在 XDMS中统计出满足请求要求的节点的数量, 或者节点的位置,。
优选的, 在步骤 2之后, 该方法还可以包括:
步骤 3: 根据获取到的节点信息, 该节点信息包括: 节点的数量信息或者 位置信息, 发送响应给客户端设备。
其中, 步骤 3中发送的响应可以是 XML文档, 也可以是非 XML文档, 本发 明实施例不对响应的格式^限定。
还需要理解的是, 由以上步骤 2中可以获知: XML文档中满足 UIR中节点 选择器要求的节点可以是一个或者是多个, 在步骤 2中可以得到满足节点选择 部分要求的节点的数量信息, 或者, 可以获取节点的位置信息;
通过以上对本实施例提供的一种获取节点信息的方法的说明, 该方法中 XDMS根据接收到的获取节点信息的请求, 获取节点的数量信息或者位置信 息, 将获取的结果包含在响应消息中发送给 XDMC, 使得 XML文档管理服务 器( XDMS , XML Document Management Server )可以获取节点选择部分选中 的节点的数量信息或者位置信息。 同时, 该方法还避免了 XDMS将整个 XML 文档发送给客户端设备, 节约了网络带宽。 实施例二
本发明实施例提供了一种获取节点信息的方法,本发明实施例二提供的方 法与实施例一提供的方法相似, 都可以实现 XDMS中获取节点信息, 所不同的 是实施例二中所说明的方法是一种更具体的 XDMS获取节点信息的实现方法, 即实施例二以一个具体 XML文档为例, 来说明 XDMS获取该文档中的节点信 该 XML文档如下:
<?xml version="1.0" encoding="UTF-8"?>
<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists" xmlns:xsi="http:〃 www.w3.org/2001/XMLSchema-instance">
<business>PoC</business> <list name=" friends ">
<entry uri=" sip :bill@ example.com" >
<display-name>Bill Doe</display-name>
</entry>
</list>
<owner>sip: j oe @ example.com</owner> <list name="close-friends"> <display-name>Close Friends</display-name>
<entry uri="sip:joe@example.com">
<display-name>Joe Smith</display-name> </entry>
<entry uri="sip:nancy@example.com">
<display-name>Nancy Gross</display-name> </entry> </list>
</resource-lists>
其中, 需要说明的是, 本实施例提供的方法所要解决的问题是获取满足要 求的节点的数量信息和位置信息, 因此, 不需要对以上所举例的 XML文档中 存储的具体内容做说明。 在本发明实施例中主要涉及该 XML文档的结构, 这 里对该 XML文档的结构 #文说明, 以便于理解。
在本实施例中所举例的 XML文档的树形结构可以参见图 2所示, 该 XML 文档的根节点为资源 -列表 ( resource-lists ), 其中 resource-lists有四个子节点, 分另1 J为: 商务 ( business )、 歹1 J表 ( list )、 拥有 ( owner )、 列表 ( list ), 该四个 子节点中其中两个节点的名称相同, 都为 list, 但是, 这两个节点中的内容和 结构不同, 即在这两个节点中存储的是不同的数据。 其中, 在节点属性 name 为 friends的 list节点下还包括一个子节点进人 ( entry ), 该 entry节点还有一个子 节点显示 -名称 ( display-name ); 相似的可知, 在节点属性 name为 close-friends 的 list的节点下包括三个子节点, 分别是: display-name节点, 属性值为 sip:joe@example.com的 entry节点 , 和属' 1 "生值为 sip:nancy@example.com的 entry 节点。在属' 1"生值为 sip :joe@ example.com的 entry节点下有一个节点 display-name, 在属生值为 sip: nancy @ example.com的 entry节点下也有一个节点 display-name。 由以上的说明可以看出该 XML文档的结构。 该 XML文档存储在 XDMS中, 为 了 便 于 理 解 , 假 设 该 XML 文 档 存 储 的 具 体 位 置 为 " http://www.example om/resource-lists/users/sip:imsuser0001 @seetest om/inde x〃,。
下面对本发明实施例二提供的方法做说明, 参见图 3所示, 该方法包括: 步骤 Al: 服务器接收 XDMC发送的获取根节点下全部 list节点的个数的请 求。 该请求可以认为是图 1所示的实施例中的获取可扩充标记语言 XML文档中 节点信息的请求相同。
具体的例子中, 执行步骤 A1的服务器可以是 XDMS或者其它服务器。 XDMC发送的获取根节点下全部 list节点的个数的请求可以是一个索取( GET ) 操作, 通常 GET操作是 XDMC向 XDMS发送的索取数据的一种请求。 该 GET请 求的具体语句如下:
GET http://www.example om/resource-lists/users/sip:imsuser0001 @seetest om/i ndex/~~/Resource-List/list HTTP/1.1
Host: www.huawei.com
X-3GPP-Intended-Identity: "sip: imsuser0001 @seetest.com" Content- Type: application/xcap-count+xml Content-Length: 0 其中, 为了便于理解本发明实施例提供的方法, 需要对该请求做说明: 该 请求中
"http:〃 www. example.com/resource-lists/users/ sipdmsuserOOO 1 @ seetest.com /index/~~/Resource-List/list HTTP/1.1 " 是服务器存储 XML文档的地址, 即 URI,其中在实施例一中对 URI也有说明, URI通常包括: ?根( XCAP Root ) 部分、 文档选择 ( document selector )部分和节点选择器( Node Selector )。 其 中, 在该请求中 "www.example.com" 为 XCAP Root;
"/Resource-List/list" 为节点选择 ( node selector ) 器选中的节点。 "Host: www.huawei.com" 为发送该请求的 XDMC的地址。
其中, "X-3GPP-Intended-Identity: "sip:imsuser0001 @ seetest.com,,用于标 识这个请求是由哪个用户发出来的。 即用户的唯一标识。 "Content-Type: application/xcap-count+xml" 标明该请求的类型, 且标明该请求的目的是获取 符合节点选择器选中的节点的数量信息和这些节点的位置信息。还需要说明的 是, 该请求类型的具体定义可以是本实施例中的 application/xcap-count+xml , 也可以定义为其它形式, 此处不应该理解为对本发明实施例的限制。
"Content-Length: 0" 表示这个 GET消息中没有消息体, 所以, 长度为 0。
步骤 A2: 服务器根据接收到的请求, 获取根节点下的 list节点的个数和位 置信息;
实际的例子中, 步骤 A2中可以仅获取该 list节点的个数; 当然, 也可以在 获取 list节点个数, 还获取各个 list节点的位置信息。
需要理解的是, 客户端设备也可以发送获取该 XML文档中 list节点位置信 息的请求, 由 XDMS执行获取位置信息。在此实施例中对步骤 A1中的请求来做 说明, 不应该理解为对本发明实施例的限制。
其中, 步骤 A2中根据接收到的请求, 获取根节点下的名为 list节点的个数 和位置信息具体可以是:
A201 , 根据接收到的请求中的请求类型, 即由
"Content-Type: application/xcap-count+xml"判断出该请求是要获取数量信息; A202, 解析请求中的 Request-URI, 即通过路径
"http:〃 www.example.eom/resource-lists/users/sip:imsuser0001 @ seetest.com/inde x/~~/Resource-List/list HTTP/1.1" 获取到服务器中存储的 XML文档; A203、 再根据节点选择器(node selector ), 获取根节点 Resource-List下的 所有 list节点;
A204, 根据获取的根节点 Resource-List下的 list节点, 获取 list节点的个数 和位置信息, 其中, 前述的指定路径下存储的 XML文档, 即 URI为
"http:〃 www.example.eom/resource-lists/users/sip:imsuser0001 @ seetest.com/inde x/" 的路径下存储的 XML文档;
服务器根据以上 A201 ~ A204中对接收到的请求的解析, 获取指定路径下 存储的 XML文档中的根节点 Resource-List下的所有 list节点的个数和位置信息, 如下表:
Figure imgf000011_0001
步骤 A3: 服务器根据获取根节点下的 list节点的个数和位置信息, 发送响 应消息给 XDMC , 该响应消息中至少包括获取的 list节点的个数和位置信息。 其中, 该响应消息的具体格式如下:
HTTP/1.1 200 OK
Date:Tue, 15 Jan 2008 01:45:29 GMT
Content- Type:application/xcap-count+xml
Etag: "aaaaaaaaaa"
Content-Length: 6
Connectionxlose
2[2,4]
其中, 该响应消息中包含有: 发送该响应消息的时间为北京时间 2008年 1 月 15日、 星期二、 01 :45:29; 发送的 XDMS的地址; 该响应消息响应类型为 application/xcap-count+xml类型的响应消息; 根据请求获取的数量信息和位置 信息为 2[2,4] , 其中, 一种在响应中表示获取的数量信息和位置信息的格式如 下:
元素个数统计值 [第一个被统计元素位置, ..., 第 n个被统计元素位置] 该响应中还包括: 数量信息和位置信息的长度为 6个字符; 断开 XDML与 XDMS之间的连接。
还需要说明的是,以上所例举的具体请求格式和响应消息格式为一种具体 的可实现本发明的请求格式和响应消息格式,但不应理解为对本发明实施例的 限制。
还需要说明的是, 全文中所说的 XML文档的树结构中的各节点也可以成 为元素, 即节点 list与元素 list的定义相同。 通过以上对本实施例提供的一种获取节点信息的方法的说明, 该方法中
XDMS根据接收到的获取节点信息的请求, 获取节点的数量信息和位置信息, 将获取的结果包含在响应消息中发送给 XDMC,使得 XDMS可以获取节点选择 部分选中的节点的数量信息和位置信息。 同时, 该方法还避免了 XDMS将整个 XML文档发送给客户端设备, 节约了网络带宽。 实施例三
本发明实施例提供一种服务器, 参见图 4所示, 包括: 接收单元 10和获取 单元 20。
其中, 接收单元 10用于接收客户端设备发送的获取可扩充标记语言 XML 文档中节点信息的请求, 所述请求为可扩充标记语言配置访问协议(XCAP, XML Configuration Access Protocol )请求, 所述节点信息包括: 节点的数量信 息或者节点的位置信息;
获取单元 20, 用于根据接收的请求, 获取所述节点信息。
另一个例子中, 该服务器还可以包括: 发送单元 30。
发送单元 30, 用于根据获取单元 20中获取到的节点信息,发送响应给客户 端设备。
另一个例子中, 获取单元 20可以包括: 获取文档单元 201、 获取节点单元 202和获取信息单元 203。 其中, 获取文档单元 201 , 用于根据 XCAP请求中的 请求-统一资源定位符(Request-URI )获取 XML文档; 获取节点单元 202, 用 于根据所述 XCAP请求中的节点选择器(node Selector )获取 XML文档中的节 点; 获取信息单元 203, 用于统计所述获取的节点的数量, 或者, 获取所述节 点的位置信息。 此获取单元 20的工作流程可以参考前述 A201 ~ A204的步骤, 在此不赘述。
为了更清楚地理解本发明实施例提供的一种服务器,还需要说明的是,服 务器中的接收单元 10接收到客户端设备发送的获取节点信息的请求,该请求可 以是 MIME类型的,在该请求中指定了需要进行操作的 XML文档的存储地址和 XML文档中需要进行统计的节点。 获取单元 20根据接收单元 10中接收到的请 求中指定的, 需要进行操作的 XML文档的存储地址和 XML文档中需要进行统 计的节点, 获取到该 XML文档中需要进行统计的节点的数量; 该获取单元 20 还可以获取到每个被统计的节点的位置信息。获取单元 20将获取到的节点的统 计信息和位置信息发送给发送单元 30,发送单元 30发送包含节点的数量信息和 位置信息的响应给客户端设备。
上述服务器可以执行前述图 1、 图 2所示的由服务器执行的方法, 其工作流 程在此不赞述。
通过以上对本发明实施例提供的一种服务器的说明,该服务器根据接收到 的获取节点信息的请求, 获取节点的数量信息或者位置信息,将获取的结果包 含在响应消息中发送给客户端设备,使得该服务器可以获取节点选择部分选中 的节点的数量信息或者位置信息。 该方法避免了服务器将整个 XML文档发送 给客户端设备, 节约了网络带宽。
实施例四
本发明实施例提供了一种通信系统, 参见图 5所示, 包括: 客户端设备 50 和服务器 60。
其中, 客户端设备 50, 用于发送获取可扩充标记语言 XML文档中节点信 息的请求给服务器 60;服务器 60, 用于接收客户端设备 50发送的获取可扩充标 记语言 XML文档中节点信息的请求; 根据接收到的请求, 获取节点的数量信 息或者位置信息。
通过以上的说明,该通信系统实现了服务器中根据接收到的获取节点信息 的请求, 获取节点的数量信息或者位置信息, 增加了服务器的功能。
可选的,该通信系统中的服务器 60还可以用于根据获取到的节点的数量信 息或者位置信息, 发送响应给客户端设备 50;
因此,客户端设备 50还用于接收服务器 60发送的响应, 该响应中包括获取 的节点的数量信息或者位置信息。
一个具体例子中,本实施例中的服务器 60可以是实施例三中提供的一种服 务器。 对于本实施例中有关服务器 60的说明可以参考实施例三中的说明。 图 5所示的通信系统可以执行图 1、 图 2所示的方法, 其工作流程在此不赘 述。通过以上对本实施例提供的一种通信系统的说明,该通信系统中的服务器 根据接收到的获取节点信息的请求, 获取节点的数量信息或者位置信息,将获 取的结果包含在响应消息中发送给客户端设备,使得该服务器可以获取到节点 的数量信息和位置信息。 同时, 采用该通信系统还避免了服务器将整个 XML 文档发送给客户端设备, 节约了网络带宽。 本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步 骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读 存储介质中, 存储介质可以包括: ROM、 RAM, 磁盘或光盘等。
以上对本发明实施例所提供的一种获取节点信息的方法、服务器以及通信 了阐述, 以上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同 时, 对于本领域的一般技术人员, 依据本发明的思想, 在具体实施方式及应用 范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims

权 利 要 求
1、 一种获取节点信息的方法, 其特征在于, 包括:
接收客户端设备发送的获取可扩充标记语言文档中节点信息的请求,所述 请求为可扩充标记语言配置访问协议请求, 所述节点信息包括: 节点的数量信 息或者节点的位置信息;
根据所述请求, 获取所述节点信息。
2、 根据权利要求 1所述的方法, 其特征在于, 所述根据所述请求, 获取所 述节点信息, 进一步包括:
根据所述可扩充标记语言配置访问协议请求中的请求-统一资源定位符 ( Request-URI )获取可扩充标 i己语言文档;
根据所述可扩充标记语言配置访问协议请求中的节点选择器获取所述可 扩充标记语言文档中的节点;
统计所述获取的节点的数量, 或者, 获取节点的位置信息。
3、根据权利要求 1所述的方法,其特征在于,所述获取所述节点信息之后, 所述方法还包括:
发送响应给所述客户端设备, 所述响应至少包括: 获取的节点信息。
4、根据权利要求 1所述的方法, 其特征在于, 所述获取节点信息的请求为 多用途互联网络电子邮件格式的扩展(MIME )类型的请求。
5、根据权利要求 1所述的方法, 其特征在于, 所述获取节点信息的请求为 一种索取(GET )请求。
6、 一种服务器, 其特征在于, 包括:
接收单元,用于接收客户端设备发送的获取可扩充标记语言文档中节点信 息的请求,所述请求为可扩充标记语言配置访问协议请求,所述节点信息包括: 节点的数量信息或者节点的位置信息;
获取单元, 用于根据所述请求, 获取所述节点信息。
7、根据权利要求 6所述的服务器,其特征在于,所述获取单元进一步包括: 获取文档单元,用于根据所述可扩充标记语言配置访问协议请求中的请求
-统一资源定位符(Request-URI )获取可扩充标记语言文档; 获取节点单元,用于根据所述可扩充标记语言配置访问协议请求中的节点 选择器获取可扩充标记语言文档中的节点;
获取信息单元, 用于统计所述获取的节点的数量, 或者, 获取所述节点的 位置信息。
8、 根据权利要求 6或 7所述的服务器, 其特征在于, 所述服务器还包括: 发送单元, 用于根据所述获取的节点信息, 发送响应给所述客户端设备。
9、 一种通信系统, 其特征在于, 包括:
客户端设备,用于发送获取可扩充标记语言文档中节点信息的请求给服务 器, 所述请求为可扩充标记语言配置访问协议请求, 所述节点信息包括: 节点 的数量信息或者节点的位置信息;
服务器,用于接收所述客户端设备发送的获取可扩充标记语言可扩充标记 语言文档中节点信息的请求, 根据所述请求, 获取所述节点信息。
10、 根据权利要求 9所述的系统, 其特征在于, 所述服务器还用于根据所 述获取的节点信息, 发送响应给客户端设备;
所述客户端设备还用于接收所述服务器发送的响应。
PCT/CN2009/072944 2009-02-13 2009-07-28 一种获取节点信息的方法、服务器以及系统 WO2010091564A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910006943.4 2009-02-13
CN200910006943A CN101808073A (zh) 2009-02-13 2009-02-13 一种获取节点信息的方法、服务器以及系统

Publications (1)

Publication Number Publication Date
WO2010091564A1 true WO2010091564A1 (zh) 2010-08-19

Family

ID=42561378

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/072944 WO2010091564A1 (zh) 2009-02-13 2009-07-28 一种获取节点信息的方法、服务器以及系统

Country Status (2)

Country Link
CN (1) CN101808073A (zh)
WO (1) WO2010091564A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224531A (zh) * 2014-05-28 2016-01-06 腾讯科技(深圳)有限公司 定位xml节点的方法和装置
CN108959095B (zh) * 2018-07-12 2021-11-23 中国工程物理研究院计算机应用研究所 基于XML Schema验证XML文档的方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030212664A1 (en) * 2002-05-10 2003-11-13 Martin Breining Querying markup language data sources using a relational query processor
JP2006127229A (ja) * 2004-10-29 2006-05-18 Toshiba Corp 構造化文書検索システム、構造化文書検索方法及びプログラム
CN101170540A (zh) * 2006-10-24 2008-04-30 华为技术有限公司 一种xml文档管理方法和客户端、服务器
CN101271474A (zh) * 2007-03-20 2008-09-24 株式会社东芝 利用索引来搜索结构化文档的系统和方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197827B (zh) * 2007-12-14 2010-12-08 华为技术有限公司 一种文档管理方法、系统以及相关设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030212664A1 (en) * 2002-05-10 2003-11-13 Martin Breining Querying markup language data sources using a relational query processor
JP2006127229A (ja) * 2004-10-29 2006-05-18 Toshiba Corp 構造化文書検索システム、構造化文書検索方法及びプログラム
CN101170540A (zh) * 2006-10-24 2008-04-30 华为技术有限公司 一种xml文档管理方法和客户端、服务器
CN101271474A (zh) * 2007-03-20 2008-09-24 株式会社东芝 利用索引来搜索结构化文档的系统和方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
J. ROSENBERG.: "The Extensible Markup Language (XML) Configuration Access Protocol (XCAP).", NETWORK WORKING GROUP. REQUEST FOR COMMENTS: 4825.CISCO., May 2007 (2007-05-01), pages 44 - 45,56 *

Also Published As

Publication number Publication date
CN101808073A (zh) 2010-08-18

Similar Documents

Publication Publication Date Title
EP2664109B1 (en) Method and apparatus for group policy management in an ims system
CN101299829B (zh) 一种实现统一存储中管理媒体内容的方法和消息系统
JP5815569B2 (ja) メッセージングサービスとソーシャルネットワークサービス間の相互作用を介した連絡先提供装置及び方法
CN101155049B (zh) 一种消息系统中会话历史处理方法及消息系统
US8230003B2 (en) XDM system and method for implementing XML document management function by using position description of XML document
CN101714170B (zh) 一种基于xdms的群组管理系统及方法
JP4749469B2 (ja) Xdmサービス情報管理システム及び方法
US9634865B2 (en) Method of providing quick answer service in SIP message service system
WO2009076910A1 (zh) 一种文档管理方法、系统及相关设备
WO2007059674A1 (fr) Mandataire de demandes, systeme de communication, et procede de demande d&#39;informations dans le systeme de communication
JP2007208987A (ja) 複数のユーザにコンテンツを配信する方法およびシステム
CN101160913A (zh) 一种离线消息处理方法
CN102006321A (zh) 管理用户优选简档的方法、共享服务器和客户端
CN101553782A (zh) 用于管理可扩展标记语言文档管理服务器历史的系统和方法
CN107580190A (zh) 一种基于sip协议的会议列表订阅和通知方法
KR101922985B1 (ko) 연락처 정보의 구독을 초대하는 장치 및 방법
WO2010112075A1 (en) Message notification
WO2009115025A1 (zh) 一种xml文档操作方法及xdms
US9237206B2 (en) Method and apparatus for updating personal information in communication system
KR101498731B1 (ko) 비통합 메시징 서비스와 인터워킹하기 위해 통합 메시징 서비스를 제공하는 서버 및 방법 및 이를 위한 시스템
Alliance XML Document Management (XDM) Specification
WO2010091564A1 (zh) 一种获取节点信息的方法、服务器以及系统
US20130091287A1 (en) System for contact subscription invitations in a cross-domain converged address book system
WO2009049519A1 (fr) Procédé, dispositif et système de copie de contenu
EP1862932B1 (en) Managing information in XML document management architecture

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: 09839887

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: 09839887

Country of ref document: EP

Kind code of ref document: A1