A telemetry message generation method, device, terminal and medium

By evaluating the target original message, telemetry messages are generated only when the setting conditions are met, the problem of redundant telemetry messages is solved, and efficient resource utilization and the actual value of telemetry messages are realized.

CN115987847BActive Publication Date: 2025-06-06深圳市恒扬数据股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211617588.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-15
Publication Date
2025-06-06
Estimated Expiration
2042-12-15

AI Technical Summary

Technical Problem

There are too many useless redundant telemetry messages in the prior art, which occupies resources and has no actual value.

Method used

By obtaining the target original message and assigning corresponding evaluation rules according to its report type, the message is evaluated. Only when the evaluation result meets the setting conditions, telemetry messages are generated and output to the server.

Benefits of technology

It effectively avoids the generation of useless redundant telemetry messages, saves resources, and ensures the actual value of telemetry messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115987847B_ABST
    Figure CN115987847B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of network communication, and provides a telemetry message generation method, device, terminal and medium, wherein the method includes: obtaining a target original message, and different messages have set evaluation rules corresponding to the report type; based on the target evaluation rule corresponding to the target original message, the target original message is evaluated to obtain a message evaluation result; when the message evaluation result meets the set conditions, a telemetry message is generated based on the target original message; and the telemetry message is output to a server. This solution can avoid the generation of useless redundant telemetry messages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communications, and in particular to a telemetry message generation method, device, terminal and medium. Background Art

[0002] Network devices generate a large number of messages during operation, and the messages contain a lot of information. Therefore, people try to obtain relevant information about network devices by analyzing the messages, which leads to the emergence of out-of-band network telemetry and in-band network telemetry technologies. Among them, out-of-band network telemetry technology needs to be implemented based on the CPU, occupying CPU resources, while in-band network telemetry technology does not require the participation of the CPU during telemetry, so it does not occupy CPU resources. With the development of P4 (Programming Protocol-independent Packet Processors, protocol-independent message processing language) data programmable switching chips, in-band network telemetry technology is increasingly used to monitor the status of network devices. However, no matter which telemetry technology is used, it simply generates telemetry messages from the acquired messages through telemetry technology, thereby generating a large number of telemetry messages and producing many useless redundant telemetry messages. Summary of the invention

[0003] The embodiments of the present application provide a telemetry message generation method, device, terminal and medium to solve the problem of generating useless redundant telemetry messages in the prior art.

[0004] A first aspect of an embodiment of the present application provides a telemetry message generation method, including:

[0005] Obtain the target original message. Different messages have set evaluation rules according to the report type.

[0006] Based on the target assessment rule corresponding to the target original message, the target original message is assessed to obtain a message assessment result;

[0007] When the message evaluation result meets the set conditions, generating a telemetry message based on the target original message;

[0008] The telemetry message is output to the server.

[0009] A second aspect of an embodiment of the present application provides a telemetry message generating device, including:

[0010] The acquisition module is used to obtain the target original message. Different messages have set evaluation rules according to the report type.

[0011] An evaluation module, configured to perform message evaluation on the target original message based on the target evaluation rule corresponding to the target original message, and obtain a message evaluation result;

[0012] A generating module, configured to generate a telemetry message based on the target original message when the message evaluation result meets the set conditions;

[0013] An output module is used to output the telemetry message to a server.

[0014] A third aspect of an embodiment of the present application provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.

[0015] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0016] A fifth aspect of the present application provides a computer program product, which, when executed on a terminal, enables the terminal to execute the steps of the method described in the first aspect.

[0017] As can be seen from the above, the target original message is assigned a corresponding target assessment rule through the report type of the target original message. When the assessment result meets the set conditions, a telemetry message is generated and then sent to the server. By limiting the generation conditions of the telemetry message, messages that do not meet the set conditions will not be able to generate telemetry messages, thereby avoiding the generation of useless redundant telemetry messages. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 This is a process of a telemetry message generation method provided in an embodiment of the present application. Figure 1 ;

