Method and device for batch upgrading, host equipment, to-be-upgraded equipment and computer readable storage medium
By connecting the diode to the UART serial port reception pin between the host device and the device to be upgraded, limiting the sinking current, and selecting the target device using cyclic redundancy checksum feature information, batch upgrade of smart home appliances is achieved, solving the problem of poor user experience upgrades one by one in the existing technology, and improving the upgrade efficiency and user experience.
Patent Information
- Application Number
- CN202410096446.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-23
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, the main control board program upgrade of smart refrigerators can only be carried out one by one, and batch upgrades cannot be achieved, resulting in inconvenient maintenance and poor user experience.
By connecting the diode between the main UART serial port reception pin of the host device and the slave UART serial port transmission pin of multiple devices to be upgraded, the current is limited, and communication is carried out normally, and the target device is selected for batch upgrade through cyclic redundancy checksum feature information matching.
The batch upgrade of multiple smart home appliances has been realized, which has improved user experience and upgrade efficiency, and has reduced the number of device communications and upgrade time.
Smart Images

Figure CN120371360A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of device upgrade, and for example, relates to a method and device for batch upgrade, a host device, a device to be upgraded, and a computer-readable storage medium. Background Art
[0002] Currently, with the development of mobile Internet and artificial intelligence, smart home appliances have entered people's lives and changed people's lifestyles. As an important part of the home appliance field, refrigerators are inevitably developing towards high-end intelligence. Currently, in order to meet different needs of users, smart refrigerators have more and more functions, including: human-computer interaction function, refrigerator control function, food management function, recipe search function, and audio-visual function, etc., and these functions are all implemented by the firmware in the smart refrigerator system. How to upgrade the refrigerator has become a difficult problem to be solved urgently.
[0003] The related technology discloses that the upgrade methods of the main control board program of the refrigerator are only factory return upgrade and remote upgrade by technicians through networking, which is extremely inconvenient for the maintenance of refrigerator devices. Moreover, it can only upgrade the main control board program of one refrigerator at a time.
[0004] In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related technology:
[0005] When the related technology faces multiple devices that need to be upgraded simultaneously, upgrading them one by one is time-consuming and laborious, and it is difficult to achieve batch upgrade, resulting in poor user experience.
[0006] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0007] To have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. The summary is not a general review, nor is it intended to identify key / important elements or delineate the protection scope of these embodiments, but rather serves as a preface to the subsequent detailed description.
[0008] The embodiments of the present disclosure provide a method and device for batch upgrade, a host device, a device to be upgraded, and a computer-readable storage medium, so as to achieve batch upgrade of multiple devices and improve user experience.
[0009] In some embodiments, the device, characterized in that it is applied to a host device, includes: a main UART serial port receiving pin, which is used to connect to the slave UART serial port transmitting pin of the i-th device to be upgraded through the i-th diode; wherein, the anode of the i-th diode is connected to the main UART serial port receiving pin of the host device, and the cathode is connected to the slave UART serial port transmitting pin of the i-th device to be upgraded; a main UART serial port transmitting pin, which is used to connect to the slave UART serial port receiving pin of the i-th device to be upgraded; wherein, i = 1, 2, …, N; N is a natural number.
[0010] It should be noted that the device to be upgraded can be an intelligent household appliance device such as a refrigerator, a freezer, or an air conditioner.
[0011] Optionally, it further includes: the i-th diode, with the anode connected to the main UART serial port receiving pin of the host device, and the cathode used to connect to the slave UART serial port transmitting pin of the i-th device to be upgraded.
[0012] Optionally, when the device to be upgraded is in the state of being upgraded, the level of the slave UART serial port transmitting pin of the device to be upgraded is low level. When the device to be upgraded is in the non-upgraded state, the level of the slave UART serial port transmitting pin of the device to be upgraded is high level.
[0013] In some embodiments, the device includes: being applied to the device to be upgraded, including: a slave UART serial port transmitting pin, which is used to connect to the main UART serial port receiving pin of the host device; wherein, the anode of the diode is connected to the main UART serial port receiving pin of the host device, and the cathode is connected to the slave UART serial port transmitting pin of the device to be upgraded; a slave UART serial port receiving pin, which is used to connect to the main UART serial port transmitting pin of the host device.
[0014] Optionally, it further includes: a diode, with the anode connected to the main UART serial port receiving pin of the host device, and the cathode connected to the slave UART serial port transmitting pin of the device to be upgraded.
[0015] Optionally, when the device to be upgraded is in the state of being upgraded, the level of the slave UART serial port transmitting pin of the device to be upgraded is low level. When the device to be upgraded is in the non-upgraded state, the level of the slave UART serial port transmitting pin of the device to be upgraded is high level.
[0016] In some embodiments, the method is applied to the aforementioned device and includes: receiving an upgrade file package when the Flash of the host device is successfully erased; determining whether the download is successful according to the cyclic redundancy checksum in the upgrade file package; when the download is successful, selecting target devices to be upgraded from the devices to be upgraded and sequentially sending the upgrade file package to multiple target devices to be upgraded, so as to implement sequential batch upgrade of multiple target devices to be upgraded according to the cyclic redundancy checksum in the upgrade file package; wherein, the feature information of the target device to be upgraded is the same as the feature information in the upgrade file package.
[0017] Optionally, determining whether the download is successful according to the cyclic redundancy checksum in the upgrade file package includes: calculating a reference checksum according to the upgrade program in the upgrade file package and writing it into the Flash; controlling the Flash to read the cyclic redundancy checksum in the upgrade file package; determining that the download is successful when the reference checksum written in the Flash is consistent with the read cyclic redundancy checksum; or, determining that the download fails when the reference checksum written in the Flash is inconsistent with the read cyclic redundancy checksum.
[0018] Optionally, the feature information includes one or more of the following: device machine code, hardware version number, code start address, code end address.
[0019] Optionally, the feature information of the target device to be upgraded being the same as the feature information in the upgrade file package includes: the device machine code of the target device to be upgraded being the same as the device machine code in the upgrade file package; and, the hardware version number of the target device to be upgraded being the same as the hardware version number in the upgrade file package; and, the code start address of the target device to be upgraded being the same as the code start address in the upgrade file package; and, the code end address of the target device to be upgraded being the same as the code end address in the upgrade file package.
[0020] Optionally, sequentially sending the upgrade file package to multiple target devices to be upgraded according to the cyclic redundancy checksum in the upgrade file package includes: determining whether the previous target device to be upgraded has been successfully downloaded according to the cyclic redundancy checksum in the upgrade file package; when the previous target device to be upgraded has been successfully downloaded, upgrading the previous target device to be upgraded through the upgrade program in the upgrade file package and sending the upgrade file package to the next target device to be upgraded; when the previous target device to be upgraded has failed to be downloaded, the previous target device to be upgraded abandons the upgrade and sends the upgrade file package to the next target device to be upgraded.
[0021] Optionally, determining whether the previous target device to be upgraded is successfully downloaded according to the cyclic redundancy checksum in the upgrade file package includes: determining that the previous target device to be upgraded is successfully downloaded when the cyclic redundancy checksum in the upgrade file package is consistent with the reference checksum; determining that the previous target device to be upgraded fails to be downloaded when the cyclic redundancy checksum in the upgrade file package is inconsistent with the reference checksum; wherein, the reference checksum is calculated by the previous target disk device to be upgraded based on the upgrade program in the upgrade file package.
[0022] In some embodiments, the method applied to the device includes: receiving an upgrade package file sent by a host device when the device to be upgraded is determined to be a target device to be upgraded and the previous target device to be upgraded has completed the upgrade or abandoned the upgrade; determining whether the download is successful according to the cyclic redundancy check code in the upgrade file package; and when the download is successful, upgrading through the upgrade program in the upgrade file package and sending an instruction to upgrade the next target device to be upgraded to the host device; wherein, determining that the device to be upgraded is a target device to be upgraded includes that the characteristic information of the device to be upgraded is the same as the characteristic information in the upgrade file package; the upgrade file package is sent to the target device to be upgraded by the host device when the Flash is successfully erased and it is determined whether the download is successful according to the cyclic redundancy checksum in the upgrade file package and the download is successful.
[0023] Optionally, the characteristic information of the device to be upgraded being the same as the characteristic information in the upgrade file package includes: the device machine code of the device to be upgraded being the same as the device machine code in the upgrade file package; the hardware version number of the device to be upgraded being the same as the hardware version number in the upgrade file package; the code start address of the device to be upgraded being the same as the code start address in the upgrade file package; and the code end address of the device to be upgraded being the same as the code end address in the upgrade file package.
[0024] Optionally, determining whether the download is successful according to the cyclic redundancy check code in the upgrade file package includes: calculating a reference checksum based on the upgrade program in the upgrade file package and writing it to the main control board; the main control board reads the cyclic redundancy checksum in the upgrade file package; determining that the download is successful when the reference checksum written by the main control board is consistent with the cyclic redundancy checksum read; or determining that the download fails when the reference checksum written by the main control board is inconsistent with the cyclic redundancy checksum read.
[0025] Optionally, after determining that the download fails, it further includes: abandoning the upgrade and sending an instruction to upgrade the next target device to be upgraded to the host device.
[0026] Optionally, the characteristic information includes one or more of the following: device machine code, hardware version number, code start address, code end address.
[0027] In some embodiments, the device includes a processor and a memory storing program instructions, and the processor is configured to execute the method for batch upgrade when running the program instructions.
[0028] In some embodiments, the host device includes: a host device body; a device for batch upgrade, which is installed on the host device body and includes a processor and a memory storing program instructions, and the processor is configured to execute the method for batch upgrade when running the program instructions.
[0029] In some embodiments, the device to be upgraded includes: a device to be upgraded body; a device for batch upgrade, which includes a processor and a memory storing program instructions, and the processor is configured to execute the method for batch upgrade when running the program instructions.
[0030] In some embodiments, the computer-readable storage medium stores program instructions, and when the program instructions are running, the computer is caused to execute the method for batch upgrade
[0031] The method and device for batch upgrade, host device, device to be upgraded, and computer-readable storage medium provided by the embodiments of the present disclosure can achieve the following technical effects:
[0032] By connecting the main UART serial port receiving pin of the host device and the slave UART serial port sending pins of multiple devices to be upgraded through diodes respectively, the diode limits the sink current between the main UART serial port receiving pin of the host device and the slave UART serial port sending pins of multiple devices to be upgraded, so that the sink current is limited within a range equivalent to an open circuit. If the slave UART serial port sending pin of the device to be upgraded being upgraded is at a low level and the slave UART serial port sending pin of the device to be upgraded not yet upgraded is at a high level, since the current will not flow from the slave UART serial port sending pin of the device to be upgraded not yet upgraded into the slave UART serial port sending pin of the device to be upgraded being upgraded, the problem that the low level of the slave UART serial port sending pin of the device to be upgraded being upgraded rises will not be caused. Since the UART serial port sending pin uses a low level as the flag for sending information, and the main UART serial port receiving pin of the host device is in a pull-up input state and does not affect the high-level sampling, the normal communication between the slave UART serial port sending pin of the device to be upgraded being upgraded and the main UART serial port receiving pin of the host device is guaranteed. And the main UART serial port sending pin of the host device is connected to the slave UART serial port receiving pins of multiple devices to be upgraded, thereby realizing the normal communication between the main UART serial port sending pin of the host device and the slave UART serial port receiving pins of multiple devices to be upgraded. In this way, it is beneficial to realize the batch upgrade of multiple devices and improve the user experience.
[0033] The above general description and the following description are only exemplary and explanatory, and are not used to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] One or more embodiments are exemplarily illustrated by corresponding drawings. These exemplary illustrations and the drawings do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements. The drawings do not constitute a scale limitation, and in which:
[0035] Figure 1 is a device for batch upgrade provided by an embodiment of the present disclosure;
[0036] Figure 2 is another device for batch upgrade provided by an embodiment of the present disclosure;
[0037] Figure 3 is a schematic diagram of a method for batch upgrade provided by an embodiment of the present disclosure;
[0038] Figure 4 is a schematic diagram of another method for batch upgrade provided by an embodiment of the present disclosure;
[0039] Figure 5 is an application schematic diagram of an embodiment of the present disclosure;
[0040] Figure 6 is a schematic diagram of a device for batch upgrade provided by an embodiment of the present disclosure;
[0041] Figure 7 is a schematic diagram of a host device provided by an embodiment of the present disclosure;
[0042] Figure 8 is a schematic diagram of a device to be upgraded provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0043] In order to more fully understand the features and technical content of the embodiments of the present disclosure, the implementation of the embodiments of the present disclosure will be described in detail below with reference to the drawings. The attached drawings are for reference and illustration only, and are not used to limit the embodiments of the present disclosure. In the following technical description, for the sake of explanation, numerous details are provided to give a thorough understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be shown in a simplified manner to simplify the drawings.
[0044] In the description, claims and above-mentioned drawings of the embodiments of the present disclosure, the terms "first", "second", etc. are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so as to implement the embodiments of the present disclosure described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion.
[0045] Unless otherwise specified, the term "plurality" means two or more.
[0046] In the embodiments of the present disclosure, the character " / " indicates that the front and rear objects are in an "or" relationship. For example, A / B means: A or B.
[0047] The term "and / or" is an associative relationship describing an object and indicates that three relationships can exist. For example, A and / or B means: A or B, or, A and B, these three relationships.
[0048] The term "corresponding" may refer to an associative relationship or a binding relationship. A corresponding to B means that there is an associative relationship or a binding relationship between A and B.
[0049] Combined Figure 1 As shown, the embodiments of the present disclosure provide a device 1 for batch upgrade, which is applied to a host device and includes: a main UART (Universal Asynchronous Receiver / Transmitter) serial port receiving pin 11 and a main UART serial port transmitting pin 12. The main UART serial port receiving pin 11 is used to connect to the slave UART serial port transmitting pin of the i-th device to be upgraded through the i-th diode 13. Wherein, the anode of the i-th diode 13 is connected to the main UART serial port receiving pin 11 of the host device, and the cathode is connected to the slave UART serial port transmitting pin of the i-th device to be upgraded. The main UART serial port transmitting pin 12 is used to connect to the slave UART serial port receiving pin of the i-th device to be upgraded. Wherein, i = 1, 2..., N. N is a natural number.
[0050] Using the device 1 for batch upgrade provided by the embodiments of the present disclosure, by connecting the receiving pin 11 of the main UART serial port of the host device and the transmitting pins of the slave UART serial ports of multiple devices to be upgraded through diodes 13 respectively, the sink current between the receiving pin 11 of the main UART serial port of the host device and the transmitting pins of the slave UART serial ports of multiple devices to be upgraded is restricted by the diodes 13, so that the sink current is restricted within a range equivalent to an open circuit. If the transmitting pin of the slave UART serial port of the device to be upgraded being upgraded is at a low level and the transmitting pin of the slave UART serial port of the device to be upgraded not yet upgraded is at a high level, since the current will not flow from the transmitting pin of the slave UART serial port of the device to be upgraded not yet upgraded into the transmitting pin of the slave UART serial port of the device to be upgraded being upgraded, the problem that the low level of the transmitting pin of the slave UART serial port of the device to be upgraded being upgraded rises will not be caused. Since the UART serial port transmitting pin uses the low level as the flag for transmitting information and the receiving pin 11 of the main UART serial port of the host device is in a pull-up input state and does not affect the high-level sampling, the normal communication between the transmitting pin of the slave UART serial port of the device to be upgraded being upgraded and the receiving pin of the main UART serial port of the host device is ensured. And the transmitting pin 12 of the main UART serial port of the host device is connected to the receiving pins of the slave UART serial ports of multiple devices to be upgraded, so as to realize the normal communication between the transmitting pin 12 of the main UART serial port of the host device and the receiving pins of the slave UART serial ports of multiple devices to be upgraded. In this way, it is beneficial to realize the batch upgrade of multiple devices and improve the user experience.
[0051] Optionally, it further includes: the i-th diode 13. The anode of the i-th diode 13 is connected to the receiving pin 11 of the main UART serial port of the host device, and the cathode is used to be connected to the transmitting pin of the slave UART serial port of the i-th device to be upgraded.
[0052] In this way, the sinking current between the main UART serial port receiving pin 11 of the host device and the slave UART serial port transmitting pins of multiple devices to be upgraded is restricted by the diode 13, so that the sinking current is restricted within a range equivalent to an open circuit. If the slave UART serial port transmitting pin of the device to be upgraded being upgraded is at a low level and the slave UART serial port transmitting pin of the device to be upgraded not being upgraded is at a high level, since the current will not flow from the slave UART serial port transmitting pin of the device to be upgraded not being upgraded into the slave UART serial port transmitting pin of the device to be upgraded being upgraded, the problem that the low level of the slave UART serial port transmitting pin of the device to be upgraded being upgraded rises will not be caused. Since the UART serial port transmitting pin uses the low level as the flag for transmitting information and the main UART serial port receiving pin 11 of the host device is in a pull-up input state and does not affect the high-level sampling, the normal communication between the slave UART serial port transmitting pin of the device to be upgraded being upgraded and the main UART serial port receiving pin 11 of the host device is ensured. Thus, the batch upgrade of multiple devices is realized, improving the user experience.
[0053] Optionally, when the device to be upgraded is in the state of being upgraded, the level of the slave UART serial port transmitting pin of the device to be upgraded is at a low level. When the device to be upgraded is in the state of not being upgraded, the level of the slave UART serial port transmitting pin of the device to be upgraded is at a high level.
[0054] In this way, since the UART serial port transmitting pin uses the low level as the flag for transmitting information and the main UART serial port receiving pin 11 of the host device is in a pull-up input state and does not affect the high-level sampling, the normal communication between the slave UART serial port transmitting pin of the device to be upgraded being upgraded and the main UART serial port 11 of the host device is ensured. Thus, the batch upgrade of multiple devices is realized, improving the user experience.
[0055] Combined with Figure 2 As shown in the figure, another device 2 for batch upgrade provided by an embodiment of the present disclosure is applied to the device to be upgraded and includes: a slave UART serial port transmitting pin 22 and a slave UART serial port receiving pin connection 21. The slave UART serial port transmitting pin 22 is used to be connected to the main UART serial port receiving pin of the host device. Wherein, the anode of the diode 23 is connected to the main UART serial port receiving pin of the host device, and the cathode is connected to the slave UART serial port transmitting pin 22 of the device to be upgraded. The slave UART serial port receiving pin connection 21 is used to be connected to the main UART serial port transmitting pin of the host device.
[0056] Using the device for batch upgrade provided by the embodiments of the present disclosure, by connecting the receiving pin of the main UART serial port of the host device and the transmitting pins 22 of the slave UART serial ports of multiple devices to be upgraded respectively through diodes 23, the sink current between the receiving pin of the main UART serial port of the host device and the transmitting pins 22 of the slave UART serial ports of multiple devices to be upgraded is limited by the diodes 23, so that the sink current is limited within a range equivalent to an open circuit. If the transmitting pin 22 of the slave UART serial port of the device to be upgraded being upgraded is at a low level and the transmitting pin 22 of the slave UART serial port of the device to be upgraded not being upgraded is at a high level, since the current will not flow from the transmitting pin 22 of the slave UART serial port of the device to be upgraded not being upgraded into the transmitting pin 22 of the slave UART serial port of the device to be upgraded being upgraded, the problem that the low level of the transmitting pin 22 of the slave UART serial port of the device to be upgraded being upgraded rises will not be caused. Since the UART serial port transmitting pin uses the low level as the flag for transmitting information, and the receiving pin of the main UART serial port of the host device is in a pull-up input state and does not affect the high-level sampling, the normal communication between the transmitting pin 22 of the slave UART serial port of the device to be upgraded being upgraded and the main UART serial port of the host device is ensured. And the transmitting pin of the main UART serial port of the host device is connected to the receiving pins 21 of the slave UART serial ports of multiple devices to be upgraded, so as to realize the normal communication between the transmitting pin of the main UART serial port of the host device and the receiving pins 21 of the slave UART serial ports of multiple devices to be upgraded. In this way, it is beneficial to realize the batch upgrade of multiple devices and improve the user experience.
[0057] Optionally, it further includes: a diode 23, the anode of which is connected to the receiving pin of the main UART serial port of the host device, and the cathode of which is connected to the transmitting pin 22 of the slave UART serial port of the device to be upgraded.
[0058] In this way, the sink current between the receiving pin of the main UART serial port of the host device and the transmitting pins 22 of the slave UART serial ports of multiple devices to be upgraded is limited by the diode 23, so that the sink current is limited within a range equivalent to an open circuit. If the transmitting pin 22 of the slave UART serial port of the device to be upgraded being upgraded is at a low level and the transmitting pin 22 of the slave UART serial port of the device to be upgraded not being upgraded is at a high level, since the current will not flow from the transmitting pin 22 of the slave UART serial port of the device to be upgraded not being upgraded into the transmitting pin 22 of the slave UART serial port of the device to be upgraded being upgraded, the problem that the low level of the transmitting pin 22 of the slave UART serial port of the device to be upgraded being upgraded rises will not be caused. Since the UART serial port transmitting pin uses the low level as the flag for transmitting information, and the receiving pin of the main UART serial port of the host device is in a pull-up input state and does not affect the high-level sampling, the normal communication between the transmitting pin 22 of the slave UART serial port of the device to be upgraded being upgraded and the main UART serial port of the host device is ensured. Thus, the batch upgrade of multiple devices is realized and the user experience is improved.
[0059] Optionally, when the device to be upgraded is in the upgrading state, the level of the slave UART serial port transmission pin 22 of the device to be upgraded is low. When the device to be upgraded is in the non-upgraded state, the level of the slave UART serial port transmission pin 22 of the device to be upgraded is high.
[0060] In this way, since the UART serial port transmission pin uses the low level as the flag for sending information, and the main UART serial port receiving pin of the host device is in the pull-up input state and does not affect the high-level sampling, the normal communication between the slave UART serial port transmission pin 22 of the device to be upgraded during the upgrade and the main UART serial port of the host device is ensured. Thus, the batch upgrade of multiple devices is realized, improving the user experience.
[0061] Combined with Figure 1 and Figure 3 as shown, an embodiment of the present disclosure provides a method for batch upgrade, including:
[0062] S301, when the Flash of the host device is successfully erased, the device for batch upgrade receives the upgrade file package.
[0063] S302, the device for batch upgrade determines whether the download is successful according to the cyclic redundancy checksum in the upgrade file package.
[0064] S303, when the download is successful, the device for batch upgrade selects the target device to be upgraded from the devices to be upgraded, and sequentially sends the upgrade file package to multiple target devices to be upgraded, so as to realize the sequential batch upgrade of multiple target devices to be upgraded according to the cyclic redundancy checksum in the upgrade file package.
[0065] Wherein, the characteristic information of the target device to be upgraded is the same as the characteristic information in the upgrade file package.
[0066] By using the method for batch upgrade provided in the embodiments of the present disclosure, on the basis of the hardware structure for batch upgrading devices by connecting the receiving pin of the main UART serial port of the host device and the transmitting pins of the slave UART serial ports of multiple devices to be upgraded through diodes respectively, it is determined whether the download is successful according to the cyclic redundancy checksum in the upgrade file package. This is beneficial for the host device to obtain the upgrade file package more accurately. If the download is successful, the target devices to be upgraded are selected from the devices to be upgraded that have the same feature information as the feature information in the upgrade file package, which is beneficial for more accurately batch-selecting the devices to be upgraded that match the feature information of the upgrade file package. And sending the upgrade file package to the target devices to be upgraded is beneficial for accurately and batch-sending the upgrade file package to the matching target devices to be upgraded, enabling the target devices to be upgraded to achieve sequential batch upgrading of multiple target devices according to the cyclic redundancy checksum in the upgrade file package. In this way, it is beneficial to achieve batch upgrading of multiple devices and improve the user experience.
[0067] Optionally, the device for batch upgrade determines whether the download is successful according to the cyclic redundancy checksum in the upgrade file package, including: the device for batch upgrade calculates a reference checksum based on the upgrade program in the upgrade file package and writes it into the Flash (Flash EEPROM Memory). The device for batch upgrade controls the Flash to read the cyclic redundancy checksum in the upgrade file package. When the reference checksum written by the Flash and the cyclic redundancy checksum read are consistent, the device for batch upgrade determines that the download is successful. Or, when the reference checksum written by the Flash and the cyclic redundancy checksum read are inconsistent, the device for batch upgrade determines that the download fails.
[0068] In this way, a reference checksum is calculated based on the upgrade program in the upgrade file package and written into the Flash, and the Flash reads the cyclic redundancy checksum in the upgrade file package. If the Flash reads the same as it writes, it means the download is successful; if not, it means the download fails.
[0069] Optionally, the feature information includes one or more of the following: device machine code, hardware version number, code start address, code end address.
[0070] In this way, only relying on the device machine code, hardware version number, code start address, and code end address as the selection criteria for the target devices to be upgraded, without judging the software information of the devices to be upgraded, the target devices to be upgraded can be quickly selected, reducing the communication times with the devices to be upgraded, thus saving the time for batch upgrading of the devices and improving the efficiency of batch upgrading of the devices, and improving the user experience.
[0071] Optionally, the feature information of the target device to be upgraded is the same as the feature information in the upgrade file package, including: the device machine code of the target device to be upgraded is the same as the device machine code in the upgrade file package; and, the hardware version number of the target device to be upgraded is the same as the hardware version number in the upgrade file package; and, the code start address of the target device to be upgraded is the same as the code start address in the upgrade file package; and, the code end address of the target device to be upgraded is the same as the code end address in the upgrade file package.
[0072] In this way, by relying solely on the selection criteria that the device machine code, hardware version number, code start address, and code end address are the same as those in the upgrade file package for the target device to be upgraded, it is possible to quickly select the target device to be upgraded without judging the software information of the device to be upgraded, reducing the number of communications with the device to be upgraded, thus saving the time for batch device upgrade, improving the efficiency of batch device upgrade, and enhancing the user experience.
[0073] Optionally, the device for batch upgrade sends the upgrade file package to multiple target devices to be upgraded in sequence according to the cyclic redundancy checksum in the upgrade file package, including: the device for batch upgrade determines whether the previous target device to be upgraded has been successfully downloaded according to the cyclic redundancy checksum in the upgrade file package. When the previous target device to be upgraded has been successfully downloaded, the device for batch upgrade upgrades the previous target device to be upgraded through the upgrade program in the upgrade file package and sends the upgrade file package to the next target device to be upgraded. When the previous target device to be upgraded fails to be downloaded, the previous target device to be upgraded abandons the upgrade and sends the upgrade file package to the next target device to be upgraded.
[0074] In this way, when the upgrade file package of the target device to be upgraded is successfully downloaded, if the previous target device to be upgraded is successfully upgraded, the next target device to be upgraded is upgraded; if the previous target device to be upgraded fails to be upgraded, then the target device to be upgraded is skipped and the next target device to be upgraded is directly upgraded. This is beneficial for saving the time for batch device upgrade, improving the efficiency of batch device upgrade, and enhancing the user experience.
[0075] Optionally, the device for batch upgrade determines whether the previous target device to be upgraded has been successfully downloaded according to the cyclic redundancy checksum in the upgrade file package, including: the device for batch upgrade determines that the previous target device to be upgraded has been successfully downloaded when the cyclic redundancy checksum in the upgrade file package is consistent with the reference checksum. The device for batch upgrade determines that the previous target device to be upgraded has failed to be downloaded when the cyclic redundancy checksum in the upgrade file package is inconsistent with the reference checksum. Among them, the reference checksum is calculated by the previous target disk to be upgraded according to the upgrade program in the upgrade file package.
[0076] In this way, the target device to be upgraded reads the cyclic redundancy checksum in the upgrade file package and the reference checksum written through the upgrade program. If they are the same, it is determined that the target upgrade device has been successfully downloaded. If they are different, it is determined that the target upgrade device has failed to download. This is beneficial to making the upgrade process more accurate.
[0077] Combined with Figure 2 and Figure 4 As shown, another method for batch upgrade provided by the embodiments of the present disclosure includes:
[0078] S401. When the device for batch upgrade determines that the device to be upgraded is the target device to be upgraded and the previous target device to be upgraded has completed the upgrade or abandoned the upgrade, it receives the upgrade package file sent by the host device.
[0079] S402. The device for batch upgrade determines whether the download is successful according to the cyclic redundancy check code in the upgrade file package.
[0080] S403. When the download is successful, the device for batch upgrade upgrades through the upgrade program in the upgrade file package and sends an instruction to upgrade the next target device to be upgraded to the host device.
[0081] Among them, the device to be upgraded is determined as the target device to be upgraded, including that the characteristic information of the device to be upgraded is the same as the characteristic information in the upgrade file package. The upgrade file package is sent to the target device to be upgraded by the host device when the Flash erasure is successful and determines whether the download is successful according to the cyclic redundancy checksum in the upgrade file package.
[0082] By using the method for batch upgrade provided by the embodiments of the present disclosure, on the basis of the hardware structure for batch upgrading devices by connecting the main UART serial port receiving pin of the host device and the slave UART serial port sending pins of multiple devices to be upgraded through diodes respectively, after being determined as the target device to be upgraded, if the download is successful, the device to be upgraded with the same characteristic information as that in the upgrade file package is selected as the target device to be upgraded, which is beneficial to more accurately batch-selecting the devices to be upgraded that match the characteristic information in the upgrade file package. Determining whether the download is successful according to the cyclic redundancy checksum in the upgrade file package is beneficial to enabling the device to be upgraded to obtain the upgrade file package more accurately. And the target device to be upgraded receives the upgrade file package one by one, which is beneficial to precisely and batch-sending the upgrade file package to the matching target devices to be upgraded, enabling the target devices to be upgraded to sequentially batch-upgrade multiple target devices according to the cyclic redundancy checksum in the upgrade file package. In this way, it is beneficial to realizing the batch upgrade of multiple devices and improving the user experience.
[0083] Optionally, the feature information includes one or more of the following: device machine code, hardware version number, code start address, and code end address.
[0084] In this way, by relying only on the device machine code, hardware version number, code start address, and code end address as the selection criteria for the target device to be upgraded, without having to judge the software information of the device to be upgraded, the target device to be upgraded can be quickly selected, reducing the number of communications with the device to be upgraded, thus saving the time for batch device upgrade, improving the efficiency of batch device upgrade, and enhancing the user experience.
[0085] Optionally, the feature information of the device to be upgraded is the same as that in the upgrade file package, including: the device machine code of the device to be upgraded is the same as that in the upgrade file package; the hardware version number of the device to be upgraded is the same as that in the upgrade file package; the code start address of the device to be upgraded is the same as that in the upgrade file package; and the code end address of the device to be upgraded is the same as that in the upgrade file package.
[0086] In this way, by relying only on the device machine code, hardware version number, code start address, and code end address that are the same as those in the upgrade file package as the selection criteria for the target device to be upgraded, without having to judge the software information of the device to be upgraded, it can be quickly determined as the target device to be upgraded, reducing the number of communications with the host device, thus saving the time for batch device upgrade, improving the efficiency of batch device upgrade, and enhancing the user experience.
[0087] Optionally, it is determined whether the download is successful according to the cyclic redundancy check code in the upgrade file package, including: the device for batch upgrade calculates a reference checksum based on the upgrade program in the upgrade file package and writes it to the main control board; the main control board of the device for batch upgrade reads the cyclic redundancy checksum in the upgrade file package; the device for batch upgrade determines that the download is successful when the reference checksum written by the main control board is consistent with the read cyclic redundancy checksum; or, the device for batch upgrade determines that the download fails when the reference checksum written by the main control board is inconsistent with the read cyclic redundancy checksum.
[0088] In this way, a reference checksum is calculated based on the upgrade program in the upgrade file package and written; and the cyclic redundancy checksum in the upgrade file package is read. If the read and the written are the same, it means the download is successful, and if they are different, it means the download fails.
[0089] Optionally, after determining that the download fails, it further includes: the device for batch upgrade abandons the upgrade and sends an instruction to upgrade the next target device to be upgraded to the host device.
[0090] In this way, when the upgrade file package of the target device to be upgraded is successfully downloaded, if the previous target device to be upgraded is upgraded successfully, the next target device to be upgraded is upgraded; if the previous target device to be upgraded fails to be upgraded, the target device to be upgraded is skipped, and the next target device to be upgraded is directly upgraded. This helps save the time for batch device upgrades, improve the efficiency of batch device upgrades, and enhance the user experience.
[0091] In practical applications, as Figure 5 shown, an embodiment of the present disclosure provides a method for batch upgrade, including:
[0092] S501. When the Flash of the host device is successfully erased, the host device receives an upgrade file package.
[0093] S502. The host device determines whether the download is successful according to the cyclic redundancy checksum in the upgrade file package.
[0094] S503. When the download is successful, the host device selects a target device to be upgraded from the devices to be upgraded.
[0095] S504. The host device sequentially sends the upgrade file package to multiple target devices to be upgraded, so as to implement sequential batch upgrades of multiple target devices according to the cyclic redundancy checksum in the upgrade file package.
[0096] S505. When the device to be upgraded is determined to be a target device to be upgraded, and the previous target device to be upgraded has completed the upgrade or abandoned the upgrade, the device to be upgraded receives the upgrade package file sent by the host device.
[0097] S506. The device to be upgraded determines whether the download is successful according to the cyclic redundancy check code in the upgrade file package.
[0098] S507. When the download is successful, the device to be upgraded is upgraded through the upgrade program in the upgrade file package.
[0099] S508. The device to be upgraded sends an instruction to upgrade the next target device to be upgraded to the host device.
[0100] Among them, the device to be upgraded is determined to be a target device to be upgraded, including that the characteristic information of the device to be upgraded is the same as the characteristic information in the upgrade file package. The upgrade file package is sent to the target device to be upgraded by the host device when the Flash is successfully erased and it is determined that the download is successful according to the cyclic redundancy checksum in the upgrade file package.
[0101] By adopting the method for batch upgrade provided by the embodiments of the present disclosure, on the basis of the hardware structure for batch upgrading devices achieved by connecting the receiving pin of the main UART serial port of the host device and the transmitting pins of the slave UART serial ports of multiple devices to be upgraded through diodes respectively, after a device to be upgraded is determined as the target device to be upgraded, if the download is successful, the device to be upgraded with the same feature information as that in the upgrade file package is selected as the target device to be upgraded, which is beneficial to more accurately batch-selecting the devices to be upgraded that match the feature information of the upgrade file package. Whether the download is successful is determined according to the cyclic redundancy checksum in the upgrade file package, which is beneficial to enabling the devices to be upgraded to obtain the upgrade file package more accurately. And the target devices to be upgraded receive the upgrade file package one by one, which is beneficial to accurately and batch-sending the upgrade file package to the matching target devices to be upgraded, enabling the target devices to be upgraded to achieve sequential batch upgrade of multiple target devices according to the cyclic redundancy checksum in the upgrade file package. In this way, it is beneficial to achieve batch upgrade of multiple devices and improve the user experience.
[0102] Combined with Figure 6 As shown in the figure, the embodiments of the present disclosure provide a device 70 for batch upgrade, including a processor 700 and a memory 701. Optionally, the device 70 may further include a communication interface 702 and a bus 703. Among them, the processor 700, the communication interface 702, and the memory 701 can complete mutual communication through the bus 703. The communication interface 702 can be used for information transmission. The processor 700 can call the logical instructions in the memory 701 to execute the method for batch upgrade in the above embodiments.
[0103] In addition, when the logical instructions in the above-mentioned memory 701 are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium.
[0104] The memory 701, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the methods in the embodiments of the present disclosure. The processor 700 executes functional applications and data processing by running the program instructions / modules stored in the memory 701, that is, implements the method for batch upgrade in the above embodiments.
[0105] The memory 701 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 701 may include a high-speed random access memory and may also include a non-volatile memory.
[0106] Combined withFigure 7 As shown, an embodiment of the present disclosure provides a host device 100, including: a host device body, and the above-mentioned device 70 for batch upgrade. The device 70 for batch upgrade is installed on the host device body. The installation relationship described here is not limited to being placed inside the host device body, but also includes installation connections with other components of the host device 100, including but not limited to physical connection, electrical connection, or signal transmission connection, etc. Those skilled in the art can understand that the device 70 for batch upgrade can be adapted to a feasible host device body, thereby implementing other feasible embodiments.
[0107] Combined with Figure 8 As shown, an embodiment of the present disclosure provides an equipment to be upgraded 200, including: an equipment to be upgraded body, and the above-mentioned device 70 for batch upgrade. The device 70 for batch upgrade is installed on the equipment to be upgraded body. The installation relationship described here is not limited to being placed inside the equipment to be upgraded body, but also includes installation connections with other components of the equipment to be upgraded 200, including but not limited to physical connection, electrical connection, or signal transmission connection, etc. Those skilled in the art can understand that the device 70 for batch upgrade can be adapted to a feasible equipment to be upgraded body, thereby implementing other feasible embodiments.
[0108] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, and the computer-executable instructions are set to execute the above-mentioned method for batch upgrade.
[0109] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The foregoing storage medium may be a non-transitory storage medium, such as: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc, etc., which are various media that can store program codes.
[0110] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure, enabling those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, process, and other changes. The embodiments merely represent possible variations. Unless explicitly required, individual components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terms used in this application are only for describing the embodiments and do not limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to also include the plural forms. Similarly, as used in this application, the term "and / or" refers to any and all possible combinations of one or more of the associated listed items. Additionally, when used in this application, the term "comprise" and its variants "comprises" and / or "comprising" etc. mean the presence of the stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or groups of these. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the process, method, or apparatus comprising the element. In this document, what each embodiment focuses on can be the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, the relevant parts can refer to the description of the method part.
[0111] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner can depend on the specific application and design constraints of the technical solution. The technician can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the embodiments of the present disclosure. The technician can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0112] In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units can be merely a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Additionally, the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms. The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to implement this embodiment. Additionally, in the embodiments of the present disclosure, the various functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0113] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the blocks can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, which can depend on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks can also occur in a different order than that disclosed in the description. Sometimes, there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, which can depend on the functions involved. Each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. An apparatus for batch upgrade, characterized in that, Applied to a host device, including: The main UART serial port receiving pin is used to connect to the slave UART serial port transmitting pin of the i-th device to be upgraded through the i-th diode; wherein, the anode of the i-th diode is connected to the main UART serial port receiving pin of the host device, and the cathode is connected to the slave UART serial port transmitting pin of the i-th device to be upgraded; The main UART serial port transmitting pin is used to connect to the slave UART serial port receiving pin of the i-th device to be upgraded; wherein, i = 1, 2…, N; N is a natural number.
2. An apparatus for batch upgrade, characterized in that, Applied to a device to be upgraded, including: The slave UART serial port transmitting pin is used to connect to the main UART serial port receiving pin of the host device; wherein, the anode of the diode is connected to the main UART serial port receiving pin of the host device, and the cathode is connected to the slave UART serial port transmitting pin of the device to be upgraded; The slave UART serial port receiving pin connection is used to connect to the main UART serial port transmitting pin of the host device.
3. A method for batch upgrade, characterized in that, Applied to the device according to claim 1, including: When the Flash of the host device is successfully erased, receive the upgrade file package; Determine whether the download is successful according to the cyclic redundancy checksum in the upgrade file package; When the download is successful, select the target device to be upgraded from the devices to be upgraded, and sequentially send the upgrade file package to multiple target devices to be upgraded, so as to realize the sequential batch upgrade of multiple target devices to be upgraded according to the cyclic redundancy checksum in the upgrade file package; wherein, the characteristic information of the target device to be upgraded is the same as the characteristic information in the upgrade file package.
4. The method according to claim 3, wherein Determine whether the download is successful according to the cyclic redundancy checksum in the upgrade file package, including: Calculate the reference checksum according to the upgrade program in the upgrade file package and write it into the Flash; Control the Flash to read the cyclic redundancy checksum in the upgrade file package; When the reference checksum written in the Flash is consistent with the read cyclic redundancy checksum, determine that the download is successful; or, When the reference checksum written in the Flash is inconsistent with the read cyclic redundancy checksum, determine that the download fails.
5. A method for batch upgrade, characterized in that, Applied to the device according to claim 2, including: When the device to be upgraded is determined to be the target device to be upgraded, and the previous target device to be upgraded has completed the upgrade or abandoned the upgrade, receive the upgrade package file sent by the host device; Determine whether the download is successful according to the cyclic redundancy check code in the upgrade file package; When the download is successful, upgrade through the upgrade program in the upgrade file package and send an instruction to upgrade the next target device to be upgraded to the host device; wherein, the device to be upgraded is determined to be the target device to be upgraded, including that the characteristic information of the device to be upgraded is the same as the characteristic information in the upgrade file package; the upgrade file package is sent by the host device to the target device to be upgraded when the Flash of the host device is successfully erased and it is determined whether the download is successful according to the cyclic redundancy checksum in the upgrade file package and the download is successful.
6. The method according to claim 5, wherein Determine whether the download is successful according to the cyclic redundancy check code in the upgrade file package, including: Calculate the reference checksum according to the upgrade program in the upgrade file package and write it into the main control board; The main control board reads the cyclic redundancy checksum in the upgrade file package; When the reference checksum written on the main control board is consistent with the read cyclic redundancy checksum, it is determined that the download is successful; or, When the reference checksum written on the main control board is inconsistent with the read cyclic redundancy checksum, it is determined that the download fails.
7. An apparatus for batch upgrade, comprising a processor and a memory storing program instructions, characterized in that The processor is configured to execute the method for batch upgrade according to any one of claims 3 to 6 when running the program instructions.
8. A host device, characterized in that, Comprising: The main body of the host device; A device for batch upgrade, installed on the main body of the host device, including a processor and a memory storing program instructions, the processor is configured to execute the method for batch upgrade according to claim 3 or 4 when running the program instructions.
9. An equipment to be upgraded, characterized in that, Comprising: The main body of the device to be upgraded; A device for batch upgrade, including a processor and a memory storing program instructions, the processor is configured to execute the method for batch upgrade according to claim 5 or 6 when running the program instructions.
10. A computer-readable storage medium storing program instructions, characterized in that, When the program instructions are running, they are used to cause the computer to execute the method for batch upgrade according to any one of claims 3 to 6.