Sampled data sending method and device

By introducing a time parameter mechanism in the on-change subscription, network devices can send incremental sampled data when data changes and send full sampled data at a specified time, the loss problem caused by failure of incremental sampled data transmission is solved and the reliability of data transmission is improved.

CN120151405APending Publication Date: 2025-06-13HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311706042.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

When on-change type sampling is used, the incremental sampling data sent on the network device may fail to transmit, resulting in the network management system losing the incremental sampling data.

Method used

Combined with the on-change subscription and periodic subscription mechanism, network devices send incremental sample data when data changes, and send full sample data when time parameter requirements are met to ensure the retransmission of incremental sample data.

Benefits of technology

By sending full sampled data on the upstream, the risk of loss of incremental sampled data is reduced, the reliability of on-change subscriptions is improved, and the processing overhead of reissuing subscription configurations in the network management system is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120151405A_ABST
    Figure CN120151405A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a sampling data sending method and device, a network device obtains a time parameter, an identifier of a subscription object and a subscription type, the time parameter is used for determining total sampling data of the periodically synchronized subscription object, and the subscription type indicates that sampling and uploading are triggered when the data is changed; the network equipment obtains incremental sampling data of the subscription object and uploads the incremental sampling data of the subscription object after the data of the subscription object is changed based on the identifier of the subscription object and the subscription type; the network equipment determines that the requirement of the time parameter is met, the network equipment obtains first full-amount sampling data of the subscription object based on the identifier of the subscription object and uploads the first full-amount sampling data of the subscription object, and the first full-amount sampling data comprises incremental sampling data. The incremental sampling data of the subscription object can be uploaded when the data of the subscription object is changed, and the full-amount sampling data can be periodically uploaded, so that the loss risk of the incremental sampling data is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and particularly to a method and apparatus for sending sampled data. Background Art

[0002] With the increasing richness of services carried by devices and the increasing scale of the network, telemetry, a remote network monitoring technology, has been widely applied. Telemetry technology enables network devices to collect sampled data on the network devices and send the sampled data to the network management system, so that the network management system can automatically obtain the sampled data of the network devices. For example, a network device can collect sampled data such as the data transmission rate of a network interface in the network device, the status of a processor in the network device, the status of a memory in the network device, or the status of a fan in the network device, and send the sampled data to the network management system, enabling the network management system to monitor the network device in a timely manner based on the sampled data of the network device.

[0003] In the IETF YANG-push (RFC8641) network telemetry sampling technology, the types of sampling include on-change type sampling. On-change type sampling, also known as change sampling, means that when data changes in a network device, incremental sampled data is sent to the network management system. Incremental sampled data refers to data that has changed compared to the original data obtained by prior sampling. Due to factors such as a large amount of sampled data or poor link quality between the network device and the network management system, the sampled data sent by the network device may be transmitted failed, resulting in the network management system losing the sampled data. In the case of using on-change type sampling, if the incremental sampled data sent by the network device at a certain time is transmitted failed, it will cause the network management system to lose the incremental sampled data. Summary of the Invention

[0004] This application provides a method and apparatus for sending sampled data. By combining two subscription mechanisms, on-change subscription and periodic subscription, it can not only send incremental sampled data of a subscription object when the data of the subscription object changes, but also periodically send full-volume sampled data, so that the incremental sampled data is retransmitted through the process of sending full-volume sampled data, thereby reducing the risk of loss of incremental sampled data. The technical solutions are as follows.

[0005] In a first aspect, a method for sending sampled data is provided. The method includes:

[0006] A network device obtains a time parameter, an identifier of a subscription object, and a subscription type. The time parameter is used to determine periodic synchronization of full-volume sampled data of the subscription object, and the subscription type indicates triggering sampling and sending when data changes;

[0007] Based on the identifier of the subscription object and the subscription type, after the data of the subscription object changes, the network device obtains the incremental sampling data of the subscription object and uploads the incremental sampling data of the subscription object.

[0008] When the network device determines that the requirements of the time parameter are met, based on the identifier of the subscription object, the network device obtains the first full-volume sampling data of the subscription object and uploads the first full-volume sampling data of the subscription object, where the first full-volume sampling data includes the incremental sampling data.

[0009] In the embodiments of the present application, since a time parameter is provided on the basis of the on-change subscription, when the device meets the requirements of the time parameter, it uploads the full-volume sampling data of the subscription object. This is equivalent to adding an opportunity to upload the full-volume sampling data on the basis of the change of the data of the subscription object triggering the upload. Then, even if the previously uploaded incremental sampling data is lost during transmission, the subsequent upload of the full-volume sampling data by the device is equivalent to re-uploading the lost incremental sampling data to the receiving end of the sampling data, enabling the data receiving end to automatically obtain the previously lost incremental sampling data, thereby reducing the risk that the data receiving end cannot process the sampling data due to the loss of the sampling data, reducing the risk of subscription out-of-step, and improving the reliability of the on-change subscription.

[0010] In addition, the device can upload the full-volume sampling data regularly based on the time parameter, enabling the receiving end of the sampling data to automatically obtain the full-volume sampling data regularly. The receiving end does not need to re-issue a subscription configuration every time it needs to obtain a full-volume sampling data, reducing the processing overhead caused by the receiving end re-issuing the subscription configuration and also reducing the cumbersome operations caused by the network management manually triggering the issuance of the subscription configuration.

[0011] In particular, by combining the method of uploading the full-volume sampling data with the method of uploading the incremental sampling data of the subscription object, it can have the advantages of both on-change subscription and periodic subscription, and can also make up for the deficiencies of using only on-change subscription or only periodic subscription. By uploading the incremental sampling data of the subscription object, the receiving end can focus on perceiving the data change of the subscription object, and by uploading the full-volume sampling data of the subscription object, the risk of data loss can be reduced. The role of periodically uploading the full-volume sampling data of the subscription object is equivalent to a guarantee measure. Since the periodically uploaded data is mainly used to avoid the loss of the already uploaded data, the timeliness of data upload is mainly solved by the on-change subscription. Therefore, when uploading periodically, there is no need to use an overly long time interval for the timeliness of data upload, thereby reducing the problem of excessive data upload volume caused by too small a time interval for periodic upload.

[0012] In some embodiments, the time parameter is used to determine the moment for periodically synchronizing the full - volume sampling data of the subscribed object. The network device determines that the requirements of the time parameter are met, including: the network device determines that the current moment reaches the moment.

[0013] The time parameter helps to flexibly specify the moment for uploading the full - volume sampling data, trigger the device to upload the full - volume sampling data at the specified moment, so that the receiving end can automatically obtain the full - volume sampling data at the moment when it needs to obtain the sampling data, and the timing of the device uploading the full - volume sampling data can better meet the needs of the receiving end to obtain the full - volume sampling data.

[0014] In some embodiments, the time parameter is used to determine the moment for synchronizing the full - volume sampling data of the subscribed object every day.

[0015] Through this time parameter, it supports triggering the upload of full - volume sampling data at a predetermined time point every day, which helps to meet the needs of the receiving end to periodically obtain full - volume sampling data on a daily basis.

[0016] In some embodiments, the time parameter is used to determine the date and moment for synchronizing the full - volume sampling data of the subscribed object; or, the time parameter is used to determine the moment for synchronizing the full - volume sampling data of the subscribed object.

[0017] Through this time parameter, it supports synchronizing the full - volume sampling data at a predetermined moment on a predetermined date of each month, which helps to meet the needs of the receiving end to periodically obtain full - volume sampling data on a monthly basis.

[0018] In some embodiments, the time parameter is used to determine the time interval for periodically synchronizing the full - volume sampling data of the subscribed object. The network device determines that the requirements of the time parameter are met, including: the network device determines that the time difference between the current moment and the moment when the full - volume sampling data of the subscribed object is first uploaded satisfies an integer multiple of the time interval.

[0019] This time interval enables the device to automatically and periodically upload the full - volume sampling data of the subscribed object at the time interval specified by the receiving end.

[0020] In some embodiments, before obtaining the incremental sampling data of the subscribed object and uploading the incremental sampling data of the subscribed object, the method further includes: the network device obtains the second full - volume sampling data of the subscribed object based on the first - time synchronization identifier and the identifier of the subscribed object, and uploads the second full - volume sampling data of the subscribed object. The first - time synchronization identifier is used to trigger the first upload of the full - volume sampling data of the subscribed object.

[0021] This first - time synchronization identifier can trigger the device to automatically upload the full - volume sampling data for the first time.

[0022] In some embodiments, the network device obtains a time parameter, an identifier of a subscription object, and a subscription type, including: the network device obtains the time parameter, the identifier of the subscription object, and the subscription type based on a YANG model, and the YANG model includes the time parameter, the identifier of the subscription object, and the subscription type.

[0023] Since the time parameter, the identifier of the subscription object, and the subscription type are configured for the device based on the YANG model, network failures caused by manual configuration errors can be reduced.

[0024] In some embodiments, the network device obtains a time parameter, an identifier of a subscription object, and a subscription type, including: the network device receives a protocol message from the network management system, and the protocol message includes a time parameter, an identifier of a subscription object, a subscription type, and an address of a receiving end of sampling data; the sending the first full amount of sampling data of the subscription object includes: the network device sends the first full amount of sampling data of the subscription object based on the address of the receiving end of the sampling data.

[0025] By using a protocol message to send down the time parameter, the identifier of the subscription object, and the subscription type, the correspondence relationship between the time parameter, the identifier of the subscription object, and the subscription type can be automatically configured on the network device, reducing the complexity of configuring the correspondence relationship between the time parameter, the identifier of the subscription object, and the subscription type on the network device. In addition, since the protocol message also includes the address of the receiving end of the sampling data, the device can send the sampling data to a specified receiving end.

[0026] In some embodiments, the protocol message includes a Network Configuration Protocol (NETCONF) message, the NETCONF message includes a sensor-group field, a destination-group field, a time field, and a sample-interval field, the sensor-group field includes the identifier of the subscription object, the destination-group field includes the identifier of the receiving end of the sampling data, the time field includes the time parameter, and the sample-interval field includes the subscription type. For example, the NETCONF message is defined in XML format.

[0027] Since the time parameter, the identifier of the subscription object, and the subscription type are configured for the network device through NETCONF, it is convenient to manage the configuration information, and it can also meet the interoperability between devices from different manufacturers. In addition, it helps to support network-level configuration and multi-device configuration coordination, and is more suitable for the management requirements of complex networks.

[0028] In some embodiments, the protocol message includes a Representational State Transfer Configuration (RESTCONF) message. The RESTCONF message includes a Uniform Resource Identifier (URI) field, a Hypertext Transfer Protocol (HTTP) header, and an HTTP body. The URI field includes an identifier of the subscription object, and the HTTP header and / or the HTTP body includes a time parameter, a subscription type, and an address of the receiver of the sampled data.

[0029] Since configuring the time parameter, the identifier of the subscription object, and the subscription type for the network device through RESTCONF helps to provide a standardized configuration interface, is compatible with devices from multiple manufacturers, and can reduce the development and maintenance costs. In addition, there is no need to configure the time parameter, the identifier of the subscription object, and the subscription type through a dedicated network management tool, and it supports configuring the time parameter, the identifier of the subscription object, and the subscription type through web configuration.

[0030] In some embodiments, the network device obtaining the time parameter, the identifier of the subscription object, and the subscription type includes: the network device receives a command line input by a user and obtains the time parameter, the identifier of the subscription object, and the subscription type based on the command line.

[0031] In some embodiments, the time parameter is determined based on the bandwidth utilization rate of the link between the network device and the receiver of the sampled data, and the bandwidth utilization rate at the moment indicated by the time parameter is less than a threshold.

[0032] By sending the full amount of sampled data of the subscription object at the moment when the bandwidth utilization rate is less than the threshold, the transmission success rate of the full amount of sampled data is relatively high, and the influence of the link quality on the transmission of the full amount of sampled data is reduced.

[0033] In some embodiments, the incremental sampled data includes an indicator for identifying the increment, and the full amount of sampled data includes an indicator for identifying the full amount.

[0034] Since the sampled data includes an indicator for the increment or an indicator for the full amount, the receiver can clearly distinguish whether the received sampled data is incremental sampled data or full amount of sampled data through the received sampled data, reducing the complexity of the sampled data at the receiver.

[0035] In some embodiments, the network device obtaining the time parameter, the identifier of the subscription object, and the subscription type includes:

[0036] The network device obtains the time parameter, the identifier of the subscription object, and the subscription type in a static subscription manner; or,

[0037] The network device obtains the time parameter, the identifier of the subscription object, and the subscription type in a dynamic subscription manner.

[0038] It supports configuring time parameters, identifiers of subscription objects, and subscription types in a static subscription manner, and also supports configuring time parameters, identifiers of subscription objects, and subscription types in a dynamic subscription manner, meeting the needs of more application scenarios.

[0039] In a second aspect, a method for receiving sampled data is provided. The method includes:

[0040] The network management system obtains time parameters, identifiers of subscription objects, and subscription types. The time parameters are used to determine periodic synchronization of the full sampled data of the subscription objects, and the subscription types indicate triggering sampling and uploading when data changes;

[0041] The network management system sends the time parameters, the identifiers of the subscription objects, and the subscription types to the network device;

[0042] The network management system receives the incremental sampled data of the subscription objects from the network device;

[0043] The network management system receives the first full sampled data of the subscription objects from the network device, and the first full sampled data includes the incremental sampled data.

[0044] In some embodiments, the network management system sending the time parameters, the identifiers of the subscription objects, and the subscription types to the network device includes:

[0045] The network management system obtains a protocol message and sends the protocol message to the network device. The protocol message includes the time parameters, the identifiers of the subscription objects, and the subscription types.

[0046] In some embodiments, the protocol message includes a Network Configuration Protocol (NETCONF) message. The NETCONF message includes a sensor-group field, a destination-group field, a time field, and a sample-interval field. The sensor-group field includes the identifiers of the subscription objects, the destination-group field includes the identifiers of the receivers of the sampled data, the time field includes the time parameters, and the sample-interval field includes the subscription types; or,

[0047] The protocol message includes a Representational State Transfer Configuration (RESTCONF) message. The RESTCONF message includes a Uniform Resource Identifier (URI) field, a Hypertext Transfer Protocol (HTTP) header, and an HTTP body. The URI field includes an identifier of the subscription object, and the HTTP header and / or the HTTP body include a time parameter, a subscription type, and an address of a receiving end of sampled data.

[0048] In some embodiments, the network management system obtaining the time parameter includes:

[0049] The network management system determines the time parameter based on a bandwidth utilization rate of a link between the network management system and the network device, and the bandwidth utilization rate at the moment indicated by the time parameter is less than a threshold.

[0050] In a third aspect, a sampled data sending device is provided. The device is disposed in a network device and includes:

[0051] An obtaining unit, configured to obtain a time parameter, an identifier of a subscription object, and a subscription type. The time parameter is used to determine a periodic synchronization of full sampled data of the subscription object, and the subscription type indicates triggering sampling and uploading when data changes;

[0052] The obtaining unit is further configured to obtain incremental sampled data of the subscription object after the data of the subscription object changes, based on the identifier of the subscription object and the subscription type;

[0053] A sending unit, configured to upload the incremental sampled data of the subscription object;

[0054] A determining unit, configured to determine that requirements of the time parameter are met;

[0055] The obtaining unit is further configured to obtain first full sampled data of the subscription object based on the identifier of the subscription object;

[0056] The sending unit is further configured to upload the first full sampled data of the subscription object, where the first full sampled data includes the incremental sampled data.

[0057] In some embodiments, the time parameter is used to determine a moment for periodic synchronization of full sampled data of the subscription object, and the determining unit is configured to determine that a current moment reaches the moment.

[0058] In some embodiments, the time parameter is used to determine a moment for synchronizing full sampled data of the subscription object every day; or,

[0059] The time parameter is used to determine a date and a moment for synchronizing full sampled data of the subscription object; or

[0060] The time parameter is used to determine the moment for synchronizing the full - volume sampling data of the subscription object.

[0061] In some embodiments, the time parameter is used to determine the time interval for periodically synchronizing the full - volume sampling data of the subscription object. The determining unit is configured to determine that the time difference between the current moment and the moment when the full - volume sampling data of the subscription object is first uploaded satisfies an integer multiple of the time interval.

[0062] In some embodiments, the obtaining unit is further configured to obtain the second full - volume sampling data of the subscription object based on the first - time synchronization identifier and the identifier of the subscription object;

[0063] The sending unit is further configured to upload the second full - volume sampling data of the subscription object. The first - time synchronization identifier is used to trigger the first upload of the full - volume sampling data of the subscription object.

[0064] In some embodiments, the obtaining unit is configured to obtain the time parameter, the identifier of the subscription object, and the subscription type based on the YANG model, where the YANG model includes the time parameter, the identifier of the subscription object, and the subscription type.

[0065] In some embodiments, the obtaining unit is configured to receive a protocol message from the network management system. The protocol message includes the time parameter, the identifier of the subscription object, the subscription type, and the address of the receiving end of the sampling data;

[0066] The sending unit is further configured to upload the first full - volume sampling data of the subscription object based on the address of the receiving end of the sampling data.

[0067] In some embodiments, the protocol message includes a Network Configuration Protocol (NETCONF) message. The NETCONF message includes a sensor - group field, a destination - group field, a time field, and a sample - interval field. The sensor - group field includes the identifier of the subscription object. The destination - group field includes the identifier of the receiving end of the sampling data. The time field includes the time parameter. The sample - interval field includes the subscription type; or,

[0068] The protocol message includes a Representational State Transfer Configuration (RESTCONF) message. The RESTCONF message includes a Uniform Resource Identifier (URI) field, a Hypertext Transfer Protocol (HTTP) header, and an HTTP body. The URI field includes an identifier of the subscription object, and the HTTP header and / or the HTTP body include a time parameter, a subscription type, and an address of a receiving end of sampled data.

[0069] In some embodiments, the obtaining unit is configured to receive a command line input by a user, and obtain a time parameter, an identifier of a subscription object, and a subscription type based on the command line.

[0070] In some embodiments, the time parameter is determined based on a bandwidth utilization rate of a link between the network device and the receiving end of the sampled data, and the bandwidth utilization rate at the moment indicated by the time parameter is less than a threshold.

[0071] In some embodiments, the incremental sampled data includes an indicator identifying an increment, and the full - volume sampled data includes an indicator identifying a full volume.

[0072] In some embodiments, the obtaining unit is configured to obtain a time parameter, an identifier of a subscription object, and a subscription type in a static subscription manner; or obtain a time parameter, an identifier of a subscription object, and a subscription type in a dynamic subscription manner.

[0073] In a fourth aspect, a receiving device for sampled data is provided. The device is disposed in a network management system and includes:

[0074] An obtaining unit, configured to obtain a time parameter, an identifier of a subscription object, and a subscription type. The time parameter is used to determine periodic synchronization of full - volume sampled data of the subscription object, and the subscription type indicates triggering sampling and uploading when data changes;

[0075] A sending unit, configured to send the time parameter, the identifier of the subscription object, and the subscription type to a network device;

[0076] A receiving unit, configured to receive incremental sampled data of the subscription object from the network device;

[0077] The receiving unit is further configured to receive first full - volume sampled data of the subscription object from the network device. The first full - volume sampled data includes the incremental sampled data.

[0078] In some embodiments, the obtaining unit is configured to obtain a protocol message, where the protocol message includes the time parameter, the identifier of the subscription object, and the subscription type;

[0079] The sending unit is configured to send the protocol message to the network device.

[0080] In some embodiments, the protocol message includes a Network Configuration Protocol (NETCONF) message, the NETCONF message includes a sensor-group field, a destination-group field, a time field, and a sample-interval field, the sensor-group field includes an identifier of a subscription object, the destination-group field includes an identifier of a receiving end of sampled data, the time field includes the time parameter, and the sample-interval field includes the subscription type; or,

[0081] the protocol message includes a Representational State Transfer Configuration (RESTCONF) message, the RESTCONF message includes a Uniform Resource Identifier (URI) field, a Hypertext Transfer Protocol (HTTP) header, and an HTTP body, the URI field includes the identifier of the subscription object, and the HTTP header or / and the HTTP body includes the time parameter, the subscription type, and an address of the receiving end of the sampled data.

[0082] In some embodiments, the obtaining unit is configured to determine the time parameter based on a bandwidth utilization rate of a link between the network management system and the network device, and a bandwidth utilization rate at a moment indicated by the time parameter is less than a threshold.

[0083] In a fifth aspect, a network device is provided. The network device includes a processor and a network interface. The processor is configured to execute instructions to cause the network device to execute the method provided in the first aspect or any optional manner of the first aspect. The network interface is configured to receive or send messages. For specific details of the network device provided in the fifth aspect, reference may be made to the first aspect or any optional manner of the first aspect, which will not be elaborated herein.

[0084] In a sixth aspect, a network management system is provided. The network management system includes a processor and a network interface. The processor is configured to execute instructions to cause the network management system to execute the method provided in the second aspect or any optional manner of the second aspect. The network interface is configured to receive or send messages. For specific details of the network management system provided in the sixth aspect, reference may be made to the second aspect or any optional manner of the second aspect, which will not be elaborated herein.

[0085] In a seventh aspect, a computer-readable storage medium is provided. At least one instruction is stored in the storage medium. When the instruction runs on a computer, it causes the computer to execute the method provided in the first aspect or any optional manner of the first aspect.

[0086] In an eighth aspect, a computer-readable storage medium is provided, in which at least one instruction is stored. When the instruction runs on a computer, the computer is caused to execute the method provided in the second aspect or any optional implementation manner of the second aspect.

[0087] In a ninth aspect, a computer program product is provided. The computer program product includes one or more computer program instructions. When the computer program instructions are loaded and run by a computer, the computer is caused to execute the method provided in the first aspect or any optional implementation manner of the first aspect.

[0088] In a tenth aspect, a computer program product is provided. The computer program product includes one or more computer program instructions. When the computer program instructions are loaded and run by a computer, the computer is caused to execute the method provided in the second aspect or any optional implementation manner of the second aspect.

[0089] In an eleventh aspect, a chip is provided, including a memory and a processor. The memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method in the first aspect and any possible implementation manner of the first aspect.

[0090] In a twelfth aspect, a chip is provided, including a memory and a processor. The memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method provided in the second aspect or any optional implementation manner of the second aspect.

[0091] In a thirteenth aspect, a network system is provided. The network system includes the network device described in the first aspect or any optional implementation manner of the first aspect and the network management system described in the second aspect or any optional implementation manner of the second aspect.

[0092] Based on the implementation manners provided in the above aspects of the present application, further combinations can be made to provide more implementation manners. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] Figure 1 The schematic diagram of the architecture of a network system provided by an embodiment of the present application is shown;

[0094] Figure 2 It is a flowchart of a method for sending sampled data provided by an embodiment of the present application;

[0095] Figure 3 The schematic diagram of the process of a method for sending sampled data provided by an embodiment of the present application is shown;

[0096] Figure 4Shows a schematic flowchart of a method for sending sampled data provided by an embodiment of the present application;

[0097] Figure 5 Shows a schematic flowchart of a method for sending sampled data provided by an embodiment of the present application;

[0098] Figure 6 Is a schematic structural diagram of a device for sending sampled data provided by an embodiment of the present application;

[0099] Figure 7 Is a schematic structural diagram of a device for receiving sampled data provided by an embodiment of the present application;

[0100] Figure 8 Is a schematic structural diagram of a communication device provided by an embodiment of the present application. Detailed implementation manners

[0101] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.

[0102] The following explains some term concepts related to the embodiments of the present application.

[0103] (1) Change trigger (on-change)

[0104] On-change (on-change subscription) is a type of subscription data mechanism. On-change can also be called a sampling type, or a trigger condition for uploading sampled data, or an opportunity for uploading sampled data. The on-change subscription type indicates that a change in the data of the subscribed object triggers the upload of sampled data. When the device uses the on-change subscription type, after the data of the subscribed object changes, the device will obtain the incremental sampled data of the subscribed object and upload the incremental sampled data of the subscribed object. For example, based on the on-change subscription type, the sampled data uploaded this time is data that is different from the sampled data uploaded last time. The on-change subscription allows the receiving end to receive updated sampled data when the subscribed object changes. Therefore, for scenarios where the changes are not frequent but it is necessary to quickly notify the upper-layer application of data changes, the on-change subscription is more effective. In addition, compared with uploading all sampled data, the sampled data uploaded based on the on-change subscription type has a smaller data volume and does not need to upload data that has not changed, so the redundant data included in the uploaded sampled data is reduced, and the data volume that the device needs to send is reduced.

[0105] (2) Periodic subscription

[0106] Periodic subscription is another type of subscription data mechanism. Periodic subscription can also be referred to as a type of sampling, or as the trigger condition for uploading sampled data, or as the timing for uploading sampled data. Periodic subscription focuses on regularly uploading sampled data at certain time intervals. For example, based on the periodic sampling type, the device uploads sampled data when the time difference between the current moment and the first upload moment meets an integer multiple of the specified time interval. Periodic sampling usually does not need to concern whether the data of the subscribed object has changed. For example, regardless of whether the data of the subscribed object has changed, sampled data is uploaded once after the specified time interval. In some embodiments, periodic sampling uploads the full amount of sampled data of the subscribed object for each time interval.

[0107] (3)change-type (Change type)

[0108] change-type is equivalent to a further refinement of the on-change subscription type. change-type includes create, delete, insert, move, and replace. The create type is, for example, when a new subscribed object is added, triggering the upload of the data of the newly added subscribed object. The delete type is, for example, when a subscribed object is deleted, triggering the upload of a notification message for deleting the subscribed object. The insert type is, for example, a change inserted into the data of the sorted subscribed object. The move type is, for example, a change for reordering the data of the sorted subscribed object. The replace type is, for example, a change for modifying the value of the data of the subscribed object. Through change-type, it is possible to specify that a specific type of change in the data of the subscribed object triggers the upload of sampled data, thereby reducing the timing of sending data and further reducing the amount of data transmitted and processed. It is applicable to scenarios where the receiving end needs to focus on specific types of changes in the subscribed object. For example, if change-type is limited to create or delete, only the incremental sampled data of the subscribed object needs to be sent when the subscribed object is created or deleted, without sending the incremental sampled data of the subscribed object when the value of the subscribed object is modified.

[0109] (4) Subscribed object

[0110] The subscribed object can also be referred to as the sampled object or the target object. The subscribed object is, for example, the state of a hardware component or / and a software component in a device. For example, the subscribed object is the state of an interface, a process, a processor, or a memory. In some embodiments, the subscribed object is determined based on a subscription path. For example, the subscription path is used to determine (such as include) the identifier of the subscribed object. Also, for example, the subscription path is used to determine (such as include) the storage location of the identifier of the subscribed object. In some embodiments, the subscription path includes a sensor-path field, and the sensor-path field is used to carry the identifier of the subscribed object. For example, the sensor-path field includes ifm:ifm / interfaces / interface / dynamic / ipv4-status, indicating that the status of a network interface is to be subscribed. Also, for example, the sensor-path field includes ifm:ifm / interfaces / interface, indicating that the identifier of the network interface obtained from the ifm.proto file is used as the subscribed object.

[0111] (5) Identifier of the Subscribed Object

[0112] The identifier of the subscribed object is used to identify the subscribed object. For example, the identifier of the subscribed object is the name of the subscribed object, the number of the subscribed object, or the uniform resource identifier (URI) of the subscribed object. The main function of the identifier of the subscribed object is to clarify which object or objects' data is to be collected. The device obtains the data of the object corresponding to the identifier of the subscribed object based on the identifier of the subscribed object, and uploads the data of the object corresponding to the identifier of the subscribed object, so that the object to which the sampled data uploaded by the device belongs is more in line with the requirements of the receiving end.

[0113] In some embodiments of indicating the identifier of the subscribed object, the identifier of the subscribed object is carried through a sampling path. The sampling path includes, for example, keywords such as sensor-group or / and sensor-path. For example, the sampling path includes sensor-path interfaces / interface / dynamic / ipv4-status, indicating that the subscribed object is the status of an interface. Also, for example, the sampling path includes sensor-path cpu-memory:cpu-memory / board-cpu-infos / board-cpu-info field, indicating that the status of the central processing unit (CPU) and the status of the memory are to be sampled.

[0114] (6) Incremental Sampling Data

[0115] Incremental sampling data is data used to record the changed or newly added parts of a subscribed object. For example, when a change in the status of a subscribed object is detected, the changed part of the subscribed object is collected and recorded, without repeating or recollecting existing data. This sampling method can effectively reduce the amount of data storage and transmission, saving bandwidth and storage space.

[0116] (7) Full - volume sampling data

[0117] In some embodiments of the present application, full - volume sampling data is all the data of a subscribed object that can be collected at a specific moment, and the specific moment is, for example, a moment determined based on a time parameter. For example, if the subscribed object is the status of an interface, and the moment determined based on the time parameter is 2 am, the full - volume sampling data is the status of all interfaces that the device can collect at 2 am.

[0118] (8) Identifier of the receiving end of the sampling data

[0119] The identifier of the receiving end of the sampling data is used to identify the receiving end of the sampling data. The identifier of the receiving end of the sampling data is, for example, the address of the receiving end of the sampling data. For example, the identifier of the receiving end of the sampling data includes the destination IP address of the receiving end, the destination port number of the receiving end, and the identifier of the VPN where the receiving end is located. Based on the identifier of the receiving end of the sampling data, the device can clearly send the sampling data to which device or devices. For example, the subscription configuration includes a destination - group field, and the destination - group field includes the identifier of the receiving end of the sampling data. For example, the subscription configuration includes a destination - group field, and the destination - group field further includes a destination address field, a destination port number field, and a destination virtual private network (VPN) field. The destination address field includes the IP address 10.1.1.1, the destination port number field includes the port number 4444, and the destination VPN field includes the VPN identifier zx. Based on the content of the destination - group field in the subscription configuration, the device can clearly send the sampling data to the receiving end corresponding to the IP address 10.1.1.1, the port number 4444, and the VPN identifier zx.

[0120] (9) Network management system

[0121] A network management system refers to an entity used to manage or control network devices. The network management system can optionally be a device, or a cluster or distributed system containing multiple devices. For example, the network management system includes, but is not limited to, a network management system (NMS) or an element management system (EMS). Another example is that the network management system includes, but is not limited to, at least one of a collector, an analyzer, or a controller. The network management system is also referred to as a manager or a network element manager.

[0122] (10) Network device

[0123] In this embodiment, a network device refers to any device that can sample its own data and upload the sampled data. The network device stores subscription configurations. The network device is also referred to as a network element device or a network node. For example, the network device is a network device for routing and forwarding, such as a router or a switch. Another example is that the network device is a terminal device. Another example is that the network device is a server. For example, the network device is a server deployed in a data center. Another example is that the network device is a device for network security protection, such as a firewall or a security gateway. Another example is that the network device is a terminal or a server. Another example is that the network device is a network element in an access network, a bearer network, or a core network, such as a wireless local area network (WLAN) device, a base station, or a customer premise equipment (CPE).

[0124] (11) XML Path Language (XPath, used to mark or find specific nodes in an XML tree)

[0125] XPath is a query language used to select nodes in an XML document. XPath uses path expressions to address parts of an XML document, similar to file paths in a file management system. A subscription path is, for example, an XPath statement.

[0126] (12) Telemetry

[0127] Telemetry is a technology for remotely and rapidly collecting data from physical or virtual devices. The device actively uploads information such as interface traffic statistics, central processing unit (CPU) or memory status of the device to the collector periodically in push mode, providing a more real-time and high-speed data collection function compared to the one-question-one-answer interaction of the traditional pull mode.

[0128] (13) Network Configuration Protocol (NETCONF)

[0129] NETCONF provides a set of mechanisms for managing network devices. Users can use this set of mechanisms to add, modify, and delete the configurations of network devices, and obtain the configuration and status information of network devices. Through the NETCONF protocol, network devices can provide a standardized application programming interface (API). Applications can directly use these APIs to send and obtain configurations to and from network devices. The message format of NETCONF is usually encoded using the Extensible Markup Language (XML). The transport layer of NETCONF usually uses the Secure Shell (SSH) protocol, and the XML information is carried through the SSH protocol.

[0130] (14) Representational State Transfer Configuration (RESTCONF)

[0131] RESTCONF is an HTTP-based protocol that provides a Representational State Transfer (RESTful) style programming interface and supports operations for adding, deleting, modifying, and querying data of network devices. The message format of RESTCONF is usually encoded using XML or JavaScript Object Notation (JSON).

[0132] The application scenarios of the embodiments of the present application are illustrated by examples below.

[0133] The embodiments of the present application are applicable to scenarios of network management and monitoring, especially applicable to scenarios of managing the status of network devices and monitoring network performance by deploying telemetry, and particularly applicable to scenarios based on on-change subscription for sampling data, such as the on-change subscription scenario specified in the IETF netconf-yang-push (RFC8641) network telemetry sampling technology.

[0134] In the case of using on-change subscriptions, generally, incremental sampling data is sent only when the data of the subscribed object changes. When the data of the subscribed object does not change, incremental sampling data is not sent. Considering that during the process of sending incremental sampling data, due to the large amount of incremental sampling data, in addition, the link quality between the device and the receiving end of the sampling data is unstable. For example, there is a risk of insufficient bandwidth resources or link disconnection when sending sampling data, resulting in the risk of loss of incremental sampling data during transmission. As a result, the receiving end of the sampling data cannot regain the lost incremental sampling data, and may not even be aware of the loss of incremental sampling data, nor can it process the incremental sampling data, posing a risk of subscription out-of-step.

[0135] In the case of using periodic subscriptions, in order to enable the receiving end to obtain the sampling data of the subscribed object more timely, the sampling period is usually set to be small, resulting in a large amount of sampling data being sent and a large amount of redundant data, which is not suitable for scenarios where it is desired to focus on perceiving changed data.

[0136] In addition, in the gRPC network management interface (gRPC network management interface, gNMI protocol), it is defined that the heartbeat interval can be configured, so that on-change type sampling can send full-volume sampling data periodically at intervals of the heartbeat interval. However, the heartbeat interval is a 64-bit integer in nanoseconds, with a small time unit, which is prone to sending full-volume sampling data too frequently in a short period of time, requiring high device performance.

[0137] In view of this, some embodiments of the present application provide time parameters on the basis of on-change subscriptions. The device sends full-volume sampling data of the subscribed object when the requirements of the time parameters are met, which is equivalent to adding an opportunity to send full-volume sampling data on the basis of the change of the data of the subscribed object triggering the sending. Then, even if the previously sent incremental sampling data is lost during transmission, the device's subsequent sending of full-volume sampling data is equivalent to resending the lost incremental sampling data to the receiving end of the sampling data, enabling the data receiving end to automatically obtain the previously lost incremental sampling data, thereby reducing the risk that the data receiving end cannot process the sampling data due to the loss of sampling data, reducing the risk of subscription out-of-step, and improving the reliability of on-change subscriptions.

[0138] In some embodiments, the device periodically uploads the full-sampled data of the subscribed object based on a time parameter. For example, whenever the current time meets the requirements of the time parameter, the device uploads the full-sampled data of the subscribed object once, enabling the receiving end of the sampled data to automatically obtain the full-sampled data regularly. Based on the difference between the full-sampled data received in this period and the full-sampled data received in the previous period, the receiving end of the sampled data can sense the data of the subscribed object that has changed. Moreover, based on the difference between the full-sampled data received in this period and the full-sampled data received in the previous period, and the absence of the incremental sampled data reflecting this difference, the receiving end of the sampled data can sense the situation of the loss of incremental sampled data, thereby reducing the risk of subscription out-of-step. In addition, the receiving end does not need to reissue the subscription configuration every time it needs to obtain a full-sampled data, reducing the processing overhead caused by the receiving end reissuing the subscription configuration and also reducing the cumbersome operations caused by manual triggering by the network management.

[0139] In some embodiments, the time interval for uploading the full-sampled data has a coarser granularity than the heartbeat interval. For example, the time unit of the time interval for uploading the full-sampled data is greater than nanoseconds. For instance, the time unit of the time interval for uploading the full-sampled data can be days, months, hours, or weeks. Therefore, the risk of frequently uploading full-sampled data in a short period is reduced, and the requirements for the device performance are lowered. In addition, it is not limited to uploading the full-sampled data based on the gNMI Protocol and is applicable to scenarios of more protocols.

[0140] The time parameter for uploading the full-sampled data of the subscribed object has various expression forms. Several possible forms of the time parameter are illustrated below.

[0141] Expression form one of the time parameter: moment

[0142] For example, the time parameter for uploading the full-sampled data of the subscribed object is a moment. For example, the form of the time parameter is a timestamp. The time parameter in the form of a moment can also be referred to as the full-upload timestamp, full-synchronization moment, full-synchronization timestamp (resync-timestamp), or full-retransmission moment. The time parameter in the form of a moment supports flexibly specifying the moment for uploading the full-sampled data. For example, the receiving end can send the upload moment of the full-sampled data to the device according to the requirement for the moment of obtaining the sampled data, triggering the device to upload the full-sampled data at this upload moment, enabling the receiving end to automatically obtain the full-sampled data at the moment when it needs to obtain the sampled data, and the timing of the device uploading the full-sampled data can better meet the needs of the receiving end to obtain the full-sampled data.

[0143] In some embodiments, the format of the upload time of the full-sampling data of the subscription object is HH:mm:ss, where HH:mm:ss represents the time in 24-hour format, and the meaning of HH:mm:ss is hour:minute:second. HH:mm:ss indicates that the upload of the full-sampling data is triggered at the predetermined second of the predetermined minute of the predetermined hour every day. For example, in units of 24 hours, the upload of the full-sampling data is triggered at a predetermined time point every day. For example, 01:00:00 indicates that the upload of the full-sampling data is triggered at 1:00 am every day. Another example, 13:30:00 indicates that the upload of the full-sampling data is triggered at 1:30 pm every day. Since the time parameter is in the format of hour:minute:second, it supports synchronizing the full-sampling data at a predetermined time every day, which helps to meet the requirement of the receiving end to obtain the full-sampling data periodically on a daily basis. Alternatively, the upload time of the full-sampling data of the subscription object is in units of 12 hours.

[0144] In some embodiments, the format of the upload time of the full-sampling data of the subscription object is dd HH:mm:ss, where the meaning of dd HH:mm:ss is date hour:minute:second, and "dd" represents the day of the month. dd HH:mm:ss indicates that the upload of the full-sampling data is triggered at the predetermined second of the predetermined minute of the predetermined hour of the predetermined date of each month. For example, 20 01:00:00 indicates that the upload of the full-sampling data is triggered at 0:00 of 1:00 am on the 20th of each month. Another example, 10 08:00:00 indicates that the upload of the full-sampling data is triggered at 0:00 of 8:00 am on the 10th of each month. Since the time parameter is in the format of date hour:minute:second, it supports synchronizing the full-sampling data at a predetermined time on the predetermined date of each month, which helps to meet the requirement of the receiving end to obtain the full-sampling data periodically on a monthly basis.

[0145] In some embodiments, the format of the upload time of the full-sampling data of the subscription object is mm:ss, where the meaning of mm:ss is minute:second. mm:ss indicates that the upload of the full-sampling data is triggered at the predetermined second of the predetermined minute of each hour, where "mm" represents the minute of the hour. For example, 00:00 indicates that the upload of the full-sampling data is triggered at 0:00 of each hour every day. Since the time parameter is in the format of minute:second, it supports synchronizing the full-sampling data at the predetermined minute and second within each hour, which helps to meet the requirement of the receiving end to obtain the full-sampling data periodically on an hourly basis.

[0146] In some embodiments, the format of the time when the full - volume sampling data of the subscribed object is uploaded is e HH:mm:ss. The meaning of e HH:mm:ss is day of the week hour:minute:second, where "e" represents the day of the week. e HH:mm:ss indicates that the upload of the full - volume sampling data is triggered at the same time point on the predetermined day of the week every week. For example, 5 09:00:00 indicates that the full - volume reporting is triggered at 9:00 am every Friday. Since the time parameter uses the format of day of the week hour:minute:second, it supports scheduling the synchronous full - volume sampling data within each hour on the predetermined day of the week, which helps to meet the requirement of the receiving end to obtain the full - volume sampling data periodically on a weekly basis.

[0147] Combined with the various forms of the time for uploading the full - volume sampling data listed above, in some embodiments, the time for uploading the full - volume sampling data satisfies at least one of the corresponding relationships shown in Table 1 below.

[0148] Table 1 Format Table for the Time of Uploading Full - Volume Sampling Data

[0149]

[0150] Exemplarily, the time for uploading the full - volume sampling data of the subscribed object is in the early morning period. For example, the subscription configuration includes resync - timestamp, which is specified as 01:00:00, indicating that the full - volume sampling data of the subscribed object is uploaded at 1:00 am every day. Generally, the data volume is small and the operations are few in the early morning. Therefore, data synchronization can be carried out during the idle early morning period to avoid data loss due to unstable links, insufficient resources, etc. during the normal sampling reporting stage. In addition to re - issuing the configuration, the network management cannot know about the data loss through other means.

[0151] In some embodiments, the time for uploading the full - volume sampling data of the subscribed object is determined based on the time zone queried by the display clock command on the device as the reference time. The result of querying the time zone by the display clock command is as shown below.

[0152] [diagnose]disp clock

[0153] 2023 - 09 - 15 09:09:09

[0154] Friday

[0155] Time Zone(DefaultZoneName):UTC

[0156] Expression Form of Time Parameter II. Time Interval

[0157] In some embodiments, the form of the time parameter for uploading the full-sampling data of the subscribed object is a time interval. Based on this time interval, the device can determine the moment for periodically synchronizing the full-sampling data of the subscribed object. The time interval for uploading the full-sampling data of the subscribed object can also be referred to as the full retransmission period, the full synchronization period, the full synchronization time interval (resync-interval), or the time offset value (offset). Through this time interval, the device is supported to periodically upload the full-sampling data of the subscribed object.

[0158] For example, the unit of this time interval is greater than nanoseconds. For example, the unit of this time interval is minutes, hours, days, months, weeks, etc. This time interval is used to determine the time difference between the moment of this upload of the full-sampling data of the subscribed object and the moment of the previous upload of the full-sampling data of the subscribed object. For example, the time difference between the moment of this upload of the full-sampling data of the subscribed object and the moment of the first upload of the full-sampling data of the subscribed object is an integer multiple of this time interval.

[0159] For example, if resync-interval is 60 (minutes), it means the time interval for uploading the full-sampling data of the subscribed object is 1 hour. Therefore, the device periodically uploads the full-sampling data every 1 hour. Another example, if resync-interval is 24 (hours), it means the time interval for uploading the full-sampling data of the subscribed object is 1 day. Therefore, the device periodically uploads the full-sampling data every day. Another example, if resync-interval is 7 (days): it means the time interval for uploading the full-sampling data of the subscribed object is 1 week. Therefore, the device periodically uploads the full-sampling data every week. Another example, if resync-interval is 1 (month): it means the time interval for uploading the full-sampling data of the subscribed object is 1 month. Therefore, the device periodically uploads the full-sampling data every month.

[0160] In the case of periodically uploading the full-sampling data of the subscribed object, in some embodiments, the device determines the moment for uploading the full-sampling data of the subscribed object based on the time interval and the reference moment. For example, the moment for uploading the full-sampling data of the subscribed object includes the moments whose time difference from the reference moment is an integer multiple.

[0161] The reference time is also known as anchor-time, start time or reference time. For example, the reference time is the time point when the device first uploads the full-scale sampling data of the subscribed object. Another example is that the reference time is the moment when the device obtains the subscription configuration. Still another example is that the reference time is the moment when the device creates a sampling task based on the subscription configuration. Exemplarily, the reference time is t1, the time interval is t2, and the moments when the device uploads the full-scale sampling data of the subscribed object include (t1 + t2), (t1 + 2 * t2), (t1 + 3 * t2) ……, (t1 + i * t2), where i is a positive integer.

[0162] As a specific example, the time interval for uploading the full-scale sampling data of the subscribed object is 60 (minutes), and the moment when the device obtains the subscription configuration is 15:00:00. Then, after obtaining the subscription configuration, the device periodically uploads the full-scale sampling data of the subscribed object every hour. For example, the moments when the device uploads the full-scale sampling data of the subscribed object include 16:00 (15:00 + 1 hour), 17:00 (15:00 + 2 hours) …… (15:00 + n hours). In some embodiments, the reference time is manually configured. In some other embodiments, the reference time is calculated by the device itself. In still some other embodiments, the reference time is sent by the sampling data receiving end to the device.

[0163] In some embodiments, the time point when the device first uploads the full-scale sampling data of the subscribed object is determined based on the moment when it obtains the subscription configuration. For example, the device first uploads the full-scale sampling data of the subscribed object when it obtains the subscription configuration; another example is that the device first uploads the full-scale sampling data of the subscribed object after successfully creating a sampling task based on the subscription configuration. In some embodiments, the device obtains the sync-on-start flag in the subscription configuration, and based on the sync-on-start flag, the device first uploads the full-scale sampling data of the subscribed object when it obtains the subscription configuration. For example, the moment when the device obtains the subscription configuration is t1, the time interval is t2, and the moments when the device uploads the full-scale sampling data of the subscribed object include t1, (t1 + t2), (t1 + 2 * t2), (t1 + 3 * t2) ……, (t1 + i * t2), where i is a positive integer. As a specific example, the time interval for uploading the full-scale sampling data of the subscribed object is 60 (minutes), and the moment when the device obtains the subscription configuration is 15:00. Then, the device uploads the full-scale sampling data of the subscribed object at 15:00, 16:00, 17:00 ……

[0164] In some embodiments, the sync-on-start flag has the form of an option. For example, the sync-on-start flag is a boolean value. When the value of the sync-on-start flag is true, the device uploads the full amount of sampled data of the subscribed object when obtaining the subscription configuration. The action of uploading the full amount of sampled data of the subscribed object is, for example, the first upload of the full amount of sampled data. When the value of the sync-on-start flag is false, the device does not need to upload the full amount of sampled data of the subscribed object when obtaining the subscription configuration, but uploads the full amount of sampled data for the first time under the trigger of other conditions.

[0165] As a specific example, the value of resync-interval in the subscription configuration is 60 (minutes), which means that starting from the subscription creation time as the anchor point (reference moment), the full amount of sampled data is uploaded periodically at intervals of 60 minutes. After the device triggers the upload of the full amount of sampled data after obtaining the subscription configuration, it uploads the full amount of sampled data every 60 minutes.

[0166] In some embodiments, the upload time of the full amount of sampled data of the subscribed object includes a date identifier. In this way, it supports synchronizing the full amount of sampled data on a specific date, which is applicable to the scenario of synchronizing the full amount of sampled data of the subscribed object at the date granularity.

[0167] In some embodiments, the upload time of the full amount of sampled data of the subscribed object includes a week identifier. In this way, it supports synchronizing the full amount of sampled data on a specific week, which is applicable to the scenario of synchronizing the full amount of sampled data of the subscribed object at the week granularity.

[0168] In some embodiments, the upload time of the full amount of sampled data of the subscribed object includes a month identifier. In this way, it supports synchronizing the full amount of sampled data on a specific month, which is applicable to the scenario of synchronizing the full amount of sampled data of the subscribed object at the month granularity.

[0169] Expression form of time parameters III. Combination of moment and time interval

[0170] In some embodiments, the time parameters for uploading the full-sampled data of the subscribed object include a moment and a time interval, and the moment and the time interval can be used in combination. For example, taking the moment of uploading the full-sampled data of the subscribed object as the reference moment, the full-sampled data of the subscribed object is periodically uploaded according to this time interval. By using the moment and the time interval in combination, not only can the moment of the first uploaded full-sampled data be specified, but also the time interval of the periodically uploaded full-sampled data can be specified, with higher flexibility. As a specific example of the combination of a moment and a time interval, the subscription configuration includes resync-timestamp: 01:00:00, resync-interval: 60 (minutes). Based on this subscription configuration, the device uploads the full-sampled data of the subscribed object for the first time at 1 am, and then uploads the full-sampled data every 60 minutes.

[0171] In other embodiments, the time parameters for uploading the full-sampled data of the subscribed object have other expression forms besides the moment or the time interval.

[0172] Expression form four of the time parameter: Frequency

[0173] For example, the time parameter for uploading the full-sampled data of the subscribed object is the frequency, so as to specify that the device uploads the full-sampled data of the subscribed object according to this frequency. For example, the frequency of synchronizing the full-sampled data every day can be expressed as once a day, that is, 1 / day. The frequency of synchronizing the full-sampled data every month can be expressed as once a month, that is, 1 / month. The frequency of synchronizing the full-sampled data every hour can be expressed as once an hour, that is, 1 / hour. The frequency of synchronizing the full-sampled data every week can be expressed as once a week, that is, 1 / week.

[0174] Expression form five of the time parameter: Time interval (or called time window or time range)

[0175] The time parameter for uploading the full-sampled data of the subscribed object is the time interval, so as to specify that the device uploads the full-sampled data of the subscribed object within a specific time interval. For example, the time parameter for uploading the full-sampled data of the subscribed object is from 10 pm to 11 pm, so as to specify that the device uploads the full-sampled data of the subscribed object at any moment between 10 pm and 11 pm every day.

[0176] Expression form six of the time parameter: List of moments

[0177] For example, the time parameter for uploading the full-sampled data of the subscribed object is a list of moments, and the list of moments includes multiple moments. The device uploads the full-sampled data of the subscribed object at each moment in the list of moments.

[0178] Expression form seven of the time parameter: Formula

[0179] For example, the time parameter for uploading the full - volume sampled data of a subscribed object is expressed by a formula, and the moment of uploading the full - volume sampled data of the subscribed object satisfies the formula. The form of the formula is, for example, t3 = t1 + i * t2, where t3 represents the moment of uploading the full - volume sampled data of the subscribed object, i is a positive integer (i = 0, 1, 2, 3...), i represents the number of uploads, and t1 represents the reference moment (for example, the moment of creating the sampling task, such as the moment of receiving the subscription configuration).

[0180] Expression forms of time parameters VIII. Tables or rules

[0181] The time parameter for uploading the full - volume sampled data of a subscribed object is expressed by a table or a rule. The table or rule can, for example, include conditions such as dates, days of the week, months, holiday or working - day rules, etc., so that the device can determine the time for uploading the full - volume sampled data of the subscribed object according to specific holiday dates or working - day rules.

[0182] Expression forms of time parameters IX. Reference moment and time offset value

