CN114217831A - Multifunctional software upgrading method and system for embedded system - Google Patents

Multifunctional software upgrading method and system for embedded system Download PDF

Info

Publication number
CN114217831A
CN114217831A CN202111361468.XA CN202111361468A CN114217831A CN 114217831 A CN114217831 A CN 114217831A CN 202111361468 A CN202111361468 A CN 202111361468A CN 114217831 A CN114217831 A CN 114217831A
Authority
CN
China
Prior art keywords
software
upgraded
upgrading
embedded system
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111361468.XA
Other languages
Chinese (zh)
Other versions
CN114217831B (en
Inventor
武春风
黄浦博
白明顺
谢峰
秦建飞
周啟帆
胡奇
李凡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CASIC Microelectronic System Research Institute Co Ltd
Original Assignee
CASIC Microelectronic System Research Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CASIC Microelectronic System Research Institute Co Ltd filed Critical CASIC Microelectronic System Research Institute Co Ltd
Priority to CN202111361468.XA priority Critical patent/CN114217831B/en
Publication of CN114217831A publication Critical patent/CN114217831A/en
Application granted granted Critical
Publication of CN114217831B publication Critical patent/CN114217831B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a multifunctional software upgrading method of an embedded system, which stores a software upgrading version to a software upgrading operation end; selecting a transmission mode of a software upgrading operation end and an embedded system of an end to be upgraded; detecting an upgrading condition, and determining whether the embedded system of the end to be upgraded meets the upgrading condition; and confirming the upgraded software. Uploading the upgrade software; checking and backing up the upgrade software; the embedded system of the end to be upgraded transmits the check code back and displays the check code in an information bar of the upgrading system; and restarting the system, wherein after the software is upgraded, the software upgrading operation terminal sends a restarting instruction to the embedded system of the terminal to be upgraded, and the embedded system is restarted. And remote upgrading is supported, so that the disassembling work is avoided, the correctness of file upgrading is ensured, and the working efficiency is improved.

Description

Multifunctional software upgrading method and system for embedded system
Technical Field
The invention belongs to a software upgrading technology of an embedded software system, and particularly relates to a multifunctional software upgrading method and system of the embedded system.
Background
Along with the continuous development in fields such as artificial intelligence, thing networking, the complexity of embedded software becomes higher and higher, in order to make embedded equipment function constantly optimize, is indispensable when software upgrading in unscheduled carrying on. The software upgrade function is very important when designing embedded software. The software of the embedded system equipment is generally stored in a memory, and the software upgrading of the embedded system equipment in the past must be realized by disassembling and replacing a program memory chip, so that the process is complex, the efficiency is low, and the reliability of other devices is easily influenced.
Disclosure of Invention
Aiming at the defects of the prior art, the multifunctional software upgrading method of the embedded system is provided, remote upgrading is supported, the disassembly work is avoided, the correctness of file upgrading is ensured, and the working efficiency is improved.
In order to achieve the above object, the present invention provides a method for upgrading multifunctional software of an embedded system, the method comprising:
storing the software upgrading version to a software upgrading operation end;
selecting a transmission mode of a software upgrading operation end and an embedded system of an end to be upgraded;
detecting an upgrading condition, and determining whether the embedded system of the end to be upgraded meets the upgrading condition;
confirming upgrading software, after confirming that an embedded system of an end to be upgraded meets upgrading conditions, selecting a file to be uploaded locally, displaying a file extension name, sending the file extension name to the end to be upgraded by the system, comparing the file extension name with the file extension name of the end machine to be upgraded, determining whether the file extension name to be uploaded is consistent with the file extension name of the end machine to be upgraded, and confirming the upgrading software; determining a target file to be replaced, inputting a check code of the target file to be replaced (original version) by a software upgrading operation terminal, generating the check code through a check algorithm, wherein the check algorithm is a manually preset algorithm or default MD5 check, selecting the check algorithm, comparing the check algorithm with the check code of the target file to be replaced in the embedded system of the terminal to be upgraded, if the check algorithm is consistent with the check code of the target file to be replaced, determining the target file to be replaced, otherwise, determining the target file not to be replaced;
uploading the upgrade software, and uploading the confirmed upgrade software to an embedded system of a terminal to be upgraded;
the upgrading software is checked and backed up, and the embedded system of the end to be upgraded generates a check code according to a check algorithm and stores the check code in the embedded system flash of the end to be upgraded;
the embedded system of the end to be upgraded transmits the check code back and displays the check code in an information bar of the upgrading system; then, replacing the original version with the upgrading software, and backing up the original version as a backup file in the embedded system of the end to be upgraded;
once the upgrade fails, the software upgrade operation end prompts the embedded system of the end to be upgraded to restore to the original version, so as to avoid downtime;
and restarting the system, wherein after the software is upgraded, the software upgrading operation terminal sends a restarting instruction to the embedded system of the terminal to be upgraded, and the embedded system is restarted.
Furthermore, the embedded system of the end to be upgraded and the software upgrading operation end can communicate in a wired or wireless mode, and a communication transmission protocol of a network port and a serial port is supported between the software upgrading operation end and the embedded system of the end to be upgraded; when the device is used, one of the two protocols is selected, wherein the internet port communication transmission protocol comprises ftp and tftp protocols, and the serial port communication transmission protocol supports RS232 and RS485 protocols.
Further, the specific method for determining whether the embedded system of the end to be upgraded meets the upgrade condition includes:
the software upgrading operation end sends a data frame requesting for acquiring information to the embedded system of the end to be upgraded, after receiving a response, the equipment name and SN number of the embedded system of the end to be upgraded, the address of the software upgrading operation end, the equipment address of the embedded system of the end to be upgraded and the original software version information are displayed, and the software upgrading operation end compares and confirms whether the equipment of the embedded system of the end to be upgraded is equipment needing to be upgraded at present and whether the software version in the embedded system of the end to be upgraded at present needs to be upgraded;
detecting whether the equipment of the embedded system of the end to be upgraded has a backup software version; the software upgrading method comprises the steps that a software upgrading operation end sends a detection request to an embedded system end to be upgraded, a software system of the embedded system end to be upgraded detects whether a backup file exists in a specified folder, and once upgrading fails, the software upgrading operation end prompts the embedded system to be upgraded to restore to an original software version so as to avoid downtime;
detecting whether the current transmission channel is a channel or not, namely testing the communication state of the transmission channel, sending a test data packet to the embedded system of the end to be upgraded by the software upgrading operation end in a set time slot, receiving a response data packet of the embedded system of the end to be upgraded, continuing for a certain time, simultaneously seeing the detection progress on the detection progress bar, and after the detection is finished, displaying whether the software upgrading condition is met or not on the detection condition bar.
Further, the embedded system of the end to be upgraded forms a check code according to a preset check algorithm, wherein the preset check algorithm is as follows:
the verification algorithm is divided into a default MD5 algorithm and a manual preset algorithm,
the MD5 algorithm can be identified by using a Linux operating system;
the checking algorithm preset manually needs to add an algorithm entity into the embedded software, and the software upgrading operation end (local operation end) selects a corresponding checking mode.
The invention also provides a multifunctional software upgrading system of an embedded system, which integrates three functional modules of software upgrading condition detection, software uploading and software verification and backup, designs a software upgrading system with a human-computer interaction interface according to the three functions, and comprises the following steps:
the software upgrading code storage module is used for storing the software upgrading code to a software upgrading operation end;
the communication transmission module is used for communication transmission and transmission mode selection of the software upgrading operation end and the embedded system of the end to be upgraded;
the upgrade condition detection module can detect whether the current transmission channel is a channel, and can acquire the address of a software upgrade operation end and the address of an end to be upgraded, and can also acquire the number and the software version of the current equipment, so that a user can conveniently judge whether the current equipment is the equipment needing to be upgraded and whether the current version needs to be upgraded; more importantly, whether the current equipment has a backup software version can be detected, once the upgrade fails, the software upgrade operation end prompts the embedded system of the end to be upgraded to restore the original software version, and downtime is avoided;
the software uploading module is used for confirming the upgrading software, selecting a file to be uploaded at a software upgrading operation terminal after confirming that the embedded system of the terminal to be upgraded meets the upgrading condition, displaying a file extension name, sending the file extension name to the terminal to be upgraded by the system for comparison, determining whether the file extension name to be uploaded is consistent with the file extension name in the embedded system of the terminal to be upgraded, and confirming the upgrading software; the method comprises the steps that a target file to be replaced is determined, a software upgrading operation end inputs a check code of the target file to be replaced (original version), a check method is selected to be compared with the check code of the target file to be replaced in an embedded system of the end to be upgraded, if the check codes are consistent, the target file to be replaced is determined, and upgrading software is uploaded to the embedded system of the end to be upgraded;
the upgrading software checking and backup module is used for checking the correctness of the upgrading file, the embedded system of the end to be upgraded generates a check code according to a preset checking mode, stores the check code in the embedded system flash of the end to be upgraded, and simultaneously transmits the check code back to the software upgrading operation end and displays the check code in an information bar of the upgrading system; then the original version is replaced by the upgrading software, the original version is used as a backup file to be backed up in the embedded system of the end to be upgraded, and once the upgrading fails, the software upgrading operation end prompts the embedded system of the end to be upgraded to restore the original version, so that downtime is avoided;
and the restarting system module is used for sending a restarting instruction to the embedded system of the terminal to be upgraded by the software upgrading operation terminal after the software upgrading is finished, and restarting the embedded system.
Further, the software uploading module is used for detecting whether the extension of the upgrade file is correct, the embedded system of the terminal to be upgraded transmits the software extension of the original version to the software upgrading operation terminal, the extension is generally jffs2, ubi and img, and the software upgrading operation terminal compares the correctness of the extension; before upgrading, a check code of a target file to be replaced (original version) at present of the embedded system at the end to be upgraded is required to be input, a check mode can be set, and CRC is defaulted to be CRC; then, clicking a button of 'start upgrading', the upgrading progress can be seen on the progress bar part, and if the upgrading fails, prompting possible failure reasons: including failure to have upgrade conditions, file upload, or upgrade file replacement.
Furthermore, the upgrade software checking and backup module is used for replacing the original version with the upgrade software to complete the upgrade, generating a check code after the upgrade is completed, generating a script file record check code, transmitting the check code to the software upgrade operation end to be recorded by a system or manually, if the generated check code is the same as the previous version or the check code is not in a format, indicating that the upgrade is failed, and giving a corresponding prompt by the system; storing the original version of software as a backup version in an embedded system flash of the end to be upgraded, and replacing the original version with the new version of software; if the file backup and replacement fails, displaying failure in the information bar; if the software upgrading is successful, the success is displayed in the information bar, and the user is informed that the software upgrading is completed in a popup window mode.
The invention relates to a multifunctional software upgrading method of an embedded system, which integrates three main functions of software upgrading condition detection, software uploading and software verification and backup, and designs a set of software upgrading system with control interface interaction according to the three main functions. Before the application, the invention needs adaptive optimization in equipment software, and the main functions comprise: wireless transmission or wired transmission is supported, and a user can select an internet port transmission protocol or a serial port transmission protocol according to actual conditions; the software upgrading condition detection function can detect whether the current transmission channel meets the software upgrading condition, acquire the equipment information and the version information of the remote end (to-be-upgraded end) equipment, and evaluate whether the current transmission channel meets the software upgrading condition by interacting with the remote end equipment for a certain time; the software uploading function can judge whether the extension name of a file selected locally (a software upgrading operation end) is consistent with the extension name of a remote software version, judge whether the remote software version is a version to be replaced by comparing file check codes and monitor the software uploading progress through a progress bar; the software checking and backup function can generate a check code of a new software version according to a preset rule, can send a backup and replacement instruction to the remote machine, takes the original software version of the remote machine as a backup, and replaces the original version with the new version; an editable restart function is provided, which can send instructions of soft start or hard start to the remote machine according to the requirements of users. The software upgrading method and the system thereof provided by the invention can support remote upgrading, have the functions of condition inspection, file verification and the like, not only avoid the disassembly work, but also ensure the correctness of file upgrading and improve the working efficiency.
Drawings
FIG. 1 is a schematic view of a software upgrade control interface of the present invention;
FIG. 2 is a flowchart of the software upgrade condition detection operation of the present invention;
FIG. 3 is a flow chart of the software upload job of the present invention;
FIG. 4 is a flowchart of the software verification and backup process of the present invention.
In the figure: the local (or local equipment) is a software upgrading operation end, the remote end (or remote machine or target equipment) is an embedded system of an end to be upgraded, a 1-drop-down frame, a 2-button, a 3-information display column and the rest is an information filling column.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments.
As shown in fig. 1, a software upgrade control interface schematic diagram of a multifunctional software upgrade method of an embedded system according to the present invention includes:
storing the software upgrading version to a software upgrading operation end;
selecting a transmission mode of a software upgrading operation end and an embedded system of an end to be upgraded;
the embedded system of the end to be upgraded and the software upgrading operation end can communicate in a wired or wireless mode, and a communication transmission protocol of an internet access and a serial port is supported between the software upgrading operation end and the embedded system of the end to be upgraded; when the device is used, one of the two protocols is selected, wherein the internet port communication transmission protocol comprises ftp and tftp protocols, and the serial port communication transmission protocol supports RS232 and RS485 protocols.
As shown in fig. 2, the software upgrade condition detection workflow diagram of the present invention detects the upgrade condition and determines whether the embedded system of the terminal to be upgraded meets the upgrade condition;
the specific method for confirming whether the embedded system of the end to be upgraded meets the upgrading condition comprises the following steps:
clicking a 'detection software upgrading condition button', sending a data frame requesting for acquiring information to an embedded system of a terminal to be upgraded by a software upgrading operation terminal, after receiving a response, displaying the equipment name and SN number of the embedded system of the terminal to be upgraded, the address of the software upgrading operation terminal, the equipment address of the embedded system of the terminal to be upgraded and the original software version information, comparing and confirming by the software upgrading operation terminal to judge whether the equipment of the embedded system of the terminal to be upgraded is equipment needing upgrading currently and whether the software version in the embedded system of the terminal to be upgraded needs upgrading currently; in order to test the communication state of the transmission channel, the system sends a test data packet to the remote end in a set time slot, receives a remote response data packet, and lasts for a certain time (the duration is determined according to the file size and the current channel transmission rate), in this embodiment, 1min, and the detection progress can be seen on the detection progress bar. And after the detection is finished, displaying whether the software upgrading condition is met or not in a detection condition column.
Detecting whether the equipment of the embedded system of the end to be upgraded has a backup software version; the software upgrading method comprises the steps that a software upgrading operation end sends a detection request to an embedded system end to be upgraded, a software system of the embedded system end to be upgraded detects whether a backup file exists in a specified folder, and once upgrading fails, the software upgrading operation end prompts the embedded system to be upgraded to restore to an original software version so as to avoid downtime;
and detecting whether the current transmission channel is a channel, namely testing the communication state of the transmission channel, sending a test data packet to the embedded system of the end to be upgraded by the software upgrading operation end in a set time slot, receiving a response data packet of the embedded system of the end to be upgraded, and continuing for a certain time. The duration is determined according to the file size and the current channel transmission rate, for example: the file size is 10M, the file transfer rate is 100kbps, and the duration is: 10M/100kbps 102.4 s.
Meanwhile, the detection progress can be seen on the detection progress bar, and after detection is finished, whether the software upgrading condition is met or not is displayed on the detection condition bar.
As shown in the software uploading workflow diagram of fig. 3, after the upgrade software is confirmed, and the embedded system of the terminal to be upgraded meets the upgrade condition, the file to be uploaded is selected at the local (software upgrade operating terminal) and the file extension is displayed, meanwhile, the system sends the file extension to the terminal to be upgraded for comparison, determines whether the file extension to be uploaded is consistent with the file extension of the terminal to be upgraded, and confirms the upgrade software;
determining a target file to be replaced, inputting a check code of the target file to be replaced (original version) by a software upgrading operation terminal, generating the check code through a check algorithm, wherein the check algorithm is a manually preset algorithm or default MD5 check, selecting the check algorithm, comparing the check algorithm with the check code of the target file to be replaced in the embedded system of the terminal to be upgraded, if the check algorithm is consistent with the check code of the target file to be replaced, determining the target file to be replaced, otherwise, determining the target file not to be replaced;
generally, a Linux operating system is used, and MD5 algorithms can be recognized;
an algorithm entity is required to be added into embedded software by a manually preset verification algorithm, and a corresponding verification mode is selected by a software upgrading operation end (a local operation end);
in this embodiment, taking an example of a manually preset verification algorithm, if the software version name is: software _ v1.0, taking a character string ASC code as follows:
Figure BDA0003359444100000091
decimal is converted to hexadecimal as follows:
Figure BDA0003359444100000092
converting hexadecimal into character strings to produce check codes as follows:
Figure BDA0003359444100000093
the software version software _ v1.0 has a check code of 36F6674776172655F76312E30 produced by a custom check algorithm.
And determining whether the file to be replaced is consistent with the check code, and determining a replaced target file. Finally, clicking a button of 'start uploading', the system starts uploading files to the remote equipment, the progress bar can display the uploading progress, namely, the upgrading software is uploaded, and the confirmed upgrading software is uploaded to the embedded system of the end to be upgraded;
as shown in the software verification and backup working flow chart of fig. 4, the software is updated for verification and backup, and the embedded system at the end to be updated generates a verification code according to the verification algorithm and stores the verification code in the embedded system flash at the end to be updated;
the embedded system of the end to be upgraded transmits the check code back and displays the check code in an information bar of the upgrading system; then, replacing the original version with the upgrading software, and backing up the original version as a backup file in the embedded system of the end to be upgraded;
the method for backing up the original version as the backup file in the embedded system of the end to be upgraded specifically comprises the following steps:
taking Linux embedded operating system as an example, the backup function is implemented as follows:
a folder is designated in the/mnt/flash folder for storing backup software, such as/mnt/flash/backup.
The software upgrading system issues a backup instruction to the equipment at the end to be upgraded, the equipment at the end to be upgraded backs up the original version software to a specified path, and the instruction main part is as follows: "copy software _ v 1.0/mnt/flash/image/backup". And after the upgrading end equipment completes the instruction, the execution result is transmitted back to the software upgrading system.
Once the upgrade fails, the software upgrade operation end prompts the embedded system of the end to be upgraded to restore to the original version, so as to avoid downtime;
specifically, clicking 'generating a check code' on an upgrade control interface, generating the check code by a remote end according to a preset check mode, storing the check code in a local flash, and transmitting the check code back to an upgrade system to be displayed in an information bar. And then clicking 'file backup and replacement', replacing the original version with the new software version, and taking the original software version as a backup file. If the operation fails, displaying failure on the information bar, if the operation succeeds, displaying success on the information bar, and popping up an upgrade completed window.
And restarting the system, wherein after the software is upgraded, the software upgrading operation terminal sends a restarting instruction to the embedded system of the terminal to be upgraded, and the embedded system is restarted.
After the specific software is upgraded, clicking 'system restart', and sending a restart instruction to the remote equipment by the system. The instruction can be used by the user to edit the script to realize soft start or hard start.
The invention also provides a multifunctional software upgrading system of an embedded system, which integrates three functional modules of software upgrading condition detection, software uploading and software verification and backup, designs a software upgrading system with a human-computer interaction interface according to the three functions, and comprises the following steps:
the software upgrading code storage module is used for storing the software upgrading code to a software upgrading operation end;
the communication transmission module is used for communication transmission and transmission mode selection of the software upgrading operation end and the embedded system of the end to be upgraded;
the software upgrading condition detection module can detect whether the current transmission channel is a channel, and can acquire the address of a software upgrading operation end and the address of an end to be upgraded, and can also acquire the number and the software version of the current equipment, so that a user can conveniently judge whether the current equipment is the equipment needing to be upgraded and whether the current version needs to be upgraded; more importantly, whether the current equipment has a backup software version can be detected, once the upgrade fails, the software upgrade operation end prompts the embedded system of the end to be upgraded to restore the original software version, and downtime is avoided;
the software uploading module is used for confirming the upgrading software, selecting a file to be uploaded at a software upgrading operation terminal after confirming that the embedded system of the terminal to be upgraded meets the upgrading condition, displaying a file extension name, sending the file extension name to the terminal to be upgraded by the system for comparison, determining whether the file extension name to be uploaded is consistent with the file extension name in the embedded system of the terminal to be upgraded, and confirming the upgrading software; the method comprises the steps that a target file to be replaced is determined, a software upgrading operation end inputs a check code of the target file to be replaced (original version), a check method is selected to be compared with the check code of the target file to be replaced in an embedded system of the end to be upgraded, if the check codes are consistent, the target file to be replaced is determined, and upgrading software is uploaded to the embedded system of the end to be upgraded;
specifically, the software uploading module is configured to detect whether an extension of an upgrade file is correct, the embedded system of the to-be-upgraded terminal transmits the software extension of the original version to the software upgrade operating terminal, where the extension is generally jffs2, ub i, and img, and the software upgrade operating terminal compares correctness of the extension; before upgrading, a check code of a target file to be replaced (original version) at present of the embedded system at the end to be upgraded is required to be input, a check mode can be set, and CRC is defaulted to be CRC; then, clicking a button of 'start upgrading', the upgrading progress can be seen on the progress bar part, and if the upgrading fails, prompting possible failure reasons: including failure to have upgrade conditions, file upload, or upgrade file replacement.
The upgrading software checking and backup module (software checking and backup module) is used for verifying the correctness of the upgrading file, and the embedded system of the end to be upgraded generates a check code according to a preset checking mode and stores the check code in the embedded system flash of the end to be upgraded, and simultaneously transmits the check code back to the software upgrading operation end and displays the check code in an information bar of the upgrading system; then the original version is replaced by the upgrading software, the original version is used as a backup file to be backed up in the embedded system of the end to be upgraded, and once the upgrading fails, the software upgrading operation end prompts the embedded system of the end to be upgraded to restore the original version, so that downtime is avoided;
specifically, the upgrade software checking and backup module is used for replacing the original version with the upgrade software to complete the upgrade, generating a check code after the upgrade is completed, generating a script file record check code, transmitting the check code to a software upgrade operation end and recording the check code by a system or manually, if the generated check code is the same as the previous version or the check code is not in a format, indicating that the upgrade fails, and giving a corresponding prompt by the system; storing the original version of software as a backup version in an embedded system flash of the end to be upgraded, and replacing the original version with the new version of software; if the file backup and replacement fails, displaying failure in the information bar; if the software upgrading is successful, the success is displayed in the information bar, and the user is informed that the software upgrading is completed in a popup window mode.
And the restarting system module is used for sending a restarting instruction to the embedded system of the terminal to be upgraded by the software upgrading operation terminal after the software upgrading is finished, and restarting the embedded system.

Claims (7)

1. A multifunctional software upgrading method for an embedded system is characterized by comprising the following steps:
storing the software upgrading version to a software upgrading operation end;
selecting a transmission mode of a software upgrading operation end and an embedded system of an end to be upgraded;
detecting an upgrading condition, and determining whether the embedded system of the end to be upgraded meets the upgrading condition;
confirming upgrading software, after confirming that an embedded system of an end to be upgraded meets upgrading conditions, selecting a file to be uploaded locally, displaying a file extension name, sending the file extension name to the end to be upgraded by the system, comparing the file extension name with the file extension name of the end machine to be upgraded, determining whether the file extension name to be uploaded is consistent with the file extension name of the end machine to be upgraded, and confirming the upgrading software;
determining a target file to be replaced, inputting a check code of the target file to be replaced by the software upgrading operation terminal, generating the check code through a check algorithm, wherein the check algorithm is a manually preset algorithm or default MD5 check, selecting the check algorithm, comparing the check algorithm with the check code of the target file to be replaced in the embedded system of the terminal to be upgraded, and determining the target file to be replaced if the check algorithm is consistent with the check code of the target file to be replaced in the embedded system of the terminal to be upgraded;
uploading the upgrade software, and uploading the confirmed upgrade software to an embedded system of a terminal to be upgraded;
the upgrading software is checked and backed up, and the embedded system of the end to be upgraded generates a check code according to a check algorithm and stores the check code in the embedded system flash of the end to be upgraded;
the embedded system of the end to be upgraded transmits the check code back and displays the check code in an information bar of the upgrading system; and then replacing the original version with the upgrading software, and backing up the original version as a backup file in the embedded system of the end to be upgraded.
Once the upgrade fails, the software upgrade operation end prompts the embedded system of the end to be upgraded to restore to the original version, so as to avoid downtime;
and restarting the system, wherein after the software is upgraded, the software upgrading operation terminal sends a restarting instruction to the embedded system of the terminal to be upgraded, and the embedded system is restarted.
2. The multifunctional software upgrading method of the embedded system according to claim 1, characterized in that the embedded system of the end to be upgraded and the software upgrading operation end can communicate in a wired or wireless manner, and a communication transmission protocol of an internet port and a serial port is supported between the software upgrading operation end and the embedded system of the end to be upgraded; when the device is used, one of the two protocols is selected, wherein the internet port communication transmission protocol comprises ftp and tftp protocols, and the serial port communication transmission protocol supports RS232 and RS485 protocols.
3. The multifunctional software upgrading method of the embedded system according to claim 1, wherein the specific method for confirming whether the embedded system of the end to be upgraded meets the upgrading condition is as follows:
the software upgrading operation end sends a data frame requesting for acquiring information to the embedded system of the end to be upgraded, after receiving a response, the equipment name and SN number of the embedded system of the end to be upgraded, the address of the software upgrading operation end, the equipment address of the embedded system of the end to be upgraded and the original software version information are displayed, and the software upgrading operation end compares and confirms whether the equipment of the embedded system of the end to be upgraded is equipment needing to be upgraded at present and whether the software version in the embedded system of the end to be upgraded at present needs to be upgraded;
detecting whether the equipment of the embedded system of the end to be upgraded has a backup software version; the software upgrading method comprises the steps that a software upgrading operation end sends a detection request to an embedded system end to be upgraded, a software system of the embedded system end to be upgraded detects whether a backup file exists in a specified folder, and once upgrading fails, the software upgrading operation end prompts the embedded system to be upgraded to restore to an original software version so as to avoid downtime;
detecting whether the current transmission channel is a channel or not, namely testing the communication state of the transmission channel, sending a test data packet to the embedded system of the end to be upgraded by the software upgrading operation end in a set time slot, receiving a response data packet of the embedded system of the end to be upgraded, continuing for a certain time, simultaneously seeing the detection progress on the detection progress bar, and after the detection is finished, displaying whether the software upgrading condition is met or not on the detection condition bar.
4. The multifunctional software upgrading method of the embedded system according to claim 1, characterized in that the embedded system at the end to be upgraded forms a verification code according to a preset verification algorithm, and the preset verification algorithm is as follows:
the verification algorithm is divided into a default MD5 algorithm and a manual preset algorithm,
the MD5 algorithm can be identified by using a Linux operating system;
the checking algorithm preset manually needs to be added into the embedded software, and the software upgrading operation end selects a corresponding checking mode.
5. A multifunctional software upgrading system of an embedded system integrates three functional modules of software upgrading condition detection, software uploading and software checking and backup, and designs a software upgrading system with a human-computer interaction interface according to the three functions, which is characterized by comprising the following steps:
the software upgrading code storage module is used for storing the software upgrading code to a software upgrading operation end;
the communication transmission module is used for communication transmission and transmission mode selection of the software upgrading operation end and the embedded system of the end to be upgraded;
the upgrade condition detection module can detect whether the current transmission channel is a channel, and can acquire the address of a software upgrade operation end and the address of an end to be upgraded, and can also acquire the number and the software version of the current equipment, so that a user can conveniently judge whether the current equipment is the equipment needing to be upgraded and whether the current version needs to be upgraded; more importantly, whether the current equipment has a backup software version can be detected, once the upgrade fails, the software upgrade operation end prompts the embedded system of the end to be upgraded to restore the original software version, and downtime is avoided;
the software uploading module is used for confirming the upgrading software, selecting a file to be uploaded at a software upgrading operation terminal after confirming that the embedded system of the terminal to be upgraded meets the upgrading condition, displaying a file extension name, sending the file extension name to the terminal to be upgraded by the system for comparison, determining whether the file extension name to be uploaded is consistent with the file extension name in the embedded system of the terminal to be upgraded, and confirming the upgrading software; the software upgrading operation terminal inputs a check code of the target file to be replaced, a check method is selected to be compared with the check code of the target file to be replaced in the embedded system of the terminal to be upgraded, if the check codes are consistent, the target file to be replaced is determined, and then the upgrading software is uploaded to the embedded system of the terminal to be upgraded;
the upgrading software checking and backup module is used for checking the correctness of the upgrading file, the embedded system of the end to be upgraded generates a check code according to a preset checking mode, stores the check code in the embedded system flash of the end to be upgraded, and simultaneously transmits the check code back to the software upgrading operation end and displays the check code in an information bar of the upgrading system; then the original version is replaced by the upgrading software, the original version is used as a backup file to be backed up in the embedded system of the end to be upgraded, and once the upgrading fails, the software upgrading operation end prompts the embedded system of the end to be upgraded to restore the original version, so that downtime is avoided;
and the restarting system module is used for sending a restarting instruction to the embedded system of the terminal to be upgraded by the software upgrading operation terminal after the software upgrading is finished, and restarting the embedded system.
6. The multi-functional software upgrading system of the embedded system of claim 5, characterized in that the software uploading module is configured to detect whether an extension of the upgrade file is correct, the embedded system of the end to be upgraded transmits the original version of the software extension to the software upgrading operation end, the extension is generally jffs2, ubi and img, and the software upgrading operation end compares correctness of the extension; before upgrading, a check code of a current target file to be replaced of the embedded system at the end to be upgraded needs to be input, the check mode can be set, and CRC is defaulted to be CRC; then, clicking a button of 'start upgrading', the upgrading progress can be seen on the progress bar part, and if the upgrading fails, prompting possible failure reasons: including failure to have upgrade conditions, file upload, or upgrade file replacement.
7. The multifunctional software upgrading system of the embedded system according to claim 5, wherein the upgrading software checking and backup module is used for replacing the original version with upgrading software to complete upgrading, generating a check code after upgrading is completed, generating a script file record check code, simultaneously transmitting the check code to the software upgrading operation end to be recorded by the system or manually, if the generated check code is the same as the previous version or the check code format is not correct, indicating that upgrading is failed, and giving a corresponding prompt by the system; storing the original version of software as a backup version in an embedded system flash of the end to be upgraded, and replacing the original version with the new version of software; if the file backup and replacement fails, displaying failure in the information bar; if the software upgrading is successful, the success is displayed in the information bar, and the user is informed that the software upgrading is completed in a popup window mode.
CN202111361468.XA 2021-11-17 2021-11-17 Multifunctional software upgrading method and system for embedded system Active CN114217831B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111361468.XA CN114217831B (en) 2021-11-17 2021-11-17 Multifunctional software upgrading method and system for embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111361468.XA CN114217831B (en) 2021-11-17 2021-11-17 Multifunctional software upgrading method and system for embedded system

Publications (2)

Publication Number Publication Date
CN114217831A true CN114217831A (en) 2022-03-22
CN114217831B CN114217831B (en) 2024-07-26

Family

ID=80697431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111361468.XA Active CN114217831B (en) 2021-11-17 2021-11-17 Multifunctional software upgrading method and system for embedded system

Country Status (1)

Country Link
CN (1) CN114217831B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866446A (en) * 2022-04-15 2022-08-05 西安广和通无线通信有限公司 Data transmission rate testing method, system, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6895382B1 (en) * 2000-10-04 2005-05-17 International Business Machines Corporation Method for arriving at an optimal decision to migrate the development, conversion, support and maintenance of software applications to off shore/off site locations
CN101907998A (en) * 2010-08-17 2010-12-08 中兴通讯股份有限公司 Update system and method of embedded systems
CN103024549A (en) * 2012-12-06 2013-04-03 青岛海信电器股份有限公司 Method for upgrading software of peripheral equipment of television
CN109831702A (en) * 2019-01-15 2019-05-31 四川长虹电器股份有限公司 The method for preventing TV software staging error
CN111541562A (en) * 2020-04-16 2020-08-14 中电科航空电子有限公司 Network driver layer-based airborne equipment firmware upgrading method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6895382B1 (en) * 2000-10-04 2005-05-17 International Business Machines Corporation Method for arriving at an optimal decision to migrate the development, conversion, support and maintenance of software applications to off shore/off site locations
CN101907998A (en) * 2010-08-17 2010-12-08 中兴通讯股份有限公司 Update system and method of embedded systems
CN103024549A (en) * 2012-12-06 2013-04-03 青岛海信电器股份有限公司 Method for upgrading software of peripheral equipment of television
CN109831702A (en) * 2019-01-15 2019-05-31 四川长虹电器股份有限公司 The method for preventing TV software staging error
CN111541562A (en) * 2020-04-16 2020-08-14 中电科航空电子有限公司 Network driver layer-based airborne equipment firmware upgrading method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邓力 等: ""一种改良安全机制的嵌入式远程升级系统的研究"", 《电子测量技术》, 15 August 2017 (2017-08-15), pages 207 - 211 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866446A (en) * 2022-04-15 2022-08-05 西安广和通无线通信有限公司 Data transmission rate testing method, system, electronic device and storage medium

Also Published As

Publication number Publication date
CN114217831B (en) 2024-07-26

Similar Documents

Publication Publication Date Title
CN102609326B (en) Data downloading processing method and data downloading processing device
CN101436138B (en) Control device and control method for software upgrade and dynamic rolling back
CN108021410A (en) A kind of firmware upgrade method and system of intelligent appliance equipment
CN111008033A (en) Universal DSP (digital signal processor) online upgrading system and upgrading method based on serial port
CN107179909A (en) Method for upgrading software, device and computer-readable recording medium
CN102667716A (en) Methods and devices for updating firmware of a component using a firmware update application
CN111769962A (en) MCU firmware OTA upgrading method
JP2004514208A (en) Online diagnostics of computer hardware and software
EP1639468A2 (en) Network equipment and a method for monitoring the start up of a such an equipment
CN111562933A (en) Air conditioner upgrading method and air conditioner system
CN114281394A (en) Method, system, equipment and medium for fast on-line upgrading program
CN109460268B (en) Application parameter configuration method, device and system
CN105120259A (en) Detection method and apparatus for digital television
CN114217831B (en) Multifunctional software upgrading method and system for embedded system
TW202018519A (en) Adapter with instrument control function, instrument control system and instrument control method applied thereto
CN117687664A (en) Online upgrade configuration method and device for DSP
CN112947964A (en) Chip firmware updating method, device, equipment and storage medium
CN111475188A (en) Power module firmware updating method, device, equipment and storage medium
CN110888656B (en) Multifunctional programming device and programming method
CN116382724B (en) Remote upgrading method and system based on cloud printer
CN109189452A (en) Oftware updating method, device and the storage medium of a kind of electronic equipment
CN116302020A (en) FPGA logic program upgrading method, device, equipment and medium
CN111427604A (en) Remote software upgrading system and method based on functional mobile phone
CN111221554A (en) DSP circuit structure, DSP online program upgrading method and device
CN113918162B (en) Front-end code automatic verification method based on centralized management mode

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant