KR20200083533A - Clock metering method of watt hour meter, device, computer equipment and storage medium - Google Patents

Clock metering method of watt hour meter, device, computer equipment and storage medium Download PDF

Info

Publication number
KR20200083533A
KR20200083533A KR1020207015343A KR20207015343A KR20200083533A KR 20200083533 A KR20200083533 A KR 20200083533A KR 1020207015343 A KR1020207015343 A KR 1020207015343A KR 20207015343 A KR20207015343 A KR 20207015343A KR 20200083533 A KR20200083533 A KR 20200083533A
Authority
KR
South Korea
Prior art keywords
time
message
clock
hour meter
calibration
Prior art date
Application number
KR1020207015343A
Other languages
Korean (ko)
Other versions
KR102331631B1 (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 KR20200083533A publication Critical patent/KR20200083533A/en
Application granted granted Critical
Publication of KR102331631B1 publication Critical patent/KR102331631B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0682Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0644External master-clock

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Electric Clocks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

본 출원은 전력량계 클록 동기화 방법, 장치, 컴퓨터 설비 및 저장 매체에 관한 것이다. 상기 방법은, 절대 시간을 획득하고, 절대 시간에 따라 내부 클록을 동기화하는 단계; 미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계; 여기서 제 1 시간 및 제 2 시간은 내부 클록의 시간이며; 상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 제 1 시간 동기화 메시지의 처리 지연을 획득하는 단계; 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득하는 단계; 및 시간 교정 메시지를 전력량계에 전송하여 전력량계의 로컬 클록을 동기화하는 단계를 포함하되, 시간 교정 메시지는 교정 시간을 포함한다. 본 발명은 정확한 클록 소스를 사용하고, 메시지의 전송 지연 및 처리 지연을 고려함으로써, 전력량계의 클록이 초단위의 요구를 충족시킬 수 있게 한다.The present application relates to a power meter clock synchronization method, apparatus, computer equipment and storage medium. The method comprises: obtaining an absolute time and synchronizing an internal clock according to the absolute time; Transmitting a first time synchronization message to the watt hour meter at a first time by a preset communication protocol, and receiving a second time synchronization message fed back from the watt hour meter at the second time; Where the first time and the second time are the time of the internal clock; Obtaining a processing delay of a first time synchronization message according to the first time, the second time, and a transmission delay; Obtaining a correction time according to a processing delay, a transmission delay, a predetermined message assembly time, and a time of the internal clock; And synchronizing the local clock of the wattmeter by sending a time calibration message to the wattmeter, wherein the time calibration message includes a calibration time. The present invention uses an accurate clock source, and considers the transmission delay and processing delay of the message, so that the clock of the watt-hour meter can meet the demand in seconds.

Description

전력량계의 클록 동기화 방법, 장치, 컴퓨터 설비 및 저장 매체Clock metering method of watt hour meter, device, computer equipment and storage medium

본 출원은 전력 시스템 기술분야에 관한 것으로서, 더 상세하게는 전력량계의 클록 동기화 방법, 장치, 컴퓨터 설비 및 저장 매체에 관한 것이다.The present application relates to the field of power system technology, and more particularly, to a clock synchronization method, apparatus, computer equipment and storage medium of a watt-hour meter.

전력 시스템에는 전기에너지 계량 및 이벤트 기록을 위한 전력량계가 다량 존재한다. 현재, 전력 시스템의 전기에너지 요금 계산 방식은 주로 실시간이 아닌 월별 납부이다. 이러한 비실시간 요금 계산 시스템에서, 전력량계는 자체 시간에 기준하여 비교적 긴 시간 동안(일반적으로 일, 월을 단위로 함)의 전력 소비량을 통계하고, 정기적으로 전기미터의 계량 데이터를 검침한다. 이러한 업무 조건에서 전력량계의 시간 오류는 민감하지 않다. There are many power meters for electric energy metering and event recording in power systems. Currently, the method of calculating the electric energy bill of the power system is mainly monthly payment, not real time. In such a non-real-time charge calculation system, the watt hour meter calculates power consumption for a relatively long time (typically in days and months) based on its own time, and periodically reads metering data of the electricity meter. In these working conditions, the time error of the watt hour meter is not sensitive.

현재의 비실시간 요금 계산 시스템에서, 전력량계 시간의 정확성을 보장하기 위해, 전기미터 데이터 수집 주국에서 시간 동기화 명령을 발송시켜 점대점(Point to point)의 시간 동기화를 수행할 수 있다. 그러나, 이러한 시간 동기화 메커니즘은, 주국이 전기미터 시간을 집중기 또는 부하 제어 단말로 발송하고, 집중기 또는 부하 제어 단말이 다시 시간이 포함된 메시지를 전력량계로 발송하고, 전기미터에서 시간 동기화가 수행되는 것이다. 이러한 방식은, 여러 단계의 전송을 거치며 복잡한 네트워크에서 메시지의 지연 및 재전송과 같은 여러 상황이 존재하기에, 전력량계의 시간을 효과적으로 동기화할 수 없게 된다.In the current non-real-time rate calculation system, in order to ensure the accuracy of the watt-hour meter, it is possible to perform a point-to-point time synchronization by sending a time synchronization command from the electricity meter data collection master station. However, in such a time synchronization mechanism, the master station sends the electricity meter time to the concentrator or load control terminal, and the concentrator or load control terminal again sends a message containing the time to the watt hour meter, and the time synchronization is performed at the electricity meter. Will be. In this method, since there are various situations such as delay and retransmission of a message in a complex network through multiple stages of transmission, it is impossible to effectively synchronize the time of the watt-hour meter.

또한, 주국이 부하 제어 단말 또는 집중기를 통해 전기미터 시간 동기화 명령을 투명 전송하여 시간 동기화를 진행하는 방법을 사용하는 기술방안도 있다. 그러나 하나의 주국은 일반적으로 수만에서 수백만개의 전기미터를 관리하고 있으며, 모든 전기미터에 대해 시간 오류 판독을 한번 진행하고 시간 교정을 한번 발송하는 데에는 긴 시간이 필요하므로, 전기미터의 시간 오류 관리에 대한 실시간성이 떨어진다.In addition, there is also a technical method in which the master station uses a method of performing time synchronization by transparently transmitting an electric meter time synchronization command through a load control terminal or a concentrator. However, because one master station generally manages tens to millions of electricity meters, it takes a long time to perform time error reading and send time calibration once for all electricity meters. Poor real-time performance.

전력 사업이 발전함에 따라 전기미터 데이터 수집의 실시간성에 대한 요구가 점점 높아지고 있으며, 전력 거래를 예로 들면, 전기미터 데이터의 실시간 수집은 분단위의 정확도가 요구되므로 전력량계 시간은 반드시 초단위의 정확도를 만족시켜야 한다. 종래의 시간 동기화 메커니즘으로 대규모 전력량계의 절대시간에 대한 초단위의 동기화는 불가능하다.With the development of the electricity business, the demand for real-time data collection of electric meter data is increasing. For example, in the power transaction, real-time data collection of electric meter data requires minute-by-minute accuracy. Should do. With the conventional time synchronization mechanism, it is impossible to synchronize the second unit with respect to the absolute time of a large-scale electricity meter.

이를 감안하여, 상기 기술적 문제를 해결하기 위한, 종래의 시간 동기화 메커니즘으로 대규모 전력량계의 절대시간에 대한 초단위의 동기화가 불가능한 문제점을 해결할 수 있는, 전력량계의 클록 동기화 방법, 장치, 컴퓨터 설비 및 저장 매체를 제공할 필요가 있다.In view of this, the clock synchronization method, device, computer equipment and storage medium of the watt hour meter, which can solve the problem that it is impossible to synchronize in seconds with respect to the absolute time of a large-scale watt hour meter, using the conventional time synchronization mechanism to solve the above technical problem Need to provide.

전력량계의 클록 동기화 방법은,The wattmeter clock synchronization method,

절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화하는 단계; Obtaining an absolute time and synchronizing an internal clock according to the absolute time;

미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계; 상기 제 1 시간 및 상기 제 2 시간은 내부 클록의 시간이고;Transmitting a first time synchronization message to the watt hour meter at a first time by a preset communication protocol, and receiving a second time synchronization message fed back from the watt hour meter at the second time; The first time and the second time are times of an internal clock;

상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하는 단계; 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득하는 단계; 및 Obtaining a processing delay of the first time synchronization message according to the first time, the second time, and a transmission delay; Obtaining a correction time according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock; And

시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하는 단계를 포함하되, 상기 시간 교정 메시지는 상기 교정 시간을 포함한다. And sending a time calibration message to the watt hour meter to synchronize the local clock of the watt hour meter, wherein the time calibration message includes the calibration time.

상기 전력량계의 클록 동기화 방법은, 정확한 절대시간을 획득하여 내부 클록 계수기를 동기화함으로써 후속의 정확한 계시를 달성하고, 미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 제 1 시간에 전송하고, 전력량계는 제 1 시간 동기화 메시지를 수신한 다음 제 2 시간 동기화 메시지를 피드백하고, 제 2 메시지를 수신한 제 2 시간을 기록하며, 이에 메시지의 전송 지연을 결합하여 메시지에 대한 전력량계의 처리 지연을 계산하고, 이로써 전력량계의 로컬 클록의 교정 시간을 계산할 수 있으며, 시간 교정 메시지를 전력량계에 전송함으로써, 전력량계의 로컬 클록 동기화가 실현된다. 본 발명의 실시예는 정확한 클록 소스를 사용하고, 메시지의 전송 지연 및 처리 지연을 고려함으로써, 전력량계의 로컬 클록이 초단위의 요구를 충족시킬 수 있게 한다.The clock synchronizing method of the watt-hour meter achieves subsequent accurate timekeeping by obtaining an accurate absolute time and synchronizing the internal clock counter, transmitting a first time synchronization message at a first time by a preset communication protocol, and After receiving the 1 hour synchronization message, the second time synchronization message is fed back, the second time the second message is received is recorded, and the transmission delay of the message is combined to calculate the processing delay of the watt hour meter for the message, thereby The calibration time of the local clock of the watt hour meter can be calculated, and by sending a time calibration message to the watt hour meter, local clock synchronization of the watt hour meter is realized. An embodiment of the present invention uses an accurate clock source, and takes into account the transmission delay and processing delay of the message, so that the local clock of the watt hour meter can meet the demand in seconds.

일 실시예에서, 상기 제 2 시간 동기화 메시지를 압축 해제하여 상기 전력량계의 로컬 클록의 제 3 시간을 획득하는 단계; 상기 제 2 시간, 제 3 시간 및 전송 지연에 따라 상기 전력량계의 로컬 클록의 시간 오류를 획득하는 단계; 상기 시간 오류가 미리 설정된 시간 범위 내에 있는지 여부를 판단하고, 이에 따라 전력량계의 로컬 클록에 대한 동기화를 진행하는지 여부를 결정하는 단계를 더 포함한다.In one embodiment, decompressing the second time synchronization message to obtain a third time of the local clock of the wattmeter; Obtaining a time error of the local clock of the watt hour meter according to the second time, the third time and the transmission delay; The method further includes determining whether the time error is within a preset time range and, accordingly, determining whether to synchronize the wattmeter with a local clock.

일 실시예에서, 상기 전력량계의 로컬 클록의 시간 오류를 계산하기 위한 아래와 같은 공식을 더 포함한다.In one embodiment, the formula for calculating the time error of the local clock of the wattmeter is further included.

Figure pct00001
Figure pct00001

여기서, dt0은 상기 전력량계의 로컬 클록의 시간 오류를 나타내고, T2는 제 2 시간을 나타내고, T3은 제 3 시간을 나타내고, dt2는 전송 지연을 나타낸다.Here, dt0 represents the time error of the local clock of the watt-hour meter, T2 represents the second time, T3 represents the third time, and dt2 represents the transmission delay.

일 실시예에서, 물리적 링크의 전력량계 통신 프로토콜을 통해, 전력량계 통신 프로토콜에 부합하는 제 1 시간 동기화 메시지를 제 1 시간에 전력량계로 전송하고, 전력량계로부터 피드백된 전력량계 통신 프로토콜에 부합하는 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계를 더 포함한다. In one embodiment, through the watt hour communication protocol of the physical link, a first time synchronization message conforming to the watt hour communication protocol is transmitted to the watt hour meter at the first time, and a second time synchronization message compliant with the watt hour communication protocol fed back from the watt hour meter. And receiving at the second time.

일 실시예에서, 제 1 시간 동기화 메시지의 제 1 메시지 길이 및 상기 물리적 링크 인터페이스의 보드레이트를 획득하고, 상기 제 1 메시지 길이 및 상기 물리적 링크 인터페이스의 보드레이트에 따라 상기 제 1 시간 동기화 메시지의 전송 지연을 획득하는 단계; 제 2 시간 동기화 메시지의 제 2 메시지 길이를 획득하고, 상기 제 2 메시지 길이 및 상기 물리적 링크 인터페이스의 보드레이트에 따라 제 2 시간 동기화 메시지의 전송 지연을 획득하는 단계를 더 포함하되, 상기 제 1 시간 동기화 메시지의 처리 지연를 계산하기 위한 아래와 같은 공식을 더 포함한다.In one embodiment, acquiring a first message length of the first time synchronization message and a baud rate of the physical link interface, and transmitting the first time synchronization message according to the first message length and the baud rate of the physical link interface Obtaining a delay; Obtaining a second message length of the second time synchronization message, and acquiring a transmission delay of the second time synchronization message according to the second message length and the baud rate of the physical link interface, wherein the first time The following formula is further included to calculate the processing delay of the synchronization message.

Figure pct00002
Figure pct00002

여기서, dt1은 제 1 시간 동기화 메시지의 전송 지연을 나타내고, dt2는 제 2 시간 동기화 메시지의 전송 지연을 나타내고, T1은 제 1 시간을 나타내고, T2는 제 2 시간을 나타내고, dt3은 제 1 시간 동기화 메시지의 처리 지연을 나타낸다.Here, dt1 represents the transmission delay of the first time synchronization message, dt2 represents the transmission delay of the second time synchronization message, T1 represents the first time, T2 represents the second time, and dt3 represents the first time synchronization Indicates the processing delay of the message.

일 실시예에서, 상기 메시지 조립 시간 및 시간 교정 메시지의 메시지 길이를 미리 획득하고, 상기 시간 교정 메시지의 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 시간 교정 메시지의 코딩 길이에 따라 상기 시간 교정 메시지의 전송 지연을 획득하는 단계를 더 포함하되, 상기 시간 교정 메시지 중의 교정 시간을 계산하기 위한 아래와 같은 공식을 더 포함한다.In one embodiment, the message assembly time and the message length of the time calibration message are obtained in advance, the time according to the message length of the time calibration message, the baud rate of the physical link, and the coding length of the time calibration message on the communication link. Further comprising the step of obtaining the transmission delay of the calibration message, further includes the following formula for calculating the calibration time in the time calibration message.

Figure pct00003
Figure pct00003

여기서, T5는 상기 시간 교정 메시지 중의 교정 시간을 나타내고, T4는 내부 클록에 의해 기록된 상기 시간 교정 메시지를 전송한 시간을 나타내고, dt4는 상기 시간 교정 메시지의 전송 지연을 나타내고, dt5는 미리 결정된 메시지 조립 시간을 나타낸다. Here, T5 represents the calibration time in the time calibration message, T4 represents the time at which the time calibration message recorded by the internal clock is transmitted, dt4 represents the transmission delay of the time calibration message, and dt5 is a predetermined message. Shows the assembly time.

일 실시예에서, 하나의 기지국으로부터 절대시간을 획득하는 단계; 또는 복수의 기지국의 시간을 획득하고, 복수의 기지국의 시간 중 하나를 상기 절대시간으로 선택하는 단계; 또는 내부 GPS 모듈 또는 북두 모듈을 통해 절대시간을 획득하는 단계를 더 포함한다.In one embodiment, obtaining absolute time from one base station; Or obtaining times of a plurality of base stations and selecting one of the times of the plurality of base stations as the absolute time; Or, further comprising the step of acquiring the absolute time through the internal GPS module or the Beidou module.

전력량계의 클록 동기화 장치는,The clock meter synchronization device,

절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화하기 위한 내부 시간 동기화 모듈;An internal time synchronization module for obtaining an absolute time and synchronizing an internal clock according to the absolute time;

미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하기 위한 메시지 송수신 모듈; 상기 제 1 시간 및 상기 제 2 시간은 내부 클록의 시간이고;A message transmitting and receiving module for transmitting the first time synchronization message to the watt hour meter at a first time by a preset communication protocol and receiving the second time synchronization message fed back from the watt hour meter at the second time; The first time and the second time are times of an internal clock;

상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하고; 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득하기 위한 지연 계산 모듈; 및Acquire a processing delay of the first time synchronization message according to the first time, the second time, and a transmission delay; A delay calculation module for obtaining a correction time according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock; And

시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하기 위한 클록 동기화 모듈을 포함하되, 상기 시간 교정 메시지는 상기 교정 시간을 포함한다.And a clock synchronization module for synchronizing the local clock of the wattmeter by sending a time calibration message to the wattmeter, wherein the time calibration message includes the calibration time.

메모리 및 프로세서를 포함하는 컴퓨터 설비로서, 상기 메모리에 컴퓨터 프로그램이 저장되어 있고, 상기 컴퓨터 프로그램이 상기 프로세서에 의해 실행될 경우,A computer facility including a memory and a processor, wherein a computer program is stored in the memory, and the computer program is executed by the processor.

절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화하는 단계;Obtaining an absolute time and synchronizing an internal clock according to the absolute time;

미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계; 상기 제 1 시간 및 상기 제 2 시간은 내부 클록의 시간이고;Transmitting a first time synchronization message to the watt hour meter at a first time by a preset communication protocol, and receiving a second time synchronization message fed back from the watt hour meter at the second time; The first time and the second time are times of an internal clock;

상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하는 단계; 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득하는 단계; 및Obtaining a processing delay of the first time synchronization message according to the first time, the second time, and a transmission delay; Obtaining a correction time according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock; And

시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하는 단계가 구현되고, 상기 시간 교정 메시지는 상기 교정 시간을 포함한다.A step of synchronizing the local clock of the wattmeter is implemented by sending a time calibration message to the wattmeter, and the time calibration message includes the calibration time.

컴퓨터 프로그램이 저장된 컴퓨터 판독 가능 저장 매체로서, 상기 컴퓨터 프로그램이 프로세서에 의해 실행될 경우,A computer-readable storage medium on which a computer program is stored, when the computer program is executed by a processor,

절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화하는 단계;Obtaining an absolute time and synchronizing an internal clock according to the absolute time;

미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계; 상기 제 1 시간 및 상기 제 2 시간은 내부 클록의 시간이고;Transmitting a first time synchronization message to the watt hour meter at a first time by a preset communication protocol, and receiving a second time synchronization message fed back from the watt hour meter at the second time; The first time and the second time are times of an internal clock;

상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하는 단계; 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득하는 단계; 및Obtaining a processing delay of the first time synchronization message according to the first time, the second time, and a transmission delay; Obtaining a correction time according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock; And

시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하는 단계를 포함하되, 상기 시간 교정 메시지는 상기 교정 시간을 포함한다.And sending a time calibration message to the watt hour meter to synchronize the local clock of the watt hour meter, wherein the time calibration message includes the calibration time.

상술한 전력량계의 클록 동기화 방법, 장치, 컴퓨터 설비 및 저장 매체는 정확한 클록 소스를 사용하고, 메시지의 전송 지연 및 처리 지연을 고려함으로써, 전력량계가 초단위의 요구를 충족시킬 수 있게 한다.The above-described watt-hour clock synchronization method, apparatus, computer equipment, and storage medium use an accurate clock source, and consider transmission delay and processing delay of a message, so that the watt-hour meter can meet the demand in seconds.

도 1은 일 실시예에 따른 전력량계의 클록 동기화 방법의 응용 다이어그램을 제시하는 도면이다.
도 2는 일 실시예에 따른 전력량계의 클록 동기화 방법의 흐름도를 제시하는 도면이다.
도 3은 다른 실시예에 따른 전력량계의 클록 동기화 방법의 흐름도를 제시하는 도면이다.
도 4는 일 실시예에 따른 절대시간을 획득하기 위한 첫번째 구조를 제시하는 도면이다.
도 5는 일 실시예에 따른 절대시간을 획득하기 위한 두번째 구조를 제시하는 도면이다.
도 6은 일 실시예에 따른 절대시간을 획득하기 위한 세번째 구조를 제시하는 도면이다.
도 7은 일 실시예에 따른 전력량계의 클록 동기화 방법의 시퀀스 다이어그램이다.
도 8은 일 실시예에 따른 전력량계의 클록 동기화 장치의 구조 블록도이다.
도 9는 일 실시예에 따른 컴퓨터 설비의 내부 구조도이다.
1 is a view showing an application diagram of a clock synchronization method of a watt hour meter according to an embodiment.
2 is a view showing a flow chart of a clock synchronization method of the watt hour meter according to an embodiment.
3 is a view showing a flow chart of a clock synchronization method of a watt hour meter according to another embodiment.
4 is a view showing a first structure for obtaining an absolute time according to an embodiment.
5 is a view showing a second structure for acquiring absolute time according to an embodiment.
6 is a view showing a third structure for obtaining absolute time according to an embodiment.
7 is a sequence diagram of a clock synchronization method of a watt hour meter according to an embodiment.
8 is a structural block diagram of an apparatus for synchronizing clocks in a power meter according to an embodiment.
9 is an internal structure diagram of a computer facility according to an embodiment.

본 출원의 목적, 기술적 방안 및 장점을 보다 명확하게 이해하기 위해, 첨부된 도면 및 실시예를 참조하여 본 출원에 대해 보다 상세하게 설명한다. 본 명세서에 기술된 구체적인 실시예는 단지 본 출원을 설명하기 위한 것이며, 본 출원을 제한하는 것으로 이해되지 않는다.In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application will be described in more detail with reference to the accompanying drawings and examples. The specific embodiments described herein are only for describing the present application and are not to be understood as limiting the present application.

본 출원에서 제공되는 전력량계의 클록 동기화 방법은 도 1에 도시된 바와 같은 응용 다이어그램에 적용될 수 있다. 여기서, 전력량계(102)는 미리 설정된 통신 프로토콜 인터페이스를 통해 시간 동기화 단말(104)과 통신을 진행한다. 여기서, 전력량계(102)는 전자식 전력량계, 전기 카드 선불 전력량계 등일 수 있고, 시간 동기화 단말(104)은 미리 설정된 통신 프로토콜 인터페이스를 가진 스마트폰, 노트북 컴퓨터 등일 수 있다.The clock synchronization method of the watt hour meter provided in the present application can be applied to an application diagram as shown in FIG. 1. Here, the watt-hour meter 102 communicates with the time synchronization terminal 104 through a preset communication protocol interface. Here, the watt-hour meter 102 may be an electronic watt-hour meter, an electric card prepaid watt-hour meter, etc., and the time synchronization terminal 104 may be a smartphone, a notebook computer, or the like having a preset communication protocol interface.

여기서, 전력량계(102)에 자체 시간을 기록하기 위한 로컬 클록이 집적되어 있고, 전력량계 업무의 시간 니즈는 이 로컬 클록를 통해 제공된다.Here, a local clock for recording its own time is integrated in the wattmeter 102, and the time needs of the wattage service are provided through this local clock.

또한, 시간 동기화 단말(104)은 북두 또는 GPS로부터 절대시간을 획득하기 위한 GPS 모듈 또는 북두 모듈을 포함하고, 또한, 시간 동기화 단말(104)에 GPS 모듈 또는 북두 모듈이 없는 경우, 통신 모듈을 통해 근처의 하나의 기지국 또는 복수의 기지국으로부터 절대시간을 획득하여도 된다.In addition, the time synchronization terminal 104 includes a GPS module or a North Head module for acquiring absolute time from the North Head or GPS, and also, if the time synchronization terminal 104 does not have a GPS module or the North Head module, through the communication module The absolute time may be obtained from one nearby base station or multiple base stations.

일 실시예에서, 도 2에 도시된 바와 같이, 전력량계의 클록 동기화 방법이 제공되며, 해당 방법이 도 1의 시간 동기화 단말에 적용된 것을 예로 설명되며, 다음 단계를 포함한다:In one embodiment, as shown in FIG. 2, a clock synchronization method of a watt hour meter is provided, and the method is applied to the time synchronization terminal of FIG. 1 as an example, and includes the following steps:

S202단계 : 절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화한다.Step S202: Acquire an absolute time and synchronize the internal clock according to the absolute time.

여기서, 절대시간은 정확한 시간으로 간주될 수 있고, 일반적으로 GPS 시스템과 북두 시스템에 절대시간이 저장되어 있다.Here, the absolute time can be regarded as an accurate time, and in general, the absolute time is stored in the GPS system and the Beidou system.

구체적으로, 시간 동기화 단말이 절대시간을 획득한 후, 절대시간을 이용하여 내부 클록을 동기화시킴으로써, 시간 동기화 단말의 내부 시간의 정확성을 보장한다. Specifically, after the time synchronization terminal acquires the absolute time, the internal clock is synchronized using the absolute time, thereby guaranteeing the accuracy of the internal time of the time synchronization terminal.

S204단계 : 미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하고; 상기 제 1 시간 및 상기 제 2 시간은 내부 클록의 시간이다.Step S204: The first time synchronization message is transmitted to the watt hour meter at a first time by a preset communication protocol, and the second time synchronization message fed back from the watt hour meter is received at the second time; The first time and the second time are times of an internal clock.

여기서, 통신 프로토콜은 전력량계와 시간 동기화 단말의 연결 관계에 의해 결정될 수 있으며, 예를 들어, 전력량계와 시간 동기화 단말이 RS485 통신 인터페이스를 통해 연결되었다면, 통신 프로토콜은 DL/T645 통신 프로토콜일 수 있고, 본 실시예는 이에 제한되지 않는다.Here, the communication protocol may be determined by the connection relationship between the power meter and the time synchronization terminal. For example, if the power meter and the time synchronization terminal are connected through an RS485 communication interface, the communication protocol may be a DL/T645 communication protocol. The embodiment is not limited to this.

S206단계 : 상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하고; 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득한다.Step S206: acquire processing delay of the first time synchronization message according to the first time, the second time, and the transmission delay; A correction time is obtained according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock.

여기서, 전송 지연은 통신 선로에서 메시지의 전송 시간이며, 전력량계와 시간 동기화 단말의 연결 방식을 결정한 후 데이터 전송의 보드레이트 및 메시지 길이에 따라 계산할 수 있다. 또한, 처리 지연은 전력량계 또는 시간 동기화 단말이 메시지를 압축 해제하는데 소요되는 시간이다.Here, the transmission delay is the transmission time of the message in the communication line, and after determining the connection method between the power meter and the time synchronization terminal, it can be calculated according to the baud rate of the data transmission and the message length. In addition, the processing delay is the time required for the power meter or time synchronization terminal to decompress the message.

S208단계 : 시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하고, 상기 시간 교정 메시지는 상기 교정 시간을 포함한다.Step S208: Send a time calibration message to the wattmeter to synchronize the local clock of the wattmeter, and the time calibration message includes the calibration time.

상술한 전력량계의 클록 동기화 방법에서, 정확한 절대시간을 획득하여 내부 클록 계수기를 동기화함으로써 후속의 정확한 계시를 달성하고, 미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 제 1 시간에 전송하고, 전력량계는 제 1 시간 동기화 메시지를 수신한 다음 제 2 시간 동기화 메시지를 피드백하고, 제 2 메시지를 수신한 제 2 시간을 기록하며, 이에 메시지의 전송 지연을 결합하여 메시지에 대한 전력량계의 처리 지연을 계산하고, 이로써 전력량계의 로컬 클록의 교정 시간을 계산할 수 있으며, 시간 교정 메시지를 전력량계에 전송함으로써, 전력량계의 동기화가 실현된다. 본 발명의 실시예는 정확한 클록 소스를 사용하고, 메시지의 전송 지연 및 처리 지연을 고려함으로써, 전력량계가 초단위의 요구를 충족시킬 수 있게 한다.In the clock synchronizing method of the above-mentioned watt-hour meter, an accurate absolute time is obtained to synchronize subsequent clock counters to achieve subsequent accurate timing, and a first time synchronization message is transmitted at a first time by a preset communication protocol, and the watt hour meter is After receiving the first time synchronization message, feedback the second time synchronization message, record the second time the second message is received, combine the transmission delay of the message, and calculate the processing delay of the wattmeter for the message, Thereby, the calibration time of the local clock of the watt hour meter can be calculated, and synchronization of the watt hour meter is realized by sending a time calibration message to the watt hour meter. Embodiments of the present invention enable the watt hour meter to meet the needs of the second, by using an accurate clock source, and taking into account the transmission and processing delays of messages.

일 실시예에서, 도 3에 도시된 바와 같이, 다른 전력량계의 클록 동기화 방법이 제공되며, 해당 방법은 다음 단계를 포함한다:In one embodiment, as shown in FIG. 3, a clock synchronization method of another watt hour meter is provided, the method comprising the following steps:

S301단계 : 절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화한다.Step S301: Acquire an absolute time and synchronize the internal clock according to the absolute time.

일 실시예에서, 도 4에 도시된 바와 같이, 시간 동기화 단말은 하나의 기지국으로부터 절대시간을 획득할 수 있으며, 일반적으로, 기지국에는 GPS 모듈 또는 북두 모듈이 있으므로, 시간 동기화 단말은 하나의 기지국과 통신함으로써 기지국의 절대시간을 획득할 수 있다.In one embodiment, as shown in Figure 4, the time synchronization terminal can obtain the absolute time from one base station, and generally, since the base station has a GPS module or the North Pole module, the time synchronization terminal is one base station By communicating, the absolute time of the base station can be obtained.

다른 실시예에서, 도 5에 도시된 바와 같이, 시간 동기화 단말은 복수의 기지국으로부터 절대시간을 획득한 후, 복수의 기지국의 시간 중 하나를 절대시간으로 선택할 수 있으며, 이로 하여 단일 기지국에 고장 발생으로 인한 시간 교정이 부정확한 문제를 피할 수 있으며, 구체적으로, 복수의 기지국의 시간이 일치한지를 비교함으로써, 가장 정확한 기지국의 시간을 판단하되 이를 절대시간으로 정한다. In another embodiment, as shown in FIG. 5, after obtaining the absolute time from a plurality of base stations, the time synchronization terminal can select one of the times of the plurality of base stations as an absolute time, thereby causing a failure in a single base station The inaccuracy of the time correction due to the problem can be avoided. Specifically, by comparing whether the times of a plurality of base stations match, the time of the most accurate base station is determined, but this is determined as absolute time.

또 다른 실시예에서, 도 6에 도시된 바와 같이, 시간 동기화 단말은 GPS 모듈 또는 북두 모듈을 포함하고, 로컬의 GPS 모듈 또는 북두 모듈을 통해 절대시간을 획득할 수 있다.In another embodiment, as illustrated in FIG. 6, the time synchronization terminal may include a GPS module or a big head module, and acquire an absolute time through a local GPS module or a big head module.

또한, 일 실시예에서, 내부 클록은 클록 계수기일 수 있고, 클록 계수기의 카운터 기준은 시간 동기화 단말 CPU의 내부 클록으로 하여 클록 계수기의 카운터의 정확성을 보장하고, 절대시간에 따라 클록 계수기를 동기화함으로써, 정확한 시간 기록을 달성한다.In addition, in one embodiment, the internal clock may be a clock counter, and the counter reference of the clock counter is an internal clock of the time synchronization terminal CPU to ensure the accuracy of the counter of the clock counter and synchronize the clock counter according to absolute time. , Achieve accurate time recording.

S302단계 : 미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하고, 상기 제 2 시간 동기화 메시지를 압축 해제하여 상기 전력량계의 로컬 클록의 제 3 시간을 획득한다.Step S302: Transmit the first time synchronization message to the watt hour at the first time by a preset communication protocol, receive the second time synchronization message fed back from the watt hour at the second time, and decompress the second time synchronization message The third time of the local clock of the watt-hour meter is obtained.

본 발명의 실시예에서, 제 1 시간 및 제 2 시간은 모두 내부 클록의 기록을 통해 획득되고, 제 3 시간은 전력량계의 로컬 클록의 시간이다.In the embodiment of the present invention, both the first time and the second time are obtained through the recording of the internal clock, and the third time is the time of the local clock of the watt hour meter.

S303단계 : 제 2 시간, 제 3 시간 및 전송 지연에 따라 상기 전력량계의 로컬 클록의 시간 오류를 획득하고; 시간 오류가 미리 설정된 시간 범위 내에 있는지 여부를 판단하고, 이에 따라 전력량계의 클록에 대한 동기화를 진행하는지 여부를 결정한다.Step S303: obtain a time error of the local clock of the watt hour meter according to the second time, the third time, and the transmission delay; It is determined whether or not the time error is within a preset time range, and accordingly, it is determined whether synchronization with the clock of the watt hour meter is performed.

일 실시예에서, 제 3 시간 및 전송 지연을 통해, 제 2 시간에서의 전력량계 로컬 클록의 실제 시간을 획득할 수 있기에, 전력량계 로컬 클록의 실제 시간 오류를 계산할 수 있으며, 상응하는 시간 동기화 전략을 설정함으로써, 예를 들어, 실제 시간 오류가 1 초를 초과하는 경우, 시간 동기화 동작을 수행하는 것으로 설정하거나, 실제 니즈에 따라 다른 시간 범위를 선택해도 되며, 본 발명의 실시예에서, 전력량계의 로컬 클록의 시간 오류를 계산하는 공식은 다음과 같다 :In one embodiment, since the actual time of the watt-hour local clock at the second time can be obtained through the third time and the transmission delay, the real-time error of the watt-hour local clock can be calculated, and a corresponding time synchronization strategy is established. By doing so, for example, if the actual time error exceeds 1 second, it may be set to perform a time synchronization operation, or a different time range may be selected according to actual needs, and in the embodiment of the present invention, the local clock of the watt hour meter The formula for calculating the time error of is:

Figure pct00004
Figure pct00004

여기서, dt0은 상기 전력량계의 로컬 클록의 시간 오류를 나타내고, T3는 제 3 시간을 나타내고, T2은 제 2 시간을 나타내고, dt2는 전송 지연을 나타낸다.Here, dt0 represents the time error of the local clock of the watt hour meter, T3 represents the third time, T2 represents the second time, and dt2 represents the transmission delay.

만약 시간 범위>1s 이면, dt0≤1s 인 경우, 전력량계에 대해 시간 동기화를 수행할 필요가 없고, 이번 시간 동기화 동작이 종료되고, dt0>1s 인 경우, 전력량계에 대한 시간 동기화를 수행하고 S304단계를 수행할 필요가 있다.If the time range>1s, when dt0≤1s, there is no need to perform time synchronization for the wattmeter, and this time synchronization operation ends, and if dt0>1s, perform time synchronization for the wattmeter and perform step S304. It needs to be done.

S304단계 : 상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하고 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득한다.Step S304: Acquire the processing delay of the first time synchronization message according to the first time, the second time and the transmission delay, and correct according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock Acquire time.

본 실시예에서, 먼저 전력량계가 메시지를 처리하는 처리 지연을 계산하고, 그 다음 전력량계가 메시지를 조립하는 메시지 조립 시간 및 메시지의 전송 지연을 결정해야 하며, 이로써 시간 교정 메시지 내의 교정 시간을 결정할 수 있다. In this embodiment, first the power meter needs to calculate the processing delay to process the message, and then the power meter needs to determine the message assembly time to assemble the message and the transmission delay of the message, thereby determining the correction time in the time calibration message. .

S305단계 : 시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하고, 상기 시간 교정 메시지는 상기 교정 시간을 포함한다.Step S305: Synchronize the local clock of the wattmeter by sending a time calibration message to the wattmeter, and the time calibration message includes the calibration time.

본 발명의 실시예에서, 교정 시간의 계산을 통해, 미리 설정된 통신 프로토콜에 따라, 시간 교정 메시지를 구축할 수 있고, 시간 동기화 단말은 시간 교정 메시지를 전력량계에 전송하여, 전력량계의 시간 동기화를 실현할 수 있다.In an embodiment of the present invention, through the calculation of the calibration time, according to a preset communication protocol, a time calibration message can be constructed, and the time synchronization terminal can transmit the time calibration message to the watt hour meter to realize time synchronization of the watt hour meter. have.

일 실시예에서, 도 7에 도시된 바와 같이, 시간 동기화 단말 및 전력량계는 물리적 링크에 의해 연결되고, 시간 동기화 단말과 전력량계 사이에서 송수신되는 메시지는 전력량계 통신 프로토콜을 만족시켜야 한다. 전력량계의 클록 동기화 방법이 제공되며, 해당 방법은 다음 단계를 포함한다:In one embodiment, as shown in FIG. 7, the time synchronization terminal and the power meter are connected by a physical link, and messages transmitted and received between the time synchronization terminal and the power meter must satisfy the power meter communication protocol. A method for clock synchronization of a watt hour meter is provided, which includes the following steps:

S401단계 : 시간 동기화 단말 측에서, 절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화한다.Step S401: At the time synchronization terminal side, an absolute time is acquired, and an internal clock is synchronized according to the absolute time.

일 실시예에서, 시간 동기화 단말은 하나의 기지국으로부터 절대시간을 획득할 수 있으며, 일반적으로, 기지국에는 GPS 모듈 또는 북두 모듈이 있으므로, 시간 동기화 단말은 하나의 기지국과 통신함으로써 기지국의 절대시간을 획득할 수 있다.In one embodiment, the time synchronization terminal can acquire the absolute time from one base station, and in general, since the base station has a GPS module or the North Star module, the time synchronization terminal acquires the absolute time of the base station by communicating with one base station. can do.

다른 실시예에서, 시간 동기화 단말은 복수의 기지국으로부터 절대시간을 획득한 후, 복수의 기지국의 시간 중 하나를 절대시간으로 선택할 수 있으며, 이로 하여 단일 기지국에 고장 발생으로 인한 시간 교정이 부정확한 문제를 피할 수 있으며, 구체적으로, 복수의 기지국의 시간이 일치한지를 비교함으로써, 가장 정확한 기지국의 시간을 판단하되 이를 절대시간으로 정한다.In another embodiment, after obtaining the absolute time from a plurality of base stations, the time synchronization terminal may select one of the times of the plurality of base stations as an absolute time, thereby causing an inaccurate time correction due to a failure in a single base station. In particular, by comparing whether the times of a plurality of base stations coincide, the time of the most accurate base station is determined, but this is determined as an absolute time.

또 다른 실시예에서, 시간 동기화 단말은 GPS 모듈 또는 북두 모듈을 포함하고, 로컬의 GPS 모듈 또는 북두 모듈을 통해 절대시간을 획득할 수 있다.In another embodiment, the time synchronization terminal may include a GPS module or a big head module, and acquire an absolute time through a local GPS module or a big head module.

또한, 일 실시예에서, 내부 클록은 클록 계수기일 수 있고, 클록 계수기의 카운터 기준은 시간 동기화 단말 CPU의 내부 클록으로 하여 클록 계수기의 카운터의 정확성을 보장하고, 절대시간에 따라 클록 계수기를 동기화함으로써, 정확한 시간 기록을 달성한다.In addition, in one embodiment, the internal clock may be a clock counter, and the counter reference of the clock counter is an internal clock of the time synchronization terminal CPU to ensure the accuracy of the counter of the clock counter and synchronize the clock counter according to absolute time. , Achieve accurate time recording.

S402단계 : 시간 동기화 단말 측에서, 물리적 링크를 통해 전력량계 통신 프로토콜에 부합하는 제 1 시간 동기화 메시지를 제 1 시간에 전력량계로 전송한다.Step S402: The time synchronization terminal side transmits a first time synchronization message conforming to the power meter communication protocol through the physical link to the power meter at the first time.

S403단계 : 전력량계 측에서, 제 1 시간 동기화 메시지를 수신하고 제 1 시간 동기화 메시지를 처리하고, 물리적 링크를 통해 전력량계 통신 프로토콜에 부합하는 제 2 시간 동기화 메시지를 시간 동기화 단말에 피드백하고, 여기서 제 2 시간 동기화 메시지는 전력량계의 로컬 클록의 제 3 시간을 포함한다. Step S403: On the power meter side, receive the first time synchronization message, process the first time synchronization message, and feed back a second time synchronization message conforming to the power meter communication protocol through the physical link to the time synchronization terminal, where the second time The time synchronization message includes the third time of the local clock of the watt hour meter.

S404단계 : 시간 동기화 단말 측에서, 제 2 시간 동기화 메시지를 수신하고, 이 시각을 제 2 시간으로 기록하고; 제 2 메시지를 처리하여 제 2 시간 동기화 메시지에 포함된 전력량계의 로컬 클록의 제 3 시간을 획득한다. Step S404: On the time synchronization terminal side, receive the second time synchronization message, and record this time as the second time; The second message is processed to obtain a third time of the local clock of the watt hour meter included in the second time synchronization message.

일 실시예에서, 물리적 링크의 보드레이트는 S이고, 제 2 시간 동기화 메시지의 제 2 메시지 길이 L2를 획득할 수 있고, 통신 링크에서 제 2 시간 동기화 메시지의 코딩 길이는 m이므로, 제 2 시간 동기화 메시지를 전력량계로부터 시간 동기화 단말까지 전송하는 전송 지연

Figure pct00005
이고, 이어서 제 2 시간 T2에서 전력량계의 추정 시간
Figure pct00006
이고, 따라서 전력량계 로컬 클록의 시간 오류는
Figure pct00007
이다.In one embodiment, since the baud rate of the physical link is S, the second message length L2 of the second time synchronization message can be obtained, and the coding length of the second time synchronization message in the communication link is m, the second time synchronization Transmission delay for sending a message from the watt hour meter to the time synchronization terminal
Figure pct00005
And then the estimated time of the watt hour meter at the second time T2
Figure pct00006
And thus the time error of the wattmeter local clock is
Figure pct00007
to be.

다른 실시예에서, dt0이 초단위의 동기화 요구를 충족시키는지 여부도 판단해야 하며, 만약 충족시킨다면, 추가의 시간 동기화가 필요하지 않고 전체 시간 동기화 프로세스가 종료되고, 충족시키지 않으면, S405단계가 더 수행되어야 한다.In another embodiment, it is also necessary to determine whether dt0 satisfies the synchronization request in seconds, and if so, the additional time synchronization is not required and the entire time synchronization process is terminated. If not, step S405 is further provided. Should be performed.

S405단계 : 시간 동기화 단말 측에서, 상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득한다.Step S405: At the time synchronization terminal side, a processing delay of the first time synchronization message is acquired according to the first time, the second time, and the transmission delay.

일 실시예에서, 제 1 시간 동기화 메시지의 제 1 메시지 길이 L1, 상기 물리적 링크의 보드레이트 S 및 통신 링크에서의 제 1 시간 동기화 메시지의 코딩 길이 m을 획득하고, 상기 제 1 메시지 길이 L1, 상기 RS485 인터페이스의 보드레이트 S 및 통신 링크에서의 제 1 시간 동기화 메시지의 코딩 길이 m에 따라 상기 제 1 시간 동기화 메시지의 전송 지연 dt1을 획득한다. 제 1 시간 동기화 메시지의 전송 지연 dt1은 다음과 같은 공식으로 나타낼 수 있다:In one embodiment, the first message length L1 of the first time synchronization message, the baud rate S of the physical link and the coding length m of the first time synchronization message on the communication link are obtained, and the first message length L1, the The transmission delay dt1 of the first time synchronization message is obtained according to the baud rate S of the RS485 interface and the coding length m of the first time synchronization message on the communication link. The transmission delay dt1 of the first time synchronization message can be expressed by the following formula:

Figure pct00008
Figure pct00008

제 2 시간 동기화 메시지의 전송 지연 dt2는 다음과 같은 공식으로 나타낼 수 있다:The transmission delay dt2 of the second time synchronization message can be expressed by the following formula:

Figure pct00009
Figure pct00009

이어서 제 1 메시지의 전송 지연 dt3은 다음과 같은 공식으로 나타낼 수 있다:Then, the transmission delay dt3 of the first message can be expressed by the following formula:

Figure pct00010
Figure pct00010

여기서, 물리적 링크는 RS485 인터페이스 링크, RS232 인터페이스 링크, 이더넷 인터페이스 링크 등일 수 있고, 전력량계 통신 프로토콜은 DL/T645 통신 프로토콜 일 수 있고, RS485 인터페이스의 통신 링크에서 통신 보드레이트는 2400bps로 설정될 수 있고, 통신 링크에서의 제 1 시간 동기화 메시지 및 제 2 시간 동기화 메시지의 코딩 길이 m은 모두 제 1 시간 동기화 메시지 및 제 2 시간 동기화 메시지의 각 바이트의 코딩 길이를 나타낸다. 예를 들어, 제 1 시간 동기화 메시지의 메시지 길이는 8 바이트이라면, 통신 링크에서의 코딩 길이 m = 10이다.Here, the physical link may be an RS485 interface link, an RS232 interface link, an Ethernet interface link, etc., and the power meter communication protocol may be a DL/T645 communication protocol, and a communication baud rate in the communication link of the RS485 interface may be set to 2400 bps, The coding length m of the first time synchronization message and the second time synchronization message on the communication link both indicate the coding length of each byte of the first time synchronization message and the second time synchronization message. For example, if the message length of the first time synchronization message is 8 bytes, the coding length m = 10 in the communication link.

S406단계 : 시간 동기화 단말 측에서, 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득한다.Step S406: At the time synchronization terminal side, a correction time is obtained according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock.

본 발명의 실시예에서, 시간 동기화 오류에 영향을 미치는 것은 메시지 전송의 지연이고, 이어서, 각 지연을 계산한 후, 시간 교정 메시지를 전송한 시간에 따라 교정 시간을 획득할 수 있다.In an embodiment of the present invention, it is the delay of the message transmission that affects the time synchronization error, and then, after calculating each delay, it is possible to obtain the correction time according to the time at which the time correction message was transmitted.

일 실시예에서, 교정 시간 T5는 다음과 간은 공식으로 나타낼 수 있다.In one embodiment, the calibration time T5 may be expressed by the following formula.

Figure pct00011
Figure pct00011

여기서, T5는 상기 시간 교정 메시지 중의 교정 시간을 나타내고, T4는 내부 클록에 의해 기록된 상기 시간 교정 메시지를 전송한 시간을 나타내고, dt4는 상기 시간 교정 메시지의 전송 지연을 나타내고, dt5는 미리 결정된 메시지 조립 시간을 나타낸다.Here, T5 represents the calibration time in the time calibration message, T4 represents the time at which the time calibration message recorded by the internal clock is transmitted, dt4 represents the transmission delay of the time calibration message, and dt5 is a predetermined message. Shows the assembly time.

구체적으로, 시간 교정 메시지를 T4시각에 전력량계로 전송하고, 이어서 시간 교정 메시지에 실제로 포함된 교정 시간은 T5이고, 이로써 전력량계의 정확한 시간 동기화를 실현할 수 있다. Specifically, the time calibration message is transmitted to the watt hour meter at time T4, and then the calibration time actually included in the time calibration message is T5, thereby enabling accurate time synchronization of the watt hour meter.

S407단계 : 시간 동기화 단말 측에서, 시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하고, 상기 시간 교정 메시지는 상기 교정 시간을 포함한다.Step S407: At the time synchronization terminal side, a time calibration message is transmitted to the watt-hour meter to synchronize the local clock of the watt-hour meter, and the time calibration message includes the calibration time.

S408단계 : 전력량계 측에서, 시간 교정 메시지를 수신하고 로컬 클록에 대한 교정을 진행한다.Step S408: On the wattmeter side, a time calibration message is received and calibration is performed on the local clock.

S409단계 : 시간 동기화 단말 측에서, 미리 설정된 시간만큼 대기하고, 전력량계의 로컬 클록 시간을 요청하는 제 3 시간 동기화 메시지를 전력량계에 다시 전송한다. Step S409: The time synchronization terminal side waits for a preset time and transmits a third time synchronization message requesting the local clock time of the watt hour meter to the watt hour meter again.

S410단계 : 전력량계 측에서, 제 3 시간 동기화 메시지을 수신하고, 전력량계의 로컬 클록 시간을 포함한 제 4 시간 동기화 메시지를 생성하여 시간 동기화 단말에 전송한다.Step S410: On the power meter side, a third time synchronization message is received, and a fourth time synchronization message including the local clock time of the power meter is generated and transmitted to the time synchronization terminal.

S411단계 : 시간 동기화 단말 측에서, 제 4 시간 동기화 메시지를 수신 및 처리하고, 전력량계의 로컬 클록의 시간이 정확한지 여부를 계산하고, 정확한 경우 시간 동기화 동작을 중단한다.Step S411: The time synchronization terminal side receives and processes the fourth time synchronization message, calculates whether the time of the local clock of the watt hour meter is correct, and if it is correct, stops the time synchronization operation.

비록 도 2 및 도 3의 흐름도의 각 단계가 화살표의 방향에 따라 순차적으로 표시되지만, 이러한 단계들은 반드시 화살표로 표시된 순서대로 수행되는 것은 아님을 이해해야 한다. 본 명세서에서 명시적으로 언급되지 않는 한, 이러한 단계들의 실행 순서는 엄격하게 제한되지 않으며, 이러한 단계는 다른 순서로 실행될 수 있다. 그리고, 도 2 및 도 3의 단계들 중 적어도 일부는 복수의 하위 단계 또는 복수의 절차를 포함할 수 있고, 이러한 하위 단계 또는 절차는 반드시 동시에 실행되는 것이 아닌 상이한 시간에 실행될 수 있으며, 이러한 하위 단계 또는 절차의 실행 시퀀스 다이어그램은 반드시 순차적으로 진행되는 것이 아닌 다른 단계 또는 다른 단계의 하위 단계 또는 절차의 적어도 일부와 순차대로 또는 교대로 실행될 수 있다.Although each step in the flowcharts of FIGS. 2 and 3 is sequentially displayed according to the direction of the arrow, it should be understood that these steps are not necessarily performed in the order indicated by the arrow. Unless explicitly stated herein, the order of execution of these steps is not strictly limited, and these steps may be performed in a different order. And, at least some of the steps of FIGS. 2 and 3 may include a plurality of sub-steps or a plurality of procedures, and these sub-steps or procedures may be executed at different times, not necessarily simultaneously, and these sub-steps Alternatively, the execution sequence diagram of the procedure may be executed sequentially or alternately with at least a portion of another step or sub-step or procedure of another step that is not necessarily sequentially.

일 실시예에서, 도 8에 도시된 바와 같이, 내부 시간 동기화 모듈(502), 메시지 송수신 모듈(504), 지연 계산 모듈(506) 및 클록 동기화 모듈(508)을 포함하는 전력량계의 클록 동기화 장치가 제공된다.In one embodiment, as shown in Figure 8, the clock synchronization device of the power meter including an internal time synchronization module 502, a message transmission and reception module 504, a delay calculation module 506 and a clock synchronization module 508 Is provided.

여기서, 내부 시간 동기화 모듈(502)은 절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화하도록 구성된다.Here, the internal time synchronization module 502 is configured to acquire an absolute time and synchronize the internal clock according to the absolute time.

메시지 송수신 모듈(504)은 미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하도록 구성되며; 상기 제 1 시간 및 상기 제 2 시간은 내부 클록의 시간이다.The message transmitting and receiving module 504 is configured to transmit the first time synchronization message to the watt hour meter at the first time by a preset communication protocol, and to receive the second time synchronization message fed back from the watt hour meter at the second time; The first time and the second time are times of an internal clock.

지연 계산 모듈(506)은 상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하고; 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득하도록 구성된다.The delay calculation module 506 obtains the processing delay of the first time synchronization message according to the first time, the second time and the transmission delay; It is configured to obtain a calibration time according to the processing delay, transmission delay, predetermined message assembly time and time of the internal clock.

클록 동기화 모듈(508)은 시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하도록 구성되며, 상기 시간 교정 메시지는 상기 교정 시간을 포함한다.A clock synchronization module 508 is configured to send a time calibration message to the wattmeter to synchronize the local clock of the wattmeter, the time calibration message including the calibration time.

일 실시예에서, 상기 제 2 시간 동기화 메시지를 압축 해제하여 상기 전력량계의 로컬 클록의 제 3 시간을 획득하고; 상기 제 2 시간, 제 3 시간 및 전송 지연에 따라 상기 전력량계의 로컬 클록의 시간 오류를 획득하고; 상기 시간 오류가 미리 설정된 시간 범위 내에 있는지 여부를 판단하고, 이에 따라 전력량계의 로컬 클록에 대한 동기화를 진행하기 위한 교정 판단 모듈을 더 포함한다.In one embodiment, decompressing the second time synchronization message to obtain a third time of the local clock of the watt hour meter; Acquire a time error of the local clock of the watt hour meter according to the second time, the third time and the transmission delay; It further includes a calibration determination module for determining whether the time error is within a preset time range and accordingly synchronizing the local clock of the watt hour meter.

일 실시예에서, 교정 판단 모듈은 또한 상기 전력량계의 로컬 클록의 시간 오류를 계산하도록 구성되며, 계산 공식은 아래와 같다.In one embodiment, the calibration determination module is also configured to calculate the time error of the local clock of the wattmeter, the calculation formula is as follows.

Figure pct00012
Figure pct00012

여기서, dt0은 상기 전력량계의 로컬 클록의 시간 오류를 나타내고, T2는 제 2 시간을 나타내고, T3은 제 3 시간을 나타내고, dt2는 전송 지연을 나타낸다.Here, dt0 represents the time error of the local clock of the watt-hour meter, T2 represents the second time, T3 represents the third time, and dt2 represents the transmission delay.

일 실시예에서, 메시지 송수신 모듈(504)은 또한 물리적 링크의 전력량계 통신 프로토콜을 통해, 전력량계 통신 프로토콜에 부합하는 제 1 시간 동기화 메시지를 제 1 시간에 전력량계로 전송하고, 전력량계로부터 피드백된 전력량계 통신 프로토콜에 부합하는 제 2 시간 동기화 메시지를 제 2 시간에 수신하도록 구성된다.In one embodiment, the message transmitting and receiving module 504 also transmits a first time synchronization message conforming to the watt hour communication protocol to the watt hour meter at a first time through the watt hour communication protocol of the physical link, and the watt hour communication communication protocol fed back from the watt hour meter. And a second time synchronization message conforming to the second time.

일 실시예에서, 지연 계산 모듈(506)은 또한 제 1 시간 동기화 메시지의 제 1 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 1 시간 동기화 메시지의 코딩 길이를 획득하고, 상기 제 1 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 1 시간 동기화 메시지의 코딩 길이에 따라 상기 제 1 시간 동기화 메시지의 전송 지연을 획득하고; 제 2 시간 동기화 메시지의 제 2 메시지 길이를 획득하고, 상기 제 2 메시지 길이 및 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 2 시간 동기화 메시지의 코딩 길이에 따라 제 2 시간 동기화 메시지의 전송 지연을 획득하도록 구성되며; 상기 제 1 시간 동기화 메시지의 처리 지연를 계산하는 공식은 아래와 같다.In one embodiment, the delay calculation module 506 also obtains the first message length of the first time synchronization message, the baud rate of the physical link and the coding length of the first time synchronization message on the communication link, and the first Obtain a transmission delay of the first time synchronization message according to the message length, the baud rate of the physical link and the coding length of the first time synchronization message on the communication link; Obtain a second message length of the second time synchronization message, and delay transmission of the second time synchronization message according to the second message length and the baud rate of the physical link and the coding length of the second time synchronization message on the communication link. Configured to obtain; The formula for calculating the processing delay of the first time synchronization message is as follows.

Figure pct00013
Figure pct00013

여기서, dt1은 제 1 시간 동기화 메시지의 전송 지연을 나타내고, dt2는 제 2 시간 동기화 메시지의 전송 지연을 나타내고, T1은 제 1 시간을 나타내고, T2는 제 2 시간을 나타내고, dt3은 제 1 시간 동기화 메시지의 처리 지연을 나타낸다.Here, dt1 represents the transmission delay of the first time synchronization message, dt2 represents the transmission delay of the second time synchronization message, T1 represents the first time, T2 represents the second time, and dt3 represents the first time synchronization Indicates the processing delay of the message.

일 실시예에서, 지연 계산 모듈(506)은 또한 상기 메시지 조립 시간 및 시간 교정 메시지의 메시지 길이를 미리 획득하고, 상기 시간 교정 메시지의 메시지 길이, 상기 RS485 인터페이스의 보드레이트 및 통신 링크에서의 시간 교정 메시지의 코딩 길이에 따라 상기 시간 교정 메시지의 전송 지연을 획득하도록 구성되며; 상기 시간 교정 메시지 중의 교정 시간을 계산하는 공식은 아래와 같다:In one embodiment, the delay calculation module 506 also obtains in advance the message assembly time and the message length of the time calibration message, the message length of the time calibration message, the baud rate of the RS485 interface and the time calibration in the communication link. Configured to obtain a transmission delay of the time calibration message according to the coding length of the message; The formula for calculating the calibration time in the time calibration message is as follows:

Figure pct00014
Figure pct00014

여기서, T5는 상기 시간 교정 메시지 중의 교정 시간을 나타내고, T4는 내부 클록에 의해 기록된 상기 시간 교정 메시지를 전송한 시간을 나타내고, dt4는 상기 시간 교정 메시지의 전송 지연을 나타내고, dt5는 미리 결정된 메시지 조립 시간을 나타낸다.Here, T5 represents the calibration time in the time calibration message, T4 represents the time at which the time calibration message recorded by the internal clock is transmitted, dt4 represents the transmission delay of the time calibration message, and dt5 is a predetermined message. Shows the assembly time.

일 실시예에서, 하나의 기지국으로부터 절대시간을 획득하고; 또는 복수의 기지국의 시간을 획득하고, 복수의 기지국의 시간 중 하나를 상기 절대시간으로 선택하고; 또는 내부 GPS 모듈 또는 북두 모듈을 통해 절대시간을 획득한다.In one embodiment, obtaining absolute time from one base station; Or acquire times of a plurality of base stations, and select one of the times of the plurality of base stations as the absolute time; Alternatively, the absolute time is acquired through the internal GPS module or the North Pole module.

전력량계의 클록 동기화 장치에 대한 구체적인 한정은 위의 전력량계의 클록 동기화 방법에 대한 한정을 참조할 수 있고, 상세한 설명은 여기서 생략한다. 전술한 전력량계의 클록 동기화 장치의 각 모듈은 소프트웨어, 하드웨어 및 이들의 조합을 통해 전체적으로 또는 부분적으로 구현될 수 있다. 전술한 각 모듈은 하드웨어 형태로 컴퓨터 설비의 프로세서에 내장되거나 독립될 수 있고, 또는 소프트웨어 형태로 컴퓨터 설비의 메모리에 저장될 수 있고, 이로써 프로세서가 호출하여 상기 각 모듈에 대응하는 동작을 수행하도록 한다.For a specific limitation on the clock synchronization device of the watt-hour meter, reference may be made to the limitation on the clock synchronization method of the watt-hour meter, and a detailed description thereof will be omitted here. Each module of the clock synchronizing device of the aforementioned watt-hour meter can be implemented in whole or in part through software, hardware, and combinations thereof. Each of the above-described modules may be embedded in a processor of a computer facility in a hardware form or may be stored in a memory of a computer facility in a software form, so that a processor calls to perform an operation corresponding to each module. .

일 실시예에서, 컴퓨터 설비가 제공되며, 상기 컴퓨터 설비는 서버일 수 있고, 그 내부 구조도는 도 9에 도시된 바와 같을 수 있다. 상기 컴퓨터 설비는 시스템 버스를 통해 연결된 프로세서, 메모리, 네트워크 인터페이스 및 데이터베이스를 포함한다. 여기서, 상기 컴퓨터 설비의 프로세서는 컴퓨팅 및 제어 기능을 제공하도록 구성된다. 상기 컴퓨터 설비의 메모리는 비휘발성 저장 매체 및 내부 메모리를 포함한다. 상기 비휘발성 저장 매체에는 오퍼레이팅 시스템, 컴퓨터 프로그램 및 데이터베이스가 저장되어 있다. 상기 내부 메모리는 비휘발성 저장 매체에 저장된 오퍼레이팅 시스템 및 컴퓨터 프로그램을 실행하기 위한 다이어그램을 제공한다. 상기 컴퓨터 설비의 데이터베이스는 전력량계의 클록 동기화의 데이터를 저장하도록 구성된다. 상기 컴퓨터 설비의 네트워크 인터페이스는 네트워크를 통해 외부 단말기와 연결하고 통신하도록 구성된다. 상기 컴퓨터 프로그램이 프로세서에 의해 실행될 경우 전력량계의 클록 동기화 방법이 구현된다.In one embodiment, a computer facility is provided, which may be a server, and its internal structure may be as shown in FIG. 9. The computer facility includes a processor, memory, network interface and database connected via a system bus. Here, the processor of the computer facility is configured to provide computing and control functions. The memory of the computer facility includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides a diagram for executing the operating system and computer program stored in the non-volatile storage medium. The database of the computer equipment is configured to store data of clock synchronization of the wattmeter. The network interface of the computer equipment is configured to connect and communicate with external terminals through a network. When the computer program is executed by a processor, a clock synchronization method of the watt-hour meter is implemented.

당업자는 도 9에 도시된 구조가 단지 본 출원의 방안과 관련된 일부 구조의 블록도이며, 본 출원의 방안이 적용되는 컴퓨터 설비에 대한 제한이 아니며, 구체적인 컴퓨터 설비는 도면에 표시된 것보다 많거나 적은 부품을 포함하거나, 어떤 부품을 결합하거나, 상이한 부품 배열을 가질 수 있음을 이해할 수 있다.Those skilled in the art are shown that the structure shown in FIG. 9 is a block diagram of some structures related only to the method of the present application, and is not a limitation on the computer equipment to which the method of the present application is applied, and the specific computer equipment is more or less than that shown in the drawings. It will be understood that parts may be included, some parts may be combined, or have a different arrangement of parts.

일 실시예에서, 메모리 및 프로세서를 포함하는 컴퓨터 설비가 제공되고, 메모리에 컴퓨터 프로그램이 저장되어 있고, 상기 프로세서가 컴퓨터 프로그램을 실행할 경우,In one embodiment, a computer facility comprising a memory and a processor is provided, a computer program is stored in the memory, and the processor executes the computer program,

절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화하는 단계;Obtaining an absolute time and synchronizing an internal clock according to the absolute time;

미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계; 상기 제 1 시간 및 상기 제 2 시간은 내부 클록의 시간이고;Transmitting a first time synchronization message to the watt hour meter at a first time by a preset communication protocol, and receiving a second time synchronization message fed back from the watt hour meter at the second time; The first time and the second time are times of an internal clock;

상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하는 단계; 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득하는 단계; 및Obtaining a processing delay of the first time synchronization message according to the first time, the second time, and a transmission delay; Obtaining a correction time according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock; And

시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하는 단계가 구현되며, 상기 시간 교정 메시지는 상기 교정 시간을 포함한다. A step of synchronizing the local clock of the wattmeter is implemented by sending a time calibration message to the wattmeter, and the time calibration message includes the calibration time.

일 실시예에서, 프로세서가 컴퓨터 프로그램을 실행할 경우, 상기 제 2 시간 동기화 메시지를 압축 해제하여 상기 전력량계의 로컬 클록의 제 3 시간을 획득하는 단계; 상기 제 2 시간, 제 3 시간 및 전송 지연에 따라 상기 전력량계의 로컬 클록의 시간 오류를 획득하는 단계; 상기 시간 오류가 미리 설정된 시간 범위 내에 있는지 여부를 판단하고, 이에 따라 전력량계의 로컬 클록에 대한 동기화를 진행하는지 여부를 결정하는 단계가 더 구현된다.In one embodiment, when the processor executes the computer program, decompressing the second time synchronization message to obtain a third time of the local clock of the wattmeter; Obtaining a time error of the local clock of the watt hour meter according to the second time, the third time and the transmission delay; The step of determining whether the time error is within a preset time range and determining whether to proceed with synchronization of the watt hour meter's local clock is further implemented.

일 실시예에서, 프로세서가 컴퓨터 프로그램을 실행할 경우, 상기 전력량계의 로컬 클록의 시간 오류를 계산하기 위한 아래와 같은 공식을 더 포함한다:In one embodiment, when the processor executes the computer program, it further includes the following formula for calculating the time error of the local clock of the wattmeter:

Figure pct00015
Figure pct00015

여기서, dt0은 상기 전력량계의 시간 오류를 나타내고, T2는 제 2 시간을 나타내고, T3은 제 3 시간을 나타내고, dt2는 전송 지연을 나타낸다.Here, dt0 represents the time error of the watt-hour meter, T2 represents the second time, T3 represents the third time, and dt2 represents the transmission delay.

일 실시예에서, 프로세서가 컴퓨터 프로그램을 실행할 경우, 물리적 링크의 전력량계 통신 프로토콜을 통해, 전력량계 통신 프로토콜에 부합하는 제 1 시간 동기화 메시지를 제 1 시간에 전력량계로 전송하고, 전력량계로부터 피드백된 전력량계 통신 프로토콜에 부합하는 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계가 더 구현된다.In one embodiment, when the processor executes the computer program, through the watt hour communication protocol of the physical link, the first time synchronization message conforming to the watt hour communication protocol is transmitted to the watt hour meter at the first time, and the watt hour communication communication feedback from the watt hour meter The step of receiving a second time synchronization message conforming to the second time is further implemented.

일 실시예에서, 프로세서가 컴퓨터 프로그램을 실행할 경우, 제 1 시간 동기화 메시지의 제 1 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 1 시간 동기화 메시지의 코딩 길이를 획득하고, 상기 제 1 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 1 시간 동기화 메시지의 코딩 길이에 따라 상기 제 1 시간 동기화 메시지의 전송 지연을 획득하는 단계; 제 2 시간 동기화 메시지의 제 2 메시지 길이를 획득하고, 상기 제 2 메시지 길이 및 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 2 시간 동기화 메시지의 코딩 길이에 따라 제 2 시간 동기화 메시지의 전송 지연을 획득하는 단계가 더 구현되며; 상기 제 1 시간 동기화 메시지의 처리 지연를 계산하는 공식은 아래와 같다:In one embodiment, when the processor executes the computer program, the first message length of the first time synchronization message, the baud rate of the physical link and the coding length of the first time synchronization message on the communication link are obtained, and the first Obtaining a transmission delay of the first time synchronization message according to a message length, a baud rate of the physical link, and a coding length of a first time synchronization message on a communication link; Obtain a second message length of the second time synchronization message, and delay transmission of the second time synchronization message according to the second message length and the baud rate of the physical link and the coding length of the second time synchronization message on the communication link. The step of obtaining is further implemented; The formula for calculating the processing delay of the first time synchronization message is as follows:

Figure pct00016
Figure pct00016

여기서, dt1은 제 1 시간 동기화 메시지의 전송 지연을 나타내고, dt2는 제 2 시간 동기화 메시지의 전송 지연을 나타내고, T1은 제 1 시간을 나타내고, T2는 제 2 시간을 나타내고, dt3은 제 1 시간 동기화 메시지의 처리 지연을 나타낸다.Here, dt1 represents the transmission delay of the first time synchronization message, dt2 represents the transmission delay of the second time synchronization message, T1 represents the first time, T2 represents the second time, and dt3 represents the first time synchronization Indicates the processing delay of the message.

일 실시예에서, 프로세서가 컴퓨터 프로그램을 실행할 경우, 상기 메시지 조립 시간 및 시간 교정 메시지의 메시지 길이를 미리 획득하고, 상기 시간 교정 메시지의 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 시간 교정 메시지의 코딩 길이에 따라 상기 시간 교정 메시지의 전송 지연을 획득하는 단계가 더 구현되며, 상기 시간 교정 메시지 중의 교정 시간을 계산하는 공식은 아래와 같다:In one embodiment, when the processor executes the computer program, the message assembly time and the message length of the time calibration message are obtained in advance, the message length of the time calibration message, the baud rate of the physical link, and the time calibration on the communication link The step of obtaining the transmission delay of the time calibration message according to the coding length of the message is further implemented, and the formula for calculating the calibration time in the time calibration message is as follows:

Figure pct00017
Figure pct00017

여기서, T5는 상기 시간 교정 메시지 중의 교정 시간을 나타내고, T4는 내부 클록에 의해 기록된 상기 시간 교정 메시지를 전송한 시간을 나타내고, dt4는 상기 시간 교정 메시지의 전송 지연을 나타내고, dt5는 미리 결정된 메시지 조립 시간을 나타낸다.Here, T5 represents the calibration time in the time calibration message, T4 represents the time at which the time calibration message recorded by the internal clock is transmitted, dt4 represents the transmission delay of the time calibration message, and dt5 is a predetermined message. Shows the assembly time.

일 실시예에서, 프로세서가 컴퓨터 프로그램을 실행할 경우, 하나의 기지국으로부터 절대시간을 획득하는 단계; 또는 복수의 기지국의 시간을 획득하고, 복수의 기지국의 시간 중 하나를 상기 절대시간으로 선택하는 단계; 또는 내부 GPS 모듈 또는 북두 모듈을 통해 절대시간을 획득하는 단계가 더 구현된다.In one embodiment, when the processor executes the computer program, obtaining absolute time from one base station; Or obtaining times of a plurality of base stations and selecting one of the times of the plurality of base stations as the absolute time; Alternatively, the step of acquiring the absolute time through the internal GPS module or the North Pole module is further implemented.

일 실시예에서, 컴퓨터 프로그램이 저장된 컴퓨터 판독 가능 저장 매체가 제공되며, 컴퓨터 프로그램이 프로세서에 의해 실행될 경우,In one embodiment, a computer readable storage medium in which a computer program is stored is provided, and when the computer program is executed by a processor,

절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화하는 단계;Obtaining an absolute time and synchronizing an internal clock according to the absolute time;

미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계; 상기 제 1 시간 및 상기 제 2 시간은 내부 클록의 시간이고;Transmitting a first time synchronization message to the watt hour meter at a first time by a preset communication protocol, and receiving a second time synchronization message fed back from the watt hour meter at the second time; The first time and the second time are times of an internal clock;

상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하는 단계; 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득하는 단계; 및Obtaining a processing delay of the first time synchronization message according to the first time, the second time, and a transmission delay; Obtaining a correction time according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock; And

시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하는 단계가 구현되며, 상기 시간 교정 메시지는 상기 교정 시간을 포함한다.A step of synchronizing the local clock of the wattmeter is implemented by sending a time calibration message to the wattmeter, and the time calibration message includes the calibration time.

일 실시예에서, 컴퓨터 프로그램이 프로세서에 의해 실행될 경우, 상기 제 2 시간 동기화 메시지를 압축 해제하여 상기 전력량계의 로컬 클록의 제 3 시간을 획득하는 단계; 상기 제 2 시간, 제 3 시간 및 전송 지연에 따라 상기 전력량계의 로컬 클록의 시간 오류를 획득하는 단계; 상기 시간 오류가 미리 설정된 시간 범위 내에 있는지 여부를 판단하고, 이에 따라 전력량계의 로컬 클록에 대한 동기화를 진행하는지 여부를 결정하는 단계가 더 구현된다.In one embodiment, when the computer program is executed by a processor, decompressing the second time synchronization message to obtain a third time of the local clock of the wattmeter; Obtaining a time error of the local clock of the watt hour meter according to the second time, the third time and the transmission delay; The step of determining whether the time error is within a preset time range and determining whether to proceed with synchronization of the watt hour meter's local clock is further implemented.

일 실시예에서, 컴퓨터 프로그램이 프로세서에 의해 실행될 경우, 상기 전력량계의 로컬 클록의 시간 오류를 계산하는 공식은 아래와 같다:In one embodiment, when a computer program is executed by a processor, the formula for calculating the time error of the local clock of the watt hour meter is as follows:

Figure pct00018
Figure pct00018

여기서, dt0은 상기 전력량계의 로컬 클록의 시간 오류를 나타내고, T2는 제 2 시간을 나타내고, T3은 제 3 시간을 나타내고, dt2는 전송 지연을 나타낸다.Here, dt0 represents the time error of the local clock of the watt-hour meter, T2 represents the second time, T3 represents the third time, and dt2 represents the transmission delay.

일 실시예에서, 컴퓨터 프로그램이 프로세서에 의해 실행될 경우, 물리적 링크의 전력량계 통신 프로토콜을 통해, 전력량계 통신 프로토콜에 부합하는 제 1 시간 동기화 메시지를 제 1 시간에 전력량계로 전송하고, 전력량계로부터 피드백된 전력량계 통신 프로토콜에 부합하는 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계가 더 구현된다.In one embodiment, when the computer program is executed by the processor, through a watt hour communication protocol of the physical link, a first time synchronization message conforming to the watt hour communication protocol is transmitted to the watt hour meter at the first time, and the watt meter communication fed back from the watt hour meter The step of receiving a second time synchronization message conforming to the protocol at the second time is further implemented.

일 실시예에서, 컴퓨터 프로그램이 프로세서에 의해 실행될 경우, 제 1 시간 동기화 메시지의 제 1 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 1 시간 동기화 메시지의 코딩 길이를 획득하고, 상기 제 1 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 1 시간 동기화 메시지의 코딩 길이에 따라 상기 제 1 시간 동기화 메시지의 전송 지연을 획득하는 단계; 제 2 시간 동기화 메시지의 제 2 메시지 길이를 획득하고, 상기 제 2 메시지 길이 및 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 2 시간 동기화 메시지의 코딩 길이에 따라 제 2 시간 동기화 메시지의 전송 지연을 획득하는 단계가 더 구현되며; 상기 제 1 시간 동기화 메시지의 처리 지연를 계산하는 공식은 아래와 같다:In one embodiment, when a computer program is executed by a processor, the first message length of the first time synchronization message, the baud rate of the physical link and the coding length of the first time synchronization message on the communication link are obtained, Obtaining a transmission delay of the first time synchronization message according to a message length, a baud rate of the physical link, and a coding length of a first time synchronization message on a communication link; Obtain a second message length of the second time synchronization message, and delay transmission of the second time synchronization message according to the second message length and the baud rate of the physical link and the coding length of the second time synchronization message on the communication link. The step of obtaining is further implemented; The formula for calculating the processing delay of the first time synchronization message is as follows:

Figure pct00019
Figure pct00019

여기서, dt1은 제 1 시간 동기화 메시지의 전송 지연을 나타내고, dt2는 제 2 시간 동기화 메시지의 전송 지연을 나타내고, T1은 제 1 시간을 나타내고, T2는 제 2 시간을 나타내고, dt3은 제 1 시간 동기화 메시지의 처리 지연을 나타낸다.Here, dt1 represents the transmission delay of the first time synchronization message, dt2 represents the transmission delay of the second time synchronization message, T1 represents the first time, T2 represents the second time, and dt3 represents the first time synchronization Indicates the processing delay of the message.

일 실시예에서, 컴퓨터 프로그램이 프로세서에 의해 실행될 경우, 상기 메시지 조립 시간 및 시간 교정 메시지의 메시지 길이를 미리 획득하고, 상기 시간 교정 메시지의 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 시간 교정 메시지의 코딩 길이에 따라 상기 시간 교정 메시지의 전송 지연을 획득하는 단계가 더 구현되며, 상기 시간 교정 메시지 중의 교정 시간을 계산하는 공식은 아래와 같다:In one embodiment, when a computer program is executed by a processor, the message assembly time and the message length of the time calibration message are obtained in advance, the message length of the time calibration message, the baud rate of the physical link, and the time on the communication link. The step of obtaining the transmission delay of the time calibration message according to the coding length of the calibration message is further implemented, and a formula for calculating the calibration time in the time calibration message is as follows:

Figure pct00020
Figure pct00020

여기서, T5는 상기 시간 교정 메시지 중의 교정 시간을 나타내고, T4는 내부 클록에 의해 기록된 상기 시간 교정 메시지를 전송한 시간을 나타내고, dt4는 상기 시간 교정 메시지의 전송 지연을 나타내고, dt5는 미리 결정된 메시지 조립 시간을 나타낸다.Here, T5 represents the calibration time in the time calibration message, T4 represents the time at which the time calibration message recorded by the internal clock is transmitted, dt4 represents the transmission delay of the time calibration message, and dt5 is a predetermined message. Shows the assembly time.

일 실시예에서, 컴퓨터 프로그램이 프로세서에 의해 실행될 경우, 하나의 기지국으로부터 절대시간을 획득하는 단계; 또는 복수의 기지국의 시간을 획득하고, 복수의 기지국의 시간 중 하나를 상기 절대시간으로 선택하는 단계; 또는 내부 GPS 모듈 또는 북두 모듈을 통해 절대시간을 획득하는 단계가 더 구현된다.In one embodiment, when the computer program is executed by a processor, obtaining an absolute time from one base station; Or obtaining times of a plurality of base stations and selecting one of the times of the plurality of base stations as the absolute time; Alternatively, the step of acquiring the absolute time through the internal GPS module or the North Pole module is further implemented.

당업자는, 전술한 실시예의 방법에서의 전부 또는 일부 프로세스는 컴퓨터 프로그램을 통해 관련 하드웨어를 지시하는 것으로 이루어질 수 있고, 상기 컴퓨터 프로그램은 비휘발성 컴퓨터 판독 가능 저장 매체에 저장될 수 있으며, 상기 컴퓨터 프로그램이 실행될 경우, 전술한 각 방법의 실시예의 프로세스를 포함할 수 있음을 이해할 수 있다. 여기서, 본 출원에 제공된 각 실시예에서 사용된 메모리, 스토리지, 데이터베이스 또는 기타 매체에 대한 모든 인용은 모두 비휘발성 및/또는 휘발성 메모리를 포함할 수 있다. 비휘발성 메모리는 판독 전용 메모리(ROM), 프로그래머블 ROM (PROM), 전기적 프로그래머블 ROM(EPROM), 전기적 소거 가능 프로그래머블 ROM(EEPROM) 또는 플래시 메모리를 포함할 수 있다. 휘발성 메모리는 랜덤 액세스 메모리(RAM) 또는 외부 고속 버퍼 메모리를 포함할 수 있다. 설명으로 제한적인 것은 아니며, RAM은 여러 형태로 얻을 수 있으며, 예로 정적 RAM (SRAM), 동적 RAM(DRAM), 동기식 DRAM(SDRAM), 더블 데이터 레이트 SDRAM (DDRSDRAM), 향상형 SDRAM(ESDRAM), 동기 링크(Synchlink) DRAM (SLDRAM), 메모리 버스(Rambus) 다이렉트 RAM(RDRAM), 다이렉트 메모리 버스 DRAM(DRDRAM) 및 메모리 버스 DRAM(RDRAM) 등 이다. Those skilled in the art, all or part of the process in the method of the above-described embodiment may consist of directing related hardware through a computer program, and the computer program may be stored in a non-volatile computer readable storage medium, and the computer program It will be understood that, when implemented, may include processes of embodiments of each method described above. Here, all references to the memory, storage, database, or other medium used in each embodiment provided in the present application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrical programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external high-speed buffer memory. The description is not limiting, and RAM can be obtained in several forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus DRAM (DRDRAM), and memory bus DRAM (RDRAM).

상술한 실시예의 각 기술적 특징은 임의로 조합될 수 있으며, 설명의 간결함을 위해 상기 실시예의 각 기술적 특징에 대한 모든 가능한 조합을 설명하지 않았지만, 이러한 기술적 특징의 조합에 모순이 존재하지 않는 한, 모두 본 명세서의 범위로 간주되어야 한다. Each technical feature of the above-described embodiment may be arbitrarily combined, and for the sake of brevity, all possible combinations of each technical feature of the above-described embodiments have not been described, but unless there is a contradiction in the combination of these technical features, all of the present It should be considered the scope of the specification.

전술한 실시예는 단지 본 출원의 특정 실시예를 나타내며, 그에 대한 설명은 보다 구체적이고 상세하게 기술되어 있지만, 본 발명의 범위를 제한하는 것으로 의도되지 않는다. 당업자는 본 출원의 개념을 벗어나지 않고 여러 가지 변형 및 개선을 행할 수 있으며, 이들은 모두 본 출원의 보호 범위 내에 속한다는 것이 명백할 것이다. 따라서, 본 출원의 범위는 첨부된 청구 범위에 의해 결정된다.The above-described embodiments merely represent specific embodiments of the present application, the description of which is described in more detail and in detail, but is not intended to limit the scope of the present invention. Those skilled in the art can make various modifications and improvements without departing from the concept of the present application, and it will be apparent that they are all within the protection scope of the present application. Accordingly, the scope of the present application is determined by the appended claims.

Claims (10)

전력량계의 클록 동기화 방법으로서,
절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화하는 단계;
미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계; 상기 제 1 시간 및 상기 제 2 시간은 내부 클록의 시간이고;
상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하는 단계; 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득하는 단계; 및
시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하는 단계를 포함하되, 상기 시간 교정 메시지는 상기 교정 시간을 포함하는 것을 특징으로 하는 전력량계의 클록 동기화 방법.
As a clock synchronization method of the watt-hour meter,
Obtaining an absolute time and synchronizing an internal clock according to the absolute time;
Transmitting a first time synchronization message to the watt hour meter at a first time by a preset communication protocol, and receiving a second time synchronization message fed back from the watt hour meter at the second time; The first time and the second time are times of an internal clock;
Obtaining a processing delay of the first time synchronization message according to the first time, the second time, and a transmission delay; Obtaining a correction time according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock; And
And synchronizing a local clock of the wattmeter by sending a time calibration message to the wattmeter, wherein the time calibration message includes the calibration time.
제1항에 있어서,
상기 제 2 시간 동기화 메시지를 압축 해제하여 상기 전력량계의 로컬 클록의 제 3 시간을 획득하는 단계;
상기 제 2 시간, 제 3 시간 및 전송 지연에 따라 상기 전력량계의 로컬 클록의 시간 오류를 획득하는 단계;
상기 시간 오류가 미리 설정된 시간 범위 내에 있는지 여부를 판단하고, 이에 따라 전력량계의 로컬 클록에 대한 동기화를 진행하는지 여부를 결정하는 단계를 더 포함하는 것을 특징으로 하는 전력량계의 클록 동기화 방법.
According to claim 1,
Decompressing the second time synchronization message to obtain a third time of the local clock of the watt hour meter;
Obtaining a time error of the local clock of the watt hour meter according to the second time, the third time and the transmission delay;
And determining whether the time error is within a preset time range and, accordingly, determining whether to synchronize the wattmeter with a local clock.
제2항에 있어서,
상기 제 2 시간, 제 3 시간 및 전송 지연에 따라 상기 전력량계의 로컬 클록의 시간 오류를 획득하는 단계는,
상기 전력량계의 로컬 클록의 시간 오류를 계산하는 공식:
Figure pct00021

을 포함하되,
여기서 dt0은 상기 전력량계의 로컬 클록의 시간 오류를 나타내고, T2는 제 2 시간을 나타내고, T3은 제 3 시간을 나타내고, dt2는 전송 지연을 나타내는 것을 특징으로 하는 전력량계의 클록 동기화 방법.
According to claim 2,
Obtaining a time error of the local clock of the watt hour meter according to the second time, the third time and the transmission delay,
Formula for calculating the time error of the local clock of the wattmeter:
Figure pct00021

Including,
Here, dt0 represents the time error of the local clock of the wattmeter, T2 represents the second time, T3 represents the third time, and dt2 represents the transmission delay.
제1항에 있어서,
상기 미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계는,
물리적 링크의 전력량계 통신 프로토콜을 통해, 전력량계 통신 프로토콜에 부합하는 제 1 시간 동기화 메시지를 제 1 시간에 전력량계로 전송하고, 전력량계로부터 피드백된 전력량계 통신 프로토콜에 부합하는 제 2 시간 동기화 메시지를 제 2 시간에 수신하는 단계를 포함하는 것을 특징으로 하는 전력량계의 클록 동기화 방법.
According to claim 1,
Transmitting a first time synchronization message to the watt hour at the first time by the preset communication protocol, and receiving the second time synchronization message fed back from the watt hour at the second time,
Through the watt hour communication protocol of the physical link, a first time synchronization message conforming to the watt hour communication protocol is transmitted to the watt hour meter at the first time, and a second time synchronization message compliant with the watt hour communication message fed back from the watt hour meter is provided at the second time A method for synchronizing a clock of a watt-hour meter, comprising the step of receiving.
제4항에 있어서,
상기의 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하는 단계는,
제 1 시간 동기화 메시지의 제 1 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 1 시간 동기화 메시지의 코딩 길이를 획득하고, 상기 제 1 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 1 시간 동기화 메시지의 코딩 길이에 따라 상기 제 1 시간 동기화 메시지의 전송 지연을 획득하는 단계;
제 2 시간 동기화 메시지의 제 2 메시지 길이를 획득하고, 상기 제 2 메시지 길이 및 상기 물리적 링크의 보드레이트 및 통신 링크에서의 제 2 시간 동기화 메시지의 코딩 길이에 따라 상기 제 2 시간 동기화 메시지의 전송 지연을 획득하는 단계;
상기 제 1 시간 동기화 메시지의 처리 지연을 계산하는 공식:
Figure pct00022

을 포함하되,
여기서, dt1은 제 1 시간 동기화 메시지의 전송 지연을 나타내고, dt2는 제 2 시간 동기화 메시지의 전송 지연을 나타내고, T1은 제 1 시간을 나타내고, T2는 제 2 시간을 나타내고, dt3은 제 1 시간 동기화 메시지의 처리 지연을 나타내는 것을 특징으로 하는 전력량계의 클록 동기화 방법.
According to claim 4,
Obtaining a processing delay of the first time synchronization message according to the first time, the second time and the transmission delay,
Obtain the first message length of the first time synchronization message, the baud rate of the physical link and the coding length of the first time synchronization message on the communication link, the first message length, the baud rate of the physical link and the communication link Obtaining a transmission delay of the first time synchronization message according to the coding length of the first time synchronization message;
Acquire the second message length of the second time synchronization message, and delay the transmission of the second time synchronization message according to the second message length and the baud rate of the physical link and the coding length of the second time synchronization message on the communication link. Obtaining a;
Formula for calculating the processing delay of the first time synchronization message:
Figure pct00022

Including,
Here, dt1 represents the transmission delay of the first time synchronization message, dt2 represents the transmission delay of the second time synchronization message, T1 represents the first time, T2 represents the second time, and dt3 represents the first time synchronization Clock synchronization method of the watt hour meter, characterized in that it represents the processing delay of the message.
제5항에 있어서,
상기의 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득하는 단계는,
상기 메시지 조립 시간 및 시간 교정 메시지의 메시지 길이를 미리 획득하고, 상기 시간 교정 메시지의 메시지 길이, 상기 물리적 링크의 보드레이트 및 통신 링크에서의 시간 교정 메시지의 코딩 길이에 따라 상기 시간 교정 메시지의 전송 지연을 획득하는 단계;
상기 시간 교정 메시지 중의 교정 시간을 계산하는 공식:
Figure pct00023

을 포함하되,
여기서, T5는 상기 시간 교정 메시지 중의 교정 시간을 나타내고, T4는 내부 클록에 의해 기록된 상기 시간 교정 메시지를 전송한 시간을 나타내고, dt4는 상기 시간 교정 메시지의 전송 지연을 나타내고, dt5는 미리 결정된 메시지 조립 시간을 나타내는 것을 특징으로 하는 전력량계의 클록 동기화 방법.
The method of claim 5,
Obtaining a correction time according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock includes:
The message assembly time and the message length of the time calibration message are obtained in advance, and the transmission delay of the time calibration message according to the message length of the time calibration message, the baud rate of the physical link, and the coding length of the time calibration message on the communication link. Obtaining a;
The formula for calculating the calibration time in the above time calibration message:
Figure pct00023

Including,
Here, T5 represents the calibration time in the time calibration message, T4 represents the time at which the time calibration message recorded by the internal clock is transmitted, dt4 represents the transmission delay of the time calibration message, and dt5 is a predetermined message. Clock synchronization method of the watt-hour meter characterized by indicating the assembly time.
제1항 내지 제6항 중 어느 한 항에 있어서,
상기 절대시간을 획득하는 단계는,
하나의 기지국으로부터 절대시간을 획득하는 단계;
또는, 복수의 기지국의 시간을 획득하고, 복수의 기지국의 시간 중 하나를 상기 절대시간으로 선택하는 단계;
또는, 내부 GPS 모듈 또는 북두 모듈을 통해 절대시간을 획득하는 단계를 포함하는 것을 특징으로 하는 전력량계의 클록 동기화 방법.
The method according to any one of claims 1 to 6,
The step of obtaining the absolute time,
Obtaining absolute time from one base station;
Or, obtaining time of a plurality of base stations, and selecting one of the times of the plurality of base stations as the absolute time;
Alternatively, the clock synchronization method of the watt hour meter, characterized in that it comprises the step of acquiring the absolute time through the internal GPS module or Beidou module.
전력량계의 클록 동기화 장치로서,
절대시간을 획득하고, 상기 절대시간에 따라 내부 클록을 동기화하기 위한 내부 시간 동기화 모듈;
미리 설정된 통신 프로토콜에 의해 제 1 시간 동기화 메시지를 전력량계로 제 1 시간에 전송하고, 전력량계로부터 피드백된 제 2 시간 동기화 메시지를 제 2 시간에 수신하기 위한 메시지 송수신 모듈; 상기 제 1 시간 및 상기 제 2 시간은 내부 클록의 시간이고;
상기 제 1 시간, 상기 제 2 시간 및 전송 지연에 따라 상기 제 1 시간 동기화 메시지의 처리 지연을 획득하고; 상기 처리 지연, 전송 지연, 미리 결정된 메시지 조립 시간 및 상기 내부 클록의 시간에 따라 교정 시간을 획득하기 위한 지연 계산 모듈; 및
시간 교정 메시지를 상기 전력량계에 전송하여 상기 전력량계의 로컬 클록을 동기화하기 위한 클록 동기화 모듈을 포함하되, 상기 시간 교정 메시지는 상기 교정 시간을 포함하는 것을 특징으로 하는 전력량계의 클록 동기화 장치.
As a clock synchronization device of the watt-hour meter,
An internal time synchronization module for obtaining an absolute time and synchronizing an internal clock according to the absolute time;
A message transmitting and receiving module for transmitting the first time synchronization message to the watt hour meter at a first time by a preset communication protocol and receiving the second time synchronization message fed back from the watt hour meter at the second time; The first time and the second time are times of an internal clock;
Acquire a processing delay of the first time synchronization message according to the first time, the second time, and a transmission delay; A delay calculation module for obtaining a correction time according to the processing delay, transmission delay, predetermined message assembly time, and time of the internal clock; And
And a clock synchronization module for synchronizing a local clock of the wattmeter by sending a time calibration message to the wattmeter, wherein the time calibration message includes the calibration time.
컴퓨터 프로그램이 저장되어 있는 메모리 및 프로세서를 포함하는 컴퓨터 설비로서,
상기 프로세서가 상기 컴퓨터 프로그램을 실행할 경우, 제1항 내지 제7항 중 어느 한 항에 따른 방법의 단계가 구현되는 것을 특징으로 하는 컴퓨터 설비.
A computer facility including a memory and a processor in which a computer program is stored,
A computer equipment, characterized in that when the processor executes the computer program, steps of the method according to any one of claims 1 to 7 are implemented.
컴퓨터 프로그램이 저장되어 있는 컴퓨터 판독 가능 저장 매체로서,
상기 컴퓨터 프로그램이 프로세서에 의해 실행될 경우, 제1항 내지 제7항 중 어느 한 항에 따른 방법의 단계가 구현되는 것을 특징으로 하는 컴퓨터 판독 가능 저장 매체.
A computer-readable storage medium on which a computer program is stored,
A computer readable storage medium characterized in that when the computer program is executed by a processor, steps of the method according to any one of claims 1 to 7 are implemented.
KR1020207015343A 2018-04-28 2018-09-30 Method, apparatus, computer equipment and storage medium for clock synchronization of watt-hour meters KR102331631B1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201810404586.6 2018-04-28
CN201810404586.6A CN108616321B (en) 2018-04-28 2018-04-28 Clock synchronizing method, device, computer equipment and the storage medium of electric energy meter
PCT/CN2018/109166 WO2019205498A1 (en) 2018-04-28 2018-09-30 Clock synchronization method and device for electric energy meter, computer device and storage medium

Publications (2)

Publication Number Publication Date
KR20200083533A true KR20200083533A (en) 2020-07-08
KR102331631B1 KR102331631B1 (en) 2021-12-02

Family

ID=63661719

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020207015343A KR102331631B1 (en) 2018-04-28 2018-09-30 Method, apparatus, computer equipment and storage medium for clock synchronization of watt-hour meters

Country Status (3)

Country Link
KR (1) KR102331631B1 (en)
CN (1) CN108616321B (en)
WO (1) WO2019205498A1 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109407040A (en) * 2018-12-07 2019-03-01 广东电网有限责任公司 A kind of intelligent electric energy meter calibration method, device, equipment and storage medium
CN110320791B (en) * 2019-06-20 2021-08-20 国网湖南省电力有限公司 Clock management method and device for electricity consumption information acquisition system
CN111025223B (en) * 2019-12-24 2022-09-20 宁波三星医疗电气股份有限公司 Clock correction method, device, equipment and storage medium of electric energy meter
CN111142359B (en) * 2020-01-20 2023-10-20 许昌中科森尼瑞技术有限公司 Method for realizing time synchronization of electric power secondary equipment through communication
CN111289943B (en) * 2020-02-28 2024-07-19 深圳市科陆精密仪器有限公司 Verification method and system for electric energy meter
CN111580379B (en) * 2020-05-11 2021-10-08 威胜集团有限公司 Time correction method, device and computer readable storage medium
CN111988105B (en) * 2020-08-25 2022-11-01 烟台东方威思顿电气有限公司 RS 485-based high-precision time synchronization method
CN112462591B (en) * 2020-12-07 2022-04-12 武汉中原电子信息有限公司 Object-oriented communication protocol-based time synchronization method for electricity utilization acquisition terminal
CN113489599B (en) * 2021-05-27 2023-07-28 国网浙江省电力有限公司湖州供电公司 Time synchronization verification system and time synchronization defect elimination method for transformer substation
CN113825039A (en) * 2021-08-24 2021-12-21 青岛鼎信通讯股份有限公司 Multi-loop power supply demand superposition method based on electric energy acquisition terminal of transformer substation
CN113783650A (en) * 2021-08-25 2021-12-10 浙江万胜智能科技股份有限公司 Method for realizing accurate time synchronization of intelligent electric meter and intelligent terminal based on characteristic current
CN114269012A (en) * 2021-12-03 2022-04-01 武汉慧联无限科技有限公司 Time synchronization method, device and storage medium
CN114142960A (en) * 2021-12-21 2022-03-04 青岛鼎信通讯股份有限公司 Method for timing acquisition terminal of low-voltage transformer area by using mobile 5G base station
CN115225429A (en) * 2022-05-30 2022-10-21 云南电网有限责任公司 Electric energy meter real-time data acquisition method based on service tunnel
CN115225244B (en) * 2022-07-14 2023-08-18 广东电网有限责任公司 Clock time setting method and device for low-voltage meter reading, main equipment and medium
CN116054987B (en) * 2022-10-12 2023-12-15 哈尔滨市科佳通用机电股份有限公司 Timing method of vehicle-mounted equipment and storage medium
CN115348660B (en) * 2022-10-20 2022-12-20 石家庄科林电气股份有限公司 Electric energy meter time synchronization method, electric energy meter and storage medium
CN115914040A (en) * 2022-12-06 2023-04-04 国网山东省电力公司电力科学研究院 Method and device for judging sending time of electric meter data based on time reverse deduction
CN116582772B (en) * 2023-03-29 2024-01-16 四川辰鳗科技有限公司 Electric energy data acquisition method, system, electronic equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516507A (en) * 2013-09-24 2014-01-15 国家电网公司 Electricity utilization information collecting system time synchronization method based on DLPTP clock synchronization

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201812153U (en) * 2010-09-09 2011-04-27 河北旭辉电气股份有限公司 Precise time synchronizing device of digitalized transformer substation
CN102436172A (en) * 2011-12-02 2012-05-02 河南省电力公司南阳供电公司 Multifunctional watt-hour meter and GPS timing system
EP3053286B1 (en) * 2013-10-01 2019-07-24 Khalifa University of Science and Technology Method and devices for synchronization
CN105866576A (en) * 2016-04-01 2016-08-17 国家电网公司 Simulation detection system of intelligent transformer station secondary-side electric energy metering error influence, and detection analysis method
CN107425882A (en) * 2017-04-20 2017-12-01 北京智芯微电子科技有限公司 A kind of calibration method and device of broadband power line communication network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516507A (en) * 2013-09-24 2014-01-15 国家电网公司 Electricity utilization information collecting system time synchronization method based on DLPTP clock synchronization

Also Published As

Publication number Publication date
KR102331631B1 (en) 2021-12-02
WO2019205498A1 (en) 2019-10-31
CN108616321A (en) 2018-10-02
CN108616321B (en) 2019-08-09

Similar Documents

Publication Publication Date Title
KR102331631B1 (en) Method, apparatus, computer equipment and storage medium for clock synchronization of watt-hour meters
US20200169345A1 (en) Methods and devices for synchronization in communication networks
KR20180025613A (en) Method for time compensation in long range network terminal and terminal performing same
US11411848B2 (en) Flexible ethernet latency measurement method and related device
CN101951300B (en) Method for realizing accurate time tick of Ethernet
CN108206721B (en) Automatic meter reading system and time correction method thereof
CN103546267A (en) Time synchronization monitoring method and system
CN107276709B (en) A kind of method for synchronizing time and system
CN103760763A (en) GPS clock synchronization system and method and distribution terminal unit
KR101881025B1 (en) Wireless modem and metering server for remote metering
CN113812167B (en) Method for reading a fluid table
CN106462146A (en) Field device, method for operating a field device and cloud service
CN105471572A (en) Synchronous time measurement method based on GOOSE message
CN104218677A (en) Method for synchronizing clocks of power distribution master stations and power distribution terminals
CN111799779A (en) Load generation planned value curve transmission method and system
CN105553098A (en) Electric energy essential data synchronization processing method and system for power grid loss metering
Lu et al. Research on advanced metering infrastructure time synchronization based on NTP
CN104092509A (en) Time data processing method, device and system
CN117478605B (en) Load balancing method, concentrator, ammeter and storage medium
KR20150139295A (en) Method and System for Trading Power Based on Financial Automation
US20240152103A1 (en) Synchronizing network reference time among power line components
CN109379252B (en) Network delay measurement method and device based on programmable logic device
KR101841732B1 (en) Relay server and system, and data concentration unit
CN117544910A (en) Power data transmission method and device, terminal equipment and storage medium
CN117376432A (en) Processing method and device for network time space label

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant