Method and device for receiving and sending time difference data in military standard time

By directly including nanoseconds, seconds, days and yearly time difference information in military standard time time difference data transmission, the problem of data receivers in the existing technology requiring complex conversion algorithms is solved, and the effect of simplifying the analytical algorithm and improving data transmission efficiency is achieved.

CN115208502BActive Publication Date: 2025-06-13BEIJING YANSHAN ELECTRONICS EQUIP FACTORY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210726303.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-23
Publication Date
2025-06-13
Estimated Expiration
2042-06-23

AI Technical Summary

Technical Problem

When transmitting military standard time time difference data, the data receiver needs to design complex conversion algorithms to convert nanosecond time difference and second time difference into a general time format, and needs to consider issues such as leap years and leap seconds, which leads to complex analytical algorithms and is not conducive to improving data transmission efficiency.

Method used

By directly including nanosecond time difference, second time difference, day time difference and annual time difference in the valid data, and establishing a connection between the data receiver and the sender, these time difference information are directly parsed to obtain time difference data in a general time format, the analytical algorithm of the data receiver is simplified.

Benefits of technology

The data receiver directly parses the nanosecond, second, day, and year time difference data from the valid data, without the need for complex conversion algorithms, avoids consideration of leap years and leap seconds, and improves data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115208502B_ABST
    Figure CN115208502B_ABST
Patent Text Reader

Abstract

This application relates to the technical field of military standard time information transmission, and particularly to a method and device for receiving and sending time difference data in military standard time. Among them, the method for receiving time difference data in military standard time includes the steps of: sending a request for obtaining time difference data to the data sender and establishing a connection with the data sender; receiving the valid data sent by the data sender, where the valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference, and year time difference; and parsing the valid data according to the time difference information to obtain the time difference data represented in the general time format. The technical solution of this application can directly obtain the time difference data represented in the general time format such as seconds, days, and years, without the need for the data receiver in the existing technical solutions to design complex conversion algorithms, nor the need to consider issues such as leap years and leap seconds. To a certain extent, it simplifies the parsing algorithm of the data receiver and is conducive to improving the data transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of military standard time information transmission, and in particular, to a method and device for receiving and sending time difference data in military standard time. Background Art

[0002] In the existing related technologies, when transmitting time difference data of military standard time, since the time difference data received by the data receiving party usually only includes nanosecond time difference information and second time difference information, when the data receiving party receives the above time difference data and parses it to obtain the general time format of seconds, days, and years, algorithms need to be used to convert the nanoseconds and seconds into the general time format of seconds, days, and years, and issues such as leap years and leap seconds also need to be considered. As a result, the parsing algorithm of the data receiving party is relatively complex, which is not conducive to improving the data transmission efficiency. In this regard, further improvements are needed. Summary of the Invention

[0003] In order to improve the transmission efficiency of time difference data in military standard time, this application provides a method and device for receiving and sending time difference data in military standard time.

[0004] In a first aspect, the method for receiving time difference data in military standard time provided by this application adopts the following technical solution:

[0005] The method for receiving time difference data in military standard time includes the following steps:

[0006] Send a request for obtaining time difference data to the data sending party and establish a connection with the data sending party;

[0007] Receive the valid data sent by the data sending party, where the valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference, and year time difference;

[0008] Parse the valid data according to the time difference information to obtain time difference data represented in the general time format.

[0009] By adopting the above technical solution, since the valid data received by the data receiving party itself includes nanosecond time difference, second time difference, day time difference, and year time difference, the data receiving party only needs to parse the valid data to obtain time difference data including the corresponding nanosecond time difference, second time difference, day time difference, and year time difference, that is, directly obtain time difference data represented in the general time format of seconds, days, and years. Unlike the existing technical solutions, the data receiving party does not need to design complex conversion algorithms and does not need to consider issues such as leap years and leap seconds. To a certain extent, the parsing algorithm of the data receiving party is simplified, which is conducive to improving the data transmission efficiency.

[0010] Optionally, the valid data further includes the time when the time difference information is generated. The step of parsing the valid data according to the time difference information to obtain time difference data represented in a universal time format includes: parsing the valid data according to the time difference information and the time when the time difference information is generated to obtain time difference data represented in a universal time format.

[0011] By adopting the above technical solution, by receiving the time when the time difference information is generated, it is convenient for the data recipient to query the corresponding time when different time difference information is generated.

[0012] Optionally, the time when the time difference information is generated is recorded in the current Beijing time. The step of parsing the valid data according to the time difference information and the time when the time difference information is generated to obtain time difference data represented in a universal time format includes: parsing the valid data according to the time difference information and the current Beijing time when the time difference information is generated to obtain time difference data represented in a universal time format.

[0013] By adopting the above technical solution, the current Beijing time when the time difference information is generated is received, so as to facilitate the data recipient to query the current Beijing time when different time difference information is generated.

[0014] Optionally, the valid data further includes a time measurement mode. The step of parsing the valid data according to the time difference information and the time when the time difference information is generated to obtain time difference data represented in a universal time format includes: parsing the valid data according to the time difference information, the time measurement mode, and the time when the time difference information is generated to obtain time difference data represented in a universal time format.

[0015] In a second aspect, the method for sending time difference data in military standard time provided by the present application adopts the following technical solution:

[0016] A method for sending time difference data in military standard time includes the following steps:

[0017] Receiving a request for obtaining time difference data sent by the data recipient and establishing a connection with the data recipient;

[0018] Sending valid data to the data recipient, where the valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference, and year time difference.

[0019] By adopting the above technical solution, since the valid data sent by the data sender itself includes nanosecond time difference, second time difference, day time difference and year time difference, the data receiver only needs to parse the valid data to obtain the time difference data including the corresponding nanosecond time difference, second time difference, day time difference and year time difference, that is, directly obtain the time difference data represented in the general time format of seconds, days and years, without the need to design complex conversion algorithms, nor to consider issues such as leap years and leap seconds, which simplifies the parsing algorithm of the data receiver to a certain extent and is conducive to improving the data transmission efficiency.

[0020] Optionally, the valid data further includes the time when the time difference information is generated.

[0021] By adopting the above technical solution, the time when the time difference information is generated is sent to facilitate the data receiver to query the time when different time difference information is generated.

[0022] Optionally, the valid data further includes the time measurement mode.

[0023] By adopting the above technical solution, the time measurement mode is sent to facilitate the data receiver to query the corresponding time measurement mode when different time difference information is generated.

[0024] Optionally, the time when the time difference information is generated is recorded using the current Beijing time.

[0025] By adopting the above technical solution, the current Beijing time when the time difference information is generated is sent to facilitate the data receiver to query the current Beijing time when different time difference information is generated.

[0026] In a third aspect, the device for receiving the time difference data in the military standard time provided by the present application adopts the following technical solution:

[0027] The device for receiving the time difference data in the military standard time includes:

[0028] A request sending module, configured to send a request for obtaining the time difference data to the data sender and establish a connection with the data sender;

[0029] A data receiving module, configured to receive the valid data sent by the data sender, where the valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference and year time difference;

[0030] And a time difference data generation module, configured to parse the valid data according to the time difference information to obtain the time difference data represented in the general time format.

[0031] By adopting the above technical solution, since the time difference information received by the data receiving module includes nanosecond time difference, second time difference, day time difference and year time difference, the data receiver only needs to parse the valid data through the time difference data generation module to obtain the time difference data including the corresponding nanosecond time difference, second time difference, day time difference and year time difference, that is, directly obtain the time difference data represented in the general time format of seconds, days and years, without the need to design complex conversion algorithms, nor to consider issues such as leap years and leap seconds. To a certain extent, the parsing algorithm of the data receiver is simplified, which is beneficial to improving the data transmission efficiency.

[0032] Fourthly, the device for sending time difference data in military standard time provided by this application adopts the following technical solution:

[0033] The device for sending time difference data in military standard time includes:

[0034] A request receiving module, configured to receive a request for obtaining time difference data sent by the data receiver and establish a connection with the data receiver;

[0035] And a data sending module, configured to send valid data to the data receiver, where the valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference and year time difference.

[0036] By adopting the above technical solution, since the valid data sent by the data sending module includes nanosecond time difference, second time difference, day time difference and year time difference, the data receiver only needs to parse the valid data to obtain the time difference data including the corresponding nanosecond time difference, second time difference, day time difference and year time difference, that is, directly obtain the time difference data represented in the general time format of seconds, days and years, without the need to design complex conversion algorithms, nor to consider issues such as leap years and leap seconds. To a certain extent, the parsing algorithm of the data receiver is simplified, which is beneficial to improving the data transmission efficiency.

[0037] As can be seen from the above, the beneficial technical effects of this application include: the valid data received by the data receiver itself includes nanosecond time difference, second time difference, day time difference and year time difference, so the data receiver only needs to parse the valid data to obtain the time difference data including the corresponding nanosecond time difference, second time difference, day time difference and year time difference, that is, directly obtain the time difference data represented in the general time format of seconds, days and years, unlike the existing technical solutions where the data receiver needs to design complex conversion algorithms and does not need to consider issues such as leap years and leap seconds. To a certain extent, the parsing algorithm of the data receiver is simplified, which is beneficial to improving the data transmission efficiency. Description of the Drawings

[0038] Figure 1It is a schematic flowchart of a method for receiving time difference data in military standard time disclosed in an embodiment of the present application.

[0039] Figure 2 It is a schematic flowchart of a method for sending time difference data in military standard time disclosed in an embodiment of the present application. Detailed implementation manners

[0040] For a clearer understanding of the technical solution of the present application, the technical solution of the application will be clearly and completely described below through specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Therefore, the following detailed description of the embodiments of the present application is not intended to limit the scope of the present application claimed, but only represents the selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application.

[0041] In a first aspect, referring to Figure 1 , an embodiment of the present application discloses a method for receiving time difference data in military standard time, which is applied to a data receiver, and the method includes the following steps:

[0042] S100. Send a request for obtaining time difference data to the data sender and establish a connection with the data sender. Specifically, the data receiver can send a request for obtaining time difference data to the data sender by creating a communication address family corresponding to the data sender, determining a communication port number corresponding to the data sender, and creating a socket using TCP (TCP, Transmission Control Protocol, a connection-oriented, reliable, byte-stream-based transport layer communication protocol) communication with the data sender, so as to establish a connection with the data sender.

[0043] S200. Receive the valid data sent by the data sender, where the valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference, and year time difference.

[0044] S300. Analyze the valid data according to the time difference information to obtain time difference data represented in a general time format. Specifically, receive the valid data including nanosecond time difference, second time difference, day time difference, and year time difference sent by the data sender, and after analyzing the valid data, time difference data including the corresponding nanosecond time difference, second time difference, day time difference, and year time difference can be obtained, so as to directly obtain time difference data represented in the general time format of seconds, days, and years.

[0045] In the existing related technologies, after the data receiver receives the data information that only records the nanosecond time difference and the second time difference, it is necessary to use an algorithm to convert the second time difference to obtain the corresponding time difference data in the format of seconds, days, and years. Moreover, issues such as leap years and leap seconds need to be considered, resulting in a relatively complex parsing algorithm for the data receiver and being unfavorable for improving the data transmission efficiency. In the technical solution disclosed in the embodiments of the present application, since the valid data received by the data receiver itself includes the nanosecond time difference, the second time difference, the day time difference, and the year time difference, the data receiver only needs to parse the valid data to obtain the time difference data including the corresponding nanosecond time difference, second time difference, day time difference, and year time difference, that is, directly obtain the time difference data represented in the general time format of seconds, days, and years, without the need to design a complex conversion algorithm and without considering issues such as leap years and leap seconds. To a certain extent, the parsing algorithm of the data receiver is simplified, which is beneficial to improving the data transmission efficiency.

[0046] Further, in some embodiments, the above-mentioned valid data further includes the time when the time difference information is generated. The above-mentioned step S300 includes: S310. Parse the valid data according to the time difference information and the time when the time difference information is generated to obtain the time difference data represented in the general time format. Among them, the time when the time difference information is generated can be the current UK time, the current German time, the current Beijing time, etc. when the time difference information is generated, and it can be specifically set according to actual needs. In this way, by recording the time when the time difference information is generated, it is convenient for the data receiver to query the corresponding time when different time difference information is generated.

[0047] Further, in some embodiments, the time when the time difference information is generated is recorded using the current Beijing time. The above-mentioned step S310 includes: S311. Parse the valid data according to the time difference information and the current Beijing time when the time difference information is generated to obtain the time difference data represented in the general time format. In this way, by recording the current Beijing time when the time difference information is generated, it is convenient for the data receiver to query the current Beijing time when different time difference information is generated.

[0048] Further, in some embodiments, the above-mentioned valid data further includes the time measurement mode. The above-mentioned step S300 includes: S320. Parse the valid data according to the time difference information, the time measurement mode, and the time when the time difference information is generated to obtain the time difference data represented in the general time format. Among them, common time measurement modes include the differential B code mode, the optical fiber B code mode, the TOD mode (Time Of Day, current time mode), and the 1PPS mode (Pulse Per Second, second pulse mode), etc. By recording the time measurement mode, it is convenient for the data receiver to query the corresponding time measurement mode when different time difference information is generated.

[0049] It should be noted that in the technical solution of this application, the parsing process of the data receiver can be understood as follows: the data receiver decodes the valid data according to the data transmission protocol, and the corresponding time difference information (including nanosecond time difference, second time difference, day time difference, and year time difference), the type of time measurement mode, and the current time when the time difference information is generated and other relevant information can be obtained.

[0050] The following takes the message "00 00 00 08 00 00 03 e4 00 00 00 1c 00 0000 0d 00 00 00 14 00 00 03 e4 00 00 00 1c 00 00 00 0d 00 00 00 14" sent by the data sender as an example to further illustrate the above parsing process:

[0051] This message includes 9 fields each occupying 4 bytes, among which:

[0052] The first field "00 00 00 08" is the time measurement mode segment, representing that the corresponding time measurement mode is the differential B code mode. In addition, "00 00 00 09" can be used to represent the optical B code mode, "00 00 00 0a" represents the TOD mode, "00 0000 0b" represents the 1pps mode, "00 00 00 0c" represents the ntp mode, and the data receiver can parse this field to obtain the time measurement mode.

[0053] The second to fifth fields are the current time period. Among them, in the embodiment of this application, the current time uses Beijing time, and the data receiver can parse this field to obtain the current Beijing time when the time difference data is generated. Specifically, it includes:

[0054] The second field "00 00 03 e4" is the nanosecond time segment, representing that the time when the time difference data is generated is the 998th nanosecond within the current second of Beijing time. The data receiver can parse this field to obtain the nanosecond time in the current Beijing time.

[0055] The third field "00 00 00 1c" is the second time segment, representing that the time when the time difference data is generated is the 28th second within the current day of Beijing time. The data receiver can parse this field to obtain the second time in the current Beijing time.

[0056] The fourth field "00 00 00 0d" is the day time segment, representing that the time when the time difference data is generated is the 13th day within the current year of Beijing time. The data receiver can parse this field to obtain the day time in the current Beijing time.

[0057] The fifth field "00 00 00 14" represents a small time segment of the year, indicating that the time when the time difference data is generated is the 20th year of the 21st century in the current Beijing time. By parsing this field, the data receiver can obtain the year time in the current Beijing time.

[0058] The sixth to ninth fields represent the time difference time periods. By parsing these fields, the data receiver can obtain the corresponding time difference information. Specifically, it includes:

[0059] The sixth field "00 00 03 e4" represents a small segment of nanosecond time difference, indicating that the nanosecond time difference measured at the current time is 998 nanoseconds. By parsing this field, the data receiver can obtain the nanosecond time difference.

[0060] The seventh field "00 00 00 1c" represents a small segment of second time difference, indicating that the second time difference measured at the current time is 28 seconds. By parsing this field, the data receiver can obtain the second time difference.

[0061] The eighth field "00 00 00 0d" represents a small segment of day time difference, indicating that the day time difference measured at the current time is 13 days. By parsing this field, the data receiver can obtain the day time difference.

[0062] The ninth field "00 00 00 14" represents a small segment of year time difference, indicating that the year time difference measured at the current time is 20 years. By parsing this field, the data receiver can obtain the year time difference.

[0063] In the second aspect, referring to Figure 2 , the embodiment of the present application also discloses a method for sending time difference data in military standard time, which is applied to the data sender. The method includes the following steps:

[0064] S400: Receive the request for obtaining time difference data sent by the data receiver and establish a connection with the data receiver. Specifically, the data sender can pre-create a communication address family, determine the communication port number, create a socket using TCP communication, and bind the socket to the communication address family. Then, it can continuously monitor the socket information, monitor the socket value, and check whether there is a request sent by the data receiver accessing the socket. If so, it accesses the socket to establish a connection with the data receiver.

[0065] S500: Send valid data to the data receiver. The valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference, and year time difference.

[0066] By adopting the above technical solution, since the valid data sent by the data sender itself includes nanosecond time difference, second time difference, day time difference and year time difference, the data receiver only needs to parse the valid data to obtain the time difference data including the corresponding nanosecond time difference, second time difference, day time difference and year time difference, that is, directly obtain the time difference data represented in the general time format of seconds, days and years, without the need to design a complex conversion algorithm, nor to consider issues such as leap years and leap seconds. To a certain extent, the parsing algorithm of the data receiver is simplified, which is beneficial to improving the data transmission efficiency.

[0067] Further, in some embodiments, the above valid data further includes the time when the time difference information is generated. Among them, the time when the time difference information is generated can be the current UK time, current German time, current Beijing time, etc. when the time difference information is generated, and can be specifically set according to actual needs.

[0068] Further, in some embodiments, the time when the time difference information is generated is recorded using the current Beijing time.

[0069] Further, in some embodiments, the above valid data further includes a time measurement mode. Among them, common time measurement modes include differential B-code mode, optical fiber B-code mode, TOD mode (Time Of Day, current time mode), 1PPS mode (Pulse Per Second, second pulse mode), etc.

[0070] In a third aspect, an embodiment of the present application also discloses a device for receiving time difference data in military standard time, which is applied to a data receiver. The device includes a request sending module, a data receiving module and a time difference data generating module that are connected to each other, where:

[0071] The request sending module is used to send a request for obtaining time difference data to the data sender and establish a connection with the data sender. Specifically, the request sending module can send a request for obtaining time difference data to the data sender by creating a communication address family corresponding to the data sender, determining a communication port number corresponding to the data sender, and creating a socket using TCP (TCP, Transmission Control Protocol, a connection-oriented, reliable, byte-stream-based transport layer communication protocol) communication with the data sender, so as to establish a connection with the data sender.

[0072] The data receiving module is used to receive the valid data sent by the data sender. The valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference and year time difference.

[0073] The time difference data generation module is used to parse the valid data according to the time difference information to obtain the time difference data represented in the general time format. Specifically, the data receiving module receives the valid data including nanosecond time difference, second time difference, day time difference, and year time difference sent by the data sender. After parsing the valid data, the time difference data generation module obtains the time difference data including the corresponding nanosecond time difference, second time difference, day time difference, and year time difference, which is equivalent to directly obtaining the time difference data represented in the general time format of seconds, days, and years.