[0183] For example, the time parameter for uploading the full - volume sampled data of a subscribed object includes a reference moment and a time offset value. The time offset value is, for example, a positive or negative number, representing the amount of time offset forward or backward respectively. The network device adds or subtracts the reference moment and the time offset value, and uploads the full - volume sampled data of the subscribed object at the obtained moment. For example, the moment when the network device uploads the full - volume sampled data of the subscribed object is the sum of the reference moment and an integer multiple of the time offset value, or the moment when the network device uploads the full - volume sampled data of the subscribed object is the difference between the reference moment and an integer multiple of the time offset value. For example, the reference moment is 10:26 on November 24, 2023, the time offset value is 2 hours, and the moment of uploading the full - volume sampled data of the subscribed object is, for example, 12:26 on November 24, 2023, 14:26 on November 24, 2023, or 16:26 on November 24, 2023.

[0184] Expression forms of time parameters X. Number of times

[0185] For example, the time parameter for uploading the full - volume sampled data of a subscribed object includes the maximum number of transmissions or the number of re - transmissions. The number of times the device uploads the full - volume sampled data of the subscribed object meets the maximum number of transmissions or the number of re - transmissions. There is a difference of +1 between the number of re - transmissions and the maximum number of transmissions in terms of value. For example, the maximum number of transmissions or the number of re - transmissions is configured on the device; the device records the number of times of uploading the full - volume sampled data during the process of uploading the full - volume sampled data of the subscribed object; whenever a predetermined moment arrives, the device uploads the full - volume sampled data of the subscribed object once. When the number of times of uploading the full - volume sampled data reaches the maximum number of transmissions, the device ends uploading the full - volume sampled data. Or, when the number of times of uploading the full - volume sampled data reaches (the number of re - transmissions - 1), the device ends uploading the full - volume sampled data.

[0186] Expression form of time parameter XI. Events

[0187] For example, the time parameter for uploading the full - volume sampled data of a subscribed object is expressed by an event. For example, the device uploads the full - volume sampled data of the subscribed object after a specific sensor triggers a certain threshold, the device status changes, or a specific command is received.

[0188] In some embodiments, the time parameter is determined according to the quality parameter of the link between the device and the sampling data receiving end. For example, a moment when the quality parameter of the link (such as transmission delay, bandwidth utilization rate, packet loss rate, or / and jitter) meets the requirements is selected as the upload moment of the full - volume sampled data of the subscribed object. For example, a moment when the bandwidth utilization rate of the link is less than the threshold is selected as the upload moment of the full - volume sampled data of the subscribed object. As a specific example, the data of the subscribed object changes at 7 p.m., and the link is congested at 7 p.m., resulting in the loss of the uploaded incremental sampled data during transmission in the link. By providing a time parameter, for example, the time parameter is the early morning moment, and the full - volume sampled data of the subscribed object is uploaded at the early morning moment. At the early morning moment, the bandwidth occupancy rate of the link is small, and the transmission quality of the link is high. Therefore, the transmission success rate of the full - volume sampled data of the subscribed object is high, reducing the impact of the link quality on the transmission of the full - volume sampled data.

[0189] The method of uploading the full - volume sampled data based on the time parameter can be combined with the method of uploading the incremental sampled data of the subscribed object after the data of the subscribed object changes. The following gives an example of how the two methods of sampled data are combined.

[0190] For example, based on the on-change subscription type, when the data of the subscribed object changes, the device obtains the incremental sampling data of the subscribed object and uploads the incremental sampling data of the subscribed object. After the device uploads the incremental sampling data of the subscribed object, when it determines that the requirements of the time parameter are met, it obtains the full-volume sampling data of the subscribed object and uploads the full-volume sampling data of the subscribed object. The full-volume sampling data includes the incremental sampling data. For example, the device periodically uploads the full-volume sampling data of the subscribed object at the time interval corresponding to the time parameter. Since uploading the full-volume sampling data includes the incremental sampling data, which is equivalent to the incremental sampling data undergoing at least two data transmissions, the risk of data loss of the incremental sampling data caused by only one data transmission is reduced.

[0191] In some embodiments, when the device uploads the sampling data for the first time, it uploads the full-volume sampling data of the subscribed object. After that, when the data of the subscribed object changes, the device obtains the incremental sampling data of the subscribed object and uploads the incremental sampling data of the subscribed object. For example, the device uploads the full-volume sampling data of the subscribed object for the first time when it obtains the subscription configuration (or creates a sampling task based on the subscription configuration).

[0192] By combining the method of uploading full-volume sampling data with the method of uploading incremental sampling data of the subscribed object, it is possible to combine the advantages of on-change subscription and periodic subscription, and also make up for the deficiencies of using only on-change subscription or only periodic subscription alone. By uploading the incremental sampling data of the subscribed object, the receiving end can focus on perceiving the data change of the subscribed object. By uploading the full-volume sampling data of the subscribed object, the risk of data loss can be reduced. Periodically uploading the full-volume sampling data of the subscribed object serves as a guarantee measure. Since the periodically uploaded data is mainly used to avoid the loss of the already uploaded data, and the timeliness of data upload is mainly solved by on-change subscription, there is no need to use an overly long time interval for periodic upload to ensure data upload timeliness, thus reducing the problem of excessive uploaded data volume caused by an overly small time interval for periodic upload.

[0193] In other embodiments, the network device uploads the full-volume sampling data of the subscribed object in a non-periodic manner based on the time parameter.

[0194] The network deployment architecture of the embodiments of the present application will be exemplified below.

[0195] Refer to Figure 1 , Figure 1 FIG. shows the schematic architecture diagram of a network system 10 provided by the embodiments of the present application. The network system 10 includes a network management system and one or more network devices. The network management system is connected to one or more network devices through a communication network.

[0196] The role of the network device is equivalent to the sender of the sampled data. The role of the network management system is equivalent to the receiver of the sampled data. In some embodiments, the network management system is also used to send configuration related to subscriptions to the network device, such as time parameters, identifiers of subscription objects, or subscription types.

[0197] The network management system communicates with the network device through a network management protocol. The network management system and the network device exchange information through the messages defined in the network management protocol, so as to transmit Figure 2 the parameters or data involved in the embodiments. For example, they are carried by network management protocol messages Figure 2 at least one of the time parameter, the identifier of the subscription object, the subscription type, the full - volume sampled data, and / or the incremental sampled data in the embodiments.

[0198] In some embodiments, the network management system and the network device communicate based on NETCONF. The network management system acts as a NETCONF client (also known as a NETCONF manager). The network device acts as a NETCONF server (also known as a NETCONF agent). In the scenario of communication based on NETCONF, Figure 2 at least one of the time parameter, the identifier of the subscription object, the subscription type, the full - volume sampled data, and / or the incremental sampled data in the embodiments is carried by NETCONF messages.

[0199] In other embodiments, the network management system and the network device communicate based on RESTCONF. The network management system acts as a RESTCONF client, and the network device acts as a RESTCONF server. The network management system and the network device communicate using the HTTPS protocol. In the scenario of communication based on RESTCONF, Figure 2 at least one of the time parameter, the identifier of the subscription object, the subscription type, the full - volume sampled data, and / or the incremental sampled data in the embodiments is carried by HTTP messages or HTTPS messages.

[0200] In some other embodiments, the network management system communicates with the network device through a network management protocol other than NETCONF or RESTCONF. For example, the network management system communicates with the network device through the remote network monitoring (RMON) protocol. As another example, the network management system communicates with the network device through the simple network management protocol (SNMP). As another example, the network management system communicates with the network device through the OpenFlow protocol. As another example, the network management system communicates with the network device through the OVSDB (open vswitch database) control protocol. As another example, the network management system communicates with the network device through the link layer discovery protocol (LLDP). As another example, the network management system communicates with the network device through the link layer discovery protocol TWAMP (two-way active measurement protocol). Accordingly, the protocol message carrying the time parameter, the identifier of the subscription object, the subscription type, the full-volume sampling data, and / or the incremental sampling data is replaced with a message of a network management protocol other than NETCONF or RESTCONF.

[0201] For the specific format of the message exchanged between the network management system and the network device, please refer to the description in the following text.

[0202] Appendix Figure 2 is a flowchart of a method for sending sampling data provided by an embodiment of the present application. In some embodiments, Appendix Figure 2 The method shown is applied to Figure 1 the scenario shown. For example, in the method shown in Appendix Figure 2 the network device is, for example, any one of the network devices 1, network device 2, network device 3... network device N in Appendix Figure 1 . The method shown in Appendix Figure 2 includes the following steps.

[0203] Step S220, the network device obtains the time parameter, the identifier of the subscription object, and the subscription type.

[0204] The time parameter is used to determine the full - volume sampling data of the periodic synchronous subscription object. Supporting the network device to periodically upload the full - volume sampling data of the subscription object through the time parameter helps the network management system to automatically obtain the full - volume sampling data of the subscription object periodically. In some embodiments, the time parameter is used to determine the moment of the full - volume sampling data of the periodic synchronous subscription object. In some embodiments, the time parameter is used to determine the time interval of the full - volume sampling data of the periodic synchronous subscription object. The time parameter has the form of a moment or / and a time interval or / and a frequency, for example. More possible forms of the time parameter can refer to the description of the time parameter above.

[0205] The subscription object is, for example, an object included in the network device itself, the subscription object is, for example, a component inside the network device, or the subscription object is the entire network device. For example, the network device includes one or more subscription objects. More explanations of the subscription object can refer to the description above.

[0206] The subscription type indicates to trigger sampling and uploading when the data changes. For example, the subscription type is the on - change type. Of course, the subscription type can also be other subscription types other than the on - change type that can indicate that the data change is used as the trigger condition for sampling and uploading.

[0207] In some embodiments, the network device obtains the subscription configuration and the subscription type corresponding to the subscription configuration. The subscription configuration includes the time parameter and the identifier of the subscription object. For example, the network device obtains the XPath and the subscription type corresponding to the XPath. The XPath includes the time parameter and the identifier of the subscription object, and the subscription type is the on - change type. Exemplarily, the network device obtains the time parameter and the identifier of the subscription object from the XPath; the network device looks up the corresponding relationship saved in the network device based on the XPath. The corresponding relationship includes the XPath and the on - change type. The network device matches based on the XPath and the corresponding relationship and obtains the on - change type from the corresponding relationship.

[0208] In some other embodiments, the network device obtains the subscription configuration. The subscription configuration includes the time parameter, the identifier of the subscription object, and the subscription type. For example, the network device obtains the XPath. The XPath includes the time parameter, the identifier of the subscription object, and the subscription type. The network device obtains the time parameter, the identifier of the subscription object, and the subscription type from the XPath.

[0209] In some embodiments, the network device obtains a command line containing sample - interval; the network device compares the value of sample - interval with 0; if the value of sample - interval is 0, the network device determines that the subscription type indicates triggering sampling and uploading when data changes, for example, determines that the subscription type is the on - change type. If the value of sample - interval is not 0, the network device determines that the subscription type is periodic sampling, and takes the value of sample - interval as the time interval to periodically obtain sampling data and upload the sampling data.

[0210] In some embodiments, the network device obtains a time parameter, an identifier of a subscription object, and a subscription type based on a YANG model, where the YANG model includes the time parameter, the identifier of the subscription object, and the subscription type.

[0211] In some embodiments, the time parameter is determined based on the bandwidth utilization rate of the link between the network device and the receiver of the sampling data, and the bandwidth utilization rate at the moment indicated by the time parameter is less than a threshold.

[0212] In some embodiments, the network device obtains one or more command lines, and the one or more command lines include the time parameter, the identifier of the subscription object, and the subscription type.

[0213] Step S250: After the data of the subscription object changes, the network device obtains incremental sampling data of the subscription object based on the identifier of the subscription object and the subscription type.

[0214] Since the subscription type indicates triggering sampling and uploading when data changes, the change of the data of the subscription object will trigger the network device to obtain incremental sampling data of the subscription object and upload the incremental sampling data of the subscription object.

[0215] In some embodiments, the network device listens for changes related to the subscription object based on the identifier of the subscription object, for example, listens for changes in the status of the subscription object or changes in the configuration of the subscription object. When the subscription object changes, a corresponding event notification is triggered inside the network device. After the device captures the event notification indicating the change of the subscription object, it collects incremental sampling data of the subscription object for the subscription object.

[0216] Step S260: The network device uploads the incremental sampling data of the subscription object.

[0217] In some embodiments, the network device obtains the identifier of the receiving end of the sampled data, and the network device uploads the incremental sampled data of the subscribed object to the receiving end of the sampled data based on the identifier of the receiving end of the sampled data. For example, the network device generates Message A based on the incremental sampled data and the identifier of the receiving end of the sampled data. Message A includes the incremental sampled data and the identifier of the receiving end of the sampled data. For the format of Message A, please refer to the description of the message format later.

[0218] In some embodiments, the incremental sampled data includes an indicator for identifying the increment. For example, the incremental sampled data includes generator_sync:true, and generator_sync:true is used to identify the increment. Since the incremental sampled data includes an indicator for identifying the increment, it is convenient for the network management system to distinguish whether the received sampled data is incremental sampled data or full sampled data based on this indicator, reducing the implementation complexity of the network management system in processing the sampled data.

[0219] Step S262, the network management system receives the incremental sampled data of the subscribed object uploaded by the network device.

[0220] Since the incremental sampled data has a smaller data volume compared to the full sampled data, and the incremental sampled data focuses on reflecting the changes of the subscribed object, the network management system can more easily identify the changes that occur to the subscribed object through the incremental sampled data.

[0221] Step S270, the network device determines that the requirements of the time parameter are met, and the network device obtains the first full sampled data of the subscribed object based on the identifier of the subscribed object.

[0222] In some embodiments, the time parameter is used to determine the moment for periodically synchronizing the full sampled data of the subscribed object. When the network device determines that the current moment reaches the moment, it executes the process of obtaining and uploading the full sampled data in steps S270 to S280. For example, the network device compares the current moment with the moment for synchronizing the full sampled data of the subscribed object; if the current moment matches the moment for synchronizing the full sampled data of the subscribed object, it determines that the requirements of the time parameter are met, and further executes the process of obtaining and uploading the full sampled data in steps S270 to S280. If the current moment does not match the moment for synchronizing the full sampled data of the subscribed object, the network device determines that the requirements of the time parameter are not met, and then waits. In some embodiments, the network device starts a first timer, and the first timer is used to compare the current moment with the moment for synchronizing the full sampled data of the subscribed object; the network device determines whether the requirements of the time parameter are met through the first timer. The network device uploads the full sampled data at specific moments periodically, so that the network management system obtains the full sampled data at specific moments periodically.

[0223] In some embodiments, the time parameter is used to determine the moment of synchronizing the full - volume sampling data of the subscribed object every day. For example, the time parameter includes the timestamp of the moment of synchronizing the full - volume sampling data of the subscribed object every day. In this way, it is supported to synchronize the full - volume sampling data at a predetermined moment every day.

[0224] In some embodiments, the time parameter is used to determine the date of synchronizing the full - volume sampling data of the subscribed object. For example, the time parameter includes the date of the moment of synchronizing the full - volume sampling data of the subscribed object. In this way, it is supported to synchronize the full - volume sampling data on a predetermined date of each month.

[0225] Optionally, the time parameter includes the month of the moment of synchronizing the full - volume sampling data of the subscribed object. In this way, it is supported to synchronize the full - volume sampling data in a predetermined month.

[0226] In some embodiments, the time parameter is used to determine the date and the moment of synchronizing the full - volume sampling data of the subscribed object. In this way, it is supported to synchronize the full - volume sampling data on a predetermined date and at a predetermined moment.

[0227] In some embodiments, the time parameter is used to determine the moment of synchronizing the full - volume sampling data of the subscribed object every week. For example, the time parameter includes the identifier of the day of the week.

[0228] In some embodiments, the time parameter is used to determine the time interval for periodically synchronizing the full - volume sampling data of the subscribed object. If the network device determines that the time difference between the current moment and the moment when the full - volume sampling data of the subscribed object was first uploaded satisfies an integer multiple of the time interval, the network device performs the processes of obtaining and uploading the full - volume sampling data in steps S270 to S280. For example, the network device records the moment when the full - volume sampling data of the subscribed object was first uploaded. The network device obtains the time difference between the current moment and the moment when the full - volume sampling data of the subscribed object was first uploaded. If this time difference is an integer multiple of the time interval for synchronizing the full - volume sampling data of the subscribed object, it is determined that the requirements of the time parameter are met, and thus the network device further performs the processes of obtaining and uploading the full - volume sampling data in steps S270 to S280. If the time difference between the current moment and the moment of synchronizing the full - volume sampling data of the subscribed object is less than an integer multiple of the time interval, it is determined that the requirements of the time parameter are not met, and the network device waits. In some embodiments, the network device starts a second timer. The second timer is used to determine whether the time difference between the current moment and the moment when the full - volume sampling data of the subscribed object was first uploaded satisfies an integer multiple of the time interval. The network device determines whether the requirements of the time parameter are met through the second timer. The network device uploads the full - volume sampling data periodically at a specific time interval, enabling the network management system to automatically obtain the full - volume sampling data periodically.

[0229] In some embodiments, the first full - volume sampling data includes an indicator for identifying the full volume. For example, the first full - volume sampling data includes generator_sync:false. generator_sync:false is used to identify the full volume. Since the first full - volume sampling data includes an indicator for identifying the full volume, it is convenient for the network management system to distinguish whether the received sampling data is incremental sampling data or full - volume sampling data based on this indicator, reducing the implementation complexity of the network management system in processing sampling data.

[0230] Step S280: The network device uploads the first full - volume sampling data of the subscribed object.

[0231] Some embodiments of the present application relate to the process of uploading full - volume sampling data multiple times. In order to distinguish the full - volume sampling data uploaded at different times, "the first full - volume sampling data" and "the second full - volume sampling data" are used to distinguish and describe the full - volume sampling data uploaded at different times.

[0232] The first full - volume sampling data includes incremental sampling data. That is, after the data change triggers the upload of the incremental sampling data, when uploading the full - volume sampling data, the incremental sampling data is also uploaded again, thereby improving the transmission success rate of the incremental sampling data.

[0233] In some embodiments of uploading the first full - volume sampling data of the subscribed object, the network device obtains the identifier of the receiving end of the sampling data, and the network device uploads the first full - volume sampling data of the subscribed object based on the identifier of the receiving end of the sampling data. For example, the network device generates message B based on the identifier of the receiving end of the sampling data and the first full - volume sampling data, and the network device sends message B. Message B includes the identifier of the receiving end of the sampling data and the first full - volume sampling data. For the format of message B, please refer to the description of the message format later.

[0234] Step S282: The network management system receives the first full - volume sampling data of the subscribed object.

[0235] The method provided in this embodiment, on the basis of the subscription type that triggers sampling and uploading when the data changes, introduces a time parameter for periodically uploading full - volume sampling data. Based on this subscription type, after the data of the subscribed object of the network device changes, the network device can automatically obtain and upload the incremental sampling data of the subscribed object. Based on this time parameter, the network device can automatically obtain and upload the full - volume sampling data of the subscribed object when meeting the requirements of the time parameter. Then, even if the previously uploaded incremental sampling data is lost during the transmission process, the network device uploading the full - volume sampling data later is equivalent to re - uploading the lost incremental sampling data to the network management system, enabling the network management system to automatically obtain the previously lost incremental sampling data, thereby reducing the risk that the network management system cannot process the sampling data due to the loss of sampling data, reducing the risk of subscription out - of - step, and improving the reliability of the subscription.

[0236] The following gives an example of how to obtain the time parameters in the embodiments. Figure 2

[0237] In some embodiments, the network device obtains the time parameters by interacting with the network management system. For example, the process of information interaction between the network management system and the network device includes the following steps S211 to step S212. Correspondingly, Figure 2 Step S220 in the embodiment is specifically step S220'.

[0238] Step S211, the network management system obtains the time parameters, the identifier of the subscription object, and the subscription type.

[0239] For example, the network management system receives the time parameters, the identifier of the subscription object, and the subscription type input by the user through a web interface or a command line.

[0240] In some embodiments, the network management system also generates a message C based on the time parameters. Message C includes the time parameters. Message C is used to configure the time parameters to the network device. In some embodiments, message C also includes the identifier of the network management system. For example, message C also includes the IP address of the network management system. Optionally, message C includes not only the time parameters but also other subscription configurations other than the time parameters, such as the identifier of the subscription object and the subscription type.

[0241] In some embodiments, message C is a single message. For example, the time parameters, the identifier of the subscription object, and the subscription type are sent down through a single message. For example, the message C generated by the network management system carries the time parameters, the identifier of the subscription object, and the subscription type. Since a single message is used to transmit the time parameters, the identifier of the subscription object, and the subscription type, the overall transmission efficiency of the subscription configuration is higher.

[0242] In other embodiments, message C includes a set of multiple messages. For example, the time parameters, the identifier of the subscription object, and the subscription type are sent down through multiple messages. For example, the network management system generates a first message based on the time parameters, and the first message includes the time parameters. The network management system generates a second message based on the identifier of the subscription object, and the second message includes the identifier of the subscription object. The network management system generates a third message based on the subscription type, and the third message includes the subscription type.

[0243] Step S212, the network management system sends the time parameters, the identifier of the subscription object, and the subscription type to the network device.

[0244] ​For example, the network management system sends message C to the network device, and message C includes subscription configurations. For example, message C includes a time parameter, an identifier of a subscription object, and a subscription type. Since the subscription configurations are carried in message C sent by the network management system to the network device, the network device is instructed to sample data of the subscription object according to the subscription configurations and upload the data of the subscription object.

[0245] Step S220’, the network device receives the time parameter, the identifier of the subscription object, and the subscription type from the network management system.

[0246] For example, the network device receives message C and obtains the time parameter, the identifier of the subscription object, and the subscription type carried in message C.

[0247] In some embodiments, the network device actively requests the time parameter. For example, the network device generates a request message for requesting to obtain subscription configurations. The network device sends the request message to the network management system. The network management system receives the request message, generates a response message based on the subscription configuration including the time parameter, and sends the response message to the network device. The network device receives the response message and obtains the subscription configuration including the time parameter carried in the response message.

[0248] In some other embodiments, the network management system actively distributes the time parameter. For example, the network management system generates a request message based on the subscription configuration including the time parameter and sends the request message to the network device. The network device receives the request message and obtains the subscription configuration including the time parameter carried in the request message.

[0249] In some other embodiments, the time parameter is pre-configured in the network device. For example, the time parameter is manually configured. In some embodiments, the network device receives a command line input by a user, and the network device obtains the time parameter, the identifier of the subscription object, and the subscription type based on the command line. In some other embodiments, the user logs in to the network device through a browser, the browser displays a configuration interface for the network device, the user inputs the time parameter and the identifier of the subscription object in the configuration interface, and the browser sends the time parameter and the identifier of the subscription object to the network device.

[0250] In some other embodiments, the time parameter is calculated by the network device itself. For example, the network device detects the quality of the link between the network device and the receiving end of the sampled data (such as the network management system), and the network device determines the time period during which the quality of the link meets the quality requirements to obtain the time parameter.

[0251] In some embodiments, the network device obtains the time parameter, the identifier of the subscription object, and the subscription type in a static subscription manner; in some other embodiments, the network device obtains the time parameter, the identifier of the subscription object, and the subscription type in a dynamic subscription manner.

[0252] In some embodiments, before uploading incremental sampling data, the network device also uploads full - volume sampling data once. For example, Figure 2 The embodiment further includes the following steps S230 to step S240.

[0253] Step S230: The network device obtains the second full - volume sampling data of the subscription object based on the identifier of the subscription object.

[0254] The second full - volume sampling data is, for example, the sampling data first uploaded by the network device after obtaining the subscription configuration. Different from the uploading process of the first full - volume sampling data, the above - mentioned first full - volume sampling data is obtained and uploaded by the network device when it determines that the requirements of the time parameter are met, while the uploading process of the second full - volume sampling data does not need to confirm that the requirements of the time parameter are met. For example, the network device obtains the second full - volume sampling data triggered at the start of the subscription (such as when obtaining the subscription configuration or creating a sampling task based on the subscription configuration).

[0255] In some embodiments, the network device obtains a first - time synchronization identifier. The network device executes step S230 and step S240 based on the first - time synchronization identifier. The first - time synchronization identifier is used to trigger the first upload of the full - volume sampling data of the subscription object. Regarding the carrying position of the first - time synchronization identifier, in some embodiments, the first - time synchronization identifier is carried in the sync on start field. For example, if the value of the sync on start field is the first value (such as true), it indicates that the full - volume sampling data of the subscription object is uploaded at the start of the subscription. If the value of the sync on start field is the second value (such as false), it indicates that there is no need to upload the full - volume sampling data of the subscription object at the start of the subscription. The first value in the sync on start field is a specific example of the first - time synchronization identifier. Of course, the first - time synchronization identifier can also be carried in other fields outside the sync on start field, such as carrying the first - time synchronization identifier through the flag field or TLV.

[0256] Regarding the method of obtaining the first - time synchronization identifier, for example, the network device obtains an X Path, and the X Path includes the first - time synchronization identifier. The network device obtains the first - time synchronization identifier from the X Path. Another example is that the network device searches for the corresponding relationship saved by the network device based on the X Path, matches the X Path with the first - time synchronization identifier, and obtains the first - time synchronization identifier from the corresponding relationship.

[0257] Step S240: The network device uploads the second full - volume sampling data of the subscription object.

[0258] In some embodiments, the network device obtains the identifier of the receiving end of the sampled data, and the network device uploads the second full-volume sampled data of the subscribed object based on the identifier of the receiving end of the sampled data.

[0259] For example, the network device obtains the IP address of the receiving end, and the network device generates Packet D based on the second full-volume sampled data and the IP address of the receiving end. The destination IP address field in Packet D includes the IP address of the receiving end. The payload field in Packet D includes the second full-volume sampled data.

[0260] Step S242, the network management system receives the second full-volume sampled data.

[0261] Example 1

[0262] Reference Figure 3 , Figure 3 shows a schematic flow diagram of a method for sending sampled data provided by an embodiment of the present application. Figure 3 The method shown is implemented based on the YANG-push network telemetry sampling technology Figure 2 and is a specific example of the method shown. Figure 3 The method shown includes the following steps.

[0263] Step S310, the network management system sends a subscription configuration of the on-change type to the network device in the manner of YANG-push static subscription, so that the network device is configured with a resync-timestamp and a first synchronization identifier.

[0264] The subscription configuration of the on-change type includes the time for uploading full-volume sampled data, the identifier of the subscribed object, and the identifier of the network management system. For example, the content of the on-change type subscription configuration sent by the network management system is as follows.

[0265] sensor-group sg1

[0266] sensor-path / interfaces / interface / dynamic / ipv4-status

[0267] sensor-group sg1 sample-interval 0

[0268] destination-group dst1

[0269] resync-timestamp 01:00:00

[0270] The identifier of the subscription object is used to identify the subscription object. Based on the identifier of the subscription object, the device can clearly sample the data of which object. For example, the subscription configuration includes a sensor-group field and a sensor-path field. The sensor-group field and the sensor-path field are used to carry the identifier of the subscription object. The sensor-group field and the sensor-path field are equivalent to specifying which objects' data to sample. Taking the above configuration as an example, sensor-group sg1 defines a sensor group named sg1. This sensor group is used to select and sample the data on a specific path. In this example, the sampling path is ifm:ifm / interfaces / interface / dynamic / ipv4-status, indicating sampling the interface status.

[0271] subscription sub1 defines a subscription named sub1. This subscription uses the sensor group sg1.

[0272] destination-group specifies the destination group dst1, that is, the destination address or group that will receive the sampled data. destination-group includes dst1, and dst1 includes the identifier of the network management system. For example, dst1 includes the IP address of the network management system.

[0273] The value of sample-interval is 0, indicating that the subscription type is of the on-change type. Usually, the value of sample-interval corresponding to the periodic subscription type is not 0.

[0274] In addition, the subscription type corresponding to sensor-path is of the on-change type. For example, the device looks up the corresponding relationship saved locally based on sensor-path to match the on-change type. For example, the device queries the corresponding relationship between sensor-path and the subscription type using the telemetry sensor-path command and gets that the subscription type corresponding to sensor-path is of the on-change type.

[0275] In addition, the first synchronization identifier corresponding to sensor-path. For example, the device looks up the corresponding relationship saved locally based on sensor-path to match the first synchronization identifier.

[0276] subscription sub1 defines a subscription named sub1. This subscription uses the sensor group sg1.

[0277] The value of the resync-timestamp field is 01:00:00, indicating that the full-sampling data of the subscribed object is sent at 01:00:00 every day.

[0278] In step S320, the network device receives a subscription configuration, and the network device creates a sampling task based on the subscription configuration.

[0279] The sampling task corresponds to a time parameter, an identifier of the subscribed object, and an identifier of the network management system. For example, the sampling task includes tasks for sending incremental sampling data and full-sampling data. For example, the sampling task includes a first sampling task, a second sampling task, and a third sampling task. The first sampling task is created based on the first synchronization identifier, and the first sampling task includes obtaining the sampling data of the subscribed object corresponding to the identifier of the subscribed object and sending the sampling data of the subscribed object with the identifier of the network management system as the destination. The second sampling task includes obtaining the incremental sampling data of the subscribed object after the data of the subscribed object changes and sending the incremental sampling data of the subscribed object. The third sampling task includes periodically obtaining the sampling data of the subscribed object corresponding to the identifier of the subscribed object at the moment corresponding to the resync-timestamp and sending the sampling data of the subscribed object with the identifier of the network management system as the destination.

[0280] For example, the subscribed object is the status of an interface, the time parameter includes 01:00:00, the subscription type is of the on-change type, and the subscribed object corresponds to the first synchronization identifier. The second sampling task created by the network device based on the subscribed object and the on-change type includes collecting the change information of the interface status after the status of the interface changes and sending the change information of the interface status of the interface to the network management system; the third sampling task created by the network device based on the subscribed object and 01:00:00 includes collecting the status of all interfaces at 01:00:00 every day and sending the status of all interfaces to the network management system. The first sampling task created by the network device based on the subscribed object and the first synchronization identifier includes collecting the status of all interfaces after creating the sampling task and sending the status of all interfaces to the network management system.

[0281] In step S330, the network device obtains the full-sampling data A of the subscribed object during the execution of the first sampling task and sends the full-sampling data A of the subscribed object to the network management system.

[0282] Since the subscription configuration corresponds to the first synchronization identifier, the action of creating the sampling task (or the action of the network device receiving the subscription configuration) can trigger the sending of the first full-sampling data, enabling the network device to execute step S330.

[0283] For example, the subscription object is an interface, the network device includes an interface named loopback2147483647, and after obtaining the subscription configuration, the network device collects all data of the interface loopback2147483647, such as the name of the interface loopback2147483647, the status of the link with the interface loopback2147483647 as an endpoint, the link protocol type with the interface loopback2147483647 as an endpoint, and the bandwidth occupied by the interface loopback2147483647. Exemplarily, the full - volume sampling data sent by the network device is as follows.

[0284] "sensor_path":"interfaces / interface / dynamic / ipv4 - status",

[0285] "collection_start_time":"2023 - 09 - 15 16:41:01.736",

[0286] "msg_timestamp":"2023 - 09 - 15 16:41:01.726",

