Communication method and system for enabling first message to simultaneously arrive at receiver in wide area network

By measuring and calculating the business development time difference and link round-trip delay in the wide area network, the receiver determines the message sending time, which solves the problem of inconsistent message arrival for users in different regions, achieves fair arrival and accuracy of messages, and is suitable for securities transactions. Wait for the scene.

CN118612141APending Publication Date: 2024-09-06SHENZHEN SECURITIES COMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410695644.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

In wide area networks, differences in communication delays caused by regional differences lead to inconsistent times for users in different regions to send messages and reach the server, resulting in unfair situations, especially in scenarios such as securities transactions where fairness requirements are high.

Method used

By the receiver sending a 'business notification message' before the business starts, the business development time difference and link round-trip delay are measured and calculated, and the message sending time is determined so that the first messages from different senders arrive at the server at basically the same time. Improving fairness does not rely on time calibration and clock synchronization.

Benefits of technology

It realizes that messages from different senders arrive at the server at basically the same time, which improves fairness and reduces the requirements for clock accuracy. Measuring delay through the same path improves accuracy and reduces the impact of network jitter.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612141A
    Figure CN118612141A
Patent Text Reader

Abstract

The invention provides a communication method and system for a first message to simultaneously arrive at a receiver in a wide area network. The communication method for the first message to simultaneously arrive at the receiver in the wide area network comprises the following steps: sending an acquisition moment t1 by using a service notification message between the receiver and a sender; obtaining a service development time difference by using the time when the receiver obtains the time query message and the service development time, and returning a time query response message to the sender; after the sender receives the time query response message, link round-trip time delay is obtained at the moment when the time query response message is received; and the receiver obtains a time difference through the service development time t5 and the time t2 when the time query message is received, and obtains a service message sending time point by using the time difference. The system comprises modules corresponding to the steps of the method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention provides a communication method and system in which first messages in a wide area network arrive at receivers at the same time, belonging to the technical field of communication. Background Art

[0002] China has a vast territory, and different regions are very far away from the same server. Affected by the theory of relativity, the communication delays in different regions also vary greatly, ranging from less than one millisecond to hundreds of milliseconds. This results in a huge difference in the time it takes for messages sent simultaneously from different places to arrive at the same server. The situation occurs that messages from closer users must arrive before messages from farther users, and thus they are given priority over farther users in the server processing queue, causing a certain degree of unfairness.

[0003] A simple way to deal with the above problem is to send a signal to the sender at the beginning of the service at the receiving end, and start receiving and processing messages at the same time. In this way, the sender who is closer to the receiving end will obviously receive the signal first, and its message will also reach the receiving end first.

[0004] Another way to deal with the above problem is to let users retry repeatedly from the point where they have not yet reached the server until the service starts. This will allow users who are farther away to reach the server first after the service starts, but it will cause a large additional processing load on the network and server, and users who are closer can get feedback faster, make more retries, and get more opportunities.

[0005] Another way to deal with the above problem is to let the user calibrate the time with the server, and send messages in advance according to the delay between the user and the server, so that the messages sent by users at different distances can reach the server at the same time. However, the above method depends on the deviation between the time of the user end and the server time. At present, the clocks of ordinary servers generally have a certain degree of deviation. The farther the distance between the calibration time and the service start time, the greater the deviation between the two clocks. The above method also depends on the accuracy of the delay measurement between the user and the server. The processing path of the simple delay measurement message may be different from the path of the formal business message. Therefore, the measured delay is different from the actual delay of the business message.

[0006] Scenarios such as securities trading have relatively high requirements for fairness. When the distances between multiple message senders and receivers are quite different, messages sent by senders at longer distances need to have a chance to be the first messages to reach the receiver.

[0007] The existing methods have the problem that senders that are closer have greater advantages, require high clock accuracy of the servers on both sides of the communication, or increase a large amount of unnecessary traffic, increasing the processing pressure on the receiver. Summary of the invention

[0008] The present invention provides a communication method and system for simultaneously reaching the receivers of the first message in a wide area network, so as to solve the above-mentioned problems in the prior art. The technical solutions adopted are as follows:

[0009] A communication method in which the first messages in a wide area network arrive at a receiver at the same time, the communication method in which the first messages in a wide area network arrive at a receiver at the same time comprising:

[0010] The acquisition time t1 is sent by using the "business notification message" between the receiver and the sender;

[0011] The time when the receiver obtains the time query message and the business development time are used to obtain the business development time difference, and the "time query response message" is returned to the sender;

[0012] After the sender receives the "time query response message", the link round-trip delay is obtained using the time when the "time query response message" is received;

[0013] The receiver obtains the time difference between the business start time t5 and the time t2 when the "time query message" is received, and uses the time difference to obtain the time when the business message is sent.

[0014] Furthermore, the acquisition time t1 is sent by using the "service notification message" between the receiver and the sender, including:

[0015] Setting a lead time period, wherein the lead time period is a time interval before the service start time;

[0016] The receiver sends a "service notification message" to the sender within a pre-time period before the service start time; wherein the pre-time period has a value range of 2s-5s;

[0017] When the sender sends the time query message, the time corresponding to sending the "time query message" is recorded as t1.

[0018] Furthermore, the time when the receiver obtains the time query message and the business development time are used to obtain the business development time difference, including:

[0019] When the receiver receives the "time query message", the time of receiving the "time query message" is recorded as t2;

[0020] Extract the business development time, and record the business development time as t5;

[0021] The time when the "time query message" is received is recorded as t2 and the business development time is recorded as t5 to obtain the business development time difference D; wherein, the business development time difference D is obtained by the following formula:

[0022] D=t5-t2

[0023] Wherein, D represents the time difference of business development; t2 represents the moment when the receiver receives the "time query message"; and t5 represents the business development time.

[0024] Further, after the sender receives the "time query response message", the link round trip delay is obtained using the time when the "time query response message" is received, including:

[0025] When the sender receives the "time query response message", the corresponding time when the sender receives the "time query response message" is recorded as t3;

[0026] The link round trip delay is obtained by using the time t3 and the time t1; wherein the link round trip delay is obtained by the following formula:

[0027] L = t3 - t1;

[0028] Where L represents the round-trip delay of the link.

[0029] Furthermore, the receiver obtains the time difference between the service start time t5 and the time t2 when the "time query message" is received, and uses the time difference to obtain the time when the service message is sent, including:

[0030] After the receiver determines the service start time t5, the receiver uses the service start time t5 and the time t2 when the receiver receives the "time query message" to obtain the time difference t5-t2;

[0031] Returning the time difference to the sender;

[0032] The sender records the time t1 of sending and receiving messages and the corresponding time t3 when the sender receives the "time query response message" to determine the time when the service message is sent; wherein, the time when the service message is sent is obtained by the following formula:

[0033] t4=t1+D=t3+DL

[0034] Among them, t4 represents the time when the business message is sent.

[0035] A communication system in which first messages in a wide area network arrive at a receiver at the same time, the communication system in which first messages in a wide area network arrive at a receiver at the same time comprising:

[0036] The time acquisition module is used to send and acquire the time t1 by using the "service notification message" between the receiver and the sender;

[0037] The first time difference acquisition module is used to obtain the business development time difference by using the time when the receiver obtains the time query message and the business development time, and return the "time query response message" to the sender;

[0038] A link round trip delay acquisition module, used to acquire the link round trip delay by using the moment of receiving the "time query response message" after the sender receives the "time query response message";

[0039] The second time difference acquisition module is used for the receiver to obtain the time difference through the business start time t5 and the moment t2 when the "time query message" is received, and use the time difference to obtain the time point of sending the business message.

[0040] Furthermore, the time acquisition module includes:

[0041] A time period setting module, used to set a leading time period, wherein the leading time period is a time interval preceding the service start time;

[0042] An information sending module, used for the receiver to send a "service notification message" to the sender within a pre-time period before the service start time; wherein the value range of the pre-time period is 2s-5s;

[0043] The first time recording module is used for recording the time corresponding to sending the "time query message" as t1 when the sender sends the time query message.

[0044] Furthermore, the first time difference acquisition module includes:

[0045] A second time recording module, configured for recording the time of receiving the "time query message" as t2 when the receiver receives the "time query message";

[0046] The third time recording module is used to extract the business development time and record the business development time as t5;

[0047] The business development time difference acquisition module is used to obtain the business development time difference D by using the time when the "time query message" is received as t2 and the business development time as t5; wherein the business development time difference D is obtained by the following formula:

[0048] D=t5-t2

[0049] Wherein, D represents the time difference of business development; t2 represents the moment when the receiver receives the "time query message"; and t5 represents the business development time.

[0050] Furthermore, the link round-trip delay acquisition module includes:

[0051] The fourth time recording module is used for recording the time corresponding to the time when the sender receives the "time query response message" as t3;

[0052] The link round-trip delay calculation module is used to obtain the link round-trip delay using the time t3 and the time t1; wherein the link round-trip delay is obtained by the following formula:

[0053] L = t3 - t1;

[0054] Where L represents the round-trip delay of the link.

[0055] Furthermore, the second time difference acquisition module includes:

[0056] A time difference calculation module, which is used for obtaining the time difference t5-t2 by using the service start time t5 and the time t2 when the receiver receives the "time query message" after the service start time t5 is determined by the receiver;

[0057] An information return module, used for returning the time difference to the sender;

[0058] The business message sending time determination module is used to determine the business message sending time based on the time t1 when the sender records the sending and receiving of the message and the corresponding time t3 when the sender receives the "time query response message", wherein the business message sending time is obtained by the following formula:

[0059] t4=t1+D=t3+DL

[0060] Among them, t4 represents the time when the business message is sent.

[0061] Beneficial effects of the present invention:

[0062] The present invention proposes a communication method and system in which the first message in a wide area network arrives at the receiver at the same time, which does not require advance time calibration, nor does it require the message sender to know the service start time. By starting the delay measurement through the notification of the receiver in a short time before the service starts, and allowing the measurement message to reach the receiver through the same path as the normal service, the time the sender needs to wait is directly calculated, so that the first message from different senders can arrive at the server at a basically consistent time, thereby improving fairness. The present invention does not require the communicating parties to perform time synchronization. Since the algorithm involves a short time and is slightly affected by clock drift, the requirements for the clock accuracy of the communicating parties are reduced. At the same time, the delay query message of the present invention passes through the same path as the service message, the message delay is consistent with the service message delay, and the calculation result is more accurate. In practice, multiple measurements can be performed, and the L values ​​in the multiple measurements can be averaged after the deviation value is removed as the final L value, and the last D can be taken as the D value to participate in the calculation to reduce the impact of network jitter. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 is a flow chart of the method of the present invention;

[0064] Figure 2 The execution principle of the method of the present invention Figure 1 ;

[0065] Figure 3 The execution principle of the method of the present invention Figure 2 ;

[0066] Figure 4 The execution principle of the method of the present invention Figure 3 ;

[0067] Figure 5 The system block diagram of the system of the present invention. DETAILED DESCRIPTION

[0068] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0069] The embodiment of the present invention provides a communication method in which the first messages in a wide area network arrive at the receiver at the same time, such as Figure 1 As shown, the communication method in which the first message in the wide area network arrives at the receiver at the same time includes:

[0070] S1, using the "business notification message" between the receiver and the sender to send the acquisition time t1;

[0071] S2, using the time when the receiver obtains the time query message and the business development time to obtain the business development time difference, and returning the "time query response message" to the sender;

[0072] S3, after the sender receives the "time query response message", the link round trip delay is obtained using the time when the "time query response message" is received;

[0073] S4. The receiver obtains the time difference between the business start time t5 and the time t2 when the "time query message" is received, and uses the time difference to obtain the time when the business message is sent.

[0074] The working principle of the above technical solution is: the receiver sends a "service notification message" to the sender at a short time point (such as 3 seconds) before the service start time;

[0075] When the sender sends a "time query message", the current time t1 is recorded;

[0076] When the receiver receives the "time query message", it calculates the "time difference from business start" D = t5-t2 based on the current time t2 and the business start time t5, and returns it to the sender through the "time query response message"; wherein, the business start time t5 is specifically:

[0077] Generally, it is set in advance, such as opening the market at 09:15 according to the trading rules, but it may be adjusted dynamically as needed in scenarios such as testing and exception handling. Some markets send the above schedule to the client in advance, and the client controls it according to the local time. The algorithm mentioned in this patent does not require the client to know the above time in advance, and the server can adjust it at any time as needed;

[0078] When the sender receives the "time query response message", it calculates the link round-trip delay L = t3-t1 based on the current time t3;

[0079] The sender sends the service message at time t4 = t3 + (DL) = t3 + D - (t3 - t1) = t1 + D

[0080] Using the above algorithm,

[0081] After the service start time t5 is determined, the receiver only needs to calculate t5-t2 and return it to the sender;

[0082] The sender only needs to record the time t1 and t3 of sending and receiving messages to determine the time t4=t1+D=t3+DL when the business message is sent.

[0083] The effect of the above technical solution is: a communication method proposed by the embodiment of the present invention in which the first message in a wide area network arrives at the receiver at the same time does not require advance time calibration, nor does it require the message sender to know the service start time. By starting the delay measurement through the notification of the receiver in a short time before the service starts, and allowing the measurement message to reach the receiver through the same path as the normal service, the time the sender needs to wait is directly calculated, so that the first message of different senders can arrive at the server at a basically consistent time, thereby improving fairness. The present invention does not require the communicating parties to perform time synchronization. Since the algorithm involves a short time, it is slightly affected by clock drift, which reduces the requirements for the accuracy of the clocks of the communicating parties. At the same time, the delay query message of the present invention passes through the same path as the service message, the message delay is consistent with the service message delay, and the calculation result is more accurate. In practice, multiple measurements can be taken, and the L values ​​in the multiple measurements can be averaged after the deviation value is removed as the final L value, and the last D can be taken as the D value to participate in the calculation to reduce the impact of network jitter.

[0084] In one embodiment of the present invention, the acquisition time t1 is sent by using a "service notification message" between a receiver and a sender, including:

[0085] S101, setting a lead time period, wherein the lead time period is a time interval before a service start time;

[0086] S102, the receiver sends a "service notification message" to the sender within a pre-time period before the service start time; wherein the pre-time period has a value range of 2s-5s;

[0087] S103. When the sender sends a time query message, the time corresponding to sending the "time query message" is recorded as t1.

[0088] The working principle of the above technical solution is as follows: First, the lead time period is set to ensure that the receiver can notify the sender of the upcoming service in advance before the service officially starts. The value range of the lead time period (2s-5s) is a predefined, relatively short time interval, which is designed to provide sufficient buffer time to ensure the timeliness and accuracy of communication.

