Communication method and apparatus
AssigneeHuawei Technologies Co., Ltd.
InventorsYixu Xu, Yan Wang
Life of this patent
Estimating the term…
Abstract
This application provides a communication method and apparatus. In the method, a first network element creates a buffer queue based on a request of a second network element. Further, the first network element collects data of a corresponding type, sends data in the buffer queue to the second network element, and releases corresponding storage space after the second network element completes a data collection task. In this way, utilization of storage space of the first network element is improved, thereby solving the problem in the conventional technology that the first network element needs to have relatively large storage space capacity.
Claims13
A communication method, comprising:
- receiving, by a first network element, a request message of a second network element, wherein the request message comprises one or more to-be-collected data types and one or more sizes of one or more requested buffer queues, the one or more data types comprise a first type, the sizes of the one or more requested buffer queues comprise a size of a requested first buffer queue, and the first buffer queue corresponds to the first type;
- determining, by the first network element, an actual size of the first buffer queue based on at least one of the sizes of the one or more requested buffer queues, wherein the actual size of the first buffer queue is less than or equal to the size of the first buffer queue;
- sending, by the first network element, a data feedback message to the second network element when data buffered in the first buffer queue meets a sending condition, wherein the data feedback message comprises the data buffered in the first buffer queue, the first type, and the identifier of the first buffer queue;
- and
- backing up, by the first network element, the data buffered in the first buffer queue to a first backup queue, and clearing the first buffer queue, wherein the first backup queue is used to back up the data buffered in the first buffer queue;
- wherein after the sending, by the first network element, a data feedback message to the second network element, the method further comprises:
- starting, by the first network element, a timer;
- and
- stopping, by the first network element, the timer when it is determined that a response message sent by the second network element for the data feedback message is not received before the timer expires and that backup data of the data in the data feedback message is not stored in the first backup queue.
A communication apparatus, comprising:
- at least one processor;
- and
- a memory coupled to the at least one processor and storing executable instructions for execution by the at least one processor, the executable instructions instruct the at least one processor to:
- receive a request message of a second network element, wherein the request message comprises one or more to-be-collected data types and one or more sizes of one or more requested buffer queues, the one or more data types comprise a first type, the sizes of the one or more requested buffer queues comprise a size of a requested first buffer queue, and the first buffer queue corresponds to the first type;
- and
- determine an actual size of the first buffer queue based on at least one of the sizes of the one or more requested buffer queues, wherein the actual size of the first buffer queue is less than or equal to the size of the requested first buffer queue;
- send, by the first network element, a data feedback message to the second network element when data buffered in the first buffer queue meets a sending condition, wherein the data feedback message comprises the data buffered in the first buffer queue, the first type, and the identifier of the first buffer queue;
- and
- back up, by the first network element, the data buffered in the first buffer queue to a first backup queue, and clearing the first buffer queue, wherein the first backup queue is used to back up the data buffered in the first buffer queue;
- wherein after the sending, by the first network element, a data feedback message to the second network element, the executable instructions further instruct the at least one processor to:
- start, by the first network element, a timer;
- and
- stop, by the first network element, the timer when it is determined that a response message sent by the second network element for the data feedback message is not received before the timer expires and that backup data of the data in the data feedback message is not stored in the first backup queue.
Dependencies are inferred from the claim text.