CN117453261A - Equipment upgrade data verification methods, storage media and electronic equipment - Google Patents
Equipment upgrade data verification methods, storage media and electronic equipment Download PDFInfo
- Publication number
- CN117453261A CN117453261A CN202311504981.9A CN202311504981A CN117453261A CN 117453261 A CN117453261 A CN 117453261A CN 202311504981 A CN202311504981 A CN 202311504981A CN 117453261 A CN117453261 A CN 117453261A
- Authority
- CN
- China
- Prior art keywords
- upgrade
- verification
- upgrade data
- data
- target device
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/656—Updates while running
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1004—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
技术领域Technical field
本发明涉及设备升级校验领域,具体而言,涉及一种设备的升级数据校验方法、存储介质及电子设备。The present invention relates to the field of equipment upgrade verification. Specifically, it relates to an equipment upgrade data verification method, a storage medium and an electronic device.
背景技术Background technique
相关领域中,需要对设备所使用的软件或系统进行更新、升级或替换,以提升设备的性能、功能或安全性。In related fields, the software or system used by the device needs to be updated, upgraded or replaced to improve the performance, functionality or security of the device.
对设备进行在线升级时,存在升级包接收、存储、读取、转存的过程,当由于电源不稳、环境电磁干扰等因素存在时,会导致实际写入的运行程序不正确,程序运行存在隐患,目前相关技术中缺乏在设备升级过程中,对升级数据的校验方法,从而造成设备升级效率较低的技术问题。When upgrading the device online, there is a process of receiving, storing, reading, and transferring the upgrade package. When factors such as unstable power supply and environmental electromagnetic interference exist, the actual written running program will be incorrect and the program operation will fail. Hidden danger: Currently, the relevant technology lacks a verification method for the upgrade data during the equipment upgrade process, resulting in technical problems such as low equipment upgrade efficiency.
针对上述的问题,目前尚未提出有效的解决方案。In response to the above problems, no effective solution has yet been proposed.
发明内容Contents of the invention
本发明实施例提供了一种设备的升级数据校验方法、存储介质及电子设备,以至少解决相关技术中设备升级效率较低的技术问题。Embodiments of the present invention provide a device upgrade data verification method, a storage medium and an electronic device, so as to at least solve the technical problem of low device upgrade efficiency in related technologies.
根据本发明实施例的一个方面,提供了一种设备的升级数据校验方法,包括:响应于接收到对目标设备进行升级的升级指令,控制目标设备接收目标升级数据对应的多个第一升级包,将多个第一升级包保存至目标设备的缓存区域;在目标设备升级过程中,调取多个第一升级包,对多个第一升级包进行循环冗余校验,得到第一校验结果,其中,第一校验结果用于表示多个第一升级包是否校验通过;响应于第一校验结果用于表示多个第一升级包校验通过,调取多个第一升级包组成的第一升级数据,对第一升级数据进行循环冗余校验,得到第二校验结果,其中,第二校验结果用于表示第一升级数据是否校验通过。According to an aspect of an embodiment of the present invention, a method for verifying upgrade data of a device is provided, including: in response to receiving an upgrade instruction to upgrade a target device, controlling the target device to receive a plurality of first upgrades corresponding to the target upgrade data. package, and save multiple first upgrade packages to the cache area of the target device; during the upgrade process of the target device, retrieve multiple first upgrade packages, perform cyclic redundancy checks on the multiple first upgrade packages, and obtain the first Verification result, wherein the first verification result is used to indicate whether the plurality of first upgrade packages have passed verification; in response to the first verification result being used to indicate that the plurality of first upgrade packages have passed verification, retrieve the plurality of first upgrade packages The first upgrade data composed of an upgrade package is subjected to cyclic redundancy check on the first upgrade data to obtain a second check result, where the second check result is used to indicate whether the first upgrade data passes the check.
可选地,该设备的升级数据校验方法,还包括:响应于第二校验结果用于表示第一升级数据校验通过,将第一升级数据从目标设备的缓存区域写入目标设备的运行区域得到第二升级数据,并对第二升级数据进行循环冗余校验得到第三校验结果,其中,第三校验结果用于表示第二升级数据是否校验通过;响应于第三校验结果用于表示第二升级数据校验未通过,将缓存区域的第一升级数据重新写入至运行区域得到第三升级数据;调取运行区域的第三升级数据,对第三升级数据进行循环冗余校验,得到第四校验结果,其中,第四校验结果用于表示第三升级数据是否校验通过;响应于第三校验结果用于表示第二升级数据校验通过,控制目标设备运行第二升级数据,并确定目标设备升级成功。Optionally, the upgrade data verification method of the device further includes: in response to the second verification result indicating that the first upgrade data verification passes, writing the first upgrade data from the cache area of the target device to the target device. The running area obtains the second upgrade data, and performs a cyclic redundancy check on the second upgrade data to obtain a third verification result, where the third verification result is used to indicate whether the second upgrade data passes the verification; in response to the third The verification result is used to indicate that the second upgrade data verification has not passed. Rewrite the first upgrade data in the cache area to the running area to obtain the third upgrade data; retrieve the third upgrade data in the running area, and compare the third upgrade data Perform a cyclic redundancy check to obtain a fourth verification result, where the fourth verification result is used to indicate whether the third upgrade data has passed the verification; responding to the third verification result is used to indicate that the second upgrade data has passed the verification , control the target device to run the second upgrade data, and determine that the target device is successfully upgraded.
可选地,该设备的升级数据校验方法,还包括:响应于第四校验结果用于表示第三升级数据未校验通过,执行将缓存区域的第一升级数据移动至运行区域的步骤,直至从运行区域调取得到的第三升级数据校验通过;响应于第四校验结果用于表示第三升级数据校验通过,控制目标设备运行第三升级数据,并确定目标设备升级成功。Optionally, the upgrade data verification method of the device further includes: in response to the fourth verification result indicating that the third upgrade data has not passed verification, performing the step of moving the first upgrade data in the cache area to the running area. , until the third upgrade data retrieved from the operating area passes the verification; in response to the fourth verification result indicating that the third upgrade data verification passes, control the target device to run the third upgrade data, and determine that the target device is upgraded successfully .
可选地,该设备的升级数据校验方法,还包括:响应于将缓存区域的第一升级数据移动至运行区域的执行次数大于预设执行次数,禁止执行将缓存区域的第一升级数据移动至运行区域的步骤,并控制目标设备进入到预设模式,其中,预设模式用于等待新的升级数据。Optionally, the upgrade data verification method of the device further includes: in response to the number of executions of moving the first upgrade data in the cache area to the running area being greater than the preset number of executions, prohibiting execution of moving the first upgrade data in the cache area. Steps to the running area and control the target device to enter the preset mode, where the preset mode is used to wait for new upgrade data.
可选地,对多个第一升级包进行循环冗余校验,得到第一校验结果,包括:去除多个第一升级包中的第一校验码,得到多个第二升级包;基于多个第二升级包生成第一多项式;对多个第一升级包和第一多项式进行除法运算,得到第一运算结果,其中,第一运算结果用于表示除法运算得到的第一余数是否为预设数值;响应于第一运算结果用于表示第一余数为预设数值,确定第一校验结果为多个第一升级包校验通过;响应于第一运算结果用于表示第一余数不是预设数值,确定第一校验结果为多个第一升级包校验未通过。Optionally, performing a cyclic redundancy check on the plurality of first upgrade packages to obtain a first verification result includes: removing the first check codes in the plurality of first upgrade packages to obtain a plurality of second upgrade packages; Generate a first polynomial based on a plurality of second upgrade packages; perform a division operation on the plurality of first upgrade packages and the first polynomial to obtain a first operation result, where the first operation result is used to represent the result obtained by the division operation Whether the first remainder is a preset value; in response to the first operation result indicating that the first remainder is a preset value, it is determined that the first verification result is that multiple first upgrade packages pass the verification; in response to the first operation The result is used to indicate that the first remainder is not a preset value, and it is determined that the first verification result is that the verification of multiple first upgrade packages has failed.
可选地,该设备的升级数据校验方法,还包括:响应于第一校验结果用于表示多个第一升级包校验未通过,中止目标设备的升级过程。Optionally, the upgrade data verification method of the device further includes: in response to the first verification result indicating that multiple first upgrade package verifications have failed, aborting the upgrade process of the target device.
可选地,对第一升级数据进行循环冗余校验,得到第二校验结果,包括:去除第一升级数据中的第二校验码,得到第三升级数据;基于第三升级数据生成第二多项式;对第一升级数据和第二多项式进行除法运算,得到第二运算结果,其中,第二运算结果用于表示除法运算得到的第二余数是否为预设数值;响应于第二运算结果用于表示第二余数为预设数值,确定第二校验结果为第一升级数据校验通过;响应于第二运算结果用于表示第二余数不是预设数值,确定第一校验结果为第一升级数据校验未通过。Optionally, performing a cyclic redundancy check on the first upgrade data to obtain the second verification result includes: removing the second check code in the first upgrade data to obtain the third upgrade data; and generating the third upgrade data based on the third upgrade data. A second polynomial; perform a division operation on the first upgrade data and the second polynomial to obtain a second operation result, where the second operation result is used to indicate whether the second remainder obtained by the division operation is a preset value; In response to the second operation result indicating that the second remainder is a preset value, it is determined that the second verification result is that the first upgrade data verification passes; in response to the second operation result indicating that the second remainder is not a preset value , it is determined that the first verification result is that the first upgrade data verification fails.
可选地,该设备的升级数据校验方法,还包括:响应于第二校验结果用于表示第一升级数据未校验通过,控制目标设备运行历史升级数据,并确定目标设备升级失败。Optionally, the upgrade data verification method of the device further includes: in response to the second verification result indicating that the first upgrade data has not passed verification, controlling the target device to run the historical upgrade data, and determining that the target device fails to upgrade.
根据本发明实施例的另一方面,还提供了一种计算机可读存储介质,计算机可读存储介质包括存储的程序,其中,在程序运行时控制所在设备的处理器中执行上述设备的升级数据校验方法。According to another aspect of the embodiment of the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium includes a stored program, wherein the upgrade data of the above-mentioned device is executed in the processor of the device where the program is run. Verification method.
根据本发明实施例的另一方面,还提供了一种电子设备,一个或多个处理器;存储装置,用于存储一个或多个程序;当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器执行上述设备的升级数据校验方法。According to another aspect of the embodiment of the present invention, there is also provided an electronic device, one or more processors; a storage device for storing one or more programs; when one or more programs are processed by one or more processors Execution causes one or more processors to execute the upgrade data verification method of the above device.
在本发明实施例中,响应于接收到对目标设备进行升级的升级指令,控制目标设备接收目标升级数据对应的多个第一升级包,将多个第一升级包保存至目标设备的缓存区域;在目标设备升级过程中,调取多个第一升级包,对多个第一升级包进行循环冗余校验,得到第一校验结果,其中,第一校验结果用于表示多个第一升级包是否校验通过;响应于第一校验结果用于表示多个第一升级包校验通过,调取多个第一升级包组成的第一升级数据,对第一升级数据进行循环冗余校验,得到第二校验结果,其中,第二校验结果用于表示第一升级数据是否校验通过;通过对用于目标设备升级的多个第一升级包和第一升级数据依次进行循环冗余校验,实现了对目标设备升级过程中的目标升级数据进行了校验,提高了升级数据传输的可靠性和安全性,进一步确保了目标升级数据的完整性和准确性,进而解决了相关技术中设备升级效率较低的技术问题。In the embodiment of the present invention, in response to receiving an upgrade instruction to upgrade the target device, the target device is controlled to receive multiple first upgrade packages corresponding to the target upgrade data, and save the multiple first upgrade packages to the cache area of the target device. ; During the upgrade process of the target device, multiple first upgrade packages are retrieved, and cyclic redundancy checks are performed on the multiple first upgrade packages to obtain a first verification result, where the first verification result is used to represent multiple Whether the first upgrade package passes the verification; in response to the first verification result indicating that the plurality of first upgrade packages pass the verification, the first upgrade data composed of the plurality of first upgrade packages is retrieved, and the first upgrade data is Cyclic redundancy check is performed to obtain a second verification result, where the second verification result is used to indicate whether the first upgrade data passes the verification; by comparing multiple first upgrade packages used for upgrading the target device and the first upgrade The data is sequentially subjected to cyclic redundancy check, which realizes the verification of the target upgrade data during the target device upgrade process, improves the reliability and security of the upgrade data transmission, and further ensures the integrity and accuracy of the target upgrade data. , thereby solving the technical problem of low equipment upgrade efficiency in related technologies.
附图说明Description of the drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described here are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached picture:
图1是根据本发明实施例的一种设备的升级数据校验方法的流程图;Figure 1 is a flow chart of a device upgrade data verification method according to an embodiment of the present invention;
图2是根据本发明实施例的一种可选的设备的升级方法的流程图;Figure 2 is a flow chart of an optional device upgrade method according to an embodiment of the present invention;
图3是根据本申请实施例的一种设备的升级数据校验装置的示意图。Figure 3 is a schematic diagram of an upgrade data verification device of a device according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only These are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts should fall within the scope of protection of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the invention described herein are capable of being practiced in sequences other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus that encompasses a series of steps or units and need not be limited to those explicitly listed. Those steps or elements may instead include other steps or elements not expressly listed or inherent to the process, method, product or apparatus.
实施例1Example 1
根据本发明实施例,提供了一种设备的升级数据校验方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present invention, an embodiment of a device upgrade data verification method is provided. It should be noted that the steps shown in the flow chart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, Also, although a logical order is shown in the flowchart diagrams, in some cases the steps shown or described may be performed in a different order than herein.
图1是根据本发明实施例的一种设备的升级数据校验方法的流程图,如图1所示,该方法包括如下步骤:Figure 1 is a flow chart of a device upgrade data verification method according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
步骤S102,响应于接收到对目标设备进行升级的升级指令,控制目标设备接收目标升级数据对应的多个第一升级包,将多个第一升级包保存至目标设备的缓存区域。Step S102, in response to receiving an upgrade instruction to upgrade the target device, control the target device to receive multiple first upgrade packages corresponding to the target upgrade data, and save the multiple first upgrade packages to a cache area of the target device.
上述的目标设备可以是指待进行系统升级或数据更新的设备,目标设备拥有缓存区域和运行区域,其中,缓存区域用于接收并暂时存储下载好的升级数据文件,运行区域用于对下载好的升级数据文件进行解析,并对目标设备进行系统升级或数据更新任务。The above-mentioned target device may refer to a device to be upgraded or data updated. The target device has a cache area and a running area. The cache area is used to receive and temporarily store the downloaded upgrade data files, and the running area is used to store the downloaded upgrade data files. Analyze the upgrade data file and perform system upgrade or data update tasks on the target device.
上述的目标升级数据可以是目标设备进行系统升级或数据更新所需要的数据。The above target upgrade data may be data required by the target device for system upgrade or data update.
上述的多个第一升级包可以是存储了目标升级数据的多个升级数据单包。The above-mentioned plurality of first upgrade packages may be multiple upgrade data single packages that store target upgrade data.
上述的缓存区域可以是目标设备中用于临时存储数据的区域,缓存区域通常位于设备的内存或存储器中,并且具有较小的容量。The above-mentioned cache area may be an area in the target device used to temporarily store data. The cache area is usually located in the memory or storage of the device and has a small capacity.
在一种可选的实施例中,对目标设备所使用的软件或系统进行升级可以分为被动升级和主动升级,其中,被动升级可以是指设备会定期检查升级服务器是否有新的固件版本可用,如果有,则自动下载固件并进行升级,例如,被动升级可以用于对目标设备存在的重大安全漏洞及时,强制地进行升级;而主动升级可以是指目标设备会通知用户有新的数据版本可用,并提供相应的升级界面或指南,用户可以按照指示进行下载和安装,主动升级下用户可以自由选择升级的时间和版本,例如,主动升级可以用于对目标设备的一些优化,用户可以根据自身需要选择是否进行升级及可以预先设定目标设备进行升级的时间;在本实施例中,目标设备可以根据需要选择被动升级或主动升级的方式进行升级。In an optional embodiment, upgrading the software or system used by the target device can be divided into passive upgrade and active upgrade. Passive upgrade can mean that the device regularly checks whether a new firmware version is available on the upgrade server. , if there is, the firmware is automatically downloaded and upgraded. For example, passive upgrade can be used to promptly and forcefully upgrade major security vulnerabilities in the target device; active upgrade can mean that the target device will notify the user of a new data version. is available and provides the corresponding upgrade interface or guide. Users can download and install according to the instructions. Under active upgrade, users can freely choose the time and version of the upgrade. For example, active upgrade can be used to optimize the target device. Users can follow the instructions to download and install. You need to choose whether to upgrade and you can preset the time for the target device to upgrade; in this embodiment, the target device can choose to upgrade passively or actively as needed.
在一种可选的实施例中,目标设备接收目标升级数据对应的多个第一升级包可以是按照第一升级包到达的先后顺序进行下载,先到达的第一升级包先下载;或选择多个第一升级包中文件大小最小的第一升级包先下载;还可以为每个第一升级包分配一个优先级,优先级高的第一升级先下载,提高了目标设备对多个第一升级包的下载效率。In an optional embodiment, when the target device receives multiple first upgrade packages corresponding to the target upgrade data, the target device may download the first upgrade packages in the order in which they arrive, with the first upgrade package arriving first being downloaded first; or selecting The first upgrade package with the smallest file size among multiple first upgrade packages is downloaded first; each first upgrade package can also be assigned a priority, and the first upgrade with a higher priority is downloaded first, which improves the target device's ability to detect multiple first upgrade packages. Download efficiency of an upgrade package.
在一种可选的实施例中,目标设备在接收到目标升级数据对应的多个第一升级包后,将多个第一升级包保存至目标设备的缓存区域,便于后续对下载好的升级数据文件进行解析,从而完成对目标设备进行系统升级或数据更新任务。In an optional embodiment, after receiving multiple first upgrade packages corresponding to the target upgrade data, the target device saves the multiple first upgrade packages to the cache area of the target device to facilitate subsequent downloaded upgrades. The data file is parsed to complete the system upgrade or data update task of the target device.
步骤S104,在目标设备升级过程中,调取多个第一升级包,对多个第一升级包进行循环冗余校验,得到第一校验结果。Step S104: During the upgrade process of the target device, a plurality of first upgrade packages are retrieved, and a cyclic redundancy check is performed on the plurality of first upgrade packages to obtain a first verification result.
其中,第一校验结果用于表示多个第一升级包是否校验通过。The first verification result is used to indicate whether the plurality of first upgrade packages pass the verification.
上述的循环冗余校验(Cyclic Redundancy Check,简称为CRC)可以是一种数据校验方法,用于对第一升级包进行循环冗余校验,检测数据传输或存储过程中是否出现错误。The above-mentioned Cyclic Redundancy Check (CRC) may be a data verification method used to perform cyclic redundancy check on the first upgrade package and detect whether errors occur during data transmission or storage.
在一种可选的实施例中,目标设备对多个第一升级包进行循环冗余校验前,可以先对多个第一升级包进行校验和,即可以将第一升级包中的每个字节相加,并将结果存储在一个特定的字段中,目标设备在接收到第一升级包后,也会计算校验和,并将其与发送方计算的校验和进行比较,如果两者相等,则认为数据包传输正常;否则,认为发生了数据传输错误,在本实施例中,校验和未通过的第一升级包,目标设备可以进行删除,并请求发送方重传该第一升级包,由于校验和方法相较于循环冗余校验计算简单且计算速度快,目标设备对多个第一升级包进行循环冗余校验前,先对多个第一升级包进行校验和可以在使用算力较少的情况下提前发现传输错误的第一升级包,节省了目标设备的算力资源,提升了对目标设备对多个第一升级包进行校验的效率。In an optional embodiment, before the target device performs a cyclic redundancy check on the multiple first upgrade packages, the target device may first perform a checksum on the multiple first upgrade packages, that is, the target device may perform a checksum on the multiple first upgrade packages. Each byte is added and the result is stored in a specific field. After receiving the first upgrade package, the target device will also calculate the checksum and compare it with the checksum calculated by the sender. If the two are equal, the data packet is considered to be transmitted normally; otherwise, a data transmission error is considered to have occurred. In this embodiment, the target device can delete the first upgrade package that fails the checksum and request the sender to retransmit it. For this first upgrade package, since the checksum method is simpler and faster to calculate than the cyclic redundancy check, the target device first performs the cyclic redundancy check on the multiple first upgrade packages. Package checksum can detect the first upgrade package with transmission errors in advance while using less computing power, saving the computing resources of the target device and improving the ability of the target device to verify multiple first upgrade packages. efficiency.
在一种可选的实施例中,对多个升级数据单包进行循环冗余校验可以及时发现升级数据单包中的位翻转、插入和删除等错误,并进行纠正,避免数据传输过程中的损坏和错误;如果升级数据单包在传输过程中发生了损坏或丢失,CRC校验将失败,接收方可以请求重新传输升级数据单包,可以确保接收到的升级数据单包与发送的升级数据单包完全一致;由于CRC算法具有较低的碰撞概率,因此,即使有人试图通过修改升级数据单包来进行攻击或篡改,由于CRC校验会失败,接收方可以及时发现并拒绝接收被篡改的升级数据单包,提高了目标设备接收到的升级数据单包的安全性。In an optional embodiment, performing cyclic redundancy check on multiple upgrade data single packets can timely detect errors such as bit flips, insertions, and deletions in the upgrade data single packets, and correct them to avoid errors during data transmission. Damage and errors; if the upgrade data single package is damaged or lost during transmission, the CRC check will fail, and the receiver can request to retransmit the upgrade data single package to ensure that the upgrade data single package received is consistent with the sent upgrade The single data packets are completely consistent; because the CRC algorithm has a low collision probability, even if someone tries to attack or tamper by modifying the upgraded data single packet, the CRC check will fail, and the receiver can discover in time and refuse to receive the tampered The upgrade data single packet improves the security of the upgrade data single packet received by the target device.
通过步骤S104,先对目标设备接收到的各升级数据单包分别进行循环冗余校验,若有升级数据单包出现循环冗余校验失败的,目标设备可以请求只重新传输该升级数据单包,避免重传整个升级数据包对传输资源造成浪费,对各升级数据单包先分别进行循环冗余校验可以确保各升级数据单包的完整性、准确性和安全性,提高了数据传输的可靠性和稳定性。Through step S104, a cyclic redundancy check is first performed on each upgrade data single package received by the target device. If any upgrade data single package fails the cyclic redundancy check, the target device can request to retransmit only the upgrade data single package. package to avoid the waste of transmission resources caused by retransmitting the entire upgrade data package. Performing a cyclic redundancy check on each upgrade data single package can ensure the integrity, accuracy and security of each upgrade data single package, improving data transmission. reliability and stability.
步骤S106,响应于第一校验结果用于表示多个第一升级包校验通过,调取多个第一升级包组成的第一升级数据,对第一升级数据进行循环冗余校验,得到第二校验结果。Step S106, in response to the first verification result indicating that the plurality of first upgrade packages have passed the verification, retrieve the first upgrade data composed of the plurality of first upgrade packages, and perform a cyclic redundancy check on the first upgrade data, Get the second verification result.
其中,第二校验结果用于表示第一升级数据是否校验通过。The second verification result is used to indicate whether the first upgrade data passes the verification.
上述的第一升级数据可以是指由多个第一升级包组成,存储了目标升级数据的整个升级数据包。The above-mentioned first upgrade data may refer to an entire upgrade data package that is composed of multiple first upgrade packages and stores target upgrade data.
上述的循环冗余校验可以是一种数据校验方法,用于对第一升级数据进行循环冗余校验,检测数据传输或存储过程中是否出现错误。The above-mentioned cyclic redundancy check may be a data verification method used to perform cyclic redundancy check on the first upgrade data and detect whether errors occur during data transmission or storage.
在一种可选的实施例中,在确保目标设备接收到的各升级数据单包都正确后,目标设备可以创建一个树结构,树的根节点表示整个数据包,将数据单包作为树的叶子节点,根据数据单包的特征选择合适的位置插入到树中。插入的位置可以根据数据单包的某个属性值进行判断,例如按照数据单包的序列号或时间戳进行排序,继续插入其他数据单包,根据数据单包的特征选择合适的位置插入到树中,当所有数据单包都插入到树中后,整个数据包就被组成了,可以通过遍历树的方式,将树中的节点按照某种顺序组合起来,形成完整的数据包,需要注意的是,树的插入过程需要根据数据单包的特征进行判断和排序,以保证数据包的完整性和正确性,通过上述步骤目标设备可以将多个第一升级包组成第一升级数据。In an optional embodiment, after ensuring that each upgrade data single packet received by the target device is correct, the target device can create a tree structure. The root node of the tree represents the entire data packet, and the data single packet is used as the root of the tree. Leaf nodes are inserted into the tree at appropriate locations based on the characteristics of a single data packet. The insertion position can be judged based on a certain attribute value of the data packet. For example, sort according to the sequence number or timestamp of the data packet, continue to insert other data packets, and select the appropriate position to insert into the tree based on the characteristics of the data packet. , when all single data packets are inserted into the tree, the entire data packet is composed. The nodes in the tree can be combined in a certain order by traversing the tree to form a complete data packet. Things to note Yes, the tree insertion process needs to be judged and sorted based on the characteristics of single data packets to ensure the integrity and correctness of the data packets. Through the above steps, the target device can combine multiple first upgrade packages into the first upgrade data.
在一种可选的实施例中,在确保目标设备接收到的各升级数据单包都正确后,目标设备将各升级数据单包进行组合得到整个升级数据包,由于各升级数据单包组合得到整个升级数据包的过程中可能出现错误,导致整个升级数据包中包含的目标升级数据出现错误,需要对整个升级数据包进行循环冗余校验,对整个升级数据包进行循环冗余校验可以进一步增强数据的安全性,并降低数据被恶意篡改或者破坏的风险,从而保证了目标升级数据的完整性和准确性。In an optional embodiment, after ensuring that the upgrade data packets received by the target device are correct, the target device combines the upgrade data packets to obtain the entire upgrade data packet. Since the upgrade data packets are combined to obtain Errors may occur during the entire upgrade data package, resulting in errors in the target upgrade data contained in the entire upgrade data package. It is necessary to perform a cyclic redundancy check on the entire upgrade data package. Performing a cyclic redundancy check on the entire upgrade data package can This further enhances data security and reduces the risk of data being maliciously tampered with or destroyed, thus ensuring the integrity and accuracy of target upgrade data.
通过步骤S106,通过对第一升级数据进行循环冗余校验提高了数据传输的可靠性和安全性,进一步确保了目标升级数据的完整性和准确性。Through step S106, the reliability and security of data transmission are improved by performing cyclic redundancy check on the first upgrade data, further ensuring the integrity and accuracy of the target upgrade data.
在本发明实施例中,响应于接收到对目标设备进行升级的升级指令,控制目标设备接收目标升级数据对应的多个第一升级包,将多个第一升级包保存至目标设备的缓存区域;在目标设备升级过程中,调取多个第一升级包,对多个第一升级包进行循环冗余校验,得到第一校验结果,其中,第一校验结果用于表示多个第一升级包是否校验通过;响应于第一校验结果用于表示多个第一升级包校验通过,调取多个第一升级包组成的第一升级数据,对第一升级数据进行循环冗余校验,得到第二校验结果,其中,第二校验结果用于表示第一升级数据是否校验通过;通过对用于目标设备升级的多个第一升级包和第一升级数据依次进行循环冗余校验,实现了对目标设备升级过程中的目标升级数据进行了校验,提高了升级数据传输的可靠性和安全性,进一步确保了目标升级数据的完整性和准确性,进而解决了相关技术中设备升级效率较低的技术问题。In the embodiment of the present invention, in response to receiving an upgrade instruction to upgrade the target device, the target device is controlled to receive multiple first upgrade packages corresponding to the target upgrade data, and save the multiple first upgrade packages to the cache area of the target device. ; During the upgrade process of the target device, multiple first upgrade packages are retrieved, and cyclic redundancy checks are performed on the multiple first upgrade packages to obtain a first verification result, where the first verification result is used to represent multiple Whether the first upgrade package passes the verification; in response to the first verification result indicating that the plurality of first upgrade packages pass the verification, the first upgrade data composed of the plurality of first upgrade packages is retrieved, and the first upgrade data is Cyclic redundancy check is performed to obtain a second verification result, where the second verification result is used to indicate whether the first upgrade data passes the verification; by comparing multiple first upgrade packages used for upgrading the target device and the first upgrade The data is sequentially subjected to cyclic redundancy check, which realizes the verification of the target upgrade data during the target device upgrade process, improves the reliability and security of the upgrade data transmission, and further ensures the integrity and accuracy of the target upgrade data. , thereby solving the technical problem of low equipment upgrade efficiency in related technologies.
可选地,该设备的升级数据校验方法,还包括:响应于第二校验结果用于表示第一升级数据校验通过,将第一升级数据从目标设备的缓存区域写入目标设备的运行区域得到第二升级数据,并对第二升级数据进行循环冗余校验得到第三校验结果,其中,第三校验结果用于表示第二升级数据是否校验通过;响应于第三校验结果用于表示第二升级数据校验未通过,将缓存区域的第一升级数据重新写入至运行区域得到第三升级数据;调取运行区域的第三升级数据,对第三升级数据进行循环冗余校验,得到第四校验结果,其中,第四校验结果用于表示第三升级数据是否校验通过;响应于第三校验结果用于表示第二升级数据校验通过,控制目标设备运行第二升级数据,并确定目标设备升级成功。Optionally, the upgrade data verification method of the device further includes: in response to the second verification result indicating that the first upgrade data verification passes, writing the first upgrade data from the cache area of the target device to the target device. The running area obtains the second upgrade data, and performs a cyclic redundancy check on the second upgrade data to obtain a third verification result, where the third verification result is used to indicate whether the second upgrade data passes the verification; in response to the third The verification result is used to indicate that the second upgrade data verification has not passed. Rewrite the first upgrade data in the cache area to the running area to obtain the third upgrade data; retrieve the third upgrade data in the running area, and compare the third upgrade data Perform a cyclic redundancy check to obtain a fourth verification result, where the fourth verification result is used to indicate whether the third upgrade data has passed the verification; responding to the third verification result is used to indicate that the second upgrade data has passed the verification , control the target device to run the second upgrade data, and determine that the target device is successfully upgraded.
上述的运行区域可以是指目标设备中用于存储和处理数据的主要区域,运行区域通常包括设备的随机存取存储器(Random Access Memory,简称为RAM)和处理器,数据运行区域的主要作用是进行数据的实际处理和运算,设备在执行程序时,会将需要处理的数据加载到数据运行区域中,并通过处理器进行计算和操作。The above-mentioned running area may refer to the main area in the target device used to store and process data. The running area usually includes the device's Random Access Memory (RAM) and the processor. The main function of the data running area is For the actual processing and operation of data, when the device executes the program, it will load the data that needs to be processed into the data running area, and perform calculations and operations through the processor.
上述的第二升级数据可以是指将目标设备中缓存区域的第一升级数据写入目标设备的运行区域得到的数据。The above-mentioned second upgrade data may refer to data obtained by writing the first upgrade data in the cache area of the target device into the running area of the target device.
上述的第三升级数据可以是指第三校验结果校验未通过后,将目标设备中缓存区域的第一升级数据重新写入目标设备的运行区域得到的数据,第三升级数据会覆盖原有的第二升级数据。The above-mentioned third upgrade data may refer to the data obtained by rewriting the first upgrade data in the cache area of the target device into the running area of the target device after the third verification result fails to pass. The third upgrade data will overwrite the original data. Some second upgrade data.
在一种可选的实施例中,在确保目标设备缓存区域中的第一升级数据校验正确后,将目标设备中缓存区域的第一升级数据写入目标设备的运行区域得到第二升级数据,由于将数据从缓存区域写入到运行区域的过程中可能出现错误,导致目标设备运行区域中的第二升级数据与目标设备缓存区域中的第一升级数据不一致,需要对第二升级数据进行循环冗余校验得到第三校验结果,以判断目标设备运行区域中的第二升级数据是否正确。In an optional embodiment, after ensuring that the first upgrade data in the cache area of the target device is verified correctly, the first upgrade data in the cache area of the target device is written into the running area of the target device to obtain the second upgrade data. , due to possible errors in the process of writing data from the cache area to the running area, causing the second upgrade data in the target device's running area to be inconsistent with the first upgrade data in the target device's cache area, the second upgrade data needs to be The cyclic redundancy check obtains a third verification result to determine whether the second upgrade data in the operating area of the target device is correct.
在一种可选的实施例中,当目标设备运行区域中的第二升级数据校验未通过时,可以确定第一升级数据从缓存区域写入到运行区域的过程中可能出现错误,导致目标设备运行区域中的第二升级数据与目标设备缓存区域中的第一升级数据不一致,这时可以控制目标设备中缓存区域的第一升级数据重新写入目标设备的运行区域得到第三升级数据,第三升级数据会自动覆盖,即替换目标设备的运行区域中的第二升级数据,并对第三升级数据进行循环冗余校验,确保重新写入目标设备运行区域中的第三升级数据具备完整性、准确性和安全性。In an optional embodiment, when the second upgrade data verification in the running area of the target device fails, it can be determined that an error may occur in the process of writing the first upgrade data from the cache area to the running area, causing the target The second upgrade data in the device operating area is inconsistent with the first upgrade data in the cache area of the target device. At this time, the first upgrade data in the cache area of the target device can be controlled to be rewritten into the operating area of the target device to obtain the third upgrade data. The third upgrade data will be automatically overwritten, that is, the second upgrade data in the running area of the target device will be replaced, and a cyclic redundancy check will be performed on the third upgrade data to ensure that the third upgrade data rewritten in the running area of the target device has Completeness, accuracy and security.
在另一种可选的实施例中,在确保目标设备运行区域中的第二升级数据校验正确后,即可以确定目标设备运行区域中的第二升级数据具备完整性、准确性和安全性,可以控制目标设备运行第二升级数据,即可以确定目标设备升级成功。In another optional embodiment, after ensuring that the second upgrade data in the target device running area is verified correctly, it can be determined that the second upgrade data in the target device running area has integrity, accuracy and security. , the target device can be controlled to run the second upgrade data, thereby confirming that the target device has been upgraded successfully.
可选地,该设备的升级数据校验方法,还包括:响应于第四校验结果用于表示第三升级数据未校验通过,执行将缓存区域的第一升级数据移动至运行区域的步骤,直至从运行区域调取得到的第三升级数据校验通过;响应于第四校验结果用于表示第三升级数据校验通过,控制目标设备运行第三升级数据,并确定目标设备升级成功。Optionally, the upgrade data verification method of the device further includes: in response to the fourth verification result indicating that the third upgrade data has not passed verification, performing the step of moving the first upgrade data in the cache area to the running area. , until the third upgrade data retrieved from the operating area passes the verification; in response to the fourth verification result indicating that the third upgrade data verification passes, control the target device to run the third upgrade data, and determine that the target device is upgraded successfully .
在一种可选的实施例中,当目标设备运行区域中的第三升级数据校验未通过时,可以确定缓存区域中的第一升级数据重新写入到运行区域得到的第三升级数据还是存在错误,这时可以控制目标设备中缓存区域的第一升级数据再次写入目标设备的运行区域,再次写入目标设备运行区域中的数据会覆盖原运行区域中的数据,并对再次写入目标设备运行区域中的数据进行循环冗余校验,直到校验结果通过,确保写入目标设备运行区域中的数据具备完整性、准确性和安全性。In an optional embodiment, when the third upgrade data verification in the running area of the target device fails, it can be determined whether the first upgrade data in the cache area is rewritten to the third upgrade data obtained in the running area or If there is an error, you can control the first upgrade data in the cache area of the target device to be written again to the running area of the target device. The data written again to the running area of the target device will overwrite the data in the original running area, and the data written again will be The data in the target device's operating area undergoes cyclic redundancy checking until the verification result passes, ensuring that the data written into the target device's operating area has integrity, accuracy, and security.
在另一种可选的实施例中,在确保目标设备运行区域中的第三升级数据校验正确后,即可以确定目标设备运行区域中的第三升级数据具备完整性、准确性和安全性,可以控制目标设备运行第三升级数据,即可以确定目标设备升级成功。In another optional embodiment, after ensuring that the third upgrade data in the target device running area is verified correctly, it can be determined that the third upgrade data in the target device running area has integrity, accuracy and security. , the target device can be controlled to run the third upgrade data, thereby confirming that the target device has been upgraded successfully.
可选地,该设备的升级数据校验方法,还包括:响应于将缓存区域的第一升级数据移动至运行区域的执行次数大于预设执行次数,禁止执行将缓存区域的第一升级数据移动至运行区域的步骤,并控制目标设备进入到预设模式,其中,预设模式用于等待新的升级数据。Optionally, the upgrade data verification method of the device further includes: in response to the number of executions of moving the first upgrade data in the cache area to the running area being greater than the preset number of executions, prohibiting execution of moving the first upgrade data in the cache area. Steps to the running area and control the target device to enter the preset mode, where the preset mode is used to wait for new upgrade data.
上述的预设执行次数可以是预先设定的目标设备中缓存区域的第一升级数据重复写入目标设备的运行区域的最大次数,在本实施例中,预设执行次数可以设定为10,预设执行次数还可以取其他数值,这里不作限定。The above-mentioned preset execution times may be the preset maximum number of times that the first upgrade data in the cache area of the target device is repeatedly written to the running area of the target device. In this embodiment, the preset execution times may be set to 10, The preset number of executions can also take other values, which are not limited here.
上述的预设模式可以是确定目标设备缓存区域的第一升级数据出现错误,控制目标设备中缓存区域的第一升级数据停止写入目标设备的运行区域,并等待传来新的升级数据包。The above-mentioned preset mode may be to determine that an error occurs in the first upgrade data in the cache area of the target device, to control the first upgrade data in the cache area of the target device to stop writing to the running area of the target device, and to wait for a new upgrade data packet to be transmitted.
在一种可选的实施例中,当目标设备运行区域中的第三升级数据校验未通过时,由于会控制目标设备中缓存区域的第一升级数据一直重复写入目标设备的运行区域,每次新写入的数据会覆盖运行区域中原有的数据,这样一次升级就可能造成闪存(FlashMemory,即FLASH)的过度擦写,影响闪存的寿命,而目标设备运行区域中的第三升级数据校验一直未通过,可能是目标设备缓存区域的第一升级数据存在错误,控制目标设备中缓存区域的第一升级数据一直重复写入目标设备的运行区域可能造成程序死锁。In an optional embodiment, when the third upgrade data verification in the running area of the target device fails, the first upgrade data in the cache area in the target device will be controlled to be repeatedly written into the running area of the target device. Each time newly written data will overwrite the original data in the running area, such an upgrade may cause excessive erasing of Flash Memory (FLASH), affecting the life of the flash memory. The third upgraded data in the running area of the target device If the verification never passes, it may be that there is an error in the first upgrade data in the cache area of the target device. The first upgrade data that controls the cache area in the target device is repeatedly written to the running area of the target device, which may cause a program deadlock.
在一种可选的实施例中,当目标设备运行区域中的第三升级数据校验未通过时,且目标设备中缓存区域的第一升级数据重复写入目标设备的运行区域的次数大于预设执行次数时,控制目标设备中缓存区域的第一升级数据停止写入目标设备的运行区域,控制目标设备进入预设模式,有效避免了目标设备中缓存区域的第一升级数据一直重复写入目标设备的运行区域出现程序死锁和闪存的过度擦写,保护了闪存的使用寿命。In an optional embodiment, when the third upgrade data verification in the target device's running area fails and the first upgrade data in the cache area of the target device is repeatedly written to the target device's running area more than a predetermined number of times, When the number of executions is set, the first upgrade data in the cache area of the target device is controlled to stop writing to the running area of the target device, and the target device is controlled to enter the preset mode, effectively avoiding the repeated writing of the first upgrade data in the cache area of the target device. Program deadlocks and excessive overwriting of the flash memory occur in the target device's running area, thus protecting the service life of the flash memory.
可选地,对多个第一升级包进行循环冗余校验,得到第一校验结果,包括:去除多个第一升级包中的第一校验码,得到多个第二升级包;基于多个第二升级包生成第一多项式;对多个第一升级包和第一多项式进行除法运算,得到第一运算结果,其中,第一运算结果用于表示除法运算得到的第一余数是否为预设数值;响应于第一运算结果用于表示第一余数为预设数值,确定第一校验结果为多个第一升级包校验通过;响应于第一运算结果用于表示第一余数不是预设数值,确定第一校验结果为多个第一升级包校验未通过。Optionally, performing a cyclic redundancy check on the plurality of first upgrade packages to obtain a first verification result includes: removing the first check codes in the plurality of first upgrade packages to obtain a plurality of second upgrade packages; Generate a first polynomial based on a plurality of second upgrade packages; perform a division operation on the plurality of first upgrade packages and the first polynomial to obtain a first operation result, where the first operation result is used to represent the result obtained by the division operation Whether the first remainder is a preset value; in response to the first operation result indicating that the first remainder is a preset value, it is determined that the first verification result is that multiple first upgrade packages pass the verification; in response to the first operation The result is used to indicate that the first remainder is not a preset value, and it is determined that the first verification result is that the verification of multiple first upgrade packages has failed.
在一种可选的实施例中,对多个第一升级包进行循环冗余校验可以包括,选择一个CRC多项式,通常使用标准多项式,如CRC-16或CRC-32,将升级单包数据拆分成一个个字节,初始化一个16位或32位的寄存器为一个预定义的初始值,通常为全1或全0,其中,寄存器的选择取决于所选择的CRC多项式,并对每个字节进行以下操作:将当前字节的最高位与寄存器的最高位进行异或操作,将寄存器左移一位,将当前字节的下一位移入寄存器的最低位,如果寄存器的最高位为1,再与预定义的CRC多项式进行异或操作,当所有字节都处理完毕后,寄存器中剩余的值就是计算得到的CRC校验值,需要注意到的是,具体的CRC多项式和初始值可能因应用的升级数据单包的不同而有所变化,因此在实际使用中应根据需要进行相应的调整。In an optional embodiment, performing a cyclic redundancy check on multiple first upgrade packages may include selecting a CRC polynomial, usually using a standard polynomial, such as CRC-16 or CRC-32, to upgrade the single package data Split into bytes, initialize a 16-bit or 32-bit register to a predefined initial value, usually all 1 or all 0, where the choice of register depends on the selected CRC polynomial, and for each The byte performs the following operations: XOR the highest bit of the current byte with the highest bit of the register, shift the register to the left by one bit, and move the next bit of the current byte into the lowest bit of the register. If the highest bit of the register is 1. Then perform an XOR operation with the predefined CRC polynomial. When all bytes are processed, the remaining value in the register is the calculated CRC check value. It should be noted that the specific CRC polynomial and the initial value It may vary depending on the application's upgrade data package, so adjustments should be made as needed in actual use.
可选地,该设备的升级数据校验方法,还包括:响应于第一校验结果用于表示多个第一升级包校验未通过,中止目标设备的升级过程。Optionally, the upgrade data verification method of the device further includes: in response to the first verification result indicating that multiple first upgrade package verifications have failed, aborting the upgrade process of the target device.
在一种可选的实施例中,当目标设备的缓存区域接收到的第一升级包校验失败,目标设备可以请求重传校验失败的第一升级包,可以暂时中止目标设备的升级过程,直到目标设备接收到可以校验通过的第一升级包。In an optional embodiment, when the first upgrade package received in the cache area of the target device fails to verify, the target device can request to retransmit the first upgrade package that fails to verify, and can temporarily suspend the upgrade process of the target device. , until the target device receives the first upgrade package that can pass the verification.
可选地,对第一升级数据进行循环冗余校验,得到第二校验结果,包括:去除第一升级数据中的第二校验码,得到第三升级数据;基于第三升级数据生成第二多项式;对第一升级数据和第二多项式进行除法运算,得到第二运算结果,其中,第二运算结果用于表示除法运算得到的第二余数是否为预设数值;响应于第二运算结果用于表示第二余数为预设数值,确定第二校验结果为第一升级数据校验通过;响应于第二运算结果用于表示第二余数不是预设数值,确定第一校验结果为第一升级数据校验未通过。Optionally, performing a cyclic redundancy check on the first upgrade data to obtain the second verification result includes: removing the second check code in the first upgrade data to obtain the third upgrade data; and generating the third upgrade data based on the third upgrade data. a second polynomial; perform a division operation on the first upgrade data and the second polynomial to obtain a second operation result, where the second operation result is used to indicate whether the second remainder obtained by the division operation is a preset value; In response to the second operation result indicating that the second remainder is a preset value, it is determined that the second verification result is that the first upgrade data verification passes; in response to the second operation result indicating that the second remainder is not a preset value , it is determined that the first verification result is that the first upgrade data verification fails.
在一种可选的实施例中,对第一升级数据进行循环冗余校验可以包括,选择一个生成多项式,通常使用标准的CRC-16或CRC-32生成多项式,生成多项式是一个二进制数,例如CRC-16的生成多项式是0x8005,CRC-32的生成多项式是0x04C11DB7;将生成多项式的二进制表示反转,得到一个反转后的生成多项式;将升级数据包视为一个二进制数,将其表示为一个二进制位序列;在升级数据包的末尾添加足够的零位,使其长度与生成多项式的二进制表示长度相同;用反转后的生成多项式对升级数据包进行除法运算,得到一个余数;将余数附加到原来的升级数据包末尾,形成一个新的数据包;将新的数据包视为一个二进制数,将其表示为一个二进制位序列;将新的数据包的末尾添加足够的零位,使其长度与生成多项式的二进制表示长度相同;用反转后的生成多项式对新的数据包进行除法运算,得到一个新的余数;如果新的余数为零,则说明升级数据包没有错误;如果新的余数不为零,则说明升级数据包存在错误。In an optional embodiment, performing a cyclic redundancy check on the first upgrade data may include selecting a generator polynomial, usually using a standard CRC-16 or CRC-32 generator polynomial, where the generator polynomial is a binary number, For example, the generator polynomial of CRC-16 is 0x8005, and the generator polynomial of CRC-32 is 0x04C11DB7; invert the binary representation of the generator polynomial to obtain an inverted generator polynomial; treat the upgrade packet as a binary number and represent it is a binary bit sequence; add enough zero bits to the end of the upgrade packet so that its length is the same as the binary representation of the generator polynomial; divide the upgrade packet with the inverted generator polynomial to get a remainder; The remainder is appended to the end of the original upgrade packet to form a new packet; treat the new packet as a binary number and represent it as a sequence of binary bits; add enough zero bits to the end of the new packet to Make its length the same as the binary representation of the generator polynomial; divide the new data packet with the inverted generator polynomial to get a new remainder; if the new remainder is zero, it means there is no error in the upgrade packet; if If the new remainder is not zero, it means there is an error in the upgrade packet.
可选地,该设备的升级数据校验方法,还包括:响应于第二校验结果用于表示第一升级数据未校验通过,控制目标设备运行历史升级数据,并确定目标设备升级失败。Optionally, the upgrade data verification method of the device further includes: in response to the second verification result indicating that the first upgrade data has not passed verification, controlling the target device to run the historical upgrade data, and determining that the target device fails to upgrade.
上述的历史升级数据可以是目标设备升级前所使用的数据。The above historical upgrade data may be data used before the target device is upgraded.
在一种可选的实施例中,在确保目标设备接收到的各升级数据单包都正确后,目标设备将各升级数据单包进行组合得到第一升级数据,由于各升级数据单包组合得到第一升级数据的过程中可能出现错误,导致第一升级数据中包含的目标升级数据出现错误,需要对第一升级数据进行循环冗余校验,当目标设备缓存区域的第一升级包校验失败,可以选择控制目标设备运行历史升级数据,这样有效避免了目标设备使用错误的数据进行更新升级造成目标设备不能正常使用,确保了目标设备的正常运行。In an optional embodiment, after ensuring that the upgrade data single packets received by the target device are correct, the target device combines the upgrade data single packets to obtain the first upgrade data. Since the upgrade data single packets are combined to obtain Errors may occur during the first upgrade data process, resulting in errors in the target upgrade data contained in the first upgrade data. Cyclic redundancy verification needs to be performed on the first upgrade data. When the first upgrade package in the cache area of the target device is verified If it fails, you can choose to control the target device's running history upgrade data. This effectively avoids the target device using incorrect data for update and upgrade, causing the target device to be unable to be used normally, and ensuring the normal operation of the target device.
在一种可选的实施例中,图2是根据本发明实施例的一种可选的设备的升级方法的流程图,如图2所示,目标设备启动升级流程,目标设备在接收到目标升级数据对应的多个单包后,将多个单包保存至目标设备的缓存区域;先对目标设备接收到的各升级数据单包分别进行循环冗余校验,若有升级数据单包出现循环冗余校验失败的,目标设备可以请求只重新传输该升级数据单包;在确保目标设备接收到的各升级数据单包都正确后,目标设备将各升级数据单包进行组合得到整个升级数据包,由于各升级数据单包组合得到整个升级数据包的过程中可能出现错误,导致整个升级数据包中包含的目标升级数据出现错误,需要对整个升级数据包进行循环冗余校验。In an optional embodiment, Figure 2 is a flow chart of an optional device upgrade method according to an embodiment of the present invention. As shown in Figure 2, the target device starts the upgrade process. After receiving the target After upgrading multiple single packets corresponding to the data, save the multiple single packets to the cache area of the target device; first perform a cyclic redundancy check on each upgrade data single packet received by the target device. If there is an upgrade data single packet, If the cyclic redundancy check fails, the target device can request to retransmit only the upgrade data single packet; after ensuring that the upgrade data single packets received by the target device are correct, the target device will combine the upgrade data single packets to obtain the entire upgrade. Data package, because errors may occur in the process of combining each upgrade data single package to obtain the entire upgrade data package, resulting in errors in the target upgrade data contained in the entire upgrade data package, a cyclic redundancy check needs to be performed on the entire upgrade data package.
在另一种可选的实施例中,如图2所示,在确保目标设备缓存区域中的整个文件校验正确后,目标设备的升级流程跳转到引导区(Boot sector,简称为BOOT),将目标设备中缓存区域的整个文件写入目标设备的运行区域得到第二升级数据,由于将数据从缓存区域写入到运行区域的过程中可能出现错误,导致目标设备运行区域中的第二升级数据与目标设备缓存区域中的整个文件不一致,需要对第二升级数据进行循环冗余校验得到第三校验结果,以判断目标设备运行区域中的第二升级数据是否正确。In another optional embodiment, as shown in Figure 2, after ensuring that the entire file in the cache area of the target device is verified correctly, the upgrade process of the target device jumps to the boot sector (BOOT) , write the entire file in the cache area of the target device to the running area of the target device to obtain the second upgrade data. Since errors may occur during the process of writing data from the cache area to the running area, resulting in the second upgrade data in the running area of the target device. The upgrade data is inconsistent with the entire file in the cache area of the target device. It is necessary to perform a cyclic redundancy check on the second upgrade data to obtain a third verification result to determine whether the second upgrade data in the target device's operating area is correct.
在另一种可选的实施例中,如图2所示,在确保目标设备运行区域中的第二升级数据校验正确后,即可以确定目标设备运行区域中的第二升级数据具备完整性、准确性和安全性,可以控制目标设备运行第二升级数据,即可以确定目标设备升级成功。In another optional embodiment, as shown in Figure 2, after ensuring that the second upgrade data in the target device running area is verified correctly, it can be determined that the second upgrade data in the target device running area has integrity. , accuracy and security, the target device can be controlled to run the second upgrade data, which can determine the success of the target device upgrade.
在另一种可选的实施例中,如图2所示,当目标设备运行区域中的第二升级数据校验未通过时,可以确定整个文件从缓存区域写入到运行区域的过程中可能出现错误,导致目标设备运行区域中的第二升级数据与目标设备缓存区域中的整个文件不一致,这时可以控制目标设备中缓存区域的整个文件重新写入目标设备的运行区域得到第三升级数据,第三升级数据会自动覆盖,即替换目标设备的运行区域中的第二升级数据,并对第三升级数据进行循环冗余校验。In another optional embodiment, as shown in Figure 2, when the second upgrade data verification in the running area of the target device fails, it can be determined that the entire file may be written from the cache area to the running area. An error occurs, causing the second upgrade data in the running area of the target device to be inconsistent with the entire file in the cache area of the target device. At this time, the entire file in the cache area of the target device can be controlled to be rewritten into the running area of the target device to obtain the third upgrade data. , the third upgrade data will automatically overwrite, that is, replace the second upgrade data in the operating area of the target device, and perform a cyclic redundancy check on the third upgrade data.
在另一种可选的实施例中,如图2所示,当目标设备运行区域中的第三升级数据校验未通过时,可以确定缓存区域中的整个文件重新写入到运行区域得到的第三升级数据还是存在错误,这时可以控制目标设备中缓存区域的整个文件再次写入目标设备的运行区域,再次写入目标设备运行区域中的数据会覆盖原运行区域中的数据,并对再次写入目标设备运行区域中的数据进行循环冗余校验,直到校验结果通过,确保写入目标设备运行区域中的数据具备完整性、准确性和安全性。在确保目标设备运行区域中的第三升级数据校验正确后,即可以确定目标设备运行区域中的第三升级数据具备完整性、准确性和安全性,可以控制目标设备运行第三升级数据,即可以确定目标设备升级成功。In another optional embodiment, as shown in Figure 2, when the third upgrade data verification in the running area of the target device fails, it can be determined that the entire file in the cache area is rewritten to the running area. The third upgrade data still contains errors. At this time, you can control the entire file in the cache area of the target device to be written to the running area of the target device again. The data written again to the running area of the target device will overwrite the data in the original running area, and the data in the original running area will be overwritten. The data written into the running area of the target device is again subjected to cyclic redundancy check until the verification result passes, ensuring that the data written into the running area of the target device has integrity, accuracy and security. After ensuring that the third upgrade data in the target device's operating area is verified correctly, it can be determined that the third upgrade data in the target device's operating area has integrity, accuracy and security, and the target device can be controlled to run the third upgrade data. It is confirmed that the target device is upgraded successfully.
在一种可选的实施例中,如图2所示,当目标设备运行区域中的第三升级数据校验未通过时,由于会控制目标设备中缓存区域的整个文件一直重复写入目标设备的运行区域,每次新写入的数据会覆盖运行区域中原有的数据,这样一次升级就可能造成闪存(Flash Memory,即FLASH)的过度擦写,影响闪存的寿命,而目标设备运行区域中的第三升级数据校验一直未通过,可能是目标设备缓存区域的整个文件存在错误,控制目标设备中缓存区域的整个文件一直重复写入目标设备的运行区域可能造成程序死锁。In an optional embodiment, as shown in Figure 2, when the third upgrade data verification in the target device's running area fails, the entire file in the cache area of the target device will be controlled to be repeatedly written to the target device. Each time the newly written data will overwrite the original data in the running area, such an upgrade may cause excessive erasing of the Flash Memory (FLASH), affecting the life of the flash memory, and the target device running area The third upgrade data verification has never passed. It may be that there is an error in the entire file in the cache area of the target device. The entire file that controls the cache area in the target device is repeatedly written to the running area of the target device, which may cause a program deadlock.
在一种可选的实施例中,如图2所示,当目标设备运行区域中的第三升级数据校验未通过时,且目标设备中缓存区域的整个文件重复写入目标设备的运行区域的次数大于预设执行次数时,控制目标设备中缓存区域的整个文件停止写入目标设备的运行区域,控制目标设备进入预设模式,有效避免了目标设备中缓存区域的整个文件一直重复写入目标设备的运行区域出现程序死锁和闪存的过度擦写,保护了闪存的使用寿命。In an optional embodiment, as shown in Figure 2, when the third upgrade data verification in the running area of the target device fails, and the entire file in the cache area of the target device is repeatedly written to the running area of the target device When the number of times is greater than the preset number of executions, the entire file in the cache area of the target device is controlled to stop writing to the running area of the target device, and the target device is controlled to enter the preset mode, which effectively avoids the entire file in the cache area of the target device being repeatedly written. Program deadlocks and excessive overwriting of the flash memory occur in the target device's running area, thus protecting the service life of the flash memory.
实施例2Example 2
根据本发明实施例的另一方面,还提供了一种设备的升级数据校验装置,该装置可以执行上述实施例的设备的升级数据校验方法,具体实现方法和优选应用场景与上述实施例相同,在此不作赘述。According to another aspect of the embodiment of the present invention, a device for verifying upgrade data of equipment is also provided. The device can perform the method for verifying upgrade data of equipment in the above embodiment. The specific implementation method and preferred application scenarios are the same as those of the above embodiment. They are the same and will not be described in detail here.
图3是根据本申请实施例的一种设备的升级数据校验装置的示意图,如图3所示,该装置包括如下:控制模块302、第一校验模块304、第二校验模块306。Figure 3 is a schematic diagram of an upgrade data verification device of a device according to an embodiment of the present application. As shown in Figure 3, the device includes the following: a control module 302, a first verification module 304, and a second verification module 306.
其中,控制模块302,用于响应于接收到对目标设备进行升级的升级指令,控制目标设备接收目标升级数据对应的多个第一升级包,将多个第一升级包保存至目标设备的缓存区域;第一校验模块304,用于在目标设备升级过程中,调取多个第一升级包,对多个第一升级包进行循环冗余校验,得到第一校验结果,其中,第一校验结果用于表示多个第一升级包是否校验通过;第二校验模块306,用于响应于第一校验结果用于表示多个第一升级包校验通过,调取多个第一升级包组成的第一升级数据,对第一升级数据进行循环冗余校验,得到第二校验结果,其中,第二校验结果用于表示第一升级数据是否校验通过。Among them, the control module 302 is configured to respond to receiving an upgrade instruction to upgrade the target device, control the target device to receive multiple first upgrade packages corresponding to the target upgrade data, and save the multiple first upgrade packages to the cache of the target device. Area; the first verification module 304 is used to retrieve multiple first upgrade packages during the upgrade process of the target device, perform cyclic redundancy check on the multiple first upgrade packages, and obtain the first verification result, where, The first verification result is used to indicate whether the plurality of first upgrade packages have passed verification; the second verification module 306 is used to retrieve, in response to the first verification result indicating that the plurality of first upgrade packages have passed verification. The first upgrade data composed of multiple first upgrade packages is subjected to cyclic redundancy check on the first upgrade data to obtain a second verification result, where the second verification result is used to indicate whether the first upgrade data passes the verification. .
可选地,该设备的升级数据校验方法,还包括:响应于第二校验结果用于表示第一升级数据校验通过,将第一升级数据从目标设备的缓存区域写入目标设备的运行区域得到第二升级数据,并对第二升级数据进行循环冗余校验得到第三校验结果,其中,第三校验结果用于表示第二升级数据是否校验通过;响应于第三校验结果用于表示第二升级数据校验未通过,将缓存区域的第一升级数据重新写入至运行区域得到第三升级数据;调取运行区域的第三升级数据,对第三升级数据进行循环冗余校验,得到第四校验结果,其中,第四校验结果用于表示第三升级数据是否校验通过;响应于第三校验结果用于表示第二升级数据校验通过,控制目标设备运行第二升级数据,并确定目标设备升级成功。Optionally, the upgrade data verification method of the device further includes: in response to the second verification result indicating that the first upgrade data verification passes, writing the first upgrade data from the cache area of the target device to the target device. The running area obtains the second upgrade data, and performs a cyclic redundancy check on the second upgrade data to obtain a third verification result, where the third verification result is used to indicate whether the second upgrade data passes the verification; in response to the third The verification result is used to indicate that the second upgrade data verification has not passed. Rewrite the first upgrade data in the cache area to the running area to obtain the third upgrade data; retrieve the third upgrade data in the running area, and compare the third upgrade data Perform a cyclic redundancy check to obtain a fourth verification result, where the fourth verification result is used to indicate whether the third upgrade data has passed the verification; responding to the third verification result is used to indicate that the second upgrade data has passed the verification , control the target device to run the second upgrade data, and determine that the target device is successfully upgraded.
可选地,该设备的升级数据校验方法,还包括:响应于第四校验结果用于表示第三升级数据未校验通过,执行将缓存区域的第一升级数据移动至运行区域的步骤,直至从运行区域调取得到的第三升级数据校验通过;响应于第四校验结果用于表示第三升级数据校验通过,控制目标设备运行第三升级数据,并确定目标设备升级成功。Optionally, the upgrade data verification method of the device further includes: in response to the fourth verification result indicating that the third upgrade data has not passed verification, performing the step of moving the first upgrade data in the cache area to the running area. , until the third upgrade data retrieved from the operating area passes the verification; in response to the fourth verification result indicating that the third upgrade data verification passes, control the target device to run the third upgrade data, and determine that the target device is upgraded successfully .
可选地,该设备的升级数据校验方法,还包括:响应于将缓存区域的第一升级数据移动至运行区域的执行次数大于预设执行次数,禁止执行将缓存区域的第一升级数据移动至运行区域的步骤,并控制目标设备进入到预设模式,其中,预设模式用于等待新的升级数据。Optionally, the upgrade data verification method of the device further includes: in response to the number of executions of moving the first upgrade data in the cache area to the running area being greater than the preset number of executions, prohibiting execution of moving the first upgrade data in the cache area. Steps to the running area and control the target device to enter the preset mode, where the preset mode is used to wait for new upgrade data.
可选地,对多个第一升级包进行循环冗余校验,得到第一校验结果,包括:去除多个第一升级包中的第一校验码,得到多个第二升级包;基于多个第二升级包生成第一多项式;对多个第一升级包和第一多项式进行除法运算,得到第一运算结果,其中,第一运算结果用于表示除法运算得到的第一余数是否为预设数值;响应于第一运算结果用于表示第一余数为预设数值,确定第一校验结果为多个第一升级包校验通过;响应于第一运算结果用于表示第一余数不是预设数值,确定第一校验结果为多个第一升级包校验未通过。Optionally, performing a cyclic redundancy check on the plurality of first upgrade packages to obtain a first verification result includes: removing the first check codes in the plurality of first upgrade packages to obtain a plurality of second upgrade packages; Generate a first polynomial based on a plurality of second upgrade packages; perform a division operation on the plurality of first upgrade packages and the first polynomial to obtain a first operation result, where the first operation result is used to represent the result obtained by the division operation Whether the first remainder is a preset value; in response to the first operation result indicating that the first remainder is a preset value, it is determined that the first verification result is that multiple first upgrade packages pass the verification; in response to the first operation The result is used to indicate that the first remainder is not a preset value, and it is determined that the first verification result is that the verification of multiple first upgrade packages has failed.
可选地,该设备的升级数据校验方法,还包括:响应于第一校验结果用于表示多个第一升级包校验未通过,中止目标设备的升级过程。Optionally, the upgrade data verification method of the device further includes: in response to the first verification result indicating that multiple first upgrade package verifications have failed, aborting the upgrade process of the target device.
可选地,对第一升级数据进行循环冗余校验,得到第二校验结果,包括:去除第一升级数据中的第二校验码,得到第三升级数据;基于第三升级数据生成第二多项式;对第一升级数据和第二多项式进行除法运算,得到第二运算结果,其中,第二运算结果用于表示除法运算得到的第二余数是否为预设数值;响应于第二运算结果用于表示第二余数为预设数值,确定第二校验结果为第一升级数据校验通过;响应于第二运算结果用于表示第二余数不是预设数值,确定第一校验结果为第一升级数据校验未通过。Optionally, performing a cyclic redundancy check on the first upgrade data to obtain the second verification result includes: removing the second check code in the first upgrade data to obtain the third upgrade data; and generating the third upgrade data based on the third upgrade data. A second polynomial; perform a division operation on the first upgrade data and the second polynomial to obtain a second operation result, where the second operation result is used to indicate whether the second remainder obtained by the division operation is a preset value; In response to the second operation result indicating that the second remainder is a preset value, it is determined that the second verification result is that the first upgrade data verification passes; in response to the second operation result indicating that the second remainder is not a preset value , it is determined that the first verification result is that the first upgrade data verification fails.
可选地,该设备的升级数据校验方法,还包括:响应于第二校验结果用于表示第一升级数据未校验通过,控制目标设备运行历史升级数据,并确定目标设备升级失败。Optionally, the upgrade data verification method of the device further includes: in response to the second verification result indicating that the first upgrade data has not passed verification, controlling the target device to run the historical upgrade data, and determining that the target device fails to upgrade.
实施例3Example 3
根据本发明实施例的另一方面,还提供了一种计算机可读存储介质,计算机可读存储介质包括存储的程序,其中,在程序运行时控制所在设备的处理器中执行上述设备的升级数据校验方法。According to another aspect of the embodiment of the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium includes a stored program, wherein the upgrade data of the above-mentioned device is executed in the processor of the device where the program is run. Verification method.
上述步骤中的计算机存储介质可以是计算机存储器中用于存储某种不连续物理量的媒体,计算机存储介质主要有半导体,磁芯,磁鼓,磁带,激光盘等。计算机可读存储介质包括的存储的程序,可以是一组计算机能识别和执行的指令,运行于电子计算机上,满足人们某种需求的信息化工具。The computer storage medium in the above steps can be a medium used to store certain discontinuous physical quantities in computer memory. Computer storage media mainly include semiconductors, magnetic cores, magnetic drums, magnetic tapes, laser disks, etc. Computer-readable storage media include stored programs, which can be a set of instructions that a computer can recognize and execute, and are information tools that run on electronic computers to meet certain needs of people.
实施例4Example 4
根据本发明实施例的另一方面,还提供了一种电子设备,一个或多个处理器;存储装置,用于存储一个或多个程序;当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器执行上述设备的升级数据校验方法。According to another aspect of the embodiment of the present invention, there is also provided an electronic device, one or more processors; a storage device for storing one or more programs; when one or more programs are processed by one or more processors Execution causes one or more processors to execute the upgrade data verification method of the above device.
上述步骤中的存储装置可以是时序逻辑电路的一种,用来存储数据和指令等的记忆部件,主要用来存放程序和数据;处理器可以是解释和执行指令的功能单元,其有一套独特的操作命令,可称为处理器的指令集,如存储,调入等之类都是操作;存储装置中存储有计算机程序,可以是一组计算机能识别和执行的指令,运行于电子计算机上,满足人们某种需求的信息化工具。The storage device in the above steps can be a kind of sequential logic circuit, a memory component used to store data and instructions, etc., mainly used to store programs and data; the processor can be a functional unit that interprets and executes instructions, which has a unique set of functions. The operation commands can be called the instruction set of the processor, such as storage, transfer, etc. are all operations; the storage device stores computer programs, which can be a set of instructions that the computer can recognize and execute, running on the electronic computer. , an information tool that meets certain needs of people.
在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present invention, each embodiment is described with its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units may be a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or may be Integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the units or modules may be in electrical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-On ly Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present invention. The aforementioned storage media include: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. that can store program code. medium.
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only the preferred embodiments of the present invention. It should be pointed out that those of ordinary skill in the art can also make several improvements and modifications without departing from the principles of the present invention. These improvements and modifications can also be made. should be regarded as the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311504981.9A CN117453261A (en) | 2023-11-10 | 2023-11-10 | Equipment upgrade data verification methods, storage media and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311504981.9A CN117453261A (en) | 2023-11-10 | 2023-11-10 | Equipment upgrade data verification methods, storage media and electronic equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117453261A true CN117453261A (en) | 2024-01-26 |
Family
ID=89589005
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311504981.9A Pending CN117453261A (en) | 2023-11-10 | 2023-11-10 | Equipment upgrade data verification methods, storage media and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117453261A (en) |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105117253A (en) * | 2015-08-27 | 2015-12-02 | 常州大学 | BootLoader based remote upgrade method for UV LED (Ultraviolet Light Emitting Diode) curing system |
| US20170063493A1 (en) * | 2015-08-25 | 2017-03-02 | Signalchip Innovations Private Limited | Methods and circuits for performing cyclic redundancy check (crc) of an input data stream |
| CN106788909A (en) * | 2017-03-31 | 2017-05-31 | 重庆邮电大学 | CRC computational methods and device based on GMR satellite communication protocols |
| CN111752584A (en) * | 2020-06-11 | 2020-10-09 | Oppo广东移动通信有限公司 | Firmware upgrade method, apparatus, electronic device and computer-readable storage medium |
| CN112214349A (en) * | 2020-12-09 | 2021-01-12 | 上海灵动微电子股份有限公司 | Data cyclic redundancy check device and method |
| CN112631628A (en) * | 2020-12-11 | 2021-04-09 | 邦彦技术股份有限公司 | Singlechip upgrading method, singlechip and storage medium |
| CN115001508A (en) * | 2022-05-30 | 2022-09-02 | 北京左江科技股份有限公司 | CRC parallel computing method |
| CN115543390A (en) * | 2022-11-04 | 2022-12-30 | 奥比中光科技集团股份有限公司 | Firmware upgrading method, electronic equipment and storage medium |
| CN116301963A (en) * | 2023-01-09 | 2023-06-23 | 上海加糖科技有限公司 | Upgrading method, device, equipment and storage medium of system firmware |
-
2023
- 2023-11-10 CN CN202311504981.9A patent/CN117453261A/en active Pending
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170063493A1 (en) * | 2015-08-25 | 2017-03-02 | Signalchip Innovations Private Limited | Methods and circuits for performing cyclic redundancy check (crc) of an input data stream |
| CN105117253A (en) * | 2015-08-27 | 2015-12-02 | 常州大学 | BootLoader based remote upgrade method for UV LED (Ultraviolet Light Emitting Diode) curing system |
| CN106788909A (en) * | 2017-03-31 | 2017-05-31 | 重庆邮电大学 | CRC computational methods and device based on GMR satellite communication protocols |
| CN111752584A (en) * | 2020-06-11 | 2020-10-09 | Oppo广东移动通信有限公司 | Firmware upgrade method, apparatus, electronic device and computer-readable storage medium |
| CN112214349A (en) * | 2020-12-09 | 2021-01-12 | 上海灵动微电子股份有限公司 | Data cyclic redundancy check device and method |
| CN112631628A (en) * | 2020-12-11 | 2021-04-09 | 邦彦技术股份有限公司 | Singlechip upgrading method, singlechip and storage medium |
| CN115001508A (en) * | 2022-05-30 | 2022-09-02 | 北京左江科技股份有限公司 | CRC parallel computing method |
| CN115543390A (en) * | 2022-11-04 | 2022-12-30 | 奥比中光科技集团股份有限公司 | Firmware upgrading method, electronic equipment and storage medium |
| CN116301963A (en) * | 2023-01-09 | 2023-06-23 | 上海加糖科技有限公司 | Upgrading method, device, equipment and storage medium of system firmware |
Non-Patent Citations (2)
| Title |
|---|
| 张向文,王飞跃: "《智能轮胎》", vol. 1, 30 June 2019, 北京:机械工业出版社, pages: 467 - 481 * |
| 麻友良,游彩霞: "《汽车电工从入门到精通系列 汽车电路与电子技术基础》", vol. 1, 31 October 2022, 北京:机械工业出版社, pages: 110 - 112 * |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7971199B1 (en) | Mobile device with a self-updating update agent in a wireless network | |
| CN103299276B (en) | Software Update Process for Embedded Devices | |
| KR101557736B1 (en) | Emerging bad block detection | |
| EP2583176B1 (en) | Error detection for files | |
| CN105260215A (en) | Method of updating vehicle-mounted automobile data recorder terminal by USB flash disk | |
| US6446238B1 (en) | System and method for updating microcode stored in a non-volatile memory | |
| CN107783776B (en) | Method and device for processing firmware upgrade package, and electronic device | |
| GB2408359A (en) | Controlling upgrade of firmware | |
| KR20030071750A (en) | System and method for updating and distributing information | |
| CN103154889A (en) | Parallel programming and updating of lighting bus subscribers | |
| CN111813428A (en) | Method and device for upgrading terminal firmware, electronic equipment and storage medium | |
| CN107315616A (en) | A kind of loading method of firmware, device and electronic equipment | |
| CN112015447A (en) | System updating method and device for electronic equipment, electronic equipment and storage medium | |
| CN116301963A (en) | Upgrading method, device, equipment and storage medium of system firmware | |
| US20080172584A1 (en) | Method and system for in-place updating content stored in a storage device | |
| WO2021184712A1 (en) | Software upgrading method and device | |
| CN117407020A (en) | OTA upgrade refreshing method and device, electronic equipment and storage medium | |
| CN111813597A (en) | Air conditioner | |
| CN110457058A (en) | Control node online upgrade method, device, host computer, system and electronic equipment | |
| CN100380526C (en) | Method and storage system for storing a large amount of data in a target storage location | |
| CN117391099B (en) | Smart card data download and verification method and system, storage medium | |
| CN117453261A (en) | Equipment upgrade data verification methods, storage media and electronic equipment | |
| CN117908910A (en) | MCU upgrade method, device, electronic device and storage medium | |
| CN115421761A (en) | Method, device, system, equipment and medium for upgrading micro-control unit application program | |
| CN115357260A (en) | Program upgrade method and device for terminal equipment, terminal equipment and storage medium |
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 | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20240126 |