Program OTA device, method, equipment and medium
By introducing program OTA devices into the power supply system and using its communication interface transit mechanism, the problems of low upgrade efficiency and poor stability caused by the difference in communication protocols between the monitoring system and the power supply module are solved, and efficient and stable program upgrades are achieved.
Patent Information
- Application Number
- CN202510308421.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-08-01
AI Technical Summary
In the power system cabinet, the communication protocol and OTA process between the monitoring system and the power module are very different, resulting in low efficiency and poor stability of program upgrades, and high difficulty in development and debugging.
A program OTA device is provided, configured with first and second communication interfaces, which establish connections with monitoring equipment and power modules respectively, and automatically executes the OTA upgrade process through a transit mechanism to simplify the development and debugging process of monitoring equipment.
It improves the upgrade efficiency and stability of power modules, reduces development complexity, saves manpower and time costs, and is suitable for multi-equipment and multi-protocol environments.
Smart Images

Figure CN120406975A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of testing, and particularly to a program OTA device, method, equipment and medium. Background Art
[0002] With the continuous development of intelligent and automated technologies, the program over-the-air (OTA) technology has been widely applied in multiple industries such as electronics, power, and household appliances. In power systems, especially in power supply system cabinet products, the OTA technology has gradually become an important means for product upgrades. The convenience and reliability of the OTA technology not only greatly improve the iteration speed and update efficiency of products, but also enhance the management convenience and maintenance efficiency of equipment.
[0003] In most power supply system cabinet products, the system monitoring device is usually responsible for program upgrades of multiple power modules. Generally, the system cabinet consists of a monitoring system and multiple power modules (or components), and each power module has an independent program file. In the application scenario, it is necessary to transmit the OTA program to each power module through the system monitoring device to achieve program upgrades of the power modules.
[0004] However, the common difficulty in reality is that there are complex communication protocols and different OTA processes between the monitoring system in the power supply system cabinet and each power module (or component). Since the power module and the monitoring system are developed and supplied by different companies, there are significant differences in the OTA protocol and process design of the power module. Specifically, when developing the OTA function, the monitoring system manufacturer needs to deeply understand the specific OTA protocol content and process of the power module manufacturer, and conduct detailed design, development and debugging work. This not only increases the difficulty of development and debugging, but also due to the different protocol designs of each company, there are many communication and understanding deviations, which easily lead to problems such as slow efficiency and poor stability during program upgrades. Summary of the Invention
[0005] The main purpose of the present invention is to provide a program OTA device, method, equipment and medium, aiming to at least solve the technical problems such as low efficiency and poor stability existing in the power system during program upgrades in related technologies.
[0006] To achieve the above object, the technical solution of the present invention is as follows:
[0007] In the first aspect of the present invention, a program OTA device is provided, and the program OTA device is configured with a first communication interface and a second communication interface;
[0008] The first communication interface is used to establish a communication connection with a monitoring device through a first communication transmission protocol, and the second communication interface is used to establish communication connections with at least one power module and the monitoring device respectively through a second communication transmission protocol;
[0009] Wherein, the program OTA device is configured to receive, through the first communication interface, an OTA upgrade program transmitted by the monitoring device during a preset first time period, and receive, through the second communication interface, a control command for triggering a download process during a preset second time period, determine a target upgrade object from at least one of the power modules according to the control command, and transmit a target program in the OTA upgrade program to the target upgrade object through the second communication interface to instruct the target upgrade object to perform a program upgrade.
[0010] In a second aspect of the present invention, there is provided a program OTA method, which is applied to the program OTA device as described in the first aspect. The program OTA method includes:
[0011] Receiving and storing, through a first communication interface, an OTA upgrade program transmitted by a monitoring device;
[0012] Determining a download mode based on a preset control command or a physical DIP switch value of a user interface module, wherein the download mode includes a trigger control command download method or an automatic download method;
[0013] Transmitting a target program in the OTA upgrade program to a target upgrade object through a second communication interface according to the determined download mode to trigger the target upgrade object to perform the OTA download process and perform a program upgrade.
[0014] In a third aspect of the present invention, there is provided an electronic device, which includes a memory, a processor and a bus; the bus is used to realize connection communication between the memory and the processor; the processor is used to execute a computer program stored on the memory; when the processor executes the computer program, the steps in the steady-state characteristic test method as described in the second aspect are realized.
[0015] In a fourth aspect of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored. It is characterized in that when the computer program is executed by a processor, the steps in the steady-state characteristic test method as described in the second aspect are realized.
[0016] The program OTA device, method, equipment and medium of the present invention establish communication connections with the monitoring device and the power supply module respectively through two communication interfaces with different communication transmission protocols. Thus, when the power supply system is upgraded, the monitoring system only needs to send the OTA program to the program OTA device, and the program OTA device acts as a transfer. It can automatically or be simply controlled by the monitoring to perform program OTA upgrade on the power supply module, enabling the monitoring device not to care about the details of the program download process and the download exception handling process of the module (or component), avoiding situations such as increased debugging difficulty caused by the monitoring device and the power supply module possibly belonging to different companies (inconsistent communication transmission protocols), thereby improving the upgrade efficiency and stability of the power supply module. At the same time, the design of the system simplifies the development and debugging process. The monitoring device does not need to deeply understand the protocol content of each module, reducing the development complexity and saving labor and time costs. Generally, the present invention improves the efficiency, stability and compatibility of the power supply system program upgrade, and is applicable to environments with multiple devices and multiple protocols. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0018] Figure 1 A connection schematic diagram of the program OTA device provided by an embodiment of the present application with the monitoring device and the power supply module;
[0019] Figure 2 An internal structure schematic diagram of the program OTA device provided by an embodiment of the present application;
[0020] Figure 3 A connection schematic diagram of the program OTA device provided by an embodiment of the present application with the monitoring device and the power supply module;
[0021] Figure 4 A connection schematic diagram of the program OTA device provided by an embodiment of the present application with the monitoring device and the power supply module;
[0022] Figure 5 A connection schematic diagram of the program OTA device provided by an embodiment of the present application with the monitoring device and the power supply module;
[0023] Figure 6 A connection schematic diagram of the program OTA device provided by an embodiment of the present application only with the power supply module;
[0024] Figure 7Schematic diagram of the process steps of the program OTA method provided by the embodiments of the present application;
[0025] Figure 8 Schematic diagram of the module connections inside the electronic device provided by the embodiments of the present application.
[0026] The realization of the purpose of the present invention, functional features and advantages will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments
[0027] 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.
[0028] It should be noted that related terms such as "first", "second", etc. can be used to describe various components, but these terms do not limit the components. These terms are only used to distinguish one component from another. For example, without departing from the scope of the present invention, the first component can be called the second component, and similarly, the second component can also be called the first component. The term "and / or" refers to any combination of one or more of the related items and the described items.
[0029] Please refer to Figure 1 , the embodiments of the present application provide a program OTA device 20, which is configured with a first communication interface A and a second communication interface B.
[0030] Specifically, the first communication interface A is used to establish a communication connection with the monitoring device 10 through the first communication transmission protocol, the second communication interface B is used to establish a communication connection with at least one power module (the number is N, N is an integer greater than or equal to 1) through the second communication transmission protocol, and the second communication interface B is also used to establish a communication connection with the monitoring device 10 (receive control commands or information reading commands). It can be seen that the program OTA device 20 supports different communication transmission protocols through the above two communication interfaces, so as to perform bilateral coordination through the program OTA device as an "intermediate bridge" to ensure seamless data flow, and then realize the OTA upgrade of the power module.
[0031] Among them, when a program upgrade is required for the power supply module, the program OTA device 20 receives the OTA upgrade program (including but not limited to program files such as BIN and HEX) transmitted by the monitoring device 10 through the first communication interface A during a preset first time period. If in the command-triggered download mode, it also receives the control command for triggering the download process sent by the monitoring device through the second communication interface B during a preset second time period, determines the corresponding target upgrade object from at least one power supply module according to the control command, and transmits the target program in the OTA upgrade program to the target upgrade object through the second communication interface B (the process of transmitting the target program is the download process) to instruct the target upgrade object to perform a program upgrade. It can be seen that during the entire OTA upgrade process, the monitoring device 10 does not directly participate. Instead, the program OTA device 20 serves as a transfer, interacts with the monitoring device and the power supply module, and is responsible for executing the OTA download control process for the power supply module. Using this transfer mechanism, the monitoring does not need to care about the details of the program download process and the download exception handling process of the module (or component).
[0032] It should be noted that the target upgrade object can be one of the power supply modules, or all of the power supply modules, or specific power supply modules with a relatively low current software version (for example, the version number is lower than the version number of the software to be updated in the OTA upgrade program). Also, the target program can be all or part of the programs in the OTA upgrade program, which can be determined by the control instruction.
[0033] In addition, there is no strict time limit for the first time period and the second time period, nor a definite sequence. If possible, it is selected to send program data when one device is running, and then perform program updates at the idle time nodes of other devices.
[0034] In an alternative implementation of this embodiment, when the program OTA device does not receive the control command during the second time period, it is in the automatic download mode (or after the program OTA device is powered on, according to a pre-configured command, or the OTA device enters the automatic download mode according to a preset physical dip value). In this automatic download mode, if the program OTA device stores a download file at this time, it starts to download. Specifically: determine the target upgrade object from at least one module according to the file name of the OTA program. When the module model of the OTA file name corresponds to the power supply module model read by the program OTA device, it is downloaded.
[0035] It should also be noted that in terms of the CAN protocol, information is directionally interacted through the module address.
[0036] In summary, for the program OTA device of the present invention, communication connections are respectively established with the monitoring device and the power supply module through two communication interfaces with different communication transmission protocols. Thus, when the power supply system is being upgraded in terms of programs, the monitoring system only needs to quickly and conveniently send the OTA program to the program OTA device. The program OTA device acts as a transfer station and can automatically or be simply controlled by the monitoring to perform program OTA upgrades on the power supply module (realize information interaction with the monitoring device and the power supply module, and be responsible for executing the OTA download control process for the power supply module), enabling the monitoring to not have to concern itself with the program download process and the details of the download exception handling process of the module (or component), completely avoiding situations such as increased debugging difficulty caused by the monitoring device and the power supply module possibly belonging to different companies (inconsistent communication transmission protocols), so as to improve the upgrade efficiency and stability of the power supply module. At the same time, the design of the system simplifies the development and debugging process. The monitoring device does not need to deeply understand the protocol content of each module, reducing the development complexity and saving manpower and time costs.
[0037] Regarding the beneficial effects of this embodiment: Simplify the development and debugging process and shorten the delivery cycle. More specifically, cross - vendor coordination reduces deviations: The OTA device can handle device protocols from different vendors, avoiding compatibility issues caused by a lack of in - depth understanding of the protocols, thus reducing errors and deviations in development and debugging. Debugging efficiency is improved: Due to the standardization of communication protocols and the introduction of an automated upgrade process, developers no longer need to manually debug each power supply module. Instead, they rely on the program OTA device to automatically identify and select the objects that need to be upgraded, thus saving a large amount of manual intervention and testing time.
[0038] Please refer to Figure 2 , the program OTA device includes a power supply unit 201, a communication unit 202, a control unit 203, a storage unit 204, and a user interface unit 205. The control command at least carries the file name, software version, and target upgrade object.
[0039] The power supply unit 201 is used to supply power to the communication unit 202, the control unit 203, the storage unit 204, and the user interface unit 205 respectively. That is, its main function is to supply power to each component inside the program OTA device. The power supply can select USB / external power input and then be internally divided and converted to supply power to each sub - unit individually.
[0040] The communication unit 202 is used to communicate with the monitoring device 10 through the first communication interface A and communicate with at least one power supply module and the monitoring device 10 through the second communication interface B. That is, the communication unit 202 is externally connected to the monitoring and the bus between the monitoring and the module, and internally connected to the control unit 203, realizing the reception of the module program, and at the same time performing information interaction with the monitoring and the power supply module, thus realizing the program download process.
[0041] The control unit 203 is used to determine the target upgrade object and the target program according to the control instruction and / or, and transmit the target program in the OTA upgrade program to the target upgrade object via the second communication interface B, so as to instruct the target upgrade object to perform program upgrade according to the preset download method, and feedback the download status information monitored for the target upgrade object in the preset third time period to the monitoring device 10 via the second communication interface B. That is, the control unit 203, as the core unit for implementing the entire OTA download process of the program, on the one hand, exchanges information with the communication unit, and on the other hand, exchanges information with the storage unit 204, and executes the entire module download process control strategy, thereby realizing the function of the entire OTA device for the program.
[0042] Among them, the way of feedbacking the download status information to the monitoring device 10 via the second communication interface B includes two ways: the OTA device actively uploading and the monitoring device actively querying. Specifically, the OTA device can actively upload the download status information to the monitoring device 10 according to the preset feedback strategy. For example, when the download progress reaches a specific threshold (such as 25%, 50%, 75%, 100%) or an abnormality occurs (such as network interruption, download failure), the OTA device automatically sends the corresponding status information to the monitoring device 10 via the second communication interface B. After receiving this information, the monitoring device 10 can record, display, or trigger the corresponding control strategy. Another way is that the monitoring device actively queries, that is, when needed, the monitoring device 10 sends a status request instruction to the OTA device via the second communication interface B. After receiving this instruction, the OTA device reads the current download status and returns the corresponding data via the same communication interface. For example, the monitoring device 10 can periodically poll the download progress, or send a request to the OTA device when triggered by a user operation (such as when the user queries the download status) to ensure real-time acquisition of the download status information.
[0043] The storage unit 204 includes, but is not limited to, storage media such as SD cards, on-chip / off-chip FLASH, and E2prom. Its main function is to exchange information with the control unit 203, and is used to receive and store the OTA upgrade program, and also supports the control unit 203 to read the stored program data.
[0044] The user interface unit 205 includes an indicator light and a configuration DIP switch. The indicator light is used to indicate the operating status of the program OTA device, and the operating status at least includes the OTA upgrade status, the communication status, and the power status; the configuration DIP switch is used for mode or parameter configuration.
[0045] In summary, as a transfer hub, the program OTA device realizes the complete process of receiving, storing, parsing, and transmitting the OTA upgrade program through the cooperation of the power supply unit 201, the communication unit 202, the control unit 203, the storage unit 204, and the user interface unit 205. In addition, the control instruction carries key information such as the file name (which can include module model name, software version, etc.), software version, target upgrade object, and download method (used to indicate serial / parallel / automatic download method), etc., to ensure the accuracy and efficiency of the upgrade task.
[0046] In an alternative implementation of this embodiment, the control unit 203 is further configured to collect the download status information of the target upgrade object during the OTA upgrade process through the second communication interface and transmit the download status information to the control unit.
[0047] Specifically, the control unit 203 is dedicated to monitoring the status information of the target upgrade object at each stage during the upgrade process. Its specific functions include: collecting the real-time download progress of the target upgrade object (such as the amount of data downloaded, remaining time, etc.) through the second communication interface, detecting abnormal situations during the data transmission process (such as timeouts, transmission interruptions, or packet losses), and transmitting the complete download status information to the control unit 203 for further processing and feedback to the monitoring device 10. That is, through the control unit 203, the reliability and intelligence level of the program OTA device are enhanced, enabling it to dynamically monitor and handle potential problems in the OTA upgrade process and ensuring the smooth completion of the program upgrade process of the target upgrade object.
[0048] In addition, the control unit 203 in the program OTA device can also confirm the total download percentage according to the number of download modules (the number of power modules in the download process) and the download percentage of the current bin file.
[0049] In an alternative implementation of this embodiment, the process of the control unit downloading with the power module includes multiple key steps to ensure data integrity and download reliability. This process involves the interaction between the OTA device and the object to be downloaded (power module), specifically including key stages such as data header interaction, data download (multi-packet transmission and verification), and data tail interaction.
[0050] Data header interaction stage: Before downloading, the program OTA device first establishes a communication connection with the power module and conducts data header interaction to confirm the basic information of the download task. This stage mainly includes the following contents. The OTA device sends a download request to the power module to request the download of firmware or data. The power module returns confirmation information, including the current software version, available storage space, supported communication protocols, etc. Both parties confirm key information such as the data packet format and transmission protocol to ensure the smooth progress of the download process.
[0051] Data Download (Multi-packet Transmission and Verification) Phase: After confirming the download information, the program OTA device starts to transmit data to the power module in batches. This process uses multi-packet data transmission and performs integrity verification for each data packet to ensure the accuracy of the data. The program OTA device splits the firmware or data into multiple data packets according to the protocol requirements and sends them to the power module one by one. After receiving each data packet, the power module immediately performs data verification (such as CRC verification, hash verification, etc.). If the data packet verification is successful, the power module returns an acknowledgment response and prepares to receive the next data packet. If the data packet verification fails, the OTA device can retransmit the data according to the strategy to ensure that all data is correctly received.
[0052] Data Tail Interaction Phase: When all data packets are successfully transmitted and verified, the program OTA device and the power module perform data tail interaction to ensure the integrity of the entire download process. The program OTA device sends a download completion notification to inform the power module that all data transmissions are complete. The power module performs a final integrity check to confirm that all data is correctly stored. If the check passes, the power module returns a success confirmation message and can choose to immediately apply the new data (such as updating the firmware). If the check fails, the power module can request a re-download or enter the fault recovery mode.
[0053] In an alternative embodiment of this embodiment, the control unit 203 is further configured to detect whether there is a download exception event according to the download status information, determine the abnormal upgrade object when there is a download exception event, re-transmit the OTA upgrade program to the abnormal upgrade object through the second communication interface, and feedback the download exception event to the monitoring device.
[0054] Specifically, the download monitoring unit continuously collects the download status information of the target upgrade object and transmits the information to the control unit. The control unit analyzes the status information to determine whether there is a download exception event, such as: Packet loss: Some data packets are not successfully received. Transmission timeout: The upgrade process does not complete within the expected time. Verification failure: The received data packet is incomplete or damaged. Once an exception event is detected, the control unit confirms the specific abnormal upgrade object and re-transmits the OTA upgrade program to the abnormal upgrade object through the second communication interface to ensure its upgrade is completed. Also, after the exception handling is completed, the control unit feeds back the exception event and its handling result to the monitoring device through the first communication interface, facilitating the user to track the system operation status and the exception handling process.
[0055] It should be noted here that the ways to feedback the download exception event to the monitoring device include two methods: the OTA device actively throwing it up and the monitoring device actively asking.
[0056] Specifically, the active upload of the OTA device means that when an abnormal event occurs during the download process (such as abnormal network connection, download timeout, insufficient storage space, or file verification failure, etc.), the OTA device will actively send abnormal status information to the monitoring device 10 based on a preset policy. For example, after detecting an abnormality, the OTA device can immediately report the error code, abnormal type, and relevant debugging information through the second communication interface B, so that the monitoring device 10 can record it in time and take corresponding processing measures, such as alarming, retrying, or adjusting the download policy. Another way is that the monitoring device actively queries, that is, the monitoring device 10 can periodically or when detecting an abnormal trend, actively send a query request to the OTA device through the second communication interface B, requesting to obtain the current download status and abnormal information. After receiving the query request, the OTA device feeds back information such as the current abnormal status and error details to the monitoring device 10, enabling it to grasp the download abnormality in real time and take appropriate fault recovery measures according to the feedback information, such as triggering a re-download or notifying the maintenance personnel for inspection.
[0057] Through the cooperation of the above two methods, the monitoring device 10 can obtain information about download abnormal events in a timely and efficient manner, thereby improving the stability and fault response ability of the system.
[0058] In an alternative embodiment of the present embodiment, the control unit is further configured to, when detecting a download abnormal event, call a pre-stored OTA upgrade program that is consistent with the OTA upgrade program downloaded for the abnormal upgrade object from the storage unit, and transmit the pre-stored OTA upgrade program to the abnormal upgrade object through the second communication interface.
[0059] Specifically, by using the pre-stored OTA upgrade program in the storage unit, an efficient recovery solution for download abnormalities is provided. At the same time, the call and verification functions of the pre-stored program ensure the reliability of the data, avoiding delays or failures caused by real-time retransmission, thereby strengthening the fault tolerance ability of the OTA device of the program, enabling it to cope with complex and changeable communication environments, and further improving the stability, reliability, and user experience of the system.
[0060] In an alternative embodiment of the present embodiment, in the OTA download process, the download method includes a serial download method or a parallel download method.
[0061] It should be noted here that the serial download method downloads module by module. After downloading, it checks whether the software versions of all modules are updated. Those that are not updated or unresponsive are re-downloaded as abnormal download modules. And the parallel download method downloads through a broadcast method, that is, multiple data blocks or files can be downloaded simultaneously to improve the overall download efficiency.
[0062] Optionally, the control unit is further configured to detect the file size of the OTA upgrade program, calculate the estimated download time based on the file size, determine the serial download mode or the parallel download mode according to the estimated download time, and instruct the target upgrade object to download and perform program upgrade according to the serial download mode or the parallel download mode. That is, the control unit has dynamic download decision-making. When receiving and parsing the OTA upgrade program, it automatically detects the file size of the program and calculates the estimated download time based on the file size and the transmission rate of the current communication interface. Generally, if the file is small and the estimated download time is short, the serial download mode is selected to reduce system complexity and resource occupancy. If the file is large and the estimated download time is long, the parallel download mode is selected to improve the download efficiency. After determining the download mode, a control instruction is generated accordingly, instructing the target upgrade object to download according to the selected download mode and controlling its subsequent upgrade process. Of course, whether to select the serial download or the parallel download mode can also be confirmed through a control command.
[0063] In an alternative embodiment of this embodiment, reference may be made to Figure 3 , the first communication interface A is a USB interface, and the second communication interface B is a CAN interface. That is, the USB interface establishes a communication connection with the monitoring device through the USB transmission protocol, and the CAN interface is connected to the CAN bus between the original monitoring device 10 and the power module to establish a communication connection.
[0064] When the USB interface of the program OTA device obtains the OTA upgrade program transmitted by the monitoring device 10, the program OTA device 20 transmits the OTA upgrade program to the target upgrade object through the CAN interface.
[0065] Specifically, the monitoring device 10 conveniently distributes the program file to the program OTA device 20 through the USB interface. This file transmission method is similar to inserting a USB flash drive into a computer and calling the basic file operating system. The file transmission method is fast, safe and reliable, and at the same time, the development difficulty and workload are small. At the same time, the program OTA device 20 is connected to the CAN bus between the original monitoring device 10 and the power module through the CAN interface (the beneficial effect of this is that the physical wiring change is very small). In this way, the monitoring device 10 can conveniently trigger the program OTA device 20 to download the program to the module through a preset simple instruction, and at the same time, the monitoring device 10 can query the download progress and status of the program OTA device 20 through a simple preset protocol instruction.
[0066] Specifically, the program OTA device 20 has a download process for the built-in power supply module and performs the program download operation for each power supply module. The protocols running between the program OTA device 20 and the power supply module are provided by the module manufacturer, so the manufacturer of the monitoring device does not need to care about the details of the download process between the program OTA device and the power supply module at all. In this way, the OTA function development of the module program can be quickly carried out at the monitoring level, thus shortening the OTA development and debugging time of the entire system cabinet and ensuring the reliability of OTA at the same time.
[0067] In an alternative implementation of this embodiment, refer to Figure 4 , when the USB interface does not obtain the OTA upgrade program transmitted by the monitoring device (or the program OTA device itself does not have a USB interface set), the program OTA device obtains the OTA upgrade program transmitted by the monitoring device through the CAN interface, preprocesses the OTA upgrade program, and then transmits the preprocessed OTA upgrade program to the target upgrade object through the CAN interface.
[0068] Specifically, the program OTA device is only connected to the CAN buses of the monitoring device and the power supply module through the CAN interface. The monitoring device sends program data to the program OTA device through a simple CAN protocol, and then triggers the program OTA device to download to multiple power supply modules. Since the download process between the program OTA device and multiple power supply modules is complex and variable, and the data transmission between the program OTA device and the monitoring device is relatively simple, the development difficulty of the download process can be reduced.
[0069] In an alternative implementation of this embodiment, refer to Figure 5 , the monitoring device is connected to the program OTA device through the USB interface, and the program OTA device is connected to each power supply module through the CAN interface. After the monitoring device transfers a file to the program OTA device through the USB interface, the program OTA device automatically downloads the program to each power supply module through the CAN interface. It can be seen that there is no design of a linear connection between the monitoring device and the program OTA device, which further simplifies the communication logic between the monitoring device and the power supply module. Through means such as protocol shielding, it has brought a significant improvement in system flexibility and efficiency, and is applicable to multi-device and multi-protocol environments.
[0070] In an alternative implementation of this embodiment, refer to Figure 6 , the program OTA device has an offline download mode. The user pre-loads the download program of the module into the program OTA device through a loading method, including but not limited to installing the program to the program OTA device through the computer USB or loading the program to the program OTA device through the computer background; then connect the OTA loading to each module through the CAN bus. As long as the program OTA device is powered on, the program OTA device can start the download process task for the module.
[0071] Specifically, the program OTA device is based on an offline download mode and does not need to be connected to the monitoring device in real time. In this mode, the program OTA device can complete the program download and upgrade tasks of the power module when running independently, enhancing the autonomy and adaptability of the system, and is especially suitable for environments that do not require continuous monitoring or networking.
[0072] In an alternative embodiment of the present embodiment, the program OTA device may further include a plurality of communication interfaces (e.g., a third communication interface, a fourth communication interface, etc.) as output interfaces, and a transmission success rate calculation module that uses the internally integrated communication interfaces. The transmission success rate calculation module uses a preset calculation formula to calculate the transmission success rate R of the OTA upgrade program corresponding to different communication interfaces; where y is a binary output variable, and ω i is the weight value corresponding to Y i The program sending frequency of the monitoring device and the transmission performance indicators of the communication interfaces of the program OTA device respectively correspond to Y1 and Y2.
[0073] Specifically, the transmission success rate calculation module in the program OTA device combines the calculation formula, optimizes the program transmission path by dynamically evaluating and selecting communication interfaces, significantly improves the transmission success rate and operation reliability of the program OTA device, is suitable for complex application environments with multiple interfaces and multiple scenarios, and reflects the intelligence and robustness of the present invention.
[0074] Please refer to Figure 7 , which shows a program OTA method provided by an embodiment of the present invention, applied to the program OTA device of the above embodiments, and specifically includes the following steps:
[0075] Step S701, receive and store the OTA upgrade program transmitted by the monitoring device through the first communication interface;
[0076] Step S702, determine the download mode based on a preset control command or the physical DIP switch value of the user interface module, where the download mode includes a trigger control command download method or an automatic download method;
[0077] Step S702, transmit the target program in the OTA upgrade program to the target upgrade object through the second communication interface according to the determined download mode, so as to trigger the OTA download process of the target upgrade object and perform program upgrade.
[0078] Optionally, after triggering the OTA upgrade program download process of the target upgrade object, detect whether there is a download exception. If there is a download exception, return to the OTA upgrade program download process. If there is no download exception, it indicates that the download is completed.
[0079] Optionally, when in the automatic download mode, if the module model in the file name in the storage unit corresponds to the target module model, the automatic download starts; if it is the trigger control download mode, a control command needs to be received, and a file is selected according to the information in the control command and downloaded to a specific module.
[0080] It should be noted that in the embodiments (methods, steps) of the present application, there are the same or similar descriptions as those in the above-mentioned embodiments (hardware, functions). For the content already described in the above-mentioned embodiments (hardware, functions), the embodiments (methods, steps) of the present application will not be repeated.
[0081] In the program OTA method of the present invention, when the power system is performing program upgrade, the program OTA device receives the OTA upgrade program of the monitoring system through the first communication interface, and transmits the OTA upgrade program to the target upgrade object through the second communication interface. That is, the program OTA device acts as a transfer to handle the logic of OTA upgrade and abnormal download of the power module, completely avoiding the situation of increasing the debugging difficulty caused by the monitoring device and the power module possibly not belonging to the same manufacturer (inconsistent communication transmission protocols), thereby improving the upgrade efficiency and stability of the power module. At the same time, the design of the system simplifies the development and debugging process. The monitoring device does not need to deeply understand the protocol content of each module, reducing the development complexity and saving manpower and time costs. Generally, the present invention improves the efficiency, stability and compatibility of the power system program upgrade, and provides a convenient and reliable OTA upgrade solution for the multi-device and multi-protocol environment.
[0082] Please refer to Figure 8 , which shows the electronic device provided by the embodiment of the present invention. This electronic device can be used to implement the program OTA method in any of the foregoing embodiments. The electronic device includes:
[0083] A memory 801, a processor 802, a bus 803, and a computer program stored on the memory 801 and executable on the processor 802. The memory 801 and the processor 802 are connected through the bus 803. When the processor 802 executes the computer program, the program OTA method in the foregoing embodiment is implemented. Among them, the number of processors can be one or more.
[0084] The memory 801 can be a high-speed random access memory (RAM, Random Access Memory) or a non-volatile memory, such as a disk memory. The memory 801 is used to store executable program code, and the processor 802 is coupled to the memory 801.
[0085] In several embodiments provided by 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 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 between each other can be through some interfaces. The indirect couplings or communication connections of devices or modules can be in electrical, mechanical or other forms.
[0086] 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 this embodiment.
[0087] In addition, the functional modules in each embodiment of the present application can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0088] If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium and includes several instructions to enable 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 methods in each embodiment of the present application. The foregoing readable storage medium includes: USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks, etc., which can store program codes.
[0089] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily all essential to the present application.
[0090] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not elaborated in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0091] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present invention.
Claims
1. A program OTA device, characterized in that, The program OTA device is configured with a first communication interface and a second communication interface; The first communication interface is used to establish a communication connection with the monitoring device through a first communication transmission protocol, and the second communication interface is used to establish communication connections with at least one power module and the monitoring device respectively through a second communication transmission protocol; Wherein, the program OTA device is used to receive the OTA upgrade program transmitted by the monitoring device through the first communication interface in a preset first time period, and receive a control command for triggering a download process through the second communication interface in a preset second time period, determine a target upgrade object from at least one of the power modules according to the control command, and transmit the target program in the OTA upgrade program to the target upgrade object through the second communication interface to instruct the target upgrade object to perform a program upgrade.
2. The program OTA device according to claim 1, wherein When the program OTA device does not receive the control command in the second time period, the program OTA device enters an automatic download mode according to a pre-configured instruction or a preset physical dial value, and the OTA upgrade program based on the automatic download mode transmits the target program in the OTA upgrade program to the target upgrade object through the second communication interface to instruct the target upgrade object to perform a program upgrade.
3. The program OTA device according to claim 1, wherein The program OTA device includes a power supply unit, a communication unit, a control unit, a storage unit and a user interface unit; The power supply unit is used to supply power to the communication unit, the control unit, the storage unit and the user interface unit respectively; The communication unit is used to communicate with the monitoring device through the first communication interface and communicate with at least one of the power modules and the monitoring device through the second communication interface; The control unit is used to determine a target upgrade object and a target program according to the control command and / or the control protocol of the second communication interface, transmit the target program to the target upgrade object through the second communication interface to instruct the target upgrade object to perform a program upgrade according to a preset download method, and feedback the download status information of the target upgrade object to the monitoring device through the second communication interface; The storage unit is used to store the OTA upgrade program; The user interface unit includes an indicator light and a configuration dial. The indicator light is used to indicate the operating state of the program OTA device, and the operating state at least includes an OTA upgrade state, a communication state and a power state; the configuration dial is used for mode or parameter configuration.
4. The program OTA device according to claim 3, characterized in that, The control unit is further used to detect whether there is a download abnormal event according to the download status information. When there is the download abnormal event, determine an abnormal upgrade object, re-transmit the OTA upgrade program to the abnormal upgrade object through the second communication interface, and feedback the download abnormal event to the monitoring device.
5. The program OTA device according to claim 3, wherein The control unit is further configured to, when detecting the download exception event, call a pre-stored OTA upgrade program that is consistent with the OTA upgrade program downloaded corresponding to the exception upgrade object from the storage unit, and transmit the pre-stored OTA upgrade program to the exception upgrade object through the second communication interface.
6. The program OTA device according to claim 3, wherein The download method includes a serial download method or a parallel download method; Wherein, the process of the control unit downloading with the power module at least includes data header interaction, data download, and data tail interaction.
7. The program OTA device according to claim 3, wherein The first communication interface includes a USB interface, and the second communication interface includes a CAN interface; The USB interface is used to establish a communication connection with the monitoring device through the USB transmission protocol. The CAN interface is connected to the CAN bus between the original monitoring device and the power module and establishes a communication connection; When the USB interface obtains the OTA upgrade program transmitted by the monitoring device, the program OTA device transmits the OTA upgrade program to the target upgrade object through the CAN interface; When the USB interface does not obtain the OTA upgrade program transmitted by the monitoring device, the program OTA device obtains the OTA upgrade program transmitted by the monitoring device through the CAN interface, preprocesses the OTA upgrade program, and then transmits the preprocessed OTA upgrade program to the target upgrade object through the CAN interface.
8. A program OTA method, characterized in that, Applied to the program OTA device according to any one of claims 1 to 7, the program OTA method includes: Receiving and storing the OTA upgrade program transmitted by the monitoring device through the first communication interface; Determining the download mode based on a preset control command or the physical DIP switch value of the user interface module, wherein the download mode includes a trigger control command download method or an automatic download method; Transmitting the target program in the OTA upgrade program to the target upgrade object through the second communication interface according to the determined download mode, so as to trigger the target upgrade object to perform the OTA download process and perform program upgrade.
9. An electronic device, characterized in that, Including a memory, a processor, and a bus; The bus is used to realize the connection and communication between the memory and the processor; The processor is used to execute the computer program stored on the memory; When the processor executes the computer program, the steps of the program OTA method according to claim 8 are realized.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps in the program OTA method according to claim 8 are realized.