KR102388889B1 - Time synchronizing device, time synchronizing method, and time synchronizing program stored in recording medium - Google Patents

Time synchronizing device, time synchronizing method, and time synchronizing program stored in recording medium Download PDF

Info

Publication number
KR102388889B1
KR102388889B1 KR1020227001043A KR20227001043A KR102388889B1 KR 102388889 B1 KR102388889 B1 KR 102388889B1 KR 1020227001043 A KR1020227001043 A KR 1020227001043A KR 20227001043 A KR20227001043 A KR 20227001043A KR 102388889 B1 KR102388889 B1 KR 102388889B1
Authority
KR
South Korea
Prior art keywords
time
external
internal clock
conversion
unit
Prior art date
Application number
KR1020227001043A
Other languages
Korean (ko)
Other versions
KR20220011787A (en
Inventor
쥰 야부키
료 오카베
게이스케 호리이
마사카츠 도야마
츠요시 히구치
Original Assignee
미쓰비시덴키 가부시키가이샤
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 미쓰비시덴키 가부시키가이샤 filed Critical 미쓰비시덴키 가부시키가이샤
Publication of KR20220011787A publication Critical patent/KR20220011787A/en
Application granted granted Critical
Publication of KR102388889B1 publication Critical patent/KR102388889B1/en

Links

Images

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G7/00Synchronisation
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G5/00Setting, i.e. correcting or changing, the time-indication

Abstract

시각 동기 장치(10)에서는, 시각 취득부(21)는, 시각 전달 장치(50)로부터 외부 시계(51)의 시각인 외부 시각을 취득한다. 내부 시계 설정부(22)는, 시각 취득부(21)에 의해 취득된 외부 시각을 시각 변환 장치(40)에 송신한다. 시각 변환부(26)는, 외부 시각을 내부 시계(14)의 관리 범위 내의 시각인 고유 시각으로 변환한다. 내부 시계 설정부(22)는, 시각 변환부(26)에 의해 변환되어 얻어진 고유 시각을 내부 시계(14)에 설정한다.In the time synchronization device 10 , the time acquisition unit 21 acquires an external time that is the time of the external clock 51 from the time transmission device 50 . The internal clock setting unit 22 transmits the external time acquired by the time acquisition unit 21 to the time conversion device 40 . The time conversion unit 26 converts the external time into a unique time that is a time within the management range of the internal clock 14 . The internal clock setting unit 22 sets the unique time converted by the time converting unit 26 to the internal clock 14 .

Figure R1020227001043
Figure R1020227001043

Description

시각 동기 장치, 시각 동기 방법 및 기록 매체에 저장된 시각 동기 프로그램Time synchronizing device, time synchronizing method, and time synchronizing program stored in recording medium

본 발명은, 외부 시계로부터 취득된 외부 시각에 내부 시계를 동기시키는 기술에 관한 것이다.The present invention relates to a technique for synchronizing an internal clock with an external time acquired from an external clock.

외부 시계로부터 취득된 외부 시각에 의해 내부 시계를 갱신하는 것에 의해, 외부 시계에 내부 시계를 동기시키는 기술이 있다.There is a technique for synchronizing the internal clock with the external clock by updating the internal clock with the external time acquired from the external clock.

특허문헌 1에는, 외부 시계로부터 취득된 외부 시각과, 내부 시계의 시각의 비교 결과에 근거하여 시각을 수정하는 것이 기재되어 있다. 특허문헌 1에서는, 이것에 의해, 내부 시계의 신뢰성의 향상을 꾀하고 있다.Patent Document 1 describes correcting the time based on a comparison result between the external time acquired from the external clock and the time of the internal clock. In Patent Document 1, thereby, an attempt is made to improve the reliability of the internal clock.

[특허문헌 1] 일본특허공개 평성 제10-178666호 공보[Patent Document 1] Japanese Patent Laid-Open No. 10-178666

장치가 관리 가능한 시각의 범위인 관리 범위에 제한이 있는 경우가 있다. 구체적인 예로서는, 32비트판의 Linux(등록상표)에서는, 2038년을 맞이하면 시각 관리 변수가 오버플로우해 버려, 관리 범위 외로 된다. 이 32비트판의 Linux(등록상표)에 있어서 2038년을 맞이하면 시각 관리 변수가 오버플로우해 버리는 문제는 2038년 문제로 불린다.In some cases, there is a limit to the management range, which is the range of time that the device can manage. As a specific example, in the 32-bit version of Linux (registered trademark), when the year 2038 is reached, the time management variable overflows and falls outside the management range. In this 32-bit version of Linux (registered trademark), the problem that time management variables overflow when 2038 is reached is called the 2038 problem.

관리 범위에 제한이 있는 경우에, 단순하게 외부 시각에 의해 내부 시계를 갱신해 버리면, 내부 시계가 정확하게 갱신되지 않는 경우가 있다. 내부 시계가 정확하게 갱신되지 않으면, 장치가 정확한 동작을 계속할 수 없게 된다.If the management range is limited and the internal clock is simply updated by the external time, the internal clock may not be correctly updated. If the internal clock is not updated correctly, the device cannot continue to operate correctly.

본 발명은, 관리 범위에 제한이 있는 경우에도, 적절히 시각을 동기 가능하게 하는 것을 목적으로 한다.An object of the present invention is to appropriately synchronize time even when there is a limit to the management range.

본 발명에 따른 시각 동기 장치는,A time synchronization device according to the present invention,

외부 시계의 시각인 외부 시각을 취득하는 시각 취득부와,a time acquisition unit for acquiring an external time that is the time of an external clock;

상기 시각 취득부에 의해 취득된 상기 외부 시각을 시각 변환 장치로 송신하여, 상기 외부 시각을 내부 시계의 관리 범위 내의 시각인 고유 시각으로 변환시키고, 상기 고유 시각을 상기 내부 시계에 설정하는 내부 시계 설정부Internal clock setting for transmitting the external time acquired by the time acquisition unit to a time conversion device, converting the external time into a unique time that is a time within a management range of the internal clock, and setting the unique time to the internal clock wealth

를 구비한다.to provide

본 발명에서는, 외부 시각을 내부 시계의 관리 범위 내의 시각인 고유 시각으로 변환시킨 후에, 내부 시계에 설정한다. 이것에 의해, 내부 시계에 관리 범위외의 시각이 설정되는 일이 없고, 적절히 시각을 동기 가능하게 된다.In the present invention, after converting the external time into a unique time that is a time within the management range of the internal clock, it is set in the internal clock. Thereby, the time outside the management range is not set in the internal clock, and the time can be appropriately synchronized.

도 1은 실시의 형태 1에 따른 시각 동기 장치(10)의 하드웨어 구성도.
도 2는 실시의 형태 1에 따른 시각 동기 장치(10)의 기능 구성도.
도 3은 실시의 형태 1에 따른 시각 동기 장치(10)의 변형예에 대한 기능 구성도.
도 4는 실시의 형태 1에 따른 시각 동기 장치(10)가 내부 시계(14)의 시각을 외부 시계(51)의 시각과 동기시키는 처리의 흐름도.
도 5는 실시의 형태 1에 따른 시각 변환 처리의 흐름도.
도 6은 실시의 형태 1에 따른 시각 동기 장치(10)가 내부 시계(14)의 시각을 사용하는 처리의 흐름도.
도 7은 실시의 형태 1에 따른 시각 역변환 처리의 흐름도.
도 8은 실시의 형태 1에 따른 시각 동기 장치(10)의 효과의 설명도.
도 9는 실시의 형태 2에 따른 시각 변환 처리의 흐름도.
도 10은 실시의 형태 2에 따른 시각 동기 장치(10)가 내부 시계(14)의 시각을 NTP 서버의 외부 NTP 시각과 동기시키는 처리의 설명도.
도 11은 실시의 형태 2에 따른 변환 시간의 설정 방법의 설명도.
도 12는 NTP(Network Time Protocol) 시각 및 UN 시각의 설명도.
도 13은 실시의 형태 2에 따른 시각 역변환 처리의 흐름도.
도 14는 실시의 형태 2에 따른 시각 동기 장치(10)의 효과의 설명도.
도 15는 실시의 형태 3에 따른 시각 동기 장치(10)가 내부 시계(14)의 시각을 PTP(Precision Time Protocol) 마스터의 외부 PTP 시각과 동기시키는 처리의 흐름도.
도 16은 실시의 형태 3에 따른 시각 동기 장치(10)가 내부 시계(14)의 시각을 PTP 마스터의 외부 PTP 시각과 동기시키는 처리의 설명도.
도 17은 실시의 형태 3에 따른 시각 변환 처리의 흐름도.
도 18은 NTP 시각과 UN 시각과 PTP 시각의 설명도.
1 is a hardware configuration diagram of a time synchronization device 10 according to a first embodiment.
Fig. 2 is a functional configuration diagram of a time synchronization device 10 according to the first embodiment.
Fig. 3 is a functional configuration diagram of a modified example of the time synchronization device 10 according to the first embodiment.
Fig. 4 is a flowchart of a process in which the time synchronization device 10 according to the first embodiment synchronizes the time of the internal clock 14 with the time of the external clock 51;
Fig. 5 is a flowchart of time conversion processing according to the first embodiment;
Fig. 6 is a flowchart of a process in which the time synchronization device 10 according to the first embodiment uses the time of the internal clock 14;
Fig. 7 is a flowchart of inverse time transformation processing according to the first embodiment;
Fig. 8 is an explanatory view of the effect of the time synchronization device 10 according to the first embodiment;
Fig. 9 is a flowchart of time conversion processing according to the second embodiment;
Fig. 10 is an explanatory diagram of a process in which the time synchronizer 10 according to the second embodiment synchronizes the time of the internal clock 14 with the external NTP time of an NTP server;
Fig. 11 is an explanatory diagram of a method for setting a conversion time according to the second embodiment;
12 is an explanatory diagram of NTP (Network Time Protocol) time and UN time.
Fig. 13 is a flowchart of inverse time transformation processing according to the second embodiment;
Fig. 14 is an explanatory view of the effect of the time synchronization device 10 according to the second embodiment;
Fig. 15 is a flowchart of a process in which the time synchronizer 10 according to the third embodiment synchronizes the time of the internal clock 14 with the external PTP time of a PTP (Precision Time Protocol) master.
Fig. 16 is an explanatory diagram of a process in which the time synchronizer 10 according to the third embodiment synchronizes the time of the internal clock 14 with the external PTP time of the PTP master;
Fig. 17 is a flowchart of time conversion processing according to the third embodiment;
18 is an explanatory diagram of NTP time, UN time, and PTP time.

(실시의 형태 1)(Embodiment 1)

***구성의 설명******Description of configuration***

도 1을 참조하여, 실시의 형태 1에 따른 시각 동기 장치(10)의 하드웨어 구성을 설명한다.With reference to FIG. 1, the hardware structure of the time synchronization apparatus 10 which concerns on Embodiment 1 is demonstrated.

시각 동기 장치(10)는, 시각 전달 장치(50)로부터 시각 정보를 취득하고, 시각 동기를 행하는 장치이다. 시각 동기 장치(10)는, 클럭 발신기(11)와, 프로세서(12)와, NIC(13)(Network Interface Card)와, 내부 시계(14)와, 메인 메모리(15)와, 주변 장치(16)의 하드웨어를 구비한다. 프로세서(12)는, 다른 하드웨어와 신호선(17)을 거쳐 접속되어 있다.The time synchronization device 10 is a device that acquires time information from the time transmission device 50 and performs time synchronization. The time synchronization device 10 includes a clock generator 11 , a processor 12 , a NIC 13 (Network Interface Card), an internal clock 14 , a main memory 15 , and a peripheral device 16 . ) of the hardware. The processor 12 is connected to other hardware via a signal line 17 .

