Distributed power distribution terminal program upgrading method and system based on DDS protocol

Through the decentralized power distribution terminal program upgrade method based on the DDS protocol, the DDS publish/subscribe mode is used to achieve synchronous upgrade of multiple terminals, and combined with the CRC check and restart mechanism, the problem of long operation and maintenance time and insufficient reliability in traditional upgrade solutions is solved, and efficient and reliable power distribution terminal program upgrade is achieved.

CN120122964APending Publication Date: 2025-06-10NANJING GUODIAN NANZI POWER GRID AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510178683.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

The program upgrade of traditional power distribution terminals has problems such as terminal upgrades that increase operation and maintenance time, lack of unified verification mechanisms, and inability to achieve synchronous upgrades of multiple terminals.

Method used

The distributed power distribution terminal program upgrade method based on the DDS protocol is adopted, and the multi-terminal synchronous upgrade is achieved through the DDS publish/subscribe mode, and combined with the CRC checksum restart mechanism to ensure the reliability and efficiency of the upgrade.

Benefits of technology

On the premise of ensuring reliability, the upgrade time of power distribution terminals is shortened, the operation and maintenance efficiency is improved, and the synchronization upgrade of multiple terminals is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120122964A_ABST
    Figure CN120122964A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power distribution terminals, and provides a distributed power distribution terminal program upgrading method and system based on a DDS protocol, and the method comprises the steps that a common unit obtains a program upgrading file and stores the program upgrading file in a specified directory; packaging the file into a program upgrading theme and releasing the program upgrading theme into a global data space; the interval unit subscribes to a program upgrading theme at the same time; the CRC of the calculation program file is added to the end of the file, and then restarting is carried out; comparing the CRC of the program file of the off-chip Flash with the CRC of the running program, and determining whether to execute a program copying operation or not according to a comparison result to realize a program upgrading function; after finishing program upgrading, the interval unit reports a program upgrading result to the public unit; and the public unit reports an upgrading result to the distribution automation master station by subscribing a program upgrading result theme. On the premise of ensuring safety and reliability, the upgrading time of the interval unit of the distributed power distribution terminal is shortened, and the operation and maintenance efficiency of the power distribution terminal is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of distribution automation, and particularly relates to a decentralized distribution terminal program upgrade method and system based on the Data Distribution Service (DDS) protocol, which is applicable to the efficient and reliable batch upgrade of distribution terminals. Background Art

[0002] With the strong promotion of distribution automation, a large number of distribution terminals, which are the most basic and important part of distribution automation, have been put into operation. In addition to realizing the basic "four remote" functions of remote measurement, remote signaling, remote control, and remote pulse, distribution terminals also realize various protection functions, local feeder automation functions, distributed feeder automation functions, as well as the function of receiving relevant information from various other local intelligent devices and forwarding it to the distribution automation master station after access. The software of a large number of existing distribution terminals can no longer meet these new requirements, and program upgrades are needed to meet the emerging new functions and new requirements. However, the traditional upgrade scheme has the following problems: upgrading each terminal one by one leads to a multiple-fold increase in operation and maintenance time and low efficiency; there is a lack of a unified verification mechanism, and upgrade failures are likely to occur due to transmission errors, resulting in insufficient reliability; the existing technology does not use real-time communication protocols to achieve multi-terminal synchronous upgrades and cannot process batches. There is an urgent need for a solution that supports multi-terminal synchronous upgrades and has high reliability. Summary of the Invention

[0003] To solve the above problems, the present invention proposes a decentralized distribution terminal program upgrade method and system based on the DDS protocol, which realizes multi-terminal synchronous upgrades through the publish / subscribe mode of DDS, and combines the CRC verification and restart mechanism to significantly shorten the upgrade time on the premise of ensuring reliability.

[0004] To achieve the above object, the present invention provides a decentralized distribution terminal program upgrade method based on the DDS protocol, including:

[0005] The common unit of the decentralized distribution terminal stores the program upgrade file received from the distribution automation master station system in a specified directory;

[0006] The common unit encapsulates the stored program upgrade file as a program upgrade topic and publishes it to the global data space through the DDS protocol;

[0007] The bay units of all distribution terminals in the same DDS domain as the common unit simultaneously subscribe to the program upgrade topic from the global data space;

[0008] After obtaining the program file to be upgraded from the program upgrade topic, each bay unit stores it in the off-chip Flash, calculates the CRC of the program file and appends it to the end of the file, and then restarts;

[0009] Upon power-on, the BootLoader of each interval unit determines whether to perform a program copy operation by comparing the CRC of the program file in the external flash memory with the CRC of the currently running program, thereby implementing the program upgrade function;

[0010] After each interval unit completes the program upgrade, it reports the program upgrade result to the common unit;

[0011] The common unit subscribes to the program upgrade result topic and reports the upgrade results of each interval unit to the distribution automation master station.

[0012] According to one aspect of the present invention, the common unit communicates with the distribution automation master station system through an RJ45 network cable or an RS485 / 232 serial interface, and uses communication protocols IEC60870-5-104 and IEC60870-5-101 to achieve information interaction with the distribution automation master station system.

[0013] According to one aspect of the present invention, the common unit stores the program upgrade file received from the distribution automation master station system in a specified directory, including:

[0014] The common unit receives the program upgrade start command issued by the distribution automation master station system;

[0015] The common unit receives the write program upgrade file command issued by the distribution automation master station system and writes the file to the specified directory.

[0016] According to one aspect of the present invention, the common unit encapsulates the stored program upgrade file as a program upgrade topic and publishes it to the global data space through the DDS protocol, including:

[0017] After receiving the upgrade confirmation command issued by the distribution automation master station, the common unit encapsulates the stored program upgrade file as a program upgrade topic;

[0018] The program upgrade topic is published to the global data space by creating participants, registering data types and creating topics, creating publishers, creating data writers, defining and publishing programs.

[0019] According to one aspect of the present invention, the interval unit subscribes to the program upgrade topic from the global data space simultaneously, including:

[0020] All interval units are connected to the same switch through an RJ45 network cable and the common unit;

[0021] Create participants, subscribers, listeners, and data readers;

[0022] Each interval unit subscribes to the program upgrade theme by binding its respective data reader to the theme, and at the same time notifies the application through the listener for callback processing.

[0023] According to one aspect of the present invention, after each interval unit obtains the program file to be upgraded from the program upgrade theme, it stores it in the external Flash, calculates the program CRC and appends it to the end of the file, and then restarts, including:

[0024] The interval unit obtains the program file to be upgraded through the data reader;

[0025] The interval unit stores the program file in the external Flash;

[0026] Calculate the CRC of the program file and append it to the end of the Flash file;

[0027] Execute the restart command.

[0028] According to one aspect of the present invention, the BootLoader of each interval unit, at the first time of power-on, determines whether to perform the program copy operation according to the comparison result by comparing the CRC of the program file in the external Flash with the CRC of the running program, so as to realize the program upgrade function, including:

[0029] The BootLoader compares the CRC of the program file in the external Flash with the CRC of the running program at the first time of power-on. If the CRCs are inconsistent, copy the program file in the external Flash to the storage space of the running program, write the upgrade success flag to the specified storage location, and then restart;

[0030] The BootLoader compares the CRCs at the first time of power-on. If they are consistent, jump to the normal operation area for normal startup.

[0031] According to one aspect of the present invention, after each interval unit completes the program upgrade, it reports the program upgrade result to the common unit, including:

[0032] The interval unit reads the flag indicating whether the program upgrade is successful from the specified storage area;

[0033] The interval unit publishes the program upgrade result theme to the global data space according to the flag indicating whether the upgrade is successful.

[0034] According to one aspect of the present invention, the common unit reports the upgrade results of each interval unit to the distribution automation master station by subscribing to the program upgrade result theme, including:

[0035] The common unit receives the program upgrade success or failure theme of each interval unit through the listener;

[0036] The common unit converts the upgrade result into a communication message of the distribution automation master station and uploads it to the distribution automation master station, realizing the reporting of the program upgrade of each interval unit.

[0037] Furthermore, to achieve the above object, the present invention also provides a decentralized distribution terminal program upgrade system based on the DDS protocol, including:

[0038] A program upgrade file acquisition module, where the common unit of the decentralized distribution terminal stores the program upgrade file received from the distribution automation master station system into a specified directory;

