CN116208288A - Method, device, equipment and storage medium for correcting timing time - Google Patents

Method, device, equipment and storage medium for correcting timing time Download PDF

Info

Publication number
CN116208288A
CN116208288A CN202310399912.XA CN202310399912A CN116208288A CN 116208288 A CN116208288 A CN 116208288A CN 202310399912 A CN202310399912 A CN 202310399912A CN 116208288 A CN116208288 A CN 116208288A
Authority
CN
China
Prior art keywords
timing
timer
change amount
position change
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310399912.XA
Other languages
Chinese (zh)
Inventor
区永通
陈重辰
谭浩彬
程凌森
王昊
邓轲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Southern Power Grid Digital Grid Technology Guangdong Co ltd
Original Assignee
China Southern Power Grid Digital Grid Technology Guangdong Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Southern Power Grid Digital Grid Technology Guangdong Co ltd filed Critical China Southern Power Grid Digital Grid Technology Guangdong Co ltd
Priority to CN202310399912.XA priority Critical patent/CN116208288A/en
Publication of CN116208288A publication Critical patent/CN116208288A/en
Pending legal-status Critical Current

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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The invention discloses a method, a device, equipment and a storage medium for correcting timing time. Determining a second device that establishes a communication connection with the first device; receiving a first message sent by second equipment, and acquiring first timing position information in a first timer when the first message is received, wherein the first message comprises a first sending time stamp; receiving a second message sent by second equipment based on a second timer, and acquiring second timing position information in the first timer when the second message is received, wherein the second message comprises a second sending time stamp; determining a unit position change amount based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information; and determining the target position change amount based on the unit position change amount and the preset time in the first timer so as to correct the current position change amount corresponding to the preset time in the first timer, thereby ensuring the real-time and accuracy of the power information acquisition and transmission.

Description

Method, device, equipment and storage medium for correcting timing time
Technical Field
The present invention relates to the field of internet of things, and in particular, to a method, an apparatus, a device, and a storage medium for timing time correction.
Background
Currently, the application of the internet of things is very wide, for example, with the rapid development of the internet of things, a large number of intelligent devices IED (Intelligent Electronic Device) exist in an electric power automation system. In the running process of the IED, the work such as power information acquisition and transmission is performed according to a certain time interval. However, due to the problem of aging of hardware caused by long-time operation of the IED crystal oscillator, a certain error exists in the timing time of the IED.
Currently, the high-performance IED can adopt a global positioning system (Global Positioning System, GPS) or Beidou and other external cooperative equipment to perform pulse time synchronization, so that the correction of the timing time of the IED is realized.
However, due to limitations of cost, application conditions and the like, part of low-performance IEDs are simple in function, and correction of timing time cannot be achieved by means of equipment such as a GPS (global positioning system), beidou and the like, so that deviation exists in timing time of the low-performance IEDs, and accuracy of the timing time is low.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for timing time correction, which are used for eliminating deviation of low-performance IED timing time, improving accuracy of the low-performance IED timing time and further guaranteeing instantaneity and accuracy of power information acquisition and transmission.
In a first aspect, the present invention provides a method of timing time correction, the method comprising:
determining a second device which establishes communication connection with the first device, wherein a first timer in the first device does not have a timing clock correction function, and a second timer in the second device has the timing clock correction function;
receiving a first message sent by the second device, and acquiring first timing position information in the first timer when the first message is received, wherein the first message comprises a first sending time stamp;
receiving a second message sent by the second device based on the second timer, and acquiring second timing position information in the first timer when the second message is received, wherein the second message comprises a second sending time stamp;
determining a unit position change amount corresponding to a unit time in the first timer based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information;
and determining a target position change amount based on the unit position change amount and the preset time in the first timer, and correcting the current position change amount corresponding to the preset time in the first timer based on the target position change amount.
In a second aspect, the present invention provides an apparatus for timing time correction, the apparatus comprising:
a second device determining module, configured to determine a second device that establishes a communication connection with a first device, where a first timer in the first device does not have a timing clock correction function, and a second timer in the second device has a timing clock correction function;
the first position determining module is used for receiving a first message sent by the second equipment and acquiring first timing position information in the first timer when the first message is received, wherein the first message comprises a first sending time stamp;
a second position determining module, configured to receive a second packet sent by the second device based on the second timer, and obtain second timing position information in the first timer when the second packet is received, where the second packet includes a second sending timestamp;
a position change amount determining module, configured to determine a unit position change amount corresponding to a unit time in the first timer based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information;
And the timing time correction module is used for determining a target position change amount based on the unit position change amount and the preset timing time in the first timer, and correcting the current position change amount corresponding to the preset timing time in the first timer based on the target position change amount.
In a third aspect, the present invention provides an apparatus comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of timing time correction of any of the embodiments of the present invention.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a processor to perform a method of timing time correction according to any of the embodiments of the present invention.
According to the technical scheme provided by the embodiment of the invention, the second equipment which is in communication connection with the first equipment is determined, wherein the first timer in the first equipment does not have a timing clock correction function, and the second timer in the second equipment has the timing clock correction function. Receiving a first message sent by second equipment, and acquiring first timing position information in a first timer when the first message is received, wherein the first message comprises a first sending time stamp; and receiving a second message sent by the second equipment based on the second timer, and acquiring second timing position information in the first timer when the second message is received, wherein the second message comprises a second sending time stamp. Thus, the unit position change amount corresponding to the unit time in the first timer is determined based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information. Then, a target position change amount is determined based on the unit position change amount and a preset time in the first timer, and the current position change amount corresponding to the preset time in the first timer is corrected based on the target position change amount. The embodiment of the invention solves the problem that the timing time of the low-performance IED has deviation, eliminates the deviation of the timing time of the low-performance IED, improves the accuracy of the timing time of the low-performance IED, and further ensures the instantaneity and the accuracy of the acquisition and the transmission of the power information.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for timing correction according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a first device timing correction according to an embodiment of the present invention;
FIG. 3 is a flowchart of a timing correction method according to a second embodiment of the present invention;
FIG. 4 is a flowchart of a method for timing correction according to a third embodiment of the present invention;
fig. 5 is a schematic diagram of a timing time correction device according to a fourth embodiment of the present invention;
Fig. 6 is a schematic structural diagram of a device according to a fifth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that, in the description and claims of the present invention and the above figures, the terms "first preset condition", "second preset condition", and the like are used to distinguish similar objects, and are not necessarily used to describe a specific order or precedence. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a method for correcting timing time according to a first embodiment of the present invention, where the present embodiment is applicable to a device without a timing clock correction function. The method may be performed by a timing time corrected apparatus, which may be implemented in hardware and/or software, which may be configured on a computer device, which may be a notebook, desktop computer, smart tablet, or the like. As shown in fig. 1, the method includes:
s110, determining a second device which establishes communication connection with the first device.
The device is an intelligent electronic device IED (Intelligent Electronic Device) in an electric power automation system, and for example, the device may be a gas insulated switchgear, XLPE cable, generator, transformer, circuit breaker, contactor, and the like. The device comprises a timer for executing the timing task. The first timer in the first device does not have a timing clock correction function and the second timer in the second device does have a timing clock correction function. The timer in the second device can pulse the second timer of the second device to time through the GPS or Beidou external equipment and the like, so that the function of timing clock correction is realized. The number of second devices may be one or more. In this embodiment, the timing time of the second device is accurate, and the timing time of the first device is corrected.
In an actual production process, a large number of first devices and second devices are configured, and the first devices can transmit data to the upper-level devices based on the timer timing. The first device timing the transmission of data to the previous level device includes two scenarios: the first is that the original data collected by the first equipment is uploaded to a data aggregator at regular time; the second is that the original data collected by the first device is transmitted to the second device at regular time, and the second device uploads the received data to the data aggregator. For the first case, the data aggregator may be the second device. For the second case, some second devices may receive data from a plurality of first devices, some first devices have a one-to-one data transfer relationship with the second devices, and some first devices send data to a plurality of other devices, where the other devices include a portion of the second devices and a portion of the first devices, based on which the first device needs to determine the second device to establish a communication connection with the first device.
Specifically, in the process of transmitting data to the second device at regular time, the first device may determine the second device corresponding to the first device based on the data packet uploading path, and based on this, may determine the second device that establishes communication connection with the first device according to the data packet uploading path corresponding to the first device.
S120, receiving a first message sent by the second device, and acquiring first timing position information in a first timer when the first message is received.
The first message is a data message sent to the first device by the second device for the first time, and the first message includes a first sending timestamp. The first sending timestamp is the corresponding time when the second device sends the first message to the first device. The first timing position information is coding information corresponding to the position of a timing pointer of the first timer when the first device receives a first message from the second device.
Specifically, when the timing time of the first device is corrected, the second device sends a first message to the first device. Before the second device sends the first message, the first message is first generated, and the specific content in the first message is not limited. Recording a first sending time stamp at an instant when the first message is sent, and adding the first sending time stamp to the first message. The specific time of the second device sending the first message is not limited, and when the first device receives the first message sent by the second device, the first device determines the coding information corresponding to the position of the timing pointer in the timer numerical code at the moment.
For example, referring to fig. 2, as shown in fig. 2, a second device first sends a first message to a first device, and when the first device receives the first message, a timestamp corresponding to the first device is T1. At time T1, the code information corresponding to the position of the timing pointer of the first timer in the timer value code is "1", so the first timing position information is "1".
S130, receiving a second message sent by the second device based on the second timer, and acquiring second timing position information in the first timer when receiving the second message.
The first message is a data message sent to the first device by the second device for the second time, and the second message includes a second sending timestamp. The first sending timestamp is the corresponding time when the second device sends the second message to the first device. The second timing position information is coding information corresponding to the position of the timing pointer of the first timer when the first device receives the second message from the second device.
Specifically, the second device may, by having a second timer with a timing clock correction function, pass through an accurate preset time, for example, the preset time is 1ms, after sending the first message, and the second device sends the second message including the first sending timestamp to the first device again. When the first device receives a second message sent by the second device, the first device determines coding information corresponding to the position of the timing pointer in the timer numerical code in the moment.
For example, as shown in fig. 2, after the second device sends the first message to the first device, after 1ms, the second device sends the second message to the first device, and when the first device receives the second message, the timestamp corresponding to the first device is T2. At time T2, the code information corresponding to the position of the timing pointer of the first timer in the timer value code is "41", so the second timing position information is "41".
In addition, T1 corresponding to the time when the first device received the first message and T2 corresponding to the time when the first device received the second message are recorded in the process of correcting the timing time of the first device, but T1 and T2 are only used to determine the first timing position information corresponding to the time T1 and the second timing position information corresponding to the time T2. Since the first device does not have a timing clock correction function, the time information of the first device is not standard information and cannot be directly used for correcting the timing time of the first device.
S140, determining a unit position change amount corresponding to a unit time in the first timer based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information.
The unit position change amount is the amount of numerical code change that the timing pointer in the first timer passes through when the unit time passes.
Specifically, according to the first transmission time stamp and the second transmission time stamp, a time interval corresponding to the two times of data messages transmitted by the second device can be determined. From the first timing position information and the second timing position information, an amount of numerical code change traversed by the timing hands in the first timer may be determined. Based on this, the amount of change in unit position corresponding to the unit time in the first timer can be determined from the amount of change in the numerical code that the timing hands have passed over and the time interval.
It should be specifically noted that, in the communication process of the electric power internet of things, the network delay of the first device for receiving the data message sent by the second device is basically fixed, so that the network delay does not affect the time accuracy of the data message received by the first device.
Alternatively, the unit position change amount determined in the above step may be stored in the data table. In practical application, when the timing time of the first device needs to be corrected, the unit position variation corresponding to the unit time in the first timer can be directly called.
In another embodiment, the unit position change amount corresponding to the unit time in the first timer may be determined once every a preset time period, and the unit position change amount in the data table may be updated. For example, the unit position change amount corresponding to the unit time in the first timer is determined every other week.
And S150, determining a target position change amount based on the unit position change amount and the preset time in the first timer, and correcting the current position change amount corresponding to the preset time in the first timer based on the target position change amount.
The preset timing time is an attribute of the first timer, which can be understood as that the first timer triggers a timing task of the first device every preset timing time, so that the first device sends data to the primary device. In practical applications, how often the first device transmits data to the next-level device is predetermined, and thus the preset timing time is a determined amount.
The target position change amount is the amount of numerical code change that the timing pointer in the first timer should walk through in a preset timing time. The current position change amount is the amount of numerical code change actually passed by the timing pointer in the first timer in a preset timing time.
Specifically, on the basis of determining the unit position change amount and the preset time in the first timer, the product of the unit position change amount and the preset time in the first timer is the target position change amount. Further, the current position variable quantity corresponding to the first timer in the preset time is replaced by the target position variable quantity, so that the timing time of the first device is corrected.
In this embodiment, after the first timer in the first device is used for a long time, the current position variation corresponding to the preset time by the first timer cannot accurately represent the preset time, and based on this, the current position variation is replaced by the target position variation, so that the correction of the first device timing time can be realized.
According to the technical scheme provided by the embodiment of the invention, the second equipment which is in communication connection with the first equipment is determined, wherein the first timer in the first equipment does not have a timing clock correction function, and the second timer in the second equipment has the timing clock correction function. Receiving a first message sent by second equipment, and acquiring first timing position information in a first timer when the first message is received, wherein the first message comprises a first sending time stamp; and receiving a second message sent by the second equipment based on the second timer, and acquiring second timing position information in the first timer when the second message is received, wherein the second message comprises a second sending time stamp. Thus, the unit position change amount corresponding to the unit time in the first timer is determined based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information. Then, a target position change amount is determined based on the unit position change amount and a preset time in the first timer, and the current position change amount corresponding to the preset time in the first timer is corrected based on the target position change amount. The embodiment of the invention solves the problem that the timing time of the low-performance IED has deviation, eliminates the deviation of the timing time of the low-performance IED, improves the accuracy of the timing time of the low-performance IED, and further ensures the instantaneity and the accuracy of the acquisition and the transmission of the power information.
Based on the above embodiment, S110 specifically includes the following steps: and determining candidate devices which are in communication connection with the first device based on the data uploading path of the first device, wherein the device with the time tag function is determined as a second device from the candidate devices.
The data uploading path is used for representing the communication connection relation between the first equipment and the second equipment. The candidate devices are all devices that establish a communication connection with the first device.
The first device is in communication connection with two second devices, and the first device establishes communication connection with two other devices at the same time, wherein the code number corresponding to the first device is a, the two second devices comprise a second device 1 and a second device 2, the code number corresponding to the second device 1 is 001, and the code number corresponding to the second device 2 is 002; the two other devices include the other device 1 and the other device 2, the code number corresponding to the other device 1 is 01, the code number corresponding to the other device 2 is 02, and the data uploading path can be expressed as "A/001-002-01-02". The candidate devices include the second device 1, the second device 2, the other devices 1, and the other devices 2.
In this embodiment, based on the data upload path of the first device, a candidate device that establishes a communication connection with the first device may be determined. The candidate device includes other devices that are not the second device, and the second device may be determined from the candidate devices based further on the code format corresponding to the first device.
Example two
Fig. 3 is a flowchart of a method for timing time correction according to a second embodiment of the present invention, where on the basis of the foregoing embodiments, the "determining a unit position change amount corresponding to a unit time in a first timer based on a first transmission time stamp, a second transmission time stamp, first timing position information, and second timing position information" and the "determining a preset timing time in the first timer based on the unit position change amount, the step of determining the target position change amount and correcting the current position change amount corresponding to the preset time in the first timer based on the target position change amount is further optimized, and the embodiment of the present invention may be combined with each of the alternatives in the one or more embodiments. As shown in fig. 3, the method includes:
s210, determining a second device which establishes communication connection with the first device, wherein a first timer in the first device does not have a timing clock correction function, and a second timer in the second device has the timing clock correction function.
S220, receiving a first message sent by the second equipment, acquiring first timing position information in a first timer when the first message is received, the first message includes a first sending timestamp.
S230, receiving a second message sent by the second device based on the second timer, and acquiring second timing position information in the first timer when receiving the second message, wherein the second message comprises a second sending time stamp.
S240, determining a timing transmission duration corresponding to the second timer based on the first transmission time stamp and the second transmission time stamp.
The timing sending duration is the time interval of sending two times of data messages by the second device.
In this embodiment, the second device sends the second message to the first device again after a period of time has elapsed after sending the first message to the first device, and although this period of time has elapsed is directly available, this period of time is not an exact value. The timing transmission duration corresponding to the second timer determined based on the first transmission time stamp and the second transmission time stamp is more accurate.
Specifically, subtracting the first transmission time stamp from the second transmission time stamp is the timing transmission time length corresponding to the second timer. For example, the second transmission timestamp is 12:00:10, the first transmission timestamp is 12:00: and 10, the timing transmission duration corresponding to the second timer is 10 seconds.
S250, determining the timing position change amount of the first timer based on the first timing position information and the second timing position information.
The timing position change amount is the amount of numerical code change of the timing pointer in the first timer in the timing sending duration.
Exemplary, S250 specifically includes: and performing difference operation on the second timing position information and the first timing position information, taking an absolute value, and determining the timing position change quantity of the first timer.
Specifically, the difference operation is performed on the second timing position information and the first timing position information, and the absolute value of the difference value is taken as the timing position variation of the first timer. For example, the second timing position information is represented as N 2 The second timing position information is denoted as N 1 The timing position change amount of the first timer can be expressed as |n 2 -N 1 |。
S260, determining the unit position change amount corresponding to the unit time in the first timer based on the timing sending duration and the timing position change amount.
The position change of the first timer can be expressed as |N 2 -N 1 When the first transmission time stamp is t1 and the second transmission time stamp is t2, the unit position change amount corresponding to the unit time in the first timer can be expressed as
Figure BDA0004179066960000111
S270, multiplying the unit position change amount by the preset time in the first timer to determine the target position change amount.
In the present embodiment, how often the first device transmits data to the next-stage device is predetermined, and thus the preset timing time is a determined amount. Based on this, the unit position change amount and the preset time are determined, and then the target position change amount is obtained by multiplying the unit position change amount by the preset time. For example, the unit position change amount may be expressed as
Figure BDA0004179066960000121
If the preset time is 10ms, the target position change amount is +.>
Figure BDA0004179066960000122
S280, replacing the current position change quantity corresponding to the preset time in the first timer with the target position change quantity, and finishing the correction of the current position change quantity corresponding to the preset time in the first timer.
The preset timing time corresponding to the first device is 10ms, that is, the first device sends a secondary data message to the previous device every 10ms. For a completely new first device, the timing time of the first device is accurate, and the position change amount of the timing pointer in the first timer corresponding to the timing pointer in the first timer in 10ms time is 30. The hardware device of the first timer ages with time, and the current position change amount corresponding to the timing pointer in the first timer is 30, but the timing time corresponding to the position change amount 30 is not necessarily 10ms. At this time, the target position change amount may be determined based on the unit position change amount and the preset time in the first timer, and the current position change amount may be replaced with the target position change amount. For example, when the determined target position change amount is 40, it can be understood that the timing hand position change amount in the first timer is 40, and the time of 10ms has elapsed.
According to the technical scheme provided by the embodiment of the invention, when the unit position change amount corresponding to the unit time in the first timer is determined, the timing transmission time length corresponding to the second timer is determined firstly based on the first transmission time stamp and the second transmission time stamp, and then the position change amount of the first timer is determined based on the first timing position information and the second timing position information, so that the unit position change amount corresponding to the unit time in the first timer is determined based on the timing transmission time length and the position change amount, and the unit position change amount can be determined efficiently and accurately in this way. When the current position change amount corresponding to the preset time in the first timer is corrected, firstly, multiplication operation is carried out on the unit position change amount and the preset time in the first timer to determine the target position change amount, and then, the current position change amount corresponding to the preset time in the first timer is replaced by the target position change amount, so that correction of the current position change amount corresponding to the preset time in the first timer is completed, and accuracy of the low-performance IED timing time is further improved.
Example III
Fig. 4 is a flowchart of a method for timing time correction according to a third embodiment of the present invention, where the embodiment of the present invention uses a specific application of the first device as a support, and illustrates how the first device implements timing time correction under a normal operating condition, and the embodiment of the present invention may be combined with each of the alternatives in the one or more embodiments. As shown in fig. 4, the method includes:
s310, determining a second device which establishes communication connection with the first device, wherein a first timer in the first device does not have a timing clock correction function, and a second timer in the second device has the timing clock correction function.
S320, receiving a first message sent by the second device, and acquiring first timing position information in a first timer when the first message is received, wherein the first message comprises a first sending time stamp.
S330, receiving a second message sent by the second device based on the second timer, and acquiring second timing position information in the first timer when receiving the second message, wherein the second message comprises a second sending time stamp.
S340, determining a unit position change amount corresponding to a unit time in the first timer based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information.
S350, determining a target position change amount based on the unit position change amount and the preset time in the first timer, and correcting the current position change amount corresponding to the preset time in the first timer based on the target position change amount.
S360, sending a data message every time the current position change amount in the first timer reaches the target position change amount corresponding to the preset timing time.
The preset timing time refers to timing time in a data message timing sending task corresponding to the first device. The timing time is used for representing how often the first device sends a secondary data message to the primary device.
In practical application, the timing sending task of the data message corresponding to the first device is first obtained, and then the timing time in the sending task of the data message Wen Dingshi is used as the preset timing time.
The timing sending task is preset and carries timing time. For example, the timing transmission task may be that the first device transmits a data packet to the previous device every 10ms, and 10ms is the timing time.
In specific implementation, the first device timing sending task may be pre-written in the execution program, and the information associated with the first device timing sending task corresponding to the data message is directly obtained through the reading instruction. Because the datagram Wen Dingshi sending task carries timing time, when the datagram timing sending task is acquired, the datagram is analyzed, so that the timing time can be acquired. After the timing time is obtained, the timing time is used as a preset timing time for subsequent correction of the timing time of the first timer of the first device.
In this embodiment, in the operation process of the first device, whenever the current position variation of the first timer is detected to reach the target position variation corresponding to the preset timing time, the first timer may trigger the data sending device of the first device, so that data is sent to the previous device, and thus, a data packet is sent at an accurate timing.
For example, if the target position change amount corresponding to the preset time is 30, when the first device sends the data packet to the previous device for the first time, the code information corresponding to the position of the timing pointer in the first timer is 1, when the current position change amount in the first timer reaches 30, that is, when the code information corresponding to the position of the timing pointer in the first timer is 31, the first device sends the data packet to the previous device for the second time, and the subsequent timing sending tasks are all that when the current position change amount in the first timer reaches 30, the first device sends the first data packet to the previous device.
According to the technical scheme provided by the embodiment of the invention, after the current position change amount corresponding to the preset time in the first timer is corrected, the timing time in the data message Wen Dingshi sending task is used as the preset time by acquiring the data message timing sending task corresponding to the first device, and then a data message is sent for a certain time each time the current position change amount in the first timer reaches the target position change amount corresponding to the preset time.
Example IV
Fig. 5 is a schematic structural diagram of a timing time correction device according to a fourth embodiment of the present invention, where the device may perform the timing time correction method according to the embodiment of the present invention. The device comprises: the second device determination module 310, the first location determination module 320, the second location determination module 330, the location variation determination module 340, and the timing time correction module 350.
A second device determining module 310, configured to determine a second device that establishes a communication connection with a first device, where a first timer in the first device does not have a timing clock correction function, and a second timer in the second device has a timing clock correction function;
a first location determining module 320, configured to receive a first packet sent by the second device, and obtain first timing location information in the first timer when the first packet is received, where the first packet includes a first sending timestamp;
a second location determining module 330, configured to receive a second packet sent by the second device based on the second timer, and obtain second timing location information in the first timer when the second packet is received, where the second packet includes a second sending timestamp;
A position change amount determining module 340, configured to determine a unit position change amount corresponding to a unit time in the first timer based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information;
the timing time correction module 350 is configured to determine a target position change amount based on the unit position change amount and a preset timing time in the first timer, and correct a current position change amount corresponding to the preset timing time in the first timer based on the target position change amount.
On the basis of the above technical solutions, the second device determining module 310 is further configured to determine, based on the data upload path of the first device, a candidate device that establishes a communication connection with the first device, and determine, from among the candidate devices, a device with a time tag function as the second device.
Based on the above aspects, the location change amount determining module 340 includes:
a timing duration determining unit, configured to determine a timing transmission duration corresponding to the second timer based on the first transmission timestamp and the second transmission timestamp;
A position change amount determination unit configured to determine a timing position change amount of the first timer based on the first timing position information and the second timing position information;
a unit change amount determining unit, configured to determine a unit change amount of position corresponding to a unit time in the first timer based on the timing transmission duration and the timing position change amount.
On the basis of the above technical solutions, the unit change amount determining unit is further configured to perform a difference operation on the second timing position information and the first timing position information, and take an absolute value to determine a timing position change amount of the first timer.
Based on the above aspects, the timing time correction module 350 includes:
a target variable amount determining unit configured to multiply the unit position variable amount by a preset time in a first timer, and determine the target position variable amount;
and the timing time correction unit is used for replacing the current position change quantity corresponding to the preset timing time in the first timer with the target position change quantity to finish the correction of the current position change quantity corresponding to the preset timing time in the first timer.
According to the technical scheme provided by the embodiment of the invention, the second equipment which is in communication connection with the first equipment is determined, wherein the first timer in the first equipment does not have a timing clock correction function, and the second timer in the second equipment has the timing clock correction function. Receiving a first message sent by second equipment, and acquiring first timing position information in a first timer when the first message is received, wherein the first message comprises a first sending time stamp; and receiving a second message sent by the second equipment based on the second timer, and acquiring second timing position information in the first timer when the second message is received, wherein the second message comprises a second sending time stamp. Thus, the unit position change amount corresponding to the unit time in the first timer is determined based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information. Then, a target position change amount is determined based on the unit position change amount and a preset time in the first timer, and the current position change amount corresponding to the preset time in the first timer is corrected based on the target position change amount. The embodiment of the invention solves the problem that the timing time of the low-performance IED has deviation, eliminates the deviation of the timing time of the low-performance IED, improves the accuracy of the timing time of the low-performance IED, and further ensures the instantaneity and the accuracy of the acquisition and the transmission of the power information.
The device for correcting the timing time provided by the embodiment of the disclosure can execute the method for correcting the timing time provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of executing the method.
It should be noted that each unit and module included in the above apparatus are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for convenience of distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
Example five
Fig. 6 is a schematic structural diagram of a device according to a fifth embodiment of the present invention. The device 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The device may also represent various forms of mobile apparatuses such as personal digital processing, cellular telephones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing apparatuses. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the apparatus 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the device 10 can also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 13. An input/output (I/O) interface 15 is also connected to bus 13.
The various components in the device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the method of timing correction.
In some embodiments, the method of timing time correction may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method of timing time correction described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method of timing time correction in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable timing correction device, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome. It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein. The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of timing time correction, comprising:
determining a second device which establishes communication connection with the first device, wherein a first timer in the first device does not have a timing clock correction function, and a second timer in the second device has the timing clock correction function;
receiving a first message sent by the second device, and acquiring first timing position information in the first timer when the first message is received, wherein the first message comprises a first sending time stamp;
receiving a second message sent by the second device based on the second timer, and acquiring second timing position information in the first timer when the second message is received, wherein the second message comprises a second sending time stamp;
determining a unit position change amount corresponding to a unit time in the first timer based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information;
and determining a target position change amount based on the unit position change amount and the preset time in the first timer, and correcting the current position change amount corresponding to the preset time in the first timer based on the target position change amount.
2. The method of claim 1, wherein the determining the second device to establish the communication connection with the first device comprises:
and determining candidate devices which establish communication connection with the first device based on the data uploading path of the first device, wherein the device with the timing clock correction function is determined as a second device from the candidate devices.
3. The method of claim 1, wherein the determining a unit position change amount corresponding to a unit time in the first timer based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information comprises:
determining a timing transmission duration corresponding to the second timer based on the first transmission time stamp and the second transmission time stamp;
determining a timing position change amount of the first timer based on the first timing position information and the second timing position information;
and determining a unit position change amount corresponding to unit time in the first timer based on the timing sending duration and the timing position change amount.
4. The method of claim 3, wherein the determining the amount of timing position change for the first timer based on the first timing position information and the second timing position information comprises:
And performing difference operation on the second timing position information and the first timing position information, taking an absolute value, and determining the timing position change quantity of the first timer.
5. The method according to claim 1, wherein the determining the target position change amount based on the unit position change amount and a preset time in the first timer includes:
and multiplying the unit position change amount by the preset time in the first timer to determine the target position change amount.
6. The method according to claim 1, wherein correcting the current position change amount corresponding to the preset time in the first timer based on the target position change amount includes:
and replacing the current position change quantity corresponding to the preset time in the first timer with the target position change quantity to finish the correction of the current position change quantity corresponding to the preset time in the first timer.
7. The method of claim 1, wherein the preset timing time refers to a timing time in a data packet timing transmission task corresponding to the first device;
after correcting the current position change amount corresponding to the preset time in the first timer based on the target position change amount, the method further comprises:
And sending a data message every time the current position change amount in the first timer reaches the target position change amount corresponding to the preset timing time.
8. An apparatus for timing correction, comprising:
a second device determining module, configured to determine a second device that establishes a communication connection with a first device, where a first timer in the first device does not have a timing clock correction function, and a second timer in the second device has a timing clock correction function;
the first position determining module is used for receiving a first message sent by the second equipment and acquiring first timing position information in the first timer when the first message is received, wherein the first message comprises a first sending time stamp;
a second position determining module, configured to receive a second packet sent by the second device based on the second timer, and obtain second timing position information in the first timer when the second packet is received, where the second packet includes a second sending timestamp;
a position change amount determining module, configured to determine a unit position change amount corresponding to a unit time in the first timer based on the first transmission time stamp, the second transmission time stamp, the first timing position information, and the second timing position information;
And the timing time correction module is used for determining a target position change amount based on the unit position change amount and the preset timing time in the first timer, and correcting the current position change amount corresponding to the preset timing time in the first timer based on the target position change amount.
9. An apparatus, the apparatus comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the timing time correction method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the timing time correction method of any one of claims 1-7.
CN202310399912.XA 2023-04-14 2023-04-14 Method, device, equipment and storage medium for correcting timing time Pending CN116208288A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310399912.XA CN116208288A (en) 2023-04-14 2023-04-14 Method, device, equipment and storage medium for correcting timing time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310399912.XA CN116208288A (en) 2023-04-14 2023-04-14 Method, device, equipment and storage medium for correcting timing time