클럭 발신기(11)는, 프로세서(12)에 동작 클럭을 공급하는 소자 또는 장치이다. 프로세서(12)는, 시각 동기 등의 소프트웨어의 처리를 행하는 소자 또는 장치이다. NIC(13)는, 시각 전달 장치(50)라는 외부의 장치와 패킷의 송수신을 행하는 소자 또는 장치이다. 내부 시계(14)는, 시각 동기 장치(10)에 있어서의 내부 시각을 유지하는 소자 또는 장치이다. 메인 메모리(15)는, 소프트웨어의 처리에 필요한 명령 및 데이터를 유지하는 소자 또는 장치이다. 주변 장치(16)는, 시각 동기 장치(10)의 입출력을 행하는 소자 또는 장치이다.The clock generator 11 is an element or device that supplies an operating clock to the processor 12 . The processor 12 is an element or device that performs software processing such as time synchronization. The NIC 13 is an element or device that transmits/receives packets to and from an external device called the time transmission device 50 . The internal clock 14 is an element or device for maintaining the internal time in the time synchronization device 10 . The main memory 15 is an element or device for holding instructions and data necessary for software processing. The peripheral device 16 is an element or device that performs input/output of the time synchronization device 10 .

시각 전달 장치(50)는, 외부 시계(51)를 구비하고, 전송로(61)를 거쳐 접속된 장치로부터의 요구에 따라, 외부 시계(51)의 시각인 외부 시각을 전달하는 장치이다. 외부 시계(51)는, 정확한 시간을 항상 유지하고 있는 소자 또는 장치이다.The time transmitting device 50 is a device that includes an external clock 51 and transmits an external time that is the time of the external clock 51 in response to a request from a device connected via the transmission path 61 . The external clock 51 is an element or device that always keeps accurate time.

도 2를 참조하여, 실시의 형태 1에 따른 시각 동기 장치(10)의 기능 구성을 설명한다.With reference to FIG. 2, the functional structure of the time synchronization apparatus 10 which concerns on Embodiment 1 is demonstrated.

시각 동기 장치(10)는, 기능 구성 요소로서, 시각 취득부(21)와, 내부 시계 설정부(22)와, 시각 관리부(23)와, 내부 시계 참조부(24)와, 시각 사용부(25)와, 시각 변환부(26)와, 시각 역변환부(27)를 구비한다. 내부 시계 설정부(22)는, 변환 후 취득부(221)를 구비한다. 또, 내부 시계 참조부(24)는, 역변환 후 취득부(241)를 구비한다.The time synchronizer 10 includes, as functional components, a time acquisition unit 21 , an internal clock setting unit 22 , a time management unit 23 , an internal clock reference unit 24 , and a time use unit ( 25 ), a time conversion unit 26 , and an inverse time conversion unit 27 . The internal clock setting unit 22 includes a post-conversion acquisition unit 221 . In addition, the internal clock reference unit 24 includes an inverse-transformed acquisition unit 241 .

각 기능 구성 요소의 기능은, 소프트웨어에 의해 실현된다. 구체적으로는, 각 기능 구성 요소의 기능을 실현하는 프로그램이 프로세서(12)에 의해 메인 메모리(15)에 판독되고, 프로세서(12)에 의해 실행된다. 이것에 의해, 각 기능 구성 요소의 기능이 실현된다. 또, 각 기능 구성 요소의 기능을 실현하는 프로그램은, HDD(Hard Disk Drive)라는 기억 매체에 기억되고 있고, 주변 장치(16)를 거쳐 판독된다.The function of each functional component is realized by software. Specifically, a program for realizing the function of each functional component is read into the main memory 15 by the processor 12 and executed by the processor 12 . Thereby, the function of each functional component is realized. Moreover, the program which implement|achieves the function of each functional element is memorize|stored in the storage medium called HDD (Hard Disk Drive), and is read through the peripheral device 16. As shown in FIG.

시각 변환부(26)와 시각 역변환부(27)는, 시각 변환 장치(40)의 기능 구성 요소이다. 도 2에서는, 시각 동기 장치(10)가 시각 변환 장치(40)를 구비하는 구성으로 되어 있다. 그러나, 도 3에 나타내는 바와 같이, 시각 변환 장치(40)는, 시각 동기 장치(10)와 다른 장치로서 구성되어도 좋다. 이 경우에는, 시각 동기 장치(10)와 시각 변환 장치(40)는 전송로(62)를 거쳐 접속된다.The time conversion unit 26 and the time inverse conversion unit 27 are functional components of the time conversion device 40 . In FIG. 2 , the time synchronization device 10 is configured to include the time conversion device 40 . However, as shown in FIG. 3 , the time conversion device 40 may be configured as a different device from the time synchronization device 10 . In this case, the time synchronization device 10 and the time conversion device 40 are connected via a transmission path 62 .

시각 취득부(21)는, 시각 전달 장치(50)로부터 외부 시계(51)의 외부 시각을 취득하는 기능이다. 내부 시계 설정부(22)는, 시각 취득부(21)에 의해 취득된 외부 시각이 시각 변환부(26)에 의해 변환되어 얻어진 고유 시각을 내부 시계(14)에 설정하는 기능이다. 변환 후 취득부(221)는, 내부 시계 설정부(22)와 시각 변환부(26)의 사이에서 시각을 전달하는 기능이다. 시각 관리부(23)는, 내부 시계(14)를 관리하는 기능이다.The time acquisition unit 21 is a function of acquiring the external time of the external clock 51 from the time transmission device 50 . The internal clock setting unit 22 is a function of setting the unique time obtained by converting the external time acquired by the time acquiring unit 21 by the time converting unit 26 to the internal clock 14 . The post-conversion acquisition unit 221 is a function of transmitting the time between the internal clock setting unit 22 and the time conversion unit 26 . The time management unit 23 is a function of managing the internal clock 14 .

내부 시계 참조부(24)는, 내부 시계(14)를 참조하여, 내부 시계가 나타내는 시각인 내부 시각이 시각 역변환부(27)에 의해 변환되어 얻어진 참조 시각을 취득하는 기능이다. 역변환 후 취득부(241)는, 내부 시계 참조부(24)와 시각 역변환부(27) 사이에서 시각을 전달하는 기능이다. 시각 사용부(25)는, 내부 시계 참조부(24)에 의해 취득된 참조 시각을 사용하는 기능이다.The internal clock reference unit 24 is a function of obtaining a reference time obtained by referring to the internal clock 14 and converting the internal time, which is the time indicated by the internal clock, by the time inverse transformation unit 27 . The post-inverse transformation acquisition unit 241 is a function of transferring time between the internal clock reference unit 24 and the time inverse transformation unit 27 . The time use unit 25 is a function of using the reference time acquired by the internal clock reference unit 24 .

시각 변환부(26)는, 시각을 변환 시간만큼 비키어놓는 변환을 행하는 기능이다. 시각 역변환부(27)는, 시각 변환부(26)와는 역방향으로, 시각을 변환 시간만큼 비키어놓는 역변환을 행하는 기능이다.The time conversion unit 26 is a function of performing conversion by shifting the time by the conversion time. The time inverse transformation unit 27 is a function of performing inverse transformation by shifting the time by the transformation time in the opposite direction to the time transformation unit 26 .

***동작의 설명******Description of action***

도 4부터 도 7을 참조하여, 실시의 형태 1에 따른 시각 동기 장치(10)의 동작을 설명한다.The operation of the time synchronization device 10 according to the first embodiment will be described with reference to FIGS. 4 to 7 .

실시의 형태 1에 따른 시각 동기 장치(10)의 동작 순서는, 실시의 형태 1에 따른 시각 동기 방법에 상당한다. 또, 실시의 형태 1에 따른 시각 동기 장치(10)의 동작을 실현하는 프로그램은, 실시의 형태 1에 따른 시각 동기 프로그램에 상당한다.The operation procedure of the time synchronization device 10 according to the first embodiment corresponds to the time synchronization method according to the first embodiment. In addition, the program which implements the operation|movement of the time synchronization apparatus 10 concerning Embodiment 1 corresponds to the time synchronization program concerning Embodiment 1. As shown in FIG.

도 4를 참조하여, 실시의 형태 1에 따른 시각 동기 장치(10)가 내부 시계(14)의 시각을 외부 시계(51)의 시각과 동기시키는 처리를 설명한다.With reference to FIG. 4 , the processing in which the time synchronization device 10 according to the first embodiment synchronizes the time of the internal clock 14 with the time of the external clock 51 will be described.

(단계 S11:시각 취득 처리)(Step S11: Time acquisition processing)

시각 취득부(21)는, NIC(13)를 거쳐, 시각 전달 장치(50)로부터 외부 시계(51)의 외부 시각을 취득한다. 시각 취득부(21)는, 취득된 외부 시각을 메인 메모리(15)에 기입한다.The time acquisition unit 21 acquires the external time of the external clock 51 from the time transmission device 50 via the NIC 13 . The time acquisition unit 21 writes the acquired external time into the main memory 15 .

(단계 S12:시각 변환 처리)(Step S12: Time conversion processing)

내부 시계 설정부(22)는, 변환 후 취득부(221)를 거쳐, 단계 S11에서 취득된 외부 시각을 시각 변환부(26)에 송신하여, 외부 시각을 내부 시계(14)의 관리 범위 내의 시각인 고유 시각으로 변환시킨다.The internal clock setting unit 22 transmits the external time acquired in step S11 to the time converting unit 26 via the post-conversion acquisition unit 221 , and transmits the external time to a time within the management range of the internal clock 14 . converted to a unique time of day.

(단계 S13:내부 시계 설정 처리)(Step S13: Internal clock setting processing)

내부 시계 설정부(22)는, 단계 S12에서 변환되어 얻어진 고유 시각을 시각 관리부(23)에 전달하는 것으로, 고유 시각을 내부 시계(14)에 설정한다.The internal clock setting unit 22 transmits the unique time converted in step S12 to the time management unit 23 to set the unique time in the internal clock 14 .

일정 시간 경과 후에, 처리가 다시 단계 S11에 되돌려진다. 이것에 의해, 일정 시간 경과 후에 다시 내부 시계(14)의 시각이 외부 시계(51)의 시각과 동기 된다.After a certain period of time has elapsed, the process returns to step S11 again. Thereby, the time of the internal clock 14 is synchronized with the time of the external clock 51 again after a certain period of time has elapsed.

도 5를 참조하여, 실시의 형태 1에 따른 시각 변환 처리(도 4의 단계 S12)를 설명한다.With reference to FIG. 5, the time conversion process (step S12 of FIG. 4) according to Embodiment 1 is demonstrated.

(단계 S21:시각 송신 처리)(Step S21: Time transmission processing)

내부 시계 설정부(22)는, 단계 S11에서 취득된 외부 시각을 메인 메모리(15)로부터 판독한다. 내부 시계 설정부(22)는, 변환 후 취득부(221)를 거쳐, 외부 시각을 시각 변환부(26)에 송신한다. 시각 변환부(26)는, 송신된 외부 시각을 취득한다.The internal clock setting unit 22 reads the external time acquired in step S11 from the main memory 15 . The internal clock setting unit 22 transmits the external time to the time converting unit 26 via the post-conversion acquisition unit 221 . The time conversion unit 26 acquires the transmitted external time.

(단계 S22:변환 처리)(Step S22: Conversion processing)

시각 변환부(26)는, 단계 S21에서 취득된 외부 시각에, 변환 시간을 가산하는 것에 의해, 외부 시각을 고유 시각으로 변환한다. 변환 시간은, 시각을 미래로 진행하는 경우는 양의 시간이며, 시각을 과거로 되돌리는 경우는 음의 시간이다.The time conversion unit 26 converts the external time into an intrinsic time by adding the conversion time to the external time acquired in step S21. The conversion time is positive time when the time advances to the future, and negative time when the time returns to the past.

(단계 S23:시각 반환 처리)(Step S23: Time return processing)

시각 변환부(26)는, 단계 S22에서 변환되어 얻어진 고유 시각을 변환 후 취득부(221)에 송신한다. 내부 시계 설정부(22)는, 변환 후 취득부(221)를 거쳐, 송신된 고유 시각을 취득한다.The time conversion unit 26 transmits the unique time converted in step S22 to the post-conversion acquisition unit 221 . The internal clock setting unit 22 acquires the transmitted unique time through the post-conversion acquisition unit 221 .

도 6을 참조하여, 실시의 형태 1에 따른 시각 동기 장치(10)가 내부 시계(14)의 시각을 사용하는 처리를 설명한다.Referring to FIG. 6 , processing in which the time synchronization device 10 according to the first embodiment uses the time of the internal clock 14 will be described.

(단계 S31:시각 판독 처리)(Step S31: Time reading processing)

내부 시계 참조부(24)는, 시각 관리부(23)에 요구하는 것에 의해, 내부 시계(14)가 나타내는 시각인 내부 시각을 판독한다. 내부 시계 참조부(24)는, 판독된 내부 시각을 메인 메모리(15)에 기입한다.The internal clock reference unit 24 reads the internal time that is the time indicated by the internal clock 14 in response to a request from the time management unit 23 . The internal clock reference unit 24 writes the read internal time into the main memory 15 .

(단계 S32:시각 역변환 처리)(Step S32: Time inverse transformation processing)

내부 시계 참조부(24)는, 역변환 후 취득부(241)를 거쳐, 단계 S31에서 판독된 내부 시각을 시각 역변환부(27)에 송신하여, 외부 시각을 고유 시각으로 변환한 처리의 역의 처리를 행하는 것에 의해, 내부 시각을 참조 시각으로 변환시킨다.The internal clock reference unit 24 transmits the internal time read in step S31 to the time inverse transformation unit 27 via the inverse-transformed acquiring unit 241, and is a reverse process of the processing in which the external time is converted into the intrinsic time. By performing , the internal time is converted into a reference time.

(단계 S33:시각 사용 처리)(Step S33: time use processing)

시각 사용부(25)는, 단계 S32에서 변환되어 얻어진 참조 시각을 이용하여 처리를 행한다. 이것에 의해, 시각 사용부(25)는, 내부 시계(14)가 가리키는 내부 시각이 아니라, 내부 시각이 변환되어 얻어진 참조 시각을 이용하여 처리를 행하는 것이 된다.The time use unit 25 performs processing using the reference time converted in step S32 and obtained. Thereby, the time use unit 25 performs processing using the reference time obtained by converting the internal time, not the internal time indicated by the internal clock 14 .

도 7을 참조하여, 실시의 형태 1에 따른 시각 역변환 처리(도 6의 단계 S32)를 설명한다.With reference to FIG. 7, the time inverse transform process (step S32 of FIG. 6) according to Embodiment 1 is demonstrated.

(단계 S41:시각 송신 처리)(Step S41: Time transmission processing)

내부 시계 참조부(24)는, 단계 S31에서 판독된 내부 시각을 메인 메모리(15)로부터 판독한다. 내부 시계 참조부(24)는, 역변환 후 취득부(241)를 거쳐, 내부 시각을 시각 역변환부(27)에 송신한다. 시각 역변환부(27)는, 송신된 내부 시각을 취득한다.The internal clock reference unit 24 reads the internal time read in step S31 from the main memory 15 . The internal clock reference unit 24 transmits the internal time to the time inverse transformation unit 27 via the acquisition unit 241 after the inverse transformation. The time inverse transform unit 27 acquires the transmitted internal time.

(단계 S42:역변환 처리)(Step S42: Inverse transform processing)

시각 역변환부(27)는, 단계 S41에서 취득된 내부 시각에서, 변환 시간을 감산하는 것에 의해, 내부 시각을 참조 시각으로 변환한다.The time inverse transform unit 27 converts the internal time into a reference time by subtracting the conversion time from the internal time acquired in step S41.

(단계 S43:시각 반환 처리)(Step S43: Time return processing)

시각 역변환부(27)는, 단계 S42에서 변환되어 얻어진 참조 시각을 역변환 후 취득부(241)에 송신한다. 내부 시계 참조부(24)는, 역변환 후 취득부(241)를 거쳐, 송신된 참조 시각을 취득한다.The time inverse transform unit 27 transmits the reference time obtained by transforming in step S42 to the post-inverse transform acquisition unit 241 . The internal clock reference unit 24 acquires the transmitted reference time through the acquisition unit 241 after the inverse transformation.

***실시의 형태 1의 효과******Effect of Embodiment 1 ***

이상과 같이, 실시의 형태 1에 따른 시각 동기 장치(10)는, 외부 시각을 내부 시계의 관리 범위 내의 시각인 고유 시각으로 변환시킨 후에, 내부 시계(14)에 설정한다. 이것에 의해, 내부 시계에 관리 범위 외의 시각이 설정되는 일이 없고, 적절히 시각을 동기 가능하게 된다.As described above, the time synchronization device 10 according to the first embodiment converts the external time into a unique time that is a time within the management range of the internal clock, and then sets it in the internal clock 14 . Thereby, the time outside the management range is not set in the internal clock, and the time can be appropriately synchronized.

또, 실시의 형태 1에 따른 시각 동기 장치(10)는, 내부 시계(14)가 나타내는 시각인 내부 시각을, 외부 시각을 고유 시각으로 변환한 처리의 역의 처리를 행하는 것에 의해, 참조 시각으로 변환한 후에 사용한다. 이것에 의해, 외부 시각과 동기한 시각을 이용하여 처리를 행하는 일이 생긴다.In addition, the time synchronization device 10 according to the first embodiment converts the internal time, which is the time indicated by the internal clock 14, into the reference time by performing the reverse process of the process of converting the external time into a unique time. Use after conversion. Thereby, processing may be performed using the time synchronized with the external time.

도 8을 참조하여, 실시의 형태 1에 따른 시각 동기 장치(10)의 효과를 설명한다.With reference to FIG. 8, the effect of the time synchronization apparatus 10 which concerns on Embodiment 1 is demonstrated.

도 8에서는, 시각 동기 장치(10)가 외부 시계(51)와 시각 동기를 행하고 있는 경우에 있어서의, 외부 시계(51)의 외부 시각과 내부 시계(14)의 내부 시각의 관계가 나타나고 있다. 도 8에서는, 내부 시각이 외부 시각으로부터 변환 시간만큼 과거로 되도록 변환이 행해져 있다. 그리고, 내부 시계(14)는, 외부 시계(51)에 동기하면서, 외부 시계(51)의 외부 시각과 일정 시간(변환 시간)의 간격을 유지하면서 동작한다.In FIG. 8 , the relationship between the external time of the external clock 51 and the internal time of the internal clock 14 in the case where the time synchronization device 10 performs time synchronization with the external clock 51 is shown. In Fig. 8, the conversion is performed so that the internal time becomes past by the conversion time from the external time. Then, the internal clock 14 operates while synchronizing with the external clock 51 and maintaining an interval between the external time of the external clock 51 and a predetermined time (conversion time).

이것에 의해, 시각 동기 장치(10)가 관리 가능한 시각에 제약이 있는 경우에도, 시각을 시각 동기 장치(10)가 관리 가능한 범위로 설정할 수 있고, 장치가 정확한 동작을 계속할 수 있다.Thereby, even when there is a restriction on the time manageable by the time synchronizing device 10, the time can be set in a range manageable by the time synchronizing device 10, and the apparatus can continue the correct operation.

***다른 구성******OTHER CONFIGURATIONS***

<변형예 1><Modification 1>

실시의 형태 1에서는, 각 기능 구성 요소가 소프트웨어로 실현되었다. 그러나, 변형예 1로서, 각 기능 구성 요소는 하드웨어로 실현되어도 좋다. 이 변형예 1에 대해, 실시의 형태 1과 다른 점을 설명한다.In the first embodiment, each functional component is realized by software. However, as Modification Example 1, each functional component may be realized by hardware. About this modification 1, the point different from Embodiment 1 is demonstrated.

각 기능 구성 요소가 하드웨어로 실현되는 경우에는, 시각 동기 장치(10)는, 프로세서(12)와 메인 메모리(15)를 대신하여, 전자 회로를 구비한다. 전자 회로는, 각 기능 구성 요소와, 메인 메모리(15)의 기능을 실현하는 전용 회로이다.When each functional component is realized by hardware, the time synchronization device 10 includes an electronic circuit instead of the processor 12 and the main memory 15 . The electronic circuit is a dedicated circuit for realizing each functional component and the function of the main memory 15 .

전자 회로로서는, 단일 회로, 복합 회로, 프로그램화한 프로세서, 병렬 프로그램화한 프로세서, 논리 IC, GA(Gate Array), ASIC(Application Specific Integrated Circuit), FPGA(Field-Programmable Gate Array)가 상정된다.As the electronic circuit, single circuit, complex circuit, programmed processor, parallel programmed processor, logic IC, GA (Gate Array), ASIC (Application Specific Integrated Circuit), and FPGA (Field-Programmable Gate Array) are assumed.

각 기능 구성 요소를 1개의 전자 회로로 실현되어도 좋고, 각 기능 구성 요소를 복수의 전자 회로에 분산시켜 실현되어도 좋다.Each functional component may be realized by one electronic circuit, or each functional component may be realized by dispersing it in a plurality of electronic circuits.

<변형예 2><Modification 2>

변형예 2로서, 일부의 각 기능 구성 요소가 하드웨어로 실현되고, 다른 각 기능 구성 요소가 소프트웨어로 실현되어도 좋다.As the second modification, some of each functional component may be realized by hardware, and each other functional component may be realized by software.

(실시의 형태 2)(Embodiment 2)

실시의 형태 2에서는, 실시의 형태 1에서 설명한 시각 동기 장치(10)의 동작의 구체적인 예를 설명한다. 실시의 형태 2에서는, 시각 동기 장치(10)가 관리 가능한 시각의 범위인 관리 범위에 제한이 있는 경우의 예로서, 2038년 문제를 이용한다.In the second embodiment, a specific example of the operation of the time synchronization device 10 described in the first embodiment will be described. In the second embodiment, the 2038 year problem is used as an example of a case where the management range that is the range of the time that the time synchronization device 10 can manage is limited.

2038년 문제는, 32비트판의 Linux(등록상표)에 있어서 2038년을 맞이하면 시각 관리 변수가 오버플로우해 버리는 문제이다. Linux(등록상표)는, UNIX(등록상표) 시각을 시스템 내부 시계에 가지는 것으로 시각을 관리하고 있다. 이하, UNIX(등록상표) 시각을 UN 시각이라고 부른다. UN 시각은, 1970년 1월 1일 오전 0시를 기준년으로 하고, 기준년으로부터의 경과 초수로 표현되는 시각이다. 시스템 내부 시계는 부호 첨부 정수형으로 정의되어 있기 때문에, 32비트판의 Linux(등록상표)의 경우는 2038년 1월 19일 3시 14분 7초를 지나면 시각 관리 변수가 오버플로우해 버린다.The 2038 problem is a problem in which the time management variable overflows when the year 2038 is reached in Linux (registered trademark) of the 32-bit version. Linux (registered trademark) manages the time by having UNIX (registered trademark) time in the system internal clock. Hereinafter, the UNIX (registered trademark) time is referred to as the UN time. The UN time is the time expressed in the number of seconds elapsed from the base year with 0 am on January 1, 1970 as the base year. Since the system internal clock is defined as a signed integer type, in the case of a 32-bit version of Linux (registered trademark), the time management variable overflows after 3:14:07 on January 19, 2038.

***구성의 설명******Description of configuration***

시각 동기 장치(10)의 하드웨어 구성은, 도 1에 나타내는 실시의 형태 1에 따른 시각 동기 장치(10)의 하드웨어 구성과 동일하다.The hardware configuration of the time synchronization device 10 is the same as the hardware configuration of the time synchronization device 10 according to the first embodiment shown in FIG. 1 .

여기에서는, 프로세서(12)는, 32 비트의 프로세서이다. 또, 시각 전달 장치(50)는, NTP(Network Time Protocol) 서버, 또는, GPS(Global Positioning System) 위성이라고 한, Linux(등록상표) 시스템이 수신 가능한 시각 정보를 전달하는 장치이다. 실시의 형태 2에서는, 시각 전달 장치(50)는, NTP 서버로서 설명한다.Here, the processor 12 is a 32-bit processor. In addition, the time transmitting device 50 is a device that transmits time information that can be received by a Linux (registered trademark) system such as an NTP (Network Time Protocol) server or a GPS (Global Positioning System) satellite. In the second embodiment, the time transmission device 50 is described as an NTP server.

시각 동기 장치(10)의 기능 구성은, 도 2에 나타내는 실시의 형태 1에 따른 시각 동기 장치(10)의 기능 구성과 동일하다.The functional configuration of the time synchronization device 10 is the same as that of the time synchronization device 10 according to the first embodiment shown in FIG. 2 .

여기에서는, 시각 취득부(21)와 내부 시계 설정부(22)와 시각 변환부(26)는, NTP 클라이언트에 의해 실현된다. 시각 관리부(23)는, Linux(등록상표)의 커널에 의해 실현된다. 내부 시계 설정부(22)는, NTP 서버로부터 취득된 외부 시각인 NTP 시각을 고유 시각으로 변환한 다음, UN 시각을 계산하여, 내부 시계(14)에 설정한다.Here, the time acquisition unit 21, the internal clock setting unit 22, and the time conversion unit 26 are realized by an NTP client. The time management unit 23 is realized by a Linux (registered trademark) kernel. The internal clock setting unit 22 converts the NTP time, which is the external time obtained from the NTP server, into a unique time, then calculates the UN time, and sets it in the internal clock 14 .

***동작의 설명******Description of action***

도 9부터 도 13을 참조하여, 실시의 형태 2에 따른 시각 동기 장치(10)의 동작을 설명한다.The operation of the time synchronization device 10 according to the second embodiment will be described with reference to FIGS. 9 to 13 .

실시의 형태 2에 따른 시각 동기 장치(10)의 동작 순서는, 실시의 형태 2에 따른 시각 동기 방법에 상당한다. 또, 실시의 형태 2에 따른 시각 동기 장치(10)의 동작을 실현하는 프로그램은, 실시의 형태 2에 따른 시각 동기 프로그램에 상당한다.The operation procedure of the time synchronization device 10 according to the second embodiment corresponds to the time synchronization method according to the second embodiment. In addition, the program for realizing the operation|movement of the time synchronization apparatus 10 concerning Embodiment 2 corresponds to the time synchronization program concerning Embodiment 2. FIG.

실시의 형태 2에 있어서의 이하의 설명에서는, NTP 서버로부터 취득되는 외부 시각을 외부 NTP 시각이라고 부른다. 외부 NTP 시각이 변환된 고유 시각을 고유 NTP 시각이라고 부른다. 외부 NTP 시각이 변환된 UN 시각을 외부 UN 시각이라고 부른다. 고유 NTP 시각이 변환된 UN 시각을 고유 UN 시각이라고 부른다.In the following description in Embodiment 2, the external time acquired from the NTP server is called an external NTP time. The native time converted from the external NTP time is called the native NTP time. The UN time converted from the external NTP time is called the external UN time. The UN time converted from the native NTP time is called the native UN time.

도 9 및 도 10을 참조하여, 실시의 형태 2에 따른 시각 변환 처리(도 4의 단계 S12)를 설명한다.Time conversion processing (step S12 in FIG. 4 ) according to the second embodiment will be described with reference to FIGS. 9 and 10 .

(단계 S51:시각 송신 처리)(Step S51: Time transmission processing)

내부 시계 설정부(22)는, 단계 S11에서 취득된 외부 시각인 외부 NTP 시각을 메인 메모리(15)로부터 판독한다. 내부 시계 설정부(22)는, 변환 후 취득부(221)를 거쳐, 외부 NTP 시각을 시각 변환부(26)에 송신한다. 시각 변환부(26)는, 송신된 외부 NTP 시각을 취득한다.The internal clock setting unit 22 reads the external NTP time, which is the external time acquired in step S11 , from the main memory 15 . The internal clock setting unit 22 transmits the external NTP time to the time converting unit 26 via the post-conversion acquisition unit 221 . The time conversion unit 26 acquires the transmitted external NTP time.

(단계 S52:고유 변환 처리)(Step S52: Unique conversion processing)

시각 변환부(26)는, 단계 S51에서 취득된 외부 NTP 시각에, 변환 시간을 가산하는 것에 의해, 외부 NTP 시각을 고유 NTP 시각으로 변환한다. 구체적으로는, 시각 변환부(26)는, 변환 시간을 가산하는 것에 의해, 외부 NTP 시각을 내부 시계(14)의 관리 범위 내의 시각인 고유 NTP 시각으로 변환한다.The time conversion unit 26 converts the external NTP time into the intrinsic NTP time by adding the conversion time to the external NTP time acquired in step S51. Specifically, the time conversion unit 26 converts the external NTP time into a unique NTP time that is a time within the management range of the internal clock 14 by adding the conversion time.

이 때, 시각 변환부(26)는, 고유 NTP 시각이 관리 범위 내의 가능한 한 빠른 시각으로 되도록 변환 시간을 설정한다. 이것에 의해, 변환 시간을 변경하는 일 없이, 관리 범위 내에서 시각을 관리할 수 있는 기간을 길게 하는 것이 가능하게 된다. 여기에서는, 시각 변환부(26)는, 고유 NTP 시각이 UN 시각의 기준년인 1970년 1월 1일 오전 0시에 가능한 한 가까운 시각이 되도록, 변환 시간을 설정한다.At this time, the time conversion unit 26 sets the conversion time so that the intrinsic NTP time becomes the earliest possible time within the management range. Thereby, without changing the conversion time, it becomes possible to lengthen the period during which the time can be managed within the management range. Here, the time conversion unit 26 sets the conversion time so that the intrinsic NTP time becomes the time as close as possible to 0 am on January 1, 1970, which is the base year of the UN time.

또, 이 때, 시각 변환부(26)는, 외부 시각의 시각계에 의하지 않는 정기적인 시각의 변동인 정기 변동의 횟수가 동일해지도록 변환 시간을 설정한다. 여기에서는, 정기 변동은, 윤년이다. 윤년은, 원칙으로서 4년에 1번 돌아온다. 따라서, 도 11에 나타내는 바와 같이, 시각 변환부(26)는, 4년 및 40년이라는 4의 배수의 연수를 변환 시간으로 설정한다. 예를 들면, 변환 시간이 -40년인 경우에는, 변환 시간은, -40년(UTC) = -(60초×60분×24시간×(365일×30년+366일×10년)) = -1,262,304,000초로 된다. 이것에 의해, 변환 시간을 그때마다 다시 계산할 필요가 없어진다. 한편, 변환 시간을 2년이라고 하는 시간으로 해 버리면, 윤년을 포함하는 경우와 포함하지 않는 경우가 발생하여, 외부 NTP 시각에 따라 변환 시간을 다시 계산해야 한다.In addition, at this time, the time conversion unit 26 sets the conversion time so that the number of periodic fluctuations that are periodic fluctuations of the time that is not caused by the external time system becomes the same. Here, the periodic variation is a leap year. Leap years, as a rule, come back once every four years. Therefore, as shown in FIG. 11, the time conversion part 26 sets the number of multiples of 4 of 4 years and 40 years as conversion time. For example, if the conversion time is -40 years, the conversion time is -40 years (UTC) = -(60 seconds × 60 minutes × 24 hours × (365 days × 30 years + 366 days × 10 years)) = - 1,262,304,000 seconds. This eliminates the need to recalculate the conversion time each time. On the other hand, if the conversion time is set to two years, a case in which a leap year is included or a case in which a leap year is not included occurs, and the conversion time must be recalculated according to the external NTP time.

또, 서기년이 100으로 나뉘어 떨어지는 해는 윤년이 되지 않고, 서기년이 400으로 나뉘어 떨어지는 해는 윤년이 된다. 그래서, 시각 변환부(26)는, 필요에 따라 이 규칙도 고려하여 변환 시간을 설정해도 좋다.Also, a year that is divisible by 100 is not a leap year, and a year that is divisible by 400 is not a leap year. Then, the time conversion unit 26 may set the conversion time in consideration of this rule as necessary.

(단계 S53:UN 변환 처리)(Step S53: UN conversion processing)

시각 변환부(26)는, 단계 S52에서 변환되어 얻어진 고유 NTP 시각을 고유 UN 시각으로 변환한다.The time conversion unit 26 converts the unique NTP time converted and obtained in step S52 into a unique UN time.

도 12에 나타내는 바와 같이, NTP 시각과 UN 시각은, 기준년은 다르다. 그러나, NTP 시각과 UN 시각은, 모두 윤초(閏秒)를 고려하는 UTC(협정 세계시)를 시각계로서 이용하고 있다. 따라서, NTP 시각을 UN 시각으로 변환하는 경우에는, 기준년의 차이에 의한 고정의 시간을 가산하면 좋다.As shown in Fig. 12, the NTP time and the UN time have different base years. However, both the NTP time and the UN time use UTC (Coordinated Universal Time), which takes leap seconds into account, as a time system. Therefore, when converting the NTP time to the UN time, the fixed time due to the difference in the base year may be added.

(단계 S54:시각 반환 처리)(Step S54: Time return processing)

시각 변환부(26)는, 단계 S53에서 변환되어 얻어진 고유 UN 시각을 변환 후 취득부(221)에 송신한다. 내부 시계 설정부(22)는, 변환 후 취득부(221)를 거쳐, 송신된 고유 UN 시각을 취득한다.The time conversion unit 26 transmits the unique UN time converted in step S53 to the post-conversion acquisition unit 221 . The internal clock setting unit 22 acquires the transmitted unique UN time via the post-conversion acquisition unit 221 .

이것에 의해, 도 4의 단계 S13에서, 고유 UN 시각이 내부 시계(14)에 설정된다.Thereby, in step S13 of FIG. 4 , the unique UN time is set in the internal clock 14 .

도 13을 참조하여, 실시의 형태 2에 따른 시각 역변환 처리(도 6의 단계 S32)를 설명한다.With reference to FIG. 13, the time inverse transformation process (step S32 of FIG. 6) according to Embodiment 2 is demonstrated.

(단계 S61:시각 송신 처리)(Step S61: Time transmission processing)

내부 시계 참조부(24)는, 단계 S31에서 취득된 내부 시계(14)가 나타내는 시각인 내부 UN 시각을 메인 메모리(15)로부터 판독한다. 내부 시계 참조부(24)는, 역변환 후 취득부(241)를 거쳐, 내부 UN 시각을 시각 역변환부(27)에 송신한다. 시각 역변환부(27)는, 송신된 내부 UN 시각을 취득한다.The internal clock reference unit 24 reads the internal UN time, which is the time indicated by the internal clock 14 obtained in step S31, from the main memory 15 . The internal clock reference unit 24 transmits the internal UN time to the time inverse transformation unit 27 via the acquisition unit 241 after the inverse transformation. The time inverse transform unit 27 acquires the transmitted internal UN time.

(단계 S62:역변환 처리)(Step S62: Inverse transform processing)

시각 역변환부(27)는, 단계 S61에서 취득된 내부 UN 시각에서, 변환 시간을 감산하는 것에 의해, 내부 UN 시각을 참조 UN 시각으로 변환한다. 예를 들면, 변환 시간이 40년인 경우에는, 시각 역변환부(27)는, 내부 UN 시각에서 -1,262,304,000초를 감산한다.The time inverse transform unit 27 converts the internal UN time into the reference UN time by subtracting the conversion time from the internal UN time obtained in step S61. For example, when the conversion time is 40 years, the time inverse conversion unit 27 subtracts -1,262,304,000 seconds from the internal UN time.

(단계 S63:시각 반환 처리)(Step S63: Time return processing)

시각 역변환부(27)는, 단계 S62에서 변환되어 얻어진 참조 UN 시각을 역변환 후 취득부(241)에 송신한다. 내부 시계 참조부(24)는, 역변환 후 취득부(241)를 거쳐, 송신된 참조 UN 시각을 취득한다.The time inverse transform unit 27 transmits the reference UN time obtained by transforming in step S62 to the post-inverse transform acquisition unit 241 . The internal clock reference unit 24 acquires the transmitted reference UN time through the acquisition unit 241 after the inverse transformation.

이것에 의해, 도 6의 단계 S33에서, 내부 UN 시각이 변환 시간만큼 비키어진 참조 UN 시각이 사용된다.Thereby, in step S33 of Fig. 6, the reference UN time in which the internal UN time is shifted by the conversion time is used.

또, 여기에서는, 시각 사용부(25)는, UN 시각을 이용하는 것으로서 설명했다. 그러나, 시각 사용부(25)가 NTP 시각을 이용하는 경우에는, 참조 UN 시각에, NTP 시각과 UN 시각의 기준년의 차이에 의한 고정의 시간을 더 감산할 필요가 있다.In addition, here, the time use part 25 demonstrated as what uses the UN time. However, when the time use unit 25 uses the NTP time, it is necessary to further subtract the fixed time due to the difference between the NTP time and the base year of the UN time from the reference UN time.

***실시의 형태 2의 효과******Effect of Embodiment 2 ***

이상과 같이, 실시의 형태 2에 따른 시각 동기 장치(10)는, 외부 NTP 시각을 고유 NTP 시각으로 변환한 다음, 고유 UN 시각으로 변환한다. 이것에 의해, 도 14에 나타내는 바와 같이, 32비트판의 Linux(등록상표)에 있어서, 외부 시각이 2038년을 넘겨 관리 불가능한 시각의 범위에 들어간 경우라도, 내부 시계(14)의 시각을 관리 범위 내의 시각으로서 동작시키는 것이 가능하다.As described above, the time synchronization device 10 according to the second embodiment converts the external NTP time into a unique NTP time, and then converts it into a unique UN time. As a result, as shown in Fig. 14, in the 32-bit version of Linux (registered trademark), even when the external time exceeds 2038 and enters the unmanageable time range, the time of the internal clock 14 is maintained within the management range. It is possible to operate as a view within.

또, 도 10에 나타내는 바와 같이, 변환 시간에 의한 변환을 행하지 않는 경우에는, 외부 NTP 시각이 외부 UN 시각으로 변환된다. 그 때문에, 외부 시각이 2038년을 넘겨 관리 불가능한 시각의 범위에 들어간 경우에는, 내부 시계(14)의 시각이 관리 불가능한 시각이 되어버린다.Moreover, as shown in FIG. 10, when conversion by conversion time is not performed, the external NTP time is converted to the external UN time. Therefore, when the external time exceeds 2038 and enters the unmanageable time range, the time of the internal clock 14 becomes unmanageable time.

(실시의 형태 3)(Embodiment 3)

실시의 형태 3은, NTP 서버를 대신하여, PTP(Precision Time Protocol) 마스터를 시각 전달 장치(50)로서 이용하는 점이 실시의 형태 2와 다르다. 실시의 형태 3에서는, 이 다른 점을 설명하고, 동일한 점에 대해서는 설명을 생략한다.The third embodiment differs from the second embodiment in that a PTP (Precision Time Protocol) master is used as the time transmission device 50 instead of the NTP server. In Embodiment 3, these differences are demonstrated, and description is abbreviate|omitted about the same point.

***구성의 설명******Description of configuration***

시각 동기 장치(10)의 하드웨어 구성은, 도 1에 나타내는 실시의 형태 1에 따른 시각 동기 장치(10)의 하드웨어 구성과 동일하다. 여기에서는, 시각 전달 장치(50)는, PTP 마스터이다.The hardware configuration of the time synchronization device 10 is the same as the hardware configuration of the time synchronization device 10 according to the first embodiment shown in FIG. 1 . Here, the time transmission device 50 is a PTP master.

시각 동기 장치(10)의 기능 구성은, 도 2에 나타내는 실시의 형태 1에 따른 시각 동기 장치(10)의 기능 구성과 동일하다.The functional configuration of the time synchronization device 10 is the same as that of the time synchronization device 10 according to the first embodiment shown in FIG. 2 .

여기에서는, 시각 취득부(21)와 내부 시계 설정부(22)와 시각 변환부(26)는, PTP 슬레이브에 의해 실현된다. 시각 관리부(23)는, Linux(등록상표)의 커널에 의해 실현된다. 내부 시계 설정부(22)는, PTP 마스터로부터 취득된 외부 시각인 PTP 시각을 고유 시각으로 변환한 다음, UN 시각을 계산하여, 내부 시계(14)에 설정한다.Here, the time acquisition unit 21, the internal clock setting unit 22, and the time conversion unit 26 are realized by a PTP slave. The time management unit 23 is realized by a Linux (registered trademark) kernel. The internal clock setting unit 22 converts the PTP time, which is the external time acquired from the PTP master, into a unique time, then calculates the UN time and sets it in the internal clock 14 .

***동작의 설명******Description of action***

도 15부터 도 17을 참조하여, 실시의 형태 3에 따른 시각 동기 장치(10)의 동작을 설명한다.An operation of the time synchronization device 10 according to the third embodiment will be described with reference to FIGS. 15 to 17 .

실시의 형태 3에 따른 시각 동기 장치(10)의 동작 순서는, 실시의 형태 3에 따른 시각 동기 방법에 상당한다. 또, 실시의 형태 3에 따른 시각 동기 장치(10)의 동작을 실현하는 프로그램은, 실시의 형태 3에 따른 시각 동기 프로그램에 상당한다.The operation procedure of the time synchronization device 10 according to the third embodiment corresponds to the time synchronization method according to the third embodiment. Moreover, the program which implement|achieves the operation|movement of the time synchronization device 10 concerning Embodiment 3 corresponds to the time synchronization program concerning Embodiment 3. As shown in FIG.

실시의 형태 3에 있어서의 이하의 설명에서는, PTP 마스터로부터 취득되는 외부 시각을 외부 PTP 시각이라고 부른다. 외부 PTP 시각이 변환된 UN 시각을 외부 UN 시각이라고 부른다. 외부 UN 시각이 변환된 UN 시각을 고유 UN 시각이라고 부른다.In the following description in Embodiment 3, the external time acquired from the PTP master is called an external PTP time. The UN time converted from the external PTP time is called the external UN time. The UN time converted from the external UN time is called the native UN time.

도 15 및 도 16을 참조하여, 실시의 형태 3에 따른 시각 동기 장치(10)가 내부 시계(14)의 시각을 PTP 마스터의 외부 PTP 시각과 동기시키는 처리를 설명한다.A process in which the time synchronization device 10 according to the third embodiment synchronizes the time of the internal clock 14 with the external PTP time of the PTP master will be described with reference to Figs. 15 and 16 .

이하에 설명하는 바와 같이, 외부 PTP 시각을 NIC 시계에 설정하는 처리와, NIC 시계가 나타내는 외부 PTP 시각을 UN 시각으로 변환하여 내부 시계(14)에 설정하는 처리가 병행하여 동작한다.As will be described below, the processing of setting the external PTP time in the NIC clock and the processing of converting the external PTP time indicated by the NIC clock into the UN time and setting it in the internal clock 14 operate in parallel.

(단계 S71:시각 취득 처리)(Step S71: Time acquisition processing)

시각 취득부(21)는, 시각 전달 장치(50)인 PTP 마스터로부터 외부 PTP 시각을 취득한다. 시각 취득부(21)는, 취득된 외부 PTP 시각을 메인 메모리(15)에 기입한다.The time acquisition unit 21 acquires the external PTP time from the PTP master that is the time transmission device 50 . The time acquisition unit 21 writes the acquired external PTP time into the main memory 15 .

(단계 S72:NIC 설정 처리)(Step S72: NIC setting processing)

내부 시계 설정부(22)는, 단계 S71에서 취득된 외부 PTP 시각을 NIC(13)에 내장된 NIC 시계에 설정한다.The internal clock setting unit 22 sets the external PTP time acquired in step S71 to the NIC clock built in the NIC 13 .

(단계 S73:시각 변환 처리)(Step S73: Time conversion processing)

내부 시계 설정부(22)는, NIC 시계가 나타내는 외부 PTP 시각을 판독한다. 내부 시계 설정부(22)는, 변환 후 취득부(221)를 거쳐, 판독된 외부 PTP 시각을 시각 변환부(26)에 송신하여, 외부 PTP 시각을 내부 시계(14)의 관리 범위 내의 시각인 고유 UN 시각으로 변환시킨다.The internal clock setting unit 22 reads the external PTP time indicated by the NIC clock. The internal clock setting unit 22 transmits the read external PTP time to the time converting unit 26 via the post-conversion acquisition unit 221 , and sets the external PTP time to a time within the management range of the internal clock 14 . Convert to native UN time.

(단계 S74:내부 시계 설정 처리)(Step S74: Internal clock setting processing)

내부 시계 설정부(22)는, 단계 S73에서 변환되어 얻어진 고유 UN 시각을 시각 관리부(23)에 전달하는 것으로, 고유 UN 시각을 내부 시계(14)에 설정한다.The internal clock setting unit 22 transmits the unique UN time converted in step S73 to the time management unit 23 to set the unique UN time in the internal clock 14 .

도 16 및 도 17을 참조하여, 실시의 형태 3에 따른 시각 변환 처리(도 15의 단계 S73)를 설명한다.With reference to FIGS. 16 and 17, the time conversion process (step S73 of FIG. 15) according to Embodiment 3 is demonstrated.

(단계 S81:시각 송신 처리)(Step S81: Time transmission processing)

내부 시계 설정부(22)는, NIC 시계가 나타내는 외부 PTP 시각을 판독한다. 내부 시계 설정부(22)는, 변환 후 취득부(221)를 거쳐, 외부 PTP 시각을 시각 변환부(26)에 송신한다. 시각 변환부(26)는, 송신된 외부 PTP 시각을 취득한다.The internal clock setting unit 22 reads the external PTP time indicated by the NIC clock. The internal clock setting unit 22 transmits the external PTP time to the time converting unit 26 via the post-conversion acquisition unit 221 . The time conversion unit 26 acquires the transmitted external PTP time.

(단계 S82:UN 변환 처리)(Step S82: UN conversion processing)

시각 변환부(26)는, 단계 S81에서 취득된 외부 PTP 시각을 외부 UN 시각으로 변환한다.The time conversion unit 26 converts the external PTP time acquired in step S81 into an external UN time.

도 18에 나타내는 바와 같이, PTP 마스터에서 이용되는 PTP 시각은, 윤초를 고려하지 않는 TAI(국제 원자시)를 시각계로서 이용하고 있다. 이것에 대해서, UN 시각은, 윤초를 고려하는 UTC를 시각계로서 이용하고 있다. 그 때문에, PTP 시각을 UN 시각으로 변환하는 경우에는, 윤초를 고려하여 변환을 행할 필요가 있다. 단, 윤초는, 윤년과 달리 부정기적으로 발생한다.As shown in Fig. 18, as the PTP time used in the PTP master, TAI (International Atomic Time), which does not consider leap seconds, is used as a time system. In contrast to this, the UN time uses UTC considering leap seconds as a time system. Therefore, when converting the PTP time to the UN time, it is necessary to perform the conversion in consideration of the leap second. However, unlike leap years, leap seconds occur irregularly.

여기서, TAI와 UTC와의 차이는, UtcOffset로서 정의되고 있다. 이 UtcOffset는, 시각 동기 장치(10)의 외부의 서버에서 관리되고 있다. 그래서, 시각 변환부(26)는, 외부의 서버로부터 UtcOffset를 취득하고, 외부 PTP 시각부터 UtcOffset를 공제하는 것으로, 외부 PTP 시각을 외부 UN 시각으로 변환한다.Here, the difference between TAI and UTC is defined as UtcOffset. This UtcOffset is managed by a server external to the time synchronization device 10 . Then, the time conversion unit 26 converts the external PTP time into the external UN time by acquiring UtcOffset from the external server and subtracting UtcOffset from the external PTP time.

(단계 S83:고유 변환 처리)(Step S83: Unique conversion processing)

시각 변환부(26)는, 단계 S82에서 변환되어 얻어진 외부 UN 시각에, 변환 시간을 가산하는 것에 의해, 외부 UN 시각을 고유 UN 시각으로 변환한다. 구체적으로는, 시각 변환부(26)는, 변환 시간을 가산하는 것에 의해, 외부 UN 시각을 내부 시계(14)의 관리 범위 내의 시각인 고유 UN 시각으로 변환한다.The time conversion unit 26 converts the external UN time into a unique UN time by adding the conversion time to the external UN time converted and obtained in step S82. Specifically, the time conversion unit 26 converts the external UN time into a unique UN time that is a time within the management range of the internal clock 14 by adding the conversion time.

(단계 S84:시각 반환 처리)(Step S84: Time return processing)

시각 변환부(26)는, 단계 S83에서 변환되어 얻어진 고유 UN 시각을 변환 후 취득부(221)에 송신한다. 내부 시계 설정부(22)는, 변환 후 취득부(221)를 거쳐, 송신된 고유 UN 시각을 취득한다.The time conversion unit 26 transmits the unique UN time converted in step S83 to the post-conversion acquisition unit 221 . The internal clock setting unit 22 acquires the transmitted unique UN time via the post-conversion acquisition unit 221 .

이것에 의해, 도 15의 단계 S74에서, 고유 UN 시각이 내부 시계(14)에 설정된다.Thereby, the unique UN time is set in the internal clock 14 in step S74 of FIG.

즉, 고유 시각과 외부 시각 사이에 부정기인 시각의 변동인 부정기 변동이 발생하는 경우가 있다. 여기에서는, 부정기 변동은, 윤초이다. 이와 같이, 부정기 변동이 발생하는 경우에는, 시각 변환부(26)는, 부정기 변동에 의해 변동하는 시간을 특정하고, 특정된 시간만큼, 외부 시각을 변환하여 고유 시각이 계산된다.That is, irregular fluctuations that are irregular fluctuations in time may occur between the intrinsic time and the external time. Here, the irregular fluctuation is a leap second. In this way, when irregular fluctuations occur, the time conversion unit 26 specifies the time to fluctuate due to the irregular fluctuations, converts the external time only for the specified period of time, and calculates the unique time.

실시의 형태 3에 따른 시각 역변환 처리는, 도 13을 참조하여 설명한 실시의 형태 2에 따른 시각 역변환 처리와 동일하다.The inverse time transformation processing according to the third embodiment is the same as the inverse time transformation processing according to the second embodiment described with reference to FIG. 13 .

***실시의 형태 3의 효과******Effect of Embodiment 3 ***

이상과 같이, 실시의 형태 3에 따른 시각 동기 장치(10)는, 시각 동기 장치(10)에서 이용되는 시각계와, 시각 전달 장치(50)에서 이용되는 시각계 사이에서, 윤초와 같이 부정기 변동이 발생하는 경우여도, 적절한 변환이 가능하다.As described above, in the time synchronizing device 10 according to the third embodiment, between the time system used in the time synchronizing device 10 and the time system used in the time transmission device 50, irregular fluctuations such as leap seconds Even when this occurs, an appropriate conversion is possible.

10 : 시각 동기 장치 11 : 클럭 발신기
12 : 프로세서 13 : NIC
14 : 내부 시계 15 : 메인 메모리
16 : 주변 장치 21 : 시각 취득부
22 : 내부 시계 설정부 221 : 변환 후 취득부
23 : 시각 관리부 24 : 내부 시계 참조부
241 : 역변환 후 취득부 25 : 시각 사용부
26 : 시각 변환부 27 : 시각 역변환부
40 : 시각 변환 장치 50 : 시각 전달 장치
51 : 외부 시계 61 : 전송로
62 : 전송로
10: time synchronizer 11: clock transmitter
12: processor 13: NIC
14: internal clock 15: main memory
16: peripheral device 21: time acquisition unit
22: internal clock setting unit 221: acquisition unit after conversion
23: time management unit 24: internal clock reference unit
241: acquisition unit after inverse transformation 25: time use unit
26: time conversion unit 27: time inverse conversion unit
40: visual conversion device 50: visual transmission device
51: external clock 61: transmission path
62: transmission path

Claims (8)

외부 시계의 시각인 외부 시각을 취득하는 시각 취득부와,
상기 시각 취득부에 의해 취득된 상기 외부 시각을 시각 변환 장치로 송신하여, 상기 외부 시각이 내부 시계의 관리 범위 외의 시각인 경우에 상기 외부 시각을 상기 내부 시계의 관리 범위 내의 시각인 고유 시각으로 변환시키고, 상기 고유 시각을 상기 내부 시계에 설정하는 내부 시계 설정부
를 구비하는 시각 동기 장치.
a time acquisition unit for acquiring an external time that is the time of an external clock;
Transmitting the external time acquired by the time acquisition unit to a time conversion device, when the external time is a time outside the management range of the internal clock, the external time is converted into a unique time that is a time within the management range of the internal clock and an internal clock setting unit that sets the unique time to the internal clock
A time synchronization device comprising a.
제 1 항에 있어서,
상기 내부 시계는, 상기 외부 시각과 일정 시간의 간격을 유지하는 시각 동기 장치.
The method of claim 1,
The internal clock is a time synchronization device that maintains an interval between the external time and the predetermined time.
제 1 항 또는 제 2 항에 있어서,
상기 내부 시계는, 32비트판의 Linux(등록상표)의 시각 관리 변수의 범위에서 동작하는 시각 동기 장치.
3. The method of claim 1 or 2,
The internal clock is a time synchronization device that operates within the range of time management variables of a 32-bit version of Linux (registered trademark).
제 1 항에 있어서,
상기 시각 동기 장치는,
상기 내부 시계가 나타내는 시각인 내부 시각을 상기 시각 변환 장치로 송신하여, 상기 외부 시각을 상기 고유 시각으로 변환한 처리의 역의 처리를 행하는 것에 의해, 상기 내부 시각을 참조 시각으로 변환시키는 내부 시계 참조부
를 더 구비하는 시각 동기 장치.
The method of claim 1,
The time synchronization device,
Internal clock reference for converting the internal time into a reference time by transmitting the internal time, which is the time indicated by the internal clock, to the time conversion device, and performing a reverse process of the process for converting the external time into the unique time wealth
A time synchronization device further comprising a.
제 1 항 또는 제 2 항에 있어서,
상기 외부 시각과 상기 고유 시각의 차를 변환 시간으로 하고,
상기 변환 시간은, 상기 외부 시각의 시각계에 의하지 않는 정기적인 시각의 변동인 정기 변동의 횟수가 동일해지도록 설정되는
시각 동기 장치.
3. The method according to claim 1 or 2,
Let the difference between the external time and the intrinsic time be a conversion time,
The conversion time is set so that the number of periodic fluctuations that are periodic fluctuations of the time not caused by the external time system is equal
visual synchronizer.
제 3 항에 있어서,
상기 고유 시각은, 상기 외부 시각과의 사이에 부정기적인 시각의 변동인 부정기 변동이 발생하는 경우에는, 상기 부정기 변동에 의해 변동하는 시간만큼, 상기 외부 시각이 변환되어 얻어지는
시각 동기 장치.
4. The method of claim 3,
The intrinsic time is obtained by converting the external time by the amount of time that fluctuates due to the irregular fluctuations when irregular fluctuations that are irregular fluctuations in time occur between the intrinsic time and the external time
visual synchronizer.
시각 취득부가, 외부 시계의 시각인 외부 시각을 취득하고,
내부 시계 설정부가, 상기 외부 시각을 시각 변환 장치로 송신하여, 상기 외부 시각이 내부 시계의 관리 범위 외의 시각인 경우에 상기 외부 시각을 상기 내부 시계의 관리 범위 내의 시각인 고유 시각으로 변환시키고, 상기 고유 시각을 상기 내부 시계에 설정하는
시각 동기 방법.
The time acquisition unit acquires the external time that is the time of the external clock,
an internal clock setting unit transmits the external time to a time conversion device to convert the external time into a unique time that is a time within the management range of the internal clock when the external time is outside the management range of the internal clock; Setting a unique time on the internal clock
Visual Synchronization Method.
외부 시계의 시각인 외부 시각을 취득하는 시각 취득 처리와,
상기 시각 취득 처리에 의해 취득된 상기 외부 시각을 시각 변환 장치로 송신하여, 상기 외부 시각이 내부 시계의 관리 범위 외의 시각인 경우에 상기 외부 시각을 상기 내부 시계의 관리 범위 내의 시각인 고유 시각으로 변환시키고, 상기 고유 시각을 상기 내부 시계에 설정하는 내부 시계 설정 처리
를 행하는 시각 동기 장치로서 컴퓨터를 기능시키는, 기록 매체에 저장된 시각 동기 프로그램.
a time acquisition process for acquiring an external time that is the time of an external clock;
Sending the external time acquired by the time acquisition processing to a time conversion device, when the external time is a time outside the management range of the internal clock, the external time is converted into a unique time that is a time within the management range of the internal clock and internal clock setting processing to set the unique time to the internal clock
A time synchronizing program stored in a recording medium for causing a computer to function as a time synchronizing device that performs
KR1020227001043A 2019-07-24 2019-07-24 Time synchronizing device, time synchronizing method, and time synchronizing program stored in recording medium KR102388889B1 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/029049 WO2021014614A1 (en) 2019-07-24 2019-07-24 Time synchronization device, time synchronization method, and time synchronization program

Publications (2)

Publication Number Publication Date
KR20220011787A KR20220011787A (en) 2022-01-28
KR102388889B1 true KR102388889B1 (en) 2022-04-20

Family

ID=70166540

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020227001043A KR102388889B1 (en) 2019-07-24 2019-07-24 Time synchronizing device, time synchronizing method, and time synchronizing program stored in recording medium

Country Status (4)

Country Link
JP (1) JP6682055B1 (en)
KR (1) KR102388889B1 (en)
GB (1) GB2599022B (en)
WO (1) WO2021014614A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006521604A (en) 2003-03-20 2006-09-21 ソニー エリクソン モバイル コミュニケーションズ, エービー Mobile device with time control by DRM schema
JP6527289B2 (en) 2016-04-14 2019-06-05 日本電信電話株式会社 Time synchronization method, sensor accommodating terminal, and sensor network system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0178666B1 (en) 1996-12-11 1999-04-01 현대자동차 주식회사 Evaporation gas control apparatus and method for fuel tank
JP3225915B2 (en) * 1998-02-19 2001-11-05 株式会社デンソー Mobile communication terminal and mobile communication system
EP1990700B1 (en) * 2006-03-01 2018-09-12 Fujitsu Limited Method for managing and controlling time of computer system and computer system
KR100784976B1 (en) * 2006-10-12 2007-12-11 삼성전자주식회사 Method and apparatus for operating clock in mobile terminal
KR100902601B1 (en) * 2007-05-17 2009-06-12 한양네비콤주식회사 Wireless Time System And Method for Synchronizing Time
KR101034045B1 (en) * 2008-06-11 2011-05-11 한국표준과학연구원 Standard Time Synchronizing Device using CDMA RF Signals, and the Control Method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006521604A (en) 2003-03-20 2006-09-21 ソニー エリクソン モバイル コミュニケーションズ, エービー Mobile device with time control by DRM schema
JP6527289B2 (en) 2016-04-14 2019-06-05 日本電信電話株式会社 Time synchronization method, sensor accommodating terminal, and sensor network system

Also Published As

Publication number Publication date
KR20220011787A (en) 2022-01-28
WO2021014614A1 (en) 2021-01-28
GB2599022B (en) 2022-09-14
GB2599022A (en) 2022-03-23
JP6682055B1 (en) 2020-04-15
JPWO2021014614A1 (en) 2021-09-13

Similar Documents

Publication Publication Date Title
CN107655475B (en) Synchronous pulse signal acquisition method, navigation data synchronous processing method and system
US7986263B2 (en) Method and apparatus for a global navigation satellite system receiver coupled to a host computer system
US7668207B2 (en) System, method, and article of manufacture for synchronizing time of day clocks on first and second computers
CN102474410B (en) High-precision synchronisation method and system
US20140300762A1 (en) Information processing apparatus and control method therefor
CN111061338B (en) Method, system and equipment for updating time sequence of baseboard management controller
CN112540388B (en) Satellite communication module and uplink signal Doppler compensation method thereof
US20110222561A1 (en) Systems and methods for providing time synchronization
CN111596721B (en) Data time tag synchronization method and device
US20130215910A1 (en) Transmission apparatus, transmission method, program, and communication system
CN111556226A (en) Camera system
KR102388889B1 (en) Time synchronizing device, time synchronizing method, and time synchronizing program stored in recording medium
Elmenreich et al. The time-triggered paradigm
US20050156649A1 (en) Apparatus and method for generating clock signal
WO2023019984A1 (en) Clock synchronization method for control system, and control system
JP2003207586A (en) Electronic equipment and its internal time information control method
CN115987477A (en) Multi-reference source time synchronization method, system, module and medium
Okabe et al. Avoiding year 2038 problem on 32-bit linux by rewinding time on clock synchronization
CN115150019A (en) Multi-sensor time synchronization method, device, equipment and medium
CN113259039A (en) Time synchronization method and device, computer equipment and storage medium
US20190303101A1 (en) Data acquisition system, input device, data acquisition apparatus, and data combining apparatus
JP2015231172A (en) File creation time correction device
Wysor et al. Low Cost Time Synchronization for Remote Measurement Systems
US11956343B2 (en) High resolution signal reception
CN112019288B (en) Time synchronization method, service single board and network equipment

Legal Events

Date Code Title Description
A302 Request for accelerated examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant