CN112822123A - Data acquisition method and device - Google Patents

Data acquisition method and device Download PDF

Info

Publication number
CN112822123A
CN112822123A CN202011611203.6A CN202011611203A CN112822123A CN 112822123 A CN112822123 A CN 112822123A CN 202011611203 A CN202011611203 A CN 202011611203A CN 112822123 A CN112822123 A CN 112822123A
Authority
CN
China
Prior art keywords
message
gre
information
equipment
path information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011611203.6A
Other languages
Chinese (zh)
Inventor
刘刚国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202011611203.6A priority Critical patent/CN112822123A/en
Publication of CN112822123A publication Critical patent/CN112822123A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2483Traffic characterised by specific attributes, e.g. priority or QoS involving identification of individual flows
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a data acquisition method and a device, which are applied to the field of data transmission, wherein the data acquisition method applied to convergence equipment can comprise the following steps: receiving a GRE message sent by intermediate equipment; the GRE message encapsulates information representing access equipment of an uplink message and path information representing a message transmission path, wherein the path information comprises equipment information corresponding to equipment through which the message is transmitted; and decapsulating the GRE message to obtain a decapsulated message, and performing data acquisition on the decapsulated message to obtain acquisition data corresponding to the GRE message. In the above scheme, the GRE message received by the aggregation device includes both the source information characterizing the uplink message and the path information characterizing the network path through which the uplink message passes, so that the aggregation device can identify the source and the path of the acquired traffic after decapsulating the GRE message.

Description

Data acquisition method and device
Technical Field
The application relates to the field of data transmission, in particular to a data acquisition method and device.
Background
In a longitudinal networking of an enterprise, network traffic is generally collected at a convergence device in order to reduce the cost of traffic collection. However, the traffic collected by the aggregation device does not have any source identifier, and therefore, a branch mechanism from which the traffic comes and a network path through which the traffic passes cannot be identified, network information related to the traffic source cannot be further obtained, a topology of the path through which the traffic passes cannot be known, and even the traffic situation cannot be analyzed according to the branch mechanism.
Disclosure of Invention
An object of the embodiments of the present application is to provide a data acquisition method and apparatus, so as to solve a technical problem that a source and a path of traffic collected by a convergence device cannot be known.
In order to achieve the above purpose, the technical solutions provided in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a data acquisition method applied to a convergence device, including: receiving a GRE message from access equipment, which is sent by intermediate equipment; decapsulating the GRE message to obtain an original uplink message after decapsulation, and performing data acquisition on the original uplink message after decapsulation to obtain acquisition data corresponding to the GRE message; the collected data corresponding to the GRE message includes information characterizing the access device, path information characterizing the transmission path of the GRE message, and flow information, which are encapsulated in the original uplink message. In the above scheme, the GRE message received by the aggregation device includes both information characterizing the access device that sends the GRE message and path information characterizing a network path through which the GRE message passes, so that the aggregation device can identify a source and a path of the acquired traffic after decapsulating the GRE message.
In an optional embodiment of the present application, the collected data further includes a quintuple of the uplink packet; after the data acquisition is performed on the decapsulated original uplink packet to obtain the acquired data corresponding to the GRE packet, the method further includes: and calculating a corresponding hash value according to the quintuple of the original uplink message, and establishing a hash table according to the hash value, wherein the hash table records the information of the access equipment, the path information and the flow information corresponding to the GRE message. In the above scheme, after receiving the GRE packet corresponding to the original uplink packet, the aggregation device may extract the quintuple of the original uplink packet, calculate a unique hash value according to the quintuple of the original uplink packet, and store information, path information, and flow information of the access device corresponding to the GRE packet in the hash table.
In an optional embodiment of the present application, after the creating the hash table according to the hash value, the method further includes: receiving a downlink message; determining an uplink message corresponding to the downlink message according to the quintuple of the downlink message and the hash table; and sending the uplink message, the corresponding downlink message and the acquired data to a server. In the above scheme, after receiving the downlink packet, the convergence device may extract the quintuple of the downlink packet, calculate a hash value according to the quintuple of the downlink packet with the source and destination exchanged, and determine the uplink packet corresponding to the downlink packet from the hash table according to the calculated hash value. Therefore, after receiving the downlink message, the aggregation device can directly find the corresponding uplink message through the mapping relation of the hash value, and the calculation amount of the aggregation device is reduced.
In a second aspect, an embodiment of the present application provides a data acquisition method, which is applied to an access device, and includes: receiving an original uplink message; encapsulating information representing the access equipment and path information representing a message transmission path for the original uplink message, and then performing GRE encapsulation to obtain a GRE message; the path information comprises equipment information corresponding to equipment through which the message is transmitted; and sending the GRE message to an intermediate device so that the intermediate device updates the path information in the GRE message, and sending the GRE message after updating the path information to a convergence device, wherein the convergence device acquires acquisition data corresponding to the GRE message according to the GRE message after updating the path information. In the above scheme, after receiving the original uplink packet, the access device may perform GRE encapsulation on the original uplink packet, where before the encapsulation, source information and path information may be added to a header of the original uplink packet, so that the intermediate device may update the path information and the aggregation device may identify a source and a path of the acquired traffic.
In a third aspect, an embodiment of the present application provides a data acquisition method, which is applied to an intermediate device, and includes: receiving a GRE message sent by access equipment or intermediate equipment; the GRE message encapsulates information including access equipment which sends the GRE message and path information which represents a message transmission path, wherein the path information includes equipment information corresponding to equipment through which the message is transmitted; adding local equipment information to the path information in the GRE message to obtain the GRE message after updating the path information; and sending the GRE message after the path information is updated to another intermediate device or convergence device, so that the convergence device acquires the acquisition data corresponding to the GRE message according to the GRE message after the path information is updated. In the above scheme, after receiving the GRE packet, the intermediate device may add local device information to the path information to update the path information, so that the aggregation device may identify the source and the path of the acquired traffic.
In a fourth aspect, an embodiment of the present application provides a data acquisition device, which is applied to a convergence device, and includes: the receiving module is used for receiving a GRE message from the access equipment, which is sent by the intermediate equipment; the processing module is used for decapsulating the GRE message to obtain an original uplink message after decapsulation, and performing data acquisition on the original uplink message after decapsulation to obtain acquisition data corresponding to the GRE message; the collected data corresponding to the GRE message includes information characterizing the access device, path information characterizing the transmission path of the GRE message, and flow information, which are encapsulated in the original uplink message. In the above scheme, the GRE message received by the aggregation device includes both information of the access device that sends the GRE message and path information that characterizes a network path through which the GRE message passes, so that the aggregation device can identify a source and a path of the acquired traffic after decapsulating the GRE message.
In an optional embodiment of the present application, the collected data further includes a quintuple of the uplink packet; the device further comprises: and the calculation module is used for calculating a corresponding hash value according to the quintuple of the original uplink message and establishing a hash table according to the hash value, wherein the hash table records the information of the access equipment, the path information and the flow information corresponding to the GRE message. In the above scheme, after receiving the GRE packet corresponding to the original uplink packet, the aggregation device may extract the quintuple of the original uplink packet, calculate a unique hash value according to the quintuple of the original uplink packet, and store information, path information, and flow information of the access device corresponding to the GRE packet in the hash table.
In an alternative embodiment of the present application, the apparatus further comprises: a receiving module, configured to receive a downlink message; the determining module is used for determining an uplink message corresponding to the downlink message according to the quintuple of the downlink message and the hash table; and the sending module is used for sending the corresponding uplink message, the downlink message and the acquired data to a server. In the above scheme, after receiving the downlink packet, the convergence device may extract the quintuple of the downlink packet, calculate a hash value according to the quintuple of the downlink packet with the source and destination exchanged, and determine the uplink packet corresponding to the downlink packet from the hash table according to the calculated hash value. Therefore, after receiving the downlink message, the aggregation device can directly find the corresponding uplink message through the mapping relation of the hash value, and the calculation amount of the aggregation device is reduced.
In a fifth aspect, an embodiment of the present application provides a data acquisition device, which is applied to an access device, and includes: a receiving module, configured to receive an original uplink packet; an encapsulation module, configured to encapsulate, on the original uplink packet, information characterizing the access device and path information characterizing a packet transmission path, and then perform GRE encapsulation to obtain a GRE packet; the path information comprises equipment information corresponding to equipment through which the message is transmitted; and the sending module is used for sending the GRE message to intermediate equipment so that the intermediate equipment updates the path information in the GRE message and sends the GRE message after updating the path information to convergence equipment, and the convergence equipment acquires acquisition data corresponding to the GRE message according to the GRE message after updating the path information. In the above scheme, after receiving the original uplink packet, the access device may perform GRE encapsulation on the original uplink packet, where before the GRE encapsulation, information of the access device and path information may be added to a header of the original uplink packet, so that the intermediate device may update the path information and the aggregation device may identify a source and a path of the acquired traffic.
In a sixth aspect, an embodiment of the present application provides a data acquisition apparatus, which is applied to an intermediate device, and includes: the receiving module is used for receiving the GRE message sent by the access equipment or the intermediate equipment; the GRE message encapsulates information representing access equipment for sending the GRE message and path information representing a message transmission path, wherein the path information comprises equipment information corresponding to equipment through which the message is transmitted; the updating module is used for adding local equipment information in the path information in the GRE message to obtain the GRE message after updating the path information; and the sending module is used for sending the GRE message after the path information is updated to another intermediate device or the convergence device so that the convergence device collects the collected data corresponding to the GRE message according to the GRE message after the path information is updated. In the above scheme, after receiving the GRE packet, the intermediate device may add local device information to the path information to update the path information, so that the aggregation device may identify the source and the path of the acquired traffic.
In a seventh aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, and a bus; the processor and the memory are communicated with each other through the bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to be able to perform the data acquisition method as in the first, second and third aspects.
In an eighth aspect, embodiments of the present application provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the data acquisition method as in the first, second, and third aspects.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a network topology structure diagram provided in an embodiment of the present application;
fig. 2 is a flowchart of a data acquisition method applied to an access device according to an embodiment of the present application;
fig. 3 is a flowchart of a data acquisition method applied to an intermediate device according to an embodiment of the present application;
fig. 4 is a flowchart of a data acquisition method applied to a convergence device according to an embodiment of the present application;
fig. 5 is a block diagram of a data acquisition device applied to a convergence device according to an embodiment of the present disclosure;
fig. 6 is a block diagram of a data acquisition device applied to an access device according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a data acquisition apparatus applied to an intermediate device according to an embodiment of the present disclosure;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, fig. 1 is a network topology structure diagram provided in an embodiment of the present application, where the network topology structure includes three types of devices, which are respectively: access equipment, intermediate equipment and convergence equipment. The access device is used for receiving an original uplink message and forwarding the original uplink message to the convergence device through the intermediate device; the convergence device is used for receiving the downlink message and forwarding the downlink message to the access device through the intermediate device; the convergence device is further configured to collect traffic information of the message, and send the collected traffic information to the server.
It can be understood that, in the embodiment of the present application, no specific limitation is imposed on the number and connection relationship of the access device, the intermediate device, and the aggregation device, and the network topology shown in fig. 1 is only one example provided in the embodiment of the present application, and those skilled in the art may make appropriate adjustments according to actual situations.
As shown in fig. 1, the access device includes three access devices, six intermediate devices, and one aggregation device, and each access device has multiple options for reaching the aggregation device. Therefore, when receiving a forwarded message, the aggregation device cannot determine the source of the message (i.e., the access device that uploads the message) or cannot determine the path that the message passes through during the uploading process.
Based on the above analysis, in the method, by adding path information to a message, a sink device can identify a source of the message and the path information when performing traffic collection, so as to implement accurate traffic control.
Before executing the data acquisition method provided by the embodiment of the application, preprocessing is required. First, it is possible to determine a topological relationship between a plurality of network devices and set information of an organization, a role, and the like of each device. As an embodiment, a network discovery function may be utilized to perform network discovery and establish a topological relationship of network devices.
Taking fig. 1 as an example, the top device may be set as an aggregation device, the second row device may be set as a city a uplink device, the third row device may be set as a city a uplink device, the fourth row device may be set as a city a uplink device and a branch 2 uplink device, respectively, and the last row device may be set as an access device.
Then, the administrator may divide the entire network into different network domains according to the determined topological relationship between the network devices, and allocate different domain information to the different network domains. For example, the division may be: dividing network branches corresponding to different cities into a network domain; the allocated domain information may be a 4-bit network domain number, and taking fig. 1 as an example, the domain information corresponding to the city a is 0101; the assigned domain information may be set on an interface of the aggregation device that is uplinked to each device in the network domain.
Then, the server may assign a device number to each device, where each device information is a unique number of the device in the network domain, and information such as an organization where the device is located and the like may be identified by the number. For example, the assigned device number may be an 8-bit number, and taking fig. 1 as an example, the device information of the second row of devices may be 00000001 and 00000010, the device information of the third row of devices may be 00000011 and 00000100, the device information of the fourth row of devices may be 00000101 and 00000110, and the device information of the left device of the last row may be 00000111.
When the packet is transmitted between the network devices, the unique device number of each device may be superimposed to obtain a string of path information when passing through each network device, for example, the path information may be a 32-bit number.
As an embodiment, the manner of superimposing the unique device number of each device to obtain a string of path information is as follows: and shifting the path information and the equipment information of the current equipment from a digital value, and superposing the equipment information of the current equipment to the path information through AND operation so as to obtain new path information and replace the original path information.
Taking the path of access device-branch 1 uplink device-local city a downlink device-local city a uplink device-aggregation device in fig. 1 as an example, the manner of superimposing unique device numbers of each device to obtain a string of path information is further described: the path information of the message received by the access device is 00000000000000000000000000000000, the path information of the message received by the uplink device in branch 1 is 00000000000000000000000000000111, the path information of the message received by the downlink device in city a is 00000000000000000000000000111101, the path information of the message received by the uplink device in city a is 00000000000000000000000011110111, and the path information of the message received by the aggregation device is 00000000000000000000000111101111.
It can be understood that, in the process of assigning the device number, in order to ensure that the device information obtained by the assignment is unique in the subsequent data acquisition process, the aggregation device may determine the transmission path corresponding to the packet according to the path information, and may calculate the uniqueness of the path information of each path from the access device to the aggregation device. That is, in the process of assigning the device number, the server may calculate path information corresponding to each path in advance, and if the same path information occurs, the device number is reassigned; if there is no identical path information, each piece of path information may be stored with the corresponding path for subsequent comparison.
Finally, after completing the distribution of the domain information and the device information, the server may issue a path starting point configuration for the access device (for example, process the message so that the message carries the information of the access device and the path information), issue a path forwarding point configuration for the intermediate device, and issue a path end point configuration for the aggregation device (for example, process the message so as to extract the information of the access device and the path information in the message).
After the preprocessing is completed, the data acquisition method provided by the embodiment of the application can be executed.
Referring to fig. 2, fig. 2 is a flowchart of a data acquisition method applied to an access device according to an embodiment of the present application, where the data acquisition method includes the following steps:
step S201: the access device receives the original uplink message.
Step S202: and the access equipment encapsulates the information of the access equipment represented by the original uplink message and the path information of the transmission path of the represented message, and then performs GRE encapsulation to obtain a GRE message.
Step S203: the access device sends GRE message to the intermediate device.
When the access device receives the original uplink packet, since the access device performs the path starting point configuration in the preprocessing process, the access device can perform Generic Routing Encapsulation (GRE) on the original uplink packet to obtain the GRE packet.
Before encapsulation, the access device may add information of the access device and path information to a header of the original uplink packet. The path information includes device information corresponding to devices through which the message is transmitted, and represents a transmission path of the message.
Then, the access device may send the GRE packet obtained by encapsulation to the intermediate device of the next hop. After receiving the GRE message sent by the access device, the intermediate device can update the path information in the GRE message, and send the GRE message after updating the path information to the aggregation device, and the aggregation device acquires acquisition data corresponding to the uplink message according to the GRE message after updating the path information.
In the above scheme, after receiving the original uplink packet, the access device may perform GRE encapsulation on the original uplink packet, where before the GRE encapsulation, information of the access device and path information may be added to a header of the original uplink packet, so that the intermediate device may update the path information and the aggregation device may identify a source and a path of the acquired traffic.
Referring to fig. 3, fig. 3 is a flowchart of a data acquisition method applied to an intermediate device according to an embodiment of the present application, where the data acquisition method includes the following steps:
step S301: the intermediate equipment receives the GRE message sent by the access equipment.
Step S302: the intermediate device adds local device information in the path information in the GRE message to obtain the GRE message after updating the path information.
Step S303: and the intermediate equipment sends the GRE message after updating the path information to another intermediate equipment or the convergence equipment.
After receiving the GRE message sent by the access device, the intermediate device can update the path information in the GRE message to obtain the GRE message with updated path information. The method for updating the path information is a method for superimposing the unique device number of each device to obtain a series of path information as described in the above embodiment, that is, adding local device information to the path information in the GRE message to obtain the GRE message after updating the path information, and therefore, details are not described here again.
After updating the path information, the intermediate device may send the GRE packet after updating the path information to the intermediate device of the next hop, and the intermediate device of the next hop repeatedly executes the above steps S310 to S302; the GRE message after updating the path information can also be sent to the aggregation device, so that the aggregation device can acquire the acquisition data corresponding to the uplink message according to the GRE message after updating the path information.
In the above scheme, after receiving the GRE packet, the intermediate device may add local device information to the path information to update the path information, so that the aggregation device may identify the source and the path of the acquired traffic.
Referring to fig. 4, fig. 4 is a flowchart of a data acquisition method applied to a convergence device according to an embodiment of the present application, where the data acquisition method includes the following steps:
step S401: and the convergence equipment receives the GRE message from the access equipment, which is sent by the intermediate equipment.
Step S402: the convergence equipment decapsulates the GRE message to obtain an original uplink message after decapsulation, and performs data acquisition on the original uplink message after decapsulation to obtain acquisition data corresponding to the GRE message.
After receiving the GRE message forwarded by the intermediate device, the convergence device may decapsulate the GRE message to obtain the original uplink message information, and extract the access device information and the path information in the original uplink message. The path information corresponds to the path transmitted by the GRE message through updating of each device in the transmission path, and therefore, the aggregation device can acquire the information of the access device corresponding to the uplink message and the path information.
After the step S402, the data acquisition method provided in the embodiment of the present application may further include the following steps:
the convergence device calculates a corresponding hash value according to the quintuple of the original uplink message, and establishes a hash table according to the hash value.
When the convergence device decapsulates the GRE packet, it may also extract the quintuple corresponding to the original uplink packet, and calculate the unique hash value corresponding to the original uplink packet by using the extracted quintuple. By adding the hash value and the corresponding uplink traffic into the hash table, the mapping relationship between the hash value and the uplink packet can be obtained. The hash table may further record information, path information, and traffic information of the corresponding access device, where the traffic information includes data such as the size of the message traffic and the number of the messages, and this is not specifically limited in this embodiment of the present application.
After the hash table is established, the data acquisition method provided by the embodiment of the application may further include the following steps:
firstly, the convergence device receives a downlink message.
And secondly, the convergence equipment determines an uplink message corresponding to the downlink message according to the quintuple of the downlink message and the hash table.
And thirdly, the convergence equipment sends corresponding uplink message, downlink message and collected data to the server.
After receiving the downlink message, the aggregation device may extract the quintuple of the downlink message and calculate the hash value using the reverse quintuple of the downlink message. The reverse quintuple of the downlink message quintuple refers to source IP address and destination IP address exchange, and source port and destination port exchange, so that the hash value calculated by the reverse quintuple and the hash value calculated by the corresponding uplink message quintuple should be the same, and therefore, the hash value calculated by the reverse quintuple can be used for searching in a hash table established in advance to determine the uplink message corresponding to the downlink message, and information and path information of the access device of the uplink message.
The aggregation device may report the collected data to the server, including: uplink message, downlink message, quintuple, information of access equipment and path information.
In the above scheme, the GRE packet received by the aggregation device includes information characterizing an access device that sends the GRE packet, and also includes path information and traffic information characterizing a network path through which the uplink packet passes. Therefore, the convergence device can identify the source and the path of the collected traffic after decapsulating the GRE message. After receiving the downlink message, the convergence device may extract the quintuple of the downlink message, calculate a hash value according to the quintuple of the downlink message after the source and destination exchange, and then determine an uplink message corresponding to the downlink message from the hash table according to the hash value obtained by calculation. Therefore, after receiving the downlink message, the aggregation device can directly find the corresponding uplink message through the mapping relation of the hash value, and the calculation amount of the aggregation device is reduced.
After receiving the collected data reported by the aggregation device, the server may analyze the source information and the path information in the collected data, respectively. Analyzing the source information, and determining the source equipment and the organization mechanism thereof according to the equipment information of each network equipment stored in advance; and analyzing the path information, and comparing the path information with path data stored in advance to acquire a path passed by the message. Therefore, the server acquires the information of the access device related to the message source and the path topology through which the message passes, and can perform subsequent analysis processing according to the information.
Referring to fig. 5, fig. 5 is a block diagram of a data acquisition device applied to a convergence device according to an embodiment of the present disclosure, where the data acquisition device 500 may include: a receiving module 501, configured to receive a GRE packet sent by an intermediate device and from an access device; a processing module 502, configured to decapsulate the GRE packet to obtain an original uplink packet after decapsulation, and perform data acquisition on the original uplink packet after decapsulation to obtain acquired data corresponding to the GRE packet; the collected data corresponding to the GRE message includes information characterizing the access device, path information characterizing the transmission path of the GRE message, and flow information, which are encapsulated in the original uplink message.
In the embodiment of the present application, the GRE message received by the aggregation device includes both information characterizing an access device that sends the GRE message and path information characterizing a network path through which the GRE message passes, so that the aggregation device can identify a source and a path of the acquired traffic after decapsulating the GRE message.
Further, the collected data further includes a quintuple of the uplink packet; the data acquisition device 500 further comprises: and the calculation module is used for calculating a corresponding hash value according to the quintuple of the original uplink message and establishing a hash table according to the hash value, wherein the hash table records the information of the access equipment, the path information and the flow information corresponding to the GRE message.
In this embodiment of the present application, after receiving the GRE packet corresponding to the original uplink packet, the aggregation device may extract the quintuple of the original uplink packet, calculate a unique hash value according to the quintuple of the original uplink packet, and store information, path information, and flow information of the access device corresponding to the GRE packet in the hash table.
Further, the data acquisition apparatus 500 further includes: a receiving module, configured to receive a downlink message; the determining module is used for determining an uplink message corresponding to the downlink message according to the quintuple of the downlink message and the hash table; and the collected data sending module is used for sending the corresponding uplink message, the downlink message and the collected data to a server.
In this embodiment, after receiving the downlink packet, the convergence device may extract a quintuple of the downlink packet, calculate a hash value according to the quintuple of the downlink packet after the source and destination exchange, and determine an uplink packet corresponding to the downlink packet from the hash table according to the calculated hash value. Therefore, after receiving the downlink message, the aggregation device can directly find the corresponding uplink message through the mapping relation of the hash value, and the calculation amount of the aggregation device is reduced.
Referring to fig. 6, fig. 6 is a block diagram of a data acquisition apparatus applied to an access device according to an embodiment of the present disclosure, where the data acquisition apparatus 600 may include: a receiving module 601, configured to receive an original uplink packet; an encapsulation module 602, configured to encapsulate, to the original uplink packet, information representing the access device and path information representing a packet transmission path, and then perform GRE encapsulation to obtain a GRE packet; the path information comprises equipment information corresponding to equipment through which the message is transmitted; a sending module 603, configured to send the GRE packet to an intermediate device, so that the intermediate device updates the path information in the GRE packet, and sends the GRE packet after updating the path information to a convergence device, where the convergence device acquires acquisition data corresponding to the GRE packet according to the GRE packet after updating the path information.
In this embodiment of the present application, after receiving an original uplink packet, an access device may perform GRE encapsulation on the original uplink packet, where before the GRE encapsulation, information of the access device and path information may be added to a header of the original uplink packet, so that an intermediate device may update the path information and an aggregation device may identify a source and a path of an acquired traffic.
Referring to fig. 7, fig. 7 is a block diagram of a data acquisition apparatus applied to an intermediate device according to an embodiment of the present disclosure, where the data acquisition apparatus 700 may include: a receiving module 701, configured to receive a GRE packet sent by an access device or an intermediate device; the GRE message encapsulates information representing access equipment for sending the GRE message and path information representing a message transmission path, wherein the path information comprises equipment information corresponding to equipment through which the message is transmitted; an updating module 702, configured to add local device information to the path information in the GRE message, to obtain the GRE message after updating the path information; a sending module 703 is configured to send the GRE packet after the path information is updated to another intermediate device or an aggregation device, so that the aggregation device collects, according to the GRE packet after the path information is updated, acquisition data corresponding to the GRE packet.
In the embodiment of the present application, after receiving the GRE packet, the intermediate device may add local device information to the path information to update the path information, so that the aggregation device may identify a source and a path of the acquired traffic.
Referring to fig. 8, fig. 8 is a block diagram of an electronic device according to an embodiment of the present disclosure, where the electronic device 800 includes: at least one processor 801, at least one communication interface 802, at least one memory 803, and at least one communication bus 804. Wherein the communication bus 804 is used for implementing direct connection communication of these components, the communication interface 802 is used for communicating signaling or data with other node devices, and the memory 803 stores machine readable instructions executable by the processor 801. When the electronic device 800 is in operation, the processor 801 communicates with the memory 803 via the communication bus 804, and the machine-readable instructions, when invoked by the processor 801, perform the data collection methods described above.
For example, the processor 801 of the embodiment of the present application may read the computer program from the memory 803 through the communication bus 804 and execute the computer program to implement the following method: receiving a GRE message from access equipment, which is sent by intermediate equipment; decapsulating the GRE message to obtain an original uplink message after decapsulation, and performing data acquisition on the original uplink message after decapsulation to obtain acquisition data corresponding to the GRE message; the collected data corresponding to the GRE message includes information characterizing the access device and path information characterizing the transmission path of the GRE message, which are encapsulated in the original uplink message. In some examples, the processor 801 may also perform the following steps: receiving an original uplink message; encapsulating information representing the access equipment and path information representing a message transmission path for the original uplink message, and then performing GRE encapsulation to obtain a GRE message; the path information comprises equipment information corresponding to equipment through which the message is transmitted; and sending the GRE message to an intermediate device so that the intermediate device updates the path information in the GRE message, and sending the GRE message after updating the path information to a convergence device, wherein the convergence device acquires acquisition data corresponding to the GRE message according to the GRE message after updating the path information.
The processor 801 may be an integrated circuit chip having signal processing capabilities. The Processor 801 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. Which may implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory 803 may include, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Read Only Memory (EPROM), an electrically Erasable Read Only Memory (EEPROM), and the like.
It will be appreciated that the configuration shown in fig. 8 is merely illustrative and that electronic device 800 may include more or fewer components than shown in fig. 8 or have a different configuration than shown in fig. 8. The components shown in fig. 8 may be implemented in hardware, software, or a combination thereof. In this embodiment, the electronic device 800 may be, but is not limited to, an entity device such as a desktop, a laptop, a smart phone, an intelligent wearable device, and a vehicle-mounted device, and may also be a virtual device such as a virtual machine. In addition, the electronic device 800 is not necessarily a single device, but may also be a combination of multiple devices, such as a server cluster, and the like. In this embodiment of the present application, the access device, the intermediate device, and the aggregation device in the data acquisition method may all be implemented by the electronic device 800 shown in fig. 8.
Embodiments of the present application further provide a computer program product, including a computer program stored on a non-transitory computer readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the steps of the data acquisition method in the foregoing embodiments, for example, including: step S201: the access device receives the original uplink message. Step S202: and the access equipment encapsulates the information of the access equipment represented by the original uplink message and the path information of the transmission path of the represented message, and then performs GRE encapsulation to obtain a GRE message. Step S203: the access device sends GRE message to the intermediate device.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A data acquisition method is applied to convergence equipment and comprises the following steps:
receiving a GRE message from access equipment, which is sent by intermediate equipment;
decapsulating the GRE message to obtain an original uplink message after decapsulation, and performing data acquisition on the original uplink message after decapsulation to obtain acquisition data corresponding to the GRE message;
the collected data corresponding to the GRE message includes information characterizing the access device, path information characterizing the transmission path of the GRE message, and flow information, which are encapsulated in the original uplink message.
2. The data collection method of claim 1, wherein the collected data further comprises a quintuple of the original uplink packet;
after the data acquisition is performed on the decapsulated original uplink packet to obtain the acquired data corresponding to the GRE packet, the method further includes:
and calculating a corresponding hash value according to the quintuple of the original uplink message, and establishing a hash table according to the hash value, wherein the hash table records the information of the access equipment, the path information and the flow information corresponding to the GRE message.
3. The data collection method of claim 2, wherein after said building a hash table from said hash values, said method further comprises:
receiving a downlink message;
determining an uplink message corresponding to the downlink message according to the quintuple of the downlink message and the hash table;
and sending the corresponding uplink message, the downlink message and the acquired data to a server.
4. A data acquisition method is applied to access equipment and comprises the following steps:
receiving an original uplink message;
encapsulating information representing the access equipment and path information representing a message transmission path for the original uplink message, and then performing GRE encapsulation to obtain a GRE message; the path information comprises equipment information corresponding to equipment through which the message is transmitted;
and sending the GRE message to an intermediate device so that the intermediate device updates the path information in the GRE message, and sending the GRE message after updating the path information to a convergence device, wherein the convergence device acquires acquisition data corresponding to the GRE message according to the GRE message after updating the path information.
5. A data acquisition method is applied to intermediate equipment and comprises the following steps:
receiving a GRE message sent by access equipment or intermediate equipment; the GRE message encapsulates information representing access equipment for sending the GRE message and path information representing a message transmission path, wherein the path information comprises equipment information corresponding to equipment through which the message is transmitted;
adding local equipment information to the path information in the GRE message to obtain the GRE message after updating the path information;
and sending the GRE message after the path information is updated to another intermediate device or convergence device, so that the convergence device acquires the acquisition data corresponding to the GRE message according to the GRE message after the path information is updated.
6. A data acquisition device, applied to a convergence device, comprising:
the receiving module is used for receiving a GRE message from the access equipment, which is sent by the intermediate equipment;
the processing module is used for decapsulating the GRE message to obtain an original uplink message after decapsulation, and performing data acquisition on the original uplink message after decapsulation to obtain acquisition data corresponding to the GRE message; the collected data corresponding to the GRE message includes information characterizing the access device, path information characterizing the transmission path of the GRE message, and flow information, which are encapsulated in the original uplink message.
7. A data acquisition device, applied to an access device, comprising:
a receiving module, configured to receive an original uplink packet;
an encapsulation module, configured to encapsulate, on the original uplink packet, information characterizing the access device and path information characterizing a packet transmission path, and then perform GRE encapsulation to obtain a GRE packet; the path information comprises equipment information corresponding to equipment through which the message is transmitted;
and the sending module is used for sending the GRE message to intermediate equipment so that the intermediate equipment updates the path information in the GRE message and sends the GRE message after updating the path information to convergence equipment, and the convergence equipment acquires acquisition data corresponding to the GRE message according to the GRE message after updating the path information.
8. A data acquisition device, applied to an intermediate device, comprising:
the receiving module is used for receiving the GRE message sent by the access equipment or the intermediate equipment; the GRE message encapsulates information representing access equipment for sending the GRE message and path information representing a message transmission path, wherein the path information comprises equipment information corresponding to equipment through which the message is transmitted;
the updating module is used for adding local equipment information in the path information in the GRE message to obtain the GRE message after updating the path information;
and the sending module is used for sending the GRE message after the path information is updated to another intermediate device or the convergence device so that the convergence device collects the collected data corresponding to the GRE message according to the GRE message after the path information is updated.
9. An electronic device, comprising: a processor, a memory, and a bus;
the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the data acquisition method of any one of claims 1-5.
10. A non-transitory computer-readable storage medium storing computer instructions which, when executed by a computer, cause the computer to perform the data acquisition method of any one of claims 1-5.
CN202011611203.6A 2020-12-29 2020-12-29 Data acquisition method and device Pending CN112822123A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011611203.6A CN112822123A (en) 2020-12-29 2020-12-29 Data acquisition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011611203.6A CN112822123A (en) 2020-12-29 2020-12-29 Data acquisition method and device

Publications (1)

Publication Number Publication Date
CN112822123A true CN112822123A (en) 2021-05-18

Family

ID=75855514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011611203.6A Pending CN112822123A (en) 2020-12-29 2020-12-29 Data acquisition method and device

Country Status (1)

Country Link
CN (1) CN112822123A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726635A (en) * 2021-08-30 2021-11-30 新华三大数据技术有限公司 Message processing method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355505A (en) * 2008-09-12 2009-01-28 成都市华为赛门铁克科技有限公司 Method, apparatus and system for forwarding packet
CN101848171A (en) * 2010-07-01 2010-09-29 杭州华三通信技术有限公司 Data transmission method based on GRE tunnel, device and system
CN105591909A (en) * 2015-10-21 2016-05-18 杭州华三通信技术有限公司 Method and device for improvement of message forwarding performance
CN107566272A (en) * 2017-10-17 2018-01-09 新华三技术有限公司 Forward table method for building up and data forwarding method
CN109246017A (en) * 2018-11-28 2019-01-18 新华三技术有限公司 A kind of method and device for inquiring multicast forwarding path
CN109495385A (en) * 2018-12-04 2019-03-19 安徽皖兴通信息技术有限公司 A kind of network flow dispatching method for realizing discontinuous Segment routing domain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355505A (en) * 2008-09-12 2009-01-28 成都市华为赛门铁克科技有限公司 Method, apparatus and system for forwarding packet
CN101848171A (en) * 2010-07-01 2010-09-29 杭州华三通信技术有限公司 Data transmission method based on GRE tunnel, device and system
CN105591909A (en) * 2015-10-21 2016-05-18 杭州华三通信技术有限公司 Method and device for improvement of message forwarding performance
CN107566272A (en) * 2017-10-17 2018-01-09 新华三技术有限公司 Forward table method for building up and data forwarding method
CN109246017A (en) * 2018-11-28 2019-01-18 新华三技术有限公司 A kind of method and device for inquiring multicast forwarding path
CN109495385A (en) * 2018-12-04 2019-03-19 安徽皖兴通信息技术有限公司 A kind of network flow dispatching method for realizing discontinuous Segment routing domain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726635A (en) * 2021-08-30 2021-11-30 新华三大数据技术有限公司 Message processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US11792100B2 (en) Network performance parameter sending method, network performance calculation method, and network node
CN108293022B (en) Method, device and system for transmitting message
CN109547349B (en) Virtual routing-based traffic management method, device, terminal and storage medium
CN112702330B (en) Lightweight in-band network telemetry method and device for Overlay network and storage medium
CN104506408A (en) Data transmission method and device based on SDN
CN112039796B (en) Data packet transmission method and device, storage medium and electronic equipment
US20180198643A1 (en) Packet transmission method and apparatus
CN110213148B (en) Data transmission method, system and device
CN112583745A (en) Method, equipment and system for forwarding message in SR network
CN104283891A (en) Method and device for access of service function node to service link network
CN113783789B (en) Message speed limiting method and device
CN111026324B (en) Updating method and device of forwarding table entry
CN112822123A (en) Data acquisition method and device
US8855015B2 (en) Techniques for generic pruning in a trill network
CN113765800A (en) Method, device, system, equipment and readable storage medium for transmitting message
CN115225634B (en) Data forwarding method, device and computer program product under virtual network
US11811654B2 (en) Packet processing method and apparatus
CN111147379A (en) Data transmission method, system and related equipment
CN112866208B (en) Table item configuration method, message processing method, device, equipment and storage medium
CN107241236B (en) Forwarding information base table item detection method, detection equipment and network equipment
CN114553707B (en) Method and device for generating topology information of network and delimiting network faults
CN112242943B (en) IPSec tunnel establishment method and device, branch equipment and center-end equipment
CN109995606B (en) Virtualization deep packet inspection vDPI flow control method and network element equipment
CN115473765A (en) Message transmission method, device and system
CN115150308B (en) Flow statistics method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210518

RJ01 Rejection of invention patent application after publication