[0020] Figure 2 This is a process of a telemetry message generation method provided in an embodiment of the present application. Figure 2 ;

[0021] Figure 3 It is a structural diagram of a telemetry message generating device provided in an embodiment of the present application;

[0022] Figure 4It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0024] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0025] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0026] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0027] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0028] In a specific implementation, the terminal described in the embodiments of the present application includes, but is not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).

[0029] In the following discussion, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and / or joystick.

[0030] The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk burning application, a spreadsheet application, a game application, a telephone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital camcorder application, a web browsing application, a digital music player application, and / or a digital video player application.

[0031] Various applications that can be executed on the terminal can use at least one common physical user interface device such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within corresponding applications. In this way, the common physical architecture of the terminal (e.g., the touch-sensitive surface) can support various applications with user interfaces that are intuitive and transparent to the user.

[0032] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0033] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0034] See also Figure 1 , Figure 1 This is a process of a telemetry message generation method provided in an embodiment of the present application. Figure 1 .like Figure 1 As shown, a telemetry message generation method comprises the following steps:

[0035] Step 101, obtaining the target original message, and different messages have set evaluation rules according to the report type.

[0036] Specifically, a programmable switching chip is embedded in the data plane of the network device, and the data plane includes a mirror module. The original message is obtained through the programmable switching chip, and the original message is copied based on the mirror function of the mirror module to obtain the target original message. Through the copy operation, the target original message that is the same as the original message is obtained, so that the telemetry message can be generated based on the original message without affecting the normal forwarding of the original message.

[0037] After obtaining the target original message, if the target original message triggers a packet loss event, a flow event or a queue event, a mapping relationship is established between the target original message and the packet loss event, the flow event or the queue event through the session ID of the mirror module, and the report type of the target original message can be obtained through the mapping relationship.

[0038] The report types include packet loss report, flow report and queue report, and the target original message is assigned a set evaluation rule according to the report type of the target original message. The evaluation rule is used to determine whether the target original message can eventually generate a telemetry message.

[0039] Step 102: Based on the target evaluation rule corresponding to the target original message, the target original message is evaluated to obtain a message evaluation result.

[0040] Specifically, the target assessment rule is a rule for determining whether the target original message can generate the telemetry message. After the determination, a determination result, namely the message assessment result, is obtained.

[0041] Specifically, after acquiring the target original message, the target original message needs to be processed through the pipeline stage to determine whether to generate the telemetry message. Among them, the pipeline stage includes the ingress (input processor) stage and the egress (output processor) stage. More specifically, the ingress stage is divided into three small stages: ingress parser (input parser), ingress and ingress deparser (input deparser), and the egress stage is divided into three small stages: egress parser (output parser), egress and egress deparser (output deparser). The following explanation is based on the above six small stages.

[0042] In the ingress parser stage: the target original message is parsed to obtain the ingress port and ingress timestamp of the target original message.

[0043] In the ingress stage: first, rule matching is performed through the ACL (Access Control List) policy configuration table to obtain a mapping relationship between the target original message and the packet loss event, the flow event or the queue event through the session id, that is, the report type of the target original message is obtained. Based on the telemetry module of the data plane, the mirror type (mirror type) and mirror src corresponding to the target original message are calculated, and the mirror type and the mirror src are used to extract metadata in the egress stage. At the same time, after the target original message is processed at this stage, the mirror metadata of the target original message can be obtained, and the mirror metadata includes the metadata of the mirror itself and the metadata of the target original message. In particular, if the report type of the target original message is a packet loss report, then in the ingress stage, the aggregate hash value of the target original message is calculated through the lag (port aggregation) module of the data plane.

[0044] In the ingress deparser stage: insert the mirror metadata into the message header of the target original message, and send the target original message to the egress stage through the pkt.emit instruction.

[0045] In the egress parser stage: first, the mirror metadata inserted in the message header of the target original message is parsed through the pkt.extract instruction, and the telemetry metadata in the mirror metadata is extracted through the mirrortype and the mirror src calculated in the ingress stage. The telemetry metadata includes metadata such as ingress port, ingress timestamp, egress port, queue id, queue depth, egress timestamp, delay, etc.

[0046] In the egress phase: the intelligent recognition event engine assigns the corresponding target assessment rule to the target original message according to the report type, the target original message performs message assessment, and obtains the message assessment result, that is, the intelligent recognition event engine decides whether to generate a telemetry message.

[0047] Specifically, if the target report type of the target original message is a packet loss report or a flow report, a target hash algorithm is assigned to the target original message to obtain a target hash value; the target hash value is compared with multiple hash values ​​preset in the target assessment rule to obtain a comparison result as the message assessment result.

[0048] Furthermore, if the target report type of the target original message is a packet loss report, a hash value is calculated by an aggregate hash algorithm, and the calculation result is filtered through a Bloom filter, that is, the target hash value is compared with multiple hash values ​​preset in the target evaluation rule, and the comparison result is obtained as the message evaluation result. At this time, the aggregate hash value of the target original message calculated by the lag module in the ingress stage can also be directly called.

[0049] If the target report type of the target original message is a flow report, a hash value is calculated by using the flow delay change, input port and output port, and the calculation result is filtered through the Bloom filter, that is, the target hash value is compared with multiple hash values ​​preset in the target assessment rule, and the comparison result is obtained as the message assessment result.

[0050] Specifically, if the target report type of the target original message is a queue report, then in accordance with the target assessment rule corresponding to the queue report, the current queue gate quota value, current delay and current queue depth of the target original message are compared with the queue gate quota value, historical delay and queue depth preset in the target assessment rule, and the comparison result is obtained as the message assessment result.

[0051] In the egress deparser stage: encapsulate telemetry messages and send the telemetry messages to the server.

[0052] Step 103, when the message evaluation result meets the set conditions, a telemetry message is generated based on the target original message.

[0053] The preset condition is configured by the control plane through the abstract interface of the switch to the P4 table in the data plane.

[0054] Specifically, if the report type of the target original message is a packet loss report or a flow report, then when the multiple hash values ​​preset in the target assessment rule include the target hash value, the telemetry message is generated based on the target original message.

[0055] Specifically, if the report type of the target original message is a packet loss report or a flow report, then when the current delay of the target original message exceeds the historical delay preset in the target assessment rule and the current queue depth of the target original message exceeds the queue depth preset in the target assessment rule, the telemetry message is generated based on the target original message; or, when the current queue gate quota value of the target original message does not exceed the queue gate quota value preset in the target assessment rule but the current delay of the target original message changes, the telemetry message is generated based on the target original message.

[0056] Specifically, the telemetry message is encapsulated in the format of a UDP (User Datagram Protocol) message, and the UDP message includes a UDP header and a UDP data part. The telemetry message generation process is roughly as follows: obtaining telemetry header information, telemetry information body, and the target original message; obtaining message header information based on the message encapsulation configuration data of the control plane; encapsulating the message header information with the message body including the telemetry header information, the telemetry information body, and the target original message in accordance with the UDP message format to obtain a telemetry message.

[0057] Among them, the UDP header is configured by the control plane to the data plane. During encapsulation, the UDP header can be directly called. The UDP header information is: the original mac (media access control adress) address encapsulated by the L2 layer header information is the device mac address, the destination mac is the next hop mac to reach the visualization platform, the L3 layer header information SIP is the IP of the device, the destination IP is the IP of the visualization platform, and the destination port of the L4 layer is specified as 32766 by default.

[0058] Specifically, the telemetry header information, the telemetry information body and the target original message together constitute the data part of the UDP message. Among them, the header of the telemetry message includes the protocol version number, hardware identifier, switch ID, message sequence number, inlet event stamp, identification bit, report length and report metadata bit. The identification bit is used to identify the message type of the telemetry message finally generated, and the telemetry message type includes packet loss telemetry message, flow telemetry message and queue telemetry message. The telemetry information body contains the metadata of the telemetry. The metadata of the packet loss telemetry message includes the packet loss reason, queue ID, pipeline stage, location and inbound port, etc.; the metadata of the flow telemetry message includes flow type, queue ID, queue depth, inbound port ID, outbound port ID and outbound timestamp, etc.; the metadata of the queue telemetry message includes queue ID, queue depth, buffer occupancy, inbound port ID, outbound port ID, outbound timestamp, jump delay and congestion status, etc.

