Transmission delay determination method and device, medium, equipment and product
By sending a request message to the destination switch in a time-sensitive network to obtain transmission delay feedback, the problem of low delay detection efficiency in the target service data in TSN is solved, and fast and efficient delay detection is achieved.
Patent Information
- Application Number
- CN202411534574.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-01-03
AI Technical Summary
In time-sensitive networks (TSNs), the transmission delay efficiency of determining the target service data is poor, because each service data needs to be parsed one by one, resulting in waste of resources and high detection complexity.
By sending a request message to the destination switch, the transmission delay feedback information of the target service data from the source address to the destination address is obtained, the number of service data analyses for the intermediate switch is reduced, and the efficiency of delay detection is improved.
It realizes rapid determination of the transmission delay of target service data, reduces detection complexity and resource usage, and improves delay detection efficiency.
Smart Images

Figure CN119254672A_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 target 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 target 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 target business data.
[0005] In order to achieve the above objectives, 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: sending a first request message to a destination switch; the first request message is used to request a transmission delay of target business data; the source address of the target business data is a target source address, and the destination address is a target destination address; receiving first feedback information from the destination switch, the first feedback information is used to indicate a transmission delay of the target business data from a source node corresponding to the target source address to a target node corresponding to the target destination address.
[0007] Optionally, the transmission delay is determined by the destination switch based on the first transmission delay and the second transmission delay of the target service data staying in the destination switch; the first transmission delay is the cumulative duration of staying in the intermediate switch; the intermediate switch is the switch between the source node and the destination switch.
[0008] Optionally, the method further includes: sending a first indication message to the intermediate switch; the first indication message is used to instruct the intermediate switch to send the target service data carrying the first transmission delay to the next node of the intermediate switch when receiving the target service data.
[0009] Optionally, the method also includes: obtaining location information of multiple switches connected to the controller; determining a destination switch from the multiple switches based on the location information; the destination switch is a switch among the multiple switches whose node distance corresponding to the destination address is less than a distance threshold and whose delay is less than a delay threshold.
[0010] Based on the technical solution provided by the present application, by sending a first request message requesting the transmission delay of the target business data, the first feedback information from the destination switch can be received, and the first feedback information is used to indicate the transmission delay of the target business data from the source node corresponding to the target source address to the target node corresponding to the target destination address. Since the source address of the target business data is the target source address and the destination address is the target destination address. In this way, the switch can selectively select the business data that needs to be delayed detected, and the switch does not need to parse each business data flowing through itself, which reduces the number of business data parsing and can improve the parsing efficiency of the business data transmission delay.
[0011] In a second aspect, a method for determining transmission delay is provided, which is applied to a switch, and the method includes: upon receiving first request information from a controller, sending first feedback information to the controller; the first request information is used to request to obtain the transmission delay of target business data, the source address of the target business data is the target source address, and the destination address is the target destination address; the first feedback information is used to indicate the transmission delay of the target business data from the source node corresponding to the target source address to the target corresponding to the target destination address.
[0012] Optionally, the method also includes: determining a first transmission delay carried by the target business data, and a second transmission delay staying in the destination switch; the first transmission delay is the cumulative duration of staying in the intermediate switch; the intermediate switch is the switch between the node corresponding to the source address and the destination switch; based on the first transmission delay and the second transmission delay, determining the transmission delay of the target business data from the node corresponding to the source address to the node corresponding to the destination address.
[0013] Optionally, the method further includes: recording a first timestamp of the target service data at a receiving port of the destination switch and a second timestamp of the target service data at a sending port of the destination switch; and determining a second transmission delay of the target service data staying at the destination switch based on the first timestamp and the second timestamp.
[0014] According to a third aspect, a transmission delay determination device is provided, which is applied to a controller, and the device includes: a sending unit, which is used to send a first request message to a destination switch; the first request message is used to request the transmission delay of target business data; the source address of the target business data is the target source address, and the destination address is the target destination address; a receiving unit is used to receive first feedback information from the destination switch, and the first feedback information is used to indicate the transmission delay of the target business data from the source node corresponding to the target source address to the target node corresponding to the target destination address.
[0015] Optionally, the transmission delay is determined by the destination switch based on the first transmission delay and the second transmission delay staying in the destination switch; the first transmission delay is the accumulated time staying in the intermediate switch; the intermediate switch is the switch between the source node and the destination switch.
[0016] Optionally, the sending unit is further used to send a first indication message to the intermediate switch; the first indication message is used to instruct the intermediate switch to send the target service data carrying the first transmission delay to the next node of the intermediate switch when receiving the target service data.
[0017] Optionally, the device also includes: a processing unit; a processing unit, used to obtain location information of multiple switches connected to the controller; the processing unit is also used to determine a destination switch from multiple switches based on the location information; the destination switch is a switch among the multiple switches whose node distance corresponding to the destination address is less than a distance threshold and whose delay is less than a delay threshold.
[0018] In a fourth aspect, a transmission delay determination device is provided, which is applied to a destination switch, and the device includes: a receiving unit and a sending unit; the receiving unit is used to receive a first request information from a controller; the first request information is used to request to obtain the transmission delay of target business data, and the source address of the target business data is a target source address, and the destination address is a target destination address; the sending unit is used to send first feedback information to the controller when receiving the first request information from the controller; the first feedback information is used to indicate the transmission delay of the target business data from the source node corresponding to the target source address to the target corresponding to the target destination address.
[0019] Optionally, the device also includes: a processing unit, which is used to determine a first transmission delay carried by the target business data and a second transmission delay staying in the destination switch; the first transmission delay is the cumulative time staying in the intermediate switch; the intermediate switch is the switch between the node corresponding to the source address and the destination switch; the processing unit is also used to determine the transmission delay of the target business data from the node corresponding to the source address to the node corresponding to the destination address based on the first transmission delay and the second transmission delay.
[0020] Optionally, the processing unit is further used to record a first timestamp of the target service data at a receiving port of the switch and a second timestamp of the target service data at a sending port of the switch; the processing unit is further used to determine a second transmission delay staying in the switch based on the first timestamp and the second timestamp.
[0021] In a fifth 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.
[0022] 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.
[0023] In the sixth 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.
[0024] In a seventh 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.
[0025] In an eighth 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.
[0026] In a ninth aspect, a chip system is provided, the chip system including a processor and a communication interface, 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
[0027] Figure 1 A schematic diagram of the structure of a transmission delay determination system provided in an embodiment of the present application;
[0028] Figure 2 A schematic diagram of the structure of another transmission delay determination system provided in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of the structure of a transmission delay determination device provided in an embodiment of the present application;
[0030] Figure 4 A flow chart of a method for determining transmission delay provided in an embodiment of the present application;
[0031] Figure 5 A flowchart of another transmission delay determination method provided in an embodiment of the present application;
[0032] Figure 6 A flowchart of another transmission delay determination method provided in an embodiment of the present application;
[0033] Figure 7 A schematic diagram of the structure of another transmission delay determination device provided in an embodiment of the present application;
[0034] Figure 8 A schematic diagram of the structure of another transmission delay determination device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] 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.
[0036] 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.
[0037] 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.
[0038] Time-sensitive networks 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.
[0039] 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).
[0040] 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).
[0041] 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.
[0042] 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.
[0043] 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.
[0044] 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 target 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 target service data.
[0045] 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.
[0046] In view of this, an embodiment of the present application provides a method for determining a transmission delay, including: sending a first request message to a destination switch; the first request message is used to request a transmission delay for target business data; the source address of the target business data is a target source address, and the destination address is a target destination address; receiving first feedback information from the destination switch, the first feedback information is used to indicate a transmission delay between the target business data from a source node corresponding to the target source address to a target node corresponding to the target destination address.
[0047] The method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0048] 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.
[0049] 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 switch 11 and a controller 12 .
[0050] The switch 11 and the controller 12 are connected. For example, the switch 11 and the controller 12 may be connected wirelessly, or they may be connected wiredly. There is no limitation.
[0051] Among them, the switch 11 involved in the embodiment of the present application is used to forward the business data to be transmitted from its sending device (also called talker) to the receiving device (also called listener). For example, the switch 11 includes an intermediate switch and a destination switch. The intermediate switch is a switch between the node corresponding to the source address of the business data to be transmitted and the destination switch. The destination switch is a switch among the multiple switches connected to the controller whose distance to the node corresponding to the destination address is less than the distance threshold and whose delay is less than the delay threshold. The embodiments of the present application do not limit the specific technology, specific number and specific device form adopted by the switch 11.
[0052] In practical applications, the number of intermediate switches may be one or more, without limitation. The switch may be a TSN switch (TSN switch, TSN SW).
[0053] The controller 12 is used to send a first request message to the destination switch; the first request message is used to request the transmission delay of the target business data, and determine the transmission delay of the target business data from the source node corresponding to the target source address to the target node corresponding to the target destination address based on the first feedback information received from the destination switch. For example, the controller 12 can be a CNC, etc. server. 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 12. The embodiments of the present application do not limit the specific technology, specific number and specific device form of the controller 12.
[0054] 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 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. The number of switches may be 3. For example, it may include switch 1, switch 2, and switch 3.
[0055] The CUC is connected to the transmitting device and the receiving device. The CNC is connected to the switch. The number of switches is only an exemplary description, and the transmission delay determination system may include one or more of switch 1, switch 2, and switch 3. It may also include other switches besides switch 1, switch 2, and switch 3.
[0056] Among them, the functions implemented by CUC and CNC include: topology management function, flow demand management function, scheduling calculation function, subscription flow delay function, delay data storage, analysis, and presentation function.
[0057] Topology management function: used to obtain and maintain network device information, network topology information, and retrieve device TSN capabilities.
[0058] Flow demand management function: used for business flow identification, characteristic parameter description (source address and destination address, cycle, rate, VLAN, priority, byte size, etc.), delay requirements, etc.
[0059] Scheduling calculation function: It is used to integrate topology, device information, and flow requirements, generate flow forwarding paths and TSN network configurations through scheduling algorithms, and can issue configurations. The configuration includes information about flows that require latency measurement. Determine the proxy switch closest to the listener based on latency requirements and forwarding paths.
[0060] Subscription flow delay function: According to the delay requirements, initiate a subscription to one or more flow delays to the destination switch.
[0061] Delay data storage, analysis, and presentation functions: used to receive flow delay messages and extract delay information; store data, distinguish different flow delays according to flow characteristics for delay analysis, and visualize the delay result information. For example, you can use a chart to display real-time delay data as a dynamically changing curve. You can also analyze the data to present data such as maximum delay, average delay, and minimum delay.
[0062] The functions implemented by the switch include: message receiving function, flow identification function, delay measurement function, message forwarding function, and flow delay function based on subscription.
[0063] Message receiving function: used to receive stream messages.
[0064] Flow identification function: It is used to configure the switch to identify the ingress flow and match the messages that need delay measurement according to the configuration sent by the CNC.
[0065] Delay measurement function: used to measure the delay of matching messages. First, the switch should add bytes to the matching messages to store the delay information. The delay measurement can be performed by hop-by-hop accumulation. Each switch measures the residence time of the message in the switch and adds the value to the byte storing the delay information, thereby obtaining the delay value from the first switch to the current switch. Here, since the propagation rate of the signal in the line is the speed of light, that is, the propagation delay of a 1-meter line is about 3ns, and that of a 1000-meter line is about 1us, the transmission delay between switches accounts for a small proportion of the delay and can be ignored.
[0066] Message forwarding function: used to forward messages to the next switch or terminal device according to Ethernet forwarding rules. If it is the destination switch (also called the proxy switch), it removes the delay information before forwarding to the terminal switch (listener).
[0067] Publish stream delay function based on subscription: If it is a proxy switch, it will receive a subscription request for stream delay, and then the switch will forward the message with delay information to the CNC; if it is not a proxy switch, there is no such operation.
[0068] 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.
[0069] When implementing it specifically, Figure 1 Each device in the Figure 3 The structure shown, or including Figure 4 Parts shown. Figure 3 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 3 As shown, the transmission delay determination device 200 includes a processor 201 , a communication interface 202 and a communication line 203 .
[0070] Furthermore, the transmission delay determination device 200 may also include a memory 204. The processor 201, the memory 204 and the communication interface 202 may be connected via a communication line 203.
[0071] 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.
[0072] 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.
[0073] The communication line 203 is used to transmit information between the components included in the transmission delay determination device 200.
[0074] The memory 204 is used to store instructions, where the instructions may be computer programs.
[0075] 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.
[0076] 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.
[0077] In one example, the processor 201 may include one or more CPUs, for example, Figure 3 CPU0 and CPU1 in.
[0078] As an optional implementation, the transmission delay determination device 200 includes multiple processors, for example, Figure 3 In addition to the processor 201, a processor 205 may also be included.
[0079] It should be pointed out that Figure 3 The composition shown in the Figure 1 The limitations of each device in Figure 3 In addition to the parts shown, Figure 1 The individual devices in the Figure 3 More or fewer components, or combinations of certain components, or different arrangements of components.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] Figure 4 A flow chart of a method for determining transmission delay provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the method includes the following S301-S302:
[0087] S301: The controller sends a first request message to a destination switch. Correspondingly, the destination switch receives the first request message.
[0088] The first request message is used to request the transmission delay of the target service data; the source address of the target service data is the target source address, and the destination address is the target destination address. The first request message includes an identifier of the target service data. The identifier includes the target source address and the target destination address.
[0089] The target source address and the target destination address can be set as needed. In an example, the target source address can be 10.20.2.2 / 32 and the target destination address can be 10.20.2.100 / 32.
[0090] As a possible implementation manner, the controller may send a first request message to the destination switch in response to the control instruction.
[0091] It should be noted that the control instruction may refer to an instruction generated in response to a control operation of an operator. For example, the control instruction may be an instruction input by an operator through an input device (such as a keyboard) of a computer.
[0092] As another possible implementation manner, the controller may send a first request message to the destination switch after sending a configuration command to the destination switch.
[0093] The configuration command is used to instruct the destination switch to calculate the cumulative delay of the target service data staying in the switch between the sending device and the receiving device.
[0094] For example, combined with Figure 2 The accumulated delay can be the sum of the delay of the target service data staying in switch 1, the delay of the target service data staying in switch 2, and the delay of the target service data staying in switch 3.
[0095] In one example, the specific code of the configuration command may include:
[0096] swtich#stream delay<stream id> src-ip<ip_addr> src-mac<mac_addr> dst-ip<ip_addr> dst-mac<mac_addr> vlan <vid>pri<0-7> / / Delay accumulation matches flow characteristics.
[0097] swtich#stream delay enable / / Delay accumulation is enabled.
[0098] It should be noted that the destination switch is a switch among multiple switches whose node distance to the node corresponding to the destination address is less than the distance threshold and whose delay is less than the delay threshold. Figure 2 Switch 3 in.
[0099] The distance threshold and the delay threshold can be set as needed. For example, the distance threshold can be 1000 meters, etc. The delay threshold can be 1 millisecond, etc.
[0100] In one example, the controller can obtain location information of multiple switches connected to the controller, and based on the location information, determine the distance between each switch and the node corresponding to the destination address, and determine the switch among the multiple switches whose distance to the node corresponding to the destination address is less than a distance threshold and whose delay is less than a delay threshold as the destination switch.
[0101] S302: The destination switch sends first feedback information to the controller. Correspondingly, the controller receives the first feedback information from the destination switch.
[0102] The first feedback information is used to indicate the transmission delay of the target service data from the source node corresponding to the target source address to the target corresponding to the target destination address.
[0103] As a possible implementation, the destination switch and the controller are installed with an MQTT client, and after generating the first feedback information, the destination switch can send the first feedback information to the MQTT server through the MQTT client. Further, the MQTT server forwards the first feedback information to the controller based on the MQTT client installed on the controller.
[0104] In some embodiments, the first feedback information may further include the QoS level of the target service data.
[0105] In some embodiments, each piece of business data may correspond to a data ID. The controller may bind the destination business data according to the data ID of the destination business data, and after binding the destination business data, the MQTT server may send the transmission delay of the destination business data to the controller after receiving the controller's subscription request for the transmission delay of the destination business data, and the controller may store, analyze and visualize the transmission delay of the destination business data.
[0106] In some embodiments, the MQTT server can also be embedded in the destination switch. In this way, the transmission delay of the destination service data can be directly sent from the destination switch to the controller, which will not occupy other resources in the network, thereby improving the utilization rate of network resources.
[0107] In one example, when the MQTT server can also be embedded in the destination switch, the specific code of the configuration command may include:
[0108] swtich#MQTT server<ip_addr / mask> / / MQTT server.
[0109] swtich#MQTT topic<stream id> / / The topic where MQTT publishes latency data.
[0110] swtich#MQTT client<ip_addr> / / Destination switch ID.
[0111] As another possible implementation manner, the destination switch may directly send the first feedback information to the controller through a preset interface.
[0112] It should be noted that the preset interface can be set as needed, for example, it can be a southbound interface Netconf, etc.
[0113] Based on the technical solution provided by the present application, by sending a first request message requesting the transmission delay of the target business data, the first feedback information from the destination switch can be received, and the first feedback information is used to indicate the transmission delay of the target business data from the source node corresponding to the target source address to the target node corresponding to the target destination address. Since the source address of the target business data is the target source address and the destination address is the target destination address. In this way, the switch can selectively select the business data that needs to be delayed detected, and the switch does not need to parse each business data flowing through itself, which reduces the number of business data parsing and can improve the parsing efficiency of the business data transmission delay.
[0114] A possible embodiment, Figure 5 A flow chart of another method for determining transmission delay provided in an embodiment of the present application is shown as follows: Figure 5 As shown, in order to determine the transmission delay of the target service data, the transmission delay determination method of the present application may also include the following S401-S402.
[0115] S401. The destination switch determines a first transmission delay carried by target service data and a second transmission delay staying in the destination switch.
[0116] The first transmission delay is the accumulated time spent in the intermediate switch. The intermediate switch is the switch between the node corresponding to the source address and the destination switch. Figure 2 , the node corresponding to the source address can be a sending device. The intermediate switches can be switch 1 and switch 2.
[0117] In an example, when the intermediate switches include switch 1 and switch 2, the duration of staying in switch 1 may be ΔT1=Tb-Ta, and the duration of staying in switch 2 may be ΔT2=Td-Tc.
[0118] Wherein, ΔT1 represents the duration of staying at switch 1. Tb represents the timestamp of receiving the target service data at the sending port of switch 1. Ta represents the timestamp of receiving the target service data at the receiving port of switch 1. Tc represents the timestamp of receiving the target service data at the sending port of switch 2. Tc represents the timestamp of receiving the target service data at the receiving port of switch 2.
[0119] As a possible implementation manner, after receiving the target service data, the destination switch may parse the target service data to obtain a first transmission delay from preset bytes of the target service data. Further, the destination switch may record a first timestamp of the target service data at a receiving port of the destination switch and a second timestamp at a sending port of the destination switch, and determine the difference between the first timestamp and the second timestamp as a second transmission delay at the destination switch.
[0120] It should be noted that the preset byte is used to store the transmission delay. The preset byte may be a byte preset in the target service data. In the case where the preset byte is not set in the target service data, the intermediate switch may add the preset byte to the target service data.
[0121] It should be noted that the destination switch determines the first transmission delay carried by the target service data and the second transmission delay staying in the switch when receiving the first request information from the controller (ie, the switch is the destination switch).
[0122] S402: The destination switch determines a transmission delay of target service data from a node corresponding to a source address to a node corresponding to a destination address based on the first transmission delay and the second transmission delay.
[0123] As a possible implementation manner, after determining the first transmission delay and the second transmission delay, the destination switch may determine the sum of the first transmission delay and the second transmission delay as the transmission delay of the target service data from the node corresponding to the source address to the node corresponding to the destination address.
[0124] As you can understand, the transmission delay of the switch is calculated by accumulation, which does not depend on the time synchronization of the entire network and the quality of time synchronization. Each switch calculates the delay based on the local time. The delay calculation is implemented on the switch side, reducing the load on the computing center on the controller side.
[0125] In a possible implementation example, before S401, the transmission delay determination method of the present application may further include the following S501.
[0126] S501: The destination switch determines whether the service data to be transmitted is target service data.
[0127] As a possible implementation, the receiving port of the destination switch is configured with an access control list (ACL) rule, and the destination switch can determine whether the target service data meets the ACL rule through the sending port, and if the service data to be transmitted meets the ACL rule, determine that the current service data to be transmitted is the target 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 target service data.
[0128] 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.
[0129] It should be noted that when the service data to be transmitted is not the target service data, that is, the service data to be transmitted does not belong to the service data to be tested, the switch will not generate a delay for the service data to be transmitted to stay in the switch.
[0130] As another possible implementation, the destination switch may determine whether the service data to be transmitted currently has a preset byte for storing delay information. If the preset byte exists, the service data to be transmitted currently is determined to be the target service data. If the preset byte does not exist, the service data to be transmitted currently is determined not to be the target service data.
[0131] In some embodiments, when the current service data to be transmitted is not the target service data, the destination switch may directly send the service data to be transmitted to the receiving device.
[0132] In some embodiments, after all the service data to be transmitted are transmitted, the controller may cancel the ACL rule configured on the switch.
[0133] In one example, the forwarding process based on ACL rules may include the following S1-S4.
[0134] S1. The receiving port of the destination switch obtains the service data to be transmitted.
[0135] S2. The destination switch parses the header information of the service data to be transmitted.
[0136] The header information may include source IP address, destination IP address, protocol type, etc.
[0137] S3. The destination switch matches the header information with the pre-configured ACL rules.
[0138] 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.
[0139] The preset order is set as required, for example, the setting time, priority, etc. of the ACL rule can be set.
[0140] S4. According to the matching result, the destination switch performs corresponding actions on the service data to be transmitted.
[0141] 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.
[0142] 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.
[0143] In another example, if there is no ACL rule matching the service data to be transmitted, the switch may process the service data to be transmitted according to a default policy, such as discarding or forwarding to a default route.
[0144] In a possible embodiment, in order to determine the transmission delay of the target service data, the transmission delay determination method of the present application may further include the following S601-S602.
[0145] S601: The controller sends a first indication message to the intermediate switch. Correspondingly, the intermediate switch receives the first indication message.
[0146] The first indication message is used to instruct the intermediate switch to send the target service data carrying the first transmission delay to the next node of the intermediate switch when receiving the target service data.
[0147] S602: The intermediate switch sends target service data carrying a first transmission delay to a next node of the intermediate switch.
[0148] The number of intermediate switches may be one or more.
[0149] As a possible implementation manner, when the number of intermediate switches may be one, the next node of the intermediate switch is the destination switch, and the intermediate switch may directly send the target service data carrying the first transmission delay to the destination switch.
[0150] In some embodiments, when there are multiple intermediate switches, each intermediate switch can determine the residence time of the target business data in itself and the cumulative residence time of the target business data in the upstream switch, determine the sum of its own residence time and the cumulative residence time in the upstream switch as the current cumulative residence time, send the current cumulative residence time to the next node, and when the next node is the destination switch, determine the current cumulative residence time as the first transmission delay.
[0151] In one example, the target service data stays for a time ΔT2 in the current intermediate switch. The cumulative stay time of the target service data in the upstream switch is ΔT1. The value of the field ΔT in the message is accumulated, that is, the current cumulative stay time ΔT = ΔT1 + ΔT2. Then it is sent to the next node along with the target service data. When the next node is the destination switch, the current cumulative stay time ΔT = ΔT1 + ΔT2 is determined as the first transmission delay.
[0152] When the next node is not the destination switch, the process is repeated until the next node is the destination switch. At this time, ΔT=ΔT1+ΔT2+…+ΔTn. ΔTn is the residence time of the nth intermediate switch. The next node of the nth intermediate switch is the destination switch.
[0153] In some embodiments, when the target service data is multi-packet flow data (ie, there are multiple data packets), the intermediate switch may store the first transmission delay in a preset byte of the first data packet. The first data packet is any one of the multiple data packets.
[0154] It can be understood that selecting one data packet in the multi-packet flow data for processing can reduce unnecessary link load.
[0155] In actual applications, the intermediate switch can report the target service data to the switch CPU when the target service data is received through the receiving port, and use the CPU timestamp as the timestamp of receiving the target service data. When the sending port of the intermediate switch receives the target service data, the sending port can report the target service data to the switch CPU, and use the CPU timestamp as the timestamp of receiving the target service data at the sending port.
[0156] For example, the intermediate switch is pre-configured with a loopback interface. The sending port of the intermediate switch can report the target service data to the switch CPU through the loopback interface.
[0157] A possible embodiment, Figure 6 A flow chart of another method for determining transmission delay provided in an embodiment of the present application is shown as follows: Figure 6 As shown, the transmission delay determination method of the present application may also include the following S701-S706.
[0158] S701. The controller obtains network topology information and device information.
[0159] The topology information may include the connection relationship of switches in the network. The device information may include the address information (such as geographical location, IP address, etc.) of switches in the network.
[0160] In one example, the controller can perform automatic topology discovery on the network based on the CNC to obtain network topology information and device information; the interface protocol used can be netconf or SNMP.
[0161] It should be noted that the centralized network configuration entities corresponding to the switch and the controller support the same protocol.
[0162] S702: The controller obtains the service data requirement and latency requirement of the terminal, and presents characteristic parameters of the service data requirement according to the service data requirement.
[0163] Among them, the service data requirement (also called flow requirement) and delay requirement can be pre-entered by the user as needed. The characteristic parameters include source address and destination address, cycle, rate, vlan, priority, byte size, etc. Each service data has a unique ID number.
[0164] S703: The controller sends a configuration message to the switch.
[0165] The configuration message is used to instruct the switch to perform cumulative processing on the transmission delay of the destination service data.
[0166] S704: The terminal device sends target service data to the switch.
[0167] S705: The controller sends a first request message to the switch.
[0168] The specific description of this step may refer to S301 and will not be repeated here.
[0169] S706: The controller receives first feedback information from the destination switch.
[0170] The specific description of this step may refer to S302 and will not be repeated here.
[0171] 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.
[0172] 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 800 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 800 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 800 shown may include: a sending unit 801, used to send a first request message to a destination switch; the first request message is used to request the transmission delay of target business data; the source address of the target business data is the target source address, and the destination address is the target destination address; a receiving unit, used to receive first feedback information from the destination switch, the first feedback information is used to indicate the transmission delay of the target business data from the source node corresponding to the target source address to the target node corresponding to the target destination address.
[0173] Optionally, the transmission delay is determined by the destination switch based on the first transmission delay and the second transmission delay staying in the destination switch; the first transmission delay is the accumulated time staying in the intermediate switch; the intermediate switch is the switch between the source node and the destination switch.
[0174] Optionally, the sending unit 801 is further used to send a first indication message to the intermediate switch; the first indication message is used to instruct the intermediate switch to send the target service data carrying the first transmission delay to the next node of the intermediate switch when receiving the target service data.
[0175] Optionally, the device also includes: a processing unit 802; the processing unit 802 is used to obtain location information of multiple switches connected to the controller; the processing unit 802 is also used to determine the destination switch from the multiple switches based on the location information; the destination switch is a switch among the multiple switches whose node distance corresponding to the destination address is less than a distance threshold and whose delay is less than a delay threshold.
[0176] Figure 8 The schematic diagram of the structure of a transmission delay determination device 900 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 900 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 900 shown may include: a receiving unit 901 and a sending unit 902; the receiving unit 901 is used to receive a first request information from a controller; the first request information is used to request to obtain the transmission delay of target business data, and the source address of the target business data is a target source address, and the destination address is a target destination address; the sending unit 902 is used to send first feedback information to the controller when receiving the first request information from the controller; the first feedback information is used to indicate the transmission delay of the target business data from the source node corresponding to the target source address to the target corresponding to the target destination address.
[0177] Optionally, the device also includes: a processing unit 903, which is used to determine a first transmission delay carried by the target business data and a second transmission delay staying in the destination switch; the first transmission delay is the cumulative duration of staying in the intermediate switch; the intermediate switch is the switch between the node corresponding to the source address and the destination switch; the processing unit 903 is also used to determine the transmission delay of the target business data from the node corresponding to the source address to the node corresponding to the destination address based on the first transmission delay and the second transmission delay.
[0178] Optionally, the processing unit 903 is further used to record a first timestamp of the target service data at the switch receiving port and a second timestamp at the switch sending port; the processing unit 903 is further used to determine a second transmission delay staying in the switch based on the first timestamp and the second timestamp.
[0179] 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.
[0180] 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.
[0181] 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 plural.
[0182] 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.
[0183] 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.
[0184] 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.
[0185] 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.
[0186] 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.
[0187] 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.< / vid>
Claims
1. A method for determining transmission delay, characterized in that: Applied to a controller, the method comprises: Sending a first request message to a destination switch; the first request message is used to request a transmission delay of target service data; the source address of the target service data is the target source address, and the destination address is the target destination address; Receive first feedback information from the destination switch, where the first feedback information is used to indicate a transmission delay of the target service data from a source node corresponding to the target source address to a target node corresponding to the target destination address.
2. The method according to claim 1, characterized in that The transmission delay is determined by the destination switch based on the first transmission delay and the second transmission delay of the target service data staying in the destination switch; the first transmission delay is the accumulated time staying in the intermediate switch; the intermediate switch is the switch between the source node and the destination switch.
3. The method according to claim 2, characterized in that The method further comprises: A first indication message is sent to the intermediate switch; the first indication message is used to instruct the intermediate switch to send the target service data carrying a first transmission delay to the next node of the intermediate switch when the target service data is received.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Acquire location information of multiple switches connected to the controller; Based on the location information, the destination switch is determined from the multiple switches; the destination switch is a switch among the multiple switches whose node distance to the node corresponding to the destination address is less than a distance threshold and whose delay is less than a delay threshold.
5. A method for determining transmission delay, characterized in that: Applied to a destination switch, the method includes: When receiving a first request message from a controller, first feedback message is sent to the controller; the first request message is used to request to obtain the transmission delay of target business data, the source address of the target business data is the target source address, and the destination address is the target destination address; the first feedback message is used to indicate the transmission delay of the target business data from the source node corresponding to the target source address to the target corresponding to the target destination address.
6. The method according to claim 5, characterized in that The method further comprises: Determine a first transmission delay carried by the target service data and a second transmission delay staying at the destination switch; the first transmission delay is the accumulated time staying at the intermediate switch; the intermediate switch is a switch between the node corresponding to the source address and the destination switch; Based on the first transmission delay and the second transmission delay, a transmission delay of the target service data from the node corresponding to the source address to the node corresponding to the destination address is determined.
7. The method according to claim 6, characterized in that The method further comprises: Record the target service data at a first timestamp of the receiving port of the destination switch and a second timestamp of the sending port of the destination switch; Based on the first timestamp and the second timestamp, a second transmission delay of the target service data staying in the destination switch is determined.
8. A transmission delay determination device, characterized in that: Applied to a controller, the device comprises: a sending unit and a receiving unit; The sending unit is used to send a first request message to the destination switch; the first request message is used to request the transmission delay of the target service data; the source address of the target service data is the target source address, and the destination address is the target destination address; The receiving unit is used to receive first feedback information from the destination switch, where the first feedback information is used to indicate a transmission delay of the target service data from a source node corresponding to the target source address to a target node corresponding to the target destination address.
9. A transmission delay determination device, characterized in that: Applied to a destination switch, the device comprises: a receiving unit and a sending unit; The receiving unit is used to receive first request information from the controller; the first request information is used to request to obtain the transmission delay of target service data, the source address of the target service data is the target source address, and the destination address is the target destination address; The sending unit is used to send first feedback information to the controller when receiving first request information from the controller; the first feedback information is used to indicate the transmission delay of the target service data from the source node corresponding to the target source address to the target corresponding to the target destination address.
10. 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 is implemented.
11. 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 or any one of claims 5-7.
12. 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 is implemented.
