Data synchronization method and device based on power system, and electronic equipment

By receiving and synchronizing multiple terminal transmission data frames in the power system, the problem that existing technology cannot effectively synchronize the broadband data of the power system cannot be effectively synchronized. Synchronous measurement requirements for power systems.

CN119363768AActive Publication Date: 2025-01-24STATE GRID BEIJING ELECTRIC POWER CO +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411462510.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-24
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

The prior art cannot effectively synchronize the broadband data of the power system and cannot meet the full-frequency waveform synchronous communication needs of the new power system.

Method used

Use the preset server to receive the data frame transmitted by multiple terminals, and synchronize the data frame transmitted by multiple terminal transmission through the timestamp carried by the data frame to ensure that the broadband data collected by the terminal can be transmitted at high density and real -time transmission. Keep synchronization.

Benefits of technology

It realizes the wide-area synchronous upload of broadband and high-density data of the power system, maintains synchronization between different terminal sampling points, and meets the synchronization measurement requirements of the entire network waveform data level of the new power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363768A_ABST
    Figure CN119363768A_ABST
Patent Text Reader

Abstract

The invention discloses a data synchronization method and device based on a power system and electronic equipment, and relates to the technical field of power system communication.The data synchronization method comprises the steps that a preset server side is adopted to receive data frames transmitted by a plurality of terminals, and the data frames are synchronized on the basis of timestamps; and performing synchronization between sampling points on the data frames transmitted by the plurality of terminals by adopting a preset server. According to the invention, the technical problem that the broadband data of the power system cannot be effectively synchronized in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power system communication technology, and in particular to a data synchronization method based on a power system, a device thereof, and electronic equipment. Background Art

[0002] With the continuous advancement of power system construction, the measurement of electrical quantities in power systems is no longer limited to measuring baseband information such as effective value and power. In particular, with the access of large-scale photovoltaic, wind power and other new energy sources, the frequency information of the power grid has become richer. At the same time, disturbances such as harmonics, transients, and sub / supersynchronous oscillations in the power grid have become more frequent. In the power system, the power electronics feature of the power grid is prominent, and the current power grid measurement technology is increasingly unable to meet the measurement needs of new power systems (i.e., new energy power systems).

[0003] Current power grid measurement equipment can be divided into baseband information measurement and broadband information measurement in terms of frequency domain width. Baseband information includes voltage, current RMS, active power, reactive power, etc., and broadband measurement information includes current, voltage, harmonics, etc. In addition, from the perspective of whether multi-point electrical quantities need to be synchronized, it can be divided into synchronous measurement and asynchronous measurement. Due to the obvious dynamic characteristics of the new power system, in order to accurately monitor the operating status of the new power system, synchronized broadband information is required.

[0004] In the related technology, the measuring equipment (such as voltmeter, power meter, etc.) mainly measures the fundamental frequency information, and the measured data can be uploaded through the power system communication point meter. The amount of communication data generated is small and does not require synchronization. The IEC (International Electrotechnical Commission) 103 / 104 protocol or the IEEE (Institute of Electrical and Electronics Engineers) 61850 protocol can meet the communication upload requirements. The measurement of synchronous information of the new power system mainly relies on PMU (Phasor Measurement Unit) and other equipment with clock synchronization function. However, the current PMU equipment only measures the fundamental frequency voltage and current phase angle, and its communication protocol is GB / T (i.e. national standard) 26865.2 and IEEE 37.118. In addition, neither the IEC103 / 104, IEEE 61850 protocol, nor the GB / T 26865.2, IEEE 37.118 protocol can achieve wide-area synchronous uploading of broadband and high-density data. Therefore, a data synchronization method for new power systems is urgently needed to realize full-frequency domain waveform synchronous communication of new power systems.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiment of the present invention provides a data synchronization method based on an electric power system and a device and electronic equipment thereof, so as to at least solve the technical problem in the related art that the broadband data of the electric power system cannot be effectively synchronized.

[0007] According to one aspect of an embodiment of the present invention, a data synchronization method based on an electric power system is provided, comprising: using a preset server to receive data frames transmitted by multiple terminals, wherein the terminals are deployed on the electric power system and are used to collect broadband data on the electric power system; the data frames carry a timestamp; based on the timestamp, using the preset server to synchronize the data frames transmitted by the multiple terminals between each sampling point, wherein the sampling point is the time point for collecting the broadband data on the electric power system.

[0008] Furthermore, before adopting a preset service end to receive data frames transmitted by multiple terminals, it also includes: determining a data frame structure, wherein the data frame structure includes: a function byte and a data byte; the function byte includes at least one of the following: a data frame type field, a terminal number field, a connection status field, a sampling rate field, and a check code field; the data byte is used to store the broadband data; based on the data frame structure, the broadband data collected by the terminal is converted into the data frame.

[0009] Furthermore, before using a preset server to receive data frames transmitted by multiple terminals, it also includes: establishing a data connection between the preset server and each of the terminals; controlling each terminal to encrypt the data frame, and when the encryption of the data frame is successful, controlling each of the terminals to transmit the encrypted data frame to the preset server based on the data connection.