[0039] A program upgrade file encapsulation and publishing module, where the common unit encapsulates the stored program upgrade file into a program upgrade topic and publishes it to the global data space through the DDS protocol;

[0040] A program upgrade topic subscription module, where the interval units of all distribution terminals in the same DDS domain as the common unit simultaneously subscribe to the program upgrade topic from the global data space;

[0041] A program file acquisition and calculation module, where each interval unit stores the program file to be upgraded obtained from the program upgrade topic into the off-chip Flash, calculates the CRC of the program file and appends it to the end of the file, and then restarts;

[0042] A program upgrade judgment module, where the BootLoader of each interval unit compares the CRC of the program file in the off-chip Flash with the CRC of the running program at the first time when powered on, and decides whether to perform the program copy operation according to the comparison result, realizing the program upgrade function;

[0043] A first upgrade result reporting module, where each interval unit reports the program upgrade result to the common unit after completing the program upgrade;

[0044] A second upgrade result reporting module, where the common unit reports the upgrade results of each interval unit to the distribution automation master station by subscribing to the program upgrade result topic.

[0045] Furthermore, to achieve the above object, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, it implements the above-mentioned method for upgrading the program of the decentralized distribution terminal based on the DDS protocol.

[0046] Furthermore, to achieve the above object, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the above-mentioned method for upgrading the program of the decentralized distribution terminal based on the DDS protocol.

[0047] According to the solution of the present invention, the present invention encapsulates the program upgrade file stored in the common unit and publishes it as a program upgrade topic to the global data space. Through the P / S mode of DDS and the QoS of RELIABILITY, the simultaneous upgrade of multiple interval units is realized, shortening the upgrade time of the interval units of the distributed power distribution terminal while ensuring safety and reliability, and improving the operation and maintenance efficiency of the power distribution terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 Schematically shows a flowchart of a method for upgrading a program of a distributed power distribution terminal based on the DDS protocol according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0049] Now, the content of the present invention will be described with reference to exemplary embodiments. It should be understood that the described embodiments are only for enabling those of ordinary skill in the art to better understand and thus implement the content of the present invention, rather than implying any limitation to the scope of the present invention.

[0050] As used herein, the term "comprising" and its variants are to be construed as open-ended terms meaning "including but not limited to". The term "based on" is to be construed as "at least partially based on". The terms "an embodiment" and "one embodiment" are to be construed as "at least one embodiment".

[0051] Figure 1 Schematically shows a flowchart of a method for upgrading a program of a distributed power distribution terminal based on the DDS protocol according to an embodiment of the present invention. As Figure 1 shown, in this embodiment, the method for upgrading a program of a distributed power distribution terminal based on the DDS protocol includes:

[0052] The common unit of the distributed power distribution terminal stores the program upgrade file received from the power distribution automation master station system in a specified directory;

[0053] The common unit encapsulates the stored program upgrade file as a program upgrade topic and publishes it to the global data space through the DDS protocol;

[0054] All interval units of the power distribution terminal in the same DDS domain as the common unit simultaneously subscribe to the program upgrade topic from the global data space;

[0055] After each interval unit obtains the program file to be upgraded from the program upgrade topic, it stores it in the off-chip Flash, calculates the CRC of the program file and appends it to the end of the file, and then restarts;

[0056] At the first time when the BootLoader of each interval unit is powered on, it determines whether to execute the program copy operation by comparing the CRC of the program file in the external Flash with the CRC of the running program, so as to realize the program upgrade function;

[0057] After each interval unit completes the program upgrade, it reports the program upgrade result to the common unit;

[0058] The common unit reports the upgrade results of each interval unit to the distribution automation master station by subscribing to the program upgrade result topic.

[0059] Furthermore, according to an embodiment of the present invention, the common unit communicates with the distribution automation master station system through an RJ45 network cable or an RS485 / 232 serial interface, and realizes information interaction with the distribution automation master station system by using the communication protocols IEC60870-5-104 and IEC60870-5-101.

[0060] Furthermore, according to an embodiment of the present invention, the common unit is connected to the interval units through a network; the interval unit includes an embedded MCU, an on-chip storage Flash, and an off-chip storage Flash.

[0061] Furthermore, according to an embodiment of the present invention, the common unit stores the program upgrade file received from the distribution automation master station system in a specified directory, including:

[0062] The common unit receives the program upgrade start command issued by the distribution automation master station system;

[0063] The common unit receives the command to write the program upgrade file issued by the distribution automation master station system and writes the file to the specified directory.

[0064] Furthermore, according to an embodiment of the present invention, the common unit encapsulates the stored program upgrade file as a program upgrade topic and publishes it to the global data space through the DDS protocol, including:

[0065] After receiving the upgrade confirmation command issued by the distribution automation master station, the common unit encapsulates the stored program upgrade file as a program upgrade topic;

[0066] The program upgrade topic is published to the global data space by creating a participant, registering a data type and creating a topic, creating a publisher, creating a data writer, and defining and publishing the program.

[0067] Furthermore, according to an embodiment of the present invention, the interval unit subscribes to the program upgrade topic from the global data space at the same time, including:

[0068] All interval units are connected to the same switch through an RJ45 network cable and the common unit;

[0069] Create participants, subscribers, listeners, and data readers;

[0070] Each interval unit subscribes to the program upgrade topic by binding to it through its respective data reader, and at the same time notifies the application program for callback processing through the listener.

[0071] Further, according to an embodiment of the present invention, after each interval unit obtains the program file to be upgraded from the program upgrade topic, it stores it in the external Flash, calculates the program CRC and appends it to the end of the file, and then restarts, including:

[0072] The interval unit obtains the program file to be upgraded through the data reader;

[0073] The interval unit stores the program file in the external Flash;

[0074] Calculate the CRC of the program file and append it to the end of the Flash file;

[0075] Execute the restart command.

[0076] Further, according to an embodiment of the present invention, the BootLoader of each interval unit compares the CRC of the program file in the external Flash and the CRC of the running program at the first time when powered on, and decides whether to execute the program copy operation according to the comparison result to implement the program upgrade function, including:

[0077] The BootLoader compares the CRC of the program file in the external Flash and the CRC of the running program at the first time when powered on. If the CRCs are inconsistent, copy the program file in the external Flash to the storage space of the running program, write the upgrade success flag to the specified storage location, and then restart;

[0078] The BootLoader compares the CRCs at the first time when powered on. If they are consistent, jump to the normal operation area for normal startup.

[0079] Further, according to an embodiment of the present invention, after each interval unit completes the program upgrade, it reports the program upgrade result to the common unit, including:

[0080] The interval unit reads the flag indicating whether the program upgrade is successful from the specified storage area;

[0081] The interval unit publishes the program upgrade result to the global data space through the program upgrade result topic according to the flag indicating whether the upgrade is successful.

[0082] Further, according to an embodiment of the present invention, the common unit subscribes to the program upgrade result topic and reports the upgrade results of each interval unit to the distribution automation master station, including:

[0083] The common unit receives the topic of successful or failed program upgrade of each interval unit through a listener;

[0084] The common unit converts the upgrade result into a communication message of the distribution automation master station and uploads it to the distribution automation master station, realizing the reporting of the program upgrade of each interval unit.

[0085] According to the solution of the present invention, the present invention encapsulates the program upgrade file stored in the common unit as a program upgrade topic and publishes it to the global data space. Through the P / S mode of DDS and the QoS of RELIABILITY, the simultaneous upgrade of multiple interval units is realized. On the premise of ensuring safety and reliability, the upgrade time of the interval units of the decentralized distribution terminal is shortened, and the operation and maintenance efficiency of the distribution terminal is improved.

[0086] Further, to achieve the above object, the present invention also provides a decentralized distribution terminal program upgrade system based on the DDS protocol, including:

[0087] A program upgrade file acquisition module, where the common unit of the decentralized distribution terminal stores the program upgrade file received from the distribution automation master station system in a specified directory;

[0088] A program upgrade file encapsulation and publishing module, where the common unit encapsulates the stored program upgrade file as a program upgrade topic and publishes it to the global data space through the DDS protocol;

[0089] A program upgrade topic subscription module, where the interval units of all distribution terminals in the same DDS domain as the common unit simultaneously subscribe to the program upgrade topic from the global data space;

[0090] A program file acquisition and calculation module, where each interval unit stores the program file to be upgraded obtained from the program upgrade topic in the off-chip Flash, calculates the CRC of the program file and appends it to the end of the file, and then restarts;

[0091] A program upgrade judgment module, where the BootLoader of each interval unit compares the CRC of the program file in the off-chip Flash with the CRC of the running program at the first time of power-on, and decides whether to perform the program copy operation according to the comparison result, realizing the program upgrade function;

[0092] A first upgrade result reporting module, where each interval unit reports the program upgrade result to the common unit after completing the program upgrade;

[0093] The second upgrade result reporting module. The common unit subscribes to the program upgrade result topic and reports the upgrade results of each bay unit to the distribution automation master station.

[0094] The decentralized distribution terminal program upgrade system based on the DDS protocol according to the present invention can implement the above-mentioned decentralized distribution terminal program upgrade method based on the DDS protocol. The specific method steps are as described above and will not be elaborated here.

[0095] Furthermore, to achieve the above object, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, it implements the above-mentioned decentralized distribution terminal program upgrade method based on the DDS protocol.

[0096] Furthermore, to achieve the above object, the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, it implements the above-mentioned decentralized distribution terminal program upgrade method based on the DDS protocol.

[0097] To make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below by way of specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0098] Embodiment 1

[0099] The decentralized distribution terminal program upgrade method based on the DDS protocol includes:

[0100] S1. The distribution master station sends the distribution terminal program upgrade file to the common unit of the decentralized distribution terminal;

[0101] S2. The distribution terminal common unit stores the received program upgrade file in a specified directory;

[0102] S3. The distribution terminal common unit publishes the program upgrade topic data object through the DDS protocol;

[0103] S4. All bay units in the same domain as the common unit receive the program upgrade topic through subscription simultaneously;

[0104] S5. The bay unit obtains the program file to be upgraded and the CRC from the program upgrade topic, stores them in the off-chip Flash, and then restarts;

[0105] S6. After the BootLoader of the bay unit starts, it first compares whether the CRC of the program file in the off-chip Flash is consistent with the CRC of the original running program;

[0106] S7. If they are inconsistent, copy the program file in the external Flash to overwrite the program file actually running in the internal Flash, and restart after the program upgrade operation is completed.

[0107] S8. After restarting, BootLoader compares the CRC of the program file in the external Flash with the local running CRC again. If they are consistent, immediately enter the normal system operation.

[0108] S9. At the same time, report the success or failure of the program upgrade to the global data space.

[0109] In this embodiment, the common unit communicates with the distribution automation master station system through an RJ45 network cable or an RS485 / 232 serial interface, and uses the communication protocols IEC60870-5-104 and IEC60870-5-101 to realize the information interaction between the master station and the common unit.

[0110] In this embodiment, the steps for the common unit to store the program upgrade file are as follows:

[0111] S2.1. Receive the program upgrade start command issued by the distribution automation master station.

[0112] S2.2. Receive the write program upgrade file command issued by the distribution automation master station.

[0113] S2.3. Write the program upgrade file to the / UPGRADE / directory.

[0114] In this embodiment, the steps for the common unit to store the program upgrade file are as follows:

[0115] S3.1. Receive the upgrade confirmation command issued by the distribution automation master station.

[0116] S3.2. Package the program upgrade file stored in the common unit into a program upgrade topic.

[0117] S3.3. Create a participant.

[0118] S3.4. Register the data type and create a topic.

[0119] S3.5. Create a publisher.

[0120] S3.6. Create a data writer.

[0121] S3.7. Define and publish the program.

[0122] In this embodiment, the program upgrade topic data file is defined by IDL, and the format is:

[0123] module TopicData{

[0124] #pragma DCPS_DATA_TYPE "TopicData::Upgrade"

[0125] #pragma DCPS_DATA_KEY "TopicData::Upgrade version"

[0126] struct Upgrade {

[0127] string version; / / Program version

[0128] int crc; / / Program CRC

[0129] int fileSize; / / Program length

[0130] string fileData; / / Program content

[0131] };

[0132] };

[0133] Among them, version is used as the key of the program upgrade topic to distinguish different versions of the upgrade program. CRC is used to verify the correctness during the program transmission process.

[0134] In this embodiment, the steps for the interval unit to subscribe to the program upgrade topic are as follows:

[0135] S4.1. Create a participant;

[0136] S4.2. Register the type and create a topic consistent with the publisher;

[0137] S4.3. Create a subscriber;

[0138] S4.4. Create a listener;

[0139] S4.5. Create a data reader.

[0140] In this embodiment, the steps for each interval unit to obtain the program file to be upgraded and CRC, store them in the off-chip Flash, and then restart are as follows:

[0141] S5.1. The interval unit obtains the program file to be upgraded through the data reader;

[0142] S5.2. The interval unit stores the program upgrade file in the off-chip Flash;

[0143] S5.3. Calculate the program CRC and append it to the end of the file in the Flash;

[0144] S5.4. Execute the restart command.

[0145] In this embodiment, at the first moment when the BootLoader of each interval unit is powered on, it decides whether to execute the program copy operation by comparing the CRC of the program file in the external Flash and the CRC of the currently running program, and the steps to implement the program upgrade function are as follows:

[0146] S6.1. The BootLoader is powered on;

[0147] S6.2. Determine whether the CRC of the program file in the external Flash is consistent with the CRC of the currently running program. If so, continue to execute step S6.3; if not, execute step S6.4;

[0148] S6.3. Jump to the normal operation area for normal startup;

[0149] S6.4. Copy the program file in the external Flash to the storage space of the currently running program;

[0150] S6.5. Write the upgrade success flag to the specified storage location;

[0151] S6.6. Execute the restart command.

[0152] In this embodiment, after each interval unit completes the program upgrade, the steps to report whether the program upgrade is successful or not to the global data space are as follows:

[0153] S7.1. Read the program upgrade flag value from the specified storage area;

[0154] S7.2. Publish the topic of program upgrade success or failure through the data writer of the interval unit;

[0155] S7.3. Receive the topic of program upgrade success or failure of each interval unit through the data reader;

[0156] S7.4. Convert the upgrade result into a communication message of the distribution automation master station and upload it to the distribution automation master station.

[0157] Those of ordinary skill in the art can realize that the modules and algorithm steps described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0158] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the devices and equipment described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0159] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or modules can be in electrical, mechanical or other forms.

[0160] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they can be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present invention.

[0161] In addition, in the embodiments of the present invention, each functional module can be integrated into a processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.

[0162] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method for sending / receiving energy-saving signals in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.

[0163] The above description is only a preferred embodiment of the present application and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present application.

[0164] It should be understood that the magnitude of the sequence numbers of the steps in the content and embodiments of the present invention does not absolutely mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

Claims

1. A distributed power distribution terminal program upgrade method based on the DDS protocol, characterized in that: include: The public unit of the distributed power distribution terminal stores the program upgrade file received from the power distribution automation master station system in a designated directory; The public unit encapsulates the stored program upgrade file into a program upgrade topic and publishes it to the global data space through the DDS protocol; All bay units of distribution terminals in the same DDS domain as the public unit simultaneously subscribe to the program upgrade topic from the global data space; Each interval unit obtains the program file to be upgraded from the program upgrade topic and stores it in the off-chip Flash, calculates the CRC of the program file and appends it to the end of the file, and then restarts; When the BootLoader of each bay unit is powered on, it compares the CRC of the program file in the off-chip Flash with the CRC of the running program, and decides whether to execute the program copy operation according to the comparison result to realize the program upgrade function; After each compartment unit completes the program upgrade, it reports the program upgrade result to the public unit; The public unit reports the upgrade results of each bay unit to the distribution automation master station by subscribing to the program upgrade result topic.

2. The method for upgrading the distributed power distribution terminal program based on the DDS protocol according to claim 1, characterized in that: The common unit communicates with the distribution automation master station system via an RJ45 network cable or an RS485 / 232 serial interface, and uses communication protocols IEC60870-5-104 and IEC60870-5-101 to achieve information interaction with the distribution automation master station system.

3. The method for upgrading the distributed power distribution terminal program based on the DDS protocol according to claim 1, characterized in that: The common unit stores the program upgrade file received from the distribution automation master station system in a designated directory, including: The common unit receives the program upgrade start command issued by the distribution automation master station system; The common unit receives the command to write program upgrade files issued by the distribution automation master station system, and writes the files to the specified directory.

4. The method for upgrading the distributed power distribution terminal program based on the DDS protocol according to claim 1, characterized in that: The public unit encapsulates the stored program upgrade file into a program upgrade topic and publishes it to the global data space through the DDS protocol, including: After receiving the upgrade confirmation command issued by the distribution automation master station, the common unit encapsulates the stored program upgrade file as a program upgrade subject; Create participants, publishers, listeners, and data writers; The public unit publishes the upgrade topic to the global data space through the data writer, and performs asynchronous callback processing through the listener.

5. The method for upgrading the distributed power distribution terminal program based on the DDS protocol according to claim 1, characterized in that: The interval unit simultaneously subscribes to the program upgrade topic from the global data space, including: All bay units are connected to the same switch via RJ45 network cables and public units; Create participants, subscribers, listeners, and data readers; Each interval unit subscribes to the topic by binding to the program upgrade topic through its own data reader, and notifies the application program to perform callback processing through the listener.

6. The method for upgrading the distributed power distribution terminal program based on the DDS protocol according to claim 1, characterized in that: Each interval unit obtains the program file to be upgraded from the program upgrade topic and stores it in the off-chip Flash, calculates the program CRC and appends it to the end of the file, and then restarts, including: The interval unit obtains the program file to be upgraded through the data reader; The interval unit stores the program file in the off-chip Flash; Calculate the CRC of the program file and append it to the end of the Flash file; Execute the restart command.

7. The method for upgrading the distributed power distribution terminal program based on the DDS protocol according to claim 1, characterized in that: When the BootLoader of each bay unit is powered on, it compares the CRC of the program file in the off-chip Flash with the CRC of the running program, and decides whether to execute the program copy operation based on the comparison result to realize the program upgrade function, including: When the BootLoader is powered on, it compares the CRC of the program file in the external Flash with the CRC of the running program. If the CRCs are inconsistent, the program file in the external Flash is copied to the storage space of the running program, the upgrade success flag is written to the specified storage location, and then the system restarts. The BootLoader compares the CRC for the first time after power-on. If they are consistent, it jumps to the normal operation area for normal startup.

8. The method for upgrading the distributed power distribution terminal program based on the DDS protocol according to claim 5, characterized in that: After each bay unit completes the program upgrade, it reports the program upgrade results to the public unit, including: The interval unit goes to the designated storage area to read the flag of whether the program upgrade is successful; The interval unit publishes the program upgrade result topic to the global data space based on the flag of whether the upgrade is successful.

9. The method for upgrading the distributed power distribution terminal program based on the DDS protocol according to claim 4, characterized in that: The public unit reports the upgrade results of each bay unit to the distribution automation master station by subscribing to the program upgrade result topic, including: The public unit receives the success or failure topic of each interval unit program upgrade through the listener; The public unit converts the upgrade result into a communication message of the distribution automation master station and sends it to the distribution automation master station to realize the reporting of the program upgrade of each interval unit.

10. A distributed power distribution terminal program upgrade system based on the DDS protocol, characterized in that: include: The program upgrade file acquisition module, the common unit of the distributed power distribution terminal stores the program upgrade file received from the power distribution automation master station system into a designated directory; Program upgrade file packaging and publishing module: the public unit packages the stored program upgrade file into a program upgrade topic and publishes it to the global data space through the DDS protocol; Program upgrade topic subscription module, the bay units of all distribution terminals in the same DDS domain as the public unit simultaneously subscribe to the program upgrade topic from the global data space; Program file acquisition and calculation module: each interval unit obtains the program file to be upgraded from the program upgrade topic and stores it in the off-chip Flash, calculates the CRC of the program file and appends it to the end of the file, and then restarts; Program upgrade judgment module: When the BootLoader of each bay unit is powered on, it compares the CRC of the program file in the off-chip Flash with the CRC of the running program, and decides whether to execute the program copy operation according to the comparison result to realize the program upgrade function; The first upgrade result reporting module reports the program upgrade result to the public unit after each interval unit completes the program upgrade; The second upgrade result reporting module, the public unit reports the upgrade results of each bay unit to the distribution automation master station by subscribing to the program upgrade result topic.

11. An electronic device, characterized in that It comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for upgrading a distributed power distribution terminal program based on the DDS protocol as described in any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for upgrading a distributed power distribution terminal program based on the DDS protocol as described in any one of claims 1 to 9 is implemented.