Device upgrading method, device, device to be upgraded, and system

By forming a module for the equipment to be upgraded and distinguishing the equipment using address and attribute information, the problem of the upgrade time when the number of equipment exceeds the communication protocol limit is solved, and efficient equipment upgrade is achieved.

CN113986299BActive Publication Date: 2025-09-02SUNGROW POWER SUPPLY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111315232.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-08
Publication Date
2025-09-02
Estimated Expiration
2041-11-08

AI Technical Summary

Technical Problem

When the number of equipment to be upgraded exceeds the number of equipment corresponding to the address bit specified in the standard communication protocol, the upgrade time becomes longer.

Method used

The equipment to be upgraded is composed into modules, and differentiated modules and equipment are distinguished through address information and upgrade attribute information to ensure that the number of modules does not exceed the number of equipment specified in the communication protocol, and the upgrade operation is performed using the target address and attribute information matching.

Benefits of technology

The same upgrade controller can control the upgrade of more equipment than the communication protocol stipulated, avoiding the longer upgrade time and waste of resources, and improving the upgrade efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113986299B_ABST
    Figure CN113986299B_ABST
Patent Text Reader

Abstract

The present invention provides a device upgrade method, apparatus, device to be upgraded and system. In the present invention, the number of the at least one module to be upgraded does not exceed the number of devices specified in the communication protocol between the upgrade controller and the module to be upgraded. The module to be upgraded includes at least one device to be upgraded. When the module to be upgraded includes a large number of devices to be upgraded, the number of devices to be upgraded controlled by the same upgrade controller will be more than the number of devices specified in the communication protocol. That is to say, the present invention distinguishes the devices to be upgraded through target address information and target upgrade attribute information, so that the same upgrade controller can control the upgrade of a number of devices that is greater than the number of devices corresponding to the address bits specified in the standard communication protocol, and there is no need to add address bits to the standard communication protocol, so the upgrade time will not be prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of equipment upgrading, and more particularly to an equipment upgrading method, device, equipment to be upgraded, and system. Background Art

[0002] In order to meet the growing business needs of users, it is necessary to update the firmware version of the device. After the firmware version is updated, the latest firmware version is used to control the device.

[0003] When there are many devices to be upgraded, due to the limitation of the address bits specified in the standard communication protocol between the upgrade controller and the devices to be upgraded, one upgrade controller can control the upgrade operation of a maximum number of devices corresponding to the address bits specified in the standard communication protocol. When the number of devices to be upgraded exceeds the corresponding number of devices, the standard communication protocol needs to be modified to increase the address bits in the protocol. However, the increase in address bits will lead to a corresponding reduction in data bits, thereby lengthening the entire upgrade time. Summary of the Invention

[0004] In view of this, the present invention provides a device upgrade method, apparatus, device to be upgraded and system to solve the problem that the entire upgrade time is long when the number of devices to be upgraded exceeds the number of devices corresponding to the address bits specified in the standard communication protocol.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0006] A device upgrade method is applied to a target device to be upgraded in a device upgrade system, the device upgrade system comprising an upgrade controller and at least one module to be upgraded, the target device to be upgraded being any device to be upgraded in the device upgrade system, the number of the at least one module to be upgraded not exceeding the number of devices specified in a communication protocol between the upgrade controller and the modules to be upgraded, the modules to be upgraded comprising at least one device to be upgraded, the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded being different, the address information of the devices to be upgraded being the same as the address information of the module to be upgraded in which the devices to be upgraded are located, and the address information of different modules to be upgraded being different;

[0007] The device upgrading method comprises:

[0008] Acquire an upgrade instruction sent by the upgrade controller, wherein the upgrade instruction includes target address information, target upgrade attribute information and / or data to be upgraded;

[0009] Obtain the address information and upgrade attribute information of the target device to be upgraded;

[0010] When the acquired address information matches the target address information, and the acquired upgrade attribute information matches the target upgrade attribute information, an upgrade operation is performed using the data to be upgraded.

[0011] Optionally, the upgrade attribute information includes: firmware version and / or firmware length; the upgrade attribute information and / or the data to be upgraded are located in the data position of the upgrade instruction.

[0012] Optionally, when the acquired address information matches the target address information, and the acquired upgrade attribute information matches the target upgrade attribute information, performing an upgrade operation using the data to be upgraded includes:

[0013] Determining whether the acquired address information matches the target address information;

[0014] If they match, determining whether the acquired upgrade attribute information matches the target upgrade attribute information;

[0015] When the acquired upgrade attribute information matches the target upgrade attribute information, an upgrade operation is performed using the data to be upgraded.

[0016] Optionally, performing an upgrade operation using the data to be upgraded includes:

[0017] Perform an upgrade operation using the data to be upgraded;

[0018] After the upgrade operation is completed, the upgrade result is verified using the target upgrade attribute information, and the verification result is replied to the upgrade controller.

[0019] Optionally, when the acquired address information does not match the target address information, or when the acquired address information matches the target address information and the acquired upgrade attribute information does not match the target upgrade attribute information, the method further includes:

[0020] The upgrade instruction is discarded.

[0021] Optionally, obtaining the upgrade instruction sent by the upgrade controller includes:

[0022] Receiving the upgrade instructions continuously sent by the upgrade controller directly or through an intermediate communication device according to a preset data sending frequency;

[0023] In a case where the received upgrade instruction is a handshake instruction including target address information but not including target upgrade attribute information, determining whether the target device to be upgraded is a preset device;

[0024] If so, a data successful reception message is sent back to the upgrade controller.

[0025] A device upgrade apparatus is applied to a target device to be upgraded in a device upgrade system, the device upgrade system comprising an upgrade controller and at least one module to be upgraded, the target device to be upgraded being any device to be upgraded in the device upgrade system, the number of the at least one module to be upgraded not exceeding the number of devices specified in a communication protocol between the upgrade controller and the modules to be upgraded, the modules to be upgraded comprising at least one device to be upgraded, the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded being different, the address information of the devices to be upgraded being the same as the address information of the module to be upgraded in which the devices to be upgraded are located, and the address information of different modules to be upgraded being different;

[0026] The equipment upgrading device comprises:

[0027] An instruction acquisition module is used to acquire an upgrade instruction sent by the upgrade controller, wherein the upgrade instruction includes target address information, target upgrade attribute information and / or data to be upgraded;

[0028] An information acquisition module is used to obtain the address information and upgrade attribute information of the target device to be upgraded;

[0029] The upgrade control module is configured to perform an upgrade operation using the data to be upgraded when the acquired address information matches the target address information and the acquired upgrade attribute information matches the target upgrade attribute information.

[0030] A device to be upgraded, the device to be upgraded being located in a device upgrade system, the device upgrade system comprising an upgrade controller and at least one module to be upgraded, the target device to be upgraded being any device to be upgraded in the device upgrade system, the number of the at least one module to be upgraded not exceeding the number of devices specified in a communication protocol between the upgrade controller and the modules to be upgraded, the modules to be upgraded comprising at least one device to be upgraded, the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded being different, the address information of the devices to be upgraded being the same as the address information of the module to be upgraded in which the device to be upgraded is located, and the address information of different modules to be upgraded being different;

[0031] The device to be upgraded is used to execute the above-mentioned device upgrading method.

[0032] A device upgrading system, comprising:

[0033] An upgrade controller and at least one module to be upgraded, wherein the target device to be upgraded is any device to be upgraded in the device upgrade system, the number of the at least one module to be upgraded does not exceed the number of devices specified in the communication protocol between the upgrade controller and the modules to be upgraded, the modules to be upgraded include at least one device to be upgraded, the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded is different, the address information of the device to be upgraded is the same as the address information of the module to be upgraded where the device to be upgraded is located, and the address information of different modules to be upgraded is different;

[0034] The upgrade controller is used to send an upgrade instruction to all the devices to be upgraded;

[0035] The device to be upgraded is used to execute the above-mentioned device upgrading method.

[0036] Optionally, the upgrade controller sends an upgrade instruction to all the devices to be upgraded, including:

[0037] Acquire a target device to be upgraded that needs to be upgraded, and determine target upgrade attribute information and target address information corresponding to the target device to be upgraded;

[0038] generating an upgrade instruction including at least one of the data to be upgraded and target upgrade attribute information, and target address information;

[0039] Send an upgrade instruction to all the devices to be upgraded.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The present invention provides a device upgrade method, apparatus, device to be upgraded, and system. The device upgrade system includes an upgrade controller and at least one module to be upgraded. The module to be upgraded includes at least one device to be upgraded, and the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded is different. The address information of the device to be upgraded is the same as the address information of the module to be upgraded in which the device to be upgraded is located, and the address information of different modules to be upgraded is different. Through the present invention, different modules to be upgraded can be distinguished based on address information, and different devices to be upgraded in the same module to be upgraded can be distinguished based on upgrade attribute information. As a result, the device to be upgraded can use the data to be upgraded to perform an upgrade operation when the acquired address information matches the target address information in the upgrade instruction, and the acquired upgrade attribute information matches the target upgrade attribute information in the upgrade instruction. Since in the present invention, the number of the at least one module to be upgraded does not exceed the number of devices specified in the communication protocol between the upgrade controller and the module to be upgraded, the module to be upgraded includes at least one device to be upgraded. When the module to be upgraded includes a larger number of devices to be upgraded, the number of devices to be upgraded controlled by the same upgrade controller will be more than the number of devices specified in the communication protocol. That is to say, the present invention distinguishes the devices to be upgraded through target address information and target upgrade attribute information, so that the same upgrade controller can control the upgrade of a number of devices that is greater than the number of devices corresponding to the address bits specified in the standard communication protocol, and there is no need to add address bits to the standard communication protocol, so the upgrade time will not be prolonged. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0043] Figure 1 A schematic diagram of a scenario of a three-phase cascade modular photovoltaic solid-state transformer provided by an embodiment of the present invention;

[0044] Figure 2 A method flow chart of a device upgrade method provided by an embodiment of the present invention;

[0045] Figure 3 A flow chart of another device upgrade method provided by an embodiment of the present invention;

[0046] Figure 4 A flow chart of another device upgrade method provided by an embodiment of the present invention;

[0047] Figure 5 A schematic diagram of the structure of a device upgrading apparatus provided by an embodiment of the present invention;

[0048] Figure 6 A schematic diagram of a scenario of a device upgrade system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0050] When there are many devices to be upgraded, a single upgrade controller can only control the maximum number of devices specified in the communication protocol between the upgrade controller and the devices to be upgraded. For example, MODBUS is a standard industrial control data exchange protocol that defines how information is exchanged between different types of devices, as well as the format of that information. MODBUS operates on a request / response basis. Each communication begins with the master sending a command, either a broadcast or a unicast to a specific slave. The slave responds to the command and responds as required, or reports an exception. If the master does not send a request, the slave will not send data on its own, and direct communication between slaves is impossible.

[0051] According to different hardware interfaces, MODBUS protocol can be divided into RTU protocol and TCP protocol. RTU protocol generally uses serial port RS232C or RS485 / 422, while TCP protocol generally uses Ethernet port.

[0052] Taking MODBUS RTU as an example, the message (or frame) format is shown in Table 1 (note that the total length cannot exceed 256 bytes):

[0053] Table 1

[0054]

[0055] As shown in Table 1, under the MODBUS RTU protocol, a maximum of 256 slaves can be connected to the system (official guide: 0 is the broadcast address, 1 to 247 are addresses that can be used by independent slaves, that is, the official guide only recommends a maximum of 247 slaves. Unless otherwise specified below, the official guide is followed by default).

[0056] However, in actual applications, there may be situations where a large number of devices need to be upgraded, such as the three-phase cascade modular photovoltaic solid-state transformer in the photovoltaic solid-state transformer system.

[0057] like Figure 1 The three-phase cascade modular photovoltaic solid-state transformer shown in the figure, A, B, C represent phase A, phase B and phase C respectively, each phase consists of N modules, each module contains 1 DC / DC module and 1 DC / AC module, and each DC / DC input side is connected in parallel to the low-voltage common DC bus (where V dcbus The control is completed by DC / DC (mppt) according to the maximum power point tracking of the photovoltaic array. Each DC / AC output side is connected in series through a filter unit (such as an inductor) to the high-voltage AC grid. The three-phase DC / AC output side is star-connected with the midpoint at O. Figure 1 For the three-phase photovoltaic solid-state transformer shown, assuming each module uses two controllers, one for the DC / DC module and one for the DC / AC module, the entire system requires at least 6N controllers. Modular power electronic devices like photovoltaic solid-state transformers have many modules and controllers, so firmware updates for each controller in the system are typically performed through online upgrades.

[0058] During the online upgrade process, each controller is equivalent to a slave station in the MODBUS RTU protocol, that is, the device to be upgraded mentioned above. When the number of controllers is less than 247, the controllers can be distinguished by MODBUS address. However, when the number of controllers is greater than 247, they cannot be completely distinguished by MODBUS address.

[0059] In this case, at least one additional upgrade controller is required to perform device upgrade control operations. For example, if there are 260 devices, one upgrade controller is used for devices 1-247, and another upgrade controller is used for devices 248-260. As the number of upgrade controllers increases, the purchase cost also increases accordingly, and because each upgrade controller is not fully utilized, there is a waste of resources.

[0060] In addition, the standard communication protocol can also be modified to increase the address bits in the protocol. However, since the total number of message bits in a frame is fixed, the increase in address bits will lead to a corresponding reduction in data bits. Therefore, for the same amount of data to be upgraded, compared with the standard protocol, the modified new protocol will require more frames of messages to send, so the upgrade time will be longer.

[0061] It's important to note that if you're increasing the number of devices you can upgrade by modifying the standard communication protocol, you need to ensure that both the controller you're upgrading and the devices support the protocol modification. However, in some cases, the upgrade controller's program isn't publicly available and can't be modified. Without this capability, you can't increase the number of devices you can upgrade by modifying the protocol to add address bits.

[0062] In order to solve the above-mentioned problem that when the number of devices to be upgraded exceeds the number of devices specified by the communication protocol, at least one additional upgrade controller is required to perform device upgrade control operations, resulting in a waste of resources, and the problem that the upgrade time becomes longer when the communication protocol is modified or the communication protocol modification is not supported. After research, the inventor found that at least one device to be upgraded can be combined into a module to be upgraded, and the address information of the device to be upgraded and the module to be upgraded where the device to be upgraded is located is the same. The number of the multiple modules to be upgraded does not exceed the number of devices specified by the communication protocol between the upgrade controller and the module to be upgraded. In this way, the communication protocol can be met, and when the number of devices to be upgraded in the module to be upgraded is large, the same upgrade controller can control the upgrade of devices exceeding the number specified by the communication protocol, thereby improving the efficiency of the upgrade controller without the need to purchase an additional upgrade controller, which is conducive to reducing costs. In addition, there is no need to add address bits to the standard communication protocol, so the upgrade time will not be prolonged.

[0063] More specifically, the device upgrade system includes an upgrade controller and at least one module to be upgraded. The module to be upgraded includes at least one device to be upgraded, and the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded is different. The address information of the device to be upgraded is the same as the address information of the module to be upgraded in which the device to be upgraded is located, and the address information of different modules to be upgraded is different. Through the present invention, different modules to be upgraded can be distinguished based on address information, and different devices to be upgraded in the same module to be upgraded can be distinguished based on upgrade attribute information. Consequently, when the acquired address information matches the target address information in the upgrade instruction, and the acquired upgrade attribute information matches the target upgrade attribute information in the upgrade instruction, the device to be upgraded can use the data to be upgraded to perform an upgrade operation. Since in the present invention, the number of the at least one module to be upgraded does not exceed the number of devices specified in the communication protocol between the upgrade controller and the module to be upgraded, the module to be upgraded includes at least one device to be upgraded. When the module to be upgraded includes a larger number of devices to be upgraded, the number of devices to be upgraded controlled by the same upgrade controller will be more than the number of devices specified in the communication protocol. That is to say, the present invention distinguishes the devices to be upgraded through target address information and target upgrade attribute information, so that the same upgrade controller can control the upgrade of a number of devices that is greater than the number of devices corresponding to the address bits specified in the standard communication protocol, and there is no need to add address bits to the standard communication protocol, so the upgrade time will not be prolonged.

[0064] Based on the above content, an embodiment of the present invention provides a device upgrade method, which is applied to a target device to be upgraded in a device upgrade system. The device to be upgraded can be a firmware unit such as firmware used to control system operation in a power electronic device system such as the three-phase cascade modular photovoltaic solid-state transformer mentioned above. The firmware unit may be stored inside a control chip such as a DSP (digital signal processing), an FPGA (field programmable gate array), or an ARM (advanced RISC machines), or may be stored in an external storage unit such as an EEPROM (electrically erasable programmable read only memory) or an SD card (secure digital memory card / SD card).

[0065] The device upgrade system includes an upgrade controller and at least one module to be upgraded. The target device to be upgraded is any device to be upgraded in the device upgrade system. The upgrade controller in this embodiment is equivalent to the master station in the MODBUSRTU protocol and can be a server or controller with upgrade control function.

[0066] The module to be upgraded includes at least one device to be upgraded. In this embodiment, there is no requirement for the number of devices to be upgraded in the module to be upgraded, and the number can be set based on actual scenarios.

[0067] The number of the at least one module to be upgraded does not exceed the number of devices specified in the communication protocol between the upgrade controller and the modules to be upgraded. The address information of the device to be upgraded is the same as the address information of the module to be upgraded in which the device to be upgraded resides, and the address information of different modules to be upgraded is different. In other words, each module to be upgraded appears to be a slave station as described above.

[0068] Taking the above-mentioned MODBUS RTU protocol as an example, the number of at least one module to be upgraded should not exceed the above-mentioned 247. The address information of different modules to be upgraded is different. This ensures that the number of communication addresses carried by the same upgrade controller meets the number of devices that the same upgrade controller can carry as required by the protocol.

[0069] Furthermore, since the address information of the device to be upgraded is the same as the address information of the module to be upgraded in which the device to be upgraded is located, in order to distinguish different devices to be upgraded in the same module to be upgraded, in this embodiment, the upgrade attribute information of the devices to be upgraded in the same module to be upgraded is different. The upgrade attribute information includes but is not limited to the firmware version and / or firmware length. The firmware version and firmware length refer to the firmware version and firmware length corresponding to the data to be upgraded that needs to be upgraded for the device to be upgraded. Moreover, the upgrade attribute information and / or the data to be upgraded are located in the data bits of the upgrade instruction, so that there is no need to add additional address bits, which will not cause the upgrade time to become longer. In addition, there is no need to modify the program in the upgrade controller, only the program in the device to be upgraded needs to be modified, but the two still communicate according to the standard communication protocol.

[0070] If at least two devices in the same upgrade module need to be upgraded and the upgrade data used is the same, the firmware versions and / or firmware lengths corresponding to the different devices can be set to different levels to distinguish them. For example, the firmware version of one device can be set to 1.0, and the firmware version of another device can be set to 2.0 to distinguish the different devices.

[0071] It should be noted that how to set the firmware version and / or firmware length of the device to be upgraded to distinguish different devices to be upgraded in the same module to be upgraded needs to be set in advance.

[0072] Furthermore, different devices to be upgraded within the same module to be upgraded may have different upgrade attribute information. However, the upgrade attribute information of devices to be upgraded within different modules to be upgraded may be the same or different. This is not limited in this embodiment. In other words, different devices to be upgraded may differ in at least one of their address information and upgrade attribute information.

[0073] Reference Figure 2 , device upgrade methods may include:

[0074] S11. Obtain an upgrade instruction sent by the upgrade controller.

[0075] The upgrade instruction includes target address information, and the upgrade instruction also includes target upgrade attribute information and / or data to be upgraded.

[0076] In this embodiment, in the field of industrial communications, still using the aforementioned MODBUS RTU protocol as an example, the MODBUS address is used to distinguish each communication slave. In this embodiment, each module to be upgraded is equivalent to a communication slave, that is, the MODBUS address is used to distinguish each module to be upgraded. For greater clarity, the "MODBUS address" will be uniformly described as "address information."

[0077] Specifically, the upgrade instruction sent by the upgrade controller carries information about the device to be upgraded, specifically the target address information and target upgrade attribute information of the device to be upgraded. Furthermore, the upgrade instruction may also include the target address information and the data to be upgraded, i.e., the data used during the device upgrade. In other words, an upgrade instruction may include: target address information + data to be upgraded / target upgrade attribute information; or: target address information + target upgrade attribute information + data to be upgraded.

[0078] In practical applications, if the MODBUS protocol is used, the upgrade controller in this embodiment is the master station, and the upgrade module composed of the devices to be upgraded with the same device address is the slave station. During the upgrade process, the message information sent by the master station to the slave station complies with the MODBUS protocol. In this embodiment, the master station serves as the communication unit for sending upgrade messages, and the slave station serves as the communication unit for receiving upgrade messages.

[0079] In this embodiment, obtaining the upgrade instruction sent by the upgrade controller may include: receiving the upgrade instruction continuously sent by the upgrade controller directly or through an intermediate communication device according to a preset data sending frequency;

[0080] In a case where the received upgrade instruction is a handshake instruction including target address information but not including target upgrade attribute information, determining whether the target device to be upgraded is a preset device;

[0081] If so, a data successful reception message is sent back to the upgrade controller.

[0082] In actual applications, data can be sent according to a preset data sending frequency, and the preset data sending frequency is set according to the actual scenario.

[0083] When sending data, the target device to be upgraded can receive the upgrade instruction directly or indirectly through an intermediate communication device. The following are introduced respectively:

[0084] 1. The target device to be upgraded can obtain at least one upgrade instruction directly sent by the upgrade controller.

[0085] Specifically, when issuing an upgrade instruction, only one upgrade instruction may be sent, and the upgrade instruction includes the data to be upgraded, the target address information, and the target upgrade attribute information.

[0086] Alternatively, multiple upgrade instructions can be issued sequentially, each including target address information. The data to be upgraded and target upgrade attribute information can be placed in a single upgrade instruction or in separate, separate upgrade instructions. When issuing upgrade instructions, such as the data to be upgraded and target upgrade attribute information, unicast or broadcast methods can be used. Unicast is preferred for delivering target upgrade attribute information.

[0087] When the upgrade instruction is sent in unicast mode, the upgrade controller may directly send at least one upgrade instruction in unicast mode to the device to be upgraded that needs to be upgraded.

[0088] When using unicast to send upgrade instructions, if you need to control the upgrade of multiple devices, the upgrade command should be sent one by one, which will take a long time. Therefore, after handshaking with the devices to be upgraded by sending upgrade attribute information, you can use broadcast to send the upgrade data.

[0089] When the upgrade data is sent in a broadcast manner, only the devices to be upgraded whose upgrade attribute information is the same as the upgrade attribute information sent when the devices to be upgraded are determined will be upgraded at the same time, thereby improving upgrade efficiency.

[0090] It should be noted that the broadcast instruction may not require a response from the device to be upgraded, especially when broadcast communication is performed on multiple devices on a bus.

[0091] 2. Receive the upgrade instructions continuously sent by the upgrade controller through an intermediate communication device.

[0092] In addition to directly sending the upgrade instruction to the device to be upgraded, the upgrade controller may also indirectly send at least one upgrade instruction to the device to be upgraded via an intermediate communication device.

[0093] At this time, the device to be upgraded communicates with the upgrade controller via the intermediate communication device, wherein the device to be upgraded may receive the upgrade instruction from the upgrade controller via one or more intermediate communication devices.

[0094] If so, the intermediate communication device and the device to be upgraded are located in the same module to be upgraded, then the address information of the intermediate communication device and the device to be upgraded are consistent, and are both address information of the module to be upgraded.

[0095] If the intermediate communication device and the device to be upgraded are not located in the same module to be upgraded, then the address information of the intermediate communication device and the device to be upgraded can be consistent, that is, the address information of the module to be upgraded.

[0096] It should be noted that if the intermediate communication device also needs to be upgraded, the intermediate communication device is also upgraded as a device to be upgraded. At this time, it is necessary to ensure that the address information of the intermediate communication device is consistent with that of the module to be upgraded.

[0097] In addition, after receiving at least one upgrade instruction continuously sent by the upgrade controller according to a preset data sending frequency (such as 5 seconds), it is necessary to provide feedback on the sent upgrade instruction.

[0098] Specifically, if the upgrade instruction received at the current moment and before the current moment includes target address information but does not include target upgrade attribute information, the preset device in the module to be upgraded corresponding to the target address information is determined, so that the preset device replies with data successful reception information to the upgrade controller.

[0099] That is to say, after the upgrade controller sends the target address information, the device to be upgraded can determine whether the target device to be upgraded belongs to the module to be upgraded by whether the address information of the target device to be upgraded matches the target address information. However, since the upgrade controller has not yet sent the target upgrade attribute information, it is impossible to specifically determine which device to be upgraded needs to be upgraded. At this time, a set preset device located in the module to be upgraded needs to reply to the upgrade controller that the upgrade instruction has been successfully received.

[0100] In this embodiment, the preset device storing the upgrade attribute information of each device to be upgraded in the upgrade module where the target device to be upgraded is located replies to the upgrade controller that the upgrade instruction has been successfully received. Except for the preset device, other devices do not respond to the upgrade instruction sent by the upgrade controller.

[0101] That is to say, during the upgrade process, when each device to be upgraded receives the upgrade instruction issued by the upgrade controller, it first determines whether the address information is the same as the target device to be upgraded. If not, it will not respond to the upgrade instruction; if they are the same, it will further determine whether the current or previous upgrade instruction contains upgrade attribute information. If the upgrade attribute information is received but does not match the target device to be upgraded, it will not respond to the main station instruction (including the instruction where the upgrade attribute information is located and subsequent instructions); if the target upgrade attribute information is received and matches the target device to be upgraded, it will respond to the main station instruction (including the instruction where the upgrade attribute information is located and subsequent instructions); if the target upgrade attribute information is received, the preset device will respond to the main station instruction.

[0102] S12: Acquire the address information and upgrade attribute information of the target device to be upgraded.

[0103] In this embodiment, the address information and upgrade attribute information of the target device to be upgraded may be obtained from the memory of the target device to be upgraded.

[0104] S13: When the acquired address information matches the target address information, and the acquired upgrade attribute information matches the target upgrade attribute information, perform an upgrade operation using the data to be upgraded.

[0105] In practical applications, refer to Figure 3 , step S13 includes:

[0106] S21. Determine whether the acquired address information matches the target address information; if so, execute step S22.

[0107] The matching in this embodiment means that the acquired address information is consistent with the target address information.

[0108] S22: Determine whether the acquired upgrade attribute information matches the target upgrade attribute information; if so, execute step S23.

[0109] The matching in this embodiment is the same as above, which also means that the acquired upgrade attribute information is consistent with the target upgrade attribute information.

[0110] It should be noted that, if the acquired address information does not match the target address information, or if the acquired address information matches the target address information and the acquired upgrade attribute information does not match the target upgrade attribute information, the upgrade instruction is discarded.

[0111] S23: Perform an upgrade operation using the data to be upgraded.

[0112] In actual applications, if they are consistent, the upgrade is performed using the data to be upgraded. After the upgrade is completed using the data to be upgraded, the upgrade results need to be verified to determine whether the upgrade is successful. For the specific process, refer to Figure 4 Step S23 may include:

[0113] S31: Perform an upgrade operation using the data to be upgraded.

[0114] Specifically, the data originally stored in the device to be upgraded is replaced with the received data to be upgraded, or the received data to be upgraded is stored in a designated area other than the location of the original data.

[0115] S32: After the upgrade operation is completed, use the target upgrade attribute information to verify the upgrade result, and reply the verification result to the upgrade controller.

[0116] Specifically, the target upgrade attribute information sent by the upgrade controller includes verification information, such as firmware length. After receiving all the data to be upgraded, the device to be upgraded calculates verification information, such as the firmware length of the received data to be upgraded. It then determines whether the calculated verification information matches the verification information sent by the upgrade controller to determine whether the upgrade was successful. After obtaining the verification result, it feeds it back to the upgrade controller.

[0117] If the verification passes, a restart operation or the replacement+restart operation is performed.

[0118] If the verification fails, the data error information is fed back to the upgrade controller so that the upgrade controller can resend the data to be upgraded.

[0119] In this embodiment, a device upgrade system includes an upgrade controller and at least one module to be upgraded. The module to be upgraded includes at least one device to be upgraded, and the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded is different. The address information of the device to be upgraded is the same as the address information of the module to be upgraded in which the device to be upgraded is located, and the address information of different modules to be upgraded is different. Through the present invention, different modules to be upgraded can be distinguished based on address information, and different devices to be upgraded in the same module to be upgraded can be distinguished based on upgrade attribute information. Consequently, when the acquired address information matches the target address information in the upgrade instruction, and the acquired upgrade attribute information matches the target upgrade attribute information in the upgrade instruction, the device to be upgraded can use the data to be upgraded to perform an upgrade operation. Since in the present invention, the number of the at least one module to be upgraded does not exceed the number of devices specified in the communication protocol between the upgrade controller and the module to be upgraded, the module to be upgraded includes at least one device to be upgraded. When the module to be upgraded includes a larger number of devices to be upgraded, the number of devices to be upgraded controlled by the same upgrade controller will be more than the number of devices specified in the communication protocol. That is to say, the present invention distinguishes the devices to be upgraded through target address information and target upgrade attribute information, so that the same upgrade controller can control the upgrade of a number of devices that is greater than the number of devices corresponding to the address bits specified in the standard communication protocol, and there is no need to add address bits to the standard communication protocol, so the upgrade time will not be prolonged.

[0120] In addition, since the present invention does not require address expansion for a communication protocol such as a standard MODBUS RTU protocol, the problem of low communication data utilization caused by address expansion of the communication protocol is avoided.

[0121] Optionally, based on the embodiment of the above-mentioned device upgrade method, another embodiment of the present invention provides a device upgrade apparatus, characterized in that it is applied to a target device to be upgraded in a device upgrade system, the device upgrade system includes an upgrade controller and at least one module to be upgraded, the target device to be upgraded is any device to be upgraded in the device upgrade system, the number of the at least one module to be upgraded does not exceed the number of devices specified in the communication protocol between the upgrade controller and the module to be upgraded, the module to be upgraded includes at least one device to be upgraded, the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded is different, the address information of the device to be upgraded is the same as the address information of the module to be upgraded where the device to be upgraded is located, and the address information of different modules to be upgraded is different;

[0122] Reference Figure 5 , the equipment upgrading device comprises:

[0123] An instruction acquisition module 11 is configured to acquire an upgrade instruction sent by the upgrade controller, wherein the upgrade instruction includes target address information, target upgrade attribute information, and / or data to be upgraded;

[0124] An information acquisition module 12 is used to acquire the address information and upgrade attribute information of the target device to be upgraded;

[0125] The upgrade control module 13 is configured to perform an upgrade operation using the data to be upgraded if the acquired address information matches the target address information and the acquired upgrade attribute information matches the target upgrade attribute information.

[0126] Furthermore, the upgrade attribute information includes: firmware version and / or firmware length; the upgrade attribute information and / or the data to be upgraded are located in the data position of the upgrade instruction.

[0127] Furthermore, the upgrade control module 13 includes:

[0128] a judgment submodule, configured to judge whether the acquired address information matches the target address information; if so, to judge whether the acquired upgrade attribute information matches the target upgrade attribute information;

[0129] The upgrade submodule is configured to perform an upgrade operation using the data to be upgraded when the acquired upgrade attribute information matches the target upgrade attribute information.

[0130] Furthermore, the upgrade submodule is specifically used to:

[0131] Perform an upgrade operation using the data to be upgraded;

[0132] After the upgrade operation is completed, the upgrade result is verified using the target upgrade attribute information, and the verification result is replied to the upgrade controller.

[0133] Furthermore, it also includes:

[0134] The instruction discarding module is used to discard the upgrade instruction when the acquired address information does not match the target address information, or when the acquired address information matches the target address information and the acquired upgrade attribute information does not match the target upgrade attribute information.

[0135] Furthermore, the instruction acquisition module 11 is specifically configured to:

[0136] Receiving the upgrade instructions continuously sent by the upgrade controller directly or through an intermediate communication device according to a preset data sending frequency;

[0137] In the case that the received upgrade instruction is a handshake instruction including target address information but not including target upgrade attribute information, it is determined whether the target device to be upgraded is a preset device; if so, a data successful reception information is replied to the upgrade controller.

[0138] In this embodiment, a device upgrade system includes an upgrade controller and at least one module to be upgraded. The module to be upgraded includes at least one device to be upgraded, and the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded is different. The address information of the device to be upgraded is the same as the address information of the module to be upgraded in which the device to be upgraded is located, and the address information of different modules to be upgraded is different. Through the present invention, different modules to be upgraded can be distinguished based on address information, and different devices to be upgraded in the same module to be upgraded can be distinguished based on upgrade attribute information. Consequently, when the acquired address information matches the target address information in the upgrade instruction, and the acquired upgrade attribute information matches the target upgrade attribute information in the upgrade instruction, the device to be upgraded can use the data to be upgraded to perform an upgrade operation. Since in the present invention, the number of the at least one module to be upgraded does not exceed the number of devices specified in the communication protocol between the upgrade controller and the module to be upgraded, the module to be upgraded includes at least one device to be upgraded. When the module to be upgraded includes a larger number of devices to be upgraded, the number of devices to be upgraded controlled by the same upgrade controller will be more than the number of devices specified in the communication protocol. That is to say, the present invention distinguishes the devices to be upgraded through target address information and target upgrade attribute information, so that the same upgrade controller can control the upgrade of a number of devices that is greater than the number of devices corresponding to the address bits specified in the standard communication protocol, and there is no need to add address bits to the standard communication protocol, so the upgrade time will not be prolonged.

[0139] It should be noted that, for the working process of each module and sub-module in this embodiment, please refer to the corresponding description in the above embodiment, which will not be repeated here.

[0140] Optionally, based on the embodiments of the above-mentioned device upgrade method and apparatus, another embodiment of the present invention provides a device to be upgraded, the device to be upgraded being located in a device upgrade system, the device upgrade system comprising an upgrade controller and at least one module to be upgraded, the target device to be upgraded being any device to be upgraded in the device upgrade system, the number of the at least one module to be upgraded not exceeding the number of devices specified in a communication protocol between the upgrade controller and the modules to be upgraded, the modules to be upgraded comprising at least one device to be upgraded, the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded being different, the address information of the devices to be upgraded being the same as the address information of the module to be upgraded in which the device to be upgraded is located, and the address information of different modules to be upgraded being different;

[0141] The device to be upgraded is used to execute the above-mentioned device upgrading method.

[0142] Optionally, based on the above embodiments of the device upgrade method and apparatus, and the device to be upgraded, another embodiment of the present invention provides a device upgrade system, including:

[0143] An upgrade controller and at least one module to be upgraded, wherein the target device to be upgraded is any device to be upgraded in the device upgrade system, the number of the at least one module to be upgraded does not exceed the number of devices specified in the communication protocol between the upgrade controller and the modules to be upgraded, the modules to be upgraded include at least one device to be upgraded, the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded is different, the address information of the device to be upgraded is the same as the address information of the module to be upgraded where the device to be upgraded is located, and the address information of different modules to be upgraded is different;

[0144] The upgrade controller is used to send at least one upgrade instruction to all the devices to be upgraded;

[0145] The device to be upgraded is used to execute the above-mentioned device upgrading method.

[0146] The upgrade controller sends at least one upgrade instruction to all the devices to be upgraded, including:

[0147] Acquire a target device to be upgraded that needs to be upgraded, and determine target upgrade attribute information and target address information corresponding to the target device to be upgraded;

[0148] generating an upgrade instruction including at least one of the data to be upgraded and target upgrade attribute information, and target address information;

[0149] Send an upgrade instruction to all the devices to be upgraded.

[0150] In order to enable those skilled in the art to more clearly understand the specific implementation process of the present invention, Figure 6 Give an example.

[0151] Figure 6 The communication unit (master station) that issues the upgrade command is the upgrade controller in this embodiment. Module 1#, module 2#, ..., and N# modules are the modules to be upgraded in this embodiment. Taking module 1# as an example, module 1# includes devices 1-1 to be upgraded, devices 1-2 to be upgraded, ..., and devices 1-X to be upgraded. Each combination of these devices to be upgraded, i.e., each module, corresponds to a slave station. The same applies to modules 2# ... Y#.

[0152] Taking the master and slave stations using the MODBUS RTU protocol as an example, the device upgrade system includes multiple modules (N≤247), each module contains at least one device to be upgraded, and each device to be upgraded can directly receive the upgrade command issued by the master station.

[0153] To distinguish the devices to be upgraded, each module is first assigned a device address between 1 and 247. The device address of the device to be upgraded in each module is the same as the device address of the module. Then, different upgrade attribute information is designed for the devices to be upgraded in each module (only one item of the upgrade attribute information needs to be different). Devices to be upgraded in different modules can have the same upgrade attribute information.

[0154] Figure 6 In the device upgrade system shown, if the number of modules N exceeds 247, some modules can be merged to increase the number of devices to be upgraded within the module, keeping the total number of modules below 247. Because each device to be upgraded within a module is distinguished by its upgrade attribute information, it is necessary to ensure that the upgrade attribute information of each device to be upgraded within the reorganized module is different. If the upgrade attribute information is the same, the upgrade attribute information must be redesigned for each device. In other words, even if the number of modules does not exceed 247, the above method can still be used to reduce device address usage.

[0155] in addition, Figure 6 The device upgrade system shown may exist as a subsystem within a larger upgrade system.

[0156] It should be noted that the modules in this embodiment may not have a direct correspondence with actual physical modules, but are merely a collection of devices to be upgraded.

[0157] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A device upgrade method, characterized in that: A target device to be upgraded in a device upgrade system, the device upgrade system comprising an upgrade controller and at least one module to be upgraded, the target device to be upgraded being any device to be upgraded in the device upgrade system, the number of the at least one module to be upgraded not exceeding the number of devices specified in a communication protocol between the upgrade controller and the modules to be upgraded, the modules to be upgraded comprising at least one device to be upgraded, the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded being different, the address information of the device to be upgraded being the same as the address information of the module to be upgraded in which the device to be upgraded is located, and the address information of different modules to be upgraded being different; The device upgrading method comprises: Acquire an upgrade instruction sent by the upgrade controller, wherein the upgrade instruction includes target address information, target upgrade attribute information and / or data to be upgraded; Obtain the address information and upgrade attribute information of the target device to be upgraded; When the acquired address information matches the target address information, and the acquired upgrade attribute information matches the target upgrade attribute information, the upgrade operation is performed using the data to be upgraded; wherein the upgrade attribute information includes: firmware version and / or firmware length; the upgrade attribute information and / or the data to be upgraded are located in the data position of the upgrade instruction.

2. The device upgrade method according to claim 1, characterized in that: When the acquired address information matches the target address information, and the acquired upgrade attribute information matches the target upgrade attribute information, performing an upgrade operation using the data to be upgraded includes: Determining whether the acquired address information matches the target address information; If they match, determining whether the acquired upgrade attribute information matches the target upgrade attribute information; When the acquired upgrade attribute information matches the target upgrade attribute information, an upgrade operation is performed using the data to be upgraded.

3. The device upgrade method according to claim 2, characterized in that: Performing an upgrade operation using the data to be upgraded includes: Perform an upgrade operation using the data to be upgraded; After the upgrade operation is completed, the upgrade result is verified using the target upgrade attribute information, and the verification result is replied to the upgrade controller.

4. The device upgrade method according to claim 1, characterized in that: In a case where the acquired address information does not match the target address information, or the acquired address information matches the target address information and the acquired upgrade attribute information does not match the target upgrade attribute information, the method further includes: The upgrade instruction is discarded.

5. The device upgrade method according to claim 1, characterized in that: Obtaining the upgrade instruction sent by the upgrade controller includes: Receiving the upgrade instructions continuously sent by the upgrade controller directly or through an intermediate communication device according to a preset data sending frequency; In a case where the received upgrade instruction is a handshake instruction including target address information but not including target upgrade attribute information, determining whether the target device to be upgraded is a preset device; If so, a data successful reception message is sent back to the upgrade controller.

6. A device upgrading device, characterized in that: A target device to be upgraded in a device upgrade system, the device upgrade system comprising an upgrade controller and at least one module to be upgraded, the target device to be upgraded being any device to be upgraded in the device upgrade system, the number of the at least one module to be upgraded not exceeding the number of devices specified in a communication protocol between the upgrade controller and the modules to be upgraded, the modules to be upgraded comprising at least one device to be upgraded, the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded being different, the address information of the device to be upgraded being the same as the address information of the module to be upgraded in which the device to be upgraded is located, and the address information of different modules to be upgraded being different; The equipment upgrading device comprises: An instruction acquisition module is used to acquire an upgrade instruction sent by the upgrade controller, wherein the upgrade instruction includes target address information, target upgrade attribute information and / or data to be upgraded; An information acquisition module is used to obtain the address information and upgrade attribute information of the target device to be upgraded; An upgrade control module is used to use the data to be upgraded to perform an upgrade operation when the acquired address information matches the target address information and the acquired upgrade attribute information matches the target upgrade attribute information; wherein the upgrade attribute information includes: firmware version and / or firmware length; the upgrade attribute information and / or the data to be upgraded are located in the data position of the upgrade instruction.

7. A device to be upgraded, characterized in that: The device to be upgraded is located in a device upgrade system, the device upgrade system including an upgrade controller and at least one module to be upgraded. The target device to be upgraded is any device to be upgraded in the device upgrade system. The number of the at least one module to be upgraded does not exceed the number of devices specified in a communication protocol between the upgrade controller and the modules to be upgraded. The modules to be upgraded include at least one device to be upgraded, and the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded is different. The address information of the device to be upgraded is the same as the address information of the module to be upgraded in which the device to be upgraded is located, and the address information of different modules to be upgraded is different. The device to be upgraded is used to execute the device upgrading method according to any one of claims 1 to 5.

8. A device upgrade system, characterized in that: include: An upgrade controller and at least one module to be upgraded, wherein the target device to be upgraded is any device to be upgraded in the device upgrade system, the number of the at least one module to be upgraded does not exceed the number of devices specified in the communication protocol between the upgrade controller and the modules to be upgraded, the modules to be upgraded include at least one device to be upgraded, the upgrade attribute information of the devices to be upgraded located in the same module to be upgraded is different, the address information of the device to be upgraded is the same as the address information of the module to be upgraded where the device to be upgraded is located, and the address information of different modules to be upgraded is different; The upgrade controller is used to send an upgrade instruction to all the devices to be upgraded; The device to be upgraded is used to execute the device upgrading method according to any one of claims 1 to 5.

9. The device upgrade system according to claim 8, characterized in that: The upgrade controller sends an upgrade instruction to all the devices to be upgraded, including: Acquire a target device to be upgraded that needs to be upgraded, and determine target upgrade attribute information and target address information corresponding to the target device to be upgraded; generating an upgrade instruction including at least one of the data to be upgraded and target upgrade attribute information, and target address information; Send an upgrade instruction to all the devices to be upgraded.

Citation Information

Patent Citations

  • Multi-firmware upgrading method and system, and readable storage medium

    CN107291497A

  • Remote upgrading method of Internet of Things terminal, Internet of Things master station and storage medium

    CN112104487A

  • Firmware upgrading method and device, information processing method and device and equipment

    CN113141267A