[0010] Furthermore, before using a preset server to receive data frames transmitted by multiple terminals, it also includes: establishing a command connection between the preset server and each of the terminals, wherein the command connection is used to implement command interaction between the terminal and the preset server through command frames; determining a command frame structure, wherein the command frame structure includes at least: a command frame type field, a terminal number field, and a command identification field.

[0011] Furthermore, after determining the command frame structure, it also includes: when the preset server needs to monitor the target terminal, constructing a heartbeat signal command frame based on the heartbeat signal identifier, the target terminal code of the target terminal and the command frame structure; controlling the preset server to send the heartbeat signal command frame to the target terminal based on the command connection; the preset server receives the heartbeat signal command frame returned by the target terminal within a preset time period, and determines that the target terminal is online.

[0012] Furthermore, after determining the command frame structure, it also includes: when the preset server needs to switch the sampling rate of the target terminal, constructing a sampling rate switching command frame based on the sampling rate switching identifier, the target terminal code of the target terminal and the command frame structure; controlling the preset server to send the sampling rate switching command frame to the target terminal based on the command connection; when the target terminal determines to switch the sampling rate, controlling the target terminal to switch the data acquisition frequency at the next time point to the sampling rate carried by the sampling rate switching command frame, and generating a confirmation response signal; controlling the target terminal to return the confirmation response signal to the preset server.

[0013] Furthermore, after determining the command frame structure, it also includes: when the preset server needs to restart the target terminal, constructing a restart command frame based on the restart identifier, the target terminal code of the target terminal and the command frame structure; controlling the preset server to send the restart command frame to the target terminal based on the command connection; when the target terminal determines to restart, controlling the target terminal to restart and generate a confirmation response signal; controlling the target terminal to return the confirmation response signal to the preset server.

[0014] According to another aspect of an embodiment of the present invention, a data synchronization device based on an electric power system is also provided, including: a first receiving unit, used to use a preset server to receive data frames transmitted by multiple terminals, wherein the terminals are deployed on the electric power system and are used to collect broadband data on the electric power system; the data frames carry timestamps; a first synchronization unit, used to synchronize each sampling point of the data frames transmitted by the multiple terminals using the preset server based on the timestamp, wherein the sampling point is the time point for collecting the broadband data on the electric power system.

[0015] Furthermore, the data synchronization device includes: a first determination module, used to determine the data frame structure before using a preset server to receive data frames transmitted by multiple terminals, wherein the data frame structure includes: a function byte and a data byte; the function byte includes at least one of the following: a data frame type field, a terminal number field, a connection status field, a sampling rate field, and a check code field; the data byte is used to store the broadband data; a first conversion module, used to convert the broadband data collected by the terminal into the data frame based on the data frame structure.

[0016] Furthermore, the data synchronization device also includes: a first establishment module, used to establish a data connection between the preset server and each of the terminals before using the preset server to receive data frames transmitted by multiple terminals; a first control module, used to control each terminal to encrypt the data frame, and when the encryption of the data frame is successful, control each terminal to transmit the encrypted data frame to the preset server based on the data connection.

[0017] Furthermore, the data synchronization device also includes: a second establishment module, used to establish a command connection between the preset server and each of the terminals before using the preset server to receive data frames transmitted by multiple terminals, wherein the command connection is used to realize command interaction between the terminal and the preset server through command frames; a second determination module, used to determine the command frame structure, wherein the command frame structure includes at least: a command frame type field, a terminal number field, and a command identification field.

[0018] Furthermore, the data synchronization device also includes: a first construction module, which is used to construct a heartbeat signal command frame based on the heartbeat signal identifier, the target terminal code of the target terminal and the command frame structure after determining the command frame structure when the preset server needs to monitor the target terminal; a second control module, which is used to control the preset server to send the heartbeat signal command frame to the target terminal based on the command connection; and a third determination module, which is used for the preset server to receive the heartbeat signal command frame returned by the target terminal within a preset time period to determine that the target terminal is online.

[0019] Furthermore, the data synchronization device also includes: a second construction module, which is used to construct a sampling rate switching command frame based on the sampling rate switching identifier, the target terminal code of the target terminal and the command frame structure after determining the command frame structure when the preset server needs to switch the sampling rate of the target terminal; a third control module, which is used to control the preset server to send the sampling rate switching command frame to the target terminal based on the command connection; a fourth control module, which is used to control the target terminal to switch the data acquisition frequency at the next time point to the sampling rate carried by the sampling rate switching command frame and generate a confirmation response signal when the target terminal determines to switch the sampling rate; and a fifth control module, which is used to control the target terminal to return the confirmation response signal to the preset server.

[0020] Furthermore, the data synchronization device also includes: a third construction module, which is used to construct a restart command frame based on the restart identifier, the target terminal code of the target terminal and the command frame structure after determining the command frame structure when the preset server needs to restart the target terminal; a sixth control module, which is used to control the preset server to send the restart command frame to the target terminal based on the command connection; a seventh control module, which is used to control the target terminal to restart and generate a confirmation response signal when the target terminal determines to restart; and an eighth control module, which is used to control the target terminal to return the confirmation response signal to the preset server.