[0089] Then, within the above-mentioned lead time period before the service starts, the receiver will send a "service notification message" to the sender.

[0090] The main purpose of the above message is to inform the sender that the service is about to start and to provide it with a preparation time.

[0091] Finally, the response to the time query message and the determination of t1 are performed. After the sender receives the above "service notification message", it may choose to send a "time query message" at a certain moment to confirm the current time synchronization status. When the sender sends the above "time query message", the system (or a specific time synchronization mechanism) will record this moment as t1.

[0092] The effect of the above technical solution is: by setting the lead time period and sending the "business notification message", the sender can know the start time of the business in advance, thereby ensuring that when sending the "time query message", the determination of time t1 is based on an accurate business timeline. The setting of the lead time period (2s-5s) provides a relatively short buffer time, which makes the communication between the receiver and the sender more timely and reduces the time error caused by communication delays. The sender can send the "time query message" at any time after receiving the "business notification message" according to actual needs, so as to flexibly determine the time t1. This solution realizes time synchronization based on message communication and does not rely on complex hardware clock synchronization mechanisms, so it has higher reliability and stability. The above time synchronization method is not only suitable for specific business scenarios, but can also be extended to other communication systems that require precise time synchronization, and has broad application prospects.

[0093] In one embodiment of the present invention, the time difference of business development is obtained by using the time when the receiver obtains the time query message and the business development time, including:

[0094] S201, when the receiver receives the "time query message", the time of receiving the "time query message" is recorded as t2;

[0095] S202, extracting the business development time, and recording the business development time as t5;

[0096] S203, using the time of receiving the "time query message" as t2 and the business development time as t5 to obtain the business development time difference D; wherein the business development time difference D is obtained by the following formula:

[0097] D=t5-t2

[0098] Wherein, D represents the time difference of business development; t2 represents the moment when the receiver receives the "time query message"; and t5 represents the business development time.

[0099] The working principle of the above technical solution is: when the receiver receives the "time query message" sent by the sender, it will immediately record this moment as t2. The above moment represents the exact time point when the sender requests time synchronization. The receiver needs to extract or determine the exact time when the business is carried out, and record the above time as t5. The above time is usually predetermined or automatically determined by the system according to certain conditions. Once t2 and t5 are determined, the receiver can calculate the business development time difference D by simple subtraction operation. The above time difference represents the time interval from the sender requesting time synchronization to the actual business development.

[0100] The effect of the above technical solution is: the solution can accurately calculate the time difference from the time synchronization request to the business development, providing the system with accurate time measurement. The business development time difference can be obtained through simple time recording and subtraction operations, and the operation is simple and easy. The above technical solution does not rely on specific hardware or software, is applicable to various system environments, and has high flexibility. By analyzing the business development time difference, the system can understand the efficiency of business preparation and response, and provide decision support for optimizing business processes and improving system performance. If the business development time difference is abnormal, it may mean that there are certain problems in the system, such as communication delays, processing bottlenecks, etc. At this time, by viewing and analyzing the time difference data, it can help locate the problem and troubleshoot it. By calculating the business development time difference regularly or in real time, the system can monitor and evaluate its performance to ensure that the system is always in the best state.

[0101] In one embodiment of the present invention, after the sender receives the "time query response message", obtaining the link round-trip delay using the time when the "time query response message" is received includes:

[0102] S301, when the sender receives the "time query response message", the corresponding time when the sender receives the "time query response message" is recorded as t3;

[0103] S302, using time t3 and time t1 to obtain a link round trip delay; wherein the link round trip delay is obtained by the following formula:

[0104] L = t3 - t1;

[0105] Where L represents the round-trip delay of the link.

[0106] The working principle of the above technical solution is: when the sender receives the "time query response message" returned by the receiver, it will immediately record this moment as t3. The above time point represents the time elapsed from the sender sending the "time query message" to receiving the "time query response message". The sender has previously recorded the moment t1 when the "time query message" was sent. Now, by calculating the difference between t3 (the moment when the "time query response message" is received) and t1 (the moment when the "time query message" is sent), the sender can get the link round-trip delay L. The link round-trip delay L is the time it takes for a data packet to be sent from one network node to another and then back. It is often used to evaluate network performance and diagnose network problems.

[0107] The effect of the above technical solution is: by calculating the link round-trip delay, the performance and response speed of the network link can be evaluated. Lower delay usually means better network performance and high data transmission efficiency. If the link round-trip delay is abnormally high, it may mean congestion, packet loss or other problems in the network. At this time, the administrator can locate and solve the network problem based on the delay data. The link round-trip delay information can help the network management system to perform load balancing and route optimization to ensure that data traffic can be transmitted more efficiently. For applications that need to ensure service quality (such as real-time communication, online games, etc.), the link round-trip delay is a key performance indicator. By calculating and monitoring the delay, it can be ensured that the service quality reaches the level expected by the user. In the network design and planning stage, the link round-trip delay data can be used as a reference to help designers select appropriate network equipment and protocols, and plan a reasonable network topology. By real-time monitoring of the link round-trip delay, the system can trigger an alarm mechanism when the delay exceeds the preset threshold, reminding the administrator to deal with possible network problems in a timely manner.

[0108] In one embodiment of the present invention, the receiver obtains the time difference between the service development time t5 and the time t2 when the "time query message" is received, and uses the time difference to obtain the time point of sending the service message, including:

[0109] S401, after the receiver determines the service start time t5, the receiver uses the service start time t5 and the time t2 when the receiver receives the "time query message" to obtain the time difference t5-t2;

[0110] S402, returning the time difference to the sender;

[0111] S403, the sender records the time t1 of sending and receiving the message and the corresponding time t3 when the sender receives the "time query response message", and determines the time point of sending the service message; wherein, the time point of sending the service message is obtained by the following formula:

[0112] t4=t1+D=t3+DL

[0113] Among them, t4 represents the time when the business message is sent.

[0114] The working principle of the above technical solution is: when the service start time t5 is determined, the receiver will use the above time point and the previously recorded time t2 when the "time query message" was received to calculate the time difference. The above time difference t5-t2 represents the time from the sender sending the time query message to the actual start of the service.

[0115] After the receiver calculates the time difference, it will return the time difference data to the sender. In this way, the sender can adjust the time of sending its business message based on the time difference.

[0116] The sender will record the time t1 when it sends the time query message and the time t3 when it receives the "time query response message". Through these two time points, the sender can calculate the link round-trip delay L (i.e. t3-t1). Then, the sender will use the time difference D (i.e. t5-t2) returned by the receiver and the link round-trip delay L to calculate the time t4 when the service message is sent. Here, the sender assumes that the transmission time of the service message from sending to receiving is the same as the round-trip time of the "time query message", so the time t4 when the service message is sent can be obtained by adding the time difference D from t1 or t3 and subtracting the link round-trip delay L.

[0117] The effect of the above technical solution is: through the above method, the sender can ensure that the business message is sent at a time close to the actual business development time, thereby improving the timeliness and accuracy of the business message. Accurate business message sending time can reduce unnecessary waiting time and improve resource utilization efficiency. Synchronized business message sending time can reduce business processing delays caused by time errors, thereby improving the performance and response speed of the entire system. For applications that rely on real-time business messages, accurate sending time can ensure that users can receive relevant information in a timely manner, thereby improving user experience. The above time synchronization mechanism is suitable for distributed system environments, which can ensure that the business message sending time between different nodes remains consistent. This technical solution does not rely on a specific hardware or software platform, so it is easy to expand and integrate in existing systems.

[0118] The embodiment of the present invention provides a communication system in which the first messages in a wide area network arrive at the receiver at the same time. Figure 5 As shown, the communication system in which the first message in the wide area network arrives at the receiver at the same time includes:

[0119] The time acquisition module is used to send and acquire the time t1 by using the "service notification message" between the receiver and the sender;

[0120] The first time difference acquisition module is used to obtain the business development time difference by using the time when the receiver obtains the time query message and the business development time, and return the "time query response message" to the sender;

[0121] A link round trip delay acquisition module, used to acquire the link round trip delay by using the moment of receiving the "time query response message" after the sender receives the "time query response message";

[0122] The second time difference acquisition module is used for the receiver to obtain the time difference through the business start time t5 and the moment t2 when the "time query message" is received, and use the time difference to obtain the time point of sending the business message.

[0123] The working principle of the above technical solution is: the receiver sends a "service notification message" to the sender at a short time point (such as 3 seconds) before the service start time;

[0124] When the sender sends a "time query message", the current time t1 is recorded;

[0125] When the receiver receives the "time query message", it calculates the "time difference from business start" D = t5-t2 based on the current time t2 and the business start time t5, and returns it to the sender through the "time query response message"; wherein, the business start time t5 is specifically:

[0126] Generally, it is set in advance, such as opening the market at 09:15 according to the trading rules, but it may be adjusted dynamically as needed in scenarios such as testing and exception handling. Some markets send the above schedule to the client in advance, and the client controls it according to the local time. The algorithm mentioned in this patent does not require the client to know the above time in advance, and the server can adjust it at any time as needed;

[0127] When the sender receives the "time query response message", it calculates the link round-trip delay L = t3-t1 based on the current time t3;

[0128] The sender sends the service message at time t4 = t3 + (DL) = t3 + D - (t3 - t1) = t1 + D

[0129] Using the above algorithm,

[0130] After the service start time t5 is determined, the receiver only needs to calculate t5-t2 and return it to the sender;

[0131] The sender only needs to record the time t1 and t3 of sending and receiving messages to determine the time t4=t1+D=t3+DL when the business message is sent.

[0132] The effect of the above technical solution is: a communication method proposed by the embodiment of the present invention in which the first message in a wide area network arrives at the receiver at the same time does not require advance time calibration, nor does it require the message sender to know the service start time. By starting the delay measurement through the notification of the receiver in a short time before the service starts, and allowing the measurement message to reach the receiver through the same path as the normal service, the time the sender needs to wait is directly calculated, so that the first message of different senders can arrive at the server at a basically consistent time, thereby improving fairness. The present invention does not require the communicating parties to perform time synchronization. Since the algorithm involves a short time, it is slightly affected by clock drift, which reduces the requirements for the accuracy of the clocks of the communicating parties. At the same time, the delay query message of the present invention passes through the same path as the service message, the message delay is consistent with the service message delay, and the calculation result is more accurate. In practice, multiple measurements can be taken, and the L values ​​in the multiple measurements can be averaged after the deviation value is removed as the final L value, and the last D can be taken as the D value to participate in the calculation to reduce the impact of network jitter.

[0133] In one embodiment of the present invention, the time acquisition module includes:

[0134] A time period setting module, used to set a leading time period, wherein the leading time period is a time interval preceding the service start time;

[0135] An information sending module, used for the receiver to send a "service notification message" to the sender within a pre-time period before the service start time; wherein the value range of the pre-time period is 2s-5s;

[0136] The first time recording module is used for recording the time corresponding to sending the "time query message" as t1 when the sender sends the time query message.

[0137] The working principle of the above technical solution is as follows: First, the lead time period is set to ensure that the receiver can notify the sender of the upcoming service in advance before the service officially starts. The value range of the lead time period (2s-5s) is a predefined, relatively short time interval, which is designed to provide sufficient buffer time to ensure the timeliness and accuracy of communication.

[0138] Then, within the above-mentioned lead time period before the service starts, the receiver will send a "service notification message" to the sender.

[0139] The main purpose of the above message is to inform the sender that the service is about to start and to provide it with a preparation time.

[0140] Finally, the response to the time query message and the determination of t1 are performed. After the sender receives the above "service notification message", it may choose to send a "time query message" at a certain moment to confirm the current time synchronization status. When the sender sends the above "time query message", the system (or a specific time synchronization mechanism) will record this moment as t1.

[0141] The effect of the above technical solution is: by setting the lead time period and sending the "business notification message", the sender can know the start time of the business in advance, thereby ensuring that when sending the "time query message", the determination of time t1 is based on an accurate business timeline. The setting of the lead time period (2s-5s) provides a relatively short buffer time, which makes the communication between the receiver and the sender more timely and reduces the time error caused by communication delays. The sender can send the "time query message" at any time after receiving the "business notification message" according to actual needs, so as to flexibly determine the time t1. This solution realizes time synchronization based on message communication and does not rely on complex hardware clock synchronization mechanisms, so it has higher reliability and stability. The above time synchronization method is not only suitable for specific business scenarios, but can also be extended to other communication systems that require precise time synchronization, and has broad application prospects.

[0142] In one embodiment of the present invention, the first time difference acquisition module includes:

[0143] A second time recording module, configured for recording the time of receiving the "time query message" as t2 when the receiver receives the "time query message";

[0144] The third time recording module is used to extract the business development time and record the business development time as t5;

[0145] The business development time difference acquisition module is used to obtain the business development time difference D by using the time when the "time query message" is received as t2 and the business development time as t5; wherein the business development time difference D is obtained by the following formula:

[0146] D=t5-t2

[0147] Wherein, D represents the time difference of business development; t2 represents the moment when the receiver receives the "time query message"; and t5 represents the business development time.

[0148] The working principle of the above technical solution is: when the receiver receives the "time query message" sent by the sender, it will immediately record this moment as t2. The above moment represents the exact time point when the sender requests time synchronization. The receiver needs to extract or determine the exact time when the business is carried out, and record the above time as t5. The above time is usually predetermined or automatically determined by the system according to certain conditions. Once t2 and t5 are determined, the receiver can calculate the business development time difference D by simple subtraction operation. The above time difference represents the time interval from the sender requesting time synchronization to the actual business development.

[0149] The effect of the above technical solution is: the solution can accurately calculate the time difference from the time synchronization request to the business development, providing the system with accurate time measurement. The business development time difference can be obtained through simple time recording and subtraction operations, and the operation is simple and easy. The above technical solution does not rely on specific hardware or software, is applicable to various system environments, and has high flexibility. By analyzing the business development time difference, the system can understand the efficiency of business preparation and response, and provide decision support for optimizing business processes and improving system performance. If the business development time difference is abnormal, it may mean that there are certain problems in the system, such as communication delays, processing bottlenecks, etc. At this time, by viewing and analyzing the time difference data, it can help locate the problem and troubleshoot it. By calculating the business development time difference regularly or in real time, the system can monitor and evaluate its performance to ensure that the system is always in the best state.

[0150] In one embodiment of the present invention, the link round-trip delay acquisition module includes:

[0151] The fourth time recording module is used for recording the time corresponding to the time when the sender receives the "time query response message" as t3;

[0152] The link round-trip delay calculation module is used to obtain the link round-trip delay using the time t3 and the time t1; wherein the link round-trip delay is obtained by the following formula:

[0153] L = t3 - t1;

[0154] Where L represents the round-trip delay of the link.

[0155] The working principle of the above technical solution is: when the sender receives the "time query response message" returned by the receiver, it will immediately record this moment as t3. The above time point represents the time elapsed from the sender sending the "time query message" to receiving the "time query response message". The sender has previously recorded the moment t1 when the "time query message" was sent. Now, by calculating the difference between t3 (the moment when the "time query response message" is received) and t1 (the moment when the "time query message" is sent), the sender can get the link round-trip delay L. The link round-trip delay L is the time it takes for a data packet to be sent from one network node to another and then back. It is often used to evaluate network performance and diagnose network problems.

[0156] The effect of the above technical solution is: by calculating the link round-trip delay, the performance and response speed of the network link can be evaluated. Lower delay usually means better network performance and high data transmission efficiency. If the link round-trip delay is abnormally high, it may mean congestion, packet loss or other problems in the network. At this time, the administrator can locate and solve the network problem based on the delay data. The link round-trip delay information can help the network management system to perform load balancing and route optimization to ensure that data traffic can be transmitted more efficiently. For applications that need to ensure service quality (such as real-time communication, online games, etc.), the link round-trip delay is a key performance indicator. By calculating and monitoring the delay, it can be ensured that the service quality reaches the level expected by the user. In the network design and planning stage, the link round-trip delay data can be used as a reference to help designers select appropriate network equipment and protocols, and plan a reasonable network topology. By real-time monitoring of the link round-trip delay, the system can trigger an alarm mechanism when the delay exceeds the preset threshold, reminding the administrator to deal with possible network problems in a timely manner.

[0157] In one embodiment of the present invention, the second time difference acquisition module includes:

[0158] A time difference calculation module, which is used for obtaining the time difference t5-t2 by using the service start time t5 and the time t2 when the receiver receives the "time query message" after the service start time t5 is determined by the receiver;

[0159] An information return module, used for returning the time difference to the sender;

[0160] The business message sending time determination module is used to determine the business message sending time based on the time t1 when the sender records the sending and receiving of the message and the corresponding time t3 when the sender receives the "time query response message", wherein the business message sending time is obtained by the following formula:

[0161] t4=t1+D=t3+DL

[0162] Among them, t4 represents the time when the business message is sent.

[0163] The working principle of the above technical solution is: when the service start time t5 is determined, the receiver will use the above time point and the previously recorded time t2 when the "time query message" was received to calculate the time difference. The above time difference t5-t2 represents the time from the sender sending the time query message to the actual start of the service.

[0164] After the receiver calculates the time difference, it will return the time difference data to the sender. In this way, the sender can adjust the time of sending its business message based on the time difference.

[0165] The sender will record the time t1 when it sends the time query message and the time t3 when it receives the "time query response message". Through these two time points, the sender can calculate the link round-trip delay L (i.e. t3-t1). Then, the sender will use the time difference D (i.e. t5-t2) returned by the receiver and the link round-trip delay L to calculate the time t4 when the service message is sent. Here, the sender assumes that the transmission time of the service message from sending to receiving is the same as the round-trip time of the "time query message", so the time t4 when the service message is sent can be obtained by adding the time difference D from t1 or t3 and subtracting the link round-trip delay L.

[0166] The effect of the above technical solution is: through the above method, the sender can ensure that the business message is sent at a time close to the actual business development time, thereby improving the timeliness and accuracy of the business message. Accurate business message sending time can reduce unnecessary waiting time and improve resource utilization efficiency. Synchronized business message sending time can reduce business processing delays caused by time errors, thereby improving the performance and response speed of the entire system. For applications that rely on real-time business messages, accurate sending time can ensure that users can receive relevant information in a timely manner, thereby improving user experience. The above time synchronization mechanism is suitable for distributed system environments, which can ensure that the business message sending time between different nodes remains consistent. This technical solution does not rely on a specific hardware or software platform, so it is easy to expand and integrate in existing systems.

[0167] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if the above-mentioned modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include the above-mentioned modifications and variations.

Claims

1. A communication method in which the first messages in a wide area network arrive at the receiver at the same time, characterized in that: The communication method in which the first messages in the wide area network arrive at the receiver at the same time includes: The acquisition time t1 is sent by using the "business notification message" between the receiver and the sender; The time when the receiver obtains the time query message and the business development time are used to obtain the business development time difference, and the "time query response message" is returned to the sender; After the sender receives the "time query response message", the link round trip delay is obtained using the time when the "time query response message" is received; The receiver obtains the time difference between the business start time t5 and the time t2 when the "time query message" is received, and uses the time difference to obtain the time when the business message is sent.

2. The communication method according to claim 1, wherein the first messages in a wide area network arrive at the receiver at the same time, characterized in that: The acquisition time t1 is sent by using the "business notification message" between the receiver and the sender, including: Setting a lead time period, wherein the lead time period is a time interval before the service start time; The receiver sends a "service notification message" to the sender within the lead time period before the service start time; wherein the value range of the lead time period is 2s-5s; When the sender sends the time query message, the time corresponding to sending the “time query message” is recorded as t1.

3. The communication method according to claim 1, wherein the first messages in a wide area network arrive at the receiver at the same time, characterized in that: The time when the receiver obtains the time query message and the business development time are used to obtain the business development time difference, including: When the receiver receives the "time query message", the time of receiving the "time query message" is recorded as t2; Extract the business development time, and record the business development time as t5; The time when the "time query message" is received is recorded as t2 and the business development time is recorded as t5 to obtain the business development time difference D; wherein, the business development time difference D is obtained by the following formula: D=t5-t2 Wherein, D represents the time difference of business development; t2 represents the moment when the receiver receives the "time query message"; and t5 represents the business development time.

4. The communication method according to claim 1, wherein the first messages in a wide area network arrive at the receiver at the same time, characterized in that: After the sender receives the "time query response message", the link round trip delay is obtained using the time when the "time query response message" is received, including: When the sender receives the "time query response message", the corresponding time when the sender receives the "time query response message" is recorded as t3; The link round trip delay is obtained by using the time t3 and the time t1; wherein the link round trip delay is obtained by the following formula: L = t3 - t1; Where L represents the round-trip delay of the link.

5. The communication method according to claim 1, wherein the first messages in a wide area network arrive at the receiver at the same time, characterized in that: The receiver obtains the time difference between the business start time t5 and the time t2 when the "time query message" is received, and uses the time difference to obtain the time when the business message is sent, including: After the receiver determines the service start time t5, the receiver uses the service start time t5 and the time t2 when the receiver receives the "time query message" to obtain the time difference t5-t2; Returning the time difference to the sender; The sender records the time t1 of sending and receiving messages and the corresponding time t3 when the sender receives the "time query response message" to determine the time when the service message is sent; wherein, the time when the service message is sent is obtained by the following formula: t4=t1+D=t3+DL Among them, t4 represents the time when the business message is sent.

6. A communication system in which the first messages in a wide area network arrive at the receivers simultaneously, characterized in that: The communication system in which the first message in the wide area network arrives at the receiver at the same time includes: The time acquisition module is used to send and acquire the time t1 by using the "business notification message" between the receiver and the sender; The first time difference acquisition module is used to obtain the business development time difference by using the time when the receiver obtains the time query message and the business development time, and return the "time query response message" to the sender; A link round trip delay acquisition module, used to acquire the link round trip delay by using the moment of receiving the "time query response message" after the sender receives the "time query response message"; The second time difference acquisition module is used for the receiver to obtain the time difference through the business start time t5 and the moment t2 when the "time query message" is received, and use the time difference to obtain the time point of sending the business message.

7. The communication system according to claim 6, wherein the first messages in a wide area network arrive at the receiver at the same time, characterized in that: The time acquisition module comprises: A time period setting module, used to set a leading time period, wherein the leading time period is a time interval preceding the service start time; An information sending module, used for the receiver to send a "service notification message" to the sender within a pre-time period before the service start time; wherein the value range of the pre-time period is 2s-5s; The first time recording module is used for recording the time corresponding to sending the "time query message" as t1 when the sender sends the time query message.

8. The communication system according to claim 6, wherein the first messages in a wide area network arrive at the receiver at the same time, characterized in that: The first time difference acquisition module includes: A second time recording module, for recording the time of receiving the "time query message" as t2 when the receiver receives the "time query message"; The third time recording module is used to extract the business development time and record the business development time as t5; The business development time difference acquisition module is used to obtain the business development time difference D by using the time when the "time query message" is received as t2 and the business development time as t5; wherein the business development time difference D is obtained by the following formula: D=t5-t2 Wherein, D represents the time difference of business development; t2 represents the moment when the receiver receives the "time query message"; and t5 represents the business development time.

9. The communication system according to claim 6, wherein the first messages in a wide area network arrive at the receiver at the same time, characterized in that: The link round-trip delay acquisition module includes: The fourth time recording module is used for recording the time corresponding to the sender receiving the "time query response message" as t3 when the sender receives the "time query response message"; The link round-trip delay calculation module is used to obtain the link round-trip delay using the time t3 and the time t1; wherein the link round-trip delay is obtained by the following formula: L = t3 - t1; Where L represents the round-trip delay of the link.

10. The communication system according to claim 6, wherein the first messages in a wide area network arrive at the receiver at the same time, characterized in that: The second time difference acquisition module includes: A time difference calculation module, which is used for obtaining the time difference t5-t2 by using the service start time t5 and the time t2 when the receiver receives the "time query message" after the service start time t5 is determined by the receiver; An information return module, used for returning the time difference to the sender; The module for determining the time point of sending a business message is used to determine the time point of sending a business message based on the time t1 when the sender records the sending and receiving of the message and the time t3 when the sender receives the "time query response message". The time point of sending the business message is obtained by the following formula: t4=t1+D=t3+DL Among them, t4 represents the time when the business message is sent.