[0059] Furthermore, when encapsulating the UDP message, encapsulation is performed in the order of the UDP header, the telemetry header information, the telemetry information body, and the target original message. The target original message here is obtained by copying from the buffer through the mirror function. The encapsulation process is performed in the egress deparser stage.

[0060] Step 104: output the telemetry message to the server.

[0061] Specifically, at this time, the telemetry message is in the egress deparser stage, and the telemetry message is sent to the visualization platform of the server through the pkt.emit instruction. The telemetry message is analyzed on the visualization platform and presented through web visualization to obtain the status of the network device.

[0062] Optionally, the telemetry message may also be sent to the server via grpc or other methods.

[0063] In addition, the telemetry method in the present method is an in-band network telemetry method, that is, the state of the network device is telemetered by the in-band network telemetry method in the data plane with the P4 programmable switching chip.

[0064] In the embodiment of the present application, the target original message is assigned a corresponding target assessment rule by the report type of the target original message, and the assessment result is obtained after the assessment. When the assessment result meets the set conditions, a telemetry message is generated, and finally the telemetry message is sent to the server. This method limits the generation conditions of the telemetry message, and the message that does not meet the set conditions will not generate the telemetry message, thereby avoiding the generation of useless redundant telemetry messages.

[0065] See also Figure 2 , Figure 2 This is a process of a telemetry message generation method provided in an embodiment of the present application. Figure 2 .like Figure 2 As shown, a telemetry message generation method comprises the following steps:

[0066] Step 201 : When packet loss report monitoring, flow report monitoring, and queue report monitoring are enabled, a setting condition is configured to the data plane through an interface based on a configuration policy of the control plane.

[0067] Specifically, the packet loss report monitoring, the flow report monitoring and the queue report monitoring are enabled in the control plane through a global configuration data structure. The packet loss report monitoring, the flow report monitoring and the queue report monitoring are used to monitor whether the target original message triggers the packet loss event, the flow event and the queue event.

[0068] Furthermore, after the packet loss report monitoring, the flow report monitoring and the queue report monitoring are turned on, the control plane configures the set conditions in the P4 table in the data plane through the abstract interface of the switch, and the set conditions are used to evaluate whether the message is generated.

[0069] In addition, the flow policy, queue report parameter policy and telemetry message generation policy need to be configured in the control plane. The flow policy refers to the ACL policy rule. When the report type of the target original message is the packet loss report or the flow report, after the packet loss report monitoring and the flow report monitoring are turned on, the corresponding flow policy shall be specified for the target original message whose report type is the packet loss report or the flow report. The queue report parameter policy is used to configure parameters such as queue id, queue gate quota value, delay and queue depth. The telemetry message generation policy defines the UDP header information that encapsulates the telemetry message.

[0070] Step 202: Obtain the target original message. Different messages have set evaluation rules according to the report type.

[0071] The implementation process of this step is the same as the implementation process of step 101 in the aforementioned embodiment, and will not be repeated here.

[0072] Step 203: Based on the target evaluation rule corresponding to the target original message, the target original message is evaluated to obtain a message evaluation result.

[0073] The implementation process of this step is the same as the implementation process of step 102 in the aforementioned embodiment, and will not be repeated here.

[0074] Step 204, when the message evaluation result meets the set conditions, a telemetry message is generated based on the target original message.

[0075] The implementation process of this step is the same as the implementation process of step 103 in the aforementioned embodiment, and will not be repeated here.

[0076] Step 205: output the telemetry message to the server.

[0077] The implementation process of this step is the same as the implementation process of step 104 in the aforementioned embodiment, and will not be repeated here.