[0021] According to another aspect of an embodiment of the present invention, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data synchronization method based on the power system described in any one of the above is implemented.

[0022] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned data synchronization methods based on the power system.

[0023] In the present invention, a preset server is used to receive data frames transmitted by multiple terminals. Based on timestamps, the preset server is used to synchronize each sampling point of the data frames transmitted by the multiple terminals, thereby solving the technical problem in the related art that the broadband data of the power system cannot be effectively synchronized.

[0024] In the present invention, the terminal deployed on the power system can collect broadband data such as voltage and current of the power system, and transmit these broadband data to the preset server in the form of data frames. Then, the preset server can synchronize the data frames transmitted by multiple terminals between each sampling point according to the timestamps carried by the data frames transmitted by the multiple terminals, thereby realizing the real-time transmission of the high-density sampling data of the terminal to the preset server, and at the same time maintaining the synchronization between the sampling points of different terminals, thereby realizing the synchronous measurement of the waveform data level of the whole network, and achieving the technical effect of broadband data synchronization of the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0026] Figure 1 is a flow chart of an optional data synchronization method based on a power system according to an embodiment of the present invention;

[0027] Figure 2 is a schematic diagram of an optional command frame structure according to an embodiment of the present invention;

[0028] Figure 3 is a schematic diagram of an optional data synchronization device based on a power system according to an embodiment of the present invention;

[0029] Figure 4 The present invention is a hardware structure block diagram of an electronic device (or mobile device) for a data synchronization method based on a power system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) collected and involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set between the system and the relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0033] In the present invention, a full-frequency domain waveform synchronization method for a new power system is proposed. The method has the ability to upload waveform-level data at a high sampling rate, can expand the granularity of data, and meet the dynamic measurement requirements of the new power system. In addition, the synchronization method can maintain synchronization between sampling points of different terminals, and by constructing data modules (i.e., data frames and command frames), it can meet the high-density real-time upload and synchronous upload of data, and realize synchronous measurement of waveform data level of the entire network.

[0034] In the present invention, the terminal can use a satellite positioning system to synchronize the clock, and add a timestamp to the collected broadband data of the power system voltage and current, and then encrypt the high-density sampling data carrying the timestamp after clock synchronization and transmit it to the preset server. The preset server can parse the data to realize the monitoring of the power system. In addition, the preset server can also send a command signal to the terminal in the form of a command frame, and the terminal can receive the command signal and perform corresponding operations, thereby realizing the data synchronization method of the power system, being able to maintain synchronization between sampling points of different terminals, and realizing the wide-area synchronous upload of broadband high-density data.

[0035] The present invention is described in detail below in conjunction with various embodiments.

[0036] Embodiment 1

[0037] According to an embodiment of the present invention, an embodiment of a data synchronization method based on an electric power system is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0038] Figure 1 is a flow chart of an optional data synchronization method based on a power system according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0039] Step S101, using a preset server to receive data frames transmitted by multiple terminals, wherein the terminals are deployed on the power system and are used to collect broadband data on the power system; the data frames carry a timestamp.

[0040] Optionally, the terminal (i.e., the equipment deployed on the power system) can collect the voltage and current wide-frequency domain data of the power system (i.e., including voltage and current signal data from low frequency to high frequency, such as 0-2500 Hz), and transmit the wide-frequency domain data in the form of data frames to a preset server (such as a master station server). The preset server can receive and process data frames transmitted by multiple terminals to realize monitoring of the power system.

[0041] In this embodiment, each terminal can perform clock synchronization through a satellite navigation system (such as GPS (Global Positioning System), BD (BeiDou Navigation Satellite System), etc.), and add a timestamp (a character sequence used to identify the sampling time) to the sampled data (such as power system voltage and current wide-band domain data, etc.), and can transmit the clock-synchronized high-density sampling data (i.e., high-frequency sampling data) carrying a timestamp in the form of a data frame to a preset server.

[0042] Step S102 , based on the timestamp, a preset server is used to synchronize data frames transmitted by multiple terminals between each sampling point, wherein the sampling point is a time point for collecting broadband data on the power system.

[0043] Optionally, the sampling point is a time point at which broadband data on the power system is sampled, and the preset server can perform synchronization processing on the data transmitted by multiple terminals at a time point according to the timestamp carried by the data frame transmitted by each terminal.

[0044] In this embodiment, the preset server can also set and switch the sampling frequency and send it to multiple terminals so that the terminals collect broadband data according to the sampling frequency. In this way, the sampling frequencies of different terminals can be ensured to be consistent, which is conducive to the synchronous processing of broadband data.

[0045] To sum up, the preset server can receive data frames transmitted by multiple terminals, and then synchronize the data frames transmitted by multiple terminals between each sampling point according to the timestamps carried by the data frames. This not only realizes the real-time transmission of the terminal's broadband and high-density sampling data to the preset server, but also can maintain synchronization between sampling points of different terminals, thereby solving the technical problem in related technologies that the broadband data of the power system cannot be effectively synchronized.

[0046] In order to determine the data frame structure, in the data synchronization method based on the power system provided in Example 1 of the present application, the data frame structure is determined, wherein the data frame structure includes: a function byte and a data byte; the function byte includes at least one of the following: a data frame type field, a terminal number field, a connection status field, a sampling rate field, and a check code field; the data byte is used to store broadband data; based on the data frame structure, the broadband data collected by the terminal is converted into a data frame.

[0047] Optionally, a data frame structure may be constructed first, and the data frame structure may include: a function byte and a data byte. The function byte may include a data frame type field (i.e., a frame synchronization word, used to distinguish different frames), a terminal number field (used to distinguish different terminals), a connection status field (used to indicate whether it is connected to a synchronous clock system, such as, in a GPS system, 0 indicates an unconnected state, and 1 indicates a connected state), a sampling rate field (used to indicate the current sampling frequency, such as a sampling frequency of 3.2kHz (Ki lohertz, i.e., a frequency unit), 6.4kHz, or 12.8kHz), and a check code field (used to detect whether an error occurs during data transmission or storage). For example, the check code field may be generated using CRC16 (Cyc l icRedundancy Check 16-bit, i.e., a cyclic redundancy check code). The data byte is used to store broadband data collected by the terminal (such as voltage and current data of six channels in a three-phase alternating current).

[0048] In this embodiment, the function byte may also include the number of frame bytes, which is used to indicate the total number of bytes in the data frame. When the GPS system is used for clock synchronization, the function byte may also include a century seconds field (used to indicate the number of seconds calculated from the starting point of the GPS time system) and a fractional seconds field. The fractional seconds field may contain the numerical value of the fraction of seconds and a time quality identifier, which may be used for high-precision time synchronization. For example, the system defines 5 frames of data per second, and the fractions of seconds 1-5 represent the first frame to the fifth frame in the second respectively (e.g., a fraction of seconds of 1 represents the first frame in the second, and the time range is from 0 seconds to 0.2 seconds).

[0049] In this embodiment, each data frame can contain three-phase voltage and three-phase current sampling data with a duration of 200 ms (milli second, ie, time unit), and the terminal can convert the collected broadband data into a data frame format.

[0050] Exemplarily, the data frame structure is shown in Table 1.

[0051] Table 1

[0052] serial number Fields Length (bytes) illustrate 1 SYNC 2 Frame Sync Word 2 FRAMESIZE 4 Frame Bytes 3 IDCODE 8 Waveform measurement device identification 4 SOC 4 Seconds of the Century 5 FRACSEC 4 Fractions of a second and time quality 6 STAT 2 Status word corresponding to the flag bit by bit 7 SAMPLE_SIZE 1 4 Number of bytes for the first channel …… …… …… …… 14 SAMPLE_SIZE 6 4 The number of bytes for the sixth channel 15 SAMPLE 1 SAMPLE_SIZE 1 The sampling data of the first channel …… …… …… …… 22 SAMPLE 6 SAMPLE_SIZE 6 The sampling data of the sixth channel 23 Check Bytes 2 CRC16 checksum

[0053] In order to improve the accuracy of data transmission, in the data synchronization method based on the power system provided in Example 1 of the present application, a data connection is established between a preset server and each terminal; each terminal is controlled to encrypt the data frame, and when the data frame encryption is successful, each terminal is controlled to transmit the encrypted data frame to the preset server based on the data connection.

[0054] Optionally, the communication bottom layer between the preset server and the terminal device may adopt TCP (Transmission Control Protocol, i.e., a transmission control protocol). In the TCP protocol, a TCP connection (i.e., a data connection) needs to be established before data transmission. First, a data connection may be established between the preset server and each terminal. The data transmission direction of the established data connection may be unidirectional. The terminal may transmit the sampling point data in the data frame to the preset server through the data connection to realize the real-time upload of broadband and high-density data.

[0055] In this embodiment, each terminal may be controlled to encrypt the data frame to protect the transmitted broadband data. When the data frame is encrypted successfully, each terminal is controlled to transmit the encrypted data frame to the preset server according to the established data connection.

[0056] Exemplarily, the data frame may be transmitted at a frequency of 5 Hz (hertz, a unit of frequency), and each data frame may include 200 ms of broadband waveform measurement data.

[0057] In order to realize the command interaction between the preset server and the terminal, in the data synchronization method based on the power system provided in Example 1 of the present application, a command connection is established between the preset server and each terminal, wherein the command connection is used to realize the command interaction between the terminal and the preset server through a command frame; the command frame structure is determined, wherein the command frame structure includes at least: a command frame type field, a terminal number field, and a command identification field.

[0058] Optionally, while establishing a data connection between the preset server and each terminal, a command connection can be established between the preset server and each terminal. Based on the established command connection, command interaction between the terminal and the preset server is realized through command frames, and command frames can be sent to the terminal through the preset server to realize terminal online status monitoring, terminal sampling rate (such as 3.2kHz, 6.4kHz, 12.8kHz) switching and remote restart of the terminal.

[0059] In this embodiment, the command frame may include a command frame type field (i.e., a frame synchronization word, used to identify different types of frames, such as AA00 can represent a command frame), a frame byte number (used to represent the total number of bytes of the command frame), a terminal number field (used to distinguish different terminals), and a command identification field (i.e., Command, CMD field, used to indicate the identifier of the specific command or operation carried by the command frame, for example, a heartbeat signal identifier, a sampling rate switching identifier, and a terminal remote restart control identifier, etc.).

[0060] In this embodiment, the command frame may also include a switching sampling rate field (used to indicate the sampling frequency that the terminal needs to switch to, such as the sampling frequency that the terminal needs to switch to includes different frequencies such as 3.2kHz, 6.4kHz, 12.8kHz, etc.), a check code field (such as CRC16 check), and when the GPS system is used for clock synchronization, the command frame may also include a century second field (used to record the time of issuing the command) and a fractional second field.

[0061] It should be noted that the fractional seconds field of the command frame can be set to 0.

[0062] Exemplarily, the command frame structure is shown in Table 2, wherein 001-3.2kHz, 010-6.4kHz, and 011-12.8kHz respectively indicate that the identification when switching to 3.2kHz sampling frequency is 001, the identification when switching to 6.4kHz sampling frequency is 010, and the identification when switching to 12.8kHz sampling frequency is 011.

[0063] Table 2

[0064]

[0065]

[0066] Figure 2 is a schematic diagram of an optional command frame structure according to an embodiment of the present invention, such as Figure 2 As shown in the figure, the command frame includes: SYNC (Synchronization), FRAMESIZE (frame size), ClientNo (terminal number), SOC (Start of Conversion), FRACSEC (Fractional Seconds), CMD (Command), Sample (sampling rate), and CHK (Check, used for data verification or data integrity check). Among them, SYNC represents the synchronization word, and the byte length is 2. SYNC can start with MSB (Most Significant Byte, i.e., the most significant byte in multi-byte data) and end with LSB (Least Significant Byte, i.e., the least significant byte in multi-byte data). FRAMESIZE represents the number of frame bytes, and the byte length is 2. ClientNo represents the terminal device identifier, and the byte length is 8. SOC represents century seconds, and the byte length is 4. FRACSEC represents fractions of seconds, and the byte length is 4. CMD represents the command byte, and the byte length is 2. Sample represents the sampling rate, and the byte length is 1. CHK represents the check code, and the byte length is 2. The command frame can also use first transmission and last transmission to represent the transmission order. First transmission represents the information transmitted at the beginning of the command frame, such as SYNC, FRAMESIZE, ClientNo, SOC, FRACSEC, and CMD, and last transmission represents the information transmitted at the end of the data frame, such as Sample and CHK.

[0067] In this embodiment, the command frames sent by the preset server to the terminal include a heartbeat signal command frame, a sampling rate switching command frame, and a restart command frame. After receiving the sampling rate switching command frame and the remote restart command frame sent by the preset server, the terminal generates an affirmative response command frame. The heartbeat signal command frame, the sampling rate switching command frame, the restart command frame, and the affirmative response command frame can be distinguished by the CMD field. For example, the CMD field of the heartbeat signal command frame can be 4000, the CMD field of the sampling rate switching command frame can be C000, the CMD field of the restart command frame can be 6000, and the CMD field of the affirmative response command frame can be E000.

[0068] In this embodiment, the operation executed by the command frame may be indicated by different command words.

[0069] Exemplarily, the command word (i.e., a code or field used to trigger a device to perform a specific operation) is shown in Table 3, wherein the command word includes 16 binary digits, Bits 3-0 and Bits 12-4 can be set to 0 without transmitting information, Bits 15-13 are used to define the upper three bits of the command word, which are used to indicate the command type, including: 010, 011, 110, wherein 010 represents a heartbeat signal, which is used to periodically check whether the system or device is still operating normally, 011 represents a restart signal, which is used to indicate that the device needs to be restarted or initialized, and 110 represents switching the sampling rate, which is used to command the device to change the frequency of data sampling. The master station (i.e., the preset server) can send different command types to the slave station (i.e., the terminal). For example, the preset server sends a heartbeat signal to the terminal (e.g., the command word is set to 0100 0000 0000 0000), and the terminal immediately returns the heartbeat signal command frame after receiving the heartbeat signal; the preset server sends a sampling rate switching signal to the terminal (e.g., the command word is set to 1100 0000 00000000), and the terminal immediately returns an affirmative response (e.g., 1110 0000 0000 0000) after receiving the sampling rate switching signal.

[0070] Table 3

[0071]

[0072] In order to monitor the operating status of the target terminal, in the data synchronization method based on the power system provided in Example 1 of the present application, when the preset server needs to monitor the target terminal, a heartbeat signal command frame is constructed based on the heartbeat signal identifier, the target terminal code of the target terminal and the command frame structure; the preset server is controlled to send the heartbeat signal command frame to the target terminal based on the command connection; the preset server receives the heartbeat signal command frame returned by the target terminal within the preset time length, and determines that the target terminal is online.

[0073] Optionally, the preset service end can be based on the heartbeat identifier (i.e., command word, such as 0100 0000 0000 0000), the target terminal code (such as 000X) of the target terminal, and according to the command frame structure, build a heartbeat signal command frame, and the heartbeat signal command frame may include SYNC (such as AA40), FRAMESIZE (such as 0019), IDCODE (such as 000X), SOC (i.e., the time of issuing the command), FRACSEC (such as 0), CMD (such as 4000), Sample (such as 00), CRC16 (such as XXXX). If the preset service end needs to monitor the target terminal, it can be connected by command to control the preset service end to send the heartbeat signal command frame to the target terminal to realize the heartbeat detection of the terminal.

[0074] In this embodiment, the preset server can send a heartbeat signal command frame to the target terminal once every 10 seconds. After the target terminal receives the heartbeat signal command frame sent by the preset server, it immediately returns the frame through the command connection port. The preset server receives the heartbeat signal command frame returned by the target terminal within a preset time (such as 1 second), and can determine that the target terminal is online.

[0075] Exemplarily, the heartbeat signal command frame structure is shown in Table 4.

[0076] Table 4

[0077]

[0078] It should be noted that the CMD of the heartbeat signal command frame is a hexadecimal number 4000, which is converted into a binary number 01000000 0000 0000, and is used to indicate that the frame performs heartbeat monitoring.

[0079] In order to improve the accuracy of sampling rate switching of the target terminal, in the data synchronization method based on the power system provided in Example 1 of the present application, when the preset server needs to switch the sampling rate of the target terminal, a sampling rate switching command frame is constructed based on the sampling rate switching identifier, the target terminal code of the target terminal and the command frame structure; the preset server is controlled to send the sampling rate switching command frame to the target terminal based on the command connection; when the target terminal determines to switch the sampling rate, the target terminal is controlled to switch the data acquisition frequency at the next time point to the sampling rate carried by the sampling rate switching command frame, and generate a confirmation response signal; the target terminal is controlled to return the confirmation response signal to the preset server.

[0080] Optionally, the preset server can construct a sampling rate switching command frame according to the sampling rate switching identifier (i.e., command word, such as 1100 0000 00000000), the target terminal code (e.g., 000X) of the target terminal, and the command frame structure. The sampling rate switching command frame may include SYNC (e.g., AA40), FRAMESIZE (e.g., 0019), IDCODE (e.g., 000X), SOC (i.e., command time), FRACSEC (e.g., 0), CMD (e.g., C000), Sample (e.g., 02), and CRC16 (e.g., XXXX). If the preset server needs to switch the sampling rate of the target terminal, it can control the preset server to send a sampling rate switching command frame to the target terminal through a command connection to enable the terminal to switch the sampling frequency.

[0081] Exemplarily, the sampling rate switching command frame structure is shown in Table 5.

[0082] Table 5

[0083]

[0084] It should be noted that the CMD in the sampling rate switching command frame structure is C000, C000 is a hexadecimal number, which is converted into a binary number of 1100 0000 0000 0000, and is used to indicate that the frame executes terminal sampling rate switching. The sampling rate 02 is a hexadecimal number, which is converted into a binary number of 10, which can indicate that the switching sampling rate is 6.4kHz.

[0085] In this embodiment, after the target terminal receives the sampling rate switching command frame from the preset server, if it agrees to switch the sampling frequency, it can immediately return an affirmative response command frame through the command connection and switch the data acquisition frequency at the next time point to the sampling rate carried by the sampling rate switching command frame (such as 6.4kHz).

[0086] Exemplarily, the positive response command frame structure is shown in Table 6.

[0087] Table 6

[0088] SYNC FRAMESIZE IDCODE SOC FRACSEC CMD Sample CRC16 AA40 0019 000X Starting time 0 E000 00 XXXX

[0089] It should be noted that the CMD of the affirmative response command frame is E000, where E000 is a hexadecimal number, which is converted into a binary number of 1110 0000 0000 0000.

[0090] In order to improve the accuracy of restarting the target terminal, in the data synchronization method based on the power system provided in Example 1 of the present application, when the preset server needs to restart the target terminal, a restart command frame is constructed based on the restart identifier, the target terminal code of the target terminal and the command frame structure; the preset server is controlled to send the restart command frame to the target terminal based on the command connection; when the target terminal determines to restart, the target terminal is controlled to restart and generate a confirmation response signal; the target terminal is controlled to return the confirmation response signal to the preset server.

[0091] Optionally, the preset server can construct a restart command frame according to the restart identifier (i.e., command word, such as 0110 0000 0000 0000), the target terminal code of the target terminal, and the command frame structure. The restart command frame may include SYNC (such as AA40), FRAMESIZE (such as 0019), IDCODE (such as 000X), SOC (i.e., command time), FRACSEC (such as 0), CMD (such as 6000), Sample (such as 00), and CRC16 (such as XXXX). If the preset server needs to restart the target terminal, it can control the preset server to send a restart command frame to the target terminal through a command connection to restart the terminal.

[0092] Exemplarily, the restart command frame structure is shown in Table 7.

[0093] Table 7

[0094]

[0095] It should be noted that the CMD in the restart command frame structure is 6000, which is a hexadecimal number, converted into a binary number of 0110 0000 0000 0000, which is used to indicate that the frame executes a remote restart of the terminal.

[0096] In this embodiment, if the target terminal determines to restart, a confirmation response signal may be generated while restarting, and the confirmation response signal may be returned to the preset server, so that the preset server can know that the terminal has restarted.

