Patent Description:
To ensure quality of service for a service in a network, regardless of a wired network or a wireless network, network measurement usually needs to be performed. The network measurement is usually performed by an analysis device. A communications connection is established between a network device and the analysis device, for example, a Transmission Control Protocol (Transmission Control Protocol, TCP) connection. The network device, according to a requirement of the analysis device, collects data used for the network measurement, and transmits the collected data to the analysis device through the communications connection. The analysis device determines states of the network device, such as a network latency, jitter, congestion, and a packet loss, by analyzing the data collected by the network device. A network administrator or a network management server, based on a network measurement result, may discover a problem in the network in a timely manner, and adjust a network configuration parameter, thereby ensuring the quality of service for the service in the network.

A network device with a distributed architecture, for example, a modular configuration switch, usually includes a main control board and a plurality of interface boards. During the network measurement, the analysis device establishes the TCP connection to the main control board. Each of the plurality of interface boards collects the data required for the network measurement, and sends the collected data to the main control board. After encapsulating the data collected by each interface board, the main control board sends the encapsulated data to the analysis device. In this way, the data collected by each interface board needs to be transmitted through the TCP connection between the main control board and the analysis device. When there are a relatively large quantity of interface boards, each interface board sends a large amount of collected data to the main control board, and the data is beyond a bearer capability of the TCP connection between the main control board and the analysis device. Consequently, the collected data cannot be sent to the analysis device in a timely manner, and the network measurement result obtained by the analysis device is not timely and accurate.

<CIT> relates to systems and/or methods which may enable forwarding of packets of an application flow between an ordered set of feature peers (e.g., the ordered set being referred to herein as a "service graph" and/or a "feature network") in a more efficient manner and dynamically change the service graph for particular application flows.

This application provides a data transmission method and a related apparatus, to avoid a problem that data collected by an interface board is aggregated in bulk to a main control board, and consequently, the data cannot be sent to an analysis device in a timely manner, and a network measurement result obtained by the analysis device is not timely and accurate.

According to a first aspect, this application provides a data transmission method. A first device receives a connection establishment request and a target data feature that are sent from an analysis device, where the connection establishment request includes a first connection parameter of the analysis device. The first device determines, based on the target data feature, a second device that collects to-be-analyzed data corresponding to the target data feature, where the first device and the second device belong to a same distributed system. The first device determines a second connection parameter of the second device. The first device sends the first connection parameter, the second connection parameter, and the target data feature to the second device, so that the second device establishes a connection to the analysis device based on the first connection parameter and the second connection parameter, and transmits the to-be-analyzed data corresponding to the target data feature to the analysis device through the established connection.

In this embodiment of this application, the second device does not need to aggregate the collected to-be-analyzed data to the first device, but directly transmits the collected to-be-analyzed data to the analysis device. Therefore, even if a plurality of second devices simultaneously collect the to-be-analyzed data, each of the plurality of second devices may transmit respective collected to-be-analyzed data to the analysis device without causing a large amount of data to be aggregated to the first device, to prevent the first device from becoming a bottleneck during data transmission, and to further avoid a problem that the to-be-analyzed data cannot be sent to the analysis device in a timely manner, and an analysis result obtained by the analysis device is not timely and accurate.

With reference to the first aspect, in a first possible implementation of the first aspect, that the first device determines a second connection parameter of the second device includes: when the first device determines, based on the target data feature, that the to-be-analyzed data is data that identifies at least one second device feature in the distributed system, or when collection frequency of the to-be-analyzed data is greater than a frequency threshold, determining, by the first device, the second connection parameter of the second device.

In this implementation, when the first device analyzes the target data feature, and determines that the to-be-analyzed data is the data identifies the at least one second device feature in the distributed system, or when the collection frequency of the to-be-analyzed data is greater than the frequency threshold, it indicates that there is a relatively large amount of the to-be-analyzed data collected by the second device, and a performance requirement for the first device to output data is relatively high. In this case, the first device determines the second connection parameter of the second device, so that the second device directly establishes the connection to the analysis device, and transmits the collected to-be-analyzed data, to prevent the first device from becoming the bottleneck during the data transmission, and to further avoid the problem that the to-be-analyzed data cannot be sent to the analysis device in a timely manner, and the analysis result obtained by the analysis device is not timely and accurate.

With reference to the first aspect or the first possible implementation of the first aspect, in a second possible implementation of the first aspect, the first device sends a mapping relationship between the second connection parameter of the second device and an interface corresponding to the second device to the analysis device, where the interface corresponding to the second device is an interface used by the second device to collect the to-be-analyzed data.

With reference to the first aspect or any possible implementation of the first aspect, in a third possible implementation of the first aspect, the first device receives a packet sent from the second device, where the packet is obtained by encapsulating the to-be-analyzed data based on the first connection parameter and the second connection parameter by the second device; and the first device forwards the packet to the analysis device based on the first connection parameter.

With reference to the first aspect or any possible implementation of the first aspect, in a fourth possible implementation of the first aspect, the second connection parameter includes an address of the second device, where the address of the second device is different from an address of the first device; the second connection parameter includes an address of the second device and a port number of the second device, where the address of the second device is different from an address of the first device; or the second connection parameter includes an address of the first device and a port number of the second device, where the port number of the second device is allocated for the first device.

According to a second aspect, this application provides a data transmission method. A second device receives a first connection parameter, a second connection parameter, and a target data feature that are sent from the first device, where the first connection parameter and the target data feature are sent from an analysis device to the first device, the second connection parameter is determined by the first device, and the first device and the second device belong to a same distributed system. The second device establishes a connection to the analysis device by using the first connection parameter and the second connection parameter. The second device collects to-be-analyzed data corresponding to the target data feature. The second device sends the to-be-analyzed data to the analysis device through the established connection.

With reference to the second aspect, in a first possible implementation of the second aspect, the second device encapsulates the to-be-analyzed data into a packet based on the first connection parameter and the second connection parameter; and the second device sends the encapsulated packet to the analysis device through the established connection.

With reference to the first possible implementation of the second aspect, in a second possible implementation of the second aspect, the second device sends the encapsulated packet to the first device, so that the first device forwards the encapsulated packet to the analysis device.

With reference to the second aspect or any possible implementation of the second aspect, in a third possible implementation of the second aspect, the second connection parameter includes an address of the second device, where the address of the second device is different from an address of the first device; the second connection parameter includes an address of the second device and a port number of the second device, where the address of the second device is different from an address of the first device; or the second connection parameter includes an address of the first device and a port number of the second device, where the port number of the second device is allocated for the first device.

According to a third aspect, this application provides a data transmission apparatus, including a function unit configured to implement the method according to the first aspect and each implementation of the first aspect in this application.

According to a fourth aspect, this application provides a data transmission apparatus, including a function unit configured to implement the method according to the second aspect and each implementation of the second aspect in this application.

According to a fifth aspect, this application provides a data transmission system, including the data transmission apparatus according to the third aspect or any implementation of the third aspect and the data transmission apparatus according to the fourth aspect or any implementation of the fourth aspect.

To describe the technical solutions in embodiments of this application more clearly, the following briefly describes the accompanying drawings that need to be used in the embodiments of this application.

When no conflict occurs, various embodiments in this application and different features in the various embodiments may be combined with each other.

The embodiments of this application may be applied to a distributed system. <FIG> is a schematic diagram of a network architecture according to an embodiment of this application. As shown in <FIG>, a distributed system is specifically a distributed cluster <NUM>. The distributed cluster <NUM> may be a cluster in a wireless network, or may be a network device with a distributed architecture, for example, a modular configuration switch or a modular configuration router. The distributed cluster <NUM> includes a plurality of devices, and an example in which a device <NUM>, a device <NUM>, a device <NUM>, and a device <NUM> are included is used for description in <FIG>. In the distributed cluster <NUM>, each of the device <NUM>, the device <NUM>, and the device <NUM> can communicate with the device <NUM>. The device <NUM> serves as an external interface or a proxy of the cluster, and is used for data transmission between each device in the distributed cluster <NUM> and another device out of the distributed cluster <NUM>. The device <NUM> further coordinates cooperation between various devices in the distributed cluster <NUM>. An analysis device <NUM> is a device that performs network measurement on the distributed cluster <NUM>, the device in the distributed cluster <NUM>, or a network at which the distributed cluster <NUM> is located. The analysis device <NUM> and the distributed cluster <NUM> may be located at a same network, or the analysis device <NUM> and the distributed cluster <NUM> may be located at different networks. When performing the network measurement on the distributed cluster <NUM>, the device in the distributed cluster <NUM>, or the network at which the distributed cluster <NUM> is located, the analysis device <NUM> needs to first establish a connection to the distributed cluster <NUM>, and then notify the device in the distributed cluster <NUM> of a feature of to-be-analyzed data. After collecting data, the device in the distributed cluster <NUM> encapsulates the collected data, and then transmits the encapsulated data to the analysis device <NUM> through the established connection. The analysis device <NUM> obtains and analyzes the collected data, and adjusts a network configuration parameter based on an analysis result, to ensure quality of service for a service in a network.

Currently, in the distributed cluster <NUM>, each device transmits data to a device out of the cluster through the device <NUM>. Therefore, during the network measurement, the analysis device <NUM> first establishes a connection to the device <NUM>, and then notifies the device <NUM> of the data feature of the to-be-analyzed data. The device <NUM> may determine, by using the data feature of the to-be-analyzed data, the to-be-analyzed data that is to be collected and a device that collects the to-be-analyzed data, and deliver, to the determined device that collects the to-be-analyzed data, the data feature of the to-be-analyzed data that is to be collected, for example, the device <NUM>, the device <NUM>, and the device <NUM>. After collecting the to-be-analyzed data, the device <NUM>, the device <NUM>, and the device <NUM> send the collected to-be-analyzed data to the device <NUM>. After aggregating the to-be-analyzed data that is collected by other devices, the device <NUM> encapsulates the to-be-analyzed data, and sends the encapsulated to-be-analyzed data to the analysis device <NUM>. The analysis device <NUM> performs the network measurement based on the received to-be-analyzed data. When collection frequency of the to-be-analyzed data is greater than a threshold, the to-be-analyzed data identifies an entire distributed system feature, or the like, the device <NUM>, the device <NUM> and the device <NUM> collect a large amount of to-be-analyzed data, and send the collected to-be-analyzed data to the device <NUM>. If data output performance of the device <NUM> cannot meet a requirement, for example, when an amount of the collected data goes beyond a bearer capability of the connection between the device <NUM> and the analysis device <NUM>, consequently, the to-be-analyzed data received by the device <NUM> cannot be sent to the analysis device <NUM> in a timely manner. Therefore, in a scenario in which the requirement for the data output performance is high, the device <NUM> is a bottleneck during data transmission to the analysis device.

In this embodiment of this application, the analysis device <NUM> may establish a connection to another device in the distributed cluster <NUM> through the device <NUM>, that is, the analysis device <NUM> may establish a connection to each device that collects data, and perform data transmission, to avoid a case in which data collected by a plurality of devices is aggregated to one device and then transmitted, so that the data collected by each device can be transmitted to the analysis device <NUM> in a timely manner. Further, the analysis device <NUM> may obtain the analysis result accurately and in a timely manner, to achieve an objective of optimizing the network configuration parameter.

For example, the distributed system may further be a modular configuration switch. The modular configuration switch includes a main control board and a plurality of interface boards, and the main control board and the interface boards may transmit data through an Ethernet interface. In the distributed system shown in <FIG>, the device <NUM> is equivalent to the main control board, and the device <NUM>, the device <NUM>, and the device <NUM> are equivalent to the interface boards. In this embodiment of this application, the analysis device may separately establish a connection to each interface board through the main control board, so that data collected by each interface board is transmitted through the established connection.

An embodiment of this application provides a data transmission method, which may be applicable to the network architecture shown in <FIG>.

A first device receives a connection establishment request and a target data feature that are sent from an analysis device.

The connection establishment request is used to request to establish a connection to a distributed system. The connection establishment request includes a first connection parameter of the analysis device. The first connection parameter may include an address, a port number, a protocol type of the to-be-established connection, and the like of the analysis device. For example, if the connection established by the analysis device is a TCP connection, the first connection parameter may include an IP address of the analysis device, a protocol type of the connection, that is, a TCP, a TCP port number of the analysis device, and the like.

The first device is a device in the distributed system that performs data transmission with a device out of the distributed system, and may be specifically the device <NUM> in the distributed system shown in <FIG>. The target data feature is used to indicate target data. The target data is to-be-analyzed data, that is, data that needs to be analyzed when the analysis device performs network measurement. The target data feature includes a type, collection frequency, a collection period, and the like of the target data.

In this embodiment of this application, when performing the network measurement on the distributed system, the analysis device may establish a connection to a device that collects the target data. When establishing the connection, the analysis device first sends, to the first device, the connection establishment request used to establish the connection. After receiving the connection establishment request sent from the analysis device, the first device determines that the analysis device establishes the connection to perform the network measurement.

For example, when the distributed system is a modular configuration switch, the analysis device needs to send the connection establishment request to a main control board. After receiving the connection establishment request, the main control board may determine the first connection parameter of the analysis device.

The first device determines, based on the target data feature, a second device that collects to-be-analyzed data corresponding to the target data feature.

The second device is a device that collects data required by the analysis device (that is, the target data). The first device and the second device belong to the same distributed system. The second device may be specifically the device <NUM>, the device <NUM>, or the device <NUM> in the distributed system shown in <FIG>.

The first device may determine, based on the target data feature, specific target data that needs to be collected, that is, the to-be-analyzed data, and specific second devices or interfaces that can collect the to-be-analyzed data, and may further determine the second device that collects the to-be-analyzed data.

For example, if the analysis device needs to analyze a latency of forwarding traffic of a user A in the distributed system, the analysis device determines that a data feature of the to-be-analyzed data is times at which the traffic of the user A enters and leaves the distributed system, and the first device may determine that a device that forwards the traffic of the user A is the second device that can collect the data.

It should be noted that there may be one or more second devices that are determined by the first device and that collect the to-be-analyzed data.

The first device determines a second connection parameter of the second device.

After receiving the connection establishment request of the analysis device, the first device needs to determine the second connection parameter corresponding to the second device, so that a connection is established and data is transmitted between the second device and the analysis device.

When an address of the first device is different from an address of the second device, the second connection parameter may include the address of the second device (for example, an IP address), or the second connection parameter may include the address and a port number of the second device. For example, in the architecture shown in <FIG>, the second device may have an independent IP address and port number, for example, a port number of the TCP connection or a port number of a User Datagram Protocol (User Datagram Protocol, UDP) connection. Therefore, the first device may determine the connection parameter used by the second device to establish the connection to the analysis device.

Alternatively, when an address of the first device is the same as an address of the second device, the second connection parameter includes the address of the first device and a port number of the second device. For example, the distributed system is the modular configuration switch, and each of IP addresses of an interface board and the main control board is an IP address of the switch. Therefore, the first device may determine that the address of the second device is the address of the first device, and the first device may allocate a port number for each second device to transmit data, and further determine a second connection parameter of each second device.

The first device sends the first connection parameter, the second connection parameter, and the target data feature to the second device.

The first device may send the first connection parameter, the second connection parameter, and the target data feature to the second device by using a message, or may separately send the first connection parameter, the second connection parameter, and the target data feature to the second device by using different messages.

The second device establishes a connection to the analysis device based on the first connection parameter and the second connection parameter.

After receiving the first connection parameter and the second connection parameter, the second device may establish, to the analysis device, the connection used to transmit data, and the connection, for example, may be the TCP connection.

The second device collects the to-be-analyzed data corresponding to the target data feature.

The second device sends the to-be-analyzed data to the analysis device through the established connection.

In this embodiment of this application, after receiving the connection request sent from the analysis device, the first device may determine, based on the target data feature sent from the analysis device, the second device that collects the to-be-analyzed data, and the second connection parameter that may be used by the second device to establish the connection, and then send the first connection parameter and the target data feature of the analysis device, and the second connection parameter of the second device to the second device, so that the second device may directly establish the connection to the analysis device, and transmit the collected to-be-analyzed data to the analysis device through the directly established connection. In this way, the second device does not need to aggregate the collected to-be-analyzed data to the first device, but directly transmits the collected to-be-analyzed data to the analysis device. Therefore, even if a plurality of second devices simultaneously collect the to-be-analyzed data, each of the plurality of second devices may transmit respective collected to-be-analyzed data to the analysis device without causing a large amount of data to be aggregated to the first device, to prevent the first device from becoming a bottleneck during data transmission, and to further avoid a problem that the to-be-analyzed data cannot be sent to the analysis device in a timely manner, and an analysis result obtained by the analysis device is not timely and accurate.

In this embodiment of this application, after step <NUM>, when sending the to-be-analyzed data to the analysis device, the second device may further encapsulate the collected to-be-analyzed data based on the first connection parameter and the second connection parameter, and send the encapsulated to-be-analyzed data to the first device. The first device forwards the encapsulated to-be-analyzed data to the analysis device.

For example, when the to-be-analyzed data required by the analysis device is data that identifies a distributed system feature, the plurality of second devices are usually required to collect the to-be-analyzed data. In this case, after being separately encapsulated, the to-be-analyzed data collected by all second devices may be aggregated to the first device. The first device transmits the aggregated to-be-analyzed data encapsulated by all the second devices to the analysis device, so that the analysis device can obtain complete data. Especially in the distributed system such as the modular configuration switch, the interface board is not an independent device. When the to-be-analyzed data required by the analysis device is the data that identifies the distributed system feature, data collected by all interface boards usually is aggregated to the main control board, and the main control board sends the aggregated collected data to the analysis device.

In addition, the first device may further determine collection frequency of the to-be-analyzed data based on the target data feature. If the collection frequency is not high (for example, on the order of seconds), in this case, a performance requirement for the first device to output data is relatively low, and the collected to-be-analyzed data does not wait at the first device or waits for a very short time. The first device may transmit the collected to-be-analyzed data to the analysis device without affecting the network measurement performed by the analysis device. Therefore, in an implementation of this application, after receiving the target data feature sent from the analysis device, the first device may further determine, based on the target data feature, to select a specific manner in which the to-be-analyzed data is transmitted to the analysis device, thereby determining whether to perform step <NUM>.

Therefore, in this embodiment of this application, step <NUM> may further be specifically performed, to be specific, when the first device determines, based on the target data feature, that the to-be-analyzed data is the data that identifies at least one device feature in the distributed system, or when the collection frequency of the to-be-analyzed data is greater than a frequency threshold, the first device determines the second connection parameter corresponding to the second device.

Data related to at least one device in the distributed system may include data related to boards, ports, queues, and the like of one or more second devices. The frequency threshold may be set based on a requirement of an actual scenario. For example, frequency on the order of milliseconds may be set.

In an implementation in this embodiment of this application, after the second device establishes the connection to the analysis device through the first device, the second device may collect the to-be-analyzed data based on a requirement of the analysis device, after the to-be-analyzed data is collected, encapsulate the collected to-be-analyzed data based on the first connection parameter and the second connection parameter, and send the encapsulated to-be-analyzed data to the analysis device. Therefore, step <NUM> may be specifically performed, to be specific, the second device encapsulates the to-be-analyzed data into a packet based on the first connection parameter and the second connection parameter, and then sends the encapsulated packet to the analysis device through the established connection.

Each second device may collect different to-be-analyzed data based on requirements of the analysis device. After collecting the to-be-analyzed data, each second device may directly encapsulate the collected to-be-analyzed data into a packet, and send the encapsulated packet to the analysis device. It is not required that after being aggregated to the first device, the collected data is encapsulated by the first device.

When the second device sends the encapsulated packet to the analysis device, the second device may directly send the packet to the analysis device, or may send the encapsulated packet to the analysis device through the first device. If the second device sends the encapsulated packet to the analysis device through the first device, after receiving the packet sent from the second device, the first device may forward, based on an address carried by the packet, the packet to the analysis device without a need to encapsulate the packet again.

In another implementation in this embodiment of this application, each second device collects the data on a corresponding interface, so that the first device may send a mapping relationship between the second connection parameter of each second device and each interface to the analysis device, and after receiving a packet sent from a different second device, the analysis device may determine, based on the mapping relationship, data on a specific interface of the received packet. Therefore, a network latency, jitter, congestion, a packet loss, and an emergency of each interface may be separately analyzed, or sample data on each interface may be aggregated, to obtain a performance profile of the entire device in a network. In this way, network traffic is adjusted based on a policy, each service is forwarded in an expected path, and quality of service for the service reaches an expected target. An interface corresponding to a second device is an interface used by the second device to collect the to-be-analyzed data.

<FIG> is a schematic block diagram of a data transmission apparatus <NUM> according to an embodiment of this application. The apparatus <NUM> is a first device in a distributed system, for example, a device <NUM>. As shown in <FIG>, the data transmission apparatus <NUM> includes:.

In this embodiment of this application, after receiving the connection request sent from the analysis device, the apparatus <NUM> may determine, based on the target data feature sent from the analysis device, the second device that collects the to-be-analyzed data, and the second connection parameter that may be used by the second device to establish the connection, and then send the first connection parameter and the target data feature of the analysis device, and the second connection parameter of the second device to the second device, so that the second device may directly establish the connection to the analysis device, and transmit the collected to-be-analyzed data to the analysis device through the directly established connection. In this way, the second device does not need to aggregate the collected to-be-analyzed data to the apparatus <NUM>, but directly transmits the collected to-be-analyzed data to the analysis device. Therefore, even if a plurality of second devices simultaneously collect the to-be-analyzed data, each of the plurality of second devices may transmit respective collected to-be-analyzed data to the analysis device without causing a large amount of data to be aggregated to the apparatus <NUM>, to prevent the apparatus <NUM> from becoming a bottleneck during data transmission, and to further avoid a problem that the to-be-analyzed data cannot be sent to the analysis device in a timely manner, and an analysis result obtained by the analysis device is not timely and accurate.

It may be understood that the determining unit <NUM> is specifically configured to: when the first device determines, based on the target data feature, that the to-be-analyzed data is data that identifies at least one second device feature in the distributed system, or when collection frequency of the to-be-analyzed data is greater than a frequency threshold, determine the second connection parameter of the second device.

It may be understood that the sending unit <NUM> is further configured to send a mapping relationship between the second connection parameter of the second device and an interface corresponding to the second device to the analysis device, where the interface corresponding to the second device is an interface used by the second device to collect the to-be-analyzed data.

It may be understood that the second connection parameter includes an address of the second device, where the address of the second device is different from an address of the first device; the second connection parameter includes an address of the second device and a port number of the second device, where the address of the second device is different from an address of the first device; or the second connection parameter includes an address of the first device and a port number of the second device, where the port number of the second device is allocated for the first device.

The data transmission apparatus <NUM> according to this embodiment of this application may correspond to an execution body in a data transmission method according to an embodiment of this application. Modules in the data transmission apparatus <NUM> are respectively intended to implement corresponding procedures performed by the first device in the method shown in <FIG>. For brevity, details are not described herein again.

<FIG> is a schematic block diagram of a data transmission apparatus <NUM> according to an embodiment of this application. The apparatus <NUM> is a second device in a distributed system, for example, any one of a device <NUM>, a device <NUM>, and a device <NUM>. As shown in <FIG>, the data transmission apparatus <NUM> includes:.

In this embodiment of this application, after receiving a connection request sent from the analysis device, the first device may determine, based on the target data feature sent from the analysis device, the apparatus <NUM> that collects the to-be-analyzed data, and the second connection parameter that may be used by the apparatus <NUM> to establish the connection, and then send the first connection parameter and the target data feature of the analysis device, and the second connection parameter of the apparatus <NUM> to the apparatus <NUM>, so that the apparatus <NUM> may directly establish the connection to the analysis device, and transmit the collected to-be-analyzed data to the analysis device through the directly established connection. In this way, the apparatus <NUM> does not need to aggregate the collected to-be-analyzed data to the first device, but directly transmits the collected to-be-analyzed data to the analysis device. Therefore, even if a plurality of apparatuses <NUM> simultaneously collect the to-be-analyzed data, each of the plurality of apparatuses <NUM> may transmit respective collected to-be-analyzed data to the analysis device without causing a large amount of data to be aggregated to the first device, to prevent the first device from becoming a bottleneck during data transmission, and to further avoid a problem that the to-be-analyzed data cannot be sent to the analysis device in a timely manner, and an analysis result obtained by the analysis device is not timely and accurate.

It may be understood that the sending unit <NUM> is specifically configured to:.

It may be understood that the second connection parameter includes an address of the second device, where the address of the second device is different from an address of the first device;.

The data transmission apparatus <NUM> according to this embodiment of this application may correspond to an execution body in a data transmission method according to an embodiment of this application. Modules in the data transmission apparatus <NUM> are respectively intended to implement corresponding procedures performed by the second device in the method shown in <FIG>. For brevity, details are not described herein again.

<FIG> is a schematic block diagram of a data transmission device <NUM> according to an embodiment of this application. As shown in <FIG>, the device <NUM> includes a processor <NUM>, a memory <NUM>, and a communications interface <NUM>, and the communications interface <NUM> is configured to communicate with an external device.

The processor <NUM> may include a central processing unit (central processing unit, CPU), a network processor (network processor, NP), or a combination thereof. The processor <NUM> may further include a hardware chip, for example, an application-specific integrated circuit (application-specific integrated circuit, ASIC), a programmable logic device (programmable logic device, PLD), or a combination thereof. The foregoing PLD may be a complex programmable logical device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a generic array logic (Generic Array Logic, GAL), or a combination thereof. Each circuit in the processor <NUM> may be independent, or may be integrated in one or more chips.

The memory <NUM> may be an independent device, or may be integrated in the processor <NUM>. The memory <NUM> may include a volatile memory (volatile memory) such as a random-access memory (random-access memory, RAM). The memory <NUM> may also include a non-volatile memory (non-volatile memory) such as a flash memory (flash memory), a hard disk drive (hard disk drive, HDD), or a solid-state drive (solid-state drive, SSD). The memory <NUM> may further include any combination of the foregoing types of memories.

The memory <NUM> may be configured to store a correspondence between a fault cause and fault coding; and optionally, the memory <NUM> is further configured to store a computer program instruction. The processor <NUM> executes the computer program instruction stored in the memory <NUM>, to implement the method shown in <FIG>.

The communications interface <NUM> may be a wireless interface or a wired interface. The wireless interface may be a cellular mobile network interface, a wireless local area network (WLAN) interface, or the like. The wired interface may be an Ethernet interface, for example, an optical interface or an electrical interface.

The device <NUM> may further include a bus <NUM>, where the bus <NUM> is configured to connect the processor <NUM>, the memory <NUM>, and the communications interface <NUM>, to enable the processor <NUM>, the memory <NUM>, and the communications interface <NUM> to communicate with each other through the bus <NUM>.

In an implementation, the memory <NUM> is configured to store program code, and the processor <NUM> is configured to invoke the program code to implement functions and steps performed by the first device in <FIG>.

In another implementation, the memory <NUM> is configured to store program code, and the processor <NUM> is configured to invoke the program code to implement functions and steps performed by the second device in <FIG>.

An embodiment of this application further provides a data transmission system, including the data transmission apparatus <NUM> shown in <FIG> and the data transmission apparatus <NUM> shown in <FIG>.

Claim 1:
A data transmission method, comprising:
receiving (<NUM>), by a first device (<NUM>), a connection establishment request and a target data feature that are sent from an analysis device (<NUM>), wherein the connection establishment request comprises a first connection parameter of the analysis device (<NUM>), wherein the target data feature is used to indicate target data, and includes a type, collection frequency, and/or a collection period of the target data, wherein the target data is to-be-analyzed data, which is data that needs to be analyzed when the analysis device (<NUM>) performs network measurement;
determining (<NUM>), by the first device (<NUM>) based on the target data feature, a second device (<NUM>, <NUM>, <NUM>) that collects the to-be-analyzed data corresponding to the target data feature, wherein the first device (<NUM>) and the second device (<NUM>, <NUM>, <NUM>) belong to a same distributed system;
determining (<NUM>), by the first device (<NUM>), a second connection parameter of the second device (<NUM>, <NUM>, <NUM>); and
sending (<NUM>), by the first device (<NUM>), the first connection parameter, the second connection parameter, and the target data feature to the second device (<NUM>, <NUM>, <NUM>), so that the second device (<NUM>, <NUM>, <NUM>) establishes a connection to the analysis device (<NUM>) based on the first connection parameter and the second connection parameter, and transmits the to-be-analyzed data corresponding to the target data feature to the analysis device (<NUM>) through the established connection.