Transmission delay determination method and device, medium, equipment and product
By using mirrored service data and timestamps in the TSN network and combining ACL rules, the transmission delay of the destination service data is directly determined, which solves the problem of inefficiency in traditional methods and achieves efficient delay detection.
Patent Information
- Application Number
- CN202411514717.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-01-03
AI Technical Summary
In a time-sensitive network (TSN), the transmission delay efficiency of determining the destination service data is poor, because each service data needs to be parsed one by one, resulting in low detection efficiency.
By receiving the first mirror service data from the source switch and the second mirror service data from the destination switch, using the timestamps in these mirror data, the transmission delay of the destination service data is determined based on the access control list (ACL) rules, reducing the The number of parsed data for each service in the network.
It improves the analysis efficiency of service data transmission delay, realizes targeted delay detection, and reduces detection complexity and resource utilization.
Smart Images

Figure CN119254671A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a method, apparatus, medium, equipment and product for determining a transmission delay. Background Art
[0002] Time-sensitive networking (TSN) can be used to provide high-bandwidth, low-latency, low-jitter, and high-reliability data transmission capabilities. In order to determine the latency in a TSN network, latency detection can be performed by reporting timestamps.
[0003] However, when the TSN network transmits multiple business data, since the delays of different business data in the TSN network may be different, when determining the transmission delay of the destination business data, each business data in the TSN network needs to be parsed one by one, resulting in poor efficiency in determining the transmission delay of the destination business data. Summary of the invention
[0004] The present application provides a transmission delay determination method, apparatus, medium, equipment and product for improving the efficiency of determining the transmission delay of destination service data.
[0005] In order to achieve the above purpose, this application adopts the following technical solutions:
[0006] In a first aspect, a method for determining a transmission delay is provided, which is applied to a controller, and the method includes: receiving first mirrored service data from a source switch and second mirrored service data from a destination switch; the first mirrored service data and the second mirrored service data are mirrored data of the destination service data; the source address of the destination service data is a target source address, and the destination address is a target destination address; based on the timestamp carried by the first mirrored service data and the timestamp carried by the second mirrored service data, determining the data transmission delay of the destination service data from a node corresponding to the source address to a node corresponding to the destination address.
[0007] Optionally, based on the timestamp carried by the first mirrored business data and the timestamp carried by the second mirrored business data, determining the data transmission delay of the destination business data from the node corresponding to the source address to the node corresponding to the destination address, including: when the first mirrored business data and the second mirrored business data match, determining the data transmission delay of the destination business data from the node corresponding to the source address to the node corresponding to the destination address based on the timestamp carried by the first mirrored business data and the timestamp carried by the second mirrored business data.
[0008] Optionally, the method further includes: determining that the first mirrored business data and the second mirrored business data match when the identification information of the first mirrored business data and the identification information of the second mirrored business data are the same; the identification information includes at least one of the following: Ethernet type, virtual local area network identifier, media access control MAC address.
[0009] Optionally, in the case where the destination service data includes multiple data packets, the first mirrored service data and the second mirrored service data are mirrored data of the first data packet; and the first data packet is one of the multiple data packets.
[0010] Based on the technical solution provided by the present application, the transmission delay of the destination service data is determined by the first mirror service data from the source switch and the second mirror service data from the destination switch. Since the first mirror service data and the second mirror service data are mirror service data of the destination service data; the source address of the destination service data is the target source address, and the destination address is the target destination address. In this way, the service data that needs to be delayed can be selected in a targeted manner without parsing each service data in the network, which reduces the number of service data parsing and can improve the parsing efficiency of service data transmission delay.
[0011] In a second aspect, a method for determining a transmission delay is provided, which is applied to a source switch, and the method includes: determining whether the current service data to be transmitted is the destination service data; the source address of the destination service data is the target source address, and the destination address is the target destination address; when the current service data to be transmitted is the destination service data, first mirror service data is sent to a controller, so that the controller determines the transmission delay of the destination service data according to the timestamp carried by the first mirror service data and the timestamp carried by the second mirror service data from the destination switch; the first mirror service data and the second mirror service data are mirror service data of the destination service data.
[0012] Optionally, before sending the first mirrored business data to the controller, the method also includes: mirroring the destination business data to obtain the mirrored destination business data; writing the first timestamp into the mirrored destination business data to obtain the first mirrored business data; the first timestamp is the timestamp corresponding to the moment when the source switch receives the destination business data.
[0013] Optionally, when the destination business data includes multiple data packets, the destination business data is mirrored to obtain the mirrored destination business data, including: mirroring the first data packet to obtain the mirrored destination business data; the first data packet is one of the multiple data packets.
[0014] According to a third aspect, a method for determining a transmission delay is provided, which is applied to a destination switch, and the method includes: determining whether the service data to be transmitted is the destination service data; the source address of the destination service data is the target source address, and the destination address is the target destination address; when the service data to be transmitted is the destination service data, second mirror service data is sent to a controller, so that the controller determines the transmission delay of the destination service data according to the timestamp carried by the first mirror service data and the timestamp carried by the second mirror service data from the destination switch; the first mirror service data and the second mirror service data are mirror service data of the destination service data.
[0015] Optionally, before sending the second mirrored business data to the controller, the method also includes: mirroring the destination business data to obtain the mirrored destination business data; writing the second timestamp into the mirrored destination business data to obtain the second mirrored business data; the second timestamp is the timestamp corresponding to the moment when the destination switch sends the destination business data.
[0016] Optionally, when the destination business data includes multiple data packets, the destination business data is mirrored to obtain the mirrored destination business data; the first data packet is mirrored to obtain the mirrored destination business data; the first data packet is one of the multiple data packets.
[0017] Optionally, when the sending port of the destination switch has a timestamp writing function, writing the second timestamp into the mirrored destination service data includes: using the sending port of the destination switch to write the second timestamp into the mirrored destination service data.
[0018] Optionally, when the sending port of the destination switch is not configured with a write timestamp function, writing a second timestamp into the mirrored destination business data includes: using the loopback interface of the destination switch to send the mirrored destination business data to the processor of the destination switch; and writing the second timestamp into the mirrored destination business data based on the processor.
[0019] In a fourth aspect, a transmission delay determination device is provided, which is applied to a controller, and the device includes: a receiving unit and a determining unit; the receiving unit is used to receive first mirrored service data from a source switch and second mirrored service data from a destination switch; the first mirrored service data and the second mirrored service data are mirrored data of the destination service data; the source address of the destination service data is a target source address, and the destination address is a target destination address; the determining unit is used to determine the data transmission delay of the destination service data from a node corresponding to the source address to a node corresponding to the destination address based on the timestamp carried by the first mirrored service data and the timestamp carried by the second mirrored service data.
[0020] Optionally, the determination unit is specifically used to: determine the data transmission delay of the destination business data from the node corresponding to the source address to the node corresponding to the destination address based on the timestamp carried by the first mirror business data and the timestamp carried by the second mirror business data when the first mirror business data and the second mirror business data match.
[0021] Optionally, the determination unit is also used to determine that the first mirror business data and the second mirror business data match when the identification information of the first mirror business data and the identification information of the second mirror business data are the same; the identification information includes at least one of the following: Ethernet type, virtual local area network identifier, media access control MAC address.
[0022] Optionally, in the case where the destination service data includes multiple data packets, the first mirrored service data and the second mirrored service data are mirrored data of the first data packet; and the first data packet is one of the multiple data packets.
[0023] In a fifth aspect, a transmission delay determination device is provided, which is applied to a source switch, and the device includes: a determination unit and a sending unit; the determination unit is used to determine whether the current business data to be transmitted is the destination business data; the source address of the destination business data is the target source address, and the destination address is the target destination address; the sending unit is used to send first mirror business data to a controller when the current business data to be transmitted is the destination business data, so that the controller determines the transmission delay of the destination business data according to the timestamp carried by the first mirror business data and the timestamp carried by the second mirror business data from the destination switch; the first mirror business data and the second mirror business data are mirror business data of the destination business data.
[0024] Optionally, the device also includes a processing unit, which is used to mirror the destination business data before sending the first mirrored business data to the controller to obtain the mirrored destination business data; the processing unit is also used to write a first timestamp into the mirrored destination business data to obtain the first mirrored business data; the first timestamp is a timestamp corresponding to the moment when the source switch receives the destination business data.
[0025] Optionally, in the case where the destination service data includes multiple data packets, the processing unit is specifically used to: mirror the first data packet to obtain the mirrored destination service data; the first data packet is one of the multiple data packets.
[0026] In a sixth aspect, a transmission delay determination device is provided, which is applied to a destination switch, and the device includes: a determination unit and a sending unit; the determination unit is used to determine whether the current service data to be transmitted is the destination service data; the source address of the destination service data is the target source address, and the destination address is the target destination address; the sending unit is used to send the second mirror service data to the controller when the current service data to be transmitted is the destination service data, so that the controller determines the transmission delay of the destination service data according to the timestamp carried by the first mirror service data and the timestamp carried by the second mirror service data from the destination switch; the first mirror service data and the second mirror service data are mirror service data of the destination service data.
[0027] Optionally, the device also includes a processing unit; before sending the second mirrored business data to the controller, the processing unit is used to mirror the destination business data to obtain the mirrored destination business data; the processing unit is also used to write a second timestamp into the mirrored destination business data to obtain the second mirrored business data; the second timestamp is a timestamp corresponding to the moment when the destination switch sends the destination business data.
[0028] Optionally, in the case where the destination service data includes multiple data packets, the processing unit is specifically used to: mirror the first data packet to obtain the mirrored destination service data; the first data packet is one of the multiple data packets.
[0029] Optionally, the processing unit is further configured to: when the sending port of the destination switch has a function of writing a timestamp, write the second timestamp into the mirrored destination service data using the sending port of the destination switch.
[0030] Optionally, the processing unit is further used to: when the sending port of the destination switch is not configured with a write timestamp function, use the loopback interface of the destination switch to send the mirrored destination service data to the processor of the destination switch; and write a second timestamp into the mirrored destination service data based on the processor.
[0031] In the seventh aspect, a transmission delay determination device is provided, which can implement the functions performed by the transmission delay determination device in the above-mentioned aspects or possible designs. The functions can be implemented through hardware, such as: in one possible design, the transmission delay determination device may include: a processor and a communication interface, and the processor can be used to support the transmission delay determination device to implement the functions involved in the above-mentioned first aspect or any possible design of the first aspect.
[0032] In another possible design, the transmission delay determination device may further include a memory, the memory being used to store computer-executable instructions and data necessary for the transmission delay determination device. When the transmission delay determination device is running, the processor executes the computer-executable instructions stored in the memory, so that the transmission delay determination device performs the first aspect or any possible transmission delay determination method of the first aspect.
[0033] In an eighth aspect, a computer-readable storage medium is provided, which may be a readable non-volatile storage medium, and which stores computer instructions or programs. When the computer-readable storage medium is run on a computer, the computer can execute the first aspect or any possible transmission delay determination method of the above aspects.
[0034] In a ninth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the transmission delay determination method of the first aspect or any possible design of the above aspects.
[0035] In a tenth aspect, an electronic device is provided, the electronic device comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the transmission delay determination method as described in the first aspect or any possible design of the first aspect.
[0036] In the eleventh aspect, a chip system is provided, the chip system includes a processor and a communication interface, and the chip system can be used to implement the function performed by the transmission delay determination device in the first aspect or any possible design of the first aspect. In one possible design, the chip system also includes a memory, the memory is used to store program instructions and / or data. The chip system can be composed of a chip, or it can include a chip and other discrete devices, without limitation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the structure of a transmission delay determination system provided in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of the structure of another transmission delay determination system provided in an embodiment of the present application;
[0039] Figure 3 A schematic diagram of hierarchical modules of a transmission delay determination system provided in an embodiment of the present application;
[0040] Figure 4A schematic diagram of the structure of a transmission delay determination device provided in an embodiment of the present application;
[0041] Figure 5 A flow chart of a method for determining transmission delay provided in an embodiment of the present application;
[0042] Figure 6 A flowchart of another transmission delay determination method provided in an embodiment of the present application;
[0043] Figure 7 A schematic diagram of the structure of another transmission delay determination device provided in an embodiment of the present application;
[0044] Figure 8 A schematic diagram of the structure of another transmission delay determination device provided in an embodiment of the present application;
[0045] Fig. 9 A schematic diagram of the structure of another transmission delay determination device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0048] It should also be understood that 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 and / or components.
[0049] Time-sensitive networking (TSN) can be used to provide high-bandwidth, low-latency, low-jitter, and high-reliability data transmission capabilities. TSN configuration management follows the standard: IEEE 802.1Qcc-2018, which describes three user / network configuration models that provide an architecture for subsequent specifications. The configuration model can include at least one of the following: a fully centralized configuration model, a hybrid configuration model, and a fully distributed configuration model.
[0050] Among them, the fully centralized configuration model is used to obtain terminal devices and user requirements based on the centralized network configuration (CUC) entity, and configure TSN features in the terminal device. All user requirements interact through the centralized user configuration (CNC) and the centralized network configuration (CUC).
[0051] CUC is used to obtain the flow demand, flow data and other parameters of the terminal device through a preset interface (such as a user management configuration interface), and is also used to send the flow demand, flow data and other parameters to CNC through a user network interface (uni).
[0052] CNC is used to obtain TSN network topology information, TSN network devices and port capabilities. It also configures TSN switches through the southbound interface Netconf and sends configuration information to CUC.
[0053] After CNC sends configuration information to CUC, in order to determine the latency in the TSN network, the latency of transmitting service data can be monitored through TSN testers and access terminal devices. This requires professional testers and test instruments, which results in high testing costs and low testing efficiency.
[0054] Alternatively, the latency in the TSN network can be determined by adding a new detection traffic method. The detection traffic will occupy bandwidth and seize resources for business data to be transmitted in the link, which is prone to conflicts and thus affects normal business operations. In addition, the detection traffic will be forwarded along the entire path, which is more complex to implement and less flexible.
[0055] Alternatively, the delay in the TSN network can be determined by reporting timestamps. However, when the TSN network transmits multiple service data, since the delays of different service data in the TSN network may be different, when determining the transmission delay of the destination service data, each service data in the TSN network needs to be parsed one by one, resulting in poor efficiency in determining the transmission delay of the destination service data.
[0056] It should be noted that latency is the difference between the time when the same service flow enters the network and the time when it leaves the network between two specified network nodes.
[0057] In view of this, an embodiment of the present application provides a method for determining a transmission delay, comprising: receiving first mirrored service data from a source switch and second mirrored service data from a destination switch; the first mirrored service data and the second mirrored service data are mirrored service data of the destination service data; the destination service data satisfies an access control list ACL rule; the ACL rule includes at least one of the following: the source address is a target source address, and the destination address is a target destination address; and determining the transmission delay of the destination service data based on the first mirrored service data and the second mirrored service data.
[0058] The method provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0059] It should be noted that the network system described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of network systems and the emergence of other network systems, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0060] Figure 1 FIG. 1 is a schematic diagram of the structure of a transmission delay determination system 10 provided in an embodiment of the present application. Figure 1 As shown, the transmission delay determination system 10 may include a source switch 11 , a destination switch 12 , and a controller 13 .
[0061] The source switch 11, the destination switch 12, and the controller 13 are connected. For example, the source switch 11, the destination switch 12, and the controller 13 may be connected wirelessly, or they may be connected wiredly. There is no limitation.
[0062] The source switch 11 involved in the embodiment of the present application is used to forward the service data to be transmitted from its sending device (also referred to as talker). For example, the source switch 11 can be a switch connected to the sending device. The embodiment of the present application does not limit the specific technology, specific number and specific device form adopted by the source switch 11.
[0063] The destination switch 12 involved in the embodiment of the present application is used to receive the service data to be transmitted from other switches and send the service data to be transmitted to the receiving device (also called listener). For example, the destination switch 12 can be a switch connected to the receiving device. The embodiment of the present application does not limit the specific technology, specific number and specific device form adopted by the source switch 11.
[0064] In actual applications, other switches may be included between the sending device and the receiving device without limitation.
[0065] The controller 13 is used to determine the transmission delay of the business data to be transmitted according to the time when the source switch 11 receives the business data to be transmitted and the time when the destination switch 12 sends the business data to be transmitted. For example, the controller 13 can be a CNC server, etc. Among them, the server can be a single server, or it can be a server cluster composed of multiple servers. In some implementations, the server cluster can also be a distributed cluster. The embodiments of the present application do not limit the specific technology, specific number and specific device form of the controller 13. The embodiments of the present application do not limit the specific technology, specific number and specific device form of the controller 13.
[0066] Figure 2 FIG. 1 is a schematic diagram showing the structure of another transmission delay determination system 10 provided in an embodiment of the present application. Figure 2 As shown, the controller 13 in the transmission delay determination system 10 may also include a centralized user configuration CUC and a centralized network configuration CNC. User / network configuration information may be transmitted between the CUC and the CNC.
[0067] Figure 3 FIG. 1 is a schematic diagram of a hierarchical module of a transmission delay determination system provided by an embodiment of the present application. Figure 3 As shown, the hierarchical modules in the transmission delay determination system may include a service layer module (ie, CUC+CNC) and a device layer module.
[0068] Among them, CUC is connected to the sending device and the receiving device, and CNC is connected to the switch device.
[0069] Among them, the service layer modules include device management module, flow demand management module, status monitoring module, data processing module, topology module, calculation scheduling module, and visualization module.
[0070] The device management module is used to manage business data requirements. The flow demand management module is used to obtain the business data requirements of terminal devices. The status monitoring module is used to monitor the status of each switch and the input and output traffic of each switch. The data processing module is used to determine the transmission delay of business data. The topology module is used to topologically discover all TSN switches and topological connection relationships. The calculation and scheduling module is used to calculate the configuration of each switch based on business data, topological connection relationships and device capabilities. The visualization module is used to query latency data from the database and present the traffic latency requirements and actual traffic latency through interface visualization charts.
[0071] The device layer module includes a sending device, a source switch, a destination switch, and a receiving device. The functions of the sending device, the source switch, the destination switch, and the receiving device can refer to the above description and will not be repeated here.
[0072] Figure 1 This is just an exemplary framework diagram. Figure 1 The names of the individual devices included in the Figure 1 In addition to the functional nodes shown, other nodes may also be included, which is not limited in the embodiments of the present application.
[0073] When implementing it specifically, Figure 1 Each device in the Figure 3 The structure shown, or including Figure 4 Parts shown. Figure 4 Schematic diagram of the structure of a transmission delay determination device 200 provided in an embodiment of the present application. The transmission delay determination device 200 may be a network device, or the transmission delay determination device 200 may be a chip or a system on chip in the network device. Figure 4 As shown, the transmission delay determination device 200 includes a processor 201 , a communication interface 202 and a communication line 203 .
[0074] Furthermore, the transmission delay determination device 200 may further include a memory 204. The processor 201, the memory 204 and the communication interface 202 may be connected via a communication line 203.
[0075] The processor 201 is a CPU, a general processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 201 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.
[0076] The communication interface 202 is used to communicate with other devices or other communication networks. The communication interface 202 can be a module, a circuit, a communication interface or any device capable of implementing communication.
[0077] The communication line 203 is used to transmit information between the components included in the transmission delay determination device 200.
[0078] The memory 204 is used to store instructions, where the instructions may be computer programs.
[0079] The memory 204 may be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, etc., without limitation.
[0080] It should be noted that the memory 204 can exist independently of the processor 201, or can be integrated with the processor 201. The memory 204 can be used to store instructions or program codes or some data, etc. The memory 204 can be located in the transmission delay determination device 200, or can be located outside the transmission delay determination device 200, without limitation. The processor 201 is used to execute the instructions stored in the memory 204 to implement the transmission delay determination method provided in the following embodiments of the present application.
[0081] In one example, the processor 201 may include one or more CPUs, for example, Figure 4 CPU0 and CPU1 in.
[0082] As an optional implementation, the transmission delay determination device 200 includes multiple processors, for example, Figure 4 In addition to the processor 201, a processor 205 may also be included.
[0083] It should be pointed out that Figure 4 The composition shown in the Figure 1 The limitations of each device in Figure 4 In addition to the parts shown, Figure 1 The individual devices in the Figure 4 More or fewer components, or combinations of certain components, or different arrangements of components.
[0084] In the embodiment of the present application, the chip system may be composed of a chip, or may include a chip and other discrete devices.
[0085] In addition, the actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation. The message name or parameter name in the message exchanged between the various devices in the embodiments of the present application is only an example, and other names can also be used in the specific implementation without limitation.
[0086] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.
[0087] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0088] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0089] Combine the following Figure 1 The transmission delay determination system shown describes the transmission delay determination method provided in an embodiment of the present application.
[0090] Figure 5 A flow chart of a method for determining transmission delay provided in an embodiment of the present application is shown as follows: Figure 5 As shown, the method includes the following S301-S305:
[0091] S301: The source switch determines whether the service data to be transmitted is the destination service data.
[0092] The source switch is a switch connected to the sending device. For example, the source switch may be a TSN switch. The source address of the destination service data is the target source address, and the destination address is the target destination address.
[0093] As a possible implementation, the receiving port of the source switch is configured with an ACL rule, and the source switch can determine whether the service data to be transmitted meets the access control list (ACL) rule through the receiving port, and if the service data to be transmitted meets the ACL rule, determine that the current service data to be transmitted is the destination service data. If the service data to be transmitted does not meet the ACL rule, determine that the current service data to be transmitted is not the destination service data.
[0094] It should be noted that the type of the receiving port of the source switch can be set as required, for example, it can be a Gigabit Ethernet 1 / 1 (GE1 / 1) port.
[0095] In an example, the ACL rule may be that the source address of the service data is 10.20.2.2 / 32 and the destination address is 10.20.2.100 / 32.
[0096] In one example, the specific configuration code of the ACL rule may include:
[0097] acl rule 3frame-type ipv4 sip 10.20.2.2 / 32dip 10.20.2.100 / 32.
[0098] The forwarding process based on ACL rules may include the following S1-S5.
[0099] S1. The receiving port of the network device obtains the service data to be transmitted.
[0100] The network device may be a router, a switch, etc.
[0101] S2. The network device parses the header information of the service data to be transmitted.
[0102] The header information may include source IP address, destination IP address, protocol type, etc.
[0103] S3. The network device matches the header information with the pre-configured ACL rules.
[0104] The number of pre-configured ACL rules is one or more. Different ACL rules are arranged in a preset order, and once a matching rule is found, subsequent rules will no longer be matched.
[0105] The preset order is set as required, for example, the setting time, priority, etc. of the ACL rule can be set.
[0106] S4. Based on the matching result, the network device performs corresponding actions on the service data to be transmitted.
[0107] In one example, if the ACL rule matching the service data to be transmitted allows the service data to be transmitted to pass, the service data to be transmitted is sent to the target IP address.
[0108] In another example, if the ACL rule matching the business data to be transmitted does not allow the business data to be transmitted to pass, the business data to be transmitted is discarded; if the ACL rule matching the business data to be transmitted requires redirecting the business data to be transmitted to other places, corresponding processing is performed.
[0109] In another example, if there is no ACL rule matching the service data to be transmitted, the network device may process the service data to be transmitted according to a default policy, such as discarding or forwarding to a default route.
[0110] S302: When the service data to be transmitted is the destination service data, the source switch sends the first mirrored service data to the controller. Correspondingly, the controller receives the first mirrored service data from the source switch.
[0111] The first mirrored service data is mirrored service data of the destination service data. The controller may be a CNC.
[0112] As a possible implementation manner, the source switch may determine a first timestamp of receiving the destination service data, write the first timestamp into the first mirrored service data, and further send the first mirrored service data with the first timestamp to the controller through a preset interface.
[0113] It should be noted that the preset interface can be set as needed, for example, it can be a southbound interface Netconf, etc.
[0114] As another possible implementation, the source switch may directly send the first mirrored service data to the controller through a preset interface. After receiving the second mirrored service data, the controller may record a timestamp of when it receives the first mirrored service data.
[0115] It should be noted that when the service data to be transmitted currently is not the destination service data, that is, the service data to be transmitted currently does not belong to the service data that needs to be tested, the source switch will not send the first mirrored service data to the controller.
[0116] In actual applications, the source switch can send the service data to be transmitted to the destination switch, and correspondingly, the destination switch receives the service data to be transmitted.
[0117] In an example, after receiving the service data to be transmitted, the source switch may generate mirror service data of the service data to be transmitted, and after generating the mirror service data, send the service data to be transmitted to the destination switch.
[0118] It should be noted that after generating the mirrored service data, the source switch can determine whether the service data to be transmitted complies with the ACL rules through the mirrored service data, and send the first mirrored service data to the controller if the service data to be transmitted complies with the ACL rules. If the service data to be transmitted does not comply with the ACL rules, the mirrored service data is discarded.
[0119] In another example, after receiving the service data to be transmitted, the source switch can determine whether the service data to be transmitted is the destination service data, and if the service data to be transmitted is not the destination service data, send the service data to be transmitted to the destination switch. If the service data to be transmitted is the destination service data, generate mirror service data of the service data to be transmitted, and after generating the mirror service data, send the service data to be transmitted to the destination switch.
[0120] In actual applications, other intermediate switches may be included between the source switch and the destination switch. In the case where other intermediate switches are included between the source switch and the destination switch, the source switch may send the service data to be transmitted to the destination switch through the intermediate switches.
[0121] It should be noted that the execution order of the source switch sending the service data to be transmitted to the destination switch and the source switch sending the first mirrored service data to the controller can be set as required and is not limited here.
[0122] S303: The destination switch determines whether the service data to be transmitted is the destination service data.
[0123] The destination switch is a switch connected to the receiving device. For example, the destination switch may be a TSN switch.
[0124] As a possible implementation, the sending port of the destination switch is configured with an ACL rule, and the destination switch can determine whether the destination service data satisfies the ACL rule through the sending port, and if the service data to be transmitted satisfies the ACL rule, determine that the current service data to be transmitted is the destination service data. If the service data to be transmitted does not satisfy the ACL rule, determine that the current service data to be transmitted is not the destination service data.
[0125] It should be noted that the type of the sending port of the destination switch can be set as required, for example, it can be a Gigabit Ethernet 1 / 8 (GE 1 / 8) port.
[0126] S304: When the service data to be transmitted is the destination service data, the destination switch sends the second mirrored service data to the controller.
[0127] The second mirrored business data is mirrored business data of the destination business data.
[0128] As a possible implementation manner, the destination switch may determine a second timestamp for sending the destination service data, write the second timestamp into the second mirrored service data, and further send the second mirrored service data with the second timestamp to the controller through a preset interface.
[0129] It should be noted that the preset interface can be set as needed, for example, it can be a southbound interface Netconf, etc.
[0130] As another possible implementation manner, the destination switch may directly send the second mirroring service data to the controller through a preset interface. After receiving the second mirroring service data, the controller may record a timestamp of when it receives the second mirroring service data.
[0131] It should be noted that when the service data to be transmitted currently is not the destination service data, that is, the service data to be transmitted currently does not belong to the service data to be tested, the destination switch will not send the second mirror service data to the controller.
[0132] In some embodiments, when the current service data to be transmitted is not the destination service data, the destination switch may directly send the service data to be transmitted to the receiving device.
[0133] S305. The controller determines a data transmission delay of the destination service data from a node corresponding to a source address to a node corresponding to a destination address based on a timestamp carried by the first mirrored service data and a timestamp carried by the second mirrored service data.
[0134] As a possible implementation manner, when the first mirrored service data has a first timestamp and the second mirrored service data has a second timestamp, the controller may determine the difference between the second timestamp and the first timestamp as the transmission delay of the destination service data.
[0135] As another possible implementation, the controller may determine the transmission delay of the destination service data based on the following formula 1.
[0136] T=delay1+delay2+delay3 Formula 1
[0137] Wherein, delay1 is the transmission delay of the destination service data between the sending device and the source switch. delay2 is the difference between the first timestamp and the second timestamp of the destination service data. delay3 is the transmission delay of the destination service data between the destination switch and the receiving device.
[0138] Where, delay1 = L1 / V. delay3 = L2 / V. L1 represents the distance between the sending device and the source switch. V represents the transmission speed of the destination service data. L2 represents the distance between the receiving device and the destination switch.
[0139] In some embodiments, when the first timestamp does not exist in the first mirrored business data and the second timestamp does not exist in the second mirrored business data, the controller may record a third timestamp when the controller receives the first mirrored business data and a fourth timestamp when the controller receives the second mirrored business data, and determine the difference between the third timestamp and the fourth timestamp as the transmission delay of the destination business data.
[0140] In some embodiments, after all the service data to be transmitted are transmitted, the controller may cancel the ACL rules configured on the source switch, and cancel the ACL rules, loopback ports, etc. configured on the destination switch.
[0141] In some embodiments, the controller may use a visual chart to display the transmission delay and delay requirement of the destination service data.
[0142] Based on the technical solution provided by the present application, the transmission delay of the destination service data is determined by the first mirror service data from the source switch and the second mirror service data from the destination switch. Since the first mirror service data and the second mirror service data are mirror service data of the destination service data, the destination service data satisfies the ACL rule. In this way, the service data that needs to be detected for delay can be selected in a targeted manner according to the ACL rule without parsing each service data in the network, which reduces the number of service data parsing and can improve the parsing efficiency of service data transmission delay.
[0143] A possible embodiment, Figure 6 A flow chart of another transmission delay determination method provided in an embodiment of the present application is as follows: Figure 6 As shown, in order to determine the transmission delay of the target service data, S305 of the present application may include the following S401-S402.
[0144] S401: A controller determines whether first mirroring service data and second mirroring service data match.
[0145] The matching of the first mirrored service data and the second mirrored service data means that the first mirrored service data and the second mirrored service data are mirrored service data of the same service data.
[0146] As a possible implementation, the controller may determine whether the identification information of the first mirroring service data and the identification information of the second mirroring service data are the same, and determine that the first mirroring service data and the second mirroring service data match when the identification information of the first mirroring service data and the identification information of the second mirroring service data are the same. If the identification information of the first mirroring service data and the identification information of the second mirroring service data are different, determine that the first mirroring service data and the second mirroring service data do not match.
[0147] It should be noted that the identification information can be set as needed, for example, it can include at least one of the following: Ethernet type, virtual local area network identification, media access control address (MAC) address.
[0148] As another possible implementation, the controller may determine whether the source address and destination address of the first mirroring service data are the same as the source address and destination address of the second mirroring service data, and determine that the first mirroring service data and the second mirroring service data match when the source address of the first mirroring service data and the source address of the second mirroring service data are the same and the destination address of the first mirroring service data and the destination address of the second mirroring service data are the same. When the source address of the first mirroring service data and the source address of the second mirroring service data are not the same, or the destination address of the first mirroring service data and the destination address of the second mirroring service data are different, it is determined that the first mirroring service data and the second mirroring service data do not match.
[0149] S402: When the first mirrored service data and the second mirrored service data match, the controller determines a data transmission delay of the destination service data from a node corresponding to a source address to a node corresponding to a destination address based on a timestamp carried by the first mirrored service data and a timestamp carried by the second mirrored service data.
[0150] The specific process of this step may refer to the above S305 and will not be described in detail here.
[0151] In a possible embodiment, before the source switch sends the first mirrored service data to the controller, the transmission delay determination method in the present application may further include the following S501-S502.
[0152] S501. The source switch performs mirroring processing on destination service data to obtain mirrored destination service data.
[0153] As a possible implementation manner, the receiving port of the source switch may be a mirror port, and the source switch may mirror the destination service data through the mirror port to obtain the mirrored destination service data.
[0154] As another possible implementation, the source switch may mirror the destination service data at the receiving port using a preset packet capture tool based on the port identification information of the receiving port to obtain the mirrored destination service data.
[0155] In some embodiments, the source switch may perform a splitting operation on the destination service data of the receiving port to obtain the destination service data after mirroring.
[0156] In some embodiments, when the destination service data is single-packet flow data, the source switch may mirror the complete destination service data to obtain mirrored destination service data.
[0157] In some other embodiments, when the destination service data is multi-packet flow data, the source switch may mirror any data packet of the destination service data (such as the first received data packet) to obtain the mirrored destination service data.
[0158] It can be understood that selecting one data packet in the multi-packet flow data for processing can reduce unnecessary link load.
[0159] S502: The source switch writes the first timestamp into the mirrored destination service data to obtain first mirrored service data.
[0160] The first timestamp is the timestamp corresponding to the moment when the source switch receives the destination service data.
[0161] As a possible implementation method, the ACL rule also includes reporting the destination service data to the source switch CPU. The source switch can, according to the ACL rule, report the destination service data to the source switch CPU when receiving the destination service data through the receiving port, and write the CPU timestamp as the first timestamp into the mirrored destination service data to obtain the first mirrored service data.
[0162] In one example, when the ACL rule includes reporting the destination service data to the CPU, the specific configuration code of the ACL rule may include:
[0163] acl rule 3ingress interface GigabitEthernet 1 / 1redirect cpu.
[0164] In some embodiments, the receiving port of the source switch is configured with a timestamp writing function for service data, and the source switch can write the first timestamp into the mirrored destination service data through the receiving port to obtain the first mirrored service data.
[0165] In a possible embodiment, before the destination switch sends the second mirrored service data to the controller, the transmission delay determination method in the present application may further include the following S601-S602.
[0166] S601. The destination switch performs mirroring processing on destination service data to obtain mirrored destination service data.
[0167] As a possible implementation manner, the sending port of the destination switch may be a mirror port, and the source switch may mirror the destination service data through the mirror port to obtain the mirrored destination service data.
[0168] As another possible implementation, the destination switch may mirror the destination service data at the sending port based on the port identification information of the sending port using a preset packet capture tool to obtain the mirrored destination service data.
[0169] In some embodiments, the destination switch may perform a splitting operation on the destination service data of the sending port to obtain the destination service data after mirroring.
[0170] In some embodiments, when the destination service data includes multiple data packets, the destination switch may mirror the first data packet to obtain the mirrored destination service data.
[0171] The first data packet is one of the multiple data packets, for example, the first one of the multiple data packets.
[0172] S602: The destination switch writes the second timestamp into the mirrored destination service data to obtain second mirrored service data.
[0173] The second timestamp is a timestamp corresponding to the time when the destination switch sends the destination service data.
[0174] As a possible implementation, when the sending port of the destination switch is not configured with a timestamp writing function, the sending port of the destination switch can send the mirrored destination service data to the loopback interface based on the ACL rule, and the mirrored destination service data enters the destination switch again. The destination switch can report the mirrored destination service data to the CPU of the destination switch according to the ACL rule, and the CPU writes the CPU timestamp at this time as the second timestamp into the mirrored destination service data to obtain the second mirrored service data.
[0175] It should be noted that the destination switch is pre-configured with a loopback interface.
[0176] For example, the type of the loopback interface may be GE1 / 7.
[0177] In one example, the code for configuring the loopback may include:
[0178] acl rule 3frame-type ipv4 sip 10.20.2.2 / 32dip 10.20.2.100 / 32;
[0179] monitor session 1source acl rule 3interface GigabitEthernet 1 / 8tx;
[0180] monitor session 1destination interface GigabitEthernet 1 / 7.
[0181] In one example, the code for reporting the mirrored destination service data to the CPU of the destination switch according to the ACL rule may include:
[0182] interface GigabitEthernet 1 / 7;
[0183] loopback internal.
[0184] It should be noted that, assuming that the service data to be transmitted comes from the destination switch port A and goes out from the port B, the service data to be transmitted is mirrored to the port C at the port B. Its time delay Tc-Tb is not much compared to the transmission delay of the service data to be transmitted in the entire transmission network (TSN switching network), and can be ignored. Tc is the timestamp of the service data to be transmitted mirrored to the port C, and Tb is the timestamp of the service data received by the port B.
[0185] As another possible implementation, when the sending port of the destination switch is configured with a write timestamp function (such as the switch chip supports it), the destination switch can, according to the ACL rule, report the destination service data to the destination switch CPU through the sending port when the sending port receives the destination service data, and write the CPU timestamp as the second timestamp into the mirrored destination service data through the CPU to obtain the second mirrored service data.
[0186] In one example, the code for reporting the ACL rule corresponding to the destination service data to the destination switch CPU through the sending port may include:
[0187] acl rule 3ingress interface GigabitEthernet 1 / 7redirect cpu.
[0188] The embodiment of the present application can divide the transmission delay determination device into functional modules or functional units according to the above method example. For example, each functional module or functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiment of the present application is schematic, which is only a logical function division. There may be other division methods in actual implementation.
[0189] In the case of dividing each functional module into corresponding functional modules, Figure 7 The schematic diagram of the structure of a transmission delay determination device 700 is shown, and the transmission delay determination device may be a controller, or a chip or processor used in the controller, etc. The transmission delay determination device 700 may be used to perform the functions of the transmission delay determination device involved in the above embodiments. Figure 7 The transmission delay determination device 700 shown may include: a receiving unit 701 and a determining unit 702; the receiving unit 701 is used to receive first mirrored service data from a source switch and second mirrored service data from a destination switch; the first mirrored service data and the second mirrored service data are mirrored data of the destination service data; the source address of the destination service data is a target source address, and the destination address is a target destination address; the determining unit 702 is used to determine the data transmission delay of the destination service data from the node corresponding to the source address to the node corresponding to the destination address based on the timestamp carried by the first mirrored service data and the timestamp carried by the second mirrored service data.
[0190] Optionally, the determination unit 702 is specifically used to: determine the data transmission delay of the destination business data from the node corresponding to the source address to the node corresponding to the destination address based on the timestamp carried by the first mirror business data and the timestamp carried by the second mirror business data when the first mirror business data and the second mirror business data match.
[0191] Optionally, the determination unit 702 is also used to determine that the first mirror business data and the second mirror business data match when the identification information of the first mirror business data and the identification information of the second mirror business data are the same; the identification information includes at least one of the following: Ethernet type, virtual local area network identifier, media access control MAC address.
[0192] Optionally, in the case where the destination service data includes multiple data packets, the first mirrored service data and the second mirrored service data are mirrored data of the first data packet; and the first data packet is one of the multiple data packets.
[0193] Figure 8The schematic diagram of the structure of a transmission delay determination device 800 is shown, and the transmission delay determination device can be a source switch, or a chip or processor used in the source switch, etc. The transmission delay determination device 800 can be used to perform the functions of the transmission delay determination device involved in the above embodiments. Figure 8 The transmission delay determination device 800 shown may include: a determination unit 801 and a sending unit 802; the determination unit 801 is used to determine whether the current service data to be transmitted is the destination service data; the source address of the destination service data is the target source address, and the destination address is the target destination address; the sending unit 802 is used to send the first mirror service data to the controller when the current service data to be transmitted is the destination service data, so that the controller determines the transmission delay of the destination service data according to the timestamp carried by the first mirror service data and the timestamp carried by the second mirror service data from the destination switch; the first mirror service data and the second mirror service data are mirror service data of the destination service data.
[0194] Optionally, the device also includes a processing unit 803, which is used to mirror the destination business data before sending the first mirrored business data to the controller to obtain the mirrored destination business data; the processing unit 803 is also used to write the first timestamp into the mirrored destination business data to obtain the first mirrored business data; the first timestamp is the timestamp corresponding to the moment when the source switch receives the destination business data.
[0195] Optionally, in the case where the destination service data includes multiple data packets, the processing unit 803 is specifically used to: mirror the first data packet to obtain the mirrored destination service data; the first data packet is one of the multiple data packets.
[0196] Fig. 9 The schematic diagram of the structure of a transmission delay determination device 900 is shown, and the transmission delay determination device can be a destination switch, or a chip or processor used in the destination switch, etc. The transmission delay determination device 900 can be used to perform the functions of the transmission delay determination device involved in the above embodiments. Fig. 9The transmission delay determination device 900 shown may include: a determination unit 901 and a sending unit 902; the determination unit 901 is used to determine whether the current service data to be transmitted is the destination service data; the source address of the destination service data is the target source address, and the destination address is the target destination address; the sending unit 902 is used to send the second mirror service data to the controller when the current service data to be transmitted is the destination service data, so that the controller determines the transmission delay of the destination service data according to the timestamp carried by the first mirror service data and the timestamp carried by the second mirror service data from the destination switch; the first mirror service data and the second mirror service data are mirror service data of the destination service data.
[0197] Optionally, the device also includes a processing unit 903; before sending the second mirrored business data to the controller, the processing unit 903 is used to mirror the destination business data to obtain the mirrored destination business data; the processing unit 903 is also used to write a second timestamp into the mirrored destination business data to obtain the second mirrored business data; the second timestamp is a timestamp corresponding to the moment when the destination switch sends the destination business data.
[0198] Optionally, in the case where the destination service data includes multiple data packets, the processing unit 903 is specifically used to: mirror the first data packet to obtain the mirrored destination service data; the first data packet is one of the multiple data packets.
[0199] Optionally, the processing unit 903 is further configured to: when the sending port of the destination switch has a function of writing a timestamp, write the second timestamp into the mirrored destination service data using the sending port of the destination switch.
[0200] Optionally, the processing unit 903 is further specifically used to: when the sending port of the destination switch is not configured with a write timestamp function, use the loopback interface of the destination switch to send the mirrored destination service data to the processor of the destination switch; and write a second timestamp into the mirrored destination service data based on the processor.
[0201] The embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by a computer program to instruct the relevant hardware, and the program can be stored in the above computer-readable storage medium. When the program is executed, it may include the processes of the above method embodiments. The computer-readable storage medium can be an internal storage unit of the transmission delay determination device (including the data sending end and / or the data receiving end) of any of the above embodiments, such as a hard disk or memory of the transmission delay determination device. The above computer-readable storage medium can also be an external storage device of the above terminal device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the above terminal device. Further, the above computer-readable storage medium can also include both the internal storage unit of the above transmission delay determination device and an external storage device. The above computer-readable storage medium is used to store the above computer program and other programs and data required by the above transmission delay determination device. The above computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0202] It should be noted that the terms "first" and "second" in the specification, claims and drawings of the present application are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0203] It should be understood that in the present application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three and more than three, and "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0204] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0205] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, 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.
[0206] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0207] 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.
[0208] If the integrated 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 readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.
[0209] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for determining transmission delay, characterized in that: Applied to a controller, the method comprises: Receive first mirrored service data from a source switch and second mirrored service data from a destination switch; the first mirrored service data and the second mirrored service data are mirrored data of destination service data; the source address of the destination service data is a target source address, and the destination address is a target destination address; Based on the timestamp carried by the first mirrored service data and the timestamp carried by the second mirrored service data, a data transmission delay of the destination service data from the node corresponding to the source address to the node corresponding to the destination address is determined.
2. The method according to claim 1, characterized in that The determining, based on the timestamp carried by the first mirrored service data and the timestamp carried by the second mirrored service data, a data transmission delay between the destination service data from the node corresponding to the source address to the node corresponding to the destination address comprises: When the first mirrored service data and the second mirrored service data match, the data transmission delay of the destination service data from the node corresponding to the source address to the node corresponding to the destination address is determined based on the timestamp carried by the first mirrored service data and the timestamp carried by the second mirrored service data.
3. The method according to claim 2, characterized in that The method further comprises: When the identification information of the first mirroring service data and the identification information of the second mirroring service data are the same, it is determined that the first mirroring service data and the second mirroring service data match; the identification information includes at least one of the following: Ethernet type, virtual local area network identifier, media access control MAC address.
4. The method according to any one of claims 1 to 3, characterized in that In the case where the destination service data includes multiple data packets, the first mirrored service data and the second mirrored service data are mirrored data of a first data packet; and the first data packet is one of the multiple data packets.
5. A method for determining transmission delay, characterized in that: Applied to a source switch, the method comprises: Determine whether the current service data to be transmitted is the destination service data; the source address of the destination service data is the target source address, and the destination address is the target destination address; In a case where the current service data to be transmitted is the destination service data, first mirror service data is sent to the controller, so that the controller determines the transmission delay of the destination service data according to the timestamp carried by the first mirror service data and the timestamp carried by the second mirror service data from the destination switch; the first mirror service data and the second mirror service data are mirror service data of the destination service data.
6. The method according to claim 5, characterized in that Before sending the first mirroring service data to the controller, the method further includes: Performing mirroring on the destination service data to obtain mirrored destination service data; A first timestamp is written into the mirrored destination service data to obtain the first mirrored service data; the first timestamp is a timestamp corresponding to the moment when the source switch receives the destination service data.
7. The method according to claim 6, characterized in that In a case where the destination service data includes a plurality of data packets, mirroring the destination service data to obtain the mirrored destination service data includes: Mirroring is performed on a first data packet to obtain mirrored destination service data; the first data packet is one of the multiple data packets.
8. A method for determining transmission delay, characterized in that: Applied to a destination switch, the method includes: Determine whether the current service data to be transmitted is the destination service data; the source address of the destination service data is the target source address, and the destination address is the target destination address; In a case where the current service data to be transmitted is the destination service data, second mirror service data is sent to the controller, so that the controller determines the transmission delay of the destination service data according to the timestamp carried by the first mirror service data and the timestamp carried by the second mirror service data from the destination switch; the first mirror service data and the second mirror service data are mirror service data of the destination service data.
9. The method according to claim 8, characterized in that Before sending the second mirroring service data to the controller, the method further includes: Performing mirroring on the destination service data to obtain mirrored destination service data; A second timestamp is written into the mirrored destination service data to obtain the second mirrored service data; the second timestamp is a timestamp corresponding to the moment when the destination switch sends the destination service data.
10. The method according to claim 9, characterized in that In a case where the destination service data includes a plurality of data packets, mirroring the destination service data to obtain the mirrored destination service data includes: Mirroring is performed on a first data packet to obtain mirrored destination service data; the first data packet is one of the multiple data packets.
11. The method according to claim 9, characterized in that In the case where the sending port of the destination switch has a function of writing a timestamp, writing the second timestamp into the mirrored destination service data includes: The second timestamp is written into the mirrored destination service data using the sending port of the destination switch.
12. The method according to claim 9, characterized in that In the case that the sending port of the destination switch is not configured with a timestamp writing function, writing the second timestamp into the mirrored destination service data includes: Using the loopback interface of the destination switch, sending the mirrored destination service data to the processor of the destination switch; The processor writes the second timestamp into the mirrored destination service data.
13. A transmission delay determination device, characterized in that: Applied to a controller, the device comprises: a receiving unit, a determining unit; The receiving unit is used to receive first mirrored service data from a source switch and second mirrored service data from a destination switch; the first mirrored service data and the second mirrored service data are mirrored data of destination service data; the source address of the destination service data is a target source address, and the destination address is a target destination address; The determining unit is used to determine the data transmission delay of the destination service data from the node corresponding to the source address to the node corresponding to the destination address based on the timestamp carried by the first mirror service data and the timestamp carried by the second mirror service data.
14. A transmission delay determination device, characterized in that: Applied to a source switch, the device comprises: a determination unit and a sending unit; The determination unit is used to determine whether the current service data to be transmitted is the destination service data; the source address of the destination service data is the target source address, and the destination address is the target destination address; The sending unit is used to send first mirrored business data to the controller when the current business data to be transmitted is the destination business data, so that the controller determines the transmission delay of the destination business data according to the timestamp carried by the first mirrored business data and the timestamp carried by the second mirrored business data from the destination switch; the first mirrored business data and the second mirrored business data are mirrored business data of the destination business data.
15. A transmission delay determination device, characterized in that: Applied to a destination switch, the device comprises: a determining unit and a sending unit; The determination unit is used to determine whether the current service data to be transmitted is the destination service data; the source address of the destination service data is the target source address, and the destination address is the target destination address; The sending unit is used to send second mirrored business data to the controller when the current business data to be transmitted is the destination business data, so that the controller determines the transmission delay of the destination business data according to the timestamp carried by the first mirrored business data and the timestamp carried by the second mirrored business data from the destination switch; the first mirrored business data and the second mirrored business data are mirrored business data of the destination business data.
16. A computer-readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 4, or any one of claims 5 to 7, or any one of claims 8 to 12 is implemented.
17. An electronic device, characterized in that: include: A processor, a memory and a communication interface; wherein the communication interface is used for the electronic device to communicate with other devices or networks; The memory is used to store one or more programs, which include computer-executable instructions. When the electronic device is running, the processor executes the computer-executable instructions stored in the memory to enable the electronic device to perform any one of claims 1-4, any one of claims 5-7, or any one of claims 8-12.
18. A computer program product, comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 4, or any one of claims 5 to 7, or any one of claims 8 to 12 is implemented.