[0074] By adopting the above technical solution, since the time difference information received by the data receiving module includes nanosecond time difference, second time difference, day time difference, and year time difference, the data receiver only needs to parse the valid data through the time difference data generation module to obtain the time difference data including the corresponding nanosecond time difference, second time difference, day time difference, and year time difference, that is, directly obtain the time difference data represented in the general time format of seconds, days, and years, without the need to design a complex conversion algorithm, nor to consider issues such as leap years and leap seconds. To a certain extent, it simplifies the parsing algorithm of the data receiver and is conducive to improving the data transmission efficiency.

[0075] It should be noted that in the technical solution of this application, the parsing process of the data receiver can be understood as that the data receiver decodes the valid data according to the data transmission protocol to obtain the corresponding time difference information (including nanosecond time difference, second time difference, day time difference, and year time difference), the type of time measurement mode, and the current time when the time difference information is generated and other relevant information.

[0076] The following takes the message "00 00 00 08 00 00 03 e4 00 00 00 1c 00 0000 0d 00 00 00 14 00 00 03 e4 00 00 00 1c 00 00 00 0d 00 00 00 14" sent by the data sender as an example to further illustrate the above parsing process:

[0077] This message includes 9 fields each occupying 4 bytes, among which:

[0078] The first field "00 00 00 08" is the time measurement mode segment, representing that the corresponding time measurement mode is the differential B code mode. In addition, "00 00 00 09" can be used to represent the optical B code mode, "00 00 00 0a" represents the TOD mode, "00 0000 0b" represents the 1pps mode, "00 00 00 0c" represents the ntp mode. The data receiver can parse this field to obtain the time measurement mode.

[0079] The second to fifth fields represent the current time period. In the embodiments of the present application, the current time is Beijing time. By parsing this field, the data recipient can obtain the current Beijing time when the time difference data was generated. Specifically, it includes:

[0080] The second field "00 00 03 e4" is the nanosecond time segment, indicating that the time when the time difference data was generated is the 998th nanosecond within the current second of Beijing time. By parsing this field, the data recipient can obtain the nanosecond time in the current Beijing time.

[0081] The third field "00 00 00 1c" is the second time segment, indicating that the time when the time difference data was generated is the 28th second within the current day of Beijing time. By parsing this field, the data recipient can obtain the second time in the current Beijing time.

[0082] The fourth field "00 00 00 0d" is the day time segment, indicating that the time when the time difference data was generated is the 13th day within the current year of Beijing time. By parsing this field, the data recipient can obtain the day time in the current Beijing time.

[0083] The fifth field "00 00 00 14" is the year time segment, indicating that the time when the time difference data was generated is the 20th year in the 21st century of Beijing time. By parsing this field, the data recipient can obtain the year time in the current Beijing time.

[0084] The sixth to ninth fields represent the time difference period. By parsing this field, the data recipient can obtain the corresponding time difference information. Specifically, it includes:

[0085] The sixth field "00 00 03 e4" is the nanosecond time difference segment, indicating that the nanosecond time difference measured at the current time is 998 nanoseconds. By parsing this field, the data recipient can obtain the nanosecond time difference.

[0086] The seventh field "00 00 00 1c" is the second time difference segment, indicating that the second time difference measured at the current time is 28 seconds. By parsing this field, the data recipient can obtain the second time difference.

[0087] The eighth field "00 00 00 0d" is the day time difference segment, indicating that the day time difference measured at the current time is 13 days. By parsing this field, the data recipient can obtain the day time difference.

[0088] The ninth field "00 00 00 14" is the year time difference segment, indicating that the year time difference measured at the current time is 20 years. By parsing this field, the data recipient can obtain the year time difference.

[0089] Fourthly, an embodiment of the present application further discloses a device for sending time difference data in military standard time, which is applied to a data sender. The device includes a request receiving module and a data sending module connected to each other, where:

[0090] The request receiving module is used to receive a request for obtaining time difference data sent by the data receiver and establish a connection with the data receiver. Specifically, the request receiving module can pre-create a communication address family, determine a communication port number, create a socket using TCP communication, and bind the socket to the communication address family, and then monitor the socket information in real time, monitor the socket value, and check whether there is a socket accessed by a request sent by the data receiver. If so, access the socket to establish a connection with the data receiver.

[0091] The data sending module is used to send valid data to the data receiver. The valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference, and year time difference.

[0092] With the above technical solution, since the valid data sent by the data sending module includes nanosecond time difference, second time difference, day time difference, and year time difference, the data receiver only needs to parse the valid data to obtain time difference data including the corresponding nanosecond time difference, second time difference, day time difference, and year time difference, that is, directly obtain time difference data represented in the general time format of seconds, days, and years, without the need to design complex conversion algorithms, nor to consider issues such as leap years and leap seconds. To a certain extent, the parsing algorithm of the data receiver is simplified, which is beneficial to improving the data transmission efficiency.

[0093] The above are only the embodiments of the present application and are not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. Method for receiving time difference data in military standard time, characterized in that, it includes the following steps: Sending a request for obtaining time difference data to the data sender and establishing a connection with the data sender; Receiving the valid data sent by the data sender, where the valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference, and year time difference; Analyzing the valid data according to the time difference information to obtain time difference data represented in a general time format; The valid data further includes the time when the time difference information is generated; The step of analyzing the valid data according to the time difference information to obtain time difference data represented in a general time format includes: Analyzing the valid data according to the time difference information and the time when the time difference information is generated to obtain time difference data represented in a general time format.

2. The method for receiving time difference data in military standard time according to claim 1, characterized in that, the time when the time difference information is generated is recorded in the current Beijing time; The step of analyzing the valid data according to the time difference information and the time when the time difference information is generated to obtain time difference data represented in a general time format includes: Analyzing the valid data according to the time difference information and the current Beijing time when the time difference information is generated to obtain time difference data represented in a general time format.

3. The method for receiving time difference data in military standard time according to claim 1, characterized in that, the valid data further includes a time measurement mode; The step of analyzing the valid data according to the time difference information and the time when the time difference information is generated to obtain time difference data represented in a general time format includes: Analyzing the valid data according to the time difference information, the time measurement mode, and the time when the time difference information is generated to obtain time difference data represented in a general time format.

4. Method for sending time difference data in military standard time, characterized in that, it includes the following steps; Receiving a request for obtaining time difference data sent by the data receiver and establishing a connection with the data receiver; Sending valid data to the data receiver, where the valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference, and year time difference; The valid data further includes the time when the time difference information is generated.

5. The method for sending time difference data in military standard time according to claim 4, characterized in that, the valid data further includes a time measurement mode.

6. The method for sending time difference data in military standard time according to claim 4, characterized in that, the time when the time difference information is generated is recorded in the current Beijing time.

7. Device for receiving time difference data in military standard time, characterized in that, it includes: A request sending module, configured to send a request for obtaining time difference data to the data sender and establish a connection with the data sender; A data receiving module, configured to receive the valid data sent by the data sender, where the valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference, and year time difference; And a time difference data generation module, configured to parse the valid data according to the time difference information to obtain time difference data represented in a general time format; The valid data further includes the time when the time difference information is generated; The parsing the valid data according to the time difference information to obtain time difference data represented in a general time format includes: parsing the valid data according to the time difference information and the time when the time difference information is generated to obtain time difference data represented in a general time format.

8. A device for sending time difference data in military standard time Characterized in that It includes: A request receiving module, configured to receive a request for obtaining time difference data sent by a data recipient and establish a connection with the data recipient; And a data sending module, configured to send valid data to the data recipient, where the valid data includes time difference information, and the time difference information includes nanosecond time difference, second time difference, day time difference, and year time difference; The valid data further includes the time when the time difference information is generated.

Citation Information

Patent Citations

  • Time updating method and device, mobile terminal and storage medium

    CN107919933A