Metadata-based data acquisition method and device
By introducing metadata filtering parameters into the data acquisition request of the network management protocol, the problem that the prior art cannot realize metadata-based data filtering is solved, and efficient data query and the effect of reducing network bandwidth consumption is achieved.
Patent Information
- Application Number
- CN202311013963.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2025-02-18
AI Technical Summary
The existing network management protocol cannot implement metadata-based data filtering, which causes clients to query a large amount of data from the server, which increases the problem of network bandwidth consumption and low query efficiency.
By introducing metadata filtering parameters in the data acquisition request, the client allows the client to specify the metadata to be filtered, so that the server only returns data that satisfies the specified metadata, realizing metadata-based data filtering.
It reduces network bandwidth consumption between the server and the client, improves the efficiency of data query, and meets the need to obtain server data based on metadata.
Smart Images

Figure CN119484642A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a metadata-based data acquisition method and device. Background Art
[0002] The Network Management Protocol is a mechanism for managing network devices. The network devices serve as the server of the Network Management Protocol. The client of the Network Management Protocol configures and manages the server by running the Network Management Protocol. For example, the client can query, delete, modify, and add configuration data of the server. When querying data, the client can query data on the server according to the data filtering mechanism defined by the Network Management Protocol. However, the Internet Engineering Task Force (IETF) supports defining metadata for data in the server, and the data filtering mechanism currently defined by the Network Management Protocol only filters the data itself, and cannot implement data filtering based on metadata. Summary of the invention
[0003] The embodiment of the present application provides a metadata-based data acquisition method and device, which can implement metadata-based data filtering. The technical solution is as follows:
[0004] In a first aspect, a metadata-based data acquisition method is provided, which is applied to a client. In the method, a data acquisition request is generated and sent to a server, wherein the data acquisition request indicates first data to be acquired in the server through data indication information, and indicates filtering out second data having first metadata from the first data through metadata filtering parameters; thereafter, a data acquisition response from the server to the data acquisition request is received, wherein the data acquisition response includes the second data.
[0005] The method uses the metadata filtering parameters in the client's data acquisition request to instruct to filter data with specified metadata from the data to be acquired, so that the server sends the data with specified metadata in the client's data to be acquired to the client according to the instruction of the metadata filtering parameters, thereby realizing metadata-based data filtering.
[0006] In a possible implementation, the metadata filtering parameter is a parameter defined in the data acquisition request using the next generation network modeling language; or, the metadata filtering parameter is an extensible markup language attribute defined in the data acquisition request.
[0007] Based on the possible implementations described above, metadata filtering parameters are extended in the data acquisition request to make the metadata filtering parameters universal. Any metadata can be specified through the metadata filtering parameters, so that data filtering based on any metadata can be implemented through the method described above.
[0008] In a possible implementation manner, the data acquisition request is a data query request, and the first data is the data to be queried; or, the data acquisition request is a data subscription request, and the first data is the data subscribed by the client.
[0009] Based on the above possible implementation methods, the method is applicable to data query scenarios and data subscription scenarios. By executing the method, metadata-based data filtering can be achieved in both scenarios.
[0010] In a possible implementation, the method also includes the following steps: generating a first data subscription request, and sending the first data subscription request to the server, wherein the first data subscription request subscribes the receiving end to the third data in the server through subscription information, configures second metadata for the third data through metadata pass-through parameter indication, and sends the second metadata together with the subscribed third data to the receiving end.
[0011] Based on the above possible implementation methods, the server sends the client subscription data and the client's specified metadata to the receiving end according to the indication of the metadata transparent transmission parameter, thereby realizing metadata transparent transmission, so that the receiving end can classify the subscription data according to the specified metadata.
[0012] In a possible implementation, before generating the first data subscription request, the method further includes the following step: obtaining capability notification information of the server, where the capability notification information is used to notify that the server has metadata transparent transmission capability in the data subscription service.
[0013] Based on the above possible implementation methods, the client can learn that the server has the metadata transparent transmission capability. When the server has the metadata transparent transmission capability, the client can carry the metadata transparent transmission parameter in the data subscription request to instruct the server to help the client transparently transmit the metadata to the receiving end of the subscribed data.
[0014] In a possible implementation, the method further includes the following steps: first sending a second data subscription request to the server to subscribe the receiving end to the third data in the server; then, receiving a metadata acquisition request from the receiving end, and based on the metadata acquisition request, sending a metadata acquisition response to the receiving end, wherein the metadata acquisition request indicates obtaining metadata for the third data, and the metadata acquisition response includes the second metadata.
[0015] Based on the above possible implementation methods, the receiver of the subscription data requests the subscriber to provide metadata of the subscription data, and the subscriber provides metadata for the subscription data according to the request of the receiver, thereby realizing direct transmission of metadata between the receiver and the subscriber, so that the receiver can classify the subscription data according to the directly transmitted metadata.
[0016] In a second aspect, a metadata-based data acquisition method is provided, which is applied to a server. In the method, a data acquisition request from a client is first received, and then second data is queried in the first data based on data indication information and metadata filtering parameters in the data acquisition request. Then, based on the queried second data, a data acquisition response is sent to the client, wherein the data indication information indicates the first data to be acquired in the server, the metadata filtering parameters indicate filtering the second data from the first data, and the second data has the first metadata.
[0017] In a possible implementation, the metadata filtering parameter is a parameter defined in the data acquisition request using the next generation network modeling language; or, the metadata filtering parameter is an extensible markup language attribute defined in the data acquisition request.
[0018] In a possible implementation manner, the data acquisition request is a data query request, and the first data is the data to be queried; or, the data acquisition request is a data subscription request, and the first data is the data subscribed by the client.
[0019] In a possible implementation, the method also includes the following steps: first receiving a first data subscription request from a client, and based on the subscription information and metadata transparent transmission parameters in the first data subscription request, sending subscription notification information to a receiving end, wherein the subscription notification information includes third data and second metadata of the third data, wherein the subscription information indicates that the receiving end subscribes to the third data in the service end, the metadata transparent transmission parameters indicate that the second metadata is configured for the third data, and the second metadata is sent to the receiving end together with the subscribed third data.
[0020] In a possible implementation, before receiving the first data subscription request from the client, the method further includes the following step: sending capability notification information to the client, where the capability notification information is used to notify that the server has metadata transparent transmission capability in the data subscription service.
[0021] According to a third aspect, a method for obtaining metadata is provided. The method is applied to a receiving end of subscribed data. In the method, subscription notification information from a server is first received. The subscription notification information includes third data subscribed by a client from the server for the receiving end. Then, second metadata provided by the client for the third data is obtained. Then, the second metadata is configured as metadata of the third data.
[0022] In a possible implementation manner, the subscription notification information further includes second metadata, and the second metadata is acquired from the subscription notification information.
[0023] In a possible implementation, the method for obtaining the second metadata includes: sending a metadata acquisition request to the client, the metadata acquisition request indicating acquisition of metadata of the third data; and receiving a metadata acquisition response from the client, the metadata acquisition response including the second metadata.
[0024] In a fourth aspect, a metadata-based data acquisition device is provided, the data acquisition device includes a functional module for executing the method provided by the first aspect or any optional manner of the first aspect, or the data acquisition device includes a functional module for executing the method provided by the second aspect or any optional manner of the second aspect.
[0025] In a fifth aspect, a metadata acquisition device is provided, the acquisition device comprising a functional module for executing the method provided in the third aspect or any optional manner of the third aspect.
[0026] In a sixth aspect, an electronic device is provided, comprising a processor, wherein the processor is used to execute program code so that the electronic execution implements the method provided in the first aspect or any optional manner of the first aspect, or the method provided in the second aspect or any optional manner of the second aspect, or the method provided in the third aspect or any optional manner of the third aspect.
[0027] In the seventh aspect, a computer-readable storage medium is provided, in which at least one program code is stored. The program code is read by a processor to enable an electronic device to execute a method provided in the first aspect or any optional manner of the first aspect, or a method provided in the second aspect or any optional manner of the second aspect, or a method provided in the third aspect or any optional manner of the third aspect.
[0028] In an eighth aspect, a computer program product or a computer program is provided, the computer program product or the computer program comprising a program code, the program code being stored in a computer-readable storage medium, the processor of an electronic device reading the program code from the computer-readable storage medium, the processor executing the program code, so that the electronic device executes the method provided by the first aspect or any one of the optional aspects of the first aspect, or the method provided by the second aspect or any one of the optional aspects of the second aspect, or the method provided by the third aspect or any one of the optional aspects of the third aspect.
[0029] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1It is a system architecture diagram involved in a metadata-based data acquisition method provided in an embodiment of the present application;
[0031] Figure 2 This is an architecture diagram of an SDN system provided in an embodiment of the present application;
[0032] Figure 3 is a flowchart of a metadata-based data acquisition method provided in an embodiment of the present application;
[0033] Figure 4 This is a flowchart of a method for obtaining data based on metadata in a data query scenario provided by an embodiment of the present application;
[0034] Figure 5 This is a flowchart of a method for acquiring data based on metadata in a data subscription scenario provided by an embodiment of the present application;
[0035] Figure 6 This is a flowchart of transparent transmission of metadata in a configuration subscription scenario provided by an embodiment of the present application;
[0036] Figure 7 This is a flowchart of a configuration subscription scenario for direct transmission of metadata provided by an embodiment of the present application;
[0037] Figure 8 It is a structural schematic diagram of a metadata-based data acquisition device provided in an embodiment of the present application;
[0038] Fig. 9 is a structural schematic diagram of another metadata-based data acquisition device provided in an embodiment of the present application;
[0039] Fig.10 It is a structural diagram of a metadata acquisition device provided in an embodiment of the present application;
[0040] Fig.11 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] In order to facilitate the understanding of this application, some of the terms involved in this application are introduced as follows:
[0042] NETCONF: It is a network configuration and management protocol based on extensible markup language (XML). It uses a simple remote procedure call (RPC) mechanism to achieve communication between the client and the server. NETCONF is a mechanism for managing network devices. Users can use this mechanism to configure and manage network devices, such as adding, modifying, and deleting configuration data of network devices, and obtaining configuration data and / or status data of network devices. NETCONF supports the use of YANG for modeling configuration data.
[0043] Representational state transfer configuration protocol (RESTCONF): is a stateless protocol based on the hypertext transfer protocol (HTTP). It uses HTTP methods to configure and manage network devices, such as adding, modifying, and deleting configuration data of network devices, obtaining configuration data and / or status data of network devices, etc. RESTCONF supports the use of YANG for data modeling of network devices, and supports operations such as adding, deleting, modifying, and querying data of network devices.
[0044] Client / server (C / S) architecture: Both NETCONF and RESTCONF are C / S architectures. The client is an application running in a network controller or network management system (NMS), and the server is a physical device, such as a router, switch, or bridge. The client compiles the RPC operation into an XML message, which follows the YANG model constraints for communication between the client and the server.
[0045] Datastore: Network management protocols such as NETCONF and RESTCONF allow the definition of multiple configuration or status datastores, such as running datastores, candidate datastores, startup datastores, operational datastores, or other datastores. Configuration datastores are used to store configuration data of the service client. For example, the running datastore is used to store configuration data that takes effect on the service client during operation. The candidate datastore is used to store configuration data that is configured for the server but has not yet taken effect, that is, configuration data that is edited by the user but has not yet been submitted to take effect. It will take effect after the candidate datastore is submitted to the running datastore. The startup datastore is used to store configuration data used by the service client when it is started next time. The status datastore is used to store the status and configuration data of the service client. For example, the operational datastore is a read-only datastore for the client. It stores all data that takes effect on the current business when the service client is running, including user configuration data, system configuration data, some statistical data, and other status data.
[0046] YANG: Originally designed as a data modeling language for NETCONF.
[0047] YANG model: refers to a data model built using the YANG data modeling language. The YANG model is maintained by the server. The YANG model is based on tree-structured data that can be managed by NETCONF or RESTCONF protocol operations. Data instantiated using the YANG model can be stored in XML, JavaScript Object Notation (JSON), or other encoding formats.
[0048] Data tree: An instantiated tree of any data modeled with YANG, such as configuration data, state data, or a combination of configuration and state data on the server. The data tree includes multiple instantiated data nodes, each of which is instantiated data on the server (also called YANG data). The data nodes in the data tree are distributed over the data sets on the server.
[0049] Xpath: It is an XML Path language that uses path expressions to address various parts of XML, similar to the file path in a file management system. Xpath expressions can be used as query conditions for querying specified nodes in a data tree, such as / acl / aclGroups / aclGroup. In other words, Xpath is an XML path that is used to indicate a data node in a data tree, that is, it provides the ability to find data nodes in serialized XML.
[0050] XML path language filter (XML path-filter, Xpath-filter): is a data filtering mechanism that can filter the specified path nodes in the data tree.
[0051] Subtree filter: A data filtering mechanism that can filter a subtree in a data tree. Path nodes and subtrees are all server-side data. Therefore, Xpath-filter and subtree-filter are both filters on the data itself.
[0052] Metadata: Data used to describe data, such as attribute information used to describe data. YANG models various configuration data and status data in the network, but these data themselves may have some attribute information, which is metadata. For example, metadata annotation is a technology defined in the request for comments (RFC) 7952 that can annotate YANG data instances with metadata. It is used to add metadata information to specific data instances. For example, origin metadata annotation is used to identify the source attribute of data. Different values of origin indicate different sources of data. For example, origin = system, which indicates that the data is generated by the system or device; origin = intended, which indicates that the data is configured by the user through protocol operation; origin = default, which indicates that the data is the default value used; origin = dynamic, which indicates that the data is dynamically learned during the operation of the device system. Here, metadata annotation metadata is used as an example. The metadata of data in the network may also be of other types. The type of metadata of data in this network is not limited. Among them, the data in the network refers to the configuration data and status data of the network device.
[0053] Network telemetry technology: a technology for remotely collecting data from physical or virtual devices at high speed. The device periodically and actively sends information such as the device's interface traffic statistics, central processing unit (CPU) performance data or memory data to the data collection device through push mode. Compared with the traditional pull mode, which uses a question-and-answer interaction, it provides more real-time and high-speed data collection functions. Push mode means that after the client establishes a connection with the server, when the server has data or messages, the data or messages will be actively pushed to the client. Pull mode means that the client continuously polls the server to obtain new data or messages.
[0054] YANG PUSH: It is a high-speed data collection mechanism implemented by publish / subscribe developed by IETF. YANGPUSH involves a subscriber for subscribing to data, a publisher for publishing subscription data, and a receiver for receiving subscription constraints. The subscriber subscribes to the data content of interest from the configuration data and status data of the publisher, and the publisher publishes a notification message carrying the subscription data to the receiver according to the requirements of the subscription instructions. RFC8639 defines two subscription methods: dynamic subscription and configuration subscription. Both subscription methods are a mechanism for implementing telemetry. Configuration subscription refers to the subscriber sending subscription information to the publisher through the edit configuration operation defined in the network management protocol to complete the subscription. For example, the subscriber compiles the edit configuration operation carrying the subscription information into an XML message, which is also called a configuration subscription request. The configuration subscription request is sent to the publisher to subscribe the receiver to the data, wherein the configuration subscription request indicates that the receiver is subscribed to the data that meets the subscription information according to the configuration subscription method. Dynamic subscription is established through subscription operation <establish-subscription>, sending a message carrying subscription information to the publisher to complete the subscription, wherein the subscriber compiles the subscription establishment operation carrying the subscription information into an XML message, which is also called a dynamic subscription establishment request, and sends the dynamic subscription establishment request to the publisher to subscribe the data to the receiver. There are at least two differences between configuration subscription and dynamic subscription. Difference 1 is: in the configuration subscription mode, the publisher stores the subscription information in the local configuration data set, and the life cycle of the configuration subscription is decoupled from the specific transmission session connection. Therefore, even if the transmission session is interrupted, the subscription information is still retained in the configuration data set. After the transmission session is reestablished, the publisher continues to send notification messages to the receiver. In the dynamic subscription mode, the life cycle of the dynamic subscription is strongly bound to the transmission session connection. When the transmission session is disconnected, the dynamic subscription is interrupted. The transmission session refers to the session established between the client and the server through the network management protocol. Difference 2 is: in the configuration subscription mode, the subscriber may not be the receiver of the subscribed data. The subscriber can configure the receiver's address on the publisher, and the publisher sends notification messages according to the specified receiving address. In the dynamic subscription mode, the subscriber is also the receiver of the data.
[0055] Next, combine the attached Figure 1 , an exemplary description is given of the system architecture involved in the embodiments of the present application.
[0056] Figure 1 1 is a system architecture diagram of a metadata-based data acquisition method provided in an embodiment of the present application. The system 100 may also be referred to as a configuration management system or a network management system (NMS). Figure 1 As shown, the system 100 includes at least a client 101 and a server 102, and the client 101 and the server 102 each have at least one Figure 1 The system 100 is shown to include a server 101. In other embodiments, the system 100 may also include multiple servers 102. Each server 102 can provide services for one or more clients 101. The clients 101 served by the multiple servers 102 may be the same or different. Here, the embodiment of the application does not limit the number of clients 101 and servers 102 in the system 100, and does not limit the number of clients 101 served by the same server 102.
[0057] Each client 101 is connected to the server 102 via a wired or wireless method for communication. Each client 101 can configure and manage the server 102 via a network management protocol, that is, the client 101 and the server 102 are respectively the client and server of the network management protocol, wherein the network management protocol is NETCONF, RESTCONF or other network management protocols, etc. In the case where the network management protocol is NETCONF, the system 100 can also be called a NETCONF system, and in the case where the network management protocol is RESTCONF, the system 100 can also be called a RESTCONF system.
[0058] In a possible implementation, the client 101 runs on a network controller of the network, and the server 102 is a network device (ie, a network element) in the network. Figure 2 Taking the software-defined network (SDN) system shown as an example, the SDN system has one or more SDN controllers, each of which is used to manage one or more network devices in the network. For example, the SDN controller uses a device configuration model to set configuration parameters on a single network device. The network management protocol used between the SDN controller and the network device is NETCONF or RESTCONF. A client of the network management protocol runs in the SDN controller, and the network device managed by the SDN controller is a server of the network management protocol.
[0059] In a possible implementation, the client 101 does not run on the network controller of the network, but on the upper-level management device of the network controller. In this case, the server 102 is the network controller, not the network device. Figure 2 For example, the orchestrator in the SDN system has a wider view of the entire or part of the network relative to the SDN controller. The orchestrator can control and manage the SDN controller. For example, the orchestrator uses the network configuration model to instruct the SDN controller how to configure various parts of the network. The network management protocol used between the orchestrator and the SDN controller is commonly RESTCONF. In this case, the client of the network management protocol runs in the orchestrator, and the SDN controller is the server of the network management protocol.
[0060] The client (such as client 101) queries the configuration data and / or status data of the server by running the network management protocol. In other embodiments, the client can also subscribe to the data of the server for the receiving end through a subscription method. In the data subscription scenario, the data of the server subscribed by the client is the subscription data, the client is the subscriber of the subscription data, the server is the publisher of the subscription data, and the receiving end is the receiver of the subscription data. In the configuration subscription method of YANG PUSH, the receiving end can be the client or a third-party device other than the client, such as a collector that collects data from the server. In the dynamic subscription method of YANG PUSH, the receiving end is the client.
[0061] In the relevant technology, in the data query scenario or data subscription scenario, taking NETCONF as an example, the client can send data filtering conditions to the server according to the data filtering mechanism currently defined by NETCONF (such as subtree-filter or Xpath-filter), and the server returns the data that meets the data filtering conditions in the queried data to the client, but this is a filter on the data itself, and it is impossible to filter the queried / subscribed data based on metadata. In addition to the two data filtering mechanisms of subtree-filter or Xpath-filter, RFC8526 defines: The data query RPC (get-data RPC) operation in the network management protocol supports carrying the source parameter (with-origin) and the source filter parameter (origin-filter), but with-origin and origin-filter can only be used for query operations of metadata such as data source, and cannot be extended to filter based on arbitrary metadata. When a client wants to query / subscribe to data with specified metadata in a server, if the specified metadata is not metadata such as a data source, the client must first query a batch of data and the metadata of the batch of data from the server, and then find the data with the specified metadata from the queried batch of data based on the metadata of the batch of data. In order to find the data with the specified metadata, the client often needs to query a large amount of data from the server, resulting in increased consumption of network bandwidth resources between the server and the client.
[0062] Based on this, the present application extends the current network management protocol operations and defines a universal metadata filtering parameter, allowing the client to carry this metadata filtering parameter in the network management protocol operations (such as configuration query operations, YANG PUSH subscription operations, etc.), and assigns the metadata filtering parameter to the user-specified metadata (i.e., specified metadata) in the network management protocol operations. The server only returns the configuration data and / or status data that satisfies the specified metadata. In this way, the client does not need to batch query data and metadata from the server, which reduces the network bandwidth resource consumption between the server and the client, improves the client's data query efficiency, and meets the demand for obtaining server data based on metadata.
[0063] Next, the process of obtaining data from the server by the client through metadata filtering parameters is introduced as follows in conjunction with the method embodiment.
[0064] Figure 3 is a flowchart of a metadata-based data acquisition method provided by an embodiment of the present application. The method flow is implemented by interaction between a client and a server, wherein the client can be Figure 1 Any client 101 in the server can be Figure 1 At the server side in the method, the method flow includes the following steps.
[0065] 301. The client generates a data acquisition request, which includes data indication information and a metadata filter parameter (meta-filter). The data indication information indicates first data to be acquired in the server, and the metadata filter parameter indicates filtering out second data from the first data, where the second data has first metadata.
[0066] Among them, the data acquisition request is used to request to obtain data in the server (such as configuration data and / or status data), and the first data is the data to be obtained. The data format of the data acquisition request meets the requirements of the network management protocol run by the client, and the data acquisition request is a network management protocol message (such as an XML message) compiled based on the network management protocol operation. The metadata-based data acquisition method provided in the present application is suitable for data query scenarios of network management protocols. In the data query scenario, the data acquisition request is a data query request, which is edited by a network management protocol operation (such as a configuration query operation) used to query data in the network. At this time, the first data is the data to be queried.
[0067] The data indication information includes target data set information, and the target data set information indicates the data set where the first data is located (referred to as the target data set). In a data query scenario, the data indication information is query information, and the target data set is the data set to be queried in the server. Exemplarily, the target data set information may be the name of the target data set, and the first data is the data in the target data set. Optionally, the data indication information also includes a data filtering condition, and the data filtering condition is used to filter out the data in the first data (referred to as the fourth data). Exemplarily, the data filtering condition may be defined by a subtree filtering parameter subtree-filter or an Xpath filtering parameter Xpath-filter. For example, the parameter value of subtree-filter is the data filtering condition, and the data in the subtree indicated by the parameter value of subtree-filter is the fourth data. For another example, the parameter value of Xpath-filter is the data filtering condition, and the data in the data node indicated by the parameter value of Xpath-filter is the fourth data.
[0068] The meta-filter is used to define metadata filtering conditions in the data acquisition process. Its purpose is to implement data filtering through metadata. For example, the meta-filter supports the definition of one or more parameter values, each parameter value is a metadata, and the metadata is a metadata filtering condition. The meta-filter is used to indicate that data that meets any parameter value is filtered out from the data to be acquired. For example, if the meta-filter has a parameter value, the server returns the data that meets this parameter value in the first data. If the meta-filter has multiple parameter values, the server returns the data that meets the parameter value in the first data for each parameter value. The first metadata is any parameter value of the metadata filtering parameter, and the second data is the data with the first metadata filtered out from the first data. When the data indication information includes the data filtering condition, the second data is the data with the first metadata filtered out from the fourth data.
[0069] In a possible implementation, based on the following extension method 1 or 2, a meta-filter is extended in a data acquisition request.
[0070] Extension mode 1: meta-filter is a parameter defined by YANG in a data acquisition request. Compared with the existing data acquisition request, meta-filter is a new parameter defined by YANG, that is, an extended YANG parameter.
[0071] Exemplarily, the client uses YANG to define a new YANG parameter: meta-filter in the target operation of the network management protocol to extend the target operation so that the extended target operation supports the meta-filter, and the server supports the extended target operation so that the server can identify the meta-filter in the data acquisition request, and perform metadata-based filtering on the first data according to the parameter value of the meta-filter. The target operation is an RPC operation defined by the network management protocol for acquiring server data, such as a query operation for querying server data, or a subscription operation for subscribing to server data.
[0072] The network management protocol is NETCONF, and the target operations include query configuration operations <get-config>, query operation <get>And data query operations <get-data>For example, the extended YANG model is as follows:
[0073]
[0074]
[0075] Afterwards, the user defines data indication information in the extended target operation, and specifies the parameter value of the meta-filter as the first metadata. The client compiles the target operation into a data acquisition request in XML encoding. During the compilation process, YANG is used to define the meta-filter in the data acquisition request, and the parameter value of the meta-filter is defined as the first metadata, so that the data acquisition request carries the meta-filter whose parameter value is the first metadata.
[0076] Taking the data query scenario as an example, suppose you query the routing entries in the routing table on the server. In the data tree on the server, the routing table records the subtree routes of the operational data set on the server. For example, the subtree routes is as follows:
[0077]
[0078]
[0079] Among them, "priority" is the priority parameter of the routing entry, which is used to record the priority of the routing entry (ie, routing priority). The routing priority is a kind of metadata.
[0080] Assume that the route entry with a route priority of 100 in the subtree routes is queried, then the operational dataset is the target dataset, the subtree route is the data filtering condition, and the route priority 100 is the parameter value of the meta-filter. The meta-filter is defined using YANG. Based on this, the data query request generated by the client is as follows:
[0081]
[0082] In this example, the target operation is defined in RFC8526 <get-data>,in, <get-data>It is an RPC operation used in NETCONF to query all or part of the specified data. The operational data set is the target data set. The data in the operational data set is the first data. The data in the subtree routes is the fourth data. The meta-filter is a parameter defined by YANG in the data query request. In this example, the metadata of the routing priority 100 is specified for the meta-filter, and the routing entries with a routing priority of 100 in the subtree routes will be returned to the client. In other embodiments, multiple metadata can also be specified for the meta-filter, so that the routing entries in the subtree routes that meet any of the multiple metadata will be returned to the client.
[0083] Extension mode 2: meta-filter is an XML attribute of a YANG node defined in a data acquisition request. Compared with an existing data acquisition request, meta-filter is an XML attribute newly defined in a data acquisition request according to an XML encoding method, that is, an extended XML attribute.
[0084] The data acquisition request includes at least one YANG node, and meta-filter is an XML attribute of any YANG node in the at least one YANG node.
[0085] Exemplarily, the client compiles the target operation into a data acquisition request in XML encoding. During the compilation process, the meta-filter is encoded as an XML attribute of any YANG node in the data acquisition request, and the parameter value of the meta-filter is defined as the first metadata, so that the data acquisition request carries the meta-filter whose parameter value is the first metadata. Since the server has the ability to identify XML attributes in network management protocol messages when interacting with the client through the network management protocol, the server can identify the meta-filter in the data acquisition request, so that the server can perform metadata-based filtering on the first data according to the parameter value of the meta-filter.
[0086] Still taking the data query scenario as an example, suppose you want to query the route entries with a route priority of 100 in the subtree routes of the operational dataset. The operational dataset is the target dataset, the subtree route is the data filtering condition, and the route priority 100 is the parameter value of the meta-filter. The meta-filter is defined using XML attributes. Based on this, the data query request generated by the client is as follows:
[0087]
[0088]
[0089] In this example, the target operation is defined in RFC8526 <get-data>operation, the operational data set is the target data set, the data in the operational data set is the first data, the data in the subtree routes is the fourth data, and meta-filter is an XML attribute in the data query request. In this example, the metadata of the routing priority 100 is specified for meta-filter, and the routing entries with a routing priority of 100 in the subtree routes will be returned to the client. In other embodiments, multiple metadata can also be specified for meta-filter, so that the routing entries in the subtree routes that meet any of the multiple metadata will be returned to the client.
[0090] 302. The client sends the data acquisition request to the server.
[0091] Take the data query scenario as an example. Figure 4 As shown, the data acquisition request is a data query request. Assuming that the client runs on a network controller and the server is a network device, the network controller sends a data query request to the network device through the client. The data query request includes a meta-filter to indicate that the query is for data that satisfies the specified metadata (ie, the first metadata).
[0092] 303. The server receives the data acquisition request, and searches for the second data in the first data based on the data indication information and meta-filter in the data acquisition request.
[0093] After receiving the data acquisition request, the server parses the data indication information and meta-filter from the data acquisition request. When the meta-filter is a YANG parameter, the server parses the meta-filter from the area in the data acquisition request for storing the YANG parameter. When the meta-filter is an XML attribute, the server parses the meta-filter from the area in the data acquisition request for storing the XML attribute.
[0094] The server uses the parameter value of meta-filter as the first metadata, and the data in the target data set indicated by the data indication information as the first data. If the data indication information does not include the data filtering condition, the server searches for the data with the first metadata in the target data set, and the queried data is the second data.
[0095] If the data indication information includes a data filtering condition, the server searches the target data set for data that meets the data filtering condition and has the first metadata, and the searched data is the second data. Exemplarily, the server first searches the target data set for data that meets the data filtering condition, and the data searched this time is the fourth data, and then searches the fourth data for data that has the first metadata, and the data searched this time is the second data. Alternatively, the server first searches the target data set for data that has the first metadata, and the data searched this time is called the fifth data, and then searches the searched fifth data for data that meets the data filtering condition, and the data searched this time is the second data.
[0096] Still taking the example of querying the routing entries with a routing priority of 100 in the subtree routes of the operational data set, the routing priorities of routing entries 1 to 5 in the subtree routes are 100, 100, 0, 60, and 100 respectively. Then routing entry 1, routing entry 2, and routing entry 5 are the second data that meet the metadata filtering condition that the metadata routing priority is 100.
[0097] 304. The server sends a data acquisition response to the client based on the query of the second data, where the data acquisition response includes the second data.
[0098] Exemplarily, after acquiring the second data, the server generates a data acquisition response based on the second data and sends the data acquisition response to the client. Figure 4 For example, in the data query scenario, the data acquisition response is the data query response. The network device uses the parameter value of the meta-filter in the data query response as the specified metadata. After querying the data that meets the specified metadata (i.e., the second data), it sends the data query response to the network controller. The data query response includes the data that meets the specified metadata. Taking route entry 1, route entry 2, and route entry 5 as data that meets the specified metadata, the data query response is as follows:
[0099]
[0100]
[0101] 305. The client receives the data acquisition response.
[0102] After receiving the data acquisition response, the client parses the second data from the data acquisition request, thereby implementing metadata-based data filtering by extending the metadata filtering parameter in the data acquisition request.
[0103] In the method provided by the embodiment of the present application, the client instructs to filter data with specified metadata from the data to be obtained through the metadata filtering parameter in the data acquisition request, so that the server sends the data with specified metadata in the data to be obtained by the client to the client according to the instruction of the metadata filtering parameter, thereby realizing data filtering based on metadata. In addition, through the above-mentioned extension mode 1 and extension mode 2, the metadata filtering parameter is extended in the data acquisition request, so that the metadata filtering parameter has universality, and any metadata can be specified through the metadata filtering parameter, so that data filtering based on any metadata can be realized through the method of the embodiment of the present application.
[0104] Figure 3 The metadata-based data acquisition method provided by the present application is applicable to data query scenarios as an example. In other embodiments, the method is also applicable to data subscription scenarios of network management protocols. In data subscription scenarios, the data acquisition request is a data subscription request, and the first data is the data in the server subscribed by the client (i.e., subscription data). Next, in combination with Figure 5 This section describes the process of how a client subscribes to data from a server based on metadata filtering parameters.
[0105] Figure 5 This is a flow chart of a method for obtaining data based on metadata in a data subscription scenario provided by an embodiment of the present application. The method flow includes the following steps.
[0106] 501. A network controller generates a data subscription request and sends the data subscription request to a network device. The data subscription request includes data indication information and a meta-filter.
[0107] Among them, the network device is any network device in the network, the network device is configured as a server of the network management protocol, the network controller is used to manage the network device, and a client of the network management protocol runs in the network controller, the network management protocol is NETCONF, RESTCONF or other network management protocols, etc. In the embodiment of the present application, the steps performed by the network controller are implemented by the client. In the data subscription scenario, the client, the server and the receiving end are the subscriber, the publisher and the receiver of the subscribed data respectively, and the receiving end can be the client or a third-party device other than the client.
[0108] In a data subscription scenario, the data indication information is subscription information, indicating the first data in the subscription service end. Exemplarily, the data indication information includes at least one of the target data set information of the subscription data, the subscription period, the identification of the encoding format, the identification of the transmission protocol, and the receiving address, wherein the target data set indicated by the target data set information is the subscribed data set, the subscription period is the period for sending the subscription data to the receiving end, the encoding format is the encoding format used when sending the subscription data to the receiving end, the transmission protocol is the transmission protocol used when sending the subscription data to the receiving end, and the receiving address is the address of the receiving end. Optionally, the data indication information also includes a data filtering condition to indicate filtering out the data (i.e., the fourth data) in the subscription data that meets the data filtering condition. Exemplarily, the data filtering condition can be defined by a subtree filtering parameter subtree-filter or an Xpath filtering parameter Xpath-filter.
[0109] The data subscription request is a dynamic subscription request or a configuration subscription request defined in YANG PUSH. By extending YANGPUSH, the user's data subscription request is allowed to carry a meta-filter, so that the data with specified metadata in the subscription data can be filtered out through the meta-filter, so that the server can filter the subscription data based on the metadata. In the case where the data subscription request is a dynamic subscription request, the receiving end of the subscription data is the client, and the data indication information does not include the receiving address. In the case where the data subscription request is a configuration subscription request, the receiving end of the subscription data is the client or a third-party device. In order to facilitate the server to determine the receiving end, the data indication information includes the receiving address.
[0110] In a possible implementation, according to the above-mentioned extension method 1, the client uses YANG to define a new YANG parameter: meta-filter in the subscription operation (i.e., target operation) of the network management protocol (such as NETCONF) to extend the subscription operation so that the extended subscription operation supports the meta-filter, wherein the subscription operation is an operation defined by the network management protocol for subscribing to server-side data, such as an edit configuration operation or a subscription establishment operation that carries subscription information. The user defines the subscription information in the extended subscription operation and specifies the parameter value of the meta-filter as the first metadata. The client compiles the subscription operation into a data subscription request in XML encoding. During the compilation process, the meta-filter is defined in the data subscription request, and the parameter value of the meta-filter is defined as the first metadata, so that the data subscription request carries the meta-filter whose parameter value is the first metadata.
[0111] Assume that the network controller subscribes to the route entry with a route priority of 100 in the subtree routes of the operational dataset of the network device. The operational dataset is the target dataset, the subtree route is the data filtering condition, and the route priority 100 is the parameter value of the meta-filter. The meta-filter is defined using YANG. Based on this, the data subscription request generated by the network controller is as follows:
[0112]
[0113] In this example, the subscription operation is a subscription establishment operation <establish-subscription> , <establish-subscription>For dynamic subscription RPC operation, the data subscription request is a dynamic subscription establishment request, the data in the operational data set is the first data to be subscribed, the data in the subtree routes is the fourth data, and meta-filter is a parameter defined by YANG in the data subscription request. In this example, the metadata of routing priority 100 is specified for meta-filter, and the routing entries with routing priority 100 in the subtree routes will be returned to the client. In other embodiments, multiple metadata can also be specified for meta-filter, so that the routing entries in the subtree routes that meet any of the multiple metadata will be returned to the network controller.
[0114] In a possible implementation, according to the above-mentioned extension method 2, meta-filter is defined as an XML attribute of a YANG node in the data subscription request to implement the extended YANG PUSH. Exemplarily, the client compiles the subscription operation into a data subscription request in XML encoding. During the compilation process, the meta-filter is encoded as an XML attribute of any YANG node in the data subscription request, and the parameter value of the meta-filter is defined as the first metadata, so that the data subscription request carries a meta-filter whose parameter value is the first metadata. Since the network device has the ability to identify the XML attributes in the network management protocol message when interacting with the client through the network management protocol, the network device can identify the meta-filter in the data subscription request, so that when uploading the subscription data, the network device can perform metadata-based filtering on the subscription data according to the parameter value of the meta-filter.
[0115] Assume that the network controller subscribes to the route entry with a route priority of 100 in the subtree routes of the operational dataset. The operational dataset is the target dataset, the subtree route is the data filtering condition, and the route priority 100 is the parameter value of the meta-filter. The meta-filter is defined using XML attributes. Based on this, the data subscription request generated by the network controller is as follows:
[0116]
[0117] In this example, the subscription operation is a subscription establishment operation <establish-subscription>, the data subscription request is a dynamic subscription establishment request, the data in the operational data set is the first data to be subscribed, the data in the subtree routes is the fourth data, and meta-filter is an XML attribute in the data subscription request. In this example, the metadata of routing priority 100 is specified for meta-filter, and the routing entries with routing priority 100 in the subtree routes will be returned to the client. In other embodiments, multiple metadata can also be specified for meta-filter, so that the routing entries in the subtree routes that meet any of the multiple metadata will be returned to the network controller.
[0118] 502. The network device receives the data subscription request, and sends a subscription completion response to the network controller based on the data subscription request, and the network controller receives the subscription completion response.
[0119] The subscription completion response indicates that the data subscription of the network device is completed, and the subscription completion response includes a subscription identification (identity, ID).
[0120] Exemplarily, the network device assigns a subscription ID to the data subscribed by the data subscription request, and generates a subscription completion response based on the assigned subscription ID. Taking the subscription ID as 101 as an example, the subscription completion response is as follows:
[0121]
[0122]
[0123] After generating the subscription completion response, the network device sends the subscription completion response to the network controller, and the network controller receives the subscription completion response.
[0124] 503. If the network controller is a receiving end of the subscription data, the network device sends a notification message to the network controller based on the data indication information and meta-filter in the data subscription request, and the network controller receives the notification message.
[0125] The notification message and the subscription completion response are both data acquisition responses to the data subscription request, and the notification message includes the second data and the subscription ID.
[0126] After each subscription cycle, the network device searches for the second data in the first data based on the data indication information and the meta-filter (such as the above step 303), and generates a notification message based on the subscription ID and the second data found. For example, the subscription ID is 1011, and routing entries 1, 2, and 5 are the second data. The notification message is as follows:
[0127]
[0128] In the dynamic subscription mode, the data subscription request is a dynamic subscription establishment request, and the receiving end of the subscription data is the network controller, such as Figure 5 As shown, after each subscription cycle, the network device will generate a notification message and send the notification message to the network controller. Correspondingly, after each subscription cycle, the network controller can receive the notification message, parse the second data and the subscription ID from the notification message, and thus determine that the subscription data of the subscription ID is the second data.
[0129] In the configuration subscription mode, the data subscription request is a configuration subscription request, and the data indication information in the configuration subscription request includes a receiving address. Based on this, after each subscription cycle, the network device sends the notification message to the receiving end indicated by the receiving address. Correspondingly, after each subscription cycle, the receiving end can receive the notification message, parse the second data and the subscription ID from the notification message, and thus determine that the subscription data of the subscription ID is the second data, wherein the receiving end may be a client or a third-party device.
[0130] Figure 5 The process shown in FIG. 1 is described by taking the network controller subscribing to the data of the network device as an example. In other embodiments, the client runs on the upper-level management device (such as the orchestrator) of the network controller, and the network controller is the server. Figure 5 In a similar process, the upper-level management device subscribes to the data in the network controller for the receiving end based on the meta-filter, which will not be repeated here.
[0131] In the method provided by the embodiment of the present application, the network controller instructs to filter the data with the specified metadata from the data to be acquired through the metadata filtering parameter in the data acquisition request, so that the network device sends the data with the specified metadata in the data to be acquired by the network controller to the receiving end according to the instruction of the metadata filtering parameter, thereby realizing data filtering based on metadata. In addition, through the above-mentioned extension mode 1 and extension mode 2, the metadata filtering parameter is extended in the data subscription request, so that the metadata filtering parameter has universality, and any metadata can be specified through the metadata filtering parameter, so that data filtering based on any metadata can be realized through the method of the embodiment of the present application.
[0132] exist Figures 3 to 5 In the illustrated embodiment, when a meta-filter has multiple parameter values, the multiple parameter values satisfying or logical relationship are used as an example for introduction. When the multiple parameter values satisfy or logical relationship, for any parameter value among the multiple parameter values, when there is data satisfying any parameter value in the first data, the server returns the data satisfying any parameter value to the client. In other embodiments, the multiple parameter values satisfy and logical relationship. In this case, the server returns the data satisfying the multiple parameter values in the first data to the client. If a certain data in the first data only satisfies some of the parameter values of the multiple parameter values or none of the multiple parameter values are satisfied, the server will not return the data. Exemplarily, in the case where a meta-filter has multiple parameter values, in order to enable the server to identify whether the logical relationship between the multiple parameter values is an OR logical relationship or an AND logical relationship, the client defines a logical parameter in the data acquisition request based on extension mode 1 or extension mode 2. When the parameter value of the logical parameter is a first identifier, it indicates that the multiple parameter values of the meta-filter satisfy the AND logical relationship. When the parameter value of the logical parameter is a second identifier, it indicates that the multiple parameter values of the meta-filter satisfy the OR logical relationship. In this way, the server can return the data that meets the metadata filtering parameter requirements in the first data to the client according to the parameter value of the logical parameter in the data acquisition request. In some embodiments, when the data acquisition request does not include the logical parameter, it is assumed that the multiple parameter values of the meta-filter satisfy the OR logical relationship.
[0133] In the configuration subscription scenario of YANG PUSH, the subscriber and the receiver of the subscription data are not the same device. When the subscriber customizes metadata for the subscription data, in the related art, the subscriber cannot pass the customized metadata to the receiver, where the customized metadata includes, for example, trace information or personalized classification information. Here, no limitation is imposed on customized metadata.
[0134] Based on this, this application provides two metadata transmission methods, namely metadata transparent transmission and metadata direct transmission (i.e. direct transmission). The metadata transparent transmission method means that when subscribing to data from the publisher, the subscriber provides metadata to the publisher, and the publisher reports the subscription data and the metadata to the receiver. The metadata direct transmission method means that the receiver actively obtains the metadata of the subscription data from the subscriber. Next, combined with Figure 6 and Figure 7 These two metadata transmission methods are introduced respectively.
[0135] Figure 6 This is a flowchart of transparently transmitting metadata in a configuration subscription scenario provided by an embodiment of the present application, and the process includes the following steps.
[0136] 601. The client and the server establish a network management protocol connection. Through the network management protocol connection, the client and the server send each other respective capability notification information.
[0137] Among them, the client's capability announcement information is used to indicate that the client has the metadata transparent transmission capability in the data subscription service. Optionally, the client's capability announcement information is also used to announce other capabilities of the client in addition to the metadata transparent transmission capability. The server's capability announcement information is used to indicate that the server has the metadata transparent transmission capability in the data subscription service. Optionally, the server's capability announcement information is also used to announce other capabilities of the server in addition to the metadata transparent transmission capability.
[0138] Exemplarily, the client and the server send hello messages to each other, and each hello message includes each other's capability announcement information, so as to realize sending each other's capability announcement information. Exemplarily, the hello message is as follows:
[0139]
[0140] In another possible implementation manner, if both the client and the server have recorded the capability advertisement information of the other party, the client and the server do not need to send the capability advertisement information to each other.
[0141] 602. The client generates a first data subscription request and sends the first data subscription request to the server. The first data subscription request includes subscription information and metadata transmission parameters. The subscription information indicates that the receiving end is subscribed to the third data in the server. The metadata transmission parameters indicate that the second metadata is configured for the third data, and the second metadata is sent to the receiving end together with the subscribed third data.
[0142] Among them, the client is a network controller, the server is a network device, or the client is the upper-level management device of the network controller (such as an orchestrator), and the server is a network controller. The receiving end is a third-party device (such as a collector) other than the client and the server. The third data is the subscription data of the client, and the subscription information includes at least one of the target data set information, subscription period, encoding format identification, transmission protocol identification and receiving address of the third data. Optionally, the subscription information also includes filtering conditions, which have been introduced above and will not be repeated here.
[0143] The first data subscription request is a configuration subscription request defined in YANG PUSH. By extending YANG PUSH, the user's data subscription request is allowed to carry metadata transparent transmission parameters, so that the metadata transparent transmission parameters can be used to instruct the server to send the metadata and subscription data together to the receiving end to achieve metadata transparent transmission.
[0144] Exemplarily, when both the client and the server have metadata transparent transmission capabilities, the client defines metadata transparent transmission parameters in the first data subscription request according to the above-mentioned extension method 1 or extension method 2 to implement extended YANG PUSH. This process can refer to the process of subscribing to metadata filtering parameters in the data subscription request in 501, which will not be repeated here.
[0145] Taking the above extension mode 1 as an example, defining the metadata transparent transmission parameters in the first data subscription request, assuming that the data in the subscribed operational data set, the first data subscription request is as follows:
[0146]
[0147]
[0148] In the case that at least one of the client and the server does not have the metadata transparent transmission capability, the client does not need to define the metadata transparent transmission parameter in the first data subscription request, or the client may define the metadata transparent transmission parameter in the first data subscription request, but the parameter value of the metadata transparent transmission parameter is defined as an invalid parameter value to indicate that the metadata transparent transmission parameter is invalid.
[0149] 603. The server receives the first data subscription request, sends a first subscription completion response to the client based on the first data subscription request, and the client receives the first subscription completion response.
[0150] The first completion response includes the subscription ID of the third data. This step 603 is the same as the above step 502, and the description of this step 603 is omitted here.
[0151] 604. The server sends a first notification message to the receiving end based on the subscription information and metadata transparent transmission parameters in the first data subscription request, and the receiving end receives the first notification message.
[0152] The first notification message includes the third data, the second metadata and a subscription ID of the third data.
[0153] After each subscription cycle, the server uses the data in the target data set indicated by the subscription information as the third data. If the subscription information does not include a filtering condition, the server generates the first notification message based on the third data, the second metadata, and the subscription ID of the third data according to the indication of the metadata transparent transmission parameter. If the subscription information includes a filtering condition, the server first filters out the data (called the sixth data) that meets the filtering condition from the third data, and then generates the first notification message based on the sixth data, the second metadata, and the subscription ID of the third data according to the indication of the metadata transparent transmission parameter.
[0154] Still taking the first data subscription request shown in step 602 as an example, the first notification message is expressed as follows:
[0155]
[0156] like Figure 6 As shown, after each subscription cycle, the server generates a first notification message, and sends the first notification message to the introducing device based on the receiving address in the subscription information. After receiving the first notification message, the receiving device can parse the third data and the second metadata from the first notification message, and locally configure the second metadata as the metadata of the third data, so that the third data can be subsequently classified according to the second metadata.
[0157] In the method provided by the embodiment of the present application, the client instructs the server to transmit the specified metadata to the receiving end when uploading the subscription data to the receiving end through the metadata transmission parameter in the data subscription request, so that the server sends the client subscription data and the client's specified metadata to the receiving end according to the instruction of the metadata transmission parameter, thereby realizing metadata transmission, so that the receiving end can classify the subscription data according to the specified metadata. In addition, through the above-mentioned extension method 1 and extension method 2, the metadata transmission parameter is extended in the data subscription request, so that the metadata transmission parameter has universality, and the metadata transmission parameter can specify the transmission of any metadata, so that through the embodiment method of the present application, the transmission of any metadata can be realized between the subscriber, the publisher and the receiver.
[0158] Still taking the client as the receiving end to subscribe to the third data as an example, see Figure 7 This is a flowchart of directly transmitting metadata in a configuration subscription scenario provided by an embodiment of the present application, and the process includes the following steps.
[0159] 701. The client generates a second data subscription request and sends the second data subscription request to the server. The second data subscription request includes subscription information. The subscription information indicates that the receiving end is subscribed to third data in the server.
[0160] The client is a network controller, and the server is a network device, or the client is a higher-level management device (such as an orchestrator) of the controller, and the server is a network controller. The receiving end is a third device (such as a collector) other than the client and the server. The second data subscription request is similar to the first data subscription request, except that, relative to the first data subscription request, the second data subscription request does not include metadata filtering parameters, and this step 701 is not repeated here.
[0161] 702. The server receives the second data subscription request, and based on the second data subscription request, sends a second subscription completion response to the client, and the client receives the second subscription completion response.
[0162] The second completion response includes the subscription ID of the third data. This step 702 is the same as the above step 502, and will not be described in detail here.
[0163] 703. The server sends a second notification message to the receiver based on the subscription information in the second data subscription request. The receiver receives the second notification message, where the second notification message includes the third data and a subscription ID for the third data.
[0164] The second notification message is similar to the first notification message, and the difference is that, relative to the first notification message, the second notification message does not include the second metadata. This step 703 is similar to step 604, and here, this embodiment of the application will not repeat this step 703.
[0165] 704. The receiving end generates a metadata acquisition request, and sends the metadata acquisition request to the client, where the metadata acquisition request indicates acquisition of metadata of the third data.
[0166] The metadata acquisition request includes a subscription ID of the third data, indicating a request to acquire metadata of the data subscribed by the subscription ID.
[0167] In a possible implementation, the metadata acquisition request is a network management protocol message. Exemplarily, the metadata acquisition request is expressed as follows:
[0168]
[0169] In one possible implementation, the metadata acquisition request is a message that meets the target interface message requirements, where the target interface is used to obtain metadata of subscription data from the client. In this case, the client will call the target interface, generate the data acquisition request, and send the data acquisition request to the server.
[0170] In a possible implementation, the metadata acquisition request is a protocol message other than the network management protocol. Here, the embodiment of the present application does not limit the protocol type and data format of the data acquisition request.
[0171] 705. The client receives the metadata acquisition request, and based on the metadata acquisition request, sends a metadata acquisition response to the receiving end, and the receiving end receives the metadata acquisition response.
[0172] The metadata acquisition response includes the second metadata. Exemplarily, after receiving the metadata acquisition request, the client allocates metadata to the third data subscribed by the subscription ID based on the subscription ID in the metadata acquisition request, and the metadata allocated to the third data is the second metadata. Alternatively, the client stores the correspondence between each subscription ID and metadata, and the client uses the metadata corresponding to the subscription ID of the third metadata as the second metadata. After that, the client generates the data acquisition response based on the second metadata and returns the metadata acquisition response to the receiving end. For example, the metadata acquisition response is as follows:
[0173]
[0174]
[0175] After receiving the metadata acquisition response, the receiving end parses the metadata acquisition response to obtain the second metadata, and configures the second metadata as metadata of the third data, so as to subsequently classify the third data according to the second metadata.
[0176] In the method provided in the embodiment of the present application, the receiver of the subscription data requests the subscriber to provide metadata of the subscription data, and the subscriber provides metadata for the subscription data according to the request of the receiver, thereby realizing direct transmission of metadata between the receiver and the subscriber, so that the receiver can classify the subscription data according to the directly transmitted metadata.
[0177] for Figure 6 and Figure 7 In these two embodiments, the second metadata is metadata provided by the client for the third data, and the process of the receiving end obtaining the second data from the first notification message and obtaining the second data from the metadata acquisition response is the process of the receiving end obtaining the second metadata provided by the client for the third data. Figure 6 and Figure 7 The implemented method is also called a metadata acquisition method. For any of the first data subscription request and the second data subscription request, the data subscription request may also include metadata filtering parameters. In this case, when the server reports the third data to the receiving end, the server filters out the data (called the seventh data) that meets the requirements of the metadata filtering parameters from the third data, wherein the filtering method may refer to the method of filtering the first data. Afterwards, the server reports the seventh data to the receiving end through a notification message. In this case, the third data may be the first data mentioned above, or it may not be the first data. In the case that the third data is the first data, the first data subscription request or the second data subscription request including the metadata filtering parameters is Figure 5 The data subscription request in question.
[0178] The above describes the method of the embodiment of the present application, and the following describes the device and equipment of the embodiment of the present application. It should be understood that the device and equipment described below have the same inventive concept as the above method embodiment, and can achieve the beneficial effects that can be achieved by the above method embodiment. Figures 8 to 11 Describe the apparatus and device of the embodiments of the present application. It should be understood that the technical features described in the method embodiment are also applicable to the following apparatus embodiment and device embodiment.
[0179] Figure 8 is a schematic diagram of a metadata-based data acquisition device 800 provided in an embodiment of the present application. Figure 8 The device 800 shown is configured as a device running a client in the above method embodiment. The device 800 is used to implement the steps performed by the above client. The device 800 includes:
[0180] A generating module 801 is used to generate a data acquisition request, the data acquisition request includes data indication information and metadata filtering parameters, the data indication information indicates first data to be acquired in the server, the metadata filtering parameters indicate filtering second data from the first data, and the second data has first metadata;
[0181] The sending module 802 is used to send a data acquisition request to the server;
[0182] The receiving module 803 is used to receive a data acquisition response from the server, where the data acquisition response includes the second data.
[0183] In a possible implementation, the metadata filtering parameter is a parameter defined in the data acquisition request using the next generation network modeling language; or, the metadata filtering parameter is an extensible markup language attribute defined in the data acquisition request.
[0184] In a possible implementation manner, the data acquisition request is a data query request, and the first data is the data to be queried; or, the data acquisition request is a data subscription request, and the first data is the data subscribed by the client.
[0185] In a possible implementation, the generating module 801 is further used to generate a first data subscription request, the first data subscription request including subscription information and metadata transparent transmission parameters, the subscription information indicates that the receiving end subscribes to the third data in the service end, the metadata transparent transmission parameters indicate that the second metadata is configured for the third data, and the second metadata is sent to the receiving end together with the subscribed third data;
[0186] The sending module 802 is further configured to send a first data subscription request to the server.
[0187] In a possible implementation, the apparatus 800 further includes: an acquisition module, configured to acquire capability notification information of the server, where the capability notification information is used to notify that the server has metadata transparent transmission capability in the data subscription service.
[0188] In a possible implementation, the sending module 802 is further configured to send a second data subscription request to the server, where the second data subscription request includes subscription information, where the subscription information indicates that the receiving end subscribes to the third data in the server;
[0189] The receiving module 803 is further configured to receive a metadata acquisition request from a receiving end, where the metadata acquisition request indicates acquiring metadata of the third data;
[0190] The sending module 802 is further configured to send a metadata acquisition response to the receiving end based on the metadata acquisition request, where the metadata acquisition response includes the second metadata.
[0191] Fig. 9 is a schematic diagram of the structure of another metadata-based data acquisition device provided in an embodiment of the present application. Fig. 9 The device 900 shown is configured as the server in the above method embodiment, and the device 900 includes:
[0192] The receiving module 901 is used to receive a data acquisition request from a client, the data acquisition request includes data indication information and metadata filtering parameters, the data indication information indicates first data to be acquired from the server, the metadata filtering parameters indicate filtering second data from the first data, and the second data has first metadata;
[0193] A query module 902, configured to query the first data for the second data based on the data indication information and the metadata filtering parameter;
[0194] The sending module 903 is used to send a data acquisition response to the client based on the second data queried.
[0195] In a possible implementation, the metadata filtering parameter is a parameter defined in the data acquisition request using the next generation network modeling language; or, the metadata filtering parameter is an extensible markup language attribute defined in the data acquisition request.
[0196] In a possible implementation manner, the data acquisition request is a data query request, and the first data is the data to be queried; or, the data acquisition request is a data subscription request, and the first data is the data subscribed by the client.
[0197] In a possible implementation, the receiving module 901 is further used to receive a first data subscription request from a client, where the first data subscription request includes subscription information and a metadata transparent transmission parameter, where the subscription information indicates that the receiving end subscribes to the third data in the server, and the metadata transparent transmission parameter indicates that the second metadata is configured for the third data, and the second metadata is sent to the receiving end together with the subscribed third data;
[0198] The sending module 903 is further configured to send subscription notification information to the receiving end based on the subscription information and the metadata transparent transmission parameter, where the subscription notification information includes the third data and the second metadata.
[0199] In a possible implementation, the sending module 903 is further used to send capability notification information to the client, where the capability notification information is used to notify that the server has the metadata transparent transmission capability in the data subscription service.
[0200] It should be understood that device 900 corresponds to the server in the above-mentioned method embodiment, and the modules in device 900 and the above-mentioned other operations and / or functions are respectively for implementing the various steps and methods implemented by the server in the method embodiment. The specific details can be found in the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.
[0201] Fig.10 is a schematic diagram of a metadata acquisition device provided in an embodiment of the present application, such as Fig.10 The device 1000 shown is configured as the receiving end in the above method embodiment, and the device 1000 includes:
[0202] The receiving module 1001 is used to receive subscription notification information from the server, where the subscription notification information includes third data, and the third data is data subscribed by the client from the server for the receiving end;
[0203] An acquisition module 1002 is used to acquire second metadata provided by the client for the third data;
[0204] The configuration module 1003 is used to configure the second metadata as metadata of the third data.
[0205] In a possible implementation, the subscription notification information further includes second metadata, and the acquisition module 1002 is configured to acquire the second metadata from the subscription notification information.
[0206] In a possible implementation, the acquisition module 1002 is used to:
[0207] Sending a metadata acquisition request to the client, where the metadata acquisition request indicates obtaining metadata of the third data;
[0208] A metadata acquisition response from the client is received, where the metadata acquisition response includes the second metadata.
[0209] Through the description of the above implementation methods, technicians in the relevant field can understand that for the convenience and simplicity of description, for any device among the above-mentioned devices 800-device 1000, the device is only illustrated by the division of the above-mentioned functional modules. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0210] Fig.11 is a structural diagram of an electronic device provided in an embodiment of the present application, Fig.11 The electronic device 1100 shown is configured as the client, server or receiver described in the above embodiments. Fig.11 As shown, the electronic device 1100 includes: a bus 1102, a processor 1104, a memory 1106 and a communication interface 1108. The processor 1104, the memory 1106 and the communication interface 1108 communicate through the bus 1102. The electronic device 1100 can be a server or a client. It should be understood that the present application does not limit the number of processors and memories in the electronic device 1100. The bus 1102 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one line is used to represent it, but it does not mean that there is only one bus or one type of bus. Bus 1104 may include a path for transmitting information between various components of electronic device 1100 (for example, memory 1106, processor 1104, communication interface 1108). Processor 1104 may include any one or more of processors such as central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP) or digital signal processor (DSP). Memory 1106 may include volatile memory (volatile memory), such as random access memory (RAM). Memory 1106 may also include non-volatile memory (non-volatile memory), such as read-only memory (ROM), flash memory, hard disk drive (HDD) or solid state drive (SSD). Executable program code is stored in memory 1106, and processor 1104 executes the executable program code to respectively implement a data acquisition method based on metadata or a metadata acquisition method. That is, the memory 1106 stores instructions for executing the metadata-based data acquisition method or the metadata acquisition method. Alternatively, the memory 1106 stores executable program codes, and the processor 1104 executes the executable program codes to enable the electronic device to implement the metadata-based data acquisition method or the metadata acquisition method.
[0211] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including a program code, and the program code can be executed by a processor of an electronic device to complete the metadata-based data acquisition method or the metadata acquisition method in the above embodiment. For example, the computer-readable storage medium is a non-temporary computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device.
[0212] An embodiment of the present application also provides a computer program product or a computer program, which includes a program code. The computer instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the electronic device executes the metadata-based data acquisition method or metadata acquisition method in the above embodiment.
[0213] Among them, the device, equipment, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0214] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0215] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0216] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0217] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.
[0218] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. The "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "plurality" means two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not necessarily limit them to be different.
[0219] In this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0220] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the metadata or data involved in this application are obtained with full authorization.
[0221] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0222] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. < / establish-subscription> < / get>
Claims
1. A metadata-based data acquisition method, characterized in that: The method is applied to a client, and the method comprises: Generate a data acquisition request, the data acquisition request including data indication information and metadata filtering parameters, the data indication information indicates first data to be acquired in the server, the metadata filtering parameters indicate filtering second data from the first data, the second data having first metadata; Sending the data acquisition request to the server; A data acquisition response from the server is received, where the data acquisition response includes the second data.
2. The method according to claim 1, characterized in that The metadata filtering parameter is a parameter defined in the data acquisition request using the next generation network modeling language; Alternatively, the metadata filtering parameter is an extensible markup language attribute defined in the data acquisition request.
3. The method according to claim 1 or 2, characterized in that: The data acquisition request is a data query request, and the first data is data to be queried; Alternatively, the data acquisition request is a data subscription request, and the first data is data subscribed by the client.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Generate a first data subscription request, the first data subscription request including subscription information and metadata transparent transmission parameters, the subscription information indicates that the receiving end subscribes to the third data in the server, the metadata transparent transmission parameters indicate that second metadata is configured for the third data, and the second metadata is sent to the receiving end together with the subscribed third data; Send the first data subscription request to the server.
5. The method according to claim 4, characterized in that Before generating the first data subscription request, the method further includes: Capability notification information of the server is obtained, where the capability notification information is used to notify that the server has metadata transparent transmission capability in a data subscription service.
6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Sending a second data subscription request to the server, where the second data subscription request includes subscription information, where the subscription information indicates that the receiving end is subscribed to third data in the server; receiving a metadata acquisition request from the receiving end, wherein the metadata acquisition request indicates obtaining metadata of the third data; Based on the metadata acquisition request, a metadata acquisition response is sent to the receiving end, where the metadata acquisition response includes second metadata.
7. A data acquisition method based on metadata, characterized in that: The method is applied to the server, and the method includes: Receive a data acquisition request from a client, the data acquisition request including data indication information and metadata filtering parameters, the data indication information indicating first data to be acquired from the server, the metadata filtering parameters indicating filtering out second data from the first data, the second data having first metadata; Based on the data indication information and the metadata filtering parameter, querying the first data for the second data; Based on the query of the second data, a data acquisition response is sent to the client.
8. The method according to claim 7, characterized in that The metadata filtering parameter is a parameter defined in the data acquisition request using the next generation network modeling language; Alternatively, the metadata filtering parameter is an extensible markup language attribute defined in the data acquisition request.
9. The method according to claim 7 or 8, characterized in that: The data acquisition request is a data query request, and the first data is data to be queried; Alternatively, the data acquisition request is a data subscription request, and the first data is data subscribed by the client.
10. The method according to any one of claims 7 to 9, characterized in that: The method further comprises: Receive a first data subscription request from the client, the first data subscription request including subscription information and metadata transparent transmission parameters, the subscription information indicates that the receiving end subscribes to third data in the server, the metadata transparent transmission parameters indicate that second metadata is configured for the third data, and the second metadata is sent to the receiving end together with the subscribed third data; Based on the subscription information and the metadata transparent transmission parameter, subscription notification information is sent to the receiving end, where the subscription notification information includes the third data and the second metadata.
11. The method according to claim 10, characterized in that Before receiving the first data subscription request from the client, the method further includes: Sending capability notification information to the client, wherein the capability notification information is used to notify that the server has metadata transparent transmission capability in the data subscription service.
12. A data acquisition device based on metadata, characterized in that: The device comprises: a generating module, configured to generate a data acquisition request, wherein the data acquisition request includes data indication information and a metadata filtering parameter, wherein the data indication information indicates first data to be acquired from the server, and the metadata filtering parameter indicates filtering second data from the first data, wherein the second data has first metadata; A sending module, used for sending the data acquisition request to the server; A receiving module is used to receive a data acquisition response from the server, where the data acquisition response includes the second data.
13. The device according to claim 12, characterized in that The metadata filtering parameter is a parameter defined in the data acquisition request using the next generation network modeling language; Alternatively, the metadata filtering parameter is an extensible markup language attribute defined in the data acquisition request.
14. The device according to claim 12 or 13, characterized in that The data acquisition request is a data query request, and the first data is data to be queried; Alternatively, the data acquisition request is a data subscription request, and the first data is data subscribed by the client.
15. The device according to any one of claims 12 to 14, characterized in that The generating module is further configured to generate a first data subscription request, the first data subscription request including subscription information and metadata transparent transmission parameters, the subscription information indicating that the receiving end subscribes to the third data in the server, the metadata transparent transmission parameters indicating that second metadata is configured for the third data, and the second metadata is sent together with the subscribed third data to the receiving end; The sending module is further used to send the first data subscription request to the server.
16. The device according to claim 15, characterized in that The device also includes: The acquisition module is used to obtain the capability notification information of the server, and the capability notification information is used to notify that the server has the metadata transparent transmission capability in the data subscription service.
17. The device according to any one of claims 12 to 14, characterized in that The sending module is further used to send a second data subscription request to the server, where the second data subscription request includes subscription information, and the subscription information indicates that the receiving end subscribes to third data in the server; The receiving module is further configured to receive a metadata acquisition request from the receiving end, wherein the metadata acquisition request indicates to acquire metadata of the third data; The sending module is further configured to send a metadata acquisition response to the receiving end based on the metadata acquisition request, wherein the metadata acquisition response includes the second metadata.
18. A data acquisition device based on metadata, characterized in that: The device comprises: A receiving module, configured to receive a data acquisition request from a client, wherein the data acquisition request includes data indication information and a metadata filtering parameter, wherein the data indication information indicates first data to be acquired from the server, and the metadata filtering parameter indicates filtering second data from the first data, wherein the second data has first metadata; A query module, configured to query the second data in the first data based on the data indication information and the metadata filtering parameter; A sending module is used to send a data acquisition response to the client based on querying the second data.
19. The device according to claim 18, characterized in that The metadata filtering parameter is a parameter defined in the data acquisition request using the next generation network modeling language; Alternatively, the metadata filtering parameter is an extensible markup language attribute defined in the data acquisition request.
20. The device according to claim 18 or 19, characterized in that The data acquisition request is a data query request, and the first data is data to be queried; Alternatively, the data acquisition request is a data subscription request, and the first data is data subscribed by the client.
21. The device according to any one of claims 18 to 20, characterized in that The receiving module is further configured to receive a first data subscription request from the client, the first data subscription request including subscription information and metadata transparent transmission parameters, the subscription information indicating that the receiving end subscribes to third data in the server, the metadata transparent transmission parameters indicating that second metadata is configured for the third data, and the second metadata is sent together with the subscribed third data to the receiving end; The sending module is further used to send subscription notification information to the receiving end based on the subscription information and the metadata transparent transmission parameter, where the subscription notification information includes the third data and the second metadata.
22. The device according to claim 21, characterized in that The sending module is further used to send capability notification information to the client, where the capability notification information is used to notify that the server has metadata transparent transmission capability in the data subscription service.