[go: up one dir, main page]

CN106775847B - A kind of board card software version update method and device - Google Patents

A kind of board card software version update method and device Download PDF

Info

Publication number
CN106775847B
CN106775847B CN201611090012.3A CN201611090012A CN106775847B CN 106775847 B CN106775847 B CN 106775847B CN 201611090012 A CN201611090012 A CN 201611090012A CN 106775847 B CN106775847 B CN 106775847B
Authority
CN
China
Prior art keywords
checksum
external
upgrade file
target software
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.)
Active
Application number
CN201611090012.3A
Other languages
Chinese (zh)
Other versions
CN106775847A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201611090012.3A priority Critical patent/CN106775847B/en
Publication of CN106775847A publication Critical patent/CN106775847A/en
Application granted granted Critical
Publication of CN106775847B publication Critical patent/CN106775847B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version

Landscapes

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

Abstract

本发明实施例公开了一种板卡软件版本更新方法及装置。所述方法包括:当检测到有外部升级文件时获取所述外部升级文件的校验和;确认板卡中所述外部升级文件对应的目标软件的校验和与所述外部升级文件的校验和是否一致;若所述目标软件的校验和与所述外部升级文件的校验和不一致,则基于所述外部升级文件对所述目标软件进行更新。通过本发明的技术方案,能够防止软件重复更新,提高软件更新的可靠性及准确性。

Figure 201611090012

The embodiment of the present invention discloses a method and device for updating a software version of a board card. The method includes: acquiring the checksum of the external upgrade file when detecting that there is an external upgrade file; confirming the checksum of the target software corresponding to the external upgrade file in the board and the verification of the external upgrade file If the checksum of the target software is inconsistent with the checksum of the external upgrade file, the target software is updated based on the external upgrade file. Through the technical scheme of the present invention, repeated software updates can be prevented, and the reliability and accuracy of software updates can be improved.

Figure 201611090012

Description

一种板卡软件版本更新方法及装置A kind of board card software version update method and device

技术领域technical field

本发明实施例涉及软件更新技术,尤其涉及一种板卡软件版本更新方法及装置。Embodiments of the present invention relate to a software update technology, and in particular, to a method and device for updating a software version of a board card.

背景技术Background technique

随着科技的发展,越来越多的电子设备中设置有可插入式的板卡,而在板卡生产过程中,需要对板卡中的软件进行更新。With the development of science and technology, more and more electronic devices are provided with pluggable boards, and in the production process of the boards, the software in the boards needs to be updated.

目前,普遍采用的软件更新方法是,通过包含软件升级包文件的U盘插入板卡中时,板卡只要检测到升级包文件,就立即对板卡中相应的软件进行更新。At present, the commonly used software update method is that when the U disk containing the software upgrade package file is inserted into the board, the board will immediately update the corresponding software in the board as long as the upgrade package file is detected.

现有技术方案存在的缺陷是,若软件更新完毕后U盘还插在板卡上,且当板卡掉电后又重新上电时,会重复进行软件更新操作,浪费时间。The defect of the prior art solution is that if the U disk is still inserted on the board after the software update is completed, and when the board is powered on again after being powered off, the software update operation will be repeated, which wastes time.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种板卡软件版本更新方法及装置,以实现防止软件重复更新,提高软件更新的可靠性及准确性。Embodiments of the present invention provide a board card software version update method and device, so as to prevent repeated software updates and improve the reliability and accuracy of software updates.

第一方面,本发明实施例提供了一种板卡软件版本更新方法,包括:In a first aspect, an embodiment of the present invention provides a method for updating a software version of a board card, including:

当检测到有外部升级文件时获取所述外部升级文件的校验和;When detecting that there is an external upgrade file, obtain the checksum of the external upgrade file;

确认板卡中所述外部升级文件对应的目标软件的校验和与所述外部升级文件的校验和是否一致;Confirm whether the checksum of the target software corresponding to the external upgrade file in the board is consistent with the checksum of the external upgrade file;

若所述目标软件的校验和与所述外部升级文件的校验和不一致,则基于所述外部升级文件对所述目标软件进行更新。If the checksum of the target software is inconsistent with the checksum of the external upgrade file, the target software is updated based on the external upgrade file.

第二方面,本发明实施例还提供了一种板卡软件版本更新装置,该装置包括:In a second aspect, an embodiment of the present invention further provides a device for updating a software version of a board card, the device comprising:

升级文件校验和获取单元,用于当检测到有外部升级文件时获取所述外部升级文件的校验和;an upgrade file checksum obtaining unit, configured to obtain the checksum of the external upgrade file when an external upgrade file is detected;

校验和一致性确认单元,用于确认板卡中所述外部升级文件对应的目标软件的校验和与所述外部升级文件的校验和是否一致;a checksum consistency confirmation unit, used to confirm whether the checksum of the target software corresponding to the external upgrade file in the board is consistent with the checksum of the external upgrade file;

目标软件更新单元,用于若所述目标软件的校验和与所述外部升级文件的校验和不一致,则基于所述外部升级文件对所述目标软件进行更新。A target software update unit, configured to update the target software based on the external upgrade file if the checksum of the target software is inconsistent with the checksum of the external upgrade file.

本发明实施例通过确认板卡中目标软件的校验和与外部升级文件的校验和是否一致,当二者不一致时才会对目标软件进行更新,解决了现有技术中因人为操作失误而导致的软件重复更新的问题,达到了防止软件重复更新的效果,提高了软件更新的可靠性及准确性。In the embodiment of the present invention, by confirming whether the checksum of the target software in the board is consistent with the checksum of the external upgrade file, the target software will be updated only when the two are inconsistent, which solves the problem of human error in the prior art. The resulting problem of repeated software updates achieves the effect of preventing repeated software updates, and improves the reliability and accuracy of software updates.

附图说明Description of drawings

图1是本发明实施例一提供的一种板卡软件版本更新方法的流程示意图;1 is a schematic flowchart of a method for updating a board software version according to Embodiment 1 of the present invention;

图2是本发明实施例二提供的一种板卡软件版本更新方法的流程示意图;2 is a schematic flowchart of a method for updating a board software version according to Embodiment 2 of the present invention;

图3是本发明实施例三提供的一种板卡软件版本更新方法的流程示意图;3 is a schematic flowchart of a method for updating a board software version according to Embodiment 3 of the present invention;

图4是本发明实施例四提供的一种板卡软件版本更新方法的流程示意图;4 is a schematic flowchart of a method for updating a board software version according to Embodiment 4 of the present invention;

图5是本发明实施例五提供的一种板卡软件版本更新装置的结构示意图。FIG. 5 is a schematic structural diagram of an apparatus for updating a software version of a board card according to Embodiment 5 of the present invention.

具体实施方式Detailed ways

下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all structures related to the present invention.

实施例一Example 1

图1为本发明实施例一提供的一种板卡软件版本更新方法的流程示意图。该方法可适用于板卡中进行软件版本更新的情况,该方法可以由板卡软件版本更新装置来执行,该装置可由硬件和/或软件组成,并一般可集成在板卡以及所有包含软件版本更新功能的电路板中。具体包括如下:FIG. 1 is a schematic flowchart of a method for updating a software version of a board card according to Embodiment 1 of the present invention. The method can be applied to the case of updating the software version in the board, and the method can be executed by a device for updating the software version of the board, which can be composed of hardware and/or software, and can generally be integrated in the board and all software versions update function on the board. Specifically include the following:

S110、当检测到有外部升级文件时获取外部升级文件的校验和。S110. Obtain the checksum of the external upgrade file when it is detected that there is an external upgrade file.

其中,外部升级文件可设置于板卡以外的外部存储器上,并且该外部存储器与板卡相连。具体的,校验和是用于校验目的的一组数据项的和,即校验和可用来表征同一类型文件的不同版本。外部升级文件在进行编译时计算出校验和并自动添加到文件名中,通过读取外部文件的文件名,即可获取外部升级文件的校验和。The external upgrade file can be set on an external memory other than the board, and the external memory is connected to the board. Specifically, the checksum is the sum of a set of data items for verification purposes, that is, the checksum can be used to represent different versions of the same type of file. When the external upgrade file is compiled, the checksum is calculated and automatically added to the file name. By reading the file name of the external file, the checksum of the external upgrade file can be obtained.

示例性的,外部升级文件设置于U盘中,当U盘插入板卡时,板卡自动读取U盘中外部升级文件的文件名,从而获取外部升级文件的校验和。Exemplarily, the external upgrade file is set in the U disk, and when the U disk is inserted into the board, the board automatically reads the file name of the external upgrade file in the U disk, so as to obtain the checksum of the external upgrade file.

S120、确认板卡中外部升级文件对应的目标软件的校验和与外部升级文件的校验和是否一致。S120. Confirm whether the checksum of the target software corresponding to the external upgrade file in the board is consistent with the checksum of the external upgrade file.

具体的,当板卡芯片处于空片,即没有数据时,安装的软件会记录各个软件包的校验和,以作为软件版本比对的标准。当外部存储器中存在有多个外部升级文件时,根据外部升级文件类型的不同分别对应于不同的目标软件,从而分别确认板卡中外部升级文件对应的目标软件的校验和与外部升级文件的校验和是否一致。Specifically, when the board chip is in an empty chip, that is, there is no data, the installed software will record the checksum of each software package as a standard for software version comparison. When there are multiple external upgrade files in the external memory, they correspond to different target software according to the different types of external upgrade files, so as to confirm the checksum of the target software corresponding to the external upgrade files in the board and the difference between the external upgrade files. Checksums are consistent.

具体的,进行校验和比对过程的触发条件可以是触发板卡对目标软件进行自动更新之前,即在板卡正常运行过程中检测到有外部升级文件时,或给板卡上电过程中检测到有外部文件时,触发校验和的比对过程。其中,在板卡正常运行时触发的校验和比对过程在操作系统中进行;给板卡上电时触发的校验和比对过程在硬件驱动层执行。示例性的,对于电视机板卡,操作系统可以是Supernova,硬件驱动层可以是Mboot层。Specifically, the trigger condition for the checksum comparison process may be before the board is triggered to automatically update the target software, that is, when an external upgrade file is detected during the normal operation of the board, or when the board is powered on. When an external file is detected, the checksum comparison process is triggered. The checksum comparison process triggered when the board is running normally is performed in the operating system; the checksum comparison process triggered when the board is powered on is performed at the hardware driver layer. Exemplarily, for a TV board, the operating system may be Supernova, and the hardware driver layer may be the Mboot layer.

具体的,进行校验和比对的目的在于,检测板卡中的目标软件与外部升级文件的版本是否一致,从而确定目标软件是否已更新过。若校验和一致,则说明目标软件与外部升级文件的版本一致,即目标软件已更新过,无需再进行更新;若校验和不一致,则说明目标软件与外部升级文件的版本不一致,即目标软件没有更新过,需要对目标软件进行更新。进行校验和比对的好处在于,当有误操作发生时可以有效防止板卡对已更新过的目标软件进行重复更新。Specifically, the purpose of performing the checksum comparison is to detect whether the version of the target software in the board is consistent with that of the external upgrade file, so as to determine whether the target software has been updated. If the checksum is consistent, it means that the version of the target software is the same as that of the external upgrade file, that is, the target software has been updated and no further update is required; The software has not been updated, and the target software needs to be updated. The advantage of performing the checksum comparison is that it can effectively prevent the board from repeatedly updating the updated target software when a misoperation occurs.

S130、若目标软件的校验和与外部升级文件的校验和不一致,则基于外部升级文件对目标软件进行更新。S130. If the checksum of the target software is inconsistent with the checksum of the external upgrade file, update the target software based on the external upgrade file.

具体的,若目标软件的校验和与外部升级文件的校验和不一致,则说明目标软件与外部升级文件的版本不一致,即目标软件没有更新过,从而基于外部升级文件对目标软件进行更新。当校验和不一致时对目标软件进行更新,可以确保目标软件没有基于该外部升级文件进行过更新,从而提高目标软件更新过程的可靠性和准确性。Specifically, if the checksum of the target software is inconsistent with the checksum of the external upgrade file, it means that the versions of the target software and the external upgrade file are inconsistent, that is, the target software has not been updated, so the target software is updated based on the external upgrade file. When the checksum is inconsistent, updating the target software can ensure that the target software has not been updated based on the external upgrade file, thereby improving the reliability and accuracy of the target software updating process.

本实施例的技术方案,通过确认板卡中目标软件的校验和与外部升级文件的校验和是否一致,当二者不一致时才会对目标软件进行更新,解决了现有技术中因人为操作失误而导致的软件重复更新的问题,达到了防止软件重复更新的效果,提高了软件更新的可靠性及准确性。In the technical solution of this embodiment, by confirming whether the checksum of the target software in the board is consistent with the checksum of the external upgrade file, the target software will be updated only when the two are inconsistent, which solves the problem of artificial intelligence in the prior art. The problem of repeated software updates caused by operational errors achieves the effect of preventing repeated software updates and improves the reliability and accuracy of software updates.

在上述技术方案的基础上,在当检测到有外部升级文件时获取所述外部升级文件的校验和之前,优选是进一步增加了:记录板卡中的所有软件的安装文件的校验和。On the basis of the above technical solution, before obtaining the checksum of the external upgrade file when it is detected that there is an external upgrade file, it is preferable to further add: record the checksum of all software installation files in the board.

具体的,当板卡芯片处于空片,即没有数据时,在基于安装文件的软件安装的过程中会记录安装文件的校验和作为已安装的目标软件的校验和,为后续的校验和比对过程提供目标软件的校验和。Specifically, when the board chip is in an empty chip, that is, there is no data, the checksum of the installation file will be recorded as the checksum of the installed target software during the software installation process based on the installation file, which is used for subsequent verification. The sum comparison process provides the checksum of the target software.

实施例二Embodiment 2

图2为本发明实施例二提供的一种板卡软件版本更新方法的流程示意图。本实施例以上述实施例为基础进行优化,提供了优选的板卡软件版本更新的方法,具体是,当检测到有外部升级文件时获取外部升级文件的校验和进一步优化为,包括:当板卡检测到连接有外部存储设备时,检测外部存储设备中是否存在外部升级文件;若外部存储设备中存在外部升级文件,获取外部升级文件的校验和。FIG. 2 is a schematic flowchart of a method for updating a software version of a board card according to Embodiment 2 of the present invention. This embodiment is optimized on the basis of the above-mentioned embodiments, and provides a preferred method for updating the software version of the board card. Specifically, when an external upgrade file is detected, the checksum of the external upgrade file is further optimized to include: when the external upgrade file is detected. When the board detects that an external storage device is connected, it detects whether there is an external upgrade file in the external storage device; if there is an external upgrade file in the external storage device, it obtains the checksum of the external upgrade file.

S210、当板卡检测到连接有外部存储设备时,检测外部存储设备中是否存在外部升级文件。S210. When the board detects that an external storage device is connected, detect whether there is an external upgrade file in the external storage device.

其中,外部存储设备是指除板卡以外能够存储文件的设备,优选可以是U盘,外部存储设备可通过多种接口与板卡相连,例如可以是USB(Universal SerialBus,通用串行总线)接口。Among them, the external storage device refers to a device that can store files other than the board card, preferably a U disk, and the external storage device can be connected to the board card through various interfaces, such as a USB (Universal Serial Bus, Universal Serial Bus) interface .

具体的,当板卡检测到有外部存储设备与其接口相连时,检测该外部存储设备中是否存在外部升级文件,可选的,可通过识别文件类型来判断外部存储设备中是否存在外部升级文件,也可通过识别文件名称来判断是否存在外部升级文件。检测外部存储设备中是否存在外部升级文件的好处在于,可以防止不含外部升级文件的外部存储设备与板卡相连时而导致的更新操作误启动,占用板卡的内存空间的问题,从而提高软件更新的可靠性及准确性。Specifically, when the board detects that an external storage device is connected to its interface, it detects whether there is an external upgrade file in the external storage device. Optionally, it can determine whether there is an external upgrade file in the external storage device by identifying the file type. You can also judge whether there is an external upgrade file by identifying the file name. The advantage of detecting whether there is an external upgrade file in an external storage device is that it can prevent the update operation from incorrectly starting when an external storage device without an external upgrade file is connected to the board and occupying the memory space of the board, thereby improving software updates. reliability and accuracy.

S220、若外部存储设备中存在外部升级文件,获取外部升级文件的校验和。S220. If an external upgrade file exists in the external storage device, obtain a checksum of the external upgrade file.

具体的,若外部存储设备中存在外部升级文件,则读取外部升级文件的文件名,从而获取记录在文件名中的校验和;外部存储设备中不存在外部升级文件,则板卡维持现有状态不变,即不进行任何后续的判断更新操作。获取外部升级文件校验和的目的在于,为后续校验和比对提供外部升级文件的校验和。Specifically, if there is an external upgrade file in the external storage device, the file name of the external upgrade file is read to obtain the checksum recorded in the file name; if there is no external upgrade file in the external storage device, the board maintains the current status. The state remains unchanged, that is, no subsequent judgment update operations are performed. The purpose of obtaining the checksum of the external upgrade file is to provide the checksum of the external upgrade file for subsequent checksum comparison.

示例性的,若与板卡相连的U盘中存在外部升级文件时,板卡自动读取外部升级文件的文件名称,将外部升级文件编译时计算得到并写入文件名中的校验和提出,并作为外部升级文件的校验和与板卡中的目标软件的校验和进行比对。Exemplarily, if there is an external upgrade file in the U disk connected to the board, the board automatically reads the file name of the external upgrade file, and extracts the checksum calculated and written into the file name when the external upgrade file is compiled. , and compare it with the checksum of the target software in the board as the checksum of the external upgrade file.

S230、确认板卡中外部升级文件对应的目标软件的校验和与外部升级文件的校验和是否一致。S230. Confirm whether the checksum of the target software corresponding to the external upgrade file in the board is consistent with the checksum of the external upgrade file.

S240、若目标软件的校验和与外部升级文件的校验和不一致,则基于外部升级文件对目标软件进行更新。S240. If the checksum of the target software is inconsistent with the checksum of the external upgrade file, update the target software based on the external upgrade file.

本实施例的技术方案,通过检测与板卡相连的外部存储器中是否存在外部升级文件,当存在时才会获取外部升级文件的校验和,并确认板卡中目标软件的校验和与外部升级文件的校验和是否一致,当二者不一致时才会对目标软件进行更新,达到了防止软件重复更新的效果,提高了软件更新的可靠性及准确性。The technical solution of this embodiment is to detect whether there is an external upgrade file in the external memory connected to the board, and only obtain the checksum of the external upgrade file when it exists, and confirm that the checksum of the target software in the board is the same as that of the external upgrade file. Whether the checksum of the upgrade file is consistent, the target software will be updated only when the two are inconsistent, which achieves the effect of preventing repeated software updates and improves the reliability and accuracy of software updates.

实施例三Embodiment 3

图3为本发明实施例三提供的一种板卡软件版本更新方法的流程示意图。本实施例以上述各实施例为基础进行优化,提供了优选的板卡软件版本更新的方法,具体是,在确认板卡中外部升级文件对应的目标软件的校验和与外部升级文件的校验和是否一致之后进一步优化为,还包括:若目标软件的校验和与外部升级文件的校验和一致,则维持板卡的默认工作状态。FIG. 3 is a schematic flowchart of a method for updating a software version of a board card according to Embodiment 3 of the present invention. This embodiment is optimized on the basis of the above-mentioned embodiments, and provides a preferred method for updating the software version of the board card. Specifically, the checksum of the target software corresponding to the external upgrade file in the board card and the checksum of the external upgrade file are confirmed in the board card. After checking whether the checksum is consistent, it is further optimized as follows: if the checksum of the target software is consistent with the checksum of the external upgrade file, the default working state of the board is maintained.

S310、当检测到有外部升级文件时获取外部升级文件的校验和。S310. Obtain the checksum of the external upgrade file when it is detected that there is an external upgrade file.

S320、确认板卡中外部升级文件对应的目标软件的校验和与外部升级文件的校验和是否一致。若否,则执行S330;若是,则执行S340。S320. Confirm whether the checksum of the target software corresponding to the external upgrade file in the board is consistent with the checksum of the external upgrade file. If no, execute S330; if yes, execute S340.

S330、基于外部升级文件对目标软件进行更新。S330. Update the target software based on the external upgrade file.

S340、维持板卡的默认工作状态。S340. Maintain the default working state of the board.

具体的,板卡中外部升级文件对应的目标软件的校验和与外部升级文件的校验和一致,则说明板卡中外部升级文件对应的目标软件已基于该外部升级文件进行过更新,无需再进行重复更新操作。而维持板卡的默认工作状态是指保持板卡之前的工作状态不变,而不进行其他任何更新操作。Specifically, if the checksum of the target software corresponding to the external upgrade file in the board is consistent with the checksum of the external upgrade file, it means that the target software corresponding to the external upgrade file in the board has been updated based on the external upgrade file, and there is no need to Repeat the update operation again. Maintaining the default working state of the board refers to keeping the previous working state of the board unchanged without performing any other update operations.

示例性的,板卡上电启动时检测到有外部升级文件,并检测到外部升级文件的校验和与其所对应的目标软件的校验和一致,则板卡不再对目标软件进行更新操作,而是继续上电启动板卡。这样做的好处在于,可以防止目标软件的重复更新,提高了软件更新的可靠性及准确性。Exemplarily, when an external upgrade file is detected when the board is powered on, and it is detected that the checksum of the external upgrade file is consistent with the checksum of the corresponding target software, the board will no longer update the target software. , but continue to power up the board. The advantage of this is that it can prevent the repeated update of the target software, and improve the reliability and accuracy of the software update.

本实施例的技术方案,通过确认板卡中目标软件的校验和与外部升级文件的校验和是否一致,当二者不一致时才会对目标软件进行更新,一致时则维持板卡的默认工作状态,达到了防止软件重复更新的效果,提高了软件更新的可靠性及准确性。The technical solution of this embodiment is to confirm whether the checksum of the target software in the board is consistent with the checksum of the external upgrade file. When the two are inconsistent, the target software will be updated, and if they are consistent, the default of the board will be maintained. The working state has achieved the effect of preventing repeated software updates, and improved the reliability and accuracy of software updates.

实施例四Embodiment 4

图4为本发明实施例四提供的一种板卡软件版本更新方法的流程示意图。本实施例以上述各实施例为基础进行优化,提供了优选的板卡软件版本更新的方法,具体是,在基于所述外部升级文件对目标软件进行更新之前进一步优化为,还包括:读取外部升级文件的校验和;将校验和替换板卡中目标软件对应的校验和。FIG. 4 is a schematic flowchart of a method for updating a software version of a board card according to Embodiment 4 of the present invention. This embodiment is optimized on the basis of the above-mentioned embodiments, and provides a preferred method for updating the software version of the board card. Specifically, before updating the target software based on the external upgrade file, the further optimization further includes: reading Checksum of the external upgrade file; replace the checksum with the corresponding checksum of the target software in the board.

S410、当检测到有外部升级文件时获取外部升级文件的校验和。S410. Obtain the checksum of the external upgrade file when it is detected that there is an external upgrade file.

S420、确认板卡中外部升级文件对应的目标软件的校验和与外部升级文件的校验和是否一致。S420. Confirm whether the checksum of the target software corresponding to the external upgrade file in the board is consistent with the checksum of the external upgrade file.

S430、若目标软件的校验和与外部升级文件的校验和不一致,则读取外部升级文件的校验和。S430. If the checksum of the target software is inconsistent with the checksum of the external upgrade file, read the checksum of the external upgrade file.

具体的,目标软件的校验和与外部升级文件的校验和不一致说明目标软件的版本与外部升级文件的版本不一样,即目标软件需要进行更新,此时再次获取外部升级文件的校验和的目的在于,替换目标软件更新之后的校验和。Specifically, the inconsistency between the checksum of the target software and the checksum of the external upgrade file indicates that the version of the target software is different from the version of the external upgrade file, that is, the target software needs to be updated. At this time, the checksum of the external upgrade file is obtained again. The purpose is to replace the checksum after the target software is updated.

S440、将校验和替换板卡中目标软件对应的校验和。S440. Replace the checksum with the checksum corresponding to the target software in the board.

具体的,校验和作为目标软件版本信息的标志之一,将外部升级文件的校验和替换目标软件对应的校验和的目的在于,可以避免目标软件更新之后,因校验和与更新后的目标软件不匹配的问题,而导致误触发重复更新操作。Specifically, the checksum is used as one of the signs of the target software version information, and the purpose of replacing the checksum of the external upgrade file with the checksum corresponding to the target software is to prevent the target software from being updated due to the difference between the checksum and the updated target software. The target software does not match the problem, which causes the repeated update operation to be triggered by mistake.

示例性的,对于电视机板卡,在软件更新之前,板卡里面的软件要记录下新的软件安装文件的校验和并且传入Mboot层进行记录,而旧版本的软件校验和数据会被擦除,然后再进行软件更新。这样做的好处在于,当板卡掉电后重新上电时,在硬件驱动层进行检验和比对时,可以防止因软件更新了而软件的校验和没有更新而导致的重复更新的问题,提高软件更新的可靠性及准确性。Exemplarily, for a TV board, before the software is updated, the software in the board needs to record the checksum of the new software installation file and transfer it to the Mboot layer for recording, while the software checksum data of the old version will be recorded. be wiped before a software update. The advantage of this is that when the board is powered off and then powered on again, the checksum comparison at the hardware driver layer can prevent the problem of repeated updates caused by the software update but the software checksum is not updated. Improve the reliability and accuracy of software updates.

S450、基于外部升级文件对目标软件进行更新。S450. Update the target software based on the external upgrade file.

本实施例的技术方案,通过确认板卡中目标软件的校验和与外部升级文件的校验和是否一致,当二者不一致时才会对目标软件进行更新,一致时则维持板卡的默认工作状态,达到了防止软件重复更新的效果,提高了软件更新的可靠性及准确性。The technical solution of this embodiment is to confirm whether the checksum of the target software in the board is consistent with the checksum of the external upgrade file. When the two are inconsistent, the target software will be updated, and if they are consistent, the default of the board will be maintained. The working state has achieved the effect of preventing repeated software updates, and improved the reliability and accuracy of software updates.

实施例五Embodiment 5

图5为本发明实施例五提供的一种板卡软件版本更新装置的流程示意图。该装置可适用于板卡中进行软件版本更新的情况,该装置可由硬件和/或软件组成,并一般可集成在板卡以及所有包含软件版本更新功能的电路板中。参考图5,板卡软件版本更新装置包括:升级文件校验和获取单元510、校验和一致性确认单元520、目标软件更新单元530,下面对各模块进行具体说明。FIG. 5 is a schematic flowchart of an apparatus for updating a software version of a board card according to Embodiment 5 of the present invention. The device can be applied to the situation of updating the software version in the board. The device can be composed of hardware and/or software, and can generally be integrated in the board and all circuit boards that include the function of updating the software version. Referring to FIG. 5 , the board card software version update device includes an upgrade file checksum acquisition unit 510 , a checksum consistency confirmation unit 520 , and a target software update unit 530 . Each module will be described in detail below.

升级文件校验和获取单元510,用于当检测到有外部升级文件时获取所述外部升级文件的校验和;an upgrade file checksum obtaining unit 510, configured to obtain the checksum of the external upgrade file when an external upgrade file is detected;

校验和一致性确认单元520,用于确认板卡中所述外部升级文件对应的目标软件的校验和与所述外部升级文件的校验和是否一致;The checksum consistency confirmation unit 520 is used to confirm whether the checksum of the target software corresponding to the external upgrade file in the board is consistent with the checksum of the external upgrade file;

目标软件更新单元530,用于若所述目标软件的校验和与所述外部升级文件的校验和不一致,则基于所述外部升级文件对所述目标软件进行更新。The target software updating unit 530 is configured to update the target software based on the external upgrade file if the checksum of the target software is inconsistent with the checksum of the external upgrade file.

可选的,还包括:Optionally, also include:

安装文件校验和获取单元,用于在当检测到有外部升级文件时获取所述外部升级文件的校验和之前,记录所述板卡中的所有软件的安装文件的校验和。The installation file checksum obtaining unit is configured to record the checksum of all software installation files in the board before obtaining the checksum of the external upgrade file when it is detected that there is an external upgrade file.

可选的,升级文件校验和获取单元510具体用于:Optionally, the upgrade file checksum acquisition unit 510 is specifically used for:

当所述板卡检测到连接有外部存储设备时,检测所述外部存储设备中是否存在外部升级文件;When the board detects that an external storage device is connected, detect whether there is an external upgrade file in the external storage device;

若所述外部存储设备中存在所述外部升级文件,获取所述外部升级文件的校验和。If the external upgrade file exists in the external storage device, obtain a checksum of the external upgrade file.

可选的,还包括:Optionally, also include:

工作状态维持单元,用于在确认板卡中所述外部升级文件对应的目标软件的校验和与所述外部升级文件的校验和是否一致之后,若所述目标软件的校验和与所述外部升级文件的校验和一致,则维持所述板卡的默认工作状态。The working state maintenance unit is used to confirm whether the checksum of the target software corresponding to the external upgrade file in the board is consistent with the checksum of the external upgrade file, if the checksum of the target software is consistent with the checksum of the external upgrade file. If the checksum of the external upgrade file is consistent, the default working state of the board is maintained.

可选的,还包括:Optionally, also include:

校验和读取单元,用于在基于所述外部升级文件对所述目标软件进行更新之前,读取所述外部升级文件的校验和;a checksum reading unit, configured to read the checksum of the external upgrade file before updating the target software based on the external upgrade file;

校验和替换单元,用于将所述校验和替换所述板卡中所述目标软件对应的校验和。A checksum replacement unit, configured to replace the checksum with the checksum corresponding to the target software in the board.

上述产品可执行本发明任意实施例所提供的方法,具备执行方法相应的功能模块和有益效果。The above product can execute the method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention. The scope is determined by the scope of the appended claims.

Claims (8)

1. A method for updating the software version of a board card is characterized in that the method is executed by a hardware driving layer of the board card under the condition that the board card is powered off and then powered on again, and comprises the following steps:
when the board card detects that an external storage device is connected, detecting whether an external upgrade file exists in the external storage device;
if the external upgrading file exists in the external storage equipment, acquiring a checksum of the external upgrading file by reading a file name of the external file;
confirming whether the checksum of the target software corresponding to the external upgrade file in the board card is consistent with the checksum of the external upgrade file;
if the checksum of the target software is inconsistent with the checksum of the external upgrade file, updating the target software based on the external upgrade file;
and if the checksum of the target software is consistent with the checksum of the external upgrade file, indicating that the versions of the target software and the external upgrade file are consistent, and not updating.
2. The method of claim 1, before detecting whether an external upgrade file exists in an external storage device when the board card detects that the external storage device is connected, further comprising:
and recording the checksum of the installation files of all the software in the board card.
3. The method of claim 1, after determining whether the checksum of the target software corresponding to the external upgrade file in the board card is consistent with the checksum of the external upgrade file, further comprising:
and if the checksum of the target software is consistent with the checksum of the external upgrade file, maintaining the default working state of the board card.
4. The method of claim 1, further comprising, prior to said updating the target software based on the external upgrade file:
reading the checksum of the external upgrading file;
and replacing the checksum corresponding to the target software in the board card with the checksum.
5. A board software version updating device is characterized in that the device is configured on a hardware driving layer of a board, and comprises:
the upgrade file verification and acquisition unit is specifically used for detecting that an external storage device is connected to the board card and detecting whether an external upgrade file exists in the external storage device when the board card is powered off and then powered on again; if the external upgrading file exists in the external storage equipment, acquiring a checksum of the external upgrading file by reading a file name of the external file;
the verification and consistency confirming unit is used for confirming whether the verification sum of the target software corresponding to the external upgrade file in the board card is consistent with the verification sum of the external upgrade file;
the target software updating unit is used for updating the target software based on the external upgrade file if the checksum of the target software is inconsistent with the checksum of the external upgrade file; and if the checksum of the target software is consistent with the checksum of the external upgrade file, indicating that the versions of the target software and the external upgrade file are consistent, and not updating.
6. The apparatus of claim 5, further comprising:
and the installation file checksum acquisition unit is used for recording the checksums of the installation files of all the software in the board card before acquiring the checksum of the external upgrade file when the external upgrade file is detected.
7. The apparatus of claim 5, further comprising:
and the working state maintaining unit is used for maintaining the default working state of the board card if the checksum of the target software is consistent with the checksum of the external upgrade file after confirming whether the checksum of the target software corresponding to the external upgrade file in the board card is consistent with the checksum of the external upgrade file.
8. The apparatus of claim 5, further comprising:
a checksum reading unit, configured to read a checksum of the external upgrade file before updating the target software based on the external upgrade file;
and the checksum replacing unit is used for replacing the checksum corresponding to the target software in the board card with the checksum.
CN201611090012.3A 2016-12-01 2016-12-01 A kind of board card software version update method and device Active CN106775847B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611090012.3A CN106775847B (en) 2016-12-01 2016-12-01 A kind of board card software version update method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611090012.3A CN106775847B (en) 2016-12-01 2016-12-01 A kind of board card software version update method and device

Publications (2)

Publication Number Publication Date
CN106775847A CN106775847A (en) 2017-05-31
CN106775847B true CN106775847B (en) 2020-12-29

Family

ID=58915517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611090012.3A Active CN106775847B (en) 2016-12-01 2016-12-01 A kind of board card software version update method and device

Country Status (1)

Country Link
CN (1) CN106775847B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107562622A (en) * 2017-08-29 2018-01-09 郑州云海信息技术有限公司 A kind of method of testing and system of checking MCS system firmware automatically updating functions
CN108334373A (en) * 2017-10-16 2018-07-27 深圳市路畅科技股份有限公司 A kind of method and system of more MCU upgradings
CN113157307B (en) * 2020-01-07 2024-07-30 普天信息技术有限公司 Software version upgrading method and device
CN111510220B (en) * 2020-04-08 2021-10-08 武汉光迅科技股份有限公司 A transceiver integrated optical module with a USB Type-C electrical port

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008049060A2 (en) * 2006-10-18 2008-04-24 Toby Klusmeyer System, method, and device for updating programmable electronic equipment with a transport device from a deployment server via the internet or other communication medium
CN102117218A (en) * 2011-02-17 2011-07-06 中兴通讯股份有限公司 Embedded equipment and method for downloading program of programmable logic device in same
CN102184109A (en) * 2011-04-12 2011-09-14 杭州华三通信技术有限公司 Boot software automatic updating control method and device
CN102236569A (en) * 2011-07-20 2011-11-09 大唐移动通信设备有限公司 Embedded system and starting method thereof
US8271933B1 (en) * 2009-12-30 2012-09-18 Cadence Design Systems, Inc. Pin unspecific device planning for printed circuit board layout
CN104428751A (en) * 2014-06-27 2015-03-18 华为技术有限公司 Program data updating method and equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541593A (en) * 2011-12-20 2012-07-04 福建星网视易信息系统有限公司 Rapid comparison method of versions of remote files
CN103197597B (en) * 2013-04-09 2015-11-04 上海维宏电子科技股份有限公司 The method that the upgrading of the kinetic control system be separated with human-computer interaction interface controls
CN103473088B (en) * 2013-08-30 2018-01-02 北京远特科技股份有限公司 A kind of single-chip microcomputer online upgrading method and system
CN104539696B (en) * 2014-12-26 2018-09-11 北京像素软件科技股份有限公司 A kind of method and system of client incremental update
CN105068831A (en) * 2015-07-30 2015-11-18 深圳市创凯电子有限公司 Program upgrading method and apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008049060A2 (en) * 2006-10-18 2008-04-24 Toby Klusmeyer System, method, and device for updating programmable electronic equipment with a transport device from a deployment server via the internet or other communication medium
US8271933B1 (en) * 2009-12-30 2012-09-18 Cadence Design Systems, Inc. Pin unspecific device planning for printed circuit board layout
CN102117218A (en) * 2011-02-17 2011-07-06 中兴通讯股份有限公司 Embedded equipment and method for downloading program of programmable logic device in same
CN102184109A (en) * 2011-04-12 2011-09-14 杭州华三通信技术有限公司 Boot software automatic updating control method and device
CN102236569A (en) * 2011-07-20 2011-11-09 大唐移动通信设备有限公司 Embedded system and starting method thereof
CN104428751A (en) * 2014-06-27 2015-03-18 华为技术有限公司 Program data updating method and equipment

Also Published As

Publication number Publication date
CN106775847A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN103150231B (en) Computer boot method and computer system
JP6291248B2 (en) Firmware upgrade error detection and automatic rollback
TWI479309B (en) Apparatus and method for controlling a solid state disk
CN106775847B (en) A kind of board card software version update method and device
US20140365823A1 (en) Information processing device, information processing method, and computer program
US8060794B2 (en) NAND flash memory and method for managing data thereof
US9563497B2 (en) Correcting a failure associated with a current firmware image
CN102467440A (en) Internal memory error detection system and method
CN102929665B (en) For the system of drive installation
CN108874582A (en) A kind of system recovery method, device and terminal
CN112015447B (en) System updating method and device of electronic equipment, electronic equipment and storage medium
CN105468544B (en) Method and device for realizing power-down prevention file system and power-down prevention file system
CN109614118A (en) A kind of SPI Flash firmware burning method and device
CN113867812A (en) Method, system, equipment and medium for BMC to acquire link information
CN113672306A (en) Method, device, system and medium for recovery from abnormal self-checking of server components
TWI620120B (en) Data loading method and motherboard
CN116483409A (en) Remote firmware updating method, system, electronic equipment and storage medium
CN105868101B (en) A kind of method for testing software
CN113190256A (en) Upgrading method, device and equipment
CN110196730B (en) Hot patch management method, device and storage medium of application program
CN112114220A (en) Fault detection method and device
CN116755735A (en) Online upgrading method and device for embedded software, peritoneal dialysis instrument and storage medium
US8626992B2 (en) Storage device with identification information
CN118302746A (en) Partition table updating method and device, electronic equipment and storage medium
KR101911182B1 (en) Semiconductor test device capable of managing the life of the gender and method thereof

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