[0287] "data_gpb":{"timestamp":"2023 - 09 - 15 16:41:01.736", "content":"{"interfaces":{"interface":[{"name":"loopback2147483647", "type":"Type_ETHERNET", "admin - status":"AdminStatus_DOWN", "link - status":"LinkStatus_DOWN", "ipv4 - status":"Ipv4Status_UP", "ipv6 - status":"Ipv6Status_DOWN"}}

[0288] "generator":{"generator_id":7996432, "generator_sn":1, "generator_sync":true}

[0289] "collection_end_time":"2023 - 09 - 15 16:41:01.736"

[0290] "current_period":0

[0291] Among the upsampled data, if the value of the sensor_path field matches the value of the sensor_path field in the subscription configuration, it indicates that the full upsampled data belongs to the subscribed object. The generator_id is used to identify the data source of the sampled data. The generator_sn is used to identify the sequence number of the sampled data. A collection_id of 1 indicates the first collection. In the full sampled data, the generator_sn is 1, and in the incremental sampled data, the generator_sn accumulates with the number of times the incremental sampled data is sent. The order of generation of the incremental sampled data can be distinguished by the generator_sn.

[0292] Step S332, the network management system receives the full sampled data A from the network device.

[0293] Step S340, during the execution of the second sampling task by the network device, when the network device detects that the data of the subscribed object changes for the first time, the network device obtains the incremental sampled data A of the subscribed object.

[0294] Step S342, the network device sends the incremental sampled data A of the subscribed object to the network management system.

[0295] Step S344, the network management system receives the incremental sampled data A from the network device.

[0296] For example, in step S340, if the type of data change of the subscribed object is create, after the network device detects new data in the data of the subscribed object, the network device obtains the new data of the subscribed object to obtain the incremental sampled data A and sends the incremental sampled data A of the subscribed object to the network management system. The incremental sampled data A includes the new data of the subscribed object.

[0297] For example, if the subscribed object is an interface, at 16:44:36 on September 15, 2023, the network device creates an interface named loopback1. The network device detects that it has newly added the interface loopback1, so the network device obtains the data of the interface loopback1 to obtain the incremental sampled data A, and the network device sends the incremental sampled data A to the network management system. For example, the incremental sampled data A sent by the network device is as follows. The incremental sampled data A includes the data of the interface loopback1 and also includes the identifier of the subscribed object.

[0298] "sensor_path":" / interfaces / interface / dynamic / ipv4-status",

[0299] "collection_id":2,

[0300] "collection_start_time":"2023-09-15 16:44:36.803",

[0301] "msg_timestamp":"2023-09-15 16:44:36.800",

[0302] "timestamp":"2023-09-15 16:44:36.803",

[0303] "content":"{\"interfaces\":{\"name\":\"loopback1\",\"index\":0,\"class\":\"Class_MAINX_INTERFACE\",\"type\":\"Type_ETHERNET\",\"admin-status\":\"AdminStatus_DOWN\",\"link-protocol\":\"LinkProtocol_ETHERNET\",\"router-type\":\"RouterType_PTOP\",\"dynamic\":{\"oper-status\":\"OperStatus_DOWN\",\"physical-status\":\"PhysicalStatus_DOWN\",\"link-status\":\"LinkStatus_DOWN\",\"ipv4-status\":\"Ipv4Status_DOWN\",\"ipv6-status\":\"Ipv6Status_DOWN\"}}

[0304] "generator_id":7996432,

[0305] "generator_sn":2,

[0306] "generator_sync":false

[0307] "collection_end_time":"2023-09-15 16:44:36.803",

[0308] "current_period":0

[0309] Step S352. During the process of the network device executing the third sampling task, when the network device first determines that the current moment reaches the moment indicated by resync-timestamp, it acquires the full-volume sampling data B of the subscription object.

[0310] Step S354: The network device uploads the full - volume sampling data B of the subscription object to the network management system.

[0311] Step S356: The network management system receives the full - volume sampling data B from the network device.

[0312] For example, the network device compares the current time with the time indicated by resync - timestamp. If the current time is equal to or exceeds the time indicated by resync - timestamp, it obtains the full - volume sampling data B of the subscription object and uploads the full - volume sampling data B of the subscription object. In a possible implementation, the network device starts a first timer, and the network device determines whether the time indicated by resync - timestamp is reached through the first timer.

[0313] The full - volume sampling data B includes the incremental sampling data A uploaded in step S340. Since the full - volume sampling data B uploaded by the network device includes the incremental sampling data A, even if the incremental sampling data A fails to be successfully transmitted to the network management system, by executing step S350, it is equivalent to uploading the incremental sampling data A to the network management system again. Since the incremental sampling data A has undergone two data transmissions, the risk of the incremental sampling data A being lost due to only one - time data transmission is reduced.

[0314] For example, the subscription object is an interface, and resync - timestamp is 01:00:00, indicating that the upload time of the full - volume sampling data is 1:00 am. Therefore, after the network device determines that the current time reaches 1:00 am, it obtains the status of all interfaces and uploads the status of all interfaces to the network management system. In this way, the network device realizes the periodic upload of the full - volume sampling data at 1:00 am every day.

[0315] For example, the network device obtained the subscription configuration at 16:41 on September 15, 2023. When the network device obtained the subscription configuration, the network device already included an interface named loopback2147483647; the network device added an interface named loopback1 at 16:44:36 on September 15, 2023; when the network device collected data from all interfaces at 1:00 am, it was able to collect the data of the interface loopback1 added at 16:44:36 on September 15, 2023 and the data of the interface loopback2147483647 that already existed at 16:41 on September 15, 2023. Therefore, the full-volume sampling data sent by the network device includes the data of the interface loopback1 and the data of the interface loopback2147483647. For example, the full-volume sampling data sent by the network device is as follows. In the following full-volume sampling data, collection_start_time includes 01:00:00, indicating that the status of the interface was collected at 01:00. msg_timestamp includes 01:00:00, indicating that the status of the interface was sent at 01:00.

[0316] "sensor_path": / interfaces / interface / dynamic / ipv4-status",

[0317] "collection_id": 3,

[0318] "collection_start_time": "2023-09-16 01:00:00.000",

[0319] "msg_timestamp": "2023-09-16 01:00:00.000",

[0320] "timestamp": "2023-09-16 01:00:00.000",

[0321] "content":"{\"interfaces\":{\"interface\":[{\"name\":\"loopback2147483647\",\"index\":0,\"class\":\"Class_MAINX_INTERFACE\",\"type\":\"Type_ETHERNET\",\"admin - status\":\"AdminStatus_DOWN\",\"link - protocol\":\"LinkProtocol_ETHERNET\",\"router - type\":\"RouterType_PTOP\",\"dynamic\":{\"oper - status\":\"OperStatus_DOWN\",\"physical - status\":\"PhysicalStatus_DOWN\",\"link - status\":\"LinkStatus_DOWN\",\"ipv4 - status\":\"Ipv4Status_UP\",\"ipv6 - status\":\"Ipv6Status_DOWN\"}}]}}"

[0322] "timestamp":"2023 - 09 - 16 01:00:00.000",

[0323] "content":"{\"interfaces\":{\"interface\":[{\"name\":\"loopback1\",\"index\":0,\"class\":\"Class_MAINX_INTERFACE\",\"type\":\"Type_ETHERNET\",\"admin - status\":\"AdminStatus_DOWN\",\"link - protocol\":\"LinkProtocol_ETHERNET\",\"router - type\":\"RouterType_PTOP\",\"dynamic\":{\"oper - status\":\"OperStatus_DOWN\",\"physical - status\":\"PhysicalStatus_DOWN\",\"link - status\":\"LinkStatus_DOWN\",\"ipv4 - status\":\"Ipv4Status_DOWN\",\"ipv6 - status\":\"Ipv6Status_DOWN\"}}]}}"

[0324] "generator_id":7996432

[0325] "generator_sn": 1

[0326] "generator_sync": true

[0327] "collection_end_time": "2023-09-16 01:00:00.000",

[0328] "current_period": 0,

[0329] "sensor_path": " / interfaces / interface / dynamic / ipv4-status",

[0330] "collection_id": 3,

[0331] "collection_start_time": "0",

[0332] "msg_timestamp": "0",

[0333] "generator_id": 7996432

[0334] "generator_sn": 1

[0335] "generator_sync": true

[0336] "collection_end_time": "0"

[0337] "current_period": 0,

[0338] Step S360, during the process of the network device executing the second sampling task, when the network device detects that the data of the subscribed object changes for the second time, the network device obtains the incremental sampling data B of the subscribed object.

[0339] Step S362, the network device sends the incremental sampling data B of the subscribed object to the network management system.

[0340] For example, in step S360, the type of data change of the subscribed object is replace. When the network device detects that the data of the subscribed object is modified, the network device obtains the new data of the subscribed object to obtain the incremental sampling data B, and sends the incremental sampling data B of the subscribed object to the network management system. The incremental sampling data B includes the modified data of the subscribed object.

[0341] For example, the subscription object is an interface. At 17:03:02 on September 15, 2023, the IPv4 address of the interface loopback1 of the network device has been enabled. When the network device detects that the IPv4 address of the interface loopback is enabled, the network device obtains the modified data of the interface loopback1 to obtain the incremental sampling data B, and the network device sends the incremental sampling data B to the network management system. For example, the network device sends the incremental sampling data B as shown below. The incremental sampling data B includes the modified data of the interface loopback1.

[0342] "subscription_id_str":"sub"

[0343] "sensor_path":" / interfaces / interface / dynamic / ipv4-status"

[0344] "collection_id":4

[0345] "collection_start_time":"2023-09-15 17:03:02.841"

[0346] "msg_timestamp":"2023-09-15 17:03:02.836"

[0347] "timestamp":"2023-09-15 17:03:02.841"

[0348] "content":"{"interfaces":{"interface":[{"name":"loopback1","index":0,"class":"Class_MAINX_INTERFACE","type":"Type_ETHERNET","admin-status":"AdminStatus_DOWN","link-protocol":"LinkProtocol_ETHERNET","router-type":"RouterType_PTOP","dynamic":{"oper-status":"OperStatus_DOWN","physical-status":"PhysicalStatus_DOWN","link-status":"LinkStatus_DOWN","ipv4-status":"Ipv4Status_UP","ipv6-status":"Ipv6Status_DOWN"}}]}}"

[0349] "generator"

[0350] "generator_id":7996432

[0351] "generator_sn":2

[0352] "generator_sync":false

[0353] "collection_end_time":"2023-09-15 17:03:02.841"

[0354] "current_period":0

[0355] "except_desc":"OK"

[0356] Step S364, the network management system receives the incremental sampling data B from the network device.

[0357] Step S370, during the execution of the third sampling task by the network device, if the network device determines for the second time that the current moment has reached the moment indicated by resync-timestamp, it acquires the full sampling data C of the subscribed object.

[0358] Step S372, the network device sends the full sampling data C of the subscribed object to the network management system.

[0359] Before the second determination that the current moment reaches the moment indicated by resync-timestamp, the data of the subscribed object changes for the second time. Therefore, the full-volume sampling data C obtained by the network device will include the incremental sampling data B, thus reflecting the situation where the data of the subscribed object changes for the second time. By executing step S370, it is equivalent to resending the incremental sampling data B to the network management system. Since the incremental sampling data B has undergone two data transmissions, the risk of loss of the incremental sampling data B caused by only one data transmission is reduced.

[0360] For example, since the data of interface loopback2147483647 does not change during the execution of steps S350 to S370, while the data of interface loopback1 is modified, the difference between the full-volume sampling data C and the full-volume sampling data B lies in the data of interface loopback1, and the data of interface loopback2147483647 remains unchanged. For example, the full-volume sampling data C includes the modified data of interface loopback1 and the original data of interface loopback2147483647.

[0361] For example, based on the resync-timestamp in the subscription configuration being 1:00 am, the network device collects the status of all interfaces at 1:00 am every day to obtain the full-volume sampling data C, and the network device sends the full-volume sampling data C to the network management system. For example, the content of the full-volume sampling data C is as follows.

[0362] "sensor_path":" / interfaces / interface / dynamic / ipv4-status"

[0363] "collection_id":5

[0364] "collection_start_time":"2023-09-17 00:00:00.000"

[0365] "msg_timestamp":"2023-09-17 00:00:00.000"

[0366] "timestamp":"2023-09-17 00:00:00.000"

[0367] "content":"{\"interfaces\":{\"interface\":[{\"name\":\"loopback1\",\"index\":0,\"class\":\"Class_MAINX_INTERFACE\",\"type\":\"Type_ETHERNET\",\"admin - status\":\"AdminStatus_DOWN\",\"link - protocol\":\"LinkProtocol_ETHERNET\",\"router - type\":\"RouterType_PTOP\",\"dynamic\":{\"oper - status\":\"OperStatus_DOWN\",\"physical - status\":\"PhysicalStatus_DOWN\",\"link - status\":\"LinkStatus_DOWN\",\"ipv4 - status\":\"Ipv4Status_UP\",\"ipv6 - status\":\"Ipv6Status_DOWN\"}}]}}"

[0368] "timestamp":"2023 - 09 - 17 00:00:00.000"

[0369] "content":"{\"interfaces\":{\"interface\":[{\"name\":\"loopback1\",\"index\":0,\"class\":\"Class_MAINX_INTERFACE\",\"type\":\"Type_ETHERNET\",\"admin - status\":\"AdminStatus_DOWN\",\"link - protocol\":\"LinkProtocol_ETHERNET\",\"router - type\":\"RouterType_PTOP\",\"dynamic\":{\"oper - status\":\"OperStatus_DOWN\",\"physical - status\":\"PhysicalStatus_DOWN\",\"link - status\":\"LinkStatus_DOWN\",\"ipv4 - status\":\"Ipv4Status_DOWN\",\"ipv6 - status\":\"Ipv6Status_DOWN\"}}]}}"

[0370] "timestamp":"2023 - 09 - 17 00:00:00.000"

[0371] "content":"{"interfaces":{"interface":[{"name":"loopback2","index":0,"class":"Class_MAINX_INTERFACE","type":"Type_ETHERNET","admin-status":"AdminStatus_DOWN","link-protocol":"LinkProtocol_ETHERNET","router-type":"RouterType_PTOP","dynamic":{"oper-status":"OperStatus_DOWN","physical-status":"PhysicalStatus_DOWN","link-status":"LinkStatus_DOWN","ipv4-status":"Ipv4Status_DOWN","ipv6-status":"Ipv6Status_DOWN"}}]}}"

[0372] "generator":{"generator_id":7996432,

[0373] "generator_sn":1,

[0374] "generator_sync":true}

[0375] "collection_end_time":"2023-09-17 00:00:00.000",

[0376] "current_period":0

[0377] Step S374, the network management system receives the full - volume sampling data C from the network device.

[0378] Step S380, during the execution of the third sampling task by the network device, when the network device determines for the third time that the current moment reaches the moment indicated by resync - timestamp, it obtains the full - volume sampling data D of the subscribed object.

[0379] Step S382, the network device uploads the full - volume sampling data D of the subscribed object to the network management system.

[0380] Step S380 is the same as step S370. Since the data of the subscribed object has not changed during the period from step S370 to step S380, the content of the full - volume sampling data D is the same as that of the full - volume sampling data C.

[0381] For the on - change subscription with the first - synchronization flag configured in the method provided in this embodiment, when the sampling task is initially created, the network device uploads the full - volume sampling data once. After each change in the data of the subscribed object, based on the on - change subscription type, it uploads the incremental sampling data reflecting the change, such as creating an interface or changing an interface in the example.

[0382] This embodiment takes the YANG - push static subscription as an example, and this embodiment can also be applied to the YANG - push dynamic subscription. For example, taking resync - timestamp as a parameter and sending it together with parameters such as the sampling path. The sampling path is used to trigger the creation of the sampling task. For example, the network management system encapsulates resync - timestamp and the sampling path into the same protocol message and sends the protocol message containing resync - timestamp and the sampling path to the network device.

[0383] Example 2

[0384] The difference between Example 2 and Example 1 is that in Example 2, the form in the time parameter is replaced from a moment to a time interval. Specifically, referring to Figure 4 , Figure 4 shows a schematic flowchart of a method for sending sampling data provided by an embodiment of the present application. Figure 4 The method shown is also implemented based on the YANG - push network telemetry sampling technology Figure 2 A specific example of the method shown. Figure 4 The method shown includes the following steps.

[0385] Step S410, the network management system uses the YANG - push static subscription method to send the on - change type subscription configuration to the network device, so that the network device is configured with a synchronization time interval (resync - interval) and a first - synchronization flag.

[0386] The subscription configuration includes the time interval (resync - interval) for uploading the full - volume sampling data and the identifier of the subscribed object. Resync - interval is used to indicate the time difference between two adjacent uploads of the full - volume sampling data. The first - synchronization flag indicates uploading the full - volume sampling data once when creating the sampling task. The moment of creating the sampling task is equivalent to an anchor point, and the network device can use the moment of creating the sampling task as an anchor point and upload the full - volume sampling data periodically at intervals of resync - interval.

[0387] For example, the content of the subscription configuration sent by the network management system is as follows. The meaning of resync-interval 60 is that the time interval is 1 hour, that is, the full-volume sampling data is sent every 1 hour.

[0388] sensor-group sg1

[0389] sensor-path / interfaces / interface / dynamic / ipv4-status

[0390] subscription sub1

[0391] sensor-group sg1 sample-interval 0

[0392] destination-group dst1

[0393] resync-interval 60

[0394] Step S420, the network device receives the subscription configuration, and the network device creates a sampling task based on the subscription configuration.

[0395] For example, the sampling tasks include a first sampling task, a second sampling task, and a third sampling task. The sampling tasks created in step S420 are similar to those created in step S320. The difference is that the third sampling task created in step S420 includes obtaining the sampling data of the subscription object corresponding to the identifier of the subscription object at intervals corresponding to resync-interval and sending the sampling data of the subscription object to the network management system with the identifier of the network management system as the destination. For example, the third sampling task created by the network device based on the subscription object and 60 includes collecting the status of all interfaces every 60 minutes and sending the status of all interfaces to the network management system.

[0396] Step S430, during the execution of the first sampling task, the network device obtains the full-volume sampling data A of the subscription object and sends the full-volume sampling data A of the subscription object to the network management system.

[0397] Since the subscription configuration corresponds to the first synchronization identifier, the action of creating the sampling task (or the action of the network device receiving the subscription configuration) can trigger the sending of the first full-volume sampling data, causing the network device to execute step S430.

[0398] Step S440, during the execution of the second sampling task, when the network device detects that the data of the subscription object changes for the first time, the network device obtains the incremental sampling data A of the subscription object.

[0399] Step S442: The network device uploads the incremental sampling data A of the subscribed object to the network management system.

[0400] Step S450: During the execution of the third sampling task, if the network device determines that the time difference between the current moment and the moment when the sampling task is created reaches the time interval indicated by resync - interval, it obtains the full - volume sampling data B of the subscribed object.

[0401] Step S452: The network device uploads the full - volume sampling data B of the subscribed object to the network management system.

[0402] Since resync - interval is configured as 60 (minutes), which means the time interval between two consecutive uploads of full - volume sampling data is 1 hour. Therefore, 1 hour after the creation of the sampling task, the upload of full - volume sampling data is triggered.

[0403] Step S460: During the execution of the second sampling task, when the network device detects that the data of the subscribed object changes for the second time, the network device obtains the incremental sampling data B of the subscribed object.

[0404] Step S462: The network device uploads the incremental sampling data B of the subscribed object to the network management system.

[0405] Step S470: During the execution of the third sampling task, if the network device determines that the time difference between the current moment and the moment when the sampling task is created reaches 2 times the time interval indicated by resync - interval, it obtains the full - volume sampling data C of the subscribed object.

[0406] Step S472: The network device uploads the full - volume sampling data C of the subscribed object to the network management system.

[0407] Since resync - interval is configured as 60 (minutes), 2 hours after the creation of the sampling task, the upload of full - volume sampling data is triggered again.

[0408] Step S480: During the execution of the third sampling task, if the network device determines that the time difference between the current moment and the moment when the sampling task is created reaches 3 times the time interval indicated by resync - interval, it obtains the full - volume sampling data D of the subscribed object.

[0409] Step S482: The network device uploads the full - volume sampling data D of the subscribed object to the network management system.

[0410] Since the resync-interval is configured to be 60 (minutes), the upload of full-scale sampling data is triggered again 3 hours after the sampling task is created. By analogy, after the network device creates a sampling task, it periodically uploads full-scale sampling data every 1 hour.

[0411] In the method provided in this embodiment, in the case of on-change sampling configured with the sync-on-star flag, the network device uploads a full-scale sampling data once when initially creating a sampling task, and periodically uploads full-scale sampling data at moments when the time difference from the moment of creating the sampling task is an integer multiple of the resync-interval.

[0412] This embodiment takes the static subscription of on-change sampling with the first synchronization flag configured by YANG-push as an example. This embodiment can also be applied to YANG-push dynamic subscriptions. For example, the network management system uses the resync-interval as a parameter in the subscription configuration and sends parameters such as the resync-interval and the sampling path to the network device together. For example, if the resync-interval is set to 60 min and the moment of creating the sampling task is 15:00:00, the network device uploads full-scale data when creating the sampling task, at 16:00, 17:00, and so on.

[0413] Example 3

[0414] The difference between Example 3 and Example 1 and Example 2 is that the first synchronization flag is not configured in Example 3. The action of uploading full-scale sampling data for the first time in Example 3 is not triggered by the first synchronization flag, but is triggered based on time parameters (such as resync-timestamp or resync-interval). Specifically, refer to Figure 5 , Figure 5 shows a schematic flowchart of a method for sending sampling data provided by an embodiment of the present application. Figure 5 The method shown is also implemented based on the YANG-push network telemetry sampling technology Figure 2 A specific example of the method shown. Figure 5 The method shown includes the following steps.

[0415] Step S510, the network management system uses the YANG-push static subscription method to send an on-change type of subscription configuration to the network device, so that the network device is configured with a synchronization moment (resync-timestamp) or a synchronization time interval (resync-interval). For example, the content of the subscription configuration sent by the network management system is as follows.

[0416] sensor-group sg1

[0417] sensor-path / interfaces / interface / dynamic / ipv4-status

[0418] sensor-group sg1 sample-interval 0

[0419] destination-group dst1

[0420] resync-timestamp 01:00:00 (or resync-interval 60)

[0421] Step S520: The network device receives a subscription configuration and creates a sampling task based on the subscription configuration.

[0422] For example, the sampling tasks include a second sampling task and a third sampling task. The difference between step S520 and step S320 is that the created sampling tasks omit the first sampling task.

[0423] Step S530: During the execution of the second sampling task, when the network device detects that the data of the subscription object changes for the first time, the network device obtains the incremental sampling data A of the subscription object.

[0424] Step S532: The network device uploads the incremental sampling data A of the subscription object to the network management system. For example, when a new interface loopback1 is added to the network device, the status of the interface loopback1 is uploaded.

[0425] Step S540: During the execution of the third sampling task, when the current time reaches the time indicated by resync-timestamp or the time difference between the current time and the time when the sampling task is created reaches the time interval indicated by resync-interval, the network device obtains the full sampling data A of the subscription object.

[0426] Step S542: The network device uploads the full sampling data A of the subscription object to the network management system.

[0427] Step S550: During the execution of the second sampling task, when the network device detects that the data of the subscription object changes for the first time, the network device obtains the incremental sampling data B of the subscription object.

[0428] Step S552: The network device uploads the incremental sampling data B of the subscription object to the network management system.

[0429] Step S560, during the execution of the third sampling task by the network device, if the network device determines that the current moment reaches the moment indicated by resync-timestamp or the time difference between the current moment and the moment when the sampling task is created reaches the time interval indicated by resync-interval, it acquires the full-volume sampling data B of the subscription object.

[0430] Step S562, the network device uploads the full-volume sampling data B of the subscription object to the network management system.

[0431] The method provided in this embodiment triggers the periodic upload of full-volume sampling data through resync-timestamp (or resync-interval).

[0432] This embodiment takes the static subscription of the YANG-push on-change type as an example, and this embodiment can also be applied to YANG-push dynamic subscriptions.

[0433] Summarizing the above embodiments, whether it is Embodiment 1, Embodiment 2 or Embodiment 3, it can both upload incremental sampling data after the data of the subscription object changes and periodically upload full-volume sampling data, thereby reducing the risk of out-of-step of on-change subscriptions, providing a method for the network management system to automatically obtain incremental sampling data and full-volume sampling data, improving the reliability of on-change type sampling data transmission, and reducing the risk of out-of-step of sampling data.

[0434] The network management system can automatically obtain full-volume sampling data periodically by issuing the synchronization period of the full-volume sampling data; the network management system can automatically obtain full-volume sampling data at a fixed time at this moment by issuing the synchronization moment of the full-volume sampling data.

[0435] In addition, due to the improvement and optimization of the on-change subscription in the standard RFC8639 and RFC8641 YANG push standards, the periodic synchronization is supported based on the NETCONF protocol extension, achieving better reliability and robustness, effectively reducing the working difficulty and complexity of the network management system, and helping to improve reliability and robustness.

[0436] Next, an example of the message format carrying time parameters is described.

[0437] Some embodiments of the present application provide a NETCONF protocol message, which is suitable for carrying time parameters so as to automatically configure the time parameters to a network device. In some embodiments, the NETCONF protocol message is also used to carry the identifier of the subscription object and the identifier of the receiver of the sampled data, so as to configure the time parameters, the identifier of the subscription object, and the identifier of the receiver of the sampled data to the network device together, enabling the network device to clarify the timing of data upload, the source of the uploaded data, and the destination of the uploaded data based on the time parameters, the identifier of the subscription object, and the identifier of the receiver of the sampled data in the NETCONF protocol message, facilitating the network device to save the corresponding relationship among the timing of data upload, the source of the uploaded data, and the destination of the uploaded data. For example, the protocol message is a NETCONF YANG message. Another example is that the protocol message is a NETCONF Schema message.

[0438] The format of the NETCONF protocol message is illustrated by way of example below. In some embodiments, in steps S211 to S213, the message C generated and sent by the network management system is a NETCONF message with this format.

[0439] In some embodiments, the NETCONF protocol message includes a sensor-group field, a destination-group field, a time field, and a sample-interval field. The sensor-group field includes the identifier of the subscription object, the destination-group field includes the identifier of the receiver of the sampled data, the time field includes the time parameter, and the sample-interval field includes the on-change type. For example, the NETCONF protocol message includes a content layer, and the content layer is also called the management object layer. The content layer includes a sensor-group field, a destination-group field, a time field, and a sample-interval field.

[0440] In some embodiments, the NETCONF protocol message adopts a nested data structure. The NETCONF protocol message includes a subscription field, and the subscription field further includes a sensor-group field, a destination-group field, a time field, and a sample-interval field. In one example, the NETCONF protocol message includes a telemetry-system field, the telemetry-system field includes a subscriptions field, the subscriptions field includes a config field, the config field includes a time field, and the time field includes time parameters.

[0441] In some embodiments, the NETCONF protocol message is encoded in XML format. By adopting XML format encoding, the protocol message can organize parameters such as time parameters, identifiers of subscription objects, and identifiers of receivers of sampled data through a tree-like data structure.

[0442] When the time parameter is in the form of a moment, in some embodiments, the NETCONF protocol message includes a sensor-group field, a destination-group field, a resync-timestamp field, and a sample-interval field. The sensor-group field includes the identifier of the subscription object, the destination-group field includes the identifier of the receiver of the sampled data, the resync-timestamp field includes the moment for periodically synchronizing the full-volume sampled data of the subscription object, and the sample-interval field includes 0 (indicating that the sampling type is of the on-change type). As an example, the content of the NETCONF protocol message is as follows.

[0443]

[0444]

[0445] In the message as shown above, <sensor-groups>A field is used to create sampling group information (e.g., including the identification of a subscriber), for example, specifying the xpath as ifm:ifm / interfaces / interface / dynamic / ipv4-status, which means collecting interface-related information on the device. <destination-groups>The field is used to create a destination address group. For example <destination-groups>The fields include the destination IP address: 125.64.25.61 and the destination port number 11125. The GRPC protocol is used. <subscriptions>The field indicates the creation of a subscription. <resync-interval xmlns="urn:yang:openconfig-telemetry-ext">60 indicates that the interval for retransmitting sampled data is 60 minutes. <sensor-group>sensor1< / sensor-group> Indicates binding of sampling task information. <sample-interval> 0< / sample-interval> Indicates that the sampling interval is 0, i.e., the sampling type (indicating that the sampling type is of the on-change type). <group-id>dest1< / group-id> The uplink destination address is bound. <resync-timestamp xmlns="urn:yang:openconfig-telemetry-ext">01:00:00 indicates the time when the full-volume sampled data is configured to be uplinked, and this time is (every day) 01:00:00.

[0446] In XML format, angle brackets (<>) are symbols used to mark the start and end of elements. In a tag, the part to the left of the angle bracket represents the start of the element, and the part to the right of the angle bracket represents the end of the element. By using angle brackets to delimit the start and end of XML elements, data is organized into a tree-like structure.

[0447] In the case where the time parameter is in the form of a time interval, the NETCONF protocol message includes a sensor-group field, a destination-group field, a resync-resync-interval field, and a sample-interval field. The sensor-group field includes the identifier of the subscription object, the destination-group field includes the identifier of the receiving end of the sampled data, the resync-interval field includes the time interval for periodically synchronizing the full-volume sampled data of the subscription object, and the sample-interval field includes 0 (indicating that the sampling type is of the on-change type). As an example, the content of the NETCONF protocol message is as follows.

[0448]

[0449]

[0450] The above content is a specific example of the content of a NETCONF protocol message carrying a time interval. In this NETCONF protocol message, the meaning of <resync-interval xmlns="urn:yang:openconfig-telemetry-ext">60 is that the time interval for sending full-scale sampled data is 60 minutes. The meanings of other fields in this NETCONF protocol message can be referred to the description of the NETCONF protocol message carrying a moment.

[0451] In some other embodiments, the protocol message includes <rpc>field <rpc>The fields include a time parameter, a subscription type, an identifier of a subscription object, and an identifier of a receiving end of sampled data.

[0452] In some other embodiments, in steps S211 to S213, the message C generated and sent by the network management system is implemented using the RESTCONF protocol. By way of example, the message generated and sent by the network management system includes a RESTCONF message, and the RESTCONF message includes a Uniform Resource Identifier (URI) field, an HTTP header, an HTTP request line, and an HTTP body. The URI field includes an identifier of a subscription object, and the time parameter, the subscription type, and the address of the receiving end of the sampled data are carried in the HTTP header, the HTTP request line, or the HTTP body.

[0453] In still some other embodiments, the protocol message includes an RMON protocol message. The RMON protocol message includes a time parameter, a subscription type, an identifier of a subscription object, and an identifier of a receiving end of sampled data. In still some other embodiments, the protocol message includes an SNMP protocol message. The SNMP protocol message includes a time parameter, a subscription type, an identifier of a subscription object, and an identifier of a receiving end of sampled data. In still some other embodiments, the protocol message includes an OpenFlow message. The OpenFlow protocol message includes a time parameter, a subscription type, an identifier of a subscription object, and an identifier of a receiving end of sampled data.

[0454] In still some other embodiments, the protocol message includes an LLDP message. The LLDP message includes a time parameter, a subscription type, an identifier of a subscription object, and an identifier of a receiving end of sampled data

[0455] In still some other embodiments, the protocol message includes a TWAMP message. The TWAMP message includes a time parameter, a subscription type, an identifier of a subscription object, and an identifier of a receiving end of sampled data.

[0456] In some embodiments, the protocol message is a routing protocol message. The routing protocol message includes a time parameter, a subscription type, an identifier of a subscription object, an identifier of a receiving end of sampled data, and an address of a network device. For example, the protocol message is a BGP update message. For example, the BGP update message includes a network layer reachability information (NLRI) field, and the NLRI field includes a time parameter and an identifier of a subscription object. As another example, the protocol message is a border gateway protocol flow spec (BGP flowspecification, abbreviated as BGP flow spec or BGP FS) message. The BGP flow spec includes one or more extended community attributes, and one or more extended community attributes include a time parameter and an identifier of a subscription object. For example, the extended community attribute field includes a sub-type field, a global administrator field, and a local administrator field. The sub-type field is used to indicate time (or subscription), and the global administrator field or the local administrator field includes a time parameter or / and an identifier of a subscription object. As another example, the protocol message is an interior gateway protocol (IGP) message. The IGP message includes a type length value (TLV). The type field in the TLV is used to indicate time (or subscription). The value field in the TLV includes a time parameter.

[0457] The following gives an example of the message format carrying sampled data.

[0458] Some embodiments provide a NETCONF message that carries sampled data, an identifier of a receiving end of the sampled data, and an identifier of a network device. The identifier of the receiving end of the sampled data includes, for example, the IP address of the receiving end of the sampled data and the port number of the receiving end of the sampled data. The identifier of the network device includes, for example, the IP address of the network device and the port number of the network device. By way of example, the NETCONF message includes a sensor-path field and a content field. The sensor-path field includes an identifier of a subscription object, and the content field includes sampled data, such as incremental sampled data, first full sampled data, or second full sampled data. For example, the NETCONF message includes <rpc-reply>field <rpc-reply>The fields include sampled data, such as incremental sampled data or full - volume sampled data. In some embodiments, the NETCONF message includes a transport - layer protocol header encapsulated outside the sensor - path field and the content field. The transport - layer protocol header is, for example, a TCP header or a UDP header. The transport - layer protocol header includes the port number of the network device and the port number of the receiving end of the sampled data. For example, the source port - number field of the transport - layer protocol header includes the port number of the network device, and the destination port - number field of the transport - layer protocol header includes the port number of the receiving end of the sampled data. In some embodiments, the NETCONF message includes an IP header encapsulated outside the transport - layer protocol header. The IP header includes a source - address field and a destination - IP - address field. The source IP address of the IP header includes the IP address of the network device, and the destination - IP - address field of the IP header includes the IP address of the receiving end of the sampled data. For example, the message B sent by the network device in step S280, the message D sent by the network device in step S240 is a NETCONF message with this format, and the message A sent by the network device in step S260 is a NETCONF message with this format.

[0459] Some embodiments provide a RESTCONF message. The RESTCONF message includes an application - layer message header and a payload field encapsulated inside the application - layer message header. The application - layer message header is, for example, an HTTPS header or an HTTP header. The application - layer message header includes the identifier of the subscription object. For example, the application - layer message header includes the URI of the subscription object or the URL of the subscription object. The payload field includes sampled data, such as incremental sampled data, first full - volume sampled data, or second full - volume sampled data. In other embodiments, the RESTCONF message includes a transport - layer protocol header encapsulated outside the application - layer message header. The transport - layer protocol header is, for example, a TCP header or a UDP header. The transport - layer protocol header includes the port number of the network device and the port number of the receiving end of the sampled data. For example, the source port - number field of the transport - layer protocol header includes the port number of the network device, and the destination port - number field of the transport - layer protocol header includes the port number of the receiving end of the sampled data. In some embodiments, the RESTCONF message includes an IP header encapsulated outside the transport - layer protocol header. The IP header includes a source - address field and a destination - IP - address field. The source IP address of the IP header includes the IP address of the network device, and the destination - IP - address field of the IP header includes the IP address of the receiving end of the sampled data. For example, the message B sent by the network device in step S280, the message D sent by the network device in step S240 is a RESTCONF message with this format, and the message A sent by the network device in step S260 is a RESTCONF message with this format.

[0460] Appendix Figure 6 It is a schematic structural diagram of a sampling data sending device 600 provided by an embodiment of the present application. The sampling data sending device 600 includes an obtaining unit 610, a determining unit 620, and a sending unit 630. In some embodiments, the Figure 6 The shown device 600 is arranged in the Figure 1 shown system 10. For example, the device 600 is arranged in any one of the Figure 1 shown network devices 1, network device 2... network device N. In some embodiments, the Figure 6 shown device 600 is arranged in the Figure 2 shown network device. The obtaining unit 610 is used to execute S220, S230, S250, and S270; the sending unit 630 is used to execute S240, S260, and S280; the determining unit 620 is used to determine in S270 that the requirements of the time parameter are met.

[0461] In some embodiments, the Figure 6 shown device 600 is arranged in the Figure 3 shown network device. The obtaining unit 610 is used to execute S320, S340, S352, S360, S370, and S380; the sending unit 630 is used to execute S330, S342, S354, S362, S372, and S382. The determining unit 620 is used to determine in Figure 3 S352, S370, and S380 that the current moment reaches the moment indicated by the synchronization moment.

[0462] In some embodiments, the Figure 6 shown device 600 is arranged in the Figure 4 shown network device. The obtaining unit 610 is used to execute S420, S440, S450, S460, S470, and S480; the sending unit 630 is used to execute S430, S442, S454, S462, S472, and S482. The determining unit 620 is used to determine in Figure 4 S450, S470, and S480 that the time difference between the current moment and the moment when the sampling task is created reaches the synchronization time interval.

[0463] In some embodiments, the Figure 6 shown device 600 is arranged in the Figure 5 shown network device. The obtaining unit 610 is used to execute S520, S530, S540, S550, and S560; the sending unit 630 is used to execute S532, S542, S552, and S562. The determining unit 620 is used to determine in Figure 4 S540 and S560 that the current moment reaches the synchronization moment or reaches the synchronization time interval.

[0464] Appended Figure 6 The described device embodiments are merely illustrative. For example, the above division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In each embodiment of the present application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0465] Each unit in the sampling data sending device 600 is implemented in whole or in part by software, hardware, firmware, or any combination thereof.

[0466] The following describes some possible implementation methods of using hardware or software to implement each functional unit in the sampling data sending device 600 in combination with the communication device 800 described later.

[0467] In the case of software implementation, for example, the above-mentioned obtaining unit 610 and determining unit 620 are implemented by software functional units generated after at least one processor 801 in the appended Figure 8 reads the program code stored in the memory 802.

[0468] In the case of hardware implementation, each of the above units in the appended Figure 6 is implemented by different hardware in the communication device. For example, the obtaining unit 610 and / or the determining unit 620 are implemented by a part of the processing resources (such as one core or two cores in a multi-core processor) in at least one processor 801 in the appended Figure 8 or are completed by a programmable device such as a field-programmable gate array (FPGA) or a coprocessor. For another example, the obtaining unit 610 and the sending unit 630 are implemented by the network interface 803 in the appended Figure 8 shown.

[0469] Appended Figure 7 is a schematic structural diagram of a sampling data receiving device 700 provided by an embodiment of the present application. The sampling data receiving device 700 is provided in a network management system and includes an obtaining unit 710, a sending unit 720, and a receiving unit 730.

[0470] In some embodiments, the device 700 shown in the appended Figure 7 is provided in the system 10 shown in the appended Figure 1 For example, the device 700 is provided in the network management system shown in the appended Figure 1 In some embodiments, the device 700 shown in the appended Figure 7 is provided in Figure 2 In the network management system shown, an obtaining unit 610 is configured to execute S211; a sending unit 630 is configured to execute S212; a receiving unit 730 is configured to execute S242, S262, and S282.

[0471] In some embodiments, Figure 7 the device 700 shown is disposed in Figure 3 the network management system shown. The sending unit 630 is configured to execute S310. The receiving unit 730 is configured to execute S332, S344, S356, S364, and S374.

[0472] In some embodiments, Figure 7 the device 700 shown is disposed in Figure 4 the network management system shown. The sending unit 630 is configured to execute S410.

[0473] In some embodiments, Figure 7 the device 700 shown is disposed in Figure 5 the network device shown. The sending unit 630 is configured to execute S510.

[0474] Figure 7 The described device embodiments are merely illustrative. For example, the above division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In each embodiment of the present application, the functional units may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.

[0475] Each unit in the receiving device 700 for sampling data is implemented in whole or in part by software, hardware, firmware, or any combination thereof.

[0476] The following describes some possible implementation manners of using hardware or software to implement each functional unit in the receiving device 700 for sampling data in combination with the communication device 800 described later.

[0477] In the case of software implementation, for example, the above obtaining unit 710 is implemented by a software functional unit generated after at least one processor 801 in Figure 8 reads the program code stored in the memory 802.

[0478] In the case of hardware implementation, for example, Figure 7 each of the above modules is implemented by different hardware in the communication device. For example, the obtaining unit 710, the sending unit 720, and the receiving unit 730 are implemented by Figure 8 ​Part of the processing resources in at least one of the processors 801 (for example, one or two cores in a multi-core processor) are implemented, or a programmable device such as a field-programmable gate array (FPGA) or a coprocessor is used to complete. Alternatively, the sending unit 720 and the receiving unit 730 are attached Figure 8 is implemented by the network interface 803 in

[0479] attached Figure 8 is a schematic structural diagram of a communication device 800 provided by an embodiment of the present application. The communication device 800 is, for example, a network device or a network management system. The communication device 800 includes at least one processor 801, a memory 802, and at least one network interface 803.

[0480] In some embodiments, attached Figure 8 The communication device 800 shown is provided in attached Figure 1 The system 10 shown. For example, the communication device 800 is any one of the network devices 1, 2,... N shown in attached Figure 1 or the communication device 800 is the network management system shown in attached Figure 1 shown.

[0481] In some embodiments, attached Figure 8 The communication device 800 shown is Figure 2 The network device shown. The processor 801 is used to execute S220, S230, S250, and S270; the network interface 803 is used to execute S240, S260, and S280. In other embodiments, attached Figure 7 The communication device 800 shown is Figure 2 The network management system shown. The processor 801 is used to execute S211; the network interface 803 is used to execute S212, S242, S262, and S282.

[0482] In some embodiments, attached Figure 8 The communication device 800 shown is Figure 3 The network device shown. The processor 801 is used to execute S320, S340, S352, S360, S370, and S380; the network interface 803 is used to execute S330, S342, S354, S362, S372, and S382. In some embodiments, the communication device 800 is Figure 3 The network management system shown. The sending unit 630 is used to execute S310. The receiving unit 730 is used to execute S332, S344, S356, S364, and S374.

[0483] In some embodiments, attached Figure 8 The communication device 800 shown is Figure 4 The network device shown. A processor 801 is configured to execute S420, S440, S450, S460, S470, and S480; a network interface 803 is configured to execute S430, S442, S454, S462, S472, and S482. In some other embodiments, the communication device 800 is Figure 4 The network management system shown. The network interface 803 is configured to execute S410.

[0484] In some embodiments, attached Figure 8 The communication device 800 shown is Figure 5 The network device shown. A processor 801 is configured to execute S520, S530, S540, S550, and S560; a network interface 803 is configured to execute S532, S542, S552, and S562. In some other embodiments, the communication device 800 is Figure 5 The network management system shown. The network interface 803 is configured to execute S510.

[0485] The processor 801 is, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of this application. For example, the processor 801 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0486] The memory 802 is, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, such as a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, such as an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. Optionally, the memory 802 exists independently and is connected to the processor 801 through an internal connection 804. Alternatively, optionally, the memory 802 and the processor 801 are integrated together.

[0487] The network interface 803 uses any device such as a transceiver for communicating with other devices or communication networks. The network interface 803 includes, for example, at least one of a wired network interface or a wireless network interface. Among them, the wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface or a combination thereof. The wireless network interface is, for example, a wireless local area networks (WLAN) interface, a cellular network interface or a combination thereof, etc.

[0488] In some embodiments, the processor 801 includes one or more CPUs, such as the Figure 8 CPU0 and CPU1 shown in the appendix.

[0489] In some embodiments, the communication device 800 optionally includes multiple processors, such as the Figure 8 processor 801 and the processor 805 shown in the appendix. Each of these processors is, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU). The processors here optionally refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0490] In some embodiments, the communication device 800 further includes an internal connection 804. The processor 801, the memory 802, and at least one network interface 803 are connected through the internal connection 804. The internal connection 804 includes paths for transmitting information between the above components. Optionally, the internal connection 804 is a single board or a bus. Optionally, the internal connection 804 is divided into an address bus, a data bus, a control bus, etc.

[0491] In some embodiments, the communication device 800 further includes an input / output interface 806. The input / output interface 806 is connected to the internal connection 804.

[0492] Optionally, the processor 801 implements the methods in the above embodiments by reading the program code stored in the memory 802, or the processor 801 implements the methods in the above embodiments by the program code stored internally. In the case where the processor 801 implements the methods in the above embodiments by reading the program code stored in the memory 802, the memory 802 stores the program code 810 for implementing the methods provided in the embodiments of the present application.

[0493] For more details on how the processor 801 implements the above functions, please refer to the descriptions in the foregoing method embodiments and will not be repeated here.

[0494] The embodiments in this specification are all described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.

[0495] A refers to B, which means that A is the same as B or A is a simple deformation of B.

[0496] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of the objects, nor can they be understood as indicating or implying relative importance. For example, the first full-scale sampling data and the second full-scale sampling data are used to distinguish different full-scale sampling data, rather than to describe the specific order of the full-scale sampling data, nor can it be understood that the first full-scale sampling data is more important than the second full-scale sampling data.

[0497] The information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of the present application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of the relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, all the full-scale sampling data involved in the present application is obtained under full authorization.

[0498] In the embodiments of the present application, unless otherwise specified, the meaning of "at least one" refers to one or more, and the meaning of "a plurality" refers to two or more. For example, a plurality of full-scale sampling data refers to two or more full-scale sampling data.

[0499] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive (SSD)).

[0500] The above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application. < / rpc> < / rpc> < / subscriptions>

Claims

1. A method for sending sampled data, characterized in that, the method includes: A network device obtains a time parameter, an identifier of a subscription object, and a subscription type. The time parameter is used to determine the periodic synchronization of all sampled data of the subscription object, and the subscription type indicates triggering sampling and uploading when data changes; Based on the identifier of the subscription object and the subscription type, after the data of the subscription object changes, the network device obtains the incremental sampled data of the subscription object and uploads the incremental sampled data of the subscription object; When the network device determines that the requirements of the time parameter are met, based on the identifier of the subscription object, the network device obtains the first all-sampled data of the subscription object and uploads the first all-sampled data of the subscription object, and the first all-sampled data includes the incremental sampled data.

2. The method according to claim 1, characterized in that, the time parameter is used to determine the moment of periodic synchronization of all sampled data of the subscription object. When the network device determines that the requirements of the time parameter are met, it includes: The network device determines that the current moment reaches the moment.

3. The method according to claim 2, characterized in that, the time parameter is used to determine the moment of synchronizing all sampled data of the subscription object every day; or, the time parameter is used to determine the date and moment of synchronizing all sampled data of the subscription object; or, the time parameter is used to determine the moment of synchronizing all sampled data of the subscription object.

4. The method according to claim 1, characterized in that, the time parameter is used to determine the time interval of periodic synchronization of all sampled data of the subscription object. When the network device determines that the requirements of the time parameter are met, it includes: The network device determines that the time difference between the current moment and the moment of the first upload of all sampled data of the subscription object satisfies an integer multiple of the time interval.

5. The method according to claim 4, characterized in that, before obtaining the incremental sampled data of the subscription object and uploading the incremental sampled data of the subscription object, the method further includes: Based on the first synchronization identifier and the identifier of the subscription object, the network device obtains the second all-sampled data of the subscription object and uploads the second all-sampled data of the subscription object, and the first synchronization identifier is used to trigger the first upload of all sampled data of the subscription object.

6. The method according to any one of claims 1 to 5, characterized in that, when the network device obtains the time parameter, the identifier of the subscription object, and the subscription type, it includes: The network device obtains the time parameter, the identifier of the subscription object, and the subscription type based on the YANG model, and the YANG model includes the time parameter, the identifier of the subscription object, and the subscription type.

7. The method according to any one of claims 1 to 6, characterized in that, when the network device obtains the time parameter, the identifier of the subscription object, and the subscription type, it includes: The network device receives a protocol message from the network management system, and the protocol message includes a time parameter, an identifier of a subscription object, a subscription type, and an address of a receiving end of sampled data; The sending of the first full-volume sampled data of the subscription object includes: The network device sends the first full-volume sampled data of the subscription object based on the address of the receiving end of the sampled data.

8. The method according to claim 7, wherein, the protocol message includes a Network Configuration Protocol (NETCONF) message, the NETCONF message includes a sensor-group field, a destination-group field, a time field, and a sample-interval field, the sensor-group field includes the identifier of the subscription object, the destination-group field includes the identifier of the receiving end of the sampled data, the time field includes the time parameter, and the sample-interval field includes the subscription type; or, the protocol message includes a Representational State Transfer Configuration (RESTCONF) message, the RESTCONF message includes a Uniform Resource Identifier (URI) field, a Hypertext Transfer Protocol (HTTP) header, and an HTTP body, the URI field includes the identifier of the subscription object, and the HTTP header or / and the HTTP body includes the time parameter, the subscription type, and the address of the receiving end of the sampled data.

9. The method according to any one of claims 1 to 6, wherein, the network device obtaining the time parameter, the identifier of the subscription object, and the subscription type includes: The network device receives a command line input by a user, and obtains the time parameter, the identifier of the subscription object, and the subscription type based on the command line.

10. The method according to any one of claims 1 to 9, wherein, the time parameter is determined based on the bandwidth utilization rate of a link between the network device and the receiving end of the sampled data, and the bandwidth utilization rate at the moment indicated by the time parameter is less than a threshold.

11. The method according to any one of claims 1 to 10, wherein, the incremental sampled data includes an indicator indicating an increment, and the full-volume sampled data includes an indicator indicating a full volume.

12. The method according to any one of claims 1 to 11, wherein, the network device obtaining the time parameter, the identifier of the subscription object, and the subscription type includes: The network device obtains the time parameter, the identifier of the subscription object, and the subscription type by means of static subscription; or, The network device obtains the time parameter, the identifier of the subscription object, and the subscription type by means of dynamic subscription.

13. A sending device for sampled data, wherein, the device is disposed in a network device and includes: an obtaining unit, configured to obtain a time parameter, an identifier of a subscription object, and a subscription type, where the time parameter is used to determine periodic synchronization of full-volume sampled data of the subscription object, and the subscription type indicates triggering sampling and sending when data changes; The obtaining unit is further configured to obtain incremental sampling data of the subscription object after the data of the subscription object changes, based on the identifier of the subscription object and the subscription type; The sending unit is configured to upload the incremental sampling data of the subscription object; The determining unit is configured to determine that the requirements of the time parameter are met; The obtaining unit is further configured to obtain first full - volume sampling data of the subscription object based on the identifier of the subscription object; The sending unit is further configured to upload the first full - volume sampling data of the subscription object, where the first full - volume sampling data includes the incremental sampling data.

14. The apparatus according to claim 13, wherein, The time parameter is used to determine the moment for periodically synchronizing the full - volume sampling data of the subscription object, and the determining unit is configured to determine that the current moment reaches the moment.

15. The apparatus according to claim 14, wherein, The time parameter is used to determine the moment for synchronizing the full - volume sampling data of the subscription object every day; or, The time parameter is used to determine the date and moment for synchronizing the full - volume sampling data of the subscription object; or, The time parameter is used to determine the moment for synchronizing the full - volume sampling data of the subscription object.

16. The apparatus according to claim 13, wherein, The time parameter is used to determine the time interval for periodically synchronizing the full - volume sampling data of the subscription object, and the determining unit is configured to determine that the time difference between the current moment and the moment when the full - volume sampling data of the subscription object is first uploaded satisfies an integer multiple of the time interval.

17. The apparatus according to claim 16, wherein, The obtaining unit is further configured to obtain second full - volume sampling data of the subscription object based on a first - synchronization identifier and the identifier of the subscription object, where the first - synchronization identifier is used to trigger the first upload of the full - volume sampling data of the subscription object; The sending unit is further configured to upload the second full - volume sampling data of the subscription object.

18. The apparatus according to any one of claims 13 to 17, wherein, The obtaining unit is configured to obtain the time parameter, the identifier of the subscription object, and the subscription type based on a YANG model, and the YANG model includes the time parameter, the identifier of the subscription object, and the subscription type.

19. The apparatus according to any one of claims 13 to 18, wherein, The obtaining unit is configured to receive a protocol message from the network management system, and the protocol message includes a time parameter, an identifier of a subscription object, a subscription type, and an address of a receiving end of sampling data; The sending unit is configured to upload the first full - volume sampling data of the subscription object based on the address of the receiving end of the sampling data.

20. The apparatus according to claim 19, wherein, The protocol message includes a Network Configuration Protocol (NETCONF) message. The NETCONF message includes a sensor-group field, a destination-group field, a time field, and a sample-interval field. The sensor-group field includes the identifier of the subscribed object. The destination-group field includes the identifier of the receiver of the sampled data. The time field includes the time parameter. The sample-interval field includes the subscription type; or, the protocol message includes a Representational State Transfer Configuration (RESTCONF) message. The RESTCONF message includes a Uniform Resource Identifier (URI) field, a Hypertext Transfer Protocol (HTTP) header, and an HTTP body. The URI field includes the identifier of the subscribed object. The HTTP header or / and the HTTP body includes the time parameter, the subscription type, and the address of the receiver of the sampled data.

21. The apparatus according to any one of claims 13 to 18, wherein, the obtaining unit is configured to receive a command line input by a user, and obtain a time parameter, an identifier of a subscribed object, and a subscription type based on the command line.

22. The apparatus according to any one of claims 13 to 21, wherein, the time parameter is determined based on the bandwidth utilization rate of the link between the network device and the receiver of the sampled data, and the bandwidth utilization rate at the moment indicated by the time parameter is less than a threshold.

23. The apparatus according to any one of claims 13 to 22, wherein, the incremental sampled data includes an indicator for indicating an increment, and the full-volume sampled data includes an indicator for indicating a full volume.

24. The apparatus according to any one of claims 13 to 23, wherein, the obtaining unit is configured to obtain a time parameter, an identifier of a subscribed object, and a subscription type in a static subscription manner; or obtain a time parameter, an identifier of a subscribed object, and a subscription type in a dynamic subscription manner.