[0097] In an embodiment of the present invention, the terminal can perform clock synchronization through a satellite positioning system and add a timestamp to the collected wide-band data of voltage and current of the power system. The terminal then encrypts the clock-synchronized high-density sampling data carrying a timestamp and transmits it to a preset server, and implements data parsing on the preset server. This enables the terminal's high-density sampling data to be transmitted to the main station in real time and maintains synchronization between sampling points of different terminals, thereby achieving synchronous measurement of waveform data levels across the entire network. The preset server can also send command signals to the terminal in the form of command frames to achieve online status monitoring of the terminal, terminal sampling rate adjustment, and remote restart of the terminal.

[0098] The following is a detailed description in conjunction with another embodiment.

[0099] Embodiment 2

[0100] A data synchronization device based on a power system provided in this embodiment includes multiple implementation units, each of which corresponds to each implementation step in the above-mentioned embodiment 1.

[0101] Figure 3 is a schematic diagram of an optional data synchronization device based on a power system according to an embodiment of the present invention, such as Figure 3 As shown, the data synchronization device may include: a first receiving unit 30 and a first synchronization unit 31 .

[0102] The first receiving unit 30 is used to receive data frames transmitted by multiple terminals using a preset server, wherein the terminals are deployed on the power system and are used to collect broadband data on the power system; the data frames carry a timestamp;

[0103] The first synchronization unit 31 is used to synchronize data frames transmitted by multiple terminals between each sampling point using a preset server based on a timestamp, wherein the sampling point is a time point for collecting broadband data on the power system.

[0104] The above-mentioned data synchronization device can use the preset server to receive data frames transmitted by multiple terminals through the first receiving unit 30, and use the preset server to synchronize each sampling point of the data frames transmitted by multiple terminals based on timestamps through the first synchronization unit 31.

[0105] Optionally, the data synchronization device includes: a first determination module, used to determine the data frame structure before using a preset server to receive data frames transmitted by multiple terminals, wherein the data frame structure includes: a function byte and a data byte; the function byte includes at least one of the following: a data frame type field, a terminal number field, a connection status field, a sampling rate field, and a check code field; the data byte is used to store broadband data; a first conversion module, used to convert the broadband data collected by the terminal into a data frame based on the data frame structure.

[0106] Optionally, the data synchronization device also includes: a first establishment module, used to establish a data connection between the preset server and each terminal before using the preset server to receive data frames transmitted by multiple terminals; a first control module, used to control each terminal to encrypt the data frame, and when the data frame encryption is successful, control each terminal to transmit the encrypted data frame to the preset server based on the data connection.

[0107] Optionally, the data synchronization device also includes: a second establishment module, used to establish a command connection between the preset server and each terminal before using the preset server to receive data frames transmitted by multiple terminals, wherein the command connection is used to realize command interaction between the terminal and the preset server through command frames; a second determination module, used to determine the command frame structure, wherein the command frame structure includes at least: a command frame type field, a terminal number field, and a command identification field.

[0108] Optionally, the data synchronization device also includes: a first construction module, used to construct a heartbeat signal command frame based on the heartbeat signal identifier, the target terminal code of the target terminal and the command frame structure after determining the command frame structure, when the preset server needs to monitor the target terminal; a second control module, used to control the preset server to send the heartbeat signal command frame to the target terminal based on the command connection; and a third determination module, used to determine that the target terminal is online when the preset server receives the heartbeat signal command frame returned by the target terminal within a preset time period.

[0109] Optionally, the data synchronization device also includes: a second construction module, which is used to construct a sampling rate switching command frame based on the sampling rate switching identifier, the target terminal code of the target terminal and the command frame structure after determining the command frame structure, when the preset server needs to switch the sampling rate of the target terminal; a third control module, which is used to control the preset server to send the sampling rate switching command frame to the target terminal based on the command connection; a fourth control module, which is used to control the target terminal to switch the data acquisition frequency at the next time point to the sampling rate carried by the sampling rate switching command frame and generate a confirmation response signal when the target terminal determines to switch the sampling rate; and a fifth control module, which is used to control the target terminal to return the confirmation response signal to the preset server.

[0110] Optionally, the data synchronization device also includes: a third construction module, which is used to construct a restart command frame based on the restart identifier, the target terminal code of the target terminal and the command frame structure after determining the command frame structure, when the preset server needs to restart the target terminal; a sixth control module, which is used to control the preset server to send the restart command frame to the target terminal based on the command connection; a seventh control module, which is used to control the target terminal to restart and generate a confirmation response signal when the target terminal determines to restart; and an eighth control module, which is used to control the target terminal to return the confirmation response signal to the preset server.

[0111] The above-mentioned data synchronization device may also include a processor and a memory. The above-mentioned first receiving unit 30, the first synchronization unit 31, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to implement corresponding functions.

[0112] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and synchronization between each sampling point can be performed by adjusting kernel parameters.

[0113] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (fl ash RAM), and the memory includes at least one storage chip.

[0114] According to another aspect of an embodiment of the present invention, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data synchronization method based on the power system described in any one of the above is implemented.