Publications (1)

Publication Number Publication Date
CN116208288A true CN116208288A (en) 2023-06-02

Family

ID=86519422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310399912.XA Pending CN116208288A (en) 2023-04-14 2023-04-14 Method, device, equipment and storage medium for correcting timing time

Country Status (1)

Country Link
CN (1) CN116208288A (en)

Similar Documents

Publication Publication Date Title
CN114553192A (en) Clock chip frequency compensation method and device, electronic equipment and storage medium
CN117201228A (en) Data recharging method and device, electronic equipment and storage medium
CN116208288A (en) Method, device, equipment and storage medium for correcting timing time
CN115617475A (en) Method and device for setting circulating alarm clock, electronic equipment and storage medium
CN115563015B (en) Code heat statistics method, device, equipment and storage medium
CN117406577A (en) Timing error determining method, timing error determining device, chip and storage medium
CN116932626B (en) Data analysis method, device, equipment and storage medium
CN113470380B (en) Data processing method and device, electronic equipment and readable storage medium
CN118034605B (en) Data processing method and device, electronic equipment and storage medium
CN115529100A (en) Clock synchronization method, high-speed industrial bus system, equipment and storage medium
CN117131315B (en) Out-of-tolerance electric energy meter determining method and medium based on solving multi-element quadratic function extremum
CN115642978A (en) System clock synchronization method, device, equipment and storage medium
CN118612834A (en) Terminal equipment synchronization method, device, equipment and medium
CN117872702A (en) Timing method, device, equipment and medium based on Global Positioning System (GPS) information
CN115567142A (en) Clock synchronization method, network and equipment in high-speed industrial bus relay network
CN114416040A (en) Page construction method, device, equipment and storage medium
CN117608944A (en) Method and device for calculating weight migration volume ratio, electronic equipment and storage medium
CN117349130A (en) Method and device for determining duration, electronic equipment and storage medium
CN116628383A (en) Page jump method, device, electronic equipment and storage medium
CN115454847A (en) Pressure testing method and device, electronic equipment and storage medium
CN116089499A (en) Data statistics method, device and medium based on kafka data volume
CN117112374A (en) Display method, device, equipment and storage medium
CN117132678A (en) Image generation method, device, equipment and storage medium
CN117250849A (en) Satellite-based time service method, device, electronic equipment and storage medium
CN115544418A (en) Webpage data synchronization method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination