CN108512728A - Time determines method, apparatus, storage medium and electronic device - Google Patents

Time determines method, apparatus, storage medium and electronic device Download PDF

Info

Publication number
CN108512728A
CN108512728A CN201810317774.5A CN201810317774A CN108512728A CN 108512728 A CN108512728 A CN 108512728A CN 201810317774 A CN201810317774 A CN 201810317774A CN 108512728 A CN108512728 A CN 108512728A
Authority
CN
China
Prior art keywords
equipment
time
data
moment
timing differential
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810317774.5A
Other languages
Chinese (zh)
Inventor
何玮
夏奎
简浩良
梁继朝
钟晓斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201810317774.5A priority Critical patent/CN108512728A/en
Publication of CN108512728A publication Critical patent/CN108512728A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/0858One way delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/0864Round trip delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of times to determine method, apparatus, storage medium and electronic device.Wherein, this method includes:Determine timing differential and timing differential pace of change of first equipment relative to the second equipment in wireless network;The first moment and the second moment are obtained, according to the determining timing differential, the timing differential pace of change, first moment and second moment determine the time span that the data are transmitted between second equipment and first equipment.The present invention solves the technical issues of upstream time and downgoing time that can not accurately obtain in the related technology in wireless network between two equipment.

Description

Time determines method, apparatus, storage medium and electronic device
Technical field
The present invention relates to network test field, in particular to a kind of time determine method, apparatus, storage medium and Electronic device.
Background technology
The test method of network delay is primarily present two kinds in the related technology:Clock domain between (1) two interactive device It is identical, then pass through delay acquisition of information business datum the prolonging from the first equipment to the second equipment of the first equipment to the second equipment Late, the time that business datum is resident in a network is adjusted according to the delay so that the time is equal to preset fiducial time;(2) Client is through the network delay measuring equipment and by sending TCP data packet between internet and network server.The network prolongs When measuring apparatus the TCP data packet connection status is updated according to the TCP data packet connection status, sending direction, zone bit information, And it will be updated to current time with the connection status correlation time, so that TCP data packet calculates after a transmission process Go out network delay time.However above two mode all has some limitations, and plants mode for (1), it is desirable that two set Clock domain between standby is identical, this condition is difficult to meet for the server and client side by wireless network connection; Mode is planted for (2), network round-trip total time can only be calculated and upstream time and downgoing time can not be calculated separately.
For above-mentioned problem, currently no effective solution has been proposed.
Invention content
An embodiment of the present invention provides a kind of times to determine method, apparatus, storage medium and electronic device, at least to solve The technical issues of upstream time and downgoing time between two equipment can not accurately be obtained in wireless network in the related technology.
One side according to the ... of the embodiment of the present invention, providing a kind of time determines method, including:It determines in wireless network Timing differential and timing differential pace of change of first equipment relative to the second equipment;The first moment and the second moment are obtained, In, first moment be second equipment start transmission data when described in the second equipment at the time of in the case of, it is described Second moment be when first equipment has received the data described in the first equipment at the time of;It is described at first moment Described in when second equipment has received the data at the time of the second equipment in the case of, second moment is first equipment Described in when starting to send the data at the time of the first equipment;According to the determining timing differential, the timing differential variation Speed, first moment and second moment determine that the data pass between second equipment and first equipment Defeated time span.
Another aspect according to the ... of the embodiment of the present invention additionally provides a kind of time determining device, including:First determines mould Block, for determining timing differential and timing differential pace of change of first equipment relative to the second equipment in wireless network;It obtains Module, for obtaining the first moment and the second moment, wherein start transmission data at first moment for second equipment In the case of at the time of the second equipment of Shi Suoshu, second moment be when first equipment has received the data described in the At the time of one equipment;Described in when having received the data for second equipment at first moment at the time of the second equipment In the case of, second moment be when first equipment starts to send the data described in the first equipment at the time of;Second really Cover half block, for according to the determining timing differential, the timing differential pace of change, first moment and described second Moment determines the time span that the data are transmitted between second equipment and first equipment.
Another aspect according to the ... of the embodiment of the present invention additionally provides a kind of storage medium, is stored in the storage medium Computer program, wherein the computer program is arranged to execute the method described in any of the above-described when operation.
Another aspect according to the ... of the embodiment of the present invention additionally provides a kind of electronic device, including memory and processor, institute It states and is stored with computer program in memory, the processor is arranged to run the computer program any of the above-described to execute Method described in.
In embodiments of the present invention, using according to timing differential of first equipment relative to the second equipment in wireless network, Timing differential pace of change, the first moment and the second moment determine that data pass between second equipment and first equipment The mode of defeated time span, wherein second sets described in when first moment starts transmission data for second equipment In the case of at the time of standby, second moment be when first equipment has received the data described in the first equipment when It carves;In the case of described in when having received the data for second equipment at first moment at the time of the second equipment, institute State the second moment be when first equipment starts to send the data described in the first equipment at the time of, by determining that data exist Consider when the time span transmitted between second equipment and first equipment the first equipment relative to the second equipment when Clock correction is different and timing differential pace of change, and then can not have to ensure that the time-domain of the second equipment and the first equipment must be identical, The accuracy for improving the time span that determining data are transmitted between second equipment and first equipment simultaneously, into And solves the skill that can not accurately obtain upstream time and downgoing time in wireless network between two equipment in the related technology Art problem.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and is constituted part of this application, this hair Bright illustrative embodiments and their description are not constituted improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is the hardware block diagram for determining the mobile terminal of method a kind of time of the embodiment of the present invention;
Fig. 2 is the flow diagram for the time provided according to embodiments of the present invention determining method;
Fig. 3 is that the data transmission procedure provided according to the preferred embodiment of the present invention and timestamp record schematic diagram;
Fig. 4 is the network of udp protocol transmission of the sport western station subway station provided according to the preferred embodiment of the present invention or more The schematic diagram of row real time delay;
Fig. 5 is the network of udp protocol transmission of the sport western station subway station provided according to the preferred embodiment of the present invention or more Row delay distribution histogram;
Fig. 6 is the structure diagram of the time determining device provided according to embodiments of the present invention;
Fig. 7 is the structure diagram of the test device provided according to the preferred embodiment of the present invention.
Specific implementation mode
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The every other embodiment that member is obtained without making creative work should all belong to the model that the present invention protects It encloses.
It should be noted that term " first " in description and claims of this specification and above-mentioned attached drawing, " Two " etc. be for distinguishing similar object, without being used to describe specific sequence or precedence.It should be appreciated that using in this way Data can be interchanged in the appropriate case, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover It includes to be not necessarily limited to for example, containing the process of series of steps or unit, method, system, product or equipment to cover non-exclusive Those of clearly list step or unit, but may include not listing clearly or for these processes, method, product Or the other steps or unit that equipment is intrinsic.
According to embodiments of the present invention, a kind of embodiment of the method that the time determines is provided, it should be noted that in attached drawing The step of flow illustrates can execute in the computer system of such as a group of computer-executable instructions, although also, Logical order is shown in flow chart, but in some cases, it can be to execute shown different from sequence herein or retouch The step of stating.
The embodiment of the method that the embodiment of the present application is provided can be in mobile terminal, terminal or similar operation It is executed in device.For running on mobile terminals, Fig. 1 is to determine the mobile end of method a kind of time of the embodiment of the present invention The hardware block diagram at end.As shown in Figure 1, mobile terminal 10 may include one or more (only showing one in Fig. 1) processing Device 102 (processor 102 can include but is not limited to the processing unit of Micro-processor MCV or programmable logic device FPGA etc.) and Memory 104 for storing data, optionally, above-mentioned mobile terminal can also include the transmission device for communication function 106 and input-output equipment 108.It will appreciated by the skilled person that structure shown in FIG. 1 is only to illustrate, simultaneously The structure of above-mentioned mobile terminal is not caused to limit.For example, mobile terminal 10 may also include it is more than shown in Fig. 1 or less Component, or with the configuration different from shown in Fig. 1.
Memory 104 can be used for storing computer program, for example, the software program and module of application software, such as this hair Time in bright embodiment determines that the corresponding computer program of method, processor 102 are stored in by operation in memory 104 Computer program realizes above-mentioned method to perform various functions application and data processing.Memory 104 may include High speed random access memory, may also include nonvolatile memory, as one or more magnetic storage device, flash memory or its His non-volatile solid state memory.In some instances, memory 104 can further comprise remotely setting relative to processor 102 The memory set, these remote memories can pass through network connection to mobile terminal 10.The example of above-mentioned network includes but not It is limited to internet, intranet, LAN, mobile radio communication and combinations thereof.
Transmitting device 106 is used to receive via a network or transmission data.Above-mentioned network specific example may include The wireless network that the communication providers of mobile terminal 10 provide.In an example, transmitting device 106 includes a Network adaptation Device (Network Interface Control ler, referred to as NIC), can be connected with other network equipments by base station from And it can be communicated with internet.In an example, transmitting device 106 can be radio frequency (Radio Frequency, abbreviation For RF) module, it is used to wirelessly be communicated with internet.
Fig. 2 is the flow diagram for the time provided according to embodiments of the present invention determining method, as shown in Fig. 2, this method Include the following steps:
Step S202 determines that the first equipment changes relative to the timing differential and timing differential of the second equipment in wireless network Speed;
Step S204 obtains the first moment and the second moment, wherein starts for above-mentioned second equipment at above-mentioned first moment When transmission data at the time of above-mentioned second equipment in the case of, above-mentioned second moment be above-mentioned first equipment received above-mentioned data At the time of the first equipment of Shi Shangshu;It is above-mentioned second equipment when above-mentioned second equipment has received above-mentioned data at above-mentioned first moment At the time of in the case of, above-mentioned second moment be above-mentioned first equipment start to send above-mentioned first equipment when above-mentioned data when It carves;
Step S206, according to determining above-mentioned timing differential, above-mentioned timing differential pace of change, above-mentioned first moment and upper Stating for the second moment determines the time span that above-mentioned data are transmitted between above-mentioned second equipment and above-mentioned first equipment.
Through the above steps, using according to timing differential of first equipment relative to the second equipment, clock in wireless network The change of divergence speed, the first moment and the second moment determine what data were transmitted between above-mentioned second equipment and above-mentioned first equipment The mode of time span, wherein above-mentioned second equipment when above-mentioned first moment starts transmission data for above-mentioned second equipment In the case of moment, at the time of above-mentioned second moment is above-mentioned first equipment when above-mentioned first equipment has received above-mentioned data; In the case of at the time of above-mentioned first moment is above-mentioned second equipment when above-mentioned second equipment has received above-mentioned data, above-mentioned second Moment is above-mentioned first equipment when starting to send above-mentioned data at the time of above-mentioned first equipment, by determining data above-mentioned the Timing differential of first equipment relative to the second equipment is considered when the time span transmitted between two equipment and above-mentioned first equipment It with timing differential pace of change, and then can not have to ensure that the time-domain of the second equipment and the first equipment must be identical, carry simultaneously The accuracy for the time span that the high data determined are transmitted between above-mentioned second equipment and above-mentioned first equipment, and then solve The technical issues of in the related technology can not accurately obtaining in wireless network the upstream time and downgoing time between two equipment.
It should be noted that above-mentioned steps S202 can be shown as:Data packet is obtained in above-mentioned second equipment and above-mentioned the The data information of multiple round-trip transmission between one equipment, wherein above-mentioned data information includes:Above-mentioned second in each round-trip transmission When equipment starts to send above-mentioned data packet at the time of above-mentioned second equipment, above-mentioned first equipment has received in each round-trip transmission When stating data packet at the time of above-mentioned first equipment, when above-mentioned first equipment starts to send above-mentioned data packet in each round-trip transmission on At the time of stating the first equipment, in each round-trip transmission above-mentioned second equipment received above-mentioned second equipment when above-mentioned data packet when It carves;Above-mentioned timing differential and above-mentioned timing differential pace of change are determined according to above-mentioned data information.
It should be noted that a round-trip transmission may include:Data packet is sent out from the second equipment, after the first equipment receives It sends out again, finally returns the process of the second equipment.
It should be noted that above-mentioned second being set when above-mentioned second equipment starts to send above-mentioned data packet in round-trip transmission every time At the time of standby, when above-mentioned first equipment has received above-mentioned data packet in each round-trip transmission at the time of above-mentioned first equipment, every time When above-mentioned first equipment starts to send above-mentioned data packet in round-trip transmission at the time of above-mentioned first equipment, in each round-trip transmission on At the time of stating above-mentioned second equipment when the second equipment has received above-mentioned data packet, these moment can be obtained by timestamp , but it is not limited to this.
It is illustrated for having carried out 2M round-trip transmission below, above-mentioned clock difference can be determined by following formula It is different:
Wherein, Δ t indicates above-mentioned timing differential, tsrnIndicate that above-mentioned first equipment has received above-mentioned in n-th round-trip transmission When data packet at the time of above-mentioned first equipment, tssnIndicate that above-mentioned first equipment starts to send above-mentioned data in n-th round-trip transmission When packet at the time of above-mentioned first equipment, tcsnWhen indicating that above-mentioned second equipment starts to send above-mentioned data packet in n-th round-trip transmission At the time of above-mentioned second equipment, tcrnIndicate that above-mentioned second equipment has received above-mentioned the when above-mentioned data packet in n-th round-trip transmission At the time of two equipment, M is the integer more than or equal to 1.
By being averaged later to the 2M times round-trip timing differential summation back and forth to 2M times round-trip the M+1 times, obtain Timing differential it is more accurate.It is to determine the when timing differential analysis is completed it should be noted that the timing differential can consider Timing differential of one equipment relative to the second equipment can be as uplink between determining second equipment and the first equipment Or the initial clock difference of the time span of downlink transfer, but it is not limited to this.
It should be noted that determining above-mentioned timing differential pace of change by following formula:
Wherein, Δ v indicates above-mentioned timing differential pace of change;Δ t indicates above-mentioned timing differential, tsrnIndicate that n-th is round-trip Above-mentioned first equipment receives the time of above-mentioned data packet, t in transmissionssnIndicate that above-mentioned first equipment is opened in n-th round-trip transmission It originates at the time of serve above-mentioned first equipment when stating data packet, tcsnIndicate that above-mentioned second equipment starts to send out in n-th round-trip transmission At the time of serving above-mentioned second equipment when stating data packet, tcrnIndicate that above-mentioned second equipment has received above-mentioned in n-th round-trip transmission When data packet at the time of above-mentioned second equipment, H is the total time used in 2M round-trip transmission, and M is the integer more than or equal to 1.
In one embodiment of the invention, it is that above-mentioned second equipment is above-mentioned when starting transmission data at above-mentioned first moment At the time of second equipment, at the time of above-mentioned second moment is above-mentioned first equipment when above-mentioned first equipment has received above-mentioned data In the case of, above-mentioned steps S206 can be shown as:Determine above-mentioned data in above-mentioned second equipment and above-mentioned the by following formula The time span of uplink between one equipment:
tup=tsr-[tcs+Δt+(tcs-tcpt)×Δv];
Wherein, tupIndicate that above-mentioned data time of uplink between above-mentioned second equipment and above-mentioned first equipment is long Degree, tsrIndicate above-mentioned second moment, tcsIndicate that above-mentioned first moment, Δ t indicate above-mentioned timing differential, tcptIndicate that determination is above-mentioned At the time of above-mentioned second equipment that timing differential is completed, Δ v indicates shown timing differential pace of change.
In one embodiment of the invention, it is second equipment when that received data institute at first moment At the time of stating the second equipment, second moment be when first equipment starts to send the data described in the first equipment when In the case of quarter, above-mentioned steps S206 can be shown as:Determine the data in second equipment and institute by following formula State the time span of downlink transfer between the first equipment:
tdown=[tcr+Δt+(tcr-tcpt)×Δv]-tss
Wherein, tdownIndicate that data time of downlink transfer between second equipment and first equipment is long Degree, tssIndicate second moment, tcrIndicate that first moment, Δ t indicate the timing differential, tcptDescribed in indicating determining At the time of second equipment when timing differential is completed, Δ v indicates the timing differential pace of change.
It should be noted that above-mentioned first equipment can be server, above-mentioned second equipment can be client, but not It is limited to this.
It should be noted that the executive agent of above-mentioned steps can be terminal, such as mobile terminal shown in FIG. 1, it calculates Machine terminal, but it is not limited to this.
Embodiment for a better understanding of the present invention is further explained the present invention below in conjunction with preferred embodiment.
The preferred embodiment of the present invention, using the first equipment as server, the second equipment is illustrates for client, this hair Bright preferred embodiment provides a kind of test method of client-server uplink and downlink delay, and this method includes:
Step 1, timing differential analyze, select a network delay it is low (such as network delay be less than 10ms, below all with 10ms is example), the environment of network stabilization.Client is constantly to server transmission data packet, after server receives data packet Data packet is also beamed back immediately, and Fig. 3 is the data transmission procedure provided according to the preferred embodiment of the present invention and timestamp record signal Figure.As shown in figure 3, it, which is labelled with when data packet sends and receives, needs the timestamp recorded.
(1) network delay testing mechanism:
The round-trip round-trip delay of n-th:
T=(tcrn-tcsn)-(tssn-tsrn)
When less than 10ms to be then considered as network delay relatively low by T.
(2) server and client clock variance analysis (being equivalent to the step S202 in above-described embodiment)
Timing differential analysis carries out 2M round-trip, time-consuming H, wherein
H=tcr2M-tcs1
Because T is smaller, it is therefore assumed that uplink and downlink delay is equal under this environment, it is equal to T/2;
Such as using client time as reference time, if timing differential (be equivalent on of the server end relative to client State the timing differential in embodiment) it is Δ t;
It is then round-trip for n-th:
It can be obtained in conjunction with above formula:
It is summed again according to latter M times of 2M round-trip data round-trip data divided by M takes mean value, then
Therefore server end is relative to the timing differential Δ t of client:
M round-trip timing differential data before being subtracted according to rear M round-trip timing differential data in 2M round-trip data Again divided by approximate time interval H/2 obtains timing differential pace of change, thus clock difference of the server end relative to client Different pace of change Δ v is:
Record the client time point t of Δ t and the completion of Δ v and variance analysiscptIt (is equivalent in above-described embodiment tcpt);
Step 2, on the spot network data acquisition
To test target environment, constantly to server transmission data packet, server receives after data packet immediately client Also data packet is beamed back;Execute K back and forth;The whole client time stamps of record and server timestamp
Step 3, data calculate
Timing differential Δ t of the server relative to client when timing differential analysis is completed;
The timing differential etc. to the server before test data transmission relative to client when completing is analyzed from timing differential Time interval before being sent to test data when timing differential analyzes completion is multiplied by timing differential pace of change:(tcsi-tcpt) ×Δv
Therefore the server in test is relative to the timing differential of client
Δt+(tcsi-tcpt)×Δv
Therefore each (range of i is from 1 to K) round-trip upstream time can be expressed as:
tsri-[tcsi+Δt+(tcsi-tcpt)×Δv]
Each (range of j is from 1 to K) round-trip downgoing time can be expressed as:
[tcrj+Δt+(tcrj-tcpt)×Δv]-tssj
The derivation that downgoing time calculates is similar to the derivation of upstream time, and details are not described herein again.
The real-time network uplink and downlink real time data and network of test target environment can be obtained according to each round-trip data Postpone statistic histogram.Fig. 4 is the net of the udp protocol transmission of the sport western station subway station provided according to the preferred embodiment of the present invention The schematic diagram of network uplink and downlink real time delay, Fig. 5 are the UDP associations of the sport western station subway station provided according to the preferred embodiment of the present invention The network up and down of view transmission postpones distribution histogram;
The embodiment of the present invention additionally provides a kind of time determining device, which is located in above-mentioned terminal shown in FIG. 1, but It is not limited to this, Fig. 6 is the structure diagram of the time determining device provided according to embodiments of the present invention, as shown in fig. 6, the device Including:
First determining module 62, for determine the first equipment in wireless network relative to the timing differential of the second equipment and when Clock the change of divergence speed;
Acquisition module 64 is connect with above-mentioned first determining module 62, for obtaining the first moment and the second moment, wherein In the case of described in when first moment starts transmission data for second equipment at the time of the second equipment, described second Moment be when first equipment has received the data described in the first equipment at the time of;It is described second at first moment Described in when equipment has received the data at the time of the second equipment in the case of, second moment is that first equipment starts Described in when sending the data at the time of the first equipment;
Second determining module 66, connect with above-mentioned acquisition module 64, is used for according to the determining timing differential, when described Clock the change of divergence speed, first moment and second moment determine the data in second equipment and described first The time span transmitted between equipment.
By above-mentioned apparatus, using according to timing differential of first equipment relative to the second equipment, clock in wireless network The change of divergence speed, the first moment and the second moment determine what data were transmitted between second equipment and first equipment The mode of time span, wherein the second equipment described in when first moment starts transmission data for second equipment In the case of moment, second moment be when first equipment has received the data described in the first equipment at the time of; First moment be when second equipment has received the data described in the second equipment at the time of in the case of, described second Moment be when first equipment starts to send the data described in the first equipment at the time of, by determining data described the Timing differential of first equipment relative to the second equipment is considered when the time span transmitted between two equipment and first equipment It with timing differential pace of change, and then can not have to ensure that the time-domain of the second equipment and the first equipment must be identical, carry simultaneously The accuracy for the time span that the high data determined are transmitted between second equipment and first equipment, and then solve The technical issues of in the related technology can not accurately obtaining in wireless network the upstream time and downgoing time between two equipment.
It should be noted that above-mentioned first determining module 62, can be also used for obtaining data packet in second equipment and Between first equipment data information of multiple round-trip transmission and according to the data information determine the timing differential and The timing differential pace of change, wherein the data information includes:The second equipment starts to send described in each round-trip transmission Described in when the data packet at the time of the second equipment, the first equipment described in each round-trip transmission has received data packet when institute At the time of stating the first equipment, when the first equipment described in each round-trip transmission starts to send the data packet described in the first equipment Described in when moment, the second equipment described in each round-trip transmission have received the data packet at the time of the second equipment.
It should be noted that above-mentioned first determining module 62, can be also used for determining the clock difference by following formula It is different:
Wherein, Δ t indicates the timing differential, tsrnIt is described to indicate that the first equipment described in n-th round-trip transmission has received Described in when data packet at the time of the first equipment, tssnIndicate that the first equipment described in n-th round-trip transmission starts to send the data Described in when packet at the time of the first equipment, tcsnWhen indicating that the second equipment described in n-th round-trip transmission starts to send the data packet At the time of second equipment, tcrnThe described in indicating when the second equipment described in n-th round-trip transmission has received the data packet At the time of two equipment, M is the integer more than or equal to 1.
It should be noted that above-mentioned first determining module 62, can be also used for determining the clock difference by following formula Different pace of change:
Wherein, Δ v indicates the timing differential pace of change;Δ t indicates the timing differential, tsrnIndicate that n-th is round-trip First equipment described in transmission receives the time of the data packet, tssnIndicate that the first equipment described in n-th round-trip transmission is opened Described in originating when sending the data packet at the time of the first equipment, tcsnIndicate that the second equipment described in n-th round-trip transmission starts to send out Described in when sending the data packet at the time of the second equipment, tcrnIt is described to indicate that the second equipment described in n-th round-trip transmission has received Described in when data packet at the time of the second equipment, H is the total time used in 2M round-trip transmission, and M is the integer more than or equal to 1.
In one embodiment of the invention, described in when first moment starts transmission data for second equipment At the time of second equipment, second moment be when first equipment has received the data described in the first equipment at the time of In the case of, above-mentioned second determining module 64 can be also used for determining the data in second equipment and institute by following formula State the time span of uplink between the first equipment:tup=tsr-[tcs+Δt+(tcs-tcpt)×Δv];Wherein, tupIt indicates The time span of data uplink between second equipment and first equipment, tsrWhen indicating described second It carves, tcsIndicate that first moment, Δ t indicate the timing differential, tcptIndicate to determine that the timing differential completes described the At the time of two equipment, Δ v indicates shown timing differential pace of change.
In one embodiment of the invention, it is second equipment when that received data institute at first moment At the time of stating the second equipment, second moment be when first equipment starts to send the data described in the first equipment when In the case of quarter, above-mentioned second determining module 64 can be also used for determining that the data are set described second by following formula The time span of the standby downlink transfer between first equipment:tdown=[tcr+Δt+(tcr-tcpt)×Δv]-tss;Wherein, tdownIndicate the time span of data downlink transfer between second equipment and first equipment, tssDescribed in expression Second moment, tcrIndicate that first moment, Δ t indicate the timing differential, tcptWhen indicating to determine that the timing differential is completed Second equipment at the time of, Δ v indicates the timing differential pace of change.
It should be noted that above-mentioned first equipment is server, above-mentioned second equipment can be client, but be not limited to This.
Embodiment in order to better understand the present invention is further explained the present invention below in conjunction with preferred embodiment.
The preferred embodiment of the present invention is using the first equipment as server, and the second equipment is illustrates for client, for solution The certainly above technical problem, the preferred embodiment of the present invention provide client-sever network uplink and downlink in a kind of wireless network and prolong Slow test device, Fig. 7 are the structure diagrams of the test device provided according to the preferred embodiment of the present invention, as shown in fig. 7, comprising: Timing differential analysis module, on the spot data acquisition module, data computation module, data communication module.
Timing differential analysis module (is equivalent to the first determining module 62 in above-described embodiment):It is responsible for comparative analysis client The timing differential at end and server;
Data acquisition module (being equivalent to the acquisition module 64 in above-described embodiment) on the spot:Be responsible on the spot data acquisition and Record;
Data computation module (is equivalent to the second determining module in above-described embodiment):The data that responsible basis acquires on the spot The uplink and downlink delay time of network is obtained with the result combined calculation of timing differential analysis.
Data communication module:Be required for data communication module in client and server, be responsible for test data transmission and Timestamp records.
Specifically, above-mentioned timing differential analysis module is responsible for comparative analysis client and the timing differential of server is (suitable Timing differential in above-described embodiment), server and client are estimated by the timestamp calculating of transmission and the receiving of data End timing differential and server and the pace of change of client clock difference (are equivalent to the timing differential variation in above-described embodiment Speed).
Data acquisition module on the spot is responsible for data acquisition and record on the spot.
Data computation module is responsible for obtaining net according to the result combined calculation of data and the timing differential analysis acquired on the spot The uplink and downlink delay time of network.
Data communication module:Be required for data communication module in client and server, be responsible for test data transmission and Timestamp records.The data communication module of client can record the transmission of whole client data packets time and receiving when Between, the data communication module of server end can record the time of the time and receiving of the transmission of whole servers' data packets;
It should be noted that how above-mentioned timing differential analysis module estimates timing differential and timing differential pace of change It can refer to and how determine timing differential and timing differential pace of change in above method embodiment, details are not described herein again.
It should be noted that how data computation module is calculated the uplink and downlink delay time of network, Ke Yican The time span for how determining that above-mentioned data are transmitted between above-mentioned client and above-mentioned server in above method embodiment is examined, Details are not described herein again.
By above-mentioned apparatus, following advantages may be implemented:
High efficiency:After completing timing differential analysis, the data on the spot of the network delay of each position of wireless network are adopted Collection can be completed disposably.
Versatility:All there is no limit conditions to platform, technological frame, test environment for entire technical solution.
Convenience:Server end and client device in addition to being tested wireless network, are not necessarily to any other extras.
The embodiments of the present invention also provide a kind of storage medium, computer program is stored in the storage medium, wherein The computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to:USB flash disk, read-only memory (Read- Only Memory, referred to as ROM), it is random access memory (Random Access Memory, referred to as RAM), mobile hard The various media that can store computer program such as disk, magnetic disc or CD.
The embodiments of the present invention also provide a kind of electronic device, including memory and processor, stored in the memory There is computer program, which is arranged to run computer program to execute the step in any of the above-described embodiment of the method Suddenly.
Optionally, above-mentioned electronic device can also include transmission device and input-output equipment, wherein the transmission device It is connected with above-mentioned processor, which connects with above-mentioned processor.
Optionally, the specific example in the present embodiment can refer to described in above-described embodiment and optional embodiment Example, details are not described herein for the present embodiment.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
In the above embodiment of the present invention, all emphasizes particularly on different fields to the description of each embodiment, do not have in some embodiment The part of detailed description may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, for example, the unit division, Ke Yiwei A kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, unit or module It connects, can be electrical or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple On unit.Some or all of unit therein can be selected according to the actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or Part steps.And storage medium above-mentioned includes:USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various can to store program code Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (14)

