CN114979181A - Planned value curve synchronization method, device and storage medium - Google Patents

Planned value curve synchronization method, device and storage medium Download PDF

Info

Publication number
CN114979181A
CN114979181A CN202210572481.8A CN202210572481A CN114979181A CN 114979181 A CN114979181 A CN 114979181A CN 202210572481 A CN202210572481 A CN 202210572481A CN 114979181 A CN114979181 A CN 114979181A
Authority
CN
China
Prior art keywords
value curve
curve
queue
synchronization
synchronous
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.)
Granted
Application number
CN202210572481.8A
Other languages
Chinese (zh)
Other versions
CN114979181B (en
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.)
Nanjing Guodian Nanzi Weimeide Automation Co ltd
Original Assignee
Nanjing Guodian Nanzi Weimeide Automation 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 Nanjing Guodian Nanzi Weimeide Automation Co ltd filed Critical Nanjing Guodian Nanzi Weimeide Automation Co ltd
Priority to CN202210572481.8A priority Critical patent/CN114979181B/en
Publication of CN114979181A publication Critical patent/CN114979181A/en
Application granted granted Critical
Publication of CN114979181B publication Critical patent/CN114979181B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • 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
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method, a device and a storage medium for synchronizing a planned value curve, wherein the method comprises a system initialization process, and comprises the following steps: finishing the initialization process of the local host and the opposite side host; a synchronization queue updating step, comprising: acquiring a new plan value curve, and updating a plan value curve metadata synchronization queue; the synchronous message organization step comprises: taking out the plan value metadata in the synchronization queue, organizing a plan value curve synchronization message according to a convention format, and actively pushing the plan value curve synchronization message to the opposite side host; the invention can realize the real-time synchronization of the plan value curve between the two machines of the plan value curve receiving system without distinguishing the main and standby identities.

Description

Planned value curve synchronization method, device and storage medium
Technical Field
The invention relates to a method and a device for synchronizing a planned value curve and a storage medium, and belongs to the technical field of electric power.
Background
Usually, the receiving work of the plant station side plan value curve is completed by a telecontrol RTU device, and the device is accessed to a scheduling data network and directly receives the plan value curve issued by a scheduling master station. With the recent development of the domestic power market, the load prediction of a dispatching organization is gradually shifted from the traditional short-term load prediction to an ultra-short-term load prediction mode required by the power spot transaction. Through ultra-short-term load prediction, the scheduling master station can adjust the planned value curve in time according to the trading result of the power market.
However, due to limited hardware resources, the plant-side telecontrol RTU device cannot store the received planned value curve; meanwhile, under the condition of dual redundancy configuration of the telecontrol RTU equipment, only one telecontrol RTU equipment can receive the planned value curve issued by the scheduling mechanism. During the fault off-line operation of the telecontrol RTU equipment, the economic loss of a plant station can be caused because the other telecontrol RTU equipment lacks a corresponding planned value curve, and even the stable operation of a power grid is influenced.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, and provides a method, a device and a storage medium for synchronizing a planned value curve, which can synchronize the planned value curve between two machines of a planned value curve receiving system without distinguishing main and standby identities in real time.
In order to achieve the purpose, the invention is realized by adopting the following technical scheme:
in a first aspect, the present invention provides a method for synchronizing a planned value curve, including:
the system initialization process comprises the following steps: finishing the initialization process of the local host and the opposite side host;
a synchronization queue updating step, comprising: acquiring a new planning value curve, and updating a planning value curve metadata synchronization queue;
the synchronous message organization step comprises: taking out the plan value metadata in the synchronization queue, organizing a plan value curve synchronization message according to a convention format, and actively pushing the plan value curve synchronization message to the opposite side host;
and circularly executing the synchronous queue updating step and the synchronous message organizing step to realize a complete process of plan value curve synchronization.
Further, a planned value curve synchronous message format is defined, and at least one data packet is contained in a synchronous message data area, wherein the data packet is divided into four types including an online identifier, a request curve, curve synchronization and curve confirmation.
Further, the system initialization process includes:
initializing a local planned value metadata pool, and recording a local starting time scale;
the delayed sending of the local online identification packet comprises the following steps: local machine identification and local startup time scale;
receiving an opposite-side host online identification packet, comparing a local host start time scale with an opposite-side host start time scale, and if the opposite-side start time scale is earlier than that of the local host, setting the opposite side as a trusted host;
and sending a command for requesting the full-list data of the planned value curve to the opposite side host computer once, and finishing the initialization process of the system set by the two computers simultaneously.
Further, after the planned value curve synchronization process is started, if the opposite-side host online identification packet is not received within the set delay time, the opposite-side host is determined to be offline, and then the system initialization process step is returned to wait for a new system initialization process.
Further, the obtaining a new planning value curve and updating the planning value curve metadata synchronization queue includes:
constructing new plan value curve metadata, and adding the new plan value curve metadata to the tail of a plan value curve metadata synchronous queue;
receiving a request curve data packet of the opposite side host, judging whether the request curve time mark in the request curve data packet is an invalid time mark or a valid time mark, and performing corresponding processing according to a judgment result;
and receiving a strategy host curve confirmation data packet, traversing all elements of the plan value curve metadata synchronous queue, and deleting the queue element if the identifier of the queue element is the same as the confirmation information identifier in the confirmation data packet.
Further, the determining whether the request curve time scale in the request curve data packet is an invalid time scale or a valid time scale and performing corresponding processing according to the determination result includes:
if the time scale of the request curve in the request curve data packet is an invalid time scale, the request curve represents that the opposite side host requests full-time-period full-list data of a plan value curve, at the moment, the current plan value curve metadata synchronous queue is emptied, all plan value curve metadata in a plan value curve metadata pool are taken out, and the plan value curve metadata synchronous queue is added with the plan value curve metadata;
and if the request curve time scale in the request curve data packet is a valid time scale, the request curve data packet indicates that the opposite side host requests the schedule value curve full list data, at this time, the queue elements with the curve date attribute equal to the date in the schedule value curve metadata synchronous queue are deleted, the schedule value curve metadata at the date in the schedule value curve metadata pool are taken out, and the schedule value curve metadata are added to the schedule value curve metadata synchronous queue.
Further, the extracting of the plan value metadata in the synchronization queue, organizing the plan value curve synchronization packet according to an agreed format, and actively pushing the plan value curve synchronization packet to the opposite side host includes:
selecting a queue head element in the planned value curve metadata synchronous queue, and organizing a planned value curve synchronous data packet according to a preset curve synchronous data packet format;
traversing the planned value curve element data synchronization queue according to the sequence from the head of the queue to the tail of the queue, selecting a queue element with the same curve date and refreshing time scale as the head of the queue element, and adding the queue element into a curve synchronization data packet;
after the previous group of queue elements with the same curve date and the refresh time scale are added to the curve synchronization data packet, repeating the previous steps, traversing unselected queue elements in the plan value curve element data synchronization queue according to the sequence from the head of the queue to the tail of the queue, selecting a new group of queue elements containing the same curve date and the refresh time scale, and organizing a new plan value curve synchronization data packet;
repeating the steps until all queue elements in the plan value curve metadata synchronous queue are selected or the sum of the lengths of one or more organized curve synchronous data packets exceeds the maximum transmission length, and immediately stopping traversing; the organized one or more curve synchronous data packets are transmitted in the same frame of planned value curve synchronous message;
receiving a plan value curve synchronous data packet, and immediately organizing a plan value curve confirmation packet after correct analysis; wherein, the number of the curve confirmation packets is equal to the number of the plan value curve synchronization data packets in the received plan value curve synchronization message;
if the queue element exists in the planned value curve element data synchronization queue, the planned value curve synchronization data packet is organized again and transmitted in the same frame of planned value curve synchronization message with the curve confirmation packet.
In a second aspect, the present invention provides a planned value curve synchronization apparatus, including:
the system initialization unit is used for completing the initialization process of the local host and the opposite host;
the synchronous queue updating unit is used for acquiring a new planning value curve and updating the planning value curve metadata synchronous queue;
the synchronous message organization unit is used for taking out the planning value metadata in the synchronous queue, organizing the planning value curve synchronous message according to a convention format and actively pushing the synchronous message to the opposite side host;
and the execution unit is used for circularly executing the synchronous queue updating unit and the synchronous message organization unit to realize the complete process of the plan value curve synchronization.
In a third aspect, the present invention provides a planning value curve synchronization apparatus, including a processor and a storage medium;
the storage medium is used for storing instructions;
the processor is configured to operate in accordance with the instructions to perform the steps of the method according to any one of the preceding claims.
In a fourth aspect, the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any one of the preceding claims.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention provides a method, a device and a storage medium for synchronizing a planned value curve, which are characterized in that the planned value curve receiving system does not distinguish the identities of main and standby machines between the two machines, so that the priority of the identities of the main and standby machines does not need to be preset in the system, and the main and standby identities do not need to be determined through double-machine negotiation in the system working condition switching process, so that the system can respond to a planned value curve master station command in time, and the availability of the planned value curve receiving system is improved.
2. The rapid synchronization of the plan value curve between the two machines of the plan value curve receiving system is realized through the plan value curve synchronization message and the synchronization flow which are optimally designed. Under any working condition of the plan value curve master station, any host of the plan value curve receiving system can receive the plan value curve issued by the master station, and meanwhile, each host has a complete plan value curve, so that the reliability of the plan value curve receiving system is improved.
Drawings
Fig. 1 is a flowchart of a planning value curve synchronization method according to an embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
Example 1
The present embodiment introduces a method for synchronizing a planned value curve, including:
the system initialization process comprises the following steps: finishing the initialization process of the local host and the opposite side host;
a synchronization queue updating step, comprising: acquiring a new planning value curve, and updating a planning value curve metadata synchronization queue;
the synchronous message organization step comprises: taking out the plan value metadata in the synchronization queue, organizing a plan value curve synchronization message according to a convention format, and actively pushing the plan value curve synchronization message to the opposite side host;
and circularly executing the synchronous queue updating step and the synchronous message organizing step to realize a complete process of plan value curve synchronization.
The application process of the planning value curve synchronization method provided by the embodiment specifically relates to the following steps:
the method comprises the following steps: initializing task setting and identifying double identities; step two: acquiring a new plan value curve, and updating a plan value metadata synchronization queue; step three: and taking out the planning value metadata in the synchronization queue, organizing a planning value curve synchronization message according to a convention format, and actively pushing the planning value curve synchronization message to the opposite side.
The plan value curve synchronization message adopts a custom format, as shown in table 1:
TABLE 1 Sync message Format
Figure BDA0003660718370000061
Figure BDA0003660718370000071
The data length of the synchronous message is the number of data bytes contained in the synchronous message of the frame. According to different transmission links of a physical layer, the system sets the maximum byte number (marked as Max _ Frame _ Size, obviously, 8 ≤ Max _ Frame _ Size < 65535) of single-Frame message transmission. The data length size satisfies the condition:
1+2+1+ Size +1 ≦ Max _ Frame _ Size (equation 1)
The synchronous message data area contains at least one data packet. The data packet can be divided into four types, such as an online identifier, a request curve, curve synchronization, curve confirmation and the like according to the contained content, and the format definitions are respectively shown in tables 2 to 5:
table 2 online identification packet format
Figure BDA0003660718370000072
Table 3 request profile packet format
Figure BDA0003660718370000081
TABLE 4 Curve synchronous data packet Format
Figure BDA0003660718370000082
Figure BDA0003660718370000091
Table 5 Curve acknowledgment packet Format
Figure BDA0003660718370000092
Except for the curve synchronous data packet, the lengths of three types of data packets such as an online identifier, a request curve, a curve confirmation and the like are fixed values and are respectively recorded as sizeoffdsc, sizeoffreq and sizeoffack, and the values are respectively 72, 8 and 2. The length of the curve synchronous data packet is variable and is related to the number m of the planned value curve metadata contained in the data packet; the length datasize of the plan value curve metadata is set to be 5, and is consistent with the length of the plan value curve data transmitted by the plan value curve master station, so that the precision loss in the data conversion process is avoided. From this, it is inferred that the curve synchronization packet length SizeofCuv satisfies:
Figure BDA0003660718370000101
in order to ensure the maximum transmission efficiency, a plurality of data packets of the same type or different types can be put into the curve synchronous message of the same frame planning value, the data length can meet the formula 1, and at the moment, the data length size of the synchronous message meets the following requirements:
size=k 1 ×SizeofDsc+k 2 ×SizeofReq+k 3 ×SizeofAck+k 4 XSizeofCuv (equation 3)
In formula 3, k1 represents the number of online identification data packets in the synchronous message, and the value is 0 or 1; k2 is the number of the request curve data packets in the synchronous message, and the value is 0 or 1; k3 is the number of curve confirmation data packets in the synchronous message, and the value is 0 or 1; k4 is the number of curve synchronous data packets in the synchronous message, and the value is an integer greater than or equal to 0.
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
As shown in fig. 1, the present invention is implemented by the following steps:
the method comprises the following steps: initializing task setting, wherein the double-identity identification comprises the following steps:
firstly, the system self-checks, obtains the machine name of the local machine and records the starting time scale of the local machine. In the self-checking process of the system, the sntp time synchronization condition is specially checked, if the sntp time synchronization is not normal, the self-checking of the system is determined to be abnormal, and the subsequent planned value curve synchronization task cannot be continued.
Reading configuration information after the system is normally self-checked, wherein the configuration information comprises a dual-computer synchronization mode, if the system is synchronized in a network mode, an IP address of a host on the opposite side needs to be obtained, and if the system is synchronized in a serial port mode, a synchronous serial port number needs to be obtained; and acquiring a local planned value curve configuration list, and initializing a local planned value curve metadata pool. The plan value curve metadata pool is a three-dimensional array arranged according to the address, date and data of the plan value curve, and the approximate structure of the three-dimensional array is shown in table 6:
TABLE 6 plan value Curve metadata pool Structure
Figure BDA0003660718370000111
The projected value curve metadata pool is updated by a projected value curve reception module. The projected value curve receiving module is not within the scope of the present discussion.
And secondly, after the system completes self-checking and initialization task setting, the system immediately sends a local machine online identification packet. The online identification packet comprises a local machine identification and a local starting time scale. And the online identification packet is periodically sent according to the set delay.
After the online identification packet of the opposite side host is received, comparing the startup time scale of the local computer with the startup time scale of the opposite side host, and if the startup time scale of the opposite side is earlier than that of the local computer, setting the opposite side as a trusted host. The purpose of setting up the trusted host is to control the direction of transmission of the data command requesting the full list of projected value curves in subsequent steps. Because the double computers finish the time synchronization, the situation that the local computer is later than the opposite side host computer and the time scale of the local computer is earlier than that of the opposite side host computer does not exist. In the case, because the two machines simultaneously complete system self-checking and initialization task setting, no data exists in the two-machine planning value curve metadata pool in a discontinuous plane at the moment, and thus, the situation has no adverse effect on the subsequent planning value curve synchronization process.
And fourthly, immediately sending a command for requesting the full-list data of the plan value curve once after the opposite side host is set as a trust host. After the data in the planning value curve metadata pool of the opposite side host is completely transmitted, the dual-computer simultaneous setting system initialization process is finished. And after the initialization process is finished, the subsequent plan value curve synchronization process is started again. In the subsequent synchronous flow, a command requesting the full list data of the plan value curve is periodically sent according to the set delay. And the planning value curve metadata constructed by the planning value curve receiving module is temporarily stored in the planning value curve receiving module in the process of transmitting the planning value curve full-list data, and is transferred to the planning value curve metadata synchronous queue for processing after the full-list data is transmitted.
After the planned value curve synchronization process is started, if the opposite-side host online identification packet is not received within the set delay time, the opposite-side host is determined to be offline, and the system returns to the system initialization process state to wait for a new system initialization process.
Step two: acquiring a new plan value curve, and updating the plan value curve metadata synchronization queue comprises the following steps:
firstly, a planning value curve receiving module constructs new planning value curve metadata and adds the metadata to the tail of a planning value curve metadata synchronous queue. The approximate structure of the projected value curve metadata synchronization queue is shown in table 7:
TABLE 7 PLANNING VALUE CURVE METADATA SYNCHRONOUS QUEUE STRUCTURE
Figure BDA0003660718370000131
In the process of adding the planned value curve metadata to the planned value curve metadata synchronous queue by the planned value curve receiving module, the address, data and curve date of the planned value curve metadata are directly analyzed from a planned value curve message transmitted by a planned value curve master station, the refreshing time mark comes from the time when the planned value curve receiving module receives the planned value curve message, and the identifier is initialized to a set initial value. Usually, a frame of plan value curve message issued by a plan value curve master station may contain a plurality of plan value curve data, so that the corresponding plan value curve metadata constructed accordingly has the same queue element attributes such as curve date and refresh time scale, and in the process of adding the part of plan value curve metadata to the plan value curve metadata synchronization queue, the curve date and refresh time scale attributes of the subsequent queue elements are copied from the first queue element added this time, so as to maintain the consistency of the plan value curve metadata synchronization queue structure, and facilitate the maintenance of the plan value curve metadata synchronization queue.
Secondly, receiving a request curve data packet of the opposite side host, wherein the request curve time mark in the request curve data packet is an invalid time mark, indicating that the opposite side host requests full-time-period full-list data of a planned value curve, emptying a current planned value curve metadata synchronous queue at the moment, taking out all planned value curve metadata in a planned value curve metadata pool, and adding the planned value curve metadata synchronous queue; and receiving a request curve data packet of the opposite side host, wherein the request curve time scale in the request curve data packet is a valid time scale, the request curve data packet indicates that the opposite side host requests the full list data of the date of the planned value curve, at this time, queue elements of the planned value curve metadata synchronous queue, which have the curve date attribute equal to the date, are deleted, the planned value curve metadata at the date in the planned value curve metadata synchronous queue are taken out, and the planned value curve metadata are added to the planned value curve metadata synchronous queue.
In the process of transmitting the full list data of the planned value curve, the planned value curve metadata constructed by the planned value curve receiving module is temporarily stored in the planned value curve receiving module, which means that in the process, a new queue element should not be added to the planned value curve metadata synchronous queue. The plan value curve metadata synchronization queue is empty, which means that all plan value curve metadata in the plan value curve metadata synchronization queue are synchronized to the opposite side host and confirmed by the opposite side host, which means that the plan value curve full list data transmission process is completed at this time. And after the transmission of the full list data is finished, adding the planned value curve metadata temporarily stored in the planned value curve receiving module to a planned value curve metadata synchronous queue for processing.
Thirdly, when a confirmation data packet of the opposite side host computer curve is received, traversing all elements of the planned value curve element data synchronization queue, and if the identifier of the queue element is the same as the confirmation information identifier in the confirmation data packet, deleting the queue element.
Step three: the method for taking out the planned value curve metadata in the synchronization queue, organizing the planned value curve synchronization message according to the agreed format, and actively pushing the planned value curve synchronization message to the opposite side host comprises the following steps:
firstly, selecting a queue head element in the planned value curve metadata synchronization queue, and organizing a planned value curve synchronization data packet according to a curve synchronization data packet format in a table 4. In order to improve the efficiency of the planned value curve data synchronization, under the premise that the formula 1, the formula 2 and the formula 3 are satisfied, queue elements with the same curve date and the same refresh time scale can be searched in the planned value curve element data synchronization queue according to the sequence from the head of the queue to the tail of the queue, and the queue elements are synchronously added to the curve synchronization data packet. And the information identifier in the curve synchronization data packet is used as an identifier of the selected queue element in the schedule value curve metadata synchronization queue. The identifier is used by the receiving end of the curve synchronization data packet to distinguish the transmission reason of the curve synchronization data packet. The transmission reasons comprise a full list data command and active push of a response request plan value curve. The reason for the transmission is that when a plan value curve full list data command is requested, the identifier contains information on the number of curve synchronization packets waiting for transmission. The curve synchronous data packet number waiting for transmission is 0, which represents that the transmission process of the curve full list data with the scheduled value is finished. The reason for the transmission is that when the active push is used, the identifier contains active push count information.
After all queue elements with the same curve date and the same refresh time scale are added to the curve synchronization data packet, if the length of the plan value curve synchronization packet still meets the formula 1, the steps are repeated, a new group of queue elements containing the same curve date and the same refresh time scale are found out from the plan value curve metadata synchronization queue according to the sequence from the head of the queue to the tail of the queue, a new plan value curve synchronization data packet is organized and is placed in the plan value curve synchronization packet of the frame for transmission.
Secondly, receiving a plan value curve synchronous message actively pushed by the opposite side host, and immediately organizing a plan value curve confirmation packet according to a curve confirmation data packet format in the table 5 after the plan value curve synchronous message is correctly analyzed.
And if the received plan value curve synchronous message contains a plurality of plan value curve synchronous data packets, organizing a plurality of plan value curve confirmation packets, wherein the number of the curve confirmation packets is equal to the number of the plan value curve synchronous data packets in the received plan value curve synchronous message.
If queue elements exist in the planned value curve metadata synchronization queue at the same time, the planned value curve synchronization data packet is organized and transmitted to the opposite side host together with the curve confirmation packet organized in front according to the method for organizing the planned value curve synchronization data packet provided in the previous step under the premise of meeting the requirements of formula 1, formula 2 and formula 3, and the planned value curve data synchronization efficiency is improved.
Thus far, a single planning value curve synchronization procedure is described. And circularly executing the step two and the step three, so that a complete process of synchronizing the plan value curves is realized, and the condition that any host of the plan value curve receiving system can receive the plan value curves issued by the master station under any working condition of the plan value curve master station can be met, and meanwhile, each host has a complete plan value curve.
Example 2
The present embodiment provides a planned value curve synchronization apparatus, including:
the system initialization unit is used for completing the initialization process of the local host and the opposite host;
the synchronous queue updating unit is used for acquiring a new planned value curve and updating a planned value curve metadata synchronous queue;
the synchronous message organization unit is used for taking out the planning value metadata in the synchronous queue, organizing the planning value curve synchronous message according to a convention format and actively pushing the synchronous message to the opposite side host;
and the execution unit is used for circularly executing the synchronous queue updating unit and the synchronous message organization unit to realize the complete process of the plan value curve synchronization.
Example 3
The embodiment provides a planning value curve synchronization device, which comprises a processor and a storage medium;
the storage medium is used for storing instructions;
the processor is configured to operate in accordance with the instructions to perform the steps of the method according to any of embodiment 1.
Example 4
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the method of any of the embodiment 1.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method of plan value curve synchronization, comprising:
the system initialization process comprises the following steps: finishing the initialization process of the local host and the opposite side host;
a synchronization queue updating step, comprising: acquiring a new planning value curve, and updating a planning value curve metadata synchronization queue;
the synchronous message organization step comprises: taking out the plan value metadata in the synchronization queue, organizing a plan value curve synchronization message according to a convention format, and actively pushing the plan value curve synchronization message to the opposite side host;
and circularly executing the synchronous queue updating step and the synchronous message organizing step to realize the complete process of the plan value curve synchronization.
2. The planned value curve synchronization method of claim 1, wherein: defining a planned value curve synchronous message format, wherein the synchronous message data area comprises at least one data packet, and the data packet is divided into four types of online identification, request curve, curve synchronization and curve confirmation.
3. The planned value curve synchronization method of claim 1, wherein: the system initialization process comprises the following steps:
initializing a local planned value metadata pool, and recording a local starting time scale;
the delayed sending of the local online identification packet comprises the following steps: local machine identification and local startup time scale;
receiving an opposite-side host online identification packet, comparing a local host start time scale with an opposite-side host start time scale, and if the opposite-side start time scale is earlier than that of the local host, setting the opposite side as a trusted host;
and sending a command for requesting the full-list data of the planned value curve to the opposite side host computer once, and finishing the initialization process of the system set by the two computers simultaneously.
4. The planned value curve synchronization method of claim 1, wherein: after the planned value curve synchronization process is started, if the opposite-side host online identification packet is not received within the set delay time, the opposite-side host is determined to be offline, and the system initialization process step is returned to wait for a new system initialization process.
5. The planned value curve synchronization method of claim 1, wherein: the acquiring a new plan value curve and updating a plan value curve metadata synchronization queue includes:
constructing new plan value curve metadata, and adding the new plan value curve metadata to the tail of a plan value curve metadata synchronous queue;
receiving a request curve data packet of the opposite side host, judging whether the request curve time mark in the request curve data packet is an invalid time mark or a valid time mark, and performing corresponding processing according to a judgment result;
and receiving a strategy host curve confirmation data packet, traversing all elements of the plan value curve metadata synchronous queue, and deleting the queue element if the identifier of the queue element is the same as the confirmation information identifier in the confirmation data packet.
6. The planned value curve synchronization method of claim 5, wherein: and judging whether the request curve time mark in the request curve data packet is an invalid time mark or a valid time mark, and performing corresponding processing according to a judgment result, wherein the judging step comprises the following steps:
if the time scale of the request curve in the request curve data packet is an invalid time scale, the request curve represents that the opposite side host requests full-time-period full-list data of a plan value curve, at the moment, the current plan value curve metadata synchronous queue is emptied, all plan value curve metadata in a plan value curve metadata pool are taken out, and the plan value curve metadata synchronous queue is added with the plan value curve metadata;
and if the request curve time scale in the request curve data packet is a valid time scale, the request curve data packet indicates that the opposite side host requests the schedule value curve full list data, at this time, the queue elements with the curve date attribute equal to the date in the schedule value curve metadata synchronous queue are deleted, the schedule value curve metadata at the date in the schedule value curve metadata pool are taken out, and the schedule value curve metadata are added to the schedule value curve metadata synchronous queue.
7. The planning value curve synchronization method according to claim 1, wherein: the method for taking out the plan value metadata in the synchronization queue, organizing the plan value curve synchronization message according to the agreed format, and actively pushing the plan value curve synchronization message to the opposite side host comprises the following steps:
selecting a queue head element in the planned value curve metadata synchronous queue, and organizing a planned value curve synchronous data packet according to a preset curve synchronous data packet format;
traversing the planned value curve element data synchronization queue according to the sequence from the head of the queue to the tail of the queue, selecting a queue element with the same curve date and refreshing time scale as the head of the queue element, and adding the queue element into a curve synchronization data packet;
after the previous group of queue elements with the same curve date and the same refreshing time scale are added to the curve synchronization data packet, repeating the previous steps, traversing unselected queue elements in the plan value curve element data synchronization queue according to the sequence from the head of the queue to the tail of the queue, selecting a new group of queue elements containing the same curve date and the same refreshing time scale, and organizing a new plan value curve synchronization data packet;
repeating the steps until all queue elements in the plan value curve metadata synchronous queue are selected or the sum of the lengths of one or more organized curve synchronous data packets exceeds the maximum transmission length, and immediately stopping traversing; the organized one or more curve synchronous data packets are transmitted in the same frame of planned value curve synchronous message;
receiving a plan value curve synchronous data packet, and immediately organizing a plan value curve confirmation packet after correct analysis; wherein, the number of the curve confirmation packets is equal to the number of the plan value curve synchronization data packets in the received plan value curve synchronization message;
if the queue element exists in the plan value curve metadata synchronous queue, the plan value curve synchronous data packet is organized again and transmitted in the same frame of plan value curve synchronous message with the curve confirmation packet.
8. A planned value curve synchronization device, comprising:
the system initialization unit is used for completing the initialization process of the local host and the opposite host;
the synchronous queue updating unit is used for acquiring a new planning value curve and updating the planning value curve metadata synchronous queue;
the synchronous message organization unit is used for taking out the planning value metadata in the synchronous queue, organizing the planning value curve synchronous message according to a convention format and actively pushing the synchronous message to the opposite side host;
and the execution unit is used for circularly executing the synchronous queue updating unit and the synchronous message organization unit to realize the complete process of the plan value curve synchronization.
9. A planned value curve synchronization device, characterized by: comprising a processor and a storage medium;
the storage medium is used for storing instructions;
the processor is configured to operate in accordance with the instructions to perform the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the program when executed by a processor implements the steps of the method of any one of claims 1 to 7.
CN202210572481.8A 2022-05-25 2022-05-25 Method, device and storage medium for synchronizing planned value curves Active CN114979181B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210572481.8A CN114979181B (en) 2022-05-25 2022-05-25 Method, device and storage medium for synchronizing planned value curves

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210572481.8A CN114979181B (en) 2022-05-25 2022-05-25 Method, device and storage medium for synchronizing planned value curves

Publications (2)

Publication Number Publication Date
CN114979181A true CN114979181A (en) 2022-08-30
CN114979181B CN114979181B (en) 2023-12-26

Family

ID=82956566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210572481.8A Active CN114979181B (en) 2022-05-25 2022-05-25 Method, device and storage medium for synchronizing planned value curves

Country Status (1)

Country Link
CN (1) CN114979181B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010039478A1 (en) * 2000-04-28 2001-11-08 Renate Bary Method and system for synchronizing elements of a seismic device using a standard transmission network and an external time reference
CN101262147A (en) * 2008-04-18 2008-09-10 深圳南瑞科技有限公司 Dual-machine switching device for remote workstation
US20090207247A1 (en) * 2008-02-15 2009-08-20 Jeffrey Zampieron Hybrid remote digital recording and acquisition system
US20150019903A1 (en) * 2013-07-12 2015-01-15 International Business Machines Corporation Isolating a pci host bridge in response to an error event
CN104485738A (en) * 2014-11-26 2015-04-01 国电南瑞科技股份有限公司 Dual computer switchover alarming non-disturbance processing method for intelligent substation monitoring system
US20160218820A1 (en) * 2015-01-26 2016-07-28 Timecode Systems Limited Networked programmable master clock base stations
US20170251059A1 (en) * 2016-02-26 2017-08-31 Omron Corporation Master device, slave device, information processing device, event log collecting system, control method of master device, control method of slave device and control program
CN107634855A (en) * 2017-09-12 2018-01-26 天津津航计算技术研究所 A kind of double hot standby method of embedded system
KR101858983B1 (en) * 2017-11-16 2018-05-17 주식회사 에이씨앤티시스템 Communication system for reducing data transmission traffic
CN108667652A (en) * 2018-04-12 2018-10-16 国网天津市电力公司 A kind of telecontrol communication machine standby machine handoff-security module and its switching method
US20180329630A1 (en) * 2016-09-13 2018-11-15 Tencent Technology (Shenzhen) Company Limited Data synchronization method and system, and synchronization obtaining method and apparatus
FR3074929A1 (en) * 2017-12-13 2019-06-14 Schneider Electric Industries Sas SYNCHRONIZATION IN A TELECONDUCTOR SYSTEM OF AN ELECTRICAL DISTRIBUTION NETWORK
CN111799779A (en) * 2020-06-28 2020-10-20 云南电网有限责任公司电力科学研究院 Load generation planned value curve transmission method and system

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010039478A1 (en) * 2000-04-28 2001-11-08 Renate Bary Method and system for synchronizing elements of a seismic device using a standard transmission network and an external time reference
US20090207247A1 (en) * 2008-02-15 2009-08-20 Jeffrey Zampieron Hybrid remote digital recording and acquisition system
CN101262147A (en) * 2008-04-18 2008-09-10 深圳南瑞科技有限公司 Dual-machine switching device for remote workstation
US20150019903A1 (en) * 2013-07-12 2015-01-15 International Business Machines Corporation Isolating a pci host bridge in response to an error event
CN104485738A (en) * 2014-11-26 2015-04-01 国电南瑞科技股份有限公司 Dual computer switchover alarming non-disturbance processing method for intelligent substation monitoring system
US20160218820A1 (en) * 2015-01-26 2016-07-28 Timecode Systems Limited Networked programmable master clock base stations
US20170251059A1 (en) * 2016-02-26 2017-08-31 Omron Corporation Master device, slave device, information processing device, event log collecting system, control method of master device, control method of slave device and control program
US20180329630A1 (en) * 2016-09-13 2018-11-15 Tencent Technology (Shenzhen) Company Limited Data synchronization method and system, and synchronization obtaining method and apparatus
CN107634855A (en) * 2017-09-12 2018-01-26 天津津航计算技术研究所 A kind of double hot standby method of embedded system
KR101858983B1 (en) * 2017-11-16 2018-05-17 주식회사 에이씨앤티시스템 Communication system for reducing data transmission traffic
FR3074929A1 (en) * 2017-12-13 2019-06-14 Schneider Electric Industries Sas SYNCHRONIZATION IN A TELECONDUCTOR SYSTEM OF AN ELECTRICAL DISTRIBUTION NETWORK
CN108667652A (en) * 2018-04-12 2018-10-16 国网天津市电力公司 A kind of telecontrol communication machine standby machine handoff-security module and its switching method
CN111799779A (en) * 2020-06-28 2020-10-20 云南电网有限责任公司电力科学研究院 Load generation planned value curve transmission method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
穆进超;程剑锋;冯凯;: "自主化CTCS-3级车载设备双系热备技术研究", 中国铁路, no. 09, pages 11 - 16 *