[0115] When the computer program product is executed on a data processing device, it is suitable for executing a program that is initialized with the following method steps: using a preset server to receive data frames transmitted by multiple terminals, and based on timestamps, using the preset server to synchronize each sampling point of the data frames transmitted by the multiple terminals.

[0116] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the above-mentioned power system-based data synchronization method.

[0117] Figure 4 1 is a hardware structure block diagram of an electronic device (or mobile device) for a data synchronization method based on a power system according to an embodiment of the present invention. Figure 4 As shown, the electronic device may include one or more processors (e.g., Figure 4 The processor 402a, processor 402b, ..., processor 402n, etc., which may include but are not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 404 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown.

[0118] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0119] The embodiments or examples of the present disclosure are not exhaustive, but are only illustrative of some embodiments or examples, and are not intended to be specific limitations on the scope of protection of the present disclosure. In the absence of contradiction, each step in a certain embodiment or example can be implemented as an independent example, and the steps can be combined arbitrarily. For example, the scheme after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be combined arbitrarily; in addition, the various embodiments or examples can be combined arbitrarily, for example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional methods or optional examples of other embodiments or examples.

[0120] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0121] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0122] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0123] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0124] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0125] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A data synchronization method based on a power system, characterized in that: include: A preset service end is used to receive data frames transmitted by multiple terminals, wherein the terminals are deployed on the power system and are used to collect broadband data on the power system; the data frames carry a timestamp; Based on the timestamp, the preset service end is used to synchronize the data frames transmitted by the plurality of terminals between each sampling point, wherein the sampling point is a time point for collecting the broadband data on the power system.

2. The data synchronization method according to claim 1, characterized in that: Before using the preset server to receive data frames transmitted by multiple terminals, the method further includes: Determine a data frame structure, wherein the data frame structure includes: a function byte and a data byte; the function byte includes at least one of the following: a data frame type field, a terminal number field, a connection status field, a sampling rate field, and a check code field; the data byte is used to store the broadband data; Based on the data frame structure, the broadband data collected by the terminal is converted into the data frame.

3. The data synchronization method according to claim 1, characterized in that: Before using the preset server to receive data frames transmitted by multiple terminals, the method further includes: Establishing a data connection between the preset server and each of the terminals; Control each terminal to encrypt the data frame, and when the encryption of the data frame is successful, control each terminal to transmit the encrypted data frame to the preset server based on the data connection.

4. The data synchronization method according to claim 1, characterized in that: Before using the preset server to receive data frames transmitted by multiple terminals, the method further includes: Establishing a command connection between the preset server and each of the terminals, wherein the command connection is used to implement command interaction between the terminal and the preset server through a command frame; Determine a command frame structure, wherein the command frame structure at least includes: a command frame type field, a terminal number field, and a command identification field.

5. The data synchronization method according to claim 4, characterized in that: After determining the command frame structure, it also includes: In the case where the preset service end needs to monitor the target terminal, constructing a heartbeat signal command frame based on the heartbeat signal identifier, the target terminal code of the target terminal and the command frame structure; Controlling the preset server to send the heartbeat signal command frame to the target terminal based on the command connection; The preset service end receives the heartbeat signal command frame returned by the target terminal within a preset time period, and determines that the target terminal is in an online state.

6. The data synchronization method according to claim 4, characterized in that: After determining the command frame structure, it also includes: In the case where the preset server needs to switch the sampling rate of the target terminal, constructing a sampling rate switching command frame based on the sampling rate switching identifier, the target terminal code of the target terminal and the command frame structure; Controlling the preset server to send the sampling rate switching command frame to the target terminal based on the command connection; In the case where the target terminal determines to switch the sampling rate, controlling the target terminal to switch the data acquisition frequency at the next time point to the sampling rate carried by the sampling rate switching command frame, and generating a confirmation response signal; The target terminal is controlled to return the confirmation response signal to the preset service end.

7. The data synchronization method according to claim 4, characterized in that: After determining the command frame structure, it also includes: In the case where the preset server needs to restart the target terminal, constructing a restart command frame based on the restart identifier, the target terminal code of the target terminal and the command frame structure; Controlling the preset server to send the restart command frame to the target terminal based on the command connection; When the target terminal determines to restart, controlling the target terminal to restart and generating a confirmation response signal; The target terminal is controlled to return the confirmation response signal to the preset service end.

8. A data synchronization device based on an electric power system, characterized in that: include: A first receiving unit is used to receive data frames transmitted by multiple terminals using a preset server, wherein the terminals are deployed on the power system and are used to collect broadband data on the power system; the data frames carry a timestamp; The first synchronization unit is used to synchronize the data frames transmitted by the plurality of terminals between each sampling point using the preset service end based on the timestamp, wherein the sampling point is a time point for collecting the broadband data on the power system.

9. A computer program product, characterized in that It comprises a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data synchronization method based on the power system according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the power system-based data synchronization method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Multi-node synchronization sampling and data transmission method

    CN101316160A

  • Method for improving PMU (power management unit) synchronous phasor measurement precision

    CN104635094A

  • Multi-terminal data synchronization method and device

    CN113505174A

  • Method and apparatus for transmitting timestamp information, and device and storage medium

    WO2021238724A1