1. a kind of time determines method, which is characterized in that including:
Determine timing differential and timing differential pace of change of first equipment relative to the second equipment in wireless network;
Obtain the first moment and the second moment, wherein at first moment be second equipment when that starts transmission data institute In the case of at the time of stating the second equipment, second moment be when first equipment has received the data described in first set At the time of standby;The case where described in when having received the data for second equipment at first moment at the time of the second equipment Under, second moment be when first equipment starts to send the data described in the first equipment at the time of;
According to the determining timing differential, the timing differential pace of change, first moment and second moment be true The time span that the fixed data are transmitted between second equipment and first equipment.
2. according to the method described in claim 1, it is characterized in that, being that second equipment starts to send at first moment Described in when data at the time of the second equipment, second moment be first equipment when having received the data described in first set In the case of at the time of standby, according to the determining timing differential, the timing differential pace of change, first moment and institute Stating the time span that the second moment determined that the data were transmitted between second equipment and first equipment includes:
Determine that data time of uplink between second equipment and first equipment is long by following formula Degree:
tup=tsr-[tcs+Δt+(tcs-tcpt)×Δv];
Wherein, tupIndicate the time span of data uplink between second equipment and first equipment, tsr Indicate second moment, tcsIndicate that first moment, Δ t indicate the timing differential, tcptIt indicates to determine the clock difference At the time of second equipment of different completion, Δ v indicates shown timing differential pace of change.
3. according to the method described in claim 1, it is characterized in that, having received institute at first moment for second equipment Described in when stating data at the time of the second equipment, second moment be when first equipment starts to send the data described in the In the case of at the time of one equipment, according to the determining timing differential, the timing differential pace of change, first moment And second moment determines that the time span that the data are transmitted between second equipment and first equipment includes:
Determine that data time of downlink transfer between second equipment and first equipment is long by following formula Degree:
tdown=[tcr+Δt+(tcr-tcpt)×Δv]-tss
Wherein, tdownIndicate the time span of data downlink transfer between second equipment and first equipment, tssIndicate second moment, tcrIndicate that first moment, Δ t indicate the timing differential, tcptWhen indicating to determine described At the time of second equipment when different completion of clock correction, Δ v indicates the timing differential pace of change.
4. according to the method described in claim 1, it is characterized in that, determining that the first equipment is relative to the second equipment in wireless network Timing differential and timing differential pace of change include:
Obtain the data information of data packet multiple round-trip transmission between second equipment and first equipment, wherein institute Stating data information includes:Second equipment described in when second equipment described in each round-trip transmission starts to send the data packet when Carve, when the first equipment described in each round-trip transmission has received the data packet described in the first equipment at the time of, past back pass every time Described in when first equipment described in defeated starts to send the data packet at the time of the first equipment, second described in each round-trip transmission Described in when equipment has received the data packet at the time of the second equipment;
The timing differential and the timing differential pace of change are determined according to the data information.
5. according to the method described in claim 4, it is characterized in that, determining the timing differential packet according to the data information It includes:
The timing differential is determined by following formula:
Wherein, Δ t indicates the timing differential, tsrnIndicate that the first equipment described in n-th round-trip transmission has received the data Described in when packet at the time of the first equipment, tssnWhen indicating that the first equipment described in n-th round-trip transmission starts to send the data packet At the time of first equipment, tcsnDescribed in indicating when the second equipment described in n-th round-trip transmission starts to send the data packet At the time of second equipment, tcrnSecond sets described in indicating when the second equipment described in n-th round-trip transmission has received the data packet At the time of standby, M is the integer more than or equal to 1.
6. according to the method described in claim 4, it is characterized in that, determining that the timing differential changes according to the data information Speed includes:
The timing differential pace of change is determined by following formula:
Wherein, Δ v indicates the timing differential pace of change;Δ t indicates the timing differential, tsrnIndicate n-th round-trip transmission Described in the first equipment receive time of the data packet, tssnIndicate that the first equipment described in n-th round-trip transmission starts to send out Described in when sending the data packet at the time of the first equipment, tcsnIndicate that the second equipment described in n-th round-trip transmission starts to send institute Described in when stating data packet at the time of the second equipment, tcrnIndicate that the second equipment described in n-th round-trip transmission has received the data Described in when packet at the time of the second equipment, H is the total time used in 2M round-trip transmission, and M is the integer more than or equal to 1.
7. a kind of time determining device, which is characterized in that including:
First determining module, for determining timing differential and timing differential of first equipment relative to the second equipment in wireless network Pace of change;
Acquisition module, for obtaining the first moment and the second moment, wherein start for second equipment at first moment Described in when transmission data at the time of the second equipment in the case of, second moment be first equipment received the data At the time of the first equipment of Shi Suoshu;Second equipment described in when having received the data for second equipment at first moment At the time of in the case of, second moment be when first equipment starts to send the data described in the first equipment when It carves;
Second determining module, for according to the determining timing differential, the timing differential pace of change, first moment And second moment determines the time span that the data are transmitted between second equipment and first equipment.
8. device according to claim 7, which is characterized in that start to send for second equipment at first moment Described in when data at the time of the second equipment, second moment be first equipment when having received the data described in first set In the case of at the time of standby, second determining module is additionally operable to determine the data in second equipment by following formula The time span of uplink between first equipment:
tup=tsr-[tcs+Δt+(tcs-tcpt)×Δv];
Wherein, tupIndicate the time span of data uplink between second equipment and first equipment, tsr Indicate second moment, tcsIndicate that first moment, Δ t indicate the timing differential, tcptIt indicates to determine the clock difference At the time of second equipment of different completion, Δ v indicates shown timing differential pace of change.
9. device according to claim 7, which is characterized in that received institute at first moment for second equipment Described in when stating data at the time of the second equipment, second moment be when first equipment starts to send the data described in the In the case of at the time of one equipment, second determining module is additionally operable to determine the data described by following formula The time span of downlink transfer between two equipment and first equipment:
tdown=[tcr+Δt+(tcr-tcpt)×Δv]-tss
Wherein, tdownIndicate the time span of data downlink transfer between second equipment and first equipment, tssIndicate second moment, tcrIndicate that first moment, Δ t indicate the timing differential, tcptWhen indicating to determine described At the time of second equipment when different completion of clock correction, Δ v indicates the timing differential pace of change.
10. device according to claim 7, which is characterized in that first determining module is additionally operable to acquisition data packet and exists Between second equipment and first equipment data information of multiple round-trip transmission and according to the data information determine The timing differential and the timing differential pace of change, wherein the data information includes:The described in each round-trip transmission Described in when two equipment start to send the data packet at the time of the second equipment, the first equipment described in each round-trip transmission has received Described in when the data packet at the time of the first equipment, when the first equipment described in each round-trip transmission starts to send the data packet At the time of first equipment, when the second equipment described in each round-trip transmission has received the data packet described in the second equipment Moment.
11. device according to claim 10, which is characterized in that first determining module is additionally operable to through following public affairs Formula determines the timing differential:
Wherein, Δ t indicates the timing differential, tsrnIndicate that the first equipment described in n-th round-trip transmission has received the data Described in when packet at the time of the first equipment, tssnWhen indicating that the first equipment described in n-th round-trip transmission starts to send the data packet At the time of first equipment, tcsnDescribed in indicating when the second equipment described in n-th round-trip transmission starts to send the data packet At the time of second equipment, tcrnSecond sets described in indicating when the second equipment described in n-th round-trip transmission has received the data packet At the time of standby, M is the integer more than or equal to 1.
12. device according to claim 10, which is characterized in that first determining module is additionally operable to through following public affairs Formula determines the timing differential pace of change:
Wherein, Δ v indicates the timing differential pace of change;Δ t indicates the timing differential, tsrnIndicate n-th round-trip transmission Described in the first equipment receive time of the data packet, tssnIndicate that the first equipment described in n-th round-trip transmission starts to send out Described in when sending the data packet at the time of the first equipment, tcsnIndicate that the second equipment described in n-th round-trip transmission starts to send institute Described in when stating data packet at the time of the second equipment, tcrnIndicate that the second equipment described in n-th round-trip transmission has received the data Described in when packet at the time of the second equipment, H is the total time used in 2M round-trip transmission, and M is the integer more than or equal to 1.
13. a kind of storage medium, which is characterized in that be stored with computer program in the storage medium, wherein the computer Program is arranged to execute the method described in any one of claim 1 to 6 when operation.
14. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory Sequence, the processor are arranged to run the computer program to execute the side described in any one of claim 1 to 6 Method.
CN201810317774.5A 2018-04-10 2018-04-10 Time determines method, apparatus, storage medium and electronic device Pending CN108512728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810317774.5A CN108512728A (en) 2018-04-10 2018-04-10 Time determines method, apparatus, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810317774.5A CN108512728A (en) 2018-04-10 2018-04-10 Time determines method, apparatus, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN108512728A true CN108512728A (en) 2018-09-07

Family

ID=63381413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810317774.5A Pending CN108512728A (en) 2018-04-10 2018-04-10 Time determines method, apparatus, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN108512728A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1706135A (en) * 2002-10-25 2005-12-07 英国西门子公司 A method of determining a timing offset between a first clock and a second clock in a communications network
CN1885987A (en) * 2005-06-22 2006-12-27 上海华为技术有限公司 Method for inspecting clock stability between wireless network controller and base station
US8139489B2 (en) * 2008-08-06 2012-03-20 International Business Machines Corporation Robust jitter-free remote clock offset measuring method
CN105099649A (en) * 2015-08-14 2015-11-25 宋亚玲 Method and system for synchronously inserting network time
CN105187275A (en) * 2015-08-28 2015-12-23 四川泰富地面北斗科技股份有限公司 Method and device for measuring optical fiber transmission link asymmetric time delay
US20170180108A1 (en) * 2015-12-18 2017-06-22 Viavi Solutions Inc. Using a two-way active measurement protocol to calculate one-way delay
US9860003B2 (en) * 2013-07-01 2018-01-02 Qulsar, Inc. Method for providing time holdover in packet-based timing deployments

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1706135A (en) * 2002-10-25 2005-12-07 英国西门子公司 A method of determining a timing offset between a first clock and a second clock in a communications network
CN1885987A (en) * 2005-06-22 2006-12-27 上海华为技术有限公司 Method for inspecting clock stability between wireless network controller and base station
US8139489B2 (en) * 2008-08-06 2012-03-20 International Business Machines Corporation Robust jitter-free remote clock offset measuring method
US9860003B2 (en) * 2013-07-01 2018-01-02 Qulsar, Inc. Method for providing time holdover in packet-based timing deployments
CN105099649A (en) * 2015-08-14 2015-11-25 宋亚玲 Method and system for synchronously inserting network time
CN105187275A (en) * 2015-08-28 2015-12-23 四川泰富地面北斗科技股份有限公司 Method and device for measuring optical fiber transmission link asymmetric time delay
US20170180108A1 (en) * 2015-12-18 2017-06-22 Viavi Solutions Inc. Using a two-way active measurement protocol to calculate one-way delay

Similar Documents

Publication Publication Date Title
Yan et al. Pantheon: the training ground for Internet congestion-control research
US5477531A (en) Method and apparatus for testing a packet-based network
CA2467883C (en) Signature matching methods and apparatus for performing network diagnostics
CN107404481B (en) User information recognition methods and device
CN106921996A (en) A kind of statistical method of the statistic of layer 2, CU and DU
CN108111432A (en) Message forwarding method and device
CN1998186A (en) Method and apparatus for characterizing an end-to-end path of a packet-based network
CN106210163B (en) IP address-based localization method and device
CN106686024B (en) Obtain the method, apparatus and system of the arrival rate of offline message
EP1384153A2 (en) Server-site response time computation for arbitrary applications
DE60323886D1 (en) DEVICE AND ASSOCIATED METHOD FOR OBTAINING QUALITY OF SERVICE QUALITY DURING TRANSMISSION IN A RADIO COMMUNICATION SYSTEM
CN101594169B (en) Method and equipment for measurements
CN107071399A (en) The method for evaluating quality and device of a kind of encrypted video stream
CN101848166A (en) Speed calculation system
CN107534587A (en) Latency measurement device
CN106656642A (en) Round trip time measurement method, round trip time measurement device and round trip time measurement system
WO1992022967A1 (en) Method and apparatus for testing a packet-based network
CN104009878A (en) Method and apparatus for measuring network transmission delay
CN108512728A (en) Time determines method, apparatus, storage medium and electronic device
CN106161052B (en) Network line selection method and network speed-measuring method
CN107343037A (en) The data transmission method and device of a kind of distributed memory system
EP2627040B1 (en) Method for eliminating systematical error components in a set of one-way delay measurement results for communications between two or more computing systems in a communication network, apparatus for performing the method and computer program product
US9825820B2 (en) Communication effects in network simulations
CN113904960B (en) Method, device, system and storage medium for measuring data transmission delay
CN107666365A (en) A kind of CSI acquisition methods, server, terminal and AP

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180907