Also Published As

Publication number Publication date
CN114979181B (en) 2023-12-26

Similar Documents

Publication Publication Date Title
CN110113420B (en) NVM-based distributed message queue management system
CN101650698B (en) Method for realizing direct memory access
CN106372994A (en) Method and system for processing orders
CN103095769B (en) Across method of data synchronization and the system of machine room
US9699276B2 (en) Data distribution method and system and data receiving apparatus
CN113987064A (en) Data processing method, system and equipment
CN109739668A (en) A kind of method of data transmission between virtual machines, system and equipment
CN105450785A (en) File transmission method and device
WO2024051454A1 (en) Method and apparatus for processing transaction log
CN101778134A (en) Data synchronization method and mobile communication terminal
CN114422537B (en) Multi-cloud storage system, multi-cloud data reading and writing method and electronic equipment
CN114285695B (en) Communication method, device, apparatus, system and storage medium
CN105373563B (en) Database switching method and device
CN108063832A (en) A kind of cloud storage system and its storage method
CN116304390B (en) Time sequence data processing method and device, storage medium and electronic equipment
US9767023B2 (en) Method of controlling data writing to persistent storage device
CN110445580B (en) Data transmission method and device, storage medium, and electronic device
CN114979181A (en) Planned value curve synchronization method, device and storage medium
CN112052104A (en) Message queue management method based on multi-computer-room realization and electronic equipment
CN105471930B (en) A kind of method, system and equipment reading distributed data
CN104684068B (en) The method and apparatus that a kind of data synchronize
CN113220473B (en) Data storage method and system
CN116996450B (en) Management data processing method, device and system
JPH0612897B2 (en) Communication control method in communication network system
CN117827480A (en) Method and device for expanding Kafka consumption mode

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
GR01 Patent grant
GR01 Patent grant