Cloud network data packet capture analysis method and related equipment
By using dyeing rules and mirror packet technology in the cloud network, combined with the packet capture packet processing service deployed by bypass, the device load problem caused by data packet capture in the cloud network is solved, and efficient data packet identification and positioning is achieved. Improves the performance and stability of network equipment.
Patent Information
- Application Number
- CN202411535587.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2024-11-29
AI Technical Summary
The existing data packet capture method in cloud networks leads to an increase in the operating load of network equipment, affecting data transmission performance and stability.
The network controller issues dyeing rules to the starting network device on the target network link, generates mirror packets with dyeing marks, and deploys packet capture packet processing services on the bypass of the network device to achieve efficient identification of data packets and position.
It reduces the performance overhead of network equipment, reduces operating load, supports long-term packet capture, improves data transmission performance and operation stability, and is suitable for analysis of low-frequency packet loss problems.
Smart Images

Figure CN119052138A_ABST
Abstract
Description
Technical Field
[0001] The disclosed embodiments relate to the field of cloud computing and cloud network technology, and more particularly to a cloud network data packet capture and analysis method and related equipment. Background Art
[0002] Currently, in the application scenarios of cloud networks, cloud network operators will provide corresponding services to users who rent virtual network devices (hereinafter referred to as users), including data packet capture services for locating network problems. That is, when the applications and services built by users through the rented virtual network devices have abnormalities, the problem can be located by capturing the data packets transmitted through the network devices.
[0003] In the prior art, in order to realize data packet capture, it is necessary to configure corresponding packet capture rules for network devices in the traffic link. After that, when the network device receives the data packet, it identifies it through the packet capture rule and completes the data capture after hitting the rule. However, this solution will increase the operating load of the network device, affecting the data transmission performance and operation stability. Summary of the invention
[0004] The disclosed embodiments provide a cloud network data packet capture and analysis method and related equipment to overcome the problem that the operating load of network equipment increases, affecting data transmission performance and operating stability.
[0005] In a first aspect, an embodiment of the present disclosure provides a cloud network data packet capture and analysis method, comprising:
[0006] Sending a coloring rule to the starting network device on the target network link through the network controller, wherein the coloring rule is used to indicate coloring of the target data packet and triggering the network device to synchronously perform packet capture processing based on the mirror message through the coloring identifier;
[0007] Generate a mirror message for the hit target data packet based on the coloring rule through the starting network device and report it to the packet capture message processing service, and generate a colored message carrying a coloring mark for the target data packet, and forward the colored message carrying the coloring mark to the downstream network device; and
[0008] The coloring identifier is used to instruct other network devices on the target network link to generate corresponding mirror messages for the received colored messages and report them to the packet capture message processing service; wherein the packet capture message processing service is deployed in a bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each of the network devices.
[0009] In a second aspect, an embodiment of the present disclosure provides a cloud network data packet capture and analysis device, comprising:
[0010] A sending module, used for sending a coloring rule to a starting network device on a target network link through a network controller, wherein the coloring rule is used for indicating coloring of a target data packet and triggering the network device to synchronously perform packet capture processing based on a mirror message through a coloring identifier;
[0011] A processing module, used to generate a mirror message for the hit target data packet based on the coloring rule through the starting network device and report it to the packet capture message processing service, and to color the target data packet to generate a colored message carrying a coloring mark, and forward the colored message carrying the coloring mark to the downstream network device;
[0012] A transmission module is used to instruct other network devices on the target network link to generate corresponding mirror messages for the received colored messages through the coloring identifier and report them to the packet capture message processing service; wherein the packet capture message processing service is deployed in a bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each of the network devices.
[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0014] The memory stores computer-executable instructions;
[0015] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud network data packet capture and analysis method described in the first aspect and various possible designs of the first aspect.
[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the cloud network data packet capture and analysis method described in the first aspect and various possible designs of the first aspect is implemented.
[0017] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the cloud network data packet capture and analysis method described in the first aspect and various possible designs of the first aspect.
[0018] The present embodiment provides a cloud network data packet capture and analysis method and related equipment, which sends a coloring rule to the starting network device on the target network link through a network controller, wherein the coloring rule is used to instruct the coloring of the target data packet and trigger the network device to synchronously perform packet capture processing based on the mirror message through the coloring mark; the starting network device generates a mirror message for the hit target data packet based on the coloring rule and reports it to the packet capture message processing service, and generates a colored message carrying the coloring mark for the target data packet, and forwards the colored message carrying the coloring mark to the downstream network device; and, instructs other network devices on the target network link to generate corresponding mirror messages for the received colored messages through the coloring mark and report them to the packet capture message processing service; wherein the packet capture message processing service is deployed in a bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each of the network devices. The network controller sends the coloring rules to the starting network device on the target network link to complete the coloring of the target data packet at the starting network device, and forward the colored message to other downstream network devices. After that, after the downstream network device receives the colored message, it generates the corresponding mirror message and sends it to the packet capture message processing service deployed in the bypass to complete the data capture process. Since the identification of colored messages is more direct and efficient, and there is no need to perform the message identification task by the network device, it can greatly reduce the performance overhead of the network device and reduce the operating load, thereby realizing the normalization of the data capture task, supporting very long-term packet capture, which is conducive to the analysis of low-frequency occasional packet loss problems and improving the data transmission performance and operating stability of network devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 An application scenario diagram of the cloud network data packet capture and analysis method provided by the embodiment of the present disclosure;
[0021] Figure 2 Schematic diagram of the process of cloud network data packet capture and analysis method provided in the embodiment of the present disclosure Figure 1 ;
[0022] Figure 3 for Figure 2 A flowchart of a specific implementation method of step S101 in the illustrated embodiment;
[0023] Figure 4A schematic diagram of a process of capturing data packets by coloring packets provided in an embodiment of the present disclosure;
[0024] Figure 5 Schematic diagram of the process of cloud network data packet capture and analysis method provided in the embodiment of the present disclosure Figure 2 ;
[0025] Figure 6 for Figure 5 A flowchart of a specific implementation method of step S204 in the illustrated embodiment;
[0026] Figure 7 for Figure 5 A flowchart of a specific implementation method of step S200A in the illustrated embodiment;
[0027] Figure 8 A structural block diagram of a cloud network data packet capture and analysis device provided in an embodiment of the present disclosure;
[0028] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;
[0029] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0031] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0032] The application scenarios of the embodiments of the present disclosure are explained below:
[0033] Figure 1An application scenario diagram of the cloud network data packet capture and analysis method provided in the embodiment of the present disclosure. The cloud network data packet capture and analysis method provided in the embodiment of the present disclosure can be applied to the application scenario of network device detection in the cloud network. More specifically, it can be applied to the process of capturing data packets passing through the network device. The execution subject of this embodiment can be a server or other electronic device in the cloud network for performing the above tasks, and the above execution subject can be a virtual device or a physical device. Among them, taking the server as an example, in some embodiments, the above server can implement the cloud network data packet capture and analysis method provided in the embodiment of the present application by running various computer executable instructions or computer programs. For example, the computer executable instructions can be program-level commands, machine instructions or software instructions. The computer program can be a native program or software module in the operating system; it can be a local application, that is, a program that needs to be installed in the operating system to run, or it can be a program running based on a browser environment. In summary, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form, and the specific implementation form can be configured as needed. Furthermore, in some embodiments, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud storage, cloud communications, cloud databases, cloud computing, cloud functions, network services, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, among which cloud services may be interactive processing services for terminal devices to call.
[0034] refer to Figure 1As shown in the figure, between the target user's computing node P0 and the Internet Service Provider (ISP), it is necessary to forward through three virtual network devices P1, P2 and P3 in sequence. For example, the above P1, P2 and P3 are used to implement the functions of the Next Generation Gateway (NGW), the Virtual Private Network Gateway (VPC Gateway, XGW) and the Internet Gateway (Internet Gateway, IGW), respectively. In the prior art, when it is necessary to capture data packets transmitted from the computing node to the ISP via the virtual network devices P1, P2 and P3, it is usually necessary to additionally deploy a control server in the cloud network to configure the above virtual network devices P1, P2 and P3, respectively, so that each virtual network device can identify the data packet sent from the computing node P0 of the target user, and then complete the packet capture. However, since the header information of the message will change during the processing of the message by the virtual network device, it is difficult to determine the identification rules of the target message after the conversion by the network device, which leads to problems such as low efficiency of the network device in identifying the target message and high performance resource overhead.
[0035] The disclosed embodiment provides a cloud network data packet capture and analysis method to solve the above-mentioned problem.
[0036] refer to Figure 2 , Figure 2 Schematic diagram of the process of cloud network data packet capture and analysis method provided in the embodiment of the present disclosure Figure 1 The method of this embodiment can be applied in a server. The cloud network data packet capture and analysis method includes:
[0037] Step S101: sending a coloring rule to an initial network device on a target network link through a network controller, wherein the coloring rule is used to indicate coloring of a target data packet and trigger the network device to synchronously perform packet capture processing based on a mirror message through a coloring identifier.
[0038] Step S102: Generate a mirror message for the hit target data packet based on the coloring rule through the starting network device and report it to the packet capture message processing service, and color the target data packet to generate a colored message carrying a coloring identifier, and forward the colored message carrying the coloring identifier to the downstream network device.
[0039] Step S103: Instruct other network devices on the target network link through the coloring identifier to generate corresponding mirror messages for the received colored messages and report them to the packet capture message processing service; wherein the packet capture message processing service is deployed in the bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each network device.
[0040] refer to Figure 1 The schematic diagram of the application scenario shown in the figure shows that, exemplarily, the network controller can execute the corresponding packet capture task by responding to the user's operation instructions, thereby starting to execute each step in the cloud network data packet capture and analysis method in the embodiment. Specifically, first, the network controller can respond to the operation instructions or preset program logic to send the coloring rules to the starting network device on the target network link. The coloring rules can be recorded in the control instructions or configuration files and sent to the starting network device. The starting network device is the first network device in the target network link. After receiving the data packet, the starting network device will forward the data packet to the downstream network device in the target network link, so that the data packet reaches the target network device and is consumed.
[0041] After that, the starting network device will configure itself based on the dyeing rule after receiving it. The dyeing rule is the rule for identifying data packets. When the starting network device receives the data packet, it will identify the data packet according to the dyeing rule. If it matches the target data packet that meets the dyeing rule, the network device will generate a mirror message and report it to the packet capture message processing service. At the same time, it will dye the target data packet and generate a dyed message with a dyeing identifier. After that, the dyed message will be forwarded to the downstream network device.
[0042] On the other hand, when other network devices on the target network link receive dyed messages, specifically, when they identify the dyeing mark, they generate corresponding mirror messages for the received dyed messages and report them to the packet capture message processing service, wherein the packet capture message processing service is deployed in the bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each network device. In short, the packet capture message processing service is a service with computing power, which is used to determine the abnormal network devices in the target network link based on the mirror messages reported by each network device. By placing the steps of executing the packet capture processing on the side of the packet capture message processing service, the resource overhead of the network device can be reduced, the operating load can be reduced, and the normalization of the data packet capture task can be realized, which supports very long-term packet capture, is conducive to the analysis of low-frequency occasional packet loss problems, and improves the data transmission performance and operating stability of the network device.
[0043] Furthermore, in a possible implementation, the specific implementation method of generating a mirror message for a hit target data packet based on a dyeing rule by a starting network device includes: adding device information of the starting network device to the first message header field of the target data packet, generating a mirror message of the starting network device, and the device information is used to characterize the network device currently receiving the data packet. Correspondingly, the specific implementation steps of dyeing the target data packet to generate a dyed message carrying a dyeing identifier include: adding a dyeing identifier characterizing the target data packet to the second message header field of the target data packet, generating a dyed message.
[0044] Among them, the mirror message is the result obtained by copying the target data packet based on the mirroring technology. The mirror message contains the device information of the device node. For example, the mirror message generated by the starting network device contains the device information of the starting network device, so that the packet capture message processing service that processes the mirror message can identify the device that generates the mirror message; similarly, the mirror message generated by other downstream network devices contains the device information of the corresponding network device. The above-mentioned mirror message is generated by copying the target data packet and adding the device information to the first message header field of the copied data. By adding a coloring mark that represents the target data packet to the second message header field of the target data packet, the coloring of the target data packet is realized, and a colored message corresponding to the target data packet is generated.
[0045] When other network devices on the target network link receive a dyed message, in a possible implementation method, the dyeing identifier is used to instruct other network devices on the target network link to generate a corresponding mirror message for the received dyed message and report it to the packet capture message processing service. The specific implementation method includes: each network device, after receiving the data packet sent by the upstream network device, parses the data packet; if the field content of the second message header field of the data packet is the dyeing identifier, the data packet is determined to be a dyed message, and a corresponding mirror message is generated, and reported to the packet capture message processing service.
[0046] Further, optionally, in this embodiment, before step S101 is performed, the following steps are further included:
[0047] Step S100: Determine the target network link.
[0048] Exemplarily, the target network link includes at least two network devices, the network devices correspond to virtual network devices or physical network devices in the cloud network, and based on the specific implementation method, the target network link is used to forward data packets in sequence through the network devices, thereby providing network services for target users, such as Figure 1 The network link is formed by the computing node to the Internet service provider node. Through the above network link, the computing node can provide computing services to the outside through the Internet.
[0049] Furthermore, there are many ways to determine the target network link. For example, the network controller runs a control platform software. The user accesses the control platform software and inputs the identifiers of multiple network devices to be detected, such as the unique number of the network device. After that, the network controller constructs the corresponding network link according to the unique number of the received network device, thereby determining the target network link list and executing subsequent steps. In another possible implementation, Figure 3 As shown, the specific implementation of step S100 includes:
[0050] Step S1001: obtaining a detection request sent by a target user, where the detection request is used to indicate a target service object rented by the target user;
[0051] Step S1002: determining, according to the detection request, a plurality of network devices implementing the target service object and a data forwarding logic between the plurality of network devices;
[0052] Step S1003: Obtain a target network link according to the multiple network devices and the data forwarding logic between the multiple network devices.
[0053] Specifically, for example, a user sends a detection request by accessing the control platform software, and the detection request contains the target service object indicated by the user and needs to be detected, for example, for the application APP_1 implemented based on the cloud service. After that, the network controller parses the detection request, obtains the identification corresponding to the target service object, and determines the network devices created and configured in the cloud network to implement the application APP_1 by searching the corresponding configuration table data, including virtual network devices and physical network devices, and the data forwarding logic between each network device. Among them, exemplarily, the configuration table data can be a global data table, which records the service objects registered in the entire cloud network, and the network resources corresponding to the service objects, such as virtual network cards, virtual gateways, etc. After the identification of the active target object service, by querying the above configuration table data, the corresponding multiple network devices of the target service object and the data forwarding logic between the multiple network devices can be obtained. Finally, based on the multiple network devices and the data forwarding logic between the multiple network devices, the corresponding network link, i.e., the target network link, is generated.
[0054] Furthermore, a network link (such as a target network link) may be composed of multiple network devices. A network device is a type of structured data. Within the network device, at least the configuration information of the corresponding network device and the identifier of the next-hop network device are recorded. Through the collection of the above-mentioned multiple network devices, some or all of the network devices through which a data packet passes when transmitted from a source address (source port) to a destination address (destination port) can be represented.
[0055] The above steps are introduced below with a more specific embodiment. For example, the identification of the starting network device is recorded in the network link. When the network link receives the target data packet, it will first be processed by the starting network device, that is, the target data packet will first be sent to the starting network device (that is, the starting network device receives the target data packet), and the starting network device will process it. After that, the starting network device will forward the processed message to the next downstream network device. Specifically, after the starting network device of the target network link receives the target data packet, it generates a colored message corresponding to the target data packet. The colored message is a target data packet with a colored identification. Specifically, the coloring of the target data packet is achieved by writing a specific colored identification into a specific header field of the target data packet. Afterwards, the dyed message is forwarded to the downstream nodes in the target network link in sequence. After receiving any message, the downstream network device will first read the specific header field of the message, and judge whether the received message is a dyed message based on the field content of the specific header field. If the field content of the specific header field meets the preset judgment rule, for example, the field content of the specific header field includes the user ID of the target user, it is identified as a dyed message and the subsequent steps are executed; on the contrary, if the field content of the specific header field does not meet the preset judgment rule, it is processed through the conventional forwarding process. Therefore, after receiving the dyed message, the downstream network device can quickly identify the dyed message as the (processed) target data packet through the dyeing identifier, without the need for detailed analysis and judgment based on the message content, thereby improving the efficiency of the network device in identifying the target data packet and reducing the difficulty of identification and performance overhead.
[0056] After that, when the downstream network device receives the dyed message, on the one hand, it will continue to forward the dyed message downstream, and on the other hand, it will trigger the message replication operation to generate a mirror message, which contains the above-mentioned target data packet and the node identifier (i.e., device information) of the network device that currently forwards the target data packet, and sends the mirror message to the packet capture message processing service to achieve the purpose of packet capture. Based on the above process, after the last network device in the target network link receives the dyed message, generates and uploads the corresponding mirror message, the task process of full-link node packet capture for the target network link is completed. In this process, except for the starting network device, the remaining network devices in the target network link all identify the target data packet through the dyeing information, so there is no need to configure the corresponding identification rules for it, which greatly improves the identification efficiency and accuracy, reduces the performance overhead, and enables the entire data packet capture task to be completed quickly and at low cost.
[0057] Figure 4 A schematic diagram of a process of capturing data packets by coloring packets provided by an embodiment of the present disclosure, such as Figure 4 As shown, the target network link includes network devices P(0), P(1), P(2) to P(n), wherein network device P(0) is the starting network device of the target network link. The network device receives and processes data packets from different users and services. When network device P(0) receives data packet D(0), it identifies data packet D(0) according to a preset identification rule, and after determining that data packet D(0) is the target data packet, it dyes the data packet to generate a corresponding dyed message rD(0), and sends the dyed message rD(0) to the downstream network device P(1). At the same time, it generates a mirror message mD(0) and sends the mirror message mD(0) to the packet capture message processing service for processing. Afterwards, similarly, the downstream network device P(1) will also receive and process service messages of different users and different services. When the network device P(1) identifies the colored message rD(0), it will trigger the action of generating a mirror message, thereby generating a colored message rD(1) and a mirror message mD(1) corresponding to the network device P(1). Afterwards, the network device P(1) will send the colored message rD(1) to the downstream network device P(2), and send the mirror message mD(1) to the packet capture message processing service for processing; afterward, similarly, the next network device P(2) will perform similar actions as the network device P(1), until the colored message rD(n-1) is transmitted to the last network device P(n) in the target network link, and the network device P(n) will generate the corresponding mirror message mD(n) and send it to the packet capture message processing service, thereby completing the full-link data capture for the target network link.
[0058] In this embodiment, a coloring rule is issued to the starting network device on the target network link through a network controller, and the coloring rule is used to instruct the target data packet to be colored and trigger the network device to synchronously perform packet capture processing based on the mirror message through the coloring identifier; the starting network device generates a mirror message for the hit target data packet based on the coloring rule and reports it to the packet capture message processing service, and generates a colored message carrying the coloring identifier for the target data packet, and forwards the colored message carrying the coloring identifier to the downstream network device; and, the coloring identifier is used to instruct other network devices on the target network link to generate corresponding mirror messages for the received colored messages and report them to the packet capture message processing service; wherein, the packet capture message processing service is deployed in a bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each network device. The network controller sends the coloring rules to the starting network device on the target network link to complete the coloring of the target data packet at the starting network device, and forward the colored message to other downstream network devices. After that, after the downstream network device receives the colored message, it generates the corresponding mirror message and sends it to the packet capture message processing service deployed in the bypass to complete the data capture process. Since the identification of colored messages is more direct and efficient, and there is no need to perform the message identification task by the network device, it can greatly reduce the performance overhead of the network device and reduce the operating load, thereby realizing the normalization of the data capture task, supporting very long-term packet capture, which is conducive to the analysis of low-frequency occasional packet loss problems and improving the data transmission performance and operating stability of network devices.
[0059] refer to Figure 5 , Figure 5 Schematic diagram of the process of cloud network data packet capture and analysis method provided in the embodiment of the present disclosure Figure 2 In this embodiment Figure 2 On the basis of the illustrated embodiment, a step of configuring the packet capture message processing service is further added, and the cloud network data packet capture analysis method includes:
[0060] Step S200: determining a target network link, where the target network link includes at least two network devices, and the target network link is used to forward data packets in sequence through the network devices.
[0061] Step S201: sending a coloring rule to an initial network device on a target network link through a network controller, wherein the coloring rule is used to indicate coloring of a target data packet and trigger the network device to synchronously perform packet capture processing based on a mirror message through a coloring identifier.
[0062] Step S202: Instruct other network devices on the target network link through the coloring identifier to generate corresponding mirror messages for the received colored messages and report them to the packet capture message processing service; wherein the packet capture message processing service is deployed in the bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each network device.
[0063] Step S203: instructing other network devices on the target network link to generate corresponding mirror messages for the received colored messages through the colored identifier and report them to the packet capture message processing service;
[0064] Among them, the packet capture message processing service is deployed in the bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each network device. For example, in this embodiment, after determining the target network link, the network controller can send configuration information to the starting network device in the target network link in a direct or indirect manner, so as to achieve the purpose of issuing coloring rules. Specifically, by sending configuration information to the starting network device, the coloring rules of the starting network device for the target data packet are configured. After receiving the configuration information, the network device will identify the data packet based on the coloring rules described by the network device, thereby determining the target data packet that needs to be captured.
[0065] Furthermore, this embodiment also includes:
[0066] Step S204: Determine the available computing resources for the packet capture message processing service.
[0067] Step S205: deploying packet capture message processing services according to available computing resources.
[0068] Exemplarily, for the packet capture message processing service, it can be deployed in an independent functional network controller to perform the judgment step of the abnormal network device, or it can be deployed as a functional unit in the execution body of this embodiment. Since the process of judging the abnormal network device is executed in the packet capture message processing service, compared with the solution executed locally on the network device, it can effectively reduce the resource overhead of the network device and improve its data transmission performance. Furthermore, before the packet capture message processing service executes the above judgment step, the network controller can dynamically deploy the available computing resources of the packet capture message processing service, thereby realizing dynamic resource expansion or contraction of the packet capture message processing service, and further improving the resource utilization of the packet capture message processing service.
[0069] Exemplarily, the network controller can obtain the number of network devices and / or the message forwarding volume in the target network link, and determine the available computing resources of the packet capture message processing service based on the number of network devices and / or the message forwarding volume; wherein, the number of network devices in the target network link is a value determined based on the configuration table data, and when the number of network devices in the target network link is large, a larger available computing resource is allocated accordingly; otherwise, a smaller available computing resource is allocated. The network controller can obtain the message forwarding volume of the network device in the target network link by accessing the log of the network device, wherein the message forwarding volume can be the number of data packets forwarded by the network device per unit time; or it can be the total number of data packets forwarded by the network device in a specific time period. Similarly, for example, when the sum of the message forwarding volumes of each network device in the target network link is large, a larger available computing resource is allocated for the packet capture message processing service; otherwise, a smaller available computing resource is allocated for the packet capture message processing service.
[0070] In one possible implementation, Figure 6 As shown, the packet capture message processing service is deployed through a computing cluster, and the computing cluster supports elastic expansion and contraction. Exemplarily, the packet message processing service is implemented by a clustered data processing node, wherein the data processing node may have a functional unit of computing resources (data processing capability), which may be a physical computing unit or a virtual computing unit. The specific implementation of step S204 includes:
[0071] Step S2041: Obtain the number of network devices and / or message forwarding volume in the target network link;
[0072] Step S2042: Determine available computing resources for the packet capture message processing service according to the number of network devices and / or the message forwarding volume.
[0073] Based on the previous introduction, exemplarily, the network controller can determine a data volume level according to the number of network devices and / or the message forwarding volume in the target network link, and then map the data volume level to the number of corresponding data processing nodes to achieve the purpose of determining the available computing resources of the packet capture message processing service. Afterwards, exemplarily, the mirrored messages can be further evenly distributed to each data processing node through load balancing technology, thereby improving the data processing performance and computing resource utilization efficiency of the packet capture message processing service.
[0074] Exemplarily, in a possible implementation, before step S204, the following is further included:
[0075] Step S200A: configure the running time period corresponding to the packet capture task. Figure 7 As shown, the specific implementation of step S200A includes:
[0076] Step S200A-1: Determine a target data processing node in the computing cluster according to the corresponding running time period of the packet capture task, wherein the low load period of the target data processing node matches the running time period corresponding to the packet capture task.
[0077] Step S200A-2: Based on the target number of target data processing nodes, run the packet capture message processing service.
[0078] Exemplarily, based on the introduction in the previous embodiment, the cloud network data packet capture analysis method provided in this embodiment can be implemented in the process of executing the corresponding packet capture task by responding to the user's operation instruction. Therefore, before the steps of the above embodiment, it also includes a step of configuring the packet capture task. Specifically, the network controller configures the running time period corresponding to the packet capture task through user instructions or other program logic. Specifically, for example, in order to reduce the impact of normal business operation, the packet capture task is configured to be executed at 0:00-1:00 in the morning, and this time period is the corresponding running time period of the packet capture task. Afterwards, based on the corresponding running time period of the packet capture task, the target data processing node in the computing cluster is determined, wherein the low load period of the target data processing node matches the running time period corresponding to the packet capture task, that is, the data processing node with a lower load in the above period is determined as the target data processing node, and performs the subsequent task of receiving and processing the mirror message. Through the steps of this embodiment, the resource allocation of the data packet capture process is realized from the global level of the cloud network, further improving the effect of deploying the packet capture message processing service and improving resource utilization.
[0079] In this embodiment, the implementation method of steps S201-S203 is the same as that of the present disclosure. Figure 2 The implementation methods of steps S101-S103 in the illustrated embodiment are the same and will not be described in detail here.
[0080] Corresponding to the cloud network data packet capture and analysis method in the above embodiment, Figure 8 A structural block diagram of a cloud network data packet capture and analysis device provided in an embodiment of the present disclosure. The method described in the above embodiment can be executed by the cloud network data packet capture and analysis device, which can be implemented by software and / or hardware, and can be integrated in an electronic device with certain data processing functions. Among them, the electronic device can include but is not limited to mobile terminals with big data processing capabilities, as well as fixed terminals with big data processing capabilities such as desktop computers and supercomputers.
[0081] For the sake of convenience, only the parts related to the embodiments of the present disclosure are shown. Figure 8 , the cloud network data packet capture and analysis device 3 includes:
[0082] The sending module 31 is used to send the coloring rule to the starting network device on the target network link through the network controller, and the coloring rule is used to indicate that the target data packet is to be colored and trigger the network device to synchronously perform packet capture processing based on the mirror message through the coloring mark;
[0083] The processing module 32 is used to generate a mirror message for the hit target data packet based on the coloring rule through the starting network device and report it to the packet capture message processing service, and to color the target data packet to generate a colored message carrying a coloring mark, and forward the colored message carrying the coloring mark to the downstream network device;
[0084] The transmission module 33 is used to instruct other network devices on the target network link to generate corresponding mirror messages for the received colored messages through the coloring identifier and report them to the packet capture message processing service; wherein the packet capture message processing service is deployed in the bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each network device.
[0085] According to one or more embodiments of the present disclosure, when the processing module 32 generates a mirror message for a hit target data packet based on a coloring rule through a starting network device, the processing module 32 is specifically used to: add device information of the starting network device in the first message header field of the target data packet to generate a mirror message of the starting network device, and the device information is used to characterize the network device that currently receives the data packet; when the processing module 32 performs coloring on the target data packet to generate a colored message carrying a coloring identifier, the processing module 32 is specifically used to: add a coloring identifier that characterizes the target data packet in the second message header field of the target data packet to generate a colored message.
[0086] According to one or more embodiments of the present disclosure, when the transmission module 33 instructs other network devices on the target network link to generate a corresponding mirror message for the received colored message through the coloring identifier and reports it to the packet capture message processing service, it is specifically used to: parse the data packet sent by the upstream network device through each network device; if the field content of the second message header field of the data packet is the coloring identifier, the data packet is determined to be a colored message, and a corresponding mirror message is generated, and reported to the packet capture message processing service.
[0087] According to one or more embodiments of the present disclosure, the sending module 31 is also used to: obtain a detection request sent by a target user, the detection request is used to indicate a target service object rented by the target user; determine multiple network devices that implement the target service object and data forwarding logic between the multiple network devices based on the detection request; determine the target network link based on the multiple network devices and data forwarding logic between the multiple network devices.
[0088] According to one or more embodiments of the present disclosure, the issuing module 31 is further used to: determine available computing resources for the packet capture message processing service; and deploy the packet capture message processing service according to the available computing resources.
[0089] According to one or more embodiments of the present disclosure, the packet capture message processing service is deployed through a computing cluster, the computing cluster supports elastic expansion and contraction, and the packet capture message processing service is implemented by clustered data processing nodes. When the sending module 31 deploys the packet capture message processing service according to the available computing resources, it is specifically used to: determine the target number of data processing nodes in the digital cluster according to the available computing resources; and run the packet capture message processing service based on the target number of data processing nodes.
[0090] According to one or more embodiments of the present disclosure, before running the packet capture message processing service based on the target number of data processing nodes, the issuing module 31 is also used to: configure the running time period corresponding to the packet capture task; when the issuing module 31 runs the packet capture message processing service based on the target number of data processing nodes, the issuing module 31 is specifically used to: determine the target data processing nodes in the computing cluster according to the running time period corresponding to the packet capture task, wherein the low load period of the target data processing node matches the running time period corresponding to the packet capture task; and run the packet capture message processing service based on the target number of target data processing nodes.
[0091] According to one or more embodiments of the present disclosure, when determining the available computing resources for the packet capture message processing service, the sending module 31 is specifically used to: obtain the number of network devices and / or the message forwarding volume in the target network link; and determine the available computing resources for the packet capture message processing service based on the number of network devices and / or the message forwarding volume.
[0092] The sending module 31, the processing module 32 and the transmission module 33 are connected in sequence. The cloud network data packet capture and analysis device 3 provided in this embodiment can execute the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.
[0093] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown in FIG. Fig. 9 As shown, the electronic device 4 includes:
[0094] A processor 41, and a memory 42 communicatively connected to the processor 41;
[0095] The memory 42 stores computer executable instructions;
[0096] The processor 41 executes the computer execution instructions stored in the memory 42 to implement the following Figure 2-Figure 7 The cloud network data packet capture and analysis method in the illustrated embodiment.
[0097] Optionally, the processor 41 and the memory 42 are connected via a bus 43 .
[0098] For related instructions, please refer to Figure 2-Figure 7 The relevant descriptions and effects corresponding to the steps in the corresponding embodiments can be understood, and no further elaboration is made here.
[0099] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which are used to implement the present invention when executed by a processor. Figure 2-Figure 7 The cloud network data packet capture and analysis method provided by any one of the corresponding embodiments.
[0100] The present invention provides a computer program product, including a computer program. When the computer program is executed by a processor, the present invention is realized. Figure 2-Figure 7 The cloud network data packet capture and analysis method provided by any one of the corresponding embodiments.
[0101] In order to implement the above embodiment, the embodiment of the present disclosure also provides an electronic device.
[0102] refer to Fig.10 , which shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure, and the electronic device 900 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0103] like Fig.10As shown, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 to a random access memory (RAM) 903. Various programs and data required for the operation of the electronic device 900 are also stored in the RAM 903. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0104] Typically, the following devices may be connected to the I / O interface 905: input devices 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0105] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0106] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0107] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0108] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0109] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0110] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0111] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit or module does not, in some cases, constitute a limitation on the unit itself.
[0112] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0113] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0114] In a first aspect, according to one or more embodiments of the present disclosure, a cloud network data packet capture and analysis method is provided, comprising:
[0115] A coloring rule is issued to the starting network device on the target network link through the network controller, and the coloring rule is used to instruct the coloring of the target data packet and trigger the network device to synchronously perform packet capture processing based on the mirror message through the coloring identifier; a mirror message is generated for the hit target data packet based on the coloring rule by the starting network device and reported to the packet capture message processing service, and a coloring message carrying the coloring identifier is generated for the target data packet, and the coloring message carrying the coloring identifier is forwarded to the downstream network device; and, other network devices on the target network link are instructed to generate corresponding mirror messages for the received coloring messages through the coloring identifier and report them to the packet capture message processing service; wherein the packet capture message processing service is deployed in a bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each of the network devices.
[0116] According to one or more embodiments of the present disclosure, the method of generating a mirror message for a hit target data packet based on a coloring rule through a starting network device includes: adding device information of the starting network device in the first message header field of the target data packet to generate a mirror message of the starting network device, wherein the device information is used to characterize the network device currently receiving the data packet; the method of coloring the target data packet to generate a colored message carrying a coloring identifier includes: adding a coloring identifier characterizing the target data packet in the second message header field of the target data packet to generate the colored message.
[0117] According to one or more embodiments of the present disclosure, the method of instructing other network devices on the target network link to generate a corresponding mirror message for the received colored message through the coloring identifier and reporting it to the packet capture message processing service includes: parsing the data packet sent by the upstream network device through each network device; if the field content of the second message header field of the data packet is the coloring identifier, determining the data packet as the colored message, generating a corresponding mirror message, and reporting it to the packet capture message processing service.
[0118] According to one or more embodiments of the present disclosure, it also includes: obtaining a detection request sent by a target user, wherein the detection request is used to indicate a target service object leased by the target user; determining, based on the detection request, a plurality of network devices that implement the target service object and data forwarding logic between the plurality of network devices; and determining the target network link based on the plurality of network devices and data forwarding logic between the plurality of network devices.
[0119] According to one or more embodiments of the present disclosure, the method further includes: determining available computing resources for the packet capture message processing service; and deploying the packet capture message processing service according to the available computing resources.
[0120] According to one or more embodiments of the present disclosure, the packet capture message processing service is deployed through a computing cluster, and the deployment of the packet capture message processing service based on the available computing resources includes: determining a target number of data processing nodes in the computing cluster based on the available computing resources; and running the packet capture message processing service based on the target number of data processing nodes.
[0121] According to one or more embodiments of the present disclosure, before the data processing nodes based on the target number run the packet capture message processing service, it also includes: configuring the running time period corresponding to the packet capture task; the data processing nodes based on the target number run the packet capture message processing service, including: determining the target data processing nodes in the computing cluster according to the running time period corresponding to the packet capture task, wherein the low load period of the target data processing nodes matches the running time period corresponding to the packet capture task; and running the packet capture message processing service based on the target data processing nodes of the target number.
[0122] According to one or more embodiments of the present disclosure, determining the available computing resources of the packet capture message processing service includes: obtaining the number of network devices and / or the message forwarding volume in the target network link; and determining the available computing resources of the packet capture message processing service based on the number of network devices and / or the message forwarding volume.
[0123] In a second aspect, according to one or more embodiments of the present disclosure, a cloud network data packet capture and analysis device is provided, comprising:
[0124] A sending module is used to send a coloring rule to a starting network device on a target network link through a network controller, wherein the coloring rule is used to indicate that a target data packet is to be colored and trigger the network device to synchronously perform packet capture processing based on a mirror message through a coloring identifier;
[0125] A processing module, used to generate a mirror message for the hit target data packet based on the coloring rule through the starting network device and report it to the packet capture message processing service, and to color the target data packet to generate a colored message carrying a coloring mark, and forward the colored message carrying the coloring mark to the downstream network device;
[0126] The transmission module is used to instruct other network devices on the target network link to generate corresponding mirror messages for the received colored messages through the coloring identifier and report them to the packet capture message processing service; wherein the packet capture message processing service is deployed in the bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each network device.
[0127] According to one or more embodiments of the present disclosure, when the processing module generates a mirror message for a hit target data packet based on a coloring rule through a starting network device, the processing module is specifically used to: add device information of the starting network device in the first message header field of the target data packet to generate a mirror message of the starting network device, and the device information is used to characterize the network device that currently receives the data packet; when the processing module performs coloring on the target data packet to generate a colored message carrying a coloring identifier, the processing module is specifically used to: add a coloring identifier that characterizes the target data packet in the second message header field of the target data packet to generate a colored message.
[0128] According to one or more embodiments of the present disclosure, when the transmission module instructs other network devices on the target network link through the coloring identifier to generate a corresponding mirror message for the received colored message and report it to the packet capture message processing service, it is specifically used to: parse the data packet sent by the upstream network device through each network device; if the field content of the second message header field of the data packet is the coloring identifier, determine the data packet as a colored message, generate a corresponding mirror message, and report it to the packet capture message processing service.
[0129] According to one or more embodiments of the present disclosure, the sending module is also used to: obtain a detection request sent by a target user, the detection request is used to indicate a target service object rented by the target user; determine, based on the detection request, multiple network devices that implement the target service object and data forwarding logic between the multiple network devices; determine the target network link based on the multiple network devices and the data forwarding logic between the multiple network devices.
[0130] According to one or more embodiments of the present disclosure, the issuing module is further used to: determine available computing resources for the packet capture message processing service; and deploy the packet capture message processing service according to the available computing resources.
[0131] According to one or more embodiments of the present disclosure, the packet capture message processing service is deployed through a computing cluster, the computing cluster supports elastic expansion and contraction, and the packet capture message processing service is implemented by clustered data processing nodes. When the sending module 31 deploys the packet capture message processing service according to the available computing resources, it is specifically used to: determine the target number of data processing nodes in the digital cluster according to the available computing resources; and run the packet capture message processing service based on the target number of data processing nodes.
[0132] According to one or more embodiments of the present disclosure, before running the packet capture message processing service based on the target number of data processing nodes, the issuing module is also used to: configure the running time period corresponding to the packet capture task; when the issuing module runs the packet capture message processing service based on the target number of data processing nodes, the issuing module is specifically used to: determine the target data processing nodes in the computing cluster according to the running time period corresponding to the packet capture task, wherein the low load period of the target data processing node matches the running time period corresponding to the packet capture task; and run the packet capture message processing service based on the target number of target data processing nodes.
[0133] According to one or more embodiments of the present disclosure, when determining the available computing resources for the packet capture message processing service, the sending module is specifically used to: obtain the number of network devices and / or the message forwarding volume in the target network link; and determine the available computing resources for the packet capture message processing service based on the number of network devices and / or the message forwarding volume.
[0134] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0135] Memory stores computer-executable instructions;
[0136] At least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the cloud network data packet capture and analysis method as described in the first aspect and various possible designs of the first aspect.
[0137] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the cloud network data packet capture and analysis method as described in the first aspect and various possible designs of the first aspect are implemented.
[0138] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the cloud network data packet capture and analysis method as described in the first aspect and various possible designs of the first aspect.
[0139] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0140] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0141] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A cloud network data packet capture and analysis method, characterized in that: include: Sending a coloring rule to the starting network device on the target network link through the network controller, wherein the coloring rule is used to indicate coloring of the target data packet and triggering the network device to synchronously perform packet capture processing based on the mirror message through the coloring identifier; Generate a mirror message for the hit target data packet based on the coloring rule through the starting network device and report it to the packet capture message processing service, and generate a colored message carrying a coloring mark for the target data packet, and forward the colored message carrying the coloring mark to the downstream network device; as well as, The coloring identifier is used to instruct other network devices on the target network link to generate corresponding mirror messages for the received colored messages and report them to the packet capture message processing service; wherein the packet capture message processing service is deployed in a bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each of the network devices.
2. The cloud network data packet capture and analysis method according to claim 1, characterized in that: The generating of a mirror message for a hit target data packet based on a coloring rule by an initial network device includes: Adding device information of the starting network device to the first header field of the target data packet to generate a mirror message of the starting network device, wherein the device information is used to characterize the network device currently receiving the data packet; The step of dyeing a target data packet to generate a dyed message carrying a dyeing identifier includes: adding a dyeing identifier representing the target data packet to a second message header field of the target data packet to generate the dyed message.
3. The cloud network data packet capture and analysis method according to claim 2 is characterized in that: The step of instructing other network devices on the target network link to generate corresponding mirror messages for the received colored messages through the colored identifier and reporting the messages to the packet capture message processing service includes: Parse the data packets sent by the upstream network device through each network device; If the field content of the second message header field of the data packet is the coloring identifier, the data packet is determined to be the colored message, and a corresponding mirror message is generated and reported to the packet capture message processing service.
4. The cloud network data packet capture and analysis method according to claim 1, characterized in that: Also includes: Acquire a detection request sent by a target user, where the detection request is used to indicate a target service object rented by the target user; Determining, according to the detection request, a plurality of network devices that implement the target service object and a data forwarding logic between the plurality of network devices; The target network link is determined according to the multiple network devices and data forwarding logic between the multiple network devices.
5. The cloud network data packet capture and analysis method according to claim 1, characterized in that: Also includes: Determining available computing resources for the packet capture message processing service; The packet capture message processing service is deployed according to the available computing resources.
6. The cloud network data packet capture and analysis method according to claim 5, characterized in that: The packet capture message processing service is deployed through a computing cluster, and the deploying of the packet capture message processing service according to the available computing resources includes: Determining a target number of data processing nodes in a computing cluster based on the available computing resources; Based on the target number of data processing nodes, the packet capture message processing service is run.
7. The cloud network data packet capture and analysis method according to claim 6, characterized in that: Before the data processing nodes based on the target number run the packet capture message processing service, the method further includes: Configure the running time period corresponding to the packet capture task; The data processing nodes based on the target number run the packet capture message processing service, including: Determining a target data processing node in the computing cluster according to the corresponding running time period of the packet capture task, wherein the low load period of the target data processing node matches the running time period corresponding to the packet capture task; Based on the target number of target data processing nodes, the packet capture message processing service is run.
8. The cloud network data packet capture and analysis method according to claim 5, characterized in that: The determining of available computing resources for the packet capture message processing service includes: Obtaining the number of network devices and / or message forwarding volume in the target network link; The available computing resources of the packet capture message processing service are determined according to the number of the network devices and / or the message forwarding volume.
9. A cloud network data packet capture and analysis device, characterized in that: include: A sending module, used for sending a coloring rule to a starting network device on a target network link through a network controller, wherein the coloring rule is used for indicating coloring of a target data packet and triggering the network device to synchronously perform packet capture processing based on a mirror message through a coloring identifier; A processing module, used to generate a mirror message for the hit target data packet based on the coloring rule through the starting network device and report it to the packet capture message processing service, and to color the target data packet to generate a colored message carrying a coloring mark, and forward the colored message carrying the coloring mark to the downstream network device; A transmission module is used to instruct other network devices on the target network link to generate corresponding mirror messages for the received colored messages through the coloring identifier and report them to the packet capture message processing service; wherein the packet capture message processing service is deployed in a bypass of the network device of the target network link, and is used to locate network anomalies based on the mirror messages reported by each of the network devices.
10. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the cloud network data packet capture and analysis method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the cloud network data packet capture and analysis method according to any one of claims 1 to 8 is implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the cloud network data packet capture and analysis method as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Node scheduling method, device and equipment
CN112416596A
Link detection method, device, equipment, system and switch
CN112751733A
Transaction full-link tracking method and system based on network mirroring technology
CN117527728A
Data forwarding equipment analysis method and device, equipment and storage medium
CN118101529A
Load balancing method and device for real-time monitoring system of power distribution network and storage medium
CN118733262A