[0078] In an embodiment of the present application, after the control plane starts monitoring, the control plane configures set conditions for the data plane. The set conditions are an important basis for determining whether a telemetry message is generated. When the message evaluation result meets the set conditions, a telemetry message is generated, thereby achieving the purpose of telemetry of the status of the network device on the data plane.

[0079] See also Figure 3 , Figure 3 This is a structural diagram of the telemetry message generating device provided in an embodiment of the present application. For the sake of convenience of explanation, only the parts related to the embodiment of the present application are shown.

[0080] The telemetry message generating device 300 includes: an acquisition module 301 , an evaluation module 302 , a generation module 303 , and an output module 304 .

[0081] The acquisition module 301 is used to acquire the target original message. Different messages have set evaluation rules according to the report type.

[0082] The evaluation module 302 is used to perform message evaluation on the target original message based on the target evaluation rule corresponding to the target original message to obtain a message evaluation result.

[0083] The generating module 303 is used to generate a telemetry message based on the target original message when the message evaluation result meets the set conditions.

[0084] The output module 304 is used to output the telemetry message to the server.

[0085] Wherein, the assessment module is specifically used for:

[0086] If the target report type of the target original message is a packet loss report or a flow report, assigning a target hash algorithm to the target original message to obtain a target hash value;

[0087] The target Hash value is compared with a plurality of Hash values ​​preset in the target evaluation rule, and a comparison result is obtained as the message evaluation result.

[0088] In a case where the multiple hash values ​​preset in the target assessment rule include the target hash value, the telemetry message is generated based on the target original message.

[0089] In addition, the assessment module is also used to:

[0090] If the target report type of the target original message is a queue report, then in accordance with the target assessment rule corresponding to the queue report, the current queue gate quota value, current delay and current queue depth of the target original message are compared with the queue gate quota value, historical delay and queue depth preset in the target assessment rule, and the comparison result is obtained as the message assessment result.

[0091] generating the telemetry message based on the target original message when the current delay of the target original message exceeds the historical delay preset in the target assessment rule and the current queue depth of the target original message exceeds the queue depth preset in the target assessment rule; or,

[0092] When the current queue gate quota value of the target original message does not exceed the queue gate quota value preset in the target assessment rule but the current delay of the target original message changes, the telemetry message is generated based on the target original message.

[0093] Wherein, the generation module is specifically used for:

[0094] Obtaining telemetry header information, telemetry information body and the target original message;

[0095] Based on the message encapsulation configuration data of the control plane, obtain the message header information;

[0096] According to the UDP message format, the message header information is encapsulated with the message body including the telemetry header information, the telemetry information body and the target original message to obtain a telemetry message.

[0097] Specifically, the device further includes a configuration module, and the configuration module is used to:

[0098] When packet loss report monitoring, flow report monitoring, and queue report monitoring are enabled, the setting conditions are configured to the data plane through the interface based on the configuration policy of the control plane.

[0099] The telemetry message generation device provided in the embodiment of the present application can implement each process of the embodiment of the above-mentioned telemetry message generation method and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0100] Figure 4 4 is a structural diagram of a terminal provided in an embodiment of the present application. As shown in the figure, the terminal 4 of this embodiment includes: at least one processor 40 ( Figure 4 Only one is shown in the figure), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, wherein the processor 40 implements the steps of any of the above-mentioned method embodiments when executing the computer program 42.

[0101] The terminal 4 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that Figure 4 It is only an example of terminal 4 and does not constitute a limitation on terminal 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.

[0102] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0103] The memory 41 may be an internal storage unit of the terminal 4, such as a hard disk or memory of the terminal 4. The memory 41 may also be an external storage device of the terminal 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the terminal 4. The memory 41 is used to store the computer program and other programs and data required by the terminal. The memory 41 may also be used to temporarily store data that has been output or is to be output.

[0104] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0105] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0106] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0107] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0109] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0110] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0111] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be implemented through a computer program product. When the computer program product runs on a terminal, the terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0112] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A telemetry message generation method, It is characterized in that include: Obtain the target original message, and different messages have set evaluation rules according to the report type; based on the mirroring function of the data plane, copy the original message to obtain the target original message; Based on the target assessment rule corresponding to the target original message, the target original message is assessed to obtain a message assessment result; The target assessment rule corresponding to the target original message is used to assess the target original message and obtain the message assessment result, including: if the target report type of the target original message is a packet loss report or a flow report, a target hash algorithm is assigned to the target original message to obtain a target hash value; the target hash value is compared with a plurality of hash values ​​preset in the target assessment rule to obtain a comparison result as the message assessment result; or, if the target report type of the target original message is a queue report, the current queue gate quota value, current delay and current queue depth of the target original message are compared with the queue gate quota value, historical delay and queue depth preset in the target assessment rule in accordance with the target assessment rule corresponding to the queue report to obtain a comparison result as the message assessment result; In the case where the message evaluation result meets the set conditions, a telemetry message is generated based on the target original message; in the case where the message evaluation result meets the set conditions, the telemetry message is generated based on the target original message, including: obtaining telemetry header information, telemetry information body and the target original message; obtaining message header information based on message encapsulation configuration data of the control plane; encapsulating the message header information with the message body including the telemetry header information, the telemetry information body and the target original message in accordance with the UDP message format to obtain the telemetry message; The telemetry message is output to the server.

2. The method according to claim 1, It is characterized in that When the message evaluation result meets the set conditions, generating a telemetry message based on the target original message includes: In a case where the multiple hash values ​​preset in the target assessment rule include the target hash value, the telemetry message is generated based on the target original message.

3. The method according to claim 1, It is characterized in that If the target report type of the target original message is a queue report, then according to the target assessment rule corresponding to the queue report, the current queue gate quota value, current delay and current queue depth of the target original message are compared with the queue gate quota value, historical delay and queue depth preset in the target assessment rule, and after obtaining the comparison result as the message assessment result, the method further comprises: generating the telemetry message based on the target original message when the current delay of the target original message exceeds the historical delay preset in the target assessment rule and the current queue depth of the target original message exceeds the queue depth preset in the target assessment rule; or, When the current queue gate quota value of the target original message does not exceed the queue gate quota value preset in the target assessment rule but the current delay of the target original message changes, the telemetry message is generated based on the target original message.

4. The method according to claim 1, It is characterized in that Before obtaining the target original message, the method includes: When packet loss report monitoring, flow report monitoring, and queue report monitoring are enabled, the setting conditions are configured to the data plane through the interface based on the configuration policy of the control plane.

5. A telemetry message generating device, It is characterized in that include: The acquisition module acquires the target original message. Different messages have set evaluation rules according to the report type. Based on the mirroring function of the data plane, the original message is copied to obtain the target original message; An evaluation module is used to perform message evaluation on the target original message based on the target evaluation rule corresponding to the target original message to obtain a message evaluation result; the evaluation module is specifically used to: if the target report type of the target original message is a packet loss report or a flow report, assign a target hash algorithm to the target original message to obtain a target hash value; compare the target hash value with multiple hash values ​​preset in the target evaluation rule to obtain a comparison result as the message evaluation result; or, if the target report type of the target original message is a queue report, compare the current queue gate quota value, current delay and current queue depth of the target original message with the queue gate quota value, historical delay and queue depth preset in the target evaluation rule in accordance with the target evaluation rule corresponding to the queue report to obtain a comparison result as the message evaluation result; A generating module, configured to generate a telemetry message based on the target original message when the message evaluation result meets the set conditions; the generating module is specifically configured to: obtain telemetry header information, telemetry information body and the target original message; obtain message header information based on message encapsulation configuration data of the control plane; encapsulate the message header information with a message body including the telemetry header information, the telemetry information body and the target original message in accordance with the UDP message format to obtain the telemetry message; An output module is used to output the telemetry message to a server.

6. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Bandwidth efficient micro burst measurement system and method

    CN114422413A

  • Machine-based recognition and dynamic selection of subpopulations for improved telemetry

    US20200272552A1