CN114793241A - Firmware updating method, electronic device and computer readable storage medium - Google Patents
Firmware updating method, electronic device and computer readable storage medium Download PDFInfo
- Publication number
- CN114793241A CN114793241A CN202110103354.9A CN202110103354A CN114793241A CN 114793241 A CN114793241 A CN 114793241A CN 202110103354 A CN202110103354 A CN 202110103354A CN 114793241 A CN114793241 A CN 114793241A
- Authority
- CN
- China
- Prior art keywords
- electronic device
- firmware
- downloading
- time
- server
- 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
- 238000000034 method Methods 0.000 title claims abstract description 62
- 230000008569 process Effects 0.000 claims description 17
- 238000007619 statistical method Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 10
- 230000007246 mechanism Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Medical Informatics (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及更新程序,尤其涉及一种韧体更新方法、电子装置及计算机可读储存媒体。The present invention relates to an update program, and in particular, to a firmware update method, an electronic device and a computer-readable storage medium.
背景技术Background technique
随着科技的进步,目前嵌入式电子装置(Embedded Electronic Device)的更新方法亦越来越多样化。例如,利用无线韧体更新(Firmware Over-the-Air,FOTA)技术来更新嵌入式电子装置的韧体(Firmware)。或者,亦可透过通用串行总线(Universal SerialBus,USB)联机来执行韧体更新。With the advancement of technology, the updating methods of embedded electronic devices are becoming more and more diverse. For example, firmware over-the-air (FOTA) technology is used to update the firmware of the embedded electronic device. Alternatively, firmware updates can also be performed via a Universal Serial Bus (USB) connection.
在窄频网络(Narrowband Network)的环境中,数据传送速度相当慢,且大部分窄频装置的效能也很差。在此受限条件的环境下,省电模式(Power Saving Mode,PSM)启动时也可能中断FOTA的更新程序,使得FOTA的更新程序得花费很多努力和时间。In the environment of Narrowband Network, the data transmission speed is quite slow, and the performance of most Narrowband devices is also poor. Under this limited environment, the FOTA update procedure may also be interrupted when the Power Saving Mode (PSM) is activated, so that the FOTA update procedure takes a lot of effort and time.
发明内容SUMMARY OF THE INVENTION
鉴于以上内容,有必要提供一种韧体更新方法、电子装置及计算机可读储存媒体,可在慢速網路的環境下讓低效能裝置能成功執行FOTA更新程序,並且減少電力消耗。In view of the above, it is necessary to provide a firmware update method, an electronic device and a computer-readable storage medium, which can enable a low-performance device to successfully execute a FOTA update procedure in a slow network environment and reduce power consumption.
本发明实施例提供一种韧体更新方法,应用于电子装置中,其特征在于,所述方法包括:当收到下载韧体的通知时,关闭所述电子装置的省电模式,取得目前时间而获得目前时段,并根据所述目前时间所在的时段取得对应所述电子装置的联机到窄频物联网(Narrowband Internet of Things,NB-IoT)的连接时间临界值A、联机到服务器的连接时间临界值B、下载错误次数的临界值C与未接收到封包的时间临界值D;判断所述电子装置在目前时段联机到NB-IoT的时间是否在所述A值内;若联机到NB-IoT的时间在所述A值内,判断所述电子装置联机到服务器的的时间是否在连接时间临界值B1内;若联机到所述服务器的的时间在所述B值内,所述电子装置开始下载韧体影像;及韧体影像下载完成时,开启所述电子装置的所述省电模式,同时所述服务器显示更新结果为下载成功的信息。An embodiment of the present invention provides a firmware update method, which is applied to an electronic device, wherein the method includes: when a notification for downloading firmware is received, turning off the power saving mode of the electronic device, and obtaining the current time The current time period is obtained, and the connection time threshold A of the electronic device to the Narrowband Internet of Things (NB-IoT) and the connection time to the server corresponding to the electronic device are obtained according to the time period of the current time. The threshold value B, the threshold value C for the number of download errors, and the time threshold value D for not receiving packets; determine whether the time when the electronic device is connected to the NB-IoT in the current period is within the value A; if it is connected to the NB-IoT When the IoT time is within the A value, it is determined whether the connection time of the electronic device to the server is within the connection time threshold B1; if the connection time to the server is within the B value, the electronic device Starting to download the firmware image; and when the firmware image download is completed, the power saving mode of the electronic device is turned on, and the server displays a message that the update result is a successful download.
本发明实施例还提供一种电子装置,包括处理模块与判断模块。所述处理模块用于当收到下载韧体的通知时,关闭所述电子装置的省电模式,取得目前时间而获得目前时段,并根据所述目前时间所在的时段取得对应所述电子装置的联机到窄频物联网NB-IoT的连接时间临界值A、联机到服务器的连接时间临界值B、下载错误次数的临界值C与未接收到封包的时间临界值D。所述判断模块用于判断所述电子装置在目前时段联机到NB-IoT的时间是否在所述A值内,若联机到NB-IoT的时间在所述A值内,判断所述电子装置联机到服务器的的时间是否在连接时间临界值B1内。若联机到所述服务器的的时间在所述B值内,所述处理模块令所述电子装置开始下载韧体影像,及韧体影像下载完成时,开启所述电子装置的所述省电模式,同时所述服务器显示更新结果为下载成功的信息。An embodiment of the present invention also provides an electronic device, which includes a processing module and a judgment module. The processing module is configured to turn off the power saving mode of the electronic device when receiving the notification of downloading the firmware, obtain the current time period to obtain the current time period, and obtain the data corresponding to the electronic device according to the time period in which the current time is located. The connection time threshold A for connecting to the narrowband Internet of Things NB-IoT, the connection time threshold B for connecting to the server, the threshold C for the number of download errors, and the time threshold D for not receiving packets. The judging module is used to judge whether the time when the electronic device is connected to the NB-IoT in the current period is within the A value, and if the time when the electronic device is connected to the NB-IoT is within the A value, it is judged that the electronic device is connected Whether the time to the server is within the connection time threshold B1. If the connection time to the server is within the B value, the processing module instructs the electronic device to start downloading a firmware image, and when the firmware image download is completed, turns on the power saving mode of the electronic device , and at the same time, the server displays the information that the update result is a successful download.
本发明实施例的韧体更新方法、电子装置及计算机可读储存媒体,可在慢速网络的环境下让低效能装置能成功执行FOTA更新程序,并且减少电力消耗。The firmware update method, electronic device, and computer-readable storage medium of the embodiments of the present invention can enable low-performance devices to successfully execute the FOTA update procedure in a slow network environment, and reduce power consumption.
附图说明Description of drawings
图1是本发明实施例的前处理程序中,FOTA下载配置的学习模式的步骤流程图。FIG. 1 is a flow chart of steps of a learning mode of FOTA download configuration in a preprocessing program according to an embodiment of the present invention.
图2是本发明实施例的前处理程序中,FOTA更新配置的学习模式的步骤流程图。FIG. 2 is a flow chart of steps of a learning mode of FOTA update configuration in a preprocessing program according to an embodiment of the present invention.
图3是本发明实施例的韧体更新方法中的韧体下载的步骤流程图。FIG. 3 is a flowchart of steps of downloading firmware in a method for updating firmware according to an embodiment of the present invention.
图4是本发明实施例的韧体更新方法中的韧体更新的步骤流程图。FIG. 4 is a flowchart of steps for updating firmware in a method for updating firmware according to an embodiment of the present invention.
图5是本发明实施例的行动电子装置的硬件架构示意图。FIG. 5 is a schematic diagram of a hardware architecture of a mobile electronic device according to an embodiment of the present invention.
图6是本发明实施例的电子装置的功能方块图。FIG. 6 is a functional block diagram of an electronic device according to an embodiment of the present invention.
主要元件符号说明Description of main component symbols
如下具体实施方式将结合上述附图进一步说明本发明。The following specific embodiments will further illustrate the present invention in conjunction with the above drawings.
具体实施方式Detailed ways
为了能够更清楚地理解本发明的上述目的、特征和优点,下面结合附图和具体实施例对本发明进行详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。In order to more clearly understand the above objects, features and advantages of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments may be combined with each other in the case of no conflict.
在下面的描述中阐述了很多具体细节以便于充分理解本发明,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In the following description, many specific details are set forth in order to facilitate a full understanding of the present invention, and the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terms used herein in the description of the present invention are for the purpose of describing specific embodiments only, and are not intended to limit the present invention.
需要说明的是,在本发明中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个所述特征。另外,各个实施例的间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本发明要求的保护范围的内。It should be noted that the descriptions involving "first", "second", etc. in the present invention are only for the purpose of description, and should not be construed as indicating or implying their relative importance or implying the number of indicated technical features . Thus, features delimited with "first", "second" may expressly or implicitly include at least one of said features. In addition, the technical solutions of the various embodiments can be combined with each other, but must be based on the realization by those of ordinary skill in the art. When the combination of technical solutions is contradictory or cannot be realized, it should be considered that the combination of technical solutions does not exist. , is not within the scope of protection required by the present invention.
本发明实施例的韧体更新方法包括前处理操作,前处理操作还包括FOTA下载配置的学习程序与FOTA更新配置的学习程序。The firmware update method of the embodiment of the present invention includes a preprocessing operation, and the preprocessing operation further includes a learning program of FOTA download configuration and a learning program of FOTA update configuration.
图1是本发明实施例的前处理程序中,FOTA下载配置的学习模式的步骤流程图,应用于电子装置中。根据不同的需求,所述流程图中步骤的顺序可以改变,某些步骤可以省略。FIG. 1 is a flow chart of steps of a learning mode of FOTA download configuration in a pre-processing program according to an embodiment of the present invention, which is applied to an electronic device. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
步骤S11,电子装置开机,例如,窄频装置。In step S11, the electronic device is powered on, for example, a narrowband device.
步骤S12,统计分析所述电子装置在不同时段的韧体下载流程。时段包括06:00~12:00、12:00~18:00、18:00~24:00与24:00~06:00。Step S12: Statistically analyze the firmware downloading process of the electronic device in different time periods. The time periods include 06:00~12:00, 12:00~18:00, 18:00~24:00 and 24:00~06:00.
步骤S13,取得所述电子装置经统计分析后在不同时段联机到窄频物联网(Narrowband Internet of Things,NB-IoT)的多个连接时间临界值A。Step S13 , obtaining a plurality of connection time thresholds A of the electronic device connecting to the Narrowband Internet of Things (NB-IoT) at different time periods after statistical analysis.
步骤S14,取得所述电子装置经统计分析后在不同时段联机到服务器的多个连接时间临界值B。Step S14 , obtaining a plurality of connection time thresholds B of the electronic device connecting to the server in different time periods after statistical analysis.
步骤S15,取得所述电子装置经统计分析后在不同时段与FOTA服务器之间的多个往返时间(Round-Trip Time)D,即,多个未接收到封包的时间临界值。Step S15 , obtain a plurality of round-trip times (Round-Trip Times) D between the electronic device and the FOTA server in different time periods after statistical analysis, that is, a plurality of time thresholds for not receiving packets.
步骤S16,取得电子装置经统计分析后在不同时段从所述FOTA服务器的多个下载失败次数的临界值(Error Rate)C。Step S16 , obtaining a threshold value (Error Rate) C of multiple download failure times from the FOTA server in different time periods of the electronic device after statistical analysis.
换句话说,每一时段都可获得一个A~D的值。举例来说,在06:00~12:00时,网络流量较高,则A为30秒,B为60秒,C为30次,D为180秒。又,在24:00~06:00时,网络流量较低,则A为10秒,B为20秒,C为10次,D为60秒。In other words, each time period can obtain a value of AD. For example, from 06:00 to 12:00, when the network traffic is high, A is 30 seconds, B is 60 seconds, C is 30 times, and D is 180 seconds. Also, from 24:00 to 06:00, when the network traffic is low, A is 10 seconds, B is 20 seconds, C is 10 times, and D is 60 seconds.
步骤S17,当有任何一个值超出设定的临界值时,则中止韧体的下载或更新程序,若无误则完成更新程序,然后恢复省电机制。Step S17 , when any value exceeds the set threshold, the firmware download or update process is terminated, if there is no error, the update process is completed, and then the power saving mechanism is restored.
图2是本发明实施例的前处理程序中,FOTA更新配置的学习模式的步骤流程图,应用于电子装置中。根据不同的需求,所述流程图中步骤的顺序可以改变,某些步骤可以省略。FIG. 2 is a flow chart of steps of a learning mode of FOTA update configuration in a preprocessing program according to an embodiment of the present invention, which is applied to an electronic device. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
步骤S21,所述电子装置开机,例如,窄频装置。Step S21, the electronic device is powered on, for example, a narrowband device.
步骤S22,电子装置预先下载FOTA韧体。Step S22, the electronic device pre-downloads the FOTA firmware.
步骤S23,统计分析所述电子装置在不同负载程度的韧体更新流程,以计算产生在不同负载程度下的多个更新时间临界值E。负载程度包括100%~75%、75%~50%、50%~25%与25%~0%。Step S23: Statistically analyze the firmware update process of the electronic device under different load levels to calculate and generate a plurality of update time thresholds E under different load levels. The load level includes 100%-75%, 75%-50%, 50%-25% and 25%-0%.
换句话说,每一时段都可获得一个E值。In other words, one E value can be obtained for each time period.
图3是本发明实施例的韧体更新方法中的韧体下载的步骤流程图,应用于电子装置中。根据不同的需求,所述流程图中步骤的顺序可以改变,某些步骤可以省略。FIG. 3 is a flowchart of steps for downloading firmware in a method for updating firmware according to an embodiment of the present invention, which is applied to an electronic device. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
步骤S301,服务器通知所述电子装置要开始自云端服务器下载韧体图像文件。Step S301, the server notifies the electronic device to start downloading the firmware image file from the cloud server.
步骤S302,关闭所述电子装置的省电模式(PSM),取得目前时间而获得目前时段,并根据所述目前时间所在的时段取得对应的A、B、C、D,例如,A1、B1、C1、D1。Step S302: Turn off the power saving mode (PSM) of the electronic device, obtain the current time period to obtain the current time period, and obtain the corresponding A, B, C, and D according to the time period in which the current time is located, for example, A1, B1, C1, D1.
步骤S303,判断所述电子装置在目前时段联机到NB-IoT的时间是否在连接时间临界值A1内。Step S303, determining whether the time when the electronic device is connected to the NB-IoT in the current period is within the connection time threshold A1.
步骤S304,若联机到NB-IoT的时间非在连接时间临界值A1内,则中止韧体的下载程序,开启所述电子装置的省电模式。Step S304, if the connection time to the NB-IoT is not within the connection time threshold A1, the firmware downloading procedure is terminated, and the power saving mode of the electronic device is turned on.
步骤S305,服务器显示更新结果为下载失败的信息。Step S305, the server displays the information that the update result is the download failure.
步骤S306,若联机到NB-IoT的时间在连接时间临界值A1内,判断所述电子装置联机到服务器的的时间是否在连接时间临界值B1内。若联机到所述服务器的的时间非在连接时间临界值B1内,则中止韧体的下载程序,开启所述电子装置的省电模式(步骤S304),服务器显示更新结果为下载失败的信息(步骤S305)。Step S306, if the connection time to the NB-IoT is within the connection time threshold A1, it is determined whether the connection time of the electronic device to the server is within the connection time threshold B1. If the connection time to the server is not within the connection time threshold B1, the firmware downloading procedure is terminated, the power saving mode of the electronic device is turned on (step S304), and the server displays the update result as a download failure message ( Step S305).
步骤S307,若联机到服务器的的时间在连接时间临界值B1内,所述电子装置开始下载韧体影像。Step S307, if the connection time to the server is within the connection time threshold B1, the electronic device starts to download the firmware image.
步骤S308,韧体影像下载过程中,判断发生插座错误(Socket Error)。In step S308, during the firmware image downloading process, it is determined that a socket error occurs.
步骤S309,判断韧体影像下载失败的次数是否达到错误次数的临界值C1。In step S309 , it is determined whether the number of times of firmware image download failures reaches a critical value C1 of the number of errors.
步骤S310,若韧体影像下载失败的次数达到错误次数的临界值C1,清除下载的韧体影像,中止韧体的下载程序,开启所述电子装置的省电模式(步骤S304),服务器显示更新结果为下载失败的信息(步骤S305)。Step S310, if the number of failed firmware image downloads reaches the critical value C1 of the number of errors, the downloaded firmware image is cleared, the firmware download procedure is terminated, and the power saving mode of the electronic device is turned on (step S304), and the server displays the update The result is a download failure message (step S305).
步骤S311,若韧体影像下载失败的次数未达到错误次数的临界值C1,重启所述电子装置,并回复该韧体影像下载的操作(步骤S307)。Step S311 , if the number of times of failure to download the firmware image does not reach the threshold value C1 of the number of errors, restart the electronic device and resume the operation of downloading the firmware image (step S307 ).
步骤S312,韧体影像下载过程中,判断所述电子装置未接收到所述韧体影像的封包的时间达到时间临界值D1。当未接收到所述韧体影像的封包的时间达到时间临界值D1,重启所述电子装置(步骤S311),并回复该韧体影像下载的操作(步骤S307)。Step S312 , during the firmware image downloading process, it is determined that the time when the electronic device does not receive the packet of the firmware image reaches a time threshold D1 . When the time when the packet of the firmware image is not received reaches the time threshold D1, the electronic device is restarted (step S311 ), and the operation of downloading the firmware image is resumed (step S307 ).
步骤S313,响应步骤S307,判断韧体影像下载完成。In step S313, in response to step S307, it is determined that the download of the firmware image is completed.
步骤S314,开启所述电子装置的省电模式。Step S314, enabling the power saving mode of the electronic device.
步骤S315,显示更新结果为下载成功的信息。Step S315, displaying that the update result is a successful download.
图4是本发明实施例的韧体更新方法中的韧体更新的步骤流程图,应用于电子装置中。根据不同的需求,所述流程图中步骤的顺序可以改变,某些步骤可以省略。FIG. 4 is a flowchart of steps for updating firmware in a method for updating firmware according to an embodiment of the present invention, which is applied to an electronic device. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
步骤S41,服务器通知所述电子装置要开始执行韧体更新程序。Step S41, the server notifies the electronic device to start executing the firmware update procedure.
步骤S42,关闭所述电子装置的省电模式。Step S42, turning off the power saving mode of the electronic device.
步骤S43,取得所述电子装置的目前负载。Step S43, obtaining the current load of the electronic device.
步骤S44,判断所述电子装置在目前负载下的更新时间是否在更新时间临界值E1内。Step S44, judging whether the update time of the electronic device under the current load is within the update time threshold E1.
步骤S45,若在目前负载下的更新时间非在更新时间临界值E1内,开启所述电子装置的省电模式。Step S45 , if the update time under the current load is not within the update time threshold E1 , turn on the power saving mode of the electronic device.
步骤S46,服务器显示更新结果为更新失败的信息。Step S46, the server displays information that the update result is that the update fails.
步骤S47,若在目前负载下的更新时间在更新时间临界值E1内,开启所述电子装置的省电模式。Step S47, if the update time under the current load is within the update time threshold E1, the power saving mode of the electronic device is turned on.
步骤S48,服务器显示更新结果为更新成功的信息。In step S48, the server displays the information that the update result is that the update is successful.
图5系显示本发明实施例的行动电子装置的硬件架构示意图。电子装置200,但不仅限于,可通过系统总线相互通信连接处理器210、内存220以及韧体更新系统230,图5仅示出了具有组件210-230的电子装置200,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。FIG. 5 is a schematic diagram showing a hardware structure of a mobile electronic device according to an embodiment of the present invention. The
所述内存220至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型内存(例如,SD或DX内存等)、随机访问内存(RAM)、静态随机访问内存(SRAM)、只读存储器(ROM)、电可擦除可程序设计只读存储器(EEPROM)、可程序设计只读存储器(PROM)、磁性内存、磁盘、光盘等。在一些实施例中,所述内存220可以是所述电子装置200的内部存储单元,例如电子装置200的硬盘或内存。在另一些实施例中,所述内存也可以是所述电子装置200的外部存储设备,例如所述电子装置200上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述内存220还可以既包括所述电子装置200的内部存储单元也包括其外部存储设备。本实施例中,所述内存220通常用于存储安装于所述电子装置200的操作系统和各类应用软件,例如韧体更新系统230的程序代码等。此外,所述内存220还可以用于暂时地存储已经输出或者将要输出的各类数据。The
所述处理器210在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。所述处理器210通常用于控制所述电子装置200的总体操作。本实施例中,所述处理器210用于运行所述内存220中存储的程序代码或者处理数据,例如,运行所述韧体更新系统230等。In some embodiments, the
需要说明的是,图5仅为举例说明电子装置200。在其他实施例中,电子装置200也可以包括更多或者更少的组件,或者具有不同的组件配置。It should be noted that FIG. 5 only illustrates the
图6系显示本发明实施例的电子装置的功能方块图,其用于执行韧体更新的方法。本发明实施例的韧体更新的方法可由储存媒体中的计算机程序来实现,例如,电子装置200中的内存220。当实现本发明方法的计算机程序由处理器210加载到内存220时,驱动行装置200的处理器210执行本发明实施例的韧体更新的方法。FIG. 6 is a functional block diagram of an electronic device according to an embodiment of the present invention, which is used for a method for performing firmware update. The firmware update method of the embodiment of the present invention may be implemented by a computer program in a storage medium, for example, the
本发明实施例的电子装置200包括处理模块310与判断模块320。The
以下说明本发明实施例的前处理程序中,FOTA下载配置的学习模式的流程。The following describes the flow of the learning mode of the FOTA download configuration in the preprocessing program of the embodiment of the present invention.
处理模块310在电子装置开机时,统计分析电子装置200在不同时段的韧体下载流程。时段包括06:00~12:00、12:00~18:00、18:00~24:00与24:00~06:00。The
处理模块310取得电子装置200经统计分析后在不同时段联机到NB-IoT的多个连接时间临界值A,取得电子装置200经统计分析后在不同时段联机到服务器的多个连接时间临界值B,取得电子装置200经统计分析后在不同时段与FOTA服务器之间的多个往返时间D,即,多个未接收到封包的时间临界值,以及取得电子装置经统计分析后在不同时段从所述FOTA服务器的多个下载失败次数的临界值C。换句话说,每一时段都可获得一个A~D的值。The
以下说明本发明实施例的前处理程序中,FOTA更新配置的学习模式的流程。The following describes the flow of the learning mode of the FOTA update configuration in the preprocessing program of the embodiment of the present invention.
处理模块310在电子装置开机时,预先下载FOTA韧体。The
处理模块310统计分析电子装置200在不同负载程度的韧体更新流程,以计算产生在不同负载程度下的多个更新时间临界值E。负载程度包括100%~75%、75%~50%、50%~25%与25%~0%。The
换句话说,每一时段都可获得一个E值。In other words, one E value can be obtained for each time period.
以下说明本发明实施例的韧体更新方法中的韧体下载的实施流程。The following describes the implementation flow of the firmware download in the firmware update method according to the embodiment of the present invention.
通知电子装置200要开始自云端服务器下载韧体图像文件。The
电子装置200的处理模块310自服务器取得下载韧体图像文件的通知时,关闭电子装置200的省电模式,取得目前时间而获得目前时段,并根据所述目前时间所在的时段取得对应的A、B、C、D,例如,A1、B1、C1、D1。When the
电子装置200的判断模块320判断电子装置200在目前时段联机到NB-IoT的时间是否在连接时间临界值A1内。The
若联机到NB-IoT的时间非在连接时间临界值A1内,则处理模块310中止韧体的下载程序,并开启电子装置200的省电模式,同时服务器显示更新结果为下载失败的信息。If the connection time to the NB-IoT is not within the connection time threshold A1, the
若联机到NB-IoT的时间在连接时间临界值A1内,判断模块320判断电子装置200联机到服务器的的时间是否在连接时间临界值B1内。若联机到所述服务器的的时间非在连接时间临界值B1内,则处理模块310中止韧体的下载程序,开启电子装置200的省电模式,同时服务器显示更新结果为下载失败的信息。If the connection time to the NB-IoT is within the connection time threshold A1, the
若联机到服务器的的时间在连接时间临界值B1内,处理模块310开始下载韧体影像。If the connection time to the server is within the connection time threshold B1, the
韧体影像下载过程中,判断模块320判断发生插座错误,并判断韧体影像下载失败的次数是否达到错误次数的临界值C1。During the firmware image download process, the
若韧体影像下载失败的次数达到错误次数的临界值C1,处理模块310清除下载的韧体影像,中止韧体的下载程序,并开启电子装置200的省电模式,同时服务器显示更新结果为下载失败的信息。If the number of failed firmware image downloads reaches the critical value C1 of the number of errors, the
若韧体影像下载失败的次数未达到错误次数的临界值C1,处理模块310重启电子装置200,并回复该韧体影像下载的操作。If the number of failed firmware image downloads does not reach the threshold value C1 of the number of errors, the
韧体影像下载过程中,判断模块320判断电子装置200未接收到所述韧体影像的封包的时间达到时间临界值D1。当未接收到所述韧体影像的封包的时间达到时间临界值D1,处理模块310重启电子装置200,并回复该韧体影像下载的操作。During the firmware image downloading process, the determining
当韧体影像下载完成,处理模块310开启电子装置200的省电模式,同时服务器显示更新结果为下载成功的信息。When the download of the firmware image is completed, the
以下说明本发明实施例的韧体更新方法中的韧体更新的实施流程。The following describes an implementation process of the firmware update in the firmware update method according to the embodiment of the present invention.
处理模块310自服务器取得要开始执行韧体更新程序的通知时,关闭电子装置200的省电模式,取得电子装置200200的目前负载。The
判断模块320判断电子装置200在目前负载下的更新时间是否在更新时间临界值E1内。The
若在目前负载下的更新时间非在更新时间临界值E1内,处理模块310开启电子装置200的省电模式,同时服务器显示更新结果为更新失败的信息。If the update time under the current load is not within the update time threshold E1, the
若在目前负载下的更新时间在更新时间临界值E1内,处理模块310开启电子装置200的省电模式,同时服务器显示更新结果为更新成功的信息。If the update time under the current load is within the update time threshold E1, the
电子装置200集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,所述计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁盘、光盘、计算机内存、只读存储器、随机存取内存、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。If the modules/units integrated in the
可以理解的是,以上所描述的模块划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本申请各个实施例中的各功能模块可以集成在相同处理单元中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在相同单元中。上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。It can be understood that the module division described above is only a logical function division, and other division methods may be used in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated in the same processing unit, or each module may exist physically alone, or two or more modules may be integrated in the same unit. The above-mentioned integrated modules can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
对本领域的普通技术人员来说,可以根据本发明实施例提供的技术方案和技术构思结合生成的实际需要做出其他相应的改变或调整,而这些改变和调整都应属于本发明权利要求的保护范围。For those of ordinary skill in the art, other corresponding changes or adjustments can be made according to the technical solutions and technical ideas provided in the embodiments of the present invention in combination with the actual needs generated, and these changes and adjustments should belong to the protection of the claims of the present invention. scope.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110103354.9A CN114793241A (en) | 2021-01-26 | 2021-01-26 | Firmware updating method, electronic device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110103354.9A CN114793241A (en) | 2021-01-26 | 2021-01-26 | Firmware updating method, electronic device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114793241A true CN114793241A (en) | 2022-07-26 |
Family
ID=82460245
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110103354.9A Pending CN114793241A (en) | 2021-01-26 | 2021-01-26 | Firmware updating method, electronic device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114793241A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101782857A (en) * | 2010-01-19 | 2010-07-21 | 福建三元达软件有限公司 | Payment terminal, software upgrading method and system thereof |
CN105849696A (en) * | 2013-12-23 | 2016-08-10 | 谷歌公司 | Providing a software update to computing devices on the same network |
CN109347907A (en) * | 2018-08-31 | 2019-02-15 | 百度在线网络技术(北京)有限公司 | Installation kit method for down loading and device |
CN110647337A (en) * | 2019-08-20 | 2020-01-03 | 深圳市易佰特软件有限公司 | Internet of things MCU (microprogrammed control Unit) air firmware upgrading method |
CN110855463A (en) * | 2018-08-21 | 2020-02-28 | 中兴通讯股份有限公司 | Method, device and equipment for upgrading aerial firmware and computer readable medium |
CN111565122A (en) * | 2020-04-29 | 2020-08-21 | 四川虹美智能科技有限公司 | Internet of things equipment firmware upgrading method, device and system |
CN112230953A (en) * | 2020-09-25 | 2021-01-15 | 深圳星标科技股份有限公司 | Visual navigation aids firmware upgrade method, device, computer equipment and medium |
-
2021
- 2021-01-26 CN CN202110103354.9A patent/CN114793241A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101782857A (en) * | 2010-01-19 | 2010-07-21 | 福建三元达软件有限公司 | Payment terminal, software upgrading method and system thereof |
CN105849696A (en) * | 2013-12-23 | 2016-08-10 | 谷歌公司 | Providing a software update to computing devices on the same network |
CN110855463A (en) * | 2018-08-21 | 2020-02-28 | 中兴通讯股份有限公司 | Method, device and equipment for upgrading aerial firmware and computer readable medium |
CN109347907A (en) * | 2018-08-31 | 2019-02-15 | 百度在线网络技术(北京)有限公司 | Installation kit method for down loading and device |
CN110647337A (en) * | 2019-08-20 | 2020-01-03 | 深圳市易佰特软件有限公司 | Internet of things MCU (microprogrammed control Unit) air firmware upgrading method |
CN111565122A (en) * | 2020-04-29 | 2020-08-21 | 四川虹美智能科技有限公司 | Internet of things equipment firmware upgrading method, device and system |
CN112230953A (en) * | 2020-09-25 | 2021-01-15 | 深圳星标科技股份有限公司 | Visual navigation aids firmware upgrade method, device, computer equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20170206079A1 (en) | Method and Device for Upgrading Software | |
CN103605591A (en) | Method and device for controlling memory initialization of terminal system | |
CN106293621B (en) | A kind of firmware upgrade method and device | |
US20180173608A1 (en) | Software Defect Analysis Tool | |
CN108449198A (en) | A kind of method, system and the storage device of OTA upgradings | |
CN112394966A (en) | Equipment upgrading method and device, computer readable medium and equipment | |
CN113110891B (en) | Firmware loading method and device for solid state disk, computer equipment and storage medium | |
CN115065574A (en) | Wake-up method and device of vehicle controller, electronic equipment and automatic driving vehicle | |
CN114793241A (en) | Firmware updating method, electronic device and computer readable storage medium | |
CN115857998B (en) | Upgrade method, device and medium based on ZYNQ and FPGA architecture | |
CN112732301A (en) | Vehicle upgrading method and device | |
CN111400085A (en) | Transaction rollback exception processing method, device, computer equipment and storage medium | |
CN117591339A (en) | Remote upgrading method, device, equipment and medium for energy controller module program | |
CN116028089A (en) | Solid state disk firmware updating method and device, computer equipment and medium | |
CN110119285A (en) | A kind of low side scm software upgrade method and relevant apparatus | |
CN116700765A (en) | Firmware upgrading method and device of servo driver and servo driver | |
CN116594810A (en) | Firmware upgrade rollback method, system, electronic equipment and readable storage medium | |
CN116009908A (en) | Device upgrading method, device, computer device and computer readable storage medium | |
CN110851328B (en) | Method for detecting abnormal power failure of password card in PKCS #11 application | |
CN112199103B (en) | Equipment upgrading method and terminal equipment | |
CN114007247B (en) | Method, device, equipment and storage medium for determining cell reselection evaluation frequency | |
CN115437674A (en) | Firmware upgrading method, device, medium and electronic equipment | |
CN114610331A (en) | Software installation method and system | |
CN113986742A (en) | Automatic testing method, device, equipment and storage medium | |
CN113032232A (en) | Related method for detecting performance of equipment, related device and equipment |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20220726 |
|
WD01 | Invention patent application deemed withdrawn after publication |