Delay measurement method and device
By adding sequence numbers and/or coloring identifiers to messages to measure network loopback delay, the problem of inaccurate measurement caused by reliance on clock synchronization in the prior art is solved, and efficient and accurate delay measurement is achieved.
Patent Information
- Application Number
- CN202010569518.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-20
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2040-06-20
AI Technical Summary
The existing technology relies on clock synchronization when measuring network loopback delay, and the measurement accuracy is not high. It is impossible to improve the measurement accuracy without changing the network status.
By adding sequence numbers and/or coloring marks to the message to be tested and using unused bits in the message for marking, the network round-trip delay can be measured without relying on clock synchronization and without increasing the number of network transmission messages.
The accuracy and efficiency of network round-trip delay measurement are improved, additional changes to the network state are avoided, and the measurement process is simplified.
Smart Images

Figure CN113824607B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method and device for measuring time delay. Background Art
[0002] End-to-end (E2E) latency refers to the time from the moment a sender sends a probe message to a receiver until the sender receives the receiver's response message. E2E latency consists of two components: end-cloud processing latency and network round-trip latency. End-cloud processing latency refers to the latency incurred when a message is processed on a terminal device or server; network round-trip latency refers to the portion of E2E latency that excludes end-cloud processing latency, i.e., the latency experienced by the message as it travels through the network. Network round-trip latency includes the latency of the probe message sent by the sender and the latency of the response message sent by the receiver. Currently, network round-trip latency is measured by measuring the one-way latency of the probe message and the one-way latency of the response message, respectively, to obtain the network round-trip latency. One-way latency is measured by adding the current timestamp to the message sent by the sender. Upon receiving the message, the receiver calculates the one-way latency based on the time difference between the current timestamp and the timestamp in the message. The one-way delay measurement method relies on clock synchronization between the transmitter and receiver, and the measurement accuracy is not high. Summary of the Invention
[0003] The embodiments of the present application provide a method and apparatus for measuring delay, which are independent of clock synchronization and do not change the network state, and can also improve the accuracy of network loopback delay measurement.
[0004] In a first aspect, an embodiment of the present application provides a delay measurement method, wherein the method can be applied to a first communication device, which is a first network element or a chip in the first network element. The delay measurement method may include: selecting a message to be identified from at least one message that the first network element is about to send to the second network element. The at least one message may be a message included in a service flow from the first network element to the second network element. A first identifier is added to the message to be identified to obtain a first message. The first message is a probe message for performing network loopback delay measurement. The first message may be an uplink message or a downlink message. The first network element sends the obtained first message to the second network element and records the first moment of sending the first message.
[0005] Further optionally, the first network element receives a second message from the second network element and records a second time of receiving the second message, wherein the second message includes a second identifier and a waiting time, and the waiting time is used to represent a time difference between a third time when the second network element sends the second message and a fourth time when the second network element receives the first message.
[0006] The first network element determines that the second identifier is associated with the first identifier, and determines a network round-trip delay between the first network element and the second network element according to the first time, the second time, and the waiting time.
[0007] The second identifier being associated with the first identifier may mean that the second identifier is the same as the first identifier, or that the second identifier and the first identifier satisfy a preset corresponding relationship.
[0008] By implementing the method described in the first aspect, a message to be identified is selected from at least one message that the first network element is about to send to the second network element, and a first identifier is added to the message to be identified, thereby obtaining a first message for measuring network loopback delay. This means that the message that the first network element is about to send to the second network element is fully utilized to measure network loopback delay without the need to construct additional messages for network loopback delay measurement. Therefore, the number of messages transmitted in the network is not increased, and the network state is not changed. Furthermore, implementing this method for network loopback delay measurement does not rely on clock synchronization, and can improve the accuracy of network loopback delay measurement.
[0009] In a possible implementation manner of the first aspect, the first identifier and the second identifier include a sequence number and / or a coloring identifier, and the coloring identifier is used to mark a message for performing network round-trip delay measurement.
[0010] In a possible implementation of the first aspect, the first identifier and the second identifier include serial numbers, and the association between the first identifier and the second identifier may include: the first serial number included in the first identifier and the second serial number included in the second identifier are identical or satisfy a preset correspondence. The first serial number and the second serial number satisfying the preset correspondence may mean that the magnitudes of the first serial number and the second serial number meet a predefined rule, for example, the sum of the first serial number and the second serial number may be a specific value.
[0011] By implementing this method, a pair of messages for network round-trip delay measurement is indicated by the correlation of sequence numbers, so that multiple network round-trip delays can be measured simultaneously, thereby improving measurement efficiency.
[0012] In a possible implementation of the first aspect, the first identifier and the second identifier include dyeing identifiers, wherein the association between the first identifier and the second identifier may include: the first dyeing identifier included in the first identifier is the same as the second dyeing identifier included in the second identifier or satisfies a preset correspondence.
[0013] By implementing the method, a pair of messages for measuring network round-trip delay is indicated by using the correlation of dye marks, and the indication method is simple and the overhead is low.
[0014] In a possible implementation of the first aspect, when the first identifier includes a first serial number, the first network element may further record the first serial number contained in the first message when recording the first moment of sending the first message. Optionally, the correspondence between the first serial number and the first moment of sending the first message may be recorded.
[0015] Upon receiving the second message from the second network element, the first network element parses the second message to obtain a second sequence number and a waiting time contained in the second message. If it is determined that the second sequence number is associated with the first sequence number, the first network element determines a network round trip delay between the first network element and the second network element based on a first time corresponding to the first sequence number, a second time when the second network element receives the second message, and the waiting time.
[0016] By implementing this method, a pair of messages for network round-trip delay measurement is indicated by the correlation of sequence numbers, so that multiple network round-trip delays can be measured simultaneously, thereby improving measurement efficiency.
[0017] In a possible implementation of the first aspect, the first serial number can be represented by the bit value of N bits in the first message, where N is an integer greater than or equal to 1, and the second serial number is represented by the bit value of the N bits in the second message.
[0018] Optionally, the N bits are unused bits in the (internet protocol, IP) header of the message, for example, may include one or more of the following bits: the first bit, the second bit, the third bit of the service type (type of service, TOS) field in the IP header of the message or the first bit of the flag field in the IP header of the message.
[0019] By implementing this method, unused bits in the IP header are used as N bits for representing the sequence number, and no additional bits need to be added, thereby saving overhead.
[0020] Optionally, the N bits may be one or more bits in the payload portion of the message. For example, a field may be added between the transport layer header and the application layer data of the message, and the field is used to carry the N bits.
[0021] By implementing this method, the bits in the payload portion are used to represent the N bits, and the length of the N bits can be flexibly adjusted, thereby measuring more network round-trip delays simultaneously.
[0022] In a possible implementation of the first aspect, N bits may represent 2N sequence numbers. The first network element may determine a first sequence number from the 2N sequence numbers and add the first sequence number to the message to be identified to obtain the first message. Optionally, the first network element may determine the first sequence number by selecting an unused sequence number from the 2N sequence numbers as the first sequence number, or by selecting a sequence number included in a received corresponding response message from the 2N sequence numbers as the first sequence number.
[0023] By implementing this method, 2N network round-trip delays can be measured simultaneously, thereby improving measurement efficiency.
[0024] In a possible implementation of the first aspect, the waiting time may be located in the payload portion of the second message. For example, a field may be added to the payload portion to carry the waiting time. After obtaining the waiting time from the payload portion of the second message, the waiting time in the payload portion may be deleted, and application layer processing may be performed on the deleted payload portion. Optionally, if the waiting time is carried in a field, the field may be deleted.
[0025] By implementing this method, the waiting time is deleted before application layer processing, so that the application layer is not aware of the network round-trip delay measurement process.
[0026] In a possible implementation of the first aspect, a method for selecting a message to be identified from at least one message that the first network element is about to send to the second network element may be: according to a sampling rule, selecting a message to be identified from at least one message that the first network element is about to send to the second network element.
[0027] Optionally, a corresponding sampling rule can be determined based on the interaction frequency between the first network element and the second network element. For example, if there is a service flow with a relatively high interaction frequency between the first network element and the second network element, such as a video stream or an interactive game data stream, the sampling rule may be to select a message to be identified from a message flow containing at least one message every M messages, where M is an integer greater than or equal to 1. Alternatively, for another example, if there is a service flow with a relatively low interaction frequency between the first network element and the second network element, such as a smart meter reading data service flow, the sampling rule may be to select a message to be identified from a message flow containing at least one message every target time interval ΔT.
[0028] By implementing this method, corresponding sampling rules can be determined according to the interaction frequency between the first network element and the second network element, thereby meeting different business requirements.
[0029] In a possible implementation of the first aspect, when the first identifier includes a sequence number and a coloring identifier, the first network element adds the first sequence number and the first coloring identifier to a message to be identified to obtain a first message. The first coloring identifier may be used to indicate that the first message is a probe message for network round-trip delay measurement.
[0030] By implementing this method, the first message includes the first coloring mark for indicating the detection message, which can improve the processing efficiency of the first message.
[0031] In a possible implementation of the first aspect, the first coloring identifier may be represented by the bit value of one or more first bits in the first message. The one or more first bits may include one or more of the following bits: the first bit, the second bit, or the third bit of the Type of Service (TOS) field in the IP header of the message, or the first bit of the Flags field in the IP header of the message. Alternatively, the one or more first bits may include one or more bits in the payload portion of the message, for example, by adding a field to the payload portion to carry the one or more first bits.
[0032] In a possible implementation of the first aspect, the second identifier may include a second sequence number and a second coloring identifier. The first network element may parse the second message to obtain the waiting time and the second sequence number when determining that the second message contains the second coloring identifier associated with the first coloring identifier, thereby improving message processing efficiency. The second coloring identifier is used to indicate that the second message is a response message for performing network loopback delay measurement. Further optionally, the first network element may also record the second moment of receiving the second message when determining that the second message contains the second coloring identifier.
[0033] The first network element may further search for a first sequence number identical to the second sequence number from the locally recorded first sequence numbers, and determine the network round-trip delay between the first network element and the second network element according to the first moment corresponding to the first sequence number.
[0034] By implementing this method, the second message includes the second coloring mark for indicating the detection message, which can improve the processing efficiency of the second message.
[0035] In a possible implementation of the first aspect, the second coloring identifier can be represented by the bit value of one or more second bits in the second message. The one or more second bits may include one or more of the following bits: the first bit, the second bit, the third bit of the service type TOS field in the IP header of the message, or the first bit of the flag field in the IP header of the message. Alternatively, the one or more second bits may include one or more bits of the net load portion of the message, for example, by adding a field to the net load portion, which is used to carry the one or more second bits. The first bit and the second bit may be different bits of the same field in the net load portion.
[0036] It is understood that in actual deployment, the one or more first bits and the one or more second bits may be located at different bit positions in the message. For example, the first bit is the first bit of the TOS field, and the second bit is the second bit of the TOS field. It is understood that the one or more first bits and the one or more second bits may also be located at the same bit position in the message.
[0037] In a second aspect, embodiments of the present application provide a latency measurement method, wherein the method can be applied to a third communication device, the third communication device being a third network element or a chip in the third network element, and the third network element being an intermediate network element between a first network element and a second network element. The latency measurement method may include: the third network element receiving a first message from the first network element, and recording a fifth time instant of receipt of the first message, the first message including a first identifier. The third network element further forwards the first message to the second network element.
[0038] The third network element receives the second message from the second network element and records a sixth time instant at which the second message is received, where the second message includes a second identifier and a waiting time duration, where the waiting time duration indicates a time difference between the third time instant at which the second network element sends the second message and the fourth time instant at which the second network element receives the first message. The third network element further forwards the second message to the first network element.
[0039] The third network element determines that the second identifier is associated with the first identifier, and determines the network round-trip delay between the third network element and the second network element based on the recorded fifth time of receiving the first message, the sixth time of receiving the second message, and the waiting time.
[0040] The second identifier being associated with the first identifier may mean that the second identifier is the same as the first identifier, or that the second identifier and the first identifier satisfy a preset corresponding relationship.
[0041] By implementing the method described in the second aspect, the intermediate network element can also measure the network round-trip delay.
[0042] In a possible implementation manner of the second aspect, the first identifier and the second identifier include a serial number and / or a coloring identifier, and the coloring identifier is used to mark a message for performing network round-trip delay measurement.
[0043] In a possible implementation of the second aspect, the first identifier and the second identifier include serial numbers, and the association between the first identifier and the second identifier may include: the first serial number included in the first identifier is the same as the second serial number included in the second identifier or satisfies a preset correspondence.
[0044] In a possible implementation of the second aspect, the first identifier and the second identifier include dyeing identifiers, wherein the association between the first identifier and the second identifier may include: the first dyeing identifier included in the first identifier is the same as the second dyeing identifier included in the second identifier or satisfies a preset correspondence.
[0045] In a possible implementation of the second aspect, when the first identifier includes the first sequence number, when the third network element records the fifth time of receiving the first message, the third network element may record the correspondence between the first sequence number contained in the first message and the fifth time of receiving the first message. It is understandable that each time the third network element receives a first message, the third network element may locally record the correspondence between the first sequence number contained in the first message and the fifth time of receiving the first message. That is, the third network element may locally record multiple correspondences.
[0046] After the third network element obtains the second sequence number contained in the second message, it can obtain the first sequence number associated with the second sequence number from multiple corresponding relationships recorded locally, and calculate the network round-trip delay between the third network element and the second network element based on the fifth moment corresponding to the associated first sequence number.
[0047] By implementing this method, the corresponding fifth moment can be determined by associating the sequence numbers, thereby achieving the purpose of measuring the round-trip delays of multiple networks simultaneously and improving the delay measurement efficiency.
[0048] In a possible implementation of the second aspect, the first identifier includes a first sequence number and a first coloring identifier. For a received message, the third network element may, upon determining that the message contains the first coloring identifier, then detect the first sequence number contained in the message. For example, if the first coloring identifier is represented by the bit value of the first bit, the third network element may determine whether the message contains the first coloring identifier by detecting the bit value of the first bit in the message. Optionally, the third network element may record the fifth moment of receipt of the message only after determining that the message contains the first coloring identifier.
[0049] By implementing this method, the first sequence number and the first coloring identifier are added to the first message, which not only can measure multiple network round-trip delays at the same time, but also can improve the processing efficiency of the first message.
[0050] In a possible implementation of the second aspect, the second identifier includes a second serial number and a second coloring identifier. For a received message, the third network element may be, upon determining that the message contains a second coloring identifier associated with the first coloring identifier, to then detect the second serial number and waiting time contained in the message. For example, if the second coloring identifier is represented by the bit value of the second bit, the third network element may determine whether the message contains the second coloring identifier by detecting the bit value of the second bit in the message. Optionally, the third network element may also record the sixth moment of receiving the message only when it is determined that the message contains the second coloring identifier.
[0051] By implementing this method, the second sequence number and the second coloring identifier are added to the second message, which not only can measure multiple network round-trip delays at the same time, but also can improve the processing efficiency of the second message.
[0052] In a third aspect, embodiments of the present application provide a latency measurement method, wherein the method can be applied to a second communication device, wherein the second communication device is a second network element or a chip in the second network element. The latency measurement method may include: the second network element receiving a first message and recording a fourth moment of receipt of the first message, wherein the first message includes a first identifier. The second network element may not record the moment of receipt of a message that does not include the first identifier, and may perform application layer processing on the message.
[0053] The message that the second network element is about to send to the first network element is further determined as a message to be identified. For example, the first message that the second network element is about to send to the first network element after the fourth moment of receiving the first message can be determined as the message to be identified. The message to be identified can include service information that the second network element is about to send to the first network element. The message to be identified may not have any service association with the first message.
[0054] The second network element adds a waiting time and a second identifier associated with the first identifier to the message to be identified, thereby obtaining a second message, wherein the waiting time represents a time difference between a third moment at which the second network element sends the second message and a fourth moment at which the second network element receives the first message. The second network element sends the obtained second message to the first network element.
[0055] By implementing the method described in the third aspect, since the message to be identified is a message that the second network element is ready to send to the first network element, and is not a message constructed for measuring the network loopback delay, there is an uncertain time difference between the second network element sending the second message and the second network element receiving the first message. Therefore, the second network element adds a waiting time in the second message to improve the accuracy of the network loopback delay measurement.
[0056] In a possible implementation manner of the third aspect, the message to be identified determined by the second network element may be the first message sent by the second network element to the first network element after the fourth moment of receiving the first message.
[0057] In a possible implementation manner of the third aspect, the first identifier and the second identifier include a serial number and / or a coloring identifier, and the coloring identifier is used to mark a message for performing network round-trip delay measurement.
[0058] In a possible implementation of the third aspect, the first identifier and the second identifier include serial numbers, and the association between the first identifier and the second identifier may include: the first serial number included in the first identifier is the same as the second serial number included in the second identifier or satisfies a preset correspondence.
[0059] In a possible implementation of the third aspect, the first identifier and the second identifier include dyeing identifiers, wherein the association between the first identifier and the second identifier may include: the first dyeing identifier included in the first identifier is the same as the second dyeing identifier included in the second identifier or satisfies a preset correspondence.
[0060] In a possible implementation of the third aspect, when the first identifier includes the first sequence number, when the second network element records the fourth moment of receiving the first message, it may also record the first sequence number contained in the first message. Exemplarily, the second network element records the correspondence between the first sequence number contained in the first message and the fourth moment of receiving the first message. It can be understood that each time the second network element receives a first message, the second network element can locally record the correspondence between the first sequence number contained in the first message and the fourth moment of receiving the first message. That is, the second network element may locally record multiple correspondences. Among them, if the second network element replies to a second message with respect to a first message, the corresponding correspondence can be deleted.
[0061] By implementing this method, multiple network round-trip delays can be measured simultaneously, thereby improving measurement efficiency.
[0062] In a possible implementation of the third aspect, the first identifier includes a first sequence number and a first coloring identifier. For a received message, the second network element may, upon determining that the message includes the first coloring identifier, further detect the first sequence number included in the message. The first coloring identifier is used to indicate that the first message is a probe message used for network round-trip delay measurement.
[0063] By implementing this method and adding the first coloring identifier to the first message, the processing efficiency of the first message can be improved.
[0064] In a possible implementation of the third aspect, the second identifier includes a second sequence number and a second coloring identifier. The second network element adds a waiting time, a second sequence number identical to the first sequence number, and a second coloring identifier associated with the first coloring identifier to the message to be identified to obtain a second message.
[0065] By implementing this method and adding the second coloring identifier to the second message, the processing efficiency of the second message can be improved.
[0066] In a fourth aspect, an embodiment of the present application provides a communication device, comprising modules or units for executing the method of any one of the first to third aspects.
[0067] In a fifth aspect, an embodiment of the present application provides a communication device comprising a processor. The processor is coupled to a memory and can be configured to execute instructions in the memory to implement the method of any of the first to third aspects described above. Optionally, the communication device further comprises a memory. Optionally, the communication device further comprises a communication interface, the processor being coupled to the communication interface.
[0068] In a sixth aspect, an embodiment of the present application provides a processor, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method of any one of aspects 1 to 3.
[0069] In a specific implementation, the processor may be one or more chips, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a trigger, or various logic circuits. The input signal received by the input circuit may be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by a transmitter. The input circuit and the output circuit may be the same circuit, which functions as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation of the processor and various circuits.
[0070] In a seventh aspect, an embodiment of the present application provides a processing device, comprising a processor and a memory. The processor is configured to read instructions stored in the memory and receive signals via a receiver and transmit signals via a transmitter to execute the method of any one of aspects 1 to 3.
[0071] Optionally, there are one or more processors and one or more memories.
[0072] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0073] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.
[0074] It should be understood that related data interaction processes, such as sending a message, can be the process of outputting a message from a processor, and receiving a message can be the process of receiving a message by the processor. Specifically, the data output by the processor can be output to a transmitter, and the input data received by the processor can come from a receiver. The transmitter and receiver can be collectively referred to as a transceiver.
[0075] The processing device in the seventh aspect may be one or more chips. The processor in the processing device may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like; when implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated into the processor or located independently of the processor.
[0076] In an eighth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute the method of any one of the first to third aspects above.
[0077] In the ninth aspect, an embodiment of the present application provides a readable storage medium, which stores a computer program (also referred to as code, or instructions). When the computer program is run on a computer, the method of any one of the above-mentioned first to third aspects is implemented.
[0078] In a tenth aspect, an embodiment of the present application provides a communication system, comprising the aforementioned first network element and second network element.
[0079] Optionally, the communication system may further include a third network element.
[0080] In an eleventh aspect, a chip system is provided, comprising a processor and an interface circuit. The processor is configured to retrieve and execute a computer program (also referred to as code or instructions) stored in a memory to implement the functions described in any of aspects 1 to 3. In one possible design, the chip system further comprises a memory configured to store necessary program instructions and data. The chip system may consist of a chip alone or may include a chip and other discrete components. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 This is a schematic diagram of the architecture of the communication system used in the embodiments of the present application;
[0082] Figure 2 This is a diagram of the communication system architecture including key network elements in an embodiment of the present application;
[0083] Figure 3 This is a possible system architecture diagram of an embodiment of the present application;
[0084] Figure 4 This is a flowchart of a delay measurement method provided in an embodiment of the present application;
[0085] Figure 5 This is a schematic diagram of a message provided in an embodiment of the present application;
[0086] Figure 6 This is a flowchart of a delay measurement method provided in an embodiment of the present application;
[0087] Figure 7 This is a schematic diagram of an IP header provided in an embodiment of the present application;
[0088] Figure 8 This is a schematic diagram of a message provided in an embodiment of the present application;
[0089] Figure 9 This is a schematic diagram of a delay measurement provided by an embodiment of the present application;
[0090] Figure 10 is a schematic block diagram of a communication device provided in an embodiment of the present application;
[0091] Figure 11 This is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application;
[0092] Figure 12 is a schematic block diagram of another communication device provided in an embodiment of the present application;
[0093] Figure 13This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0094] The technical solutions of the embodiments of the present application can be applied to various communication systems, such as: long term evolution (LTE) system, universal mobile telecommunication system (UMTS), fifth generation (5G) system, new radio (NR) and other new systems emerging with the development of technology.
[0095] Figure 1 FIG1 shows a schematic diagram of a 5G system that can be applied to the present application. Figure 1 As shown, the system can be divided into two parts: access network and core network. The access network is used to implement functions related to wireless access, and mainly includes radio access network (RAN) equipment 102 and other equipment accessed through the air interface (such as WiFi), and customer premises equipment (CPE) 110. The core network mainly includes the following key logical network elements: user plane function 103, access and mobility management function (AMF) 105, session management function 106, policy control function (PCF) 107, and unified data management function (unified data management) 109. The system 100 can also include user equipment (UE) 101, data network (DN) 104 and application function (AF) 108. The interfaces between the network elements are as follows: Figure 1 It should be understood that network elements can also communicate using service-oriented interfaces.
[0096] UE, also known as terminal equipment. The terminal equipment can communicate with one or more core networks (CN) via RAN equipment. The terminal equipment can be called an access terminal, terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless network equipment, user agent, or user device. The terminal can be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication capabilities, a computing device or other device connected to a wireless modem, an in-vehicle device, a wearable device, or an IoT, a terminal device in a vehicle network, and any form of terminal device in future networks.
[0097] RAN equipment is a device that connects terminal devices to a wireless network, specifically a base station. Base stations can include various types of base stations, such as macro base stations, micro base stations (also known as small cells), relay stations, and access points. Specifically, they can be access points (APs) in wireless local area networks (WLANs), base transceiver stations (BTSs) in global systems for mobile communications (GSM) or code division multiple access (CDMA), base stations (NodeBs, NBs) in wideband code division multiple access (WCDMA), evolved Node Bs (eNBs or eNodeBs) in LTE, relay stations or access points, in-vehicle devices, wearable devices, the next generation Node Bs (gNBs) in 5G systems, or base stations in future evolved public land mobile networks (PLMNs).
[0098] CPE is a device located at the end user's premises. It converts 5G signals into WiFi signals. It also supports network cable access, converting 5G signals into data signals for network cable access, thereby providing wireless broadband access services to home users. Specifically, the CPE accesses the RAN network through the air interface to provide 5G wireless broadband access. Simultaneously, the CPE connects to user devices via WiFi to provide data services, or it can connect to the device through a GE interface via a network cable to provide data services.
[0099] UDM has the functions of managing user contract data and generating user authentication information.
[0100] The AMF is primarily responsible for UE registration management, UE connection management, UE reachability management, UE access authorization and authentication, UE security, UE mobility management, network slice selection, and SMF selection. The AMF serves as the anchor point for N1 / N2 signaling connections and routes N1 / N2 session management (SM) messages for the SMF, maintaining and managing UE status information. The AMF is a mobility management network element in the 5G system.
[0101] The SMF is responsible for all control plane functions related to UE session management, including selection and control of the UPF, allocation and management of Internet Protocol (IP) addresses, session Quality of Service (QoS) management, and obtaining policy and charging control (PCC) policies from the PCF. The SMF also serves as the termination point for the SM portion of non-access stratum (NAS) messages.
[0102] PCF has the function of providing policy rules to the control plane functional entity.
[0103] AF may be an application server, which may belong to an operator or a third party.
[0104] The UPF is primarily responsible for processing user messages, such as forwarding and billing. It can serve as the anchor point for protocol data unit (PDU) session connections, namely the PDU session anchor (PSA). It is responsible for UE data message filtering, data transmission / forwarding, rate control, billing information generation, user plane QoS processing, uplink transmission authentication, transmission level verification, downlink data packet caching, and downlink data notification triggering. The UPF can also serve as a branch point for multi-homed PDU sessions.
[0105] A DN is a network that provides data transmission services to users, such as IP Multimedia Service (IMS) and the Internet. A DN can include an application server (AS). An AS is a software framework that provides an environment for application execution and offers services such as security, data and transaction support, and load balancing for large-scale distributed system management. UEs communicate with the AS to obtain application messages. It should be noted that the AF mentioned above is the control plane of the AS.
[0106] It should be understood that the embodiments of the present application are not limited to application only in Figure 1 For example, a communication system to which the data transmission method according to the embodiment of the present application can be applied may include more or fewer network elements or devices. Figure 1 The equipment or network element in the network can be hardware, functionally divided software, or a combination of the two. Figure 1 Devices or network elements in a network can communicate through other devices or network elements.
[0107] The first network element, the second network element, and the third network element in the embodiment of the present application may refer to key network elements in the network, and the key network element refers to the network element through which both the uplink message and the downlink message of the service flow to be measured pass. Figure 2 As shown in the figure, a network architecture diagram including key network elements provided by the embodiment of the present application is shown. Figure 2 The transmission order in the network architecture shown in the figure, the key network elements included in the network architecture may be terminal equipment, CPE, access network equipment, user plane equipment and server.
[0108] The terminal device may be Figure 1 In the network architecture shown, the UE access network device can be Figure 1 In the network architecture shown, the RAN equipment and user plane equipment can be Figure 1 In the UPF of the network architecture shown, the server can be Figure 1The business server in the DN of the network architecture shown, where, depending on the specific business, the server can be a video server, a web server, a database server, etc.
[0109] For example, from Figure 2 In the network architecture shown, N (2≤N≤5) key network elements can be sequentially selected to form a network element set {ni|1≤i≤N}. The key network elements included in this network element set will be used for network round-trip delay measurement. The first key network element n1 and the last key network element nN are selected as the two end network elements, and the remaining key network elements are intermediate network elements. If N = 2, it can be assumed that there are only two end network elements and no intermediate network elements.
[0110] In the embodiment of the present application, the first network element can be one of the two end network elements, the second network element can be the other end network element of the two end network elements, and the third network element can be an intermediate network element. It can be understood that there can be one or more intermediate network elements for performing network loop delay measurement.
[0111] like Figure 3 The figure shows a delay measurement architecture diagram provided by an embodiment of the present application. As shown in the figure, the network architecture includes key network elements included in the network element set, that is, the network architecture includes two end network elements and N-2 intermediate network elements. Further optionally, the network architecture may also include a network management system. The network loop delay measured by each key network element can be uploaded to the network management system. The network management system can process the network loop delay uploaded by each key network element to support more functions, such as locating delay problems and delay optimization.
[0112] First, before describing the embodiments of the present application, the names or terms involved in the embodiments of the present application are introduced.
[0113] 1. Network loopback delay
[0114] The service flow passes through network element A and network element B. The network round-trip delay between network element A and network element B may refer to the sum of the network transmission delay of the probe message sent by network element A from network element A to network element B and the network transmission delay of the response message sent by network element B from network element B to network element A. Network element B may send the response message after receiving the probe message from network element A. It should be understood that during the delay measurement process, the probe message and the response message exist in pairs.
[0115] Optionally, the probe message may be an uplink message, and accordingly, the response message may be a downlink message. The calculated network round-trip delay may be referred to as the uplink network round-trip delay. Optionally, the probe message may be a downlink message, and accordingly, the response message may be an uplink message. The calculated network round-trip delay may be referred to as the downlink network round-trip delay.
[0116] 2. Message
[0117] A message can be divided into two parts: a header and a payload. The information carried by the header can be used to support the smooth transmission of the message in the network. For example, the header can include the IP header and the transport layer header.
[0118] The information carried by the payload portion may be application layer data including service information, where the service information includes but is not limited to video information, audio information, text information, and the like.
[0119] Figure 4 This is a flow chart of a delay measurement method provided in an embodiment of the present application. This embodiment involves a specific process of performing message transmission between a first network element and a second network element to perform delay measurement. Figure 3 As shown, the method may include: steps S100 to S109, wherein the execution order of steps S100 to S109 is not limited in the embodiment of the present application.
[0120] S100: Select a message to be identified from at least one message that a first network element is to send to a second network element.
[0121] In one embodiment, a first network element may sample and select packets to be identified from a service flow from the first network element to the second network element. The service flow may be a video stream, an interactive game data stream, an audio stream, or the like. The service flow contains at least one packet. Optionally, the first network element may select packets to be identified from the service flow according to a sampling rule. The corresponding sampling rule may be determined based on the frequency of interaction between the first network element and the second network element. For example, if there is a service flow with a relatively high interaction frequency between the first network element and the second network element, such as a video stream or an interactive game data stream, the sampling rule may be to select a packet to be identified from the message flow every M packets, where M is an integer greater than or equal to 1. Alternatively, for another example, if there is a service flow with a relatively low interaction frequency between the first network element and the second network element, such as a service flow containing meter reading data from a smart meter, the sampling rule may be to select a packet to be identified from the message flow every target duration ΔT.
[0122] S101: A first network element adds a first identifier to a message to be identified to obtain a first message.
[0123] In one embodiment, the first message may be a probe message used to calculate network round-trip delay. Optionally, the first message may be an uplink message or a downlink message. If the first message is an uplink message, an uplink network round-trip delay measurement is performed to obtain the uplink network round-trip delay. If the first message is a downlink message, a downlink network round-trip delay measurement is performed to obtain the downlink network round-trip delay.
[0124] Among them, in an embodiment of the present application, adding a first identifier to the message to be identified may refer to modifying the bit value of the bit in the message to be identified to a bit value used to represent the first identifier, or it may refer to adding a bit in the message to be identified and using the bit value of the added bit to represent the first identifier.
[0125] The first identifier may include a coloring identifier and / or a sequence number, and coloring may refer to a method of marking a message by changing the value of a specific position in the message. The coloring identifier in the embodiment of the present application can be used to mark a message for network round-trip delay measurement.
[0126] The following examples illustrate the first identification including the dyeing identification and / or the serial number in different situations:
[0127] Case 1: The first mark may include a dye mark.
[0128] The first identifier may include a first coloring identifier, which may be represented by a bit value of one or more first bits in the first message. Exemplarily, the bit value of the one or more first bits may be modified to a first preset value to represent the first coloring identifier, for example, modifying the bit value of two first bits to 11.
[0129] Optionally, the one or more first bits may be located in the IP header of the first message or in the payload of the first message. Exemplarily, the one or more first bits may be unused bits in the IP header of the first message. For example, the one or more first bits may include one or more of the following bits: the first bit, the second bit, the third bit of the TOS field in the IP header, or the first bit of a flags field (e.g., Flags) in the IP header of the message. Exemplarily, the one or more first bits may be bits in the payload of the first message. For example, the one or more first bits may be bits between the transport layer header and the application layer data of the first message.
[0130] In some optional implementation scenarios, a first coloring identifier can be represented by a bit value of a first bit, and the first coloring identifier can be used to indicate that the first message is a probe message for performing network loopback delay measurement. Accordingly, the first bit can be called a probe flag bit. For example, the bit value of the probe flag bit is modified to 1 to indicate that the first message is a probe message.
[0131] Case 2: The first identifier may include a serial number.
[0132] The first identifier may include a first serial number, and the first serial number may be represented by the bit value of N bits in the first message, where N is an integer greater than or equal to 1.
[0133] Optionally, the N bits may be located in the IP header of the first message or in the net load portion of the first message. Exemplarily, the N bits may be unused bits in the IP header of the message. For example, the N bits may include one or more of the following bits: the first bit, the second bit, the third bit of the TOS field in the IP header of the message, or the first bit of a flags field (e.g., Flags) in the IP header of the message. Exemplarily, the N bits may be bits in the net load portion of the message. For example, the N bits may be bits between the transport layer header and the application layer data of the message. For example, a field is added between the transport layer header and the application layer data, and the field is used to carry the N bits.
[0134] Among them, N bits can represent 2N sequence numbers. For example, if N is 2, it can represent 4 sequence numbers, namely {00, 01, 10, 11}. The first network element can select a first sequence number from the 2N sequence numbers, and add the first sequence number to the message to be identified to obtain the first message. Among them, the selection rule for the first network element to select the first sequence number may include one or more of the following rules: Selection rule 1, measuring the network round-trip delay according to the time period, selecting a sequence number that is not used in the current time period from the 2N sequence numbers as the first sequence number, if each of the 2N sequence numbers has been used in the current time period, then the network round-trip delay measurement will not continue in the current time period, and the network round-trip delay measurement will be performed in the next time period. Select rule 2, and determine the number of corresponding response messages that have not been received in at least one probe message that has been sent. If the number is less than 2N, the sequence number contained in the probe message corresponding to the received response message can be selected from the 2N sequence numbers as the first sequence number. If there is an unused sequence number, the unused sequence number can also be selected as the first sequence number. If the number of corresponding response messages that have not been received in at least one probe message that has been sent is equal to 2N, the network loopback delay measurement can be suspended, and the next response message to be received can be waited for, and the sequence number contained in the probe message corresponding to the response message can be used as the first sequence number, and this cycle can be repeated. It can be understood that in some optional scenarios, the response message contains the same sequence number as the corresponding probe message.
[0135] It should be noted that in selection rule 1 and selection rule 2, a time threshold (DelayBudget) can be set. For example, the time threshold can be set to 200ms. If after sending a probe message, the corresponding response message is not received within the time threshold, the serial number contained in the probe message can be reused without waiting for the corresponding response message to be received.
[0136] By using N bits to represent 2N serial numbers, a maximum of 2N network round-trip delays can be measured simultaneously, thereby improving the efficiency of network round-trip delay measurement. It can be understood that the larger the value of N, the greater the sampling frequency of the first network element in obtaining the message to be identified.
[0137] Case 3: The first identifier may include a serial number and a dye identifier.
[0138] The first identifier may include a first serial number and a first coloring identifier, and the first coloring identifier may be represented by the bit value of one or more first bits in the first message. The first serial number may be represented by the bit value of N bits in the first message. It is understandable that the one or more first bits and the N bits may be different bits. For the deployment position of the one or more first bits in the message, please refer to the description of Case 1 in step S101, and for the deployment position of the N bits in the message, please refer to the description of Case 2 in step S101, which will not be repeated here.
[0139] In some optional implementation scenarios, a first coloring identifier may be represented by a first bit value, and a first sequence number may be represented by N bits. The first coloring identifier may be used to indicate that the first message is a probe message for network round-trip delay measurement. For example, the first bit value may be modified to 1 to indicate that the first message is a probe message. The first bit may be referred to as a probe flag.
[0140] S102: The first network element sends a first message to the second network element.
[0141] S103: The first network element records the first moment of sending the first message.
[0142] In one embodiment, at least one message sent by a first network element to a second network element may include one or more first messages with a first identifier added. For the first message with the first identifier added, the first network element records the first time the first message was sent. For messages without the first identifier added, the message may be sent directly without recording the time the message was sent.
[0143] Optionally, when the first identifier includes the first sequence number, the first network element may record the first sequence number contained in the first message in addition to the first time instant of sending the first message. Optionally, the first network element may record the correspondence between the first time instant and the first sequence number. It is understood that before the first network element records the first sequence number, the first network element must detect and obtain the first sequence number from the first message.
[0144] Optionally, when the first identifier includes a first sequence number and a first coloring identifier, for a message to be sent, the first network element may, upon determining that the message contains the first coloring identifier, then detect the first sequence number contained in the message, without having to detect the sequence number for each message, thereby improving message processing efficiency. For example, if the first coloring identifier is represented by a bit value of a first bit, the first network element may determine whether the message contains the first coloring identifier by detecting the bit value of the first bit in the message. Optionally, the first network element may only record the first moment of sending the message if it determines that the message contains the first coloring identifier.
[0145] S104: The second network element receives the first message and records a fourth time of receiving the first message, where the first message includes the first identifier.
[0146] In one embodiment, the second network element receives at least one message from the first network element, and the at least one message may include one or more first messages (i.e., detection messages) with a first identifier added. Among them, for the first message with the first identifier added, the second network element records the fourth moment of receiving the first message. For the message without the first identifier added, the moment of receiving the message may not be recorded and application layer processing may be performed. It is understandable that the second network element may also record the moment of receiving each message, and for the message with the first identifier added, retain the recorded moment of receiving the message.
[0147] Optionally, when the first identifier includes the first sequence number, the second network element may record the first sequence number contained in the first message in addition to the fourth time instant at which the first message is received. Optionally, the second network element may record the correspondence between the fourth time instant and the first sequence number. It is understood that before the second network element records the first sequence number, the second network element must detect and obtain the first sequence number from the first message.
[0148] Optionally, when the first identifier includes a first sequence number and a first coloring identifier, for a received message, the second network element may, upon determining that the message contains the first coloring identifier, then detect the first sequence number contained in the message, without having to detect the sequence number for each message, thereby improving message processing efficiency. For example, if the first coloring identifier is represented by the bit value of a first bit, the second network element may determine whether the message contains the first coloring identifier by detecting the bit value of the first bit in the message. Optionally, the second network element may only record the fourth moment of receipt of the message if it determines that the message contains the first coloring identifier.
[0149] S105: Determine the message that the second network element is going to send to the first network element as a message to be identified.
[0150] S106, add a waiting time and a second identifier associated with the first identifier to the message to be identified to obtain a second message, where the waiting time is used to represent the time difference between a third moment when the second network element sends the second message and a fourth moment when the second network element receives the first message.
[0151] In one embodiment, after a second network element receives a first message from a first network element, it may determine a message that the second network element intends to send to the first network element as a message to be identified. For example, the first message that the second network element intends to send to the first network element after the fourth time instant of receiving the first message may be identified as the message to be identified. The message to be identified may include service information that the second network element intends to send to the first network element. It should be noted that the message to be identified may not have any service association with the first message.
[0152] Specifically, when the second network element is preparing to send a message to the first network element, the second network element can determine whether there is a first message (i.e., a detection message) that has not replied to the second message (i.e., a response message) locally. If there is a first message that has not replied to the second message, the message that the second network element is preparing to send to the first network element can be determined as a message to be identified, and the waiting time can be calculated based on the fourth moment of receiving the first message that has not replied to the second message. Further optionally, when the first identifier includes a first sequence number, the first sequence number contained in the recorded first message can be further obtained to add a second sequence number associated with the first sequence number to the message to be identified. Optionally, it can be a second sequence number that is the same as the first sequence number. It is understandable that if there are multiple first messages that have not replied to the second message, a first message that has not replied to the second message can be selected in chronological order. For example, a first message whose receiving moment is the longest from the current moment can be selected.
[0153] The process of the second network element calculating the waiting time may be: the second network element obtains a third time at which the second message is sent and a fourth time at which the second network element receives the first message, and determines the waiting time based on the time difference between the third time and the fourth time. The third time at which the second message is sent may be the current time at which the second network element calculates the waiting time, or may be a predicted time at which the second network element predicts that the second message will be sent. The predicted time may be determined based on the current time at which the second network element calculates the waiting time and the processing time for adding the waiting time and the second identifier to the message to be identified.
[0154] The second network element adds the calculated waiting time and the second identifier associated with the first identifier to the message to be identified to obtain a second message. The waiting time can be located in the payload portion of the second message. Optionally, the waiting time can be located between the transport layer header and the application layer data in the payload portion. Figure 5As shown, an 8-bit end process delay (EPD) field can be added between the transport layer header and the application layer data in the payload part. The EPD field is used to carry the waiting time.
[0155] Optionally, the first message is a detection message used to calculate the network round-trip delay. Correspondingly, the second message may be a response message used to calculate the network round-trip delay. Optionally, the second message may be an uplink message or a downlink message. If the first message is an uplink message, the second message is a downlink message. If the first message is a downlink message, the second message is an uplink message.
[0156] In particular, since the first identifier in the first message can be a coloring identifier and / or a serial number, the second identifier associated with the first identifier can also be a coloring identifier and / or a serial number. The second identifier being associated with the first identifier can mean that the second identifier is identical to the first identifier, or that the second identifier and the first identifier satisfy a preset correspondence. In particular, the preset correspondence can mean that the percentage position and / or bit value of the bit used to represent the second identifier and the bit used to represent the first identifier in the message meet a predefined rule.
[0157] The following examples illustrate the second identification including the dyeing identification and / or the serial number in different situations:
[0158] Case 1: The second mark may include a dye mark.
[0159] The first identifier and the second identifier may include a coloring identifier, wherein the first identifier may include a first coloring identifier, and the second identifier may include a second coloring identifier. The first coloring identifier is used to mark the first message, and correspondingly, the second coloring identifier is used to mark the second message. The second coloring identifier may be represented by the bit value of one or more second bits in the second message. Exemplarily, the bit value of the one or more second bits may be modified to a second preset value to represent the second coloring identifier, and the second preset value may be the same as the first preset value used to represent the first coloring identifier or satisfy a preset corresponding relationship. The one or more first bits used to represent the first coloring identifier and the one or more second bits used to represent the second coloring identifier may have the same or different percentage positions in the message.
[0160] Optionally, the one or more second bits may be located in the IP header of the second message or in the payload of the second message. Exemplarily, the one or more second bits may be unused bits in the IP header of the second message. For example, the one or more second bits may include one or more of the following bits: the first bit, the second bit, or the third bit of the TOS field in the IP header, or the first bit of a flags field (e.g., Flags) in the IP header of the message. Exemplarily, the one or more second bits may be bits in the payload of the second message. For example, the one or more second bits may be bits between the transport layer header and the application layer data of the second message.
[0161] In some optional implementation scenarios, a second coloring identifier can be represented by the bit value of a second bit. This second coloring identifier can be used to indicate that the second message is a response message for performing network round-trip delay measurement. Accordingly, this second bit can be called a response flag bit. For example, changing the bit value of the response flag bit to 1 is used to indicate that the second message is a response message. It is understood that the response flag bit and the detection flag bit can be different bits, that is, the response flag bit and the detection flag bit can have different proportions in the message.
[0162] Among them, the second identifier and the first identifier include a dyeing identifier, and the association between the second identifier and the first identifier may mean that the second dyeing identifier is associated with the first dyeing identifier, and the association between the second dyeing identifier and the first dyeing identifier may include: the second dyeing identifier is the same as the first dyeing identifier or satisfies a preset correspondence.
[0163] Optionally, the second coloring identifier being the same as the first coloring identifier may mean that one or more second bits used to represent the second coloring identifier and one or more first bits used to represent the first coloring identifier are located in the same bit position in the message and have the same bit value. Exemplarily, the two first bits used to represent the first coloring identifier and the two second bits used to represent the second coloring identifier are both located at the first bit and the second bit of the TOS field in the IP header of the message, and the bit values of the two first bits and the two second bits are both 11, to indicate that the second coloring identifier is the same as the first coloring identifier. It is understandable that one bit may also be used to represent the first coloring identifier and the second coloring identifier, and the value of the bit may be 1, to indicate that the second coloring identifier is the same as the first coloring identifier.
[0164] Optionally, the second coloring identifier and the first coloring identifier satisfying a preset correspondence may mean that one or more second bits used to represent the second coloring identifier and one or more first bits used to represent the first coloring identifier are located in the same bit position in the message, but the bit values satisfy a predefined rule. Exemplarily, the two first bits used to represent the first coloring identifier and the two second bits used to represent the second coloring identifier are both located in the first bit and the second bit of the TOS field in the IP header of the message, and the predefined rule may be that the bit value of the two first bits is 11, and the bit value of the two second bits is 10.
[0165] Optionally, the second coloring identifier and the first coloring identifier satisfying a preset correspondence may also mean that the one or more second bits used to represent the second coloring identifier and the one or more first bits used to represent the first coloring identifier are located at different bit positions in the message, but the bit positions and bit values of the one or more second bits and the one or more first bits in the message satisfy a predefined rule. Exemplarily, the predefined rule may be that a first bit used to represent the first coloring identifier is located in the first bit of the TOS field in the IP header of the message and has a bit value of 1, and a second bit used to represent the second coloring identifier is located in the second bit of the TOS field in the IP header of the message and has a bit value of 1. It is understandable that the predefined rule may also define that the bit values of the first bit and the second bit are different.
[0166] Case 2: The second identifier may include a serial number.
[0167] The first identifier and the second identifier may include a sequence number, wherein the first identifier may include a first sequence number, and the second identifier may include a second sequence number. The second sequence number may be represented by the bit values of N bits in the second message, wherein the N bits used to represent the second sequence number and the N bits used to represent the first sequence number may occupy the same proportion in the message. For a description of the N bits, please refer to the description of the aforementioned embodiment and will not be repeated here.
[0168] Among them, the first identifier and the second identifier serial number, the association of the second identifier with the first identifier may mean that the second serial number is associated with the first serial number, and the association of the second serial number with the first serial number may include: the second serial number is the same as the first serial number or satisfies a preset corresponding relationship.
[0169] Optionally, the second serial number and the first serial number satisfying a preset correspondence may mean that the size of the second serial number and the first serial number satisfy a predefined rule, for example, the sum of the serial numbers between the second serial number and the first serial number is a specific value, etc.
[0170] Case 3: The second identifier may include a serial number and a dye identifier.
[0171] The first identifier and the second identifier may include a serial number and a coloring identifier. The first identifier includes a first serial number and a first coloring identifier, and the second identifier includes a second serial number and a second coloring identifier. The second coloring identifier may be represented by the bit value of one or more second bits in the second message. The second serial number may be represented by the bit value of N bits in the second message. It is understandable that the one or more second bits and the N bits may be different bits. For the deployment position of the one or more second bits in the message, please refer to the description of Case 1 in Step S106, and for the deployment position of the N bits in the message, please refer to the description of Case 2 in Step S106, which will not be repeated here.
[0172] In some optional implementation scenarios, a second coloring flag may be represented by a second bit value, and the second sequence number may be represented by N bits. The second coloring flag may be used to indicate that the second message is a response message for network round-trip delay measurement. For example, changing the bit value of the second bit to 1 indicates that the second message is a response message. The second bit may be referred to as a response flag.
[0173] Where the second identifier and the first identifier are a serial number and a dye identifier, then associating the second identifier with the first identifier may mean associating the second dye identifier with the first dye identifier, and associating the second serial number with the first serial number. For a description of associating the second dye identifier with the first dye identifier, refer to the description of Case 1 in step S106; for a description of associating the second serial number with the first serial number, refer to the description of Case 2 in step S106, which will not be repeated here.
[0174] In some optional implementation scenarios, a first coloring identifier can be represented by a bit value of a first bit, and a first sequence number can be represented by N bits. The first coloring identifier can be used to indicate that the first message is a probe message for performing network round-trip delay measurement. The first bit can be called a probe flag. For example, the bit value of the probe flag is set to 1. Correspondingly, a second coloring identifier can be represented by a bit value of a second bit, and a second sequence number can be represented by N bits. The second coloring identifier can be used to indicate that the second message is a response message for performing network round-trip delay measurement. The second bit can be called a response flag. For example, the bit value of the response flag is set to 1. The bit positions of the response flag and the probe flag in the message can be different, and the bit positions of the N bits used to represent the first sequence number and the N bits used to represent the second sequence number in the message can be the same.
[0175] S107: The second network element sends a second message to the first network element.
[0176] S108: The first network element receives the second message and records a second time of receiving the second message, where the second message includes a second identifier and a waiting time.
[0177] S109: The first network element determines that the second identifier is associated with the first identifier, and determines a network round-trip delay between the first network element and the second network element according to the first time, the second time, and the waiting time.
[0178] In one embodiment, the first network element receives at least one message from the second network element, and the at least one message may include one or more second messages (i.e., response messages) with a second identifier added. Among them, for the second message with a second identifier added, the first network element records the second moment of receiving the second message, and parses the second message to obtain the waiting time. For the message without a second identifier added, the moment of receiving the message may not be recorded and application layer processing may be performed. It is understandable that the first network element may also record the moment of receiving each message, and for the second message with a second identifier added, retain the recorded second moment of receiving the second message, and delete the moments of other records.
[0179] The first identification and the second identification may include a dyeing identification and / or a serial number. The following describes the following situations:
[0180] Case 1: The first identifier and the second identifier may include a coloring identifier. The first identifier may be a first coloring identifier, and the second identifier may be a second coloring identifier. When it is detected that the second message includes a second coloring identifier associated with the first coloring identifier, it can be considered that the second identifier is associated with the first identifier, and the network loop delay between the first network element and the second network element is determined based on the recorded first moment of sending the first message, the second moment of receiving the second message, and the waiting time parsed from the second message. The description of the association between the first coloring identifier and the second coloring identifier can refer to the description of Case 1 in step S106, and will not be repeated here. It can be understood that when the first identifier and the second identifier are coloring identifiers, a network loop delay can be measured at the same time.
[0181] Case 2: The first identifier and the second identifier may include a serial number. The first identifier may be a first serial number, and the second identifier may be a second serial number. When the second serial number is parsed from the second message, the first serial number associated with the second serial number may be searched from at least one recorded first serial number. Further, the network round-trip delay between the first network element and the second network element is determined based on the recorded first moment corresponding to the associated first serial number, the second moment of receiving the second message, and the waiting time parsed from the second message. The description of the association between the first serial number and the second serial number can refer to the description of Case 2 in step S106 and will not be repeated here. It can be understood that when the first identifier and the second identifier are serial numbers, multiple network round-trip delays can be measured simultaneously to improve measurement efficiency.
[0182] For example, the first network element records that the first sequence number 00 corresponds to time t1, and the first sequence number 01 corresponds to time t2, indicating that the first network element has sent two first messages containing first sequence numbers 00 and 01, respectively. The first network element can search for the first sequence number associated with the second sequence number from the multiple recorded correspondences. For example, if the second sequence number is associated with the first sequence number, which means that the second sequence number is the same as the first sequence number, and the second sequence number is 01, then time t2 is used as the first time corresponding to the first sequence number associated with the second sequence number, and the network round-trip delay is calculated based on time t2.
[0183] Case 3: The first identifier and the second identifier may include a sequence number and a coloring identifier. The first identifier may include a first coloring identifier and a first sequence number, and the second identifier may include a second coloring identifier and a second sequence number. For a received message, the first network element may, upon determining that the message contains a second coloring identifier associated with the first coloring identifier, then detect the second sequence number and wait time contained in the message, without having to detect the sequence number and wait time for each message, thereby improving message processing efficiency. For example, the second coloring identifier may be represented by the bit value of a second bit, and the first network element may determine whether the message contains the second coloring identifier by detecting the bit value of the second bit in the message. The first sequence number associated with the second sequence number is further searched from the at least one recorded first sequence number, and the network round trip delay is calculated based on the first moment corresponding to the associated first sequence number. For details, refer to the description of Case 2 in step S109. In some optional implementation scenarios, the first network element may, upon detecting that the message contains the second coloring identifier, record the second moment of receipt of the second message.
[0184] In an embodiment of the present application, the first network element determines the network round-trip delay between the first network element and the second network element based on the first moment of sending the first message, the second moment of receiving the second message, and the waiting time. The method for determining the network round-trip delay between the first network element and the second network element may be to calculate the time difference between the second moment and the first moment, and subtract the waiting time from the time difference to obtain the network round-trip delay between the first network element and the second network element.
[0185] The waiting time may be located in the payload portion of the second message, and the waiting time may be deleted before the second message is processed at the application layer. For example, the waiting time is carried by an EPD field in the payload portion, and the EPD field may be deleted. The deleted payload portion containing the application layer data may then be processed at the application layer, thereby unaware of the network round-trip delay measurement process at the application layer.
[0186] It can be understood that in the above-mentioned embodiment, the first bit, the second bit and any one of the N bits are located in the net load part of the message. Before the message is processed by the application layer, the additional bits in the net load part can be deleted so that the application layer does not perceive the measurement process of the network round-trip delay.
[0187] Figure 6 This is a flow chart of a delay measurement method provided in an embodiment of the present application. This embodiment involves the specific process of performing message transmission between a first network element, a second network element, and a third network element to perform delay measurement. It can be understood that in an actual measurement scenario, there may be one or more third network elements for performing network loop delay measurement. This embodiment uses one third network element as an example. Figure 3 As shown, the method may include: steps S200 to S214, wherein the execution order of steps S200 to S214 is not limited in the embodiment of the present application.
[0188] S200: Select a message to be identified from at least one message that a first network element is to send to a second network element.
[0189] S201: A first network element adds a first identifier to a message to be identified to obtain a first message.
[0190] S202: The first network element sends a first message to the second network element.
[0191] S203: The first network element records the first moment of sending the first message.
[0192] For steps S200 to S203 of this embodiment, please refer to Figure 4 Steps S100 to S103 of the illustrated embodiment.
[0193] S204: The third network element receives the first message and records a fifth time of receiving the first message, where the first message includes the first identifier.
[0194] S205: The third network element forwards the first message to the second network element.
[0195] In one embodiment, the third network element receives at least one message from the first network element, and the at least one message may include one or more first messages (i.e., detection messages) with a first identifier added. Among them, for the first message with the first identifier added, the third network element records the fifth moment of receiving the first message and forwards the first message to the second network element. For the message without the first identifier added, the moment of receiving the message may not be recorded and the message may be forwarded to the second network element. It is understandable that the third network element may also record the moment of receiving each message, and for the first message with the first identifier added, retain the recorded moment of receiving the message.
[0196] Optionally, when the first identifier includes the first sequence number, the third network element may record the first sequence number contained in the first message in addition to the fifth time instant at which the first message is received. Optionally, the third network element may record the correspondence between the fifth time instant and the first sequence number. It is understood that before the third network element records the first sequence number, the third network element must detect and obtain the first sequence number from the first message.
[0197] Optionally, when the first identifier includes a first sequence number and a first coloring identifier, for a received message, the third network element may, upon determining that the message contains the first coloring identifier, then detect the first sequence number contained in the message, without having to detect the sequence number for each message, thereby improving message processing efficiency. For example, if the first coloring identifier is represented by a bit value of a first bit, the third network element may determine whether the message contains the first coloring identifier by detecting the bit value of the first bit in the message. Optionally, the third network element may only record the fifth moment of receipt of the message if it determines that the message contains the first coloring identifier.
[0198] S206: The second network element receives the first message and records a fourth time of receiving the first message, where the first message includes the first identifier.
[0199] S207: Determine the message that the second network element is going to send to the first network element as a message to be identified.
[0200] S208, add the waiting time and the second identifier associated with the first identifier to the message to be identified to obtain the second message, where the waiting time is used to represent the time difference between the third moment when the second network element sends the second message and the fourth moment when the second network element receives the first message.
[0201] S209: The second network element sends a second message to the first network element.
[0202] Please refer to the steps S206 to S209 of this embodiment of the present application. Figure 4 Steps S104 to S107 of the illustrated embodiment.
[0203] S210, the third network element receives the second message and records the sixth moment of receiving the second message, the second message includes a second identifier and a waiting time, the waiting time is used to indicate the time difference between the third moment when the second network element sends the second message and the fourth moment when the second network element receives the first message.
[0204] S211: The second network element determines that the second identifier is associated with the first identifier, and determines a network round-trip delay between the third network element and the second network element according to the fifth moment, the sixth moment, and the waiting time.
[0205] S212: The third network element forwards the second message to the first network element.
[0206] In one embodiment, the third network element receives at least one message from the second network element, and the at least one message may include one or more second messages (i.e., response messages) with a second identifier added. Among them, for the second message with a second identifier added, the third network element records the sixth moment of receiving the second message, and parses the second message to obtain the waiting time, and then forwards the message to the first network element. For the message without a second identifier added, the moment of receiving the message may not be recorded and the message may be forwarded to the first network element. It is understandable that the third network element may also record the moment of receiving each message, and for the second message with a second identifier added, retain the recorded sixth moment of receiving the second message, and delete the other recorded moments.
[0207] The first identification and the second identification may include a dyeing identification and / or a serial number. The following describes the following situations:
[0208] Case 1: The first identifier and the second identifier may include a coloring identifier. The first identifier may be a first coloring identifier, and the second identifier may be a second coloring identifier. When it is detected that the second message includes a second coloring identifier associated with the first coloring identifier, it can be considered that the second identifier is associated with the first identifier. The network round-trip delay between the third network element and the second network element is determined based on the fifth time point of sending the first message, the sixth time point of receiving the second message, and the waiting time obtained by parsing the second message.
[0209] Case 2: The first identifier and the second identifier may include a sequence number. The first identifier may be a first sequence number, and the second identifier may be a second sequence number. When the second sequence number is parsed from the second message, the third network element may search for a first sequence number associated with the second sequence number from at least one recorded first sequence number. Furthermore, the network round-trip delay between the third network element and the second network element is determined based on the recorded fifth time corresponding to the associated first sequence number, the sixth time of receiving the second message, and the waiting time parsed from the second message.
[0210] For example, the third network element records that the first sequence number 00 corresponds to time t3, and the first sequence number 01 corresponds to time t4, indicating that the third network element has forwarded two first messages containing first sequence numbers 00 and 01, respectively. The third network element can search for the first sequence number associated with the second sequence number from the multiple recorded correspondences. For example, if the second sequence number is associated with the first sequence number, it means that the second sequence number is the same as the first sequence number, and the second sequence number is 01. In this case, time t4 is used as the fifth time corresponding to the first sequence number associated with the second sequence number, and the network round-trip delay is calculated based on time t2.
[0211] Case 3: The first identifier and the second identifier may include a sequence number and a coloring identifier. The first identifier may include a first coloring identifier and a first sequence number, and the second identifier may include a second coloring identifier and a second sequence number. For a received message, the third network element may, upon determining that the message contains a second coloring identifier associated with the first coloring identifier, then detect the second sequence number and waiting time contained in the message, without having to detect the sequence number and waiting time for each message, thereby improving the efficiency of message processing. For example, the second coloring identifier may be represented by the bit value of a second bit, and the third network element may determine whether the message contains the second coloring identifier by detecting the bit value of the second bit in the message. The first sequence number associated with the second sequence number is further searched from the at least one recorded first sequence number, and the network round trip delay is calculated based on the fifth time corresponding to the associated first sequence number. In some optional implementation scenarios, the first network element may, upon detecting that the message contains the second coloring identifier, record the sixth time of receiving the second message.
[0212] In an embodiment of the present application, the method for determining the network round-trip delay between the third network element and the second network element based on the fifth moment of receiving the first message, the sixth moment of receiving the second message, and the waiting time can be to calculate the time difference between the sixth moment and the fifth moment, and subtract the waiting time from the time difference to obtain the network round-trip delay between the third network element and the second network element.
[0213] S213: The first network element receives the second message and records a second time of receiving the second message.
[0214] S214: The first network element determines that the second identifier is associated with the first identifier, and determines a network round-trip delay between the first network element and the second network element according to the first time, the second time, and the waiting time.
[0215] Please refer to the steps S213 to S214 of this embodiment of the present application. Figure 4 Steps S108 and S109 of the illustrated embodiment.
[0216] The following describes how N bits, the first bit, and the second bit are deployed in a message, using the example of a first identifier consisting of a first coloring identifier and a first sequence number, and a second identifier consisting of a second coloring identifier and a second sequence number. The first coloring identifier is represented by the value of a first bit, and the second coloring identifier is represented by the value of a second bit. For ease of description, the N bits representing the sequence number are referred to as sequence number flags, the first bit is referred to as a detection flag, and the second bit is referred to as a response flag.
[0217] Optionally, one or more of the sequence number flag, the detection flag, and the response flag may be located in the IP header of the message, for example, unused bits in the IP header. Optionally, after obtaining the bit value of the corresponding flag from the IP header, the bit value of the flag may be modified to a default value. For example, if the default value is 0, the bit value of the flag may be set to 0.
[0218] Optionally, one or more of the sequence number flag, the detection flag, and the response flag may be located in the payload portion of the message, and the flag may be located between the transport layer header and the application layer data. For example, a field may be added between the transport layer header and the application layer data to carry the flag. Optionally, the flag may be deleted before the message is processed at the application layer. Optionally, if the flag is carried by a field, the field may be deleted.
[0219] The following examples illustrate how the sequence number flag, detection flag, and response flag are deployed in a message. Please understand that the following deployment methods are only examples:
[0220] Deployment method 1: The sequence number flag, detection flag, and response flag can all be located in the IP header of the message, and are unused bits in the IP header. Figure 7 As shown in the figure, the IP header has 6 lines, each line has 32 bits, that is, 0-191, a total of 192 bits. The TOS field is located at bits 8-15 of the IP header, and the flag field is located at bits 48-50 of the IP header. In the IP header of the message, the first 3 bits of the TOS field (i.e. Figure 7 The padding of the TOS field in the Figure 7 The padding part of the flag field in the byte is not used), with a total of 4 bits not used.
[0221] For example, N = 2. Two bits can be selected from the four unused bits as sequence number flags. This selection can be done in a variety of ways. These two bits can represent four sequence numbers: {00, 01, 10, 11}. Each sequence number identifies a set of measurements, which in turn yields one network round-trip delay. This means that up to four network round-trip delays can be measured simultaneously.
[0222] One bit is selected from the four unused bits as a detection flag, and the selection can be done in a variety of ways. Setting the detection flag to 1 indicates that the message is a detection message. One bit is selected from the four unused bits as a response flag, and the selection can be done in a variety of ways. Setting the value of the response flag to 1 indicates that the message is a response message. It is understood that in the embodiments of the present application, the bit positions of the detection flag, response flag, and sequence number flag in the message can be different.
[0223] The following provides a specific method for deploying the sequence number flag, the detection flag, and the response flag in the IP header. Of course, other methods are also possible and this application is not limited to them. The following description is only an example:
[0224] Among them, the first bit of the TOS field, that is, the eighth bit of the IP header, can be used as a detection flag bit. Setting this bit to 1 indicates that the message is a detection message.
[0225] The second bit of the TOS field, that is, the ninth bit of the IP header, can be used as a response flag. Setting this bit to 1 indicates that the message is a response message.
[0226] The third bit of the TOS field, that is, the 10th bit of the IP header, and the first bit of the flag field, that is, the 48th bit of the IP header, a total of two bits can be used as the sequence number flag to indicate the sequence number.
[0227] It is understandable that in deployment method 1, since the sequence number flag, detection flag, and response flag are all located in the IP header of the message, the first network element and the second network element can modify the bit value of each flag bit in the message after the IP protocol layer processing is completed when sending the message; and the first network element and the second network element can detect the bit value of each flag bit before the IP protocol layer processing when receiving the message. When the third network element forwards the message, it can detect the bit value of the flag bit either after or before the IP protocol layer processing.
[0228] Deployment method 2: The sequence number flag, detection flag, and response flag can all be located in the payload portion of the message. Optionally, a field can be added to the payload portion to carry the sequence number flag, detection flag, and response flag. Figure 8 As shown, a coloring field is added between the transport layer header and the EPD field. Optionally, the length L_C of the coloring field can be adjusted according to the sampling frequency of the message.
[0229] Among them, the length L_C of the coloring field is greater than or equal to 3, and 1 bit is selected from the L_C bits as a detection flag bit, 1 bit is selected as a response flag bit, and the remaining L_C-2 bits are used as serial number flag bits, wherein L_C-2 bits can represent 2 (L_C-2) serial numbers.
[0230] The following examples illustrate the case where the length of the color field L_C is 4 bits and 8 bits respectively:
[0231] Optionally, the length L_C of the coloring field is 4 bits. The first bit of the coloring field can be used as a detection flag, and setting this bit to 1 indicates that the message is a detection message; the second bit of the coloring field can be used as a response flag, and setting this bit to 1 indicates that the message is a response message; the third and fourth bits of the coloring field can be used as sequence number flags, which can be used to represent 4 sequence numbers, that is, can support the simultaneous measurement of 4 network round-trip delays. It is understandable that the deployment method of each flag in the 4 bits can also be other, and the above is only an example.
[0232] Optionally, the length L_C of the coloring field is 8 bits. The first bit of the coloring field can be used as a detection flag, and setting the bit to 1 indicates that the message is a detection message; the second bit of the coloring field can be used as a response flag, and setting the bit to 1 indicates that the message is a response message; the 3rd to 8th bits of the coloring field, a total of 6 bits, can be used as sequence number flags, which can be used to represent 2^6=64 sequence numbers, that is, it can support the simultaneous measurement of 64 network round-trip delays. It is understandable that the deployment method of each flag in the 8 bits can also be other, and the above is only an example.
[0233] It can be understood that in deployment method 2, since the serial number flag, detection flag and response flag are all located in the net load part of the message, when the first network element and the second network element send the message, they can add each flag bit and set the bit value of each flag bit in the net load part of the message after the application layer processing is completed; when the first network element and the second network element receive the message, they can detect the bit value of each flag bit before the application layer processing and delete the added flag bit.
[0234] Deployment method 3: The detection flag and the response flag can both be located in the IP header of the message and are unused bits in the IP header. The sequence number flag can be located in the payload of the message. Optionally, a field can be added to the payload to carry the sequence number flag. Figure 8 As shown, a coloring field is added between the transport layer header and the EPD field. The coloring field is used to carry the sequence number flag. Optionally, the length L_C of the coloring field can be adjusted according to the sampling frequency of the message.
[0235] It should be noted that the above three optional deployment methods are only examples. The serial number flag, detection flag and response flag can also be deployed in other ways, which are not limited in this application.
[0236] Combine Figure 9 ,right Figure 6 The method shown is introduced as an example. Figure 9 In this example, the first and second network elements are terminal devices or servers, and the third network element is a user plane device. If the first network element is a terminal device and the second network element is a server, the uplink network round-trip delay measurement process is performed, and the obtained network round-trip delay is the uplink network round-trip delay. If the first network element is a server and the second network element is a terminal device, the downlink network round-trip delay measurement process is performed, and the obtained network round-trip delay is the downlink network round-trip delay.
[0237] The following uses the uplink network round-trip delay measurement process as an example. For ease of description, the following example assumes that the first identifier includes a first coloring identifier and a first sequence number, and the second identifier includes a second coloring identifier and a second sequence number. The first bit used to represent the first coloring identifier is called the detection flag bit. Setting the detection flag bit to 1 indicates that the message is a detection message. The second bit used to represent the second coloring identifier is called the response flag bit. Setting the response flag bit to 1 indicates that the message is a response message.
[0238] Step 1. The terminal device samples at least one message to be sent to the server to obtain a message to be identified, adds a first sequence number to the message to be identified, and sets the detection flag to 1 to obtain a detection message.
[0239] For non-probe messages, the terminal device directly sends them, and for probe messages, the terminal device records the correspondence between the time T1 of sending the probe message and the first sequence number included in the first message, and then sends the probe message.
[0240] Step 2. The user plane device determines whether the received message is a probe message based on the probe flag. If not, it forwards the message directly. If it is a probe message, it parses the message to obtain the first sequence number and records the correspondence between the time T2 at which the probe message was received and the first sequence number. The user plane device then forwards the probe message.
[0241] Step 3. The server determines whether the received message is a probe message based on the probe flag. If not, it is sent to the application layer for processing. If it is a probe message, the server parses the probe message to obtain the first sequence number, records the correspondence between the time T3 when the probe message was received and the first sequence number, and then sends the message to the application layer for processing. Optionally, the message can be restored before being sent to the application layer for processing. For example, if the probe flag and / or the bits used to indicate the sequence number are located in the payload, the added bits in the payload can be deleted.
[0242] Step 4. The server takes the first message to be sent to the terminal device after time T3 as the message to be identified, adds a second sequence number identical to the first sequence number and the waiting time D1 to the message to be identified, and sets the response flag to 1 to obtain a response message. Where D1 = T4 - T3, where T4 is the current time for calculating the waiting time.
[0243] Step 5. The user plane device determines whether the received message is a response message based on the response flag. If not, it forwards the message directly. If it is a response message, it parses the probe message to obtain the second sequence number, records the time T5 when the response message was received, searches for the recorded first sequence number that matches the second sequence number, and obtains the time T2 corresponding to the first sequence number. The network round-trip delay from the user plane device to the server is calculated as D2 = T5 - T2 - D1. The user plane device then forwards the response message.
[0244] Step 6. The terminal device determines whether the received message is a response message based on the response flag. If it is not a response message, it is directly sent to the application layer for processing. If it is a response message, the second serial number is obtained from the response message, and the time T6 when the response message is received is recorded. The terminal device searches for the first serial number that is the same as the second serial number and obtains the time T1 corresponding to the first serial number. The network loopback delay from the terminal device to the server is calculated as D3 = T6-T1-D1, and then sent to the application layer for processing. Optionally, for the response message, the terminal device can restore the message before sending it to the application layer for processing. For example, if any one or more bits such as the waiting time, the response flag, and the bit used to represent the serial number are located in the net load part, the added bits in the net load part can be deleted.
[0245] The above is the process of measuring the uplink network loopback delay. If the downlink network loopback delay is measured, the server may send a probe message to the terminal device.
[0246] Among them, the server records the correspondence between the time T7 when the probe message is sent and the first sequence number contained in the probe message, the user-side device records the correspondence between the time T8 when the probe message is received and the first sequence number, and the terminal device records the correspondence between the time T9 when the probe message is received and the first sequence number, and then the terminal device calculates the waiting time D4 = T10-T9, where T10 is the current time for calculating the waiting time.
[0247] The terminal device further sends a response message, which includes a waiting time D4 and a second sequence number, which is the same as the first sequence number. The user plane device records the time T11 when the response message is received, and calculates the network round-trip delay D5 from the user plane device to the terminal device = T11-T8-D4. The server records the time T12 when the response message is received, and calculates the network round-trip delay D6 from the server to the terminal device = T12-T7-D4. The specific description details can be referred to the description of measuring the downlink network round-trip delay above, and will not be repeated here.
[0248] Above, combined Figures 4 to 9 The method provided in the embodiment of the present application is described in detail. Figures 10 to 13 The device provided in the embodiments of the present application is described in detail.
[0249] Figure 10 : is a schematic block diagram of a communication device provided in an embodiment of the present application. Figure 10 As shown, the communication device 1000 may include a transceiver unit 1010 and a processing unit 1020. The transceiver unit 1010 and the processing unit 1020 may be software, hardware, or a combination of software and hardware.
[0250] The transceiver unit 1010 may include a transmitting unit and a receiving unit. The transmitting unit is used to implement a transmitting function, and the receiving unit is used to implement a receiving function. The transceiver unit 1010 may implement a transmitting function and / or a receiving function. The transceiver unit may also be described as a communication unit.
[0251] Optionally, the transceiver unit 1010 can be used to receive messages sent by other devices, and can also be used to send messages to other devices. The processing unit 1020 can be used to perform internal processing of the device. The processing unit can also be called a delay measurement unit.
[0252] In one possible design, the communication device 1000 may correspond to the first network element in the above method embodiment, for example, the communication device 1000 may be the first network element or a chip in the first network element. The communication device 1000 may include a unit for executing the operations performed by the first network element in the above method embodiment, and each unit in the communication device 1000 is respectively for implementing the operations performed by the first network element in the above method embodiment.
[0253] Exemplarily, the processing unit 1020 is configured to select a message to be identified from at least one message that the first network element is to send to the second network element;
[0254] The processing unit 1020 is further configured to add a first identifier to the message to be identified to obtain a first message;
[0255] The transceiver unit 1010 is configured to send the first message to the second network element;
[0256] The processing unit 1020 is further configured to record a first time at which the first message is sent;
[0257] The transceiver unit 1010 is configured to receive a second message, where the second message includes a second identifier and a waiting time, where the waiting time is used to indicate a time difference between a third time at which the second network element sends the second message and a fourth time at which the second network element receives the first message;
[0258] The processing unit 1020 is further configured to record a second time at which the second message is received;
[0259] The processing unit 1020 is further configured to determine that the second identifier is associated with the first identifier, and determine a network round trip delay between the first network element and the second network element based on the first moment, the second moment, and the waiting time.
[0260] Optionally, the first identifier and the second identifier include a serial number and / or a coloring identifier, and the coloring identifier is used to mark a message for performing network round-trip delay measurement.
[0261] Optionally, the first identifier and the second identifier include serial numbers, wherein the association between the first identifier and the second identifier includes: a first serial number included in the first identifier is the same as a second serial number included in the second identifier or satisfies a preset correspondence.
[0262] Optionally, the first identifier and the second identifier include a dyeing identifier, wherein the association between the first identifier and the second identifier includes: a first dyeing identifier included in the first identifier and a second dyeing identifier included in the second identifier are the same as each other or satisfy a preset corresponding relationship.
[0263] The processing unit 1020 is further configured to record a correspondence between the first sequence number and the first time of sending the first message.
[0264] Optionally, the first sequence number is represented by the bit value of N bits in the first message, where N is an integer greater than or equal to 1, and the second sequence number is represented by the bit value of the N bits in the second message;
[0265] The N bits include one or more of the following bits: the first bit, the second bit, the third bit of the Type of Service (TOS) field in the Internet Protocol (IP) header of the message, or the first bit of the Flags field in the IP header of the message; or
[0266] The N bits include one or more bits of the payload portion of the message.
[0267] Optionally, the processing unit 1020 is further configured to determine the first sequence number from 2N sequence numbers.
[0268] Optionally, the waiting time is located in the payload portion of the second message; and after determining the network round-trip delay between the first network element and the second network element, the method further includes:
[0269] The processing unit 1020 is further configured to delete the waiting time in the payload portion and perform application layer processing on the deleted payload portion.
[0270] Optionally, the processing unit 1020 is further configured to select, according to a sampling rule, a message to be identified from at least one message that the first network element is to send to the second network element;
[0271] The sampling rule includes selecting a message to be identified from the message flow at intervals of M messages, where M is an integer greater than or equal to 1; or the sampling rule includes selecting a message to be identified from the message flow at intervals of a target duration;
[0272] The message flow includes at least one message that the first network element is to send to the second network element.
[0273] Optionally, the processing unit 1020 is further configured to add a first sequence number and a first coloring identifier to the message to be identified to obtain a first message, wherein the first coloring identifier is configured to indicate that the first message is a detection message for performing network round-trip delay measurement.
[0274] Optionally, the first coloring identifier is represented by a bit value of one or more first bits in the first message;
[0275] The one or more first bits include one or more of the following bits: the first bit, the second bit, the third bit of the Type of Service TOS field in the IP header of the message or the first bit of the flag field in the IP header of the message; or
[0276] The one or more first bits include one or more bits of a payload portion of the message.
[0277] Optionally, the second identifier includes a sequence number and a coloring identifier; the processing unit 1020 is further configured to, upon determining that the second message includes a second coloring identifier associated with the first coloring identifier, obtain a second sequence number from the second message, where the second coloring identifier is used to indicate that the second message is a response message for performing network round-trip delay measurement;
[0278] It is determined that the second serial number is the same as the first serial number.
[0279] Optional,
[0280] The second coloring identifier is represented by the bit value of one or more second bits in the second message;
[0281] The one or more second bits include one or more of the following bits: the first bit, the second bit, the third bit of the Type of Service TOS field in the IP header of the message or the first bit of the flag field in the IP header of the message; or
[0282] The one or more second bits include one or more bits of a payload portion of the message.
[0283] In one possible design, the communication device 1000 may correspond to the third network element in the above method embodiment, for example, the communication device 1000 may be the third network element or a chip in the third network element. The communication device 1000 may include a unit for executing the operations performed by the third network element in the above method embodiment, and each unit in the communication device 1000 is respectively for implementing the operations performed by the third network element in the above method embodiment.
[0284] Exemplarily, the transceiver unit 1010 is configured to receive a first message, where the first message includes a first identifier;
[0285] The processing unit 1020 is configured to record a fifth time at which the first message is received;
[0286] The transceiver unit 1010 is further configured to forward the first message; and receive a second message, wherein the second message includes a second identifier and a waiting time, the waiting time being used to indicate a time difference between a third time at which the second network element sends the second message and a fourth time at which the second network element receives the first message;
[0287] The processing unit 1020 is configured to record a sixth time at which the second message is received;
[0288] The transceiver unit 1010 is further configured to forward the second message;
[0289] The processing unit 1020 is configured to determine that the second identifier is associated with the first identifier, and determine a network round-trip delay between the third network element and the second network element based on the fifth moment, the sixth moment, and the waiting time.
[0290] Optionally, the first identifier and the second identifier include a serial number and / or a coloring identifier, and the coloring identifier is used to mark a message for performing network round-trip delay measurement.
[0291] Optionally, the first identifier and the second identifier include serial numbers, wherein the association between the first identifier and the second identifier includes: a first serial number included in the first identifier is the same as a second serial number included in the second identifier or satisfies a preset correspondence.
[0292] Optionally, the processing unit 1020 is configured to record a correspondence between the first serial number and a fifth moment of receiving the first message.
[0293] Optionally, the processing unit 1020 is further used to obtain a first sequence number from the first message when it is determined that the first message contains a first coloring identifier, where the first coloring identifier is used to indicate that the first message is a detection message used to perform network round-trip delay measurement.
[0294] Optionally, the second identifier includes a sequence number and a coloring identifier; the processing unit 1020 is further configured to, upon determining that the second message includes a second coloring identifier associated with the first coloring identifier, obtain a second sequence number from the second message, where the second coloring identifier is used to indicate that the second message is a response message for performing network round-trip delay measurement;
[0295] And, determining that the second serial number is the same as the first serial number.
[0296] In one possible design, the communication device 1000 may correspond to the second network element in the above method embodiment, for example, the communication device 1000 may be the second network element or a chip of the second network element. The communication device 1000 may include a unit for executing the operations performed by the second network element in the above method embodiment, and each unit in the communication device 1000 is respectively for implementing the operations performed by the second network element in the above method embodiment.
[0297] Exemplarily, the transceiver unit 1010 is configured to receive a first message, where the first message includes a first identifier;
[0298] The processing unit 1020 is configured to record a fourth time at which the first message is received;
[0299] The processing unit 1020 is further configured to determine the message that the second network element is about to send to the first network element as a message to be identified; and add a waiting time and a second identifier associated with the first identifier to the message to be identified, to obtain a second message, where the waiting time is used to represent a time difference between a third time and a fourth time at which the second network element sends the second message;
[0300] The transceiver unit 1010 is used to send the second message to the first network element.
[0301] Optionally, the message to be identified is the first message sent by the second network element to the first network element after the fourth moment.
[0302] Optionally, the first identifier and the second identifier include a serial number and / or a coloring identifier, and the coloring identifier is used to mark a message for performing network round-trip delay measurement.
[0303] Optionally, the first identifier and the second identifier include serial numbers, wherein the association between the first identifier and the second identifier includes: a first serial number included in the first identifier is the same as a second serial number included in the second identifier or satisfies a preset correspondence.
[0304] The processing unit 1020 is further configured to record a correspondence between the first serial number and a fourth time of receiving the first message.
[0305] Optionally, the first identifier includes a serial number and a coloring identifier, and the processing unit 1020 is also used to obtain a first serial number from the first message when it is determined that the first message contains a first coloring identifier, and the first coloring identifier is used to indicate that the first message is a detection message for performing network loopback delay measurement.
[0306] Optionally, the second identifier includes a serial number and a coloring identifier; the processing unit 1020 is also used to add a waiting time, a second serial number that is the same as the first serial number, and a second coloring identifier associated with the first coloring identifier to the message to be identified to obtain a second message, and the second coloring identifier is used to indicate that the second message is a response message for performing network loopback delay measurement.
[0307] Exemplarily, the network element corresponding to the above-mentioned communication device may be UE, CPE, access network equipment, user plane equipment or server, etc.
[0308] It should be understood that when the communication device 1000 is a UE, the transceiver unit 1010 in the communication device 1000 may correspond to Figure 11 The transceiver 2020 in the terminal device 2000 shown in FIG. 1 may correspond to the processing unit 1020 in the communication device 1000. Figure 11 The processor 2010 in the terminal device 2000 is shown.
[0309] It should also be understood that when the communication device 1000 is a chip configured in a UE, the transceiver unit 1010 in the communication device 1000 may be an input / output interface.
[0310] It should be understood that when the communication device 1000 is a CPE, an access network device, a user plane device or a server, the transceiver unit 1010 in the communication device 1000 may correspond to Figure 12 The communication interface 3010 shown in FIG. 1 , the processing unit 1020 may correspond to Figure 12 Processor 3020 is shown in FIG.
[0311] Please refer to Figure 11 , is a schematic diagram of the structure of the terminal device 2000 provided in the embodiment of the present application. The terminal device 2000 can be applied to Figure 1 In the system shown, the functions of the terminal device (or UE) in the above method embodiment are performed. Figure 11As shown, the terminal device 2000 includes a processor 2010 and a transceiver 2020. Optionally, the terminal device 2000 also includes a memory 2030. The processor 2010, the transceiver 2020, and the memory 2030 can communicate with each other through internal connection paths to transmit control or data signals. The memory 2030 is used to store computer programs, and the processor 2010 is used to call and execute the computer programs from the memory 2030 to control the transceiver 2020 to transmit and receive signals. Optionally, the terminal device 2000 may also include an antenna 2040 for transmitting uplink data or uplink control signaling output by the transceiver 2020 via wireless signals.
[0312] The processor 2010 and the memory 2030 can be combined into a processing device, and the processor 2010 is used to execute the program code stored in the memory 2030 to implement the above functions. In specific implementation, the memory 2030 can also be integrated into the processor 2010, or independent of the processor 2010. The processor 2010 can be combined with the memory 2030 to form a processing device. Figure 10 The processing units in .
[0313] The transceiver 2020 can be used with Figure 10 The transceiver 2020 may include a receiver (or receiver, receiving circuit) and a transmitter (or transmitter, transmitting circuit). The receiver is used to receive signals, and the transmitter is used to transmit signals.
[0314] It should be understood that Figure 11 The illustrated terminal device 2000 is capable of implementing each process involving the first network element or the second network element in any of the aforementioned method embodiments. The operations or functions of the various modules in the terminal device 2000 are respectively for implementing the corresponding processes in the aforementioned method embodiments. For details, please refer to the descriptions in the aforementioned method embodiments; to avoid repetition, detailed descriptions are omitted here.
[0315] The processor 2010 can be used to execute the actions implemented internally by the first network element or the second network element as described in the previous method embodiments, and the transceiver 2020 can be used to execute the actions of the first network element or the second network element sending to or receiving from the network side as described in the previous method embodiments. For details, please refer to the description of the previous method embodiments and will not be repeated here.
[0316] Optionally, the terminal device 2000 may further include a power supply 2050 for providing power to various devices or circuits in the terminal device.
[0317] In addition, in order to make the functions of the terminal device more complete, the terminal device 2000 may also include one or more of an input unit 2060, a display unit 2070, an audio circuit 2080, a camera 2090 and a sensor 2100, and the audio circuit may also include a speaker 2082, a microphone 2084, etc.
[0318] Please refer to Figure 12 , is a schematic structural diagram of a communication device according to an embodiment of the present application. It should be understood that Figure 12 The communication device 3000 shown is only an example. The communication device of the embodiment of the present application may also include other modules or units, or include Figure 12 Modules with similar functions to the modules in the Figure 12 All modules in .
[0319] The communication device 3000 includes a communication interface 3010 and at least one processor 3020 .
[0320] The communication device 3000 may correspond to any network element or device among the first network element, the second network element, and the third network element. At least one processor 3020 executes program instructions so that the communication device 3000 implements the corresponding process of the method executed by the corresponding network element in the above method embodiment.
[0321] In one possible design, the communication device 3000 may correspond to the first network element in the above method embodiment, for example, the communication device 3000 may be the first network element or a chip in the first network element. The communication device 3000 may include components for performing the operations performed by the first network element in the above method embodiment.
[0322] Exemplarily, the processor 3020 is configured to select a message to be identified from at least one message that the first network element is to send to the second network element;
[0323] The processor 3020 is further configured to add a first identifier to the message to be identified to obtain a first message;
[0324] The communication interface 3010 is used to send the first message to the second network element;
[0325] The processor 3020 is further configured to record a first time at which the first message is sent;
[0326] The communication interface 3010 is further configured to receive a second message, where the second message includes a second identifier and a waiting time, where the waiting time indicates a time difference between a third time at which the second network element sends the second message and a fourth time at which the second network element receives the first message.
[0327] The processor 3020 is further configured to record a second time at which the second message is received;
[0328] The processor 3020 is further configured to determine that the second identifier is associated with the first identifier, and determine a network round trip delay between the first network element and the second network element based on the first moment, the second moment, and the waiting time.
[0329] In one possible design, the communication device 3000 may correspond to the third network element in the above method embodiment, for example, the communication device 3000 may be the third network element or a chip in the third network element. The communication device 3000 may include components for performing the operations performed by the third network element in the above method embodiment.
[0330] Exemplarily, the communication interface 3010 is configured to receive a first message, where the first message includes a first identifier;
[0331] The processor 3020 is configured to record a fifth time instant at which the first message is received;
[0332] The communication interface 3010 is further configured to forward the first message; and receive a second message, where the second message includes a second identifier and a waiting time, where the waiting time indicates a time difference between a third time at which the second network element sends the second message and a fourth time at which the second network element receives the first message;
[0333] The processor 3020 is further configured to record a sixth time at which the second message is received;
[0334] The communication interface 3010 is further configured to forward the second message;
[0335] The processor 3020 is further configured to determine that the second identifier is associated with the first identifier, and determine a network round trip delay between the third network element and the second network element based on the fifth moment, the sixth moment, and the waiting time.
[0336] In one possible design, the communication device 3000 may correspond to the second network element in the above method embodiment, for example, the communication device 3000 may be the second network element or a chip in the second network element. The communication device 3000 may include components for performing the operations performed by the second network element in the above method embodiment.
[0337] Exemplarily, the communication interface 3010 is configured to receive a first message, where the first message includes a first identifier;
[0338] The processor 3020 is configured to record a fourth time at which the first message is received;
[0339] The processor 3020 is further configured to determine the message that the second network element is about to send to the first network element as a message to be identified; and add a waiting time and a second identifier associated with the first identifier to the message to be identified, to obtain a second message, where the waiting time is used to represent a time difference between a third moment at which the second network element sends the second message and the fourth moment;
[0340] The communication interface 3010 is further used to send the second message to the first network element.
[0341] Optionally, the communication device 3000 may further include a memory. The memory may store program instructions, and the at least one processor 3020 may read the program instructions stored in the memory and execute the program instructions.
[0342] For the case where the communication device may be a chip or a chip system, see Figure 13 Schematic diagram of the chip structure shown. Figure 13 The chip 4000 shown includes a processor 4001 and an interface 4002. There may be one or more processors 4001, and there may be multiple interfaces 4002. It should be noted that the functions of the processor 4001 and the interface 4002 may be implemented through hardware design, software design, or a combination of hardware and software, without limitation.
[0343] In one possible design, for a case where the chip is used to implement the function of the first network element in the embodiment of the present application: the processor 4001 is configured to select a message to be identified from at least one message that the first network element is to send to the second network element; and add a first identifier to the message to be identified to obtain a first message; and record a first time point at which the first message is sent;
[0344] Interface 4002 is configured to send the first message to the second network element; and receive a second message, where the second message includes a second identifier and a waiting time, where the waiting time is used to indicate a time difference between a third time at which the second network element sends the second message and a fourth time at which the second network element receives the first message;
[0345] Processor 4001 is also used to record the second moment of receiving the second message; and determine that the second identifier is associated with the first identifier, and determine the network round-trip delay between the first network element and the second network element based on the first moment, the second moment and the waiting time.
[0346] For the case where the chip is used to implement the function of the third network element in the embodiment of the present application: the interface 4002 is used to receive a first message, where the first message includes a first identifier;
[0347] The processor 4001 is configured to record a fifth time instant at which the first message is received;
[0348] The interface 4002 is further configured to forward the first message; and receive a second message, where the second message includes a second identifier and a waiting time, where the waiting time indicates a time difference between a third time at which the second network element sends the second message and a fourth time at which the second network element receives the first message;
[0349] The processor 4001 is further configured to record a sixth moment of receiving the second message; and determine that the second identifier is associated with the first identifier, and determine a network round-trip delay between the third network element and the second network element based on the fifth moment, the sixth moment, and the waiting time;
[0350] Interface 4002 is further used to forward the second message.
[0351] For the case where the chip is used to implement the function of the second network element in the embodiment of the present application: the interface 4002 is used to receive a first message, where the first message includes a first identifier;
[0352] The processor 4001 is configured to record a fourth time at which the first message is received; determine a message that the second network element is to send to the first network element as a message to be identified; and add a waiting time and a second identifier associated with the first identifier to the message to be identified, to obtain a second message, where the waiting time is used to represent a time difference between a third time at which the second network element sends the second message and the fourth time;
[0353] Interface 4002 is further used to send the second message to the first network element.
[0354] Optionally, the chip further includes a memory 4003, which is used to store necessary program instructions and data.
[0355] The processor in the embodiments of the present application may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0356] According to the method provided in the embodiments of the present application, the present application also provides a computer program product, which includes: computer program code, which, when the computer program code runs on a computer, enables the computer to execute the method on the first network element side, the second network element side, or the third network element side in any of the aforementioned method embodiments.
[0357] In another embodiment of the present application, a communication system is provided, which includes a first network element and a second network element. Optionally, the communication system may further include a third network element. For example, the first network element and the second network element may be Figure 4 or Figure 6 The first network element and the second network element provided are used to perform Figure 4 or Figure 6 The steps performed by the corresponding network element in the delay measurement method provided; and / or the third network element can be Figure 6 The third network element provided and used to perform Figure 6 The steps performed by the third network element in the provided delay measurement method.
[0358] An embodiment of the present application further provides a processing device, including a processor and an interface; the processor is used to execute the method in any of the above method embodiments.
[0359] It should be understood that the above-mentioned processing device can be a chip. For example, the processing device can be a field programmable gate array (FPGA), a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, a system on chip (SoC), a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chip. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0360] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0361] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disc (SSD)).
[0362] The first network element, second network element, and third network element in each of the above-mentioned apparatus embodiments completely correspond to the first network element, second network element, and third network element in the method embodiments. The corresponding modules or units perform the corresponding steps. For example, the communication unit (transceiver) performs the receiving or sending steps in the method embodiments, while other steps except sending and receiving can be performed by the processing unit (processor). The functions of the specific units can be referred to in the corresponding method embodiments. There can be one or more processors.
[0363] As used in this specification, the terms "component," "module," "system," and the like are used to refer to computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components can reside in a process or execution thread, and a component can be located on a single computer or distributed between two or more computers. In addition, these components can be executed from various computer-readable media having various data structures stored thereon. Components can communicate, for example, through local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component on a local system, a distributed system, or a network, such as the Internet interacting with other systems via signals).
[0364] It should be understood that references to "embodiments" throughout this specification mean that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present application. Therefore, various embodiments throughout this specification do not necessarily refer to the same embodiment. Furthermore, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0365] It should be understood that in the embodiments of the present application, the numbers "first", "second"... are only for distinguishing different objects, such as to distinguish different network devices, and do not constitute a limitation on the scope of the embodiments of the present application. The embodiments of the present application are not limited to this.
[0366] It should also be understood that in this application, "when", "if" and "if" all mean that the network element will make corresponding processing under certain objective circumstances, which is not a time limit, and does not require the network element to make judgment actions when implementing it, nor does it mean that there are other limitations.
[0367] It should also be understood that in each embodiment of the present application, "A corresponds to B" means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A, and B can also be determined based on A and / or other information.
[0368] It should also be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " as used herein generally indicates that the associated objects are in an "or" relationship.
[0369] In this application, expressions similar to “the item includes one or more of the following: A, B, and C” generally mean, unless otherwise specified, that the item can be any one of the following: A; B; C; A and B; A and C; B and C; A, B and C; A and A; A, A and A; A, A and B; A, A and C, A, B and B; A, C and C; B and B, B, B and B, B, B and C, C and C; C, C and C, and other combinations of A, B and C. The above examples use A, B, and C as an example to illustrate the optional items of the item. When the expression is “the item includes at least one of the following: A, B, …, and X”, that is, when the expression contains more elements, the items applicable to the item can also be obtained according to the above rules.
[0370] It is understood that in the embodiments of the present application, the session management network element and / or the terminal device may perform some or all of the steps in the embodiments of the present application. These steps or operations are merely examples, and the embodiments of the present application may also perform other operations or variations of various operations. In addition, the various steps may be performed in a different order than those presented in the embodiments of the present application, and it is possible that not all operations in the embodiments of the present application need to be performed.
[0371] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0372] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0373] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0374] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0375] 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.
[0376] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory ROM, a random access memory RAM, a magnetic disk, or an optical disk.
[0377] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for measuring time delay, characterized in that: The method is applied to a first communication device, where the first communication device is a first network element or a chip in the first network element, and the method includes: Selecting a message to be identified from at least one message that the first network element is to send to the second network element; Adding a first identifier to the message to be identified to obtain a first message, where the first identifier includes a first sequence number; Sending the first message to the second network element, and recording a correspondence between the first sequence number and a first time of sending the first message; receiving a second message, and recording a second time of receiving the second message, where the second message includes a second identifier and a waiting time, where the waiting time indicates a time difference between a third time at which the second network element sends the second message and a fourth time at which the second network element receives the first message, and the second identifier includes a second sequence number; searching for the first sequence number that is identical to the second sequence number, and determining a network round-trip delay between the first network element and the second network element based on the first time, the second time, and the waiting time corresponding to the first sequence number in the corresponding relationship; The selecting a message to be identified from at least one message that the first network element is to send to the second network element includes: According to a sampling rule, a message to be identified is selected from at least one message that the first network element is to send to the second network element, where the sampling rule is determined according to an interaction frequency between the first network element and the second network element.
2. The method according to claim 1, wherein The first identifier and the second identifier further include a coloring identifier, and the coloring identifier is used to mark the message for performing network round-trip delay measurement.
3. The method according to claim 2, wherein The first identifier and the second identifier include dyeing identifiers, and the method further includes: determining that a first dyeing identifier included in the first identifier and a second dyeing identifier included in the second identifier are the same as or satisfy a preset corresponding relationship.
4. The method according to claim 1, wherein The first sequence number is represented by the bit values of N bits in the first message, where N is an integer greater than or equal to 1, and the second sequence number is represented by the bit values of the N bits in the second message; The N bits include one or more of the following bits: the first bit, the second bit, the third bit of the Type of Service (TOS) field in the Internet Protocol (IP) header of the message, or the first bit of the Flags field in the IP header of the message; or The N bits include one or more bits of the payload portion of the message.
5. The method according to claim 4, wherein The method further comprises: The first sequence number is determined from the 2N sequence numbers.
6. The method according to any one of claims 1 to 5, wherein: The waiting time is located in the payload portion of the second message; the method further includes: The waiting time in the payload portion is deleted.
7. The method according to claim 1, wherein The sampling rule includes selecting a message to be identified from the message flow every M messages, where M is an integer greater than or equal to 1; or the sampling rule includes selecting a message to be identified from the message flow every target duration; The message flow includes at least one message that the first network element is to send to the second network element.
8. The method according to claim 1, wherein The first mark also includes a first dye mark; The first coloring identifier is used to indicate that the first message is a detection message used for network round-trip delay measurement.
9. The method according to claim 8, wherein The first coloring identifier is represented by the bit value of one or more first bits in the first message; The one or more first bits include one or more of the following bits: the first bit, the second bit, the third bit of the Type of Service TOS field in the IP header of the message or the first bit of the flag field in the IP header of the message; or The one or more first bits include one or more bits of a payload portion of the message.
10. The method according to claim 8 or 9, characterized in that The second mark further includes a dye mark, and the method further includes: When it is determined that the second message contains a second coloring identifier associated with the first coloring identifier, a second sequence number is obtained from the second message, where the second coloring identifier is used to indicate that the second message is a response message for performing network round-trip delay measurement.
11. The method according to claim 10, wherein The second coloring identifier is represented by the bit value of one or more second bits in the second message; The one or more second bits include one or more of the following bits: the first bit, the second bit, the third bit of the Type of Service TOS field in the IP header of the message or the first bit of the flag field in the IP header of the message; or The one or more second bits include one or more bits of a payload portion of the message.
12. A method for measuring time delay, characterized in that: The method is applied to a third communication device, where the third communication device is a third network element or a chip in the third network element, and the method includes: receiving a first message and recording a fifth time instant at which the first message is received, where the first message includes a first identifier, the first identifier including a first sequence number, the first message being a message to be identified selected from at least one message to be sent by the first network element to the second network element according to a sampling rule, where the sampling rule is determined based on an interaction frequency between the first network element and the second network element; Recording a correspondence between the first sequence number and a fifth time instant at which the first message is received; forwarding the first message; receiving a second message, and recording a sixth time at which the second message is received, the second message including a second identifier and a waiting time, the waiting time being used to indicate a time difference between a third time at which the second network element sends the second message and a fourth time at which the second network element receives the first message, the second identifier including a second sequence number; forwarding the second message; Search for the first sequence number that is identical to the second sequence number, and determine the network round-trip delay between the third network element and the second network element based on the fifth moment, the sixth moment, and the waiting time corresponding to the first sequence number in the corresponding relationship.
13. The method according to claim 12, wherein: The first identifier and the second identifier further include a coloring identifier, and the coloring identifier is used to mark the message for performing network round-trip delay measurement.
14. The method according to claim 13, wherein The method further comprises: When it is determined that the first message includes a first coloring identifier, a first sequence number is obtained from the first message, where the first coloring identifier is used to indicate that the first message is a probe message used for performing network round-trip delay measurement.
15. The method according to claim 14, wherein The method further comprises: When it is determined that the second message contains a second coloring identifier associated with the first coloring identifier, a second sequence number is obtained from the second message, where the second coloring identifier is used to indicate that the second message is a response message for performing network round-trip delay measurement.
16. A method for measuring time delay, characterized in that: The method is applied to a second communication device, where the second communication device is a second network element or a chip in the second network element, and the method includes: receiving a first message, the first message including a first identifier including a first sequence number, and recording a correspondence between the first sequence number and a fourth time instant at which the first message is received, wherein the first message is a message to be identified selected from at least one message to be sent by the first network element to the second network element according to a sampling rule, wherein the sampling rule is determined based on an interaction frequency between the first network element and the second network element; Determining a message that the second network element is about to send to the first network element as a message to be identified; Adding a waiting time and a second identifier to the message to be identified to obtain a second message, where the second identifier includes a second sequence number, the second sequence number being the same as the first sequence number, and the waiting time being used to represent a time difference between a third time at which the second network element sends the second message and a fourth time, where the fourth time is a time corresponding to the first sequence number being the same as the second sequence number; Send the second message to the first network element.
17. The method according to claim 16, wherein The message to be identified is the first message sent by the second network element to the first network element after the fourth moment.
18. The method according to claim 16 or 17, wherein: The first identifier and the second identifier further include a coloring identifier, and the coloring identifier is used to mark the message for performing network round-trip delay measurement.
19. The method according to claim 18, wherein The method further comprises: When it is determined that the first message includes a first coloring identifier, a first sequence number is obtained from the first message, where the first coloring identifier is used to indicate that the first message is a probe message used for performing network round-trip delay measurement.
20. The method of claim 18, wherein: The first message includes a first coloring identifier, the second message includes a second coloring identifier, the first coloring identifier is associated with the second coloring identifier, the second coloring identifier is used to indicate that the second message is a response message for performing network loopback delay measurement, and the first coloring identifier is used to indicate that the first message is a detection message for performing network loopback delay measurement.
21. A communication device comprising means for performing the method of any one of claims 1 to 11, or claims 12 to 15, or claims 16 to 20.
22. A communication device, characterized in that: The method comprises a processor and a memory, wherein the processor and the memory are coupled, and the processor is configured to implement the method according to any one of claims 1 to 11, claims 12 to 15, or claims 16 to 20.
23. A communication device, characterized in that: The method comprises a processor and an interface circuit, wherein the interface circuit is used to receive signals from other communication devices outside the communication device and transmit them to the processor or send signals from the processor to other communication devices outside the communication device, and the processor is used to implement the method according to any one of claims 1 to 11 or claims 12 to 15 or claims 16 to 20 through a logic circuit or executing code instructions.
24. A computer-readable storage medium, characterized in that The storage medium stores a computer program or instruction. When the computer program or instruction is executed by the communication device, it implements the method according to any one of claims 1 to 11, or implements the method according to any one of claims 12 to 15, or implements the method according to any one of claims 16 to 20.
Citation Information
Patent Citations
Link time delay detection method, source terminal, destination terminal and system
CN102394796A
Method and device for time delay calculation
CN105743729A
Network state detection method and system
CN106533826A