CN118409894A - Method for starting household appliance program and machine-readable storage medium - Google Patents
Method for starting household appliance program and machine-readable storage medium Download PDFInfo
- Publication number
- CN118409894A CN118409894A CN202310086640.8A CN202310086640A CN118409894A CN 118409894 A CN118409894 A CN 118409894A CN 202310086640 A CN202310086640 A CN 202310086640A CN 118409894 A CN118409894 A CN 118409894A
- Authority
- CN
- China
- Prior art keywords
- program
- home appliance
- programs
- starting
- correct
- 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 57
- 238000012795 verification Methods 0.000 claims abstract description 80
- 238000004364 calculation method Methods 0.000 claims abstract description 29
- 230000015654 memory Effects 0.000 claims description 23
- 238000012360 testing method Methods 0.000 claims description 16
- 230000006870 function Effects 0.000 abstract description 13
- 230000008569 process Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 11
- 230000009977 dual effect Effects 0.000 description 9
- 230000008439 repair process Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1417—Boot up procedures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/1008—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
- G06F11/1048—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices using arrangements adapted for a specific error detection or correction feature
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本发明提供了一种家电程序的启动方法及机器可读存储介质,其中家电程序的启动方法包括:获取触发家电的自检事件;分别对多个程序存储区中的程序进行校验计算,得到多个程序存储区的校验结果;根据校验结果判断多个程序存储区的程序是否正确;从判定为正确的程序中选择一个作为运行程序;执行运行程序。本发明的方案中,多个程序存储区中的程序独立运行,可以各自完成家电的相应功能,互为备用,在任一程序存储区中的程序出现运行异常的情况下,可以快速排除故障的程序,使家电快速恢复正常运行状态。
The present invention provides a method for starting a home appliance program and a machine-readable storage medium, wherein the method for starting a home appliance program includes: obtaining a self-checking event that triggers the home appliance; performing verification calculations on the programs in multiple program storage areas respectively to obtain verification results of the multiple program storage areas; judging whether the programs in the multiple program storage areas are correct according to the verification results; selecting one as a running program from the programs judged to be correct; and executing the running program. In the scheme of the present invention, the programs in the multiple program storage areas run independently, can each complete the corresponding functions of the home appliance, and serve as backup for each other. In the case that a program in any program storage area runs abnormally, the faulty program can be quickly eliminated, so that the home appliance can quickly resume normal operation.
Description
技术领域Technical Field
本发明涉及家电控制,特别是涉及一种家电程序的启动方法及机器可读存储介质。The present invention relates to home appliance control, and in particular to a home appliance program startup method and a machine-readable storage medium.
背景技术Background technique
家用电器的功能日益丰富,其运行越来越依赖于控制程序的正确执行。然而家电的使用场景千差万别,有些使用环境存在很强的外部干扰,有可能破坏换程序的运行环境,甚至导致程序存储器中的代码故障。As the functions of household appliances become increasingly rich, their operation increasingly relies on the correct execution of control programs. However, the usage scenarios of household appliances vary greatly, and some usage environments have strong external interference, which may destroy the operating environment of the program and even cause code failures in the program memory.
程序错误导致的家电质量问题,降低了用户的使用体验,增加了企业的售后费用,给企业的品牌造成不良影响。Home appliance quality problems caused by program errors reduce the user experience, increase the company's after-sales costs, and have a negative impact on the company's brand.
现有技术针对上述问题,提出了远程程序刷写的方案。在出现程序错误的情况下,利用网络技术远程刷写程序。然而这种方式存在以下问题:需要具备联网条件;安全性和可靠性差,处理速度慢。In order to solve the above problems, the prior art has proposed a remote program flashing solution. In the event of a program error, the program is flashed remotely using network technology. However, this method has the following problems: it requires networking conditions; it has poor security and reliability, and has a slow processing speed.
由于上述技术问题,上述方案仅仅停留于研发和测试阶段,并未实际应用于家电产品。Due to the above technical problems, the above solutions only remain in the research and development and testing stage and have not been actually applied to home appliances.
发明内容Summary of the invention
本发明的一个目的是要提供一种能够解决上述任一问题的家电程序的启动方法及机器可读存储介质。An object of the present invention is to provide a method for starting a home appliance program and a machine-readable storage medium that can solve any of the above problems.
本发明一个进一步的目的是提高了家电程序的可靠性,保证家电正常启动。A further object of the present invention is to improve the reliability of the home appliance program and ensure the normal startup of the home appliance.
本发明另一个进一步的目的是快速修复被破坏的程序。Another further object of the present invention is to quickly repair damaged programs.
特别地,本发明提供了一种家电程序的启动方法,包括:In particular, the present invention provides a method for starting a home appliance program, comprising:
获取触发家电的自检事件;Get the self-test event that triggers the home appliance;
分别对多个程序存储区中的程序进行校验计算,得到多个程序存储区的校验结果;Performing verification calculations on the programs in the plurality of program storage areas respectively to obtain verification results of the plurality of program storage areas;
根据校验结果判断多个程序存储区的程序是否正确;Determine whether the programs in the multiple program storage areas are correct according to the verification results;
从判定为正确的程序中选择一个作为运行程序;Select one of the programs that are judged to be correct as the running program;
执行运行程序。Execute the run program.
可选地,分别对多个程序存储区中的程序进行校验计算的步骤包括:Optionally, the step of performing verification calculations on the programs in the plurality of program storage areas respectively includes:
从独立于多个程序存储区的自检存储区内读取校验代码;Reading verification code from a self-checking storage area independent of a plurality of program storage areas;
执行校验代码,以由校验代码分别对多个程序存储区中的程序进行校验计算。The verification code is executed to perform verification calculations on the programs in the plurality of program storage areas respectively.
可选地,根据校验结果判断所述多个程序存储区的程序是否正确的步骤包括:Optionally, the step of judging whether the programs in the plurality of program storage areas are correct according to the verification result includes:
从自检存储区内读取预期结果;Read the expected result from the self-test storage area;
将预期结果与多个程序存储区的校验结果分别进行比较;Compare the expected result with the verification results of multiple program storage areas respectively;
将校验结果与预期结果匹配的程序判定为正确的程序。A program whose verification result matches the expected result is determined to be a correct program.
可选地,校验代码被配置为:Optionally, the validation code is configured as:
对程序中的至少一部分代码进行校验计算;和/或Performing a checksum calculation on at least a portion of the code in the program; and/or
提取程序的指定的特征信息,对特征信息进行校验计算。Extract the specified characteristic information of the program and perform verification calculation on the characteristic information.
可选地,从判定为正确的程序中选择一个作为运行程序的步骤包括:Optionally, the step of selecting one of the programs determined to be correct as a running program includes:
从判定为正确的程序中选择选择优先级最高的一个作为运行程序;或者Select the one with the highest priority from the correct programs as the running program; or
从判定为正确的程序中随机选择运行程序。A program is randomly selected to run from the programs judged to be correct.
可选地,执行运行程序的步骤包括:Optionally, the step of executing the running program includes:
将引导加载代码中的程序起始地址定位至运行程序;以加载运行程序。Position the program start address in the bootloader code to the running program; to load the running program.
可选地,在从判定为正确的程序中选择一个作为运行程序的步骤之后,还包括:使用判定为正确的程序替换判定为错误的程序。Optionally, after the step of selecting one of the programs determined to be correct as the running program, the method further includes: replacing the program determined to be incorrect with the program determined to be correct.
可选地,家电的自检事件包括:Optionally, the self-test events of the home appliance include:
家电上电开机的初始化事件;和/或Initialization event of powering on a home appliance; and/or
到达预设的自检时间的定时事件;和/或A timed event where a preset self-test time has been reached; and/or
家电出现程序执行报错的修复事件。Repair incidents where home appliances report errors during program execution.
可选地,多个程序存储区为多个独立的存储器和/或一个存储器划分出的多个存储区。Optionally, the multiple program storage areas are multiple independent memories and/or multiple storage areas divided from one memory.
根据本发明的另一个方面,还提供了机器可读存储介质,其上存储有机器可执行程序,机器可执行程序被处理器执行时实现上述任一种的家电程序的启动方法。According to another aspect of the present invention, a machine-readable storage medium is provided, on which a machine-executable program is stored. When the machine-executable program is executed by a processor, any of the above-mentioned methods for starting a home appliance program is implemented.
本发明的家电程序的启动方法,多个程序存储区中的分别存储程序,在自检过程中分别对多个程序存储区中的程序进行校验计算,得到多个程序存储区的校验结果。利用校验结果判断多个程序存储区的程序是否正确;从判定为正确的程序中选择一个作为运行程序;执行运行程序。多个程序存储区中的程序独立运行,可以各自完成家电的相应功能,互为备用。在任一程序存储区中的程序出现运行异常的情况下,可以快速排除故障的程序。The method for starting a home appliance program of the present invention stores programs in a plurality of program storage areas respectively, and performs verification calculations on the programs in the plurality of program storage areas during a self-check process to obtain verification results of the plurality of program storage areas. The verification results are used to determine whether the programs in the plurality of program storage areas are correct; one of the programs determined to be correct is selected as a running program; and the running program is executed. The programs in the plurality of program storage areas run independently, and can each complete the corresponding functions of the home appliance and serve as backup for each other. In the event that a program in any program storage area runs abnormally, the faulty program can be quickly eliminated.
进一步地,本发明的家电程序的启动方法,校验代码和预期结果可以存储在独立于多个程序存储区的自检存储区,可以有效避免其被损坏,校验过程快速、高效,结果准确,特别适用于家电设备。Furthermore, in the method for starting a household appliance program of the present invention, the verification code and expected results can be stored in a self-check storage area independent of multiple program storage areas, which can effectively prevent them from being damaged. The verification process is fast and efficient, and the results are accurate, which is particularly suitable for household appliances.
更进一步地,本发明的家电程序的启动方法,直接使用判定为正确的程序作为运行程序并执行,相比于现有的程序修复技术,处理更加快速,并且可以避免修复失败的情况。Furthermore, the method for starting a home appliance program of the present invention directly uses the program determined to be correct as the running program and executes it. Compared with the existing program repair technology, the processing is faster and the repair failure can be avoided.
根据下文结合附图对本发明具体实施例的详细描述,本领域技术人员将会更加明了本发明的上述以及其他目的、优点和特征。Based on the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will become more aware of the above and other objects, advantages and features of the present invention.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
后文将参照附图以示例性而非限制性的方式详细描述本发明的一些具体实施例。附图中相同的附图标记标示了相同或类似的部件或部分。本领域技术人员应该理解,这些附图未必是按比例绘制的。附图中:Hereinafter, some specific embodiments of the present invention will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:
图1是根据本发明一个实施例的家电程序的启动方法的示意图;FIG1 is a schematic diagram of a method for starting a home appliance program according to an embodiment of the present invention;
图2是根据本发明一个实施例的家电程序的启动方法中双程序存储区的示意图;FIG2 is a schematic diagram of dual program storage areas in a method for starting a home appliance program according to an embodiment of the present invention;
图3是根据本发明一个实施例的家电程序的启动方法应用于双程序存储区的流程示意图;3 is a schematic diagram of a flow chart of a method for starting a home appliance program according to an embodiment of the present invention applied to a dual program storage area;
图4是根据本发明一个实施例的家电程序的启动方法中双程序存储区的示意图;4 is a schematic diagram of dual program storage areas in a method for starting a home appliance program according to an embodiment of the present invention;
图5是根据本发明一个实施例的家电程序的启动方法应用于双程序存储区的流程示意图;以及FIG5 is a schematic flow chart of a method for starting a home appliance program according to an embodiment of the present invention applied to a dual program storage area; and
图6是根据本发明一个实施例的机器可读存储介质的示意图。FIG. 6 is a schematic diagram of a machine-readable storage medium according to an embodiment of the present invention.
具体实施方式Detailed ways
在本实施例的描述中,参考术语“一个实施例”、“一些实施例”、“示意性实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料、步骤、流程或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料、步骤、流程或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of the present embodiment, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, steps, processes or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, steps, processes or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
图1是根据本发明一个实施例的家电程序的启动方法的示意图;该家电程序的启动方法一般性地可以包括:FIG1 is a schematic diagram of a method for starting a home appliance program according to an embodiment of the present invention; the method for starting a home appliance program may generally include:
步骤S101,获取触发家电的自检事件。Step S101, obtaining a self-test event that triggers the home appliance.
上述自检事件可以包括:家电上电开机的初始化事件;到达预设的自检时间的定时事件;家电出现程序执行报错的修复事件。The above self-test events may include: an initialization event when the home appliance is powered on; a timing event when a preset self-test time is reached; and a repair event when a program execution error occurs in the home appliance.
家电上电开机的初始化事件可以为家电接通电源后接收到初始化指令的事件,也即在家电进行初始化的过程中执行家电程序的校验,并选择需要执行的程序。The initialization event of powering on the home appliance may be an event of receiving an initialization instruction after the home appliance is powered on, that is, during the initialization process of the home appliance, the home appliance program is checked and a program to be executed is selected.
到达预设的自检时间的定时事件可以为接收到预设的自检时间到时指令的事件,也即家电可以预设自检周期,定期进行自检,在自检过程中执行家电程序的校验,并重新选择需要执行的程序。The timed event of reaching the preset self-test time may be the event of receiving a preset self-test time expiration instruction, that is, the home appliance may preset a self-test cycle, perform self-tests regularly, perform verification of the home appliance program during the self-test process, and reselect the program to be executed.
家电出现程序执行报错的修复事件可以为接收到家电故障指示信号或者接收到功能失效反馈的事件,也即家电在运行中发现出现故障或者接收到用户反馈功能异常的情况下,执行家电程序的校验,并重新选择需要执行的程序。The repair event for a program execution error in a home appliance may be an event of receiving a home appliance fault indication signal or receiving feedback on a function failure. That is, when the home appliance discovers a fault during operation or receives user feedback that the function is abnormal, the home appliance program is verified and the program to be executed is reselected.
步骤S102,分别对多个程序存储区中的程序进行校验计算,得到多个程序存储区的校验结果。上述多个程序存储区分别独立,可以配置为多个独立的存储器和/或一个存储器划分出的多个存储区。程序存储区的具体数量可以根据需要进行配置,例如配置为2个、3个或者更多。多个程序存储区中的程序可以配置为相同的程序,分别可以独立完成相应的功能。Step S102, respectively perform verification calculations on the programs in the multiple program storage areas to obtain verification results of the multiple program storage areas. The above-mentioned multiple program storage areas are independent of each other and can be configured as multiple independent memories and/or multiple storage areas divided from one memory. The specific number of program storage areas can be configured as needed, for example, configured as 2, 3 or more. The programs in the multiple program storage areas can be configured as the same program, and can independently complete the corresponding functions.
进行校验计算可以由校验代码完成,例如具体的校验计算过程可以包括:从独立于多个程序存储区的自检存储区内读取校验代码;执行校验代码,以由校验代码分别对多个程序存储区中的程序进行校验计算。上述自检存储区可以为家电内部预先配置的一个独立可靠的存储器,其容量要求满足存储校验代码以及其他必要的参数即可。The verification calculation can be completed by the verification code. For example, the specific verification calculation process can include: reading the verification code from a self-test storage area independent of multiple program storage areas; executing the verification code, so that the verification code performs verification calculations on the programs in the multiple program storage areas respectively. The above self-test storage area can be an independent and reliable memory pre-configured inside the home appliance, and its capacity requirements can meet the storage of the verification code and other necessary parameters.
一种可提到的校验计算方式可以为在多个程序存储区中的程序中分别置入校验代码,在进行校验时,直接调用该校验代码即可。One verification calculation method that can be mentioned is to place verification codes in the programs in multiple program storage areas respectively, and when performing verification, the verification codes can be directly called.
校验代码可以被配置为:对程序中的至少一部分代码进行校验计算;和/或提取程序的指定的特征信息,对特征信息进行校验计算。The verification code may be configured to: perform verification calculation on at least a portion of the code in the program; and/or extract specified characteristic information of the program and perform verification calculation on the characteristic information.
其中对程序中的至少一部分代码进行校验计算的一种方式可以为:对指定的程序部分进行校验和计算,得出的校验和作为校验结果。对程序中的至少一部分代码进行校验计算的另一种方式可以为:对指定的控制程序进行哈希计算,得出哈希值作为校验结果。校验计算的具体计算方式可以根据家电处理器的计算能力进行选择。One way to perform verification calculation on at least a portion of the code in the program may be: performing a verification and calculation on a specified program portion, and obtaining a obtained checksum as a verification result. Another way to perform verification calculation on at least a portion of the code in the program may be: performing a hash calculation on a specified control program, and obtaining a hash value as a verification result. The specific calculation method of the verification calculation may be selected according to the computing power of the home appliance processor.
利用程序的特征信息进行校验的过程可以为:将程序的代码量、版本信息、特定函数、关键变量等特征信息中的一种或多种进行提取,生成对应的校验结果。也即提取的特征信息可以包括但不限于程序的代码量、版本信息、特定函数、关键变量。The process of using the characteristic information of the program for verification can be: extracting one or more characteristic information of the program such as the amount of code, version information, specific functions, key variables, etc., and generating corresponding verification results. That is, the extracted characteristic information can include but is not limited to the amount of code, version information, specific functions, and key variables of the program.
步骤S103,根据校验结果判断多个程序存储区的程序是否正确。判断程序是否正确的方式可以为将校验结果与预先设置的预期结果进行比对,如果校验结果与预期结果一致,那么可以认为程序正确;如果校验结果与预期结果不一致,那么可以认为程序异常。Step S103, judging whether the programs in the plurality of program storage areas are correct according to the verification results. The method for judging whether the program is correct may be to compare the verification results with the preset expected results. If the verification results are consistent with the expected results, then the program may be considered correct; if the verification results are inconsistent with the expected results, then the program may be considered abnormal.
一种具体的判断方式可以为:从自检存储区内读取预期结果;将预期结果与多个程序存储区的校验结果分别进行比较;将校验结果与预期结果匹配的程序判定为正确的程序。预期结果预先可以根据正确的程序生成。A specific judgment method may be: reading the expected result from the self-check storage area; comparing the expected result with the verification results of multiple program storage areas respectively; judging the program whose verification result matches the expected result as the correct program. The expected result may be generated in advance based on the correct program.
步骤S104,从判定为正确的程序中选择一个作为运行程序。Step S104, selecting one of the programs determined to be correct as the running program.
如果存在多个正确的程序,一种可选的选择方式可以为采用优先级的方式选择运行程序,例如按照程序存储区的ID(标识号)的顺序选择顺序靠前的程序,又例如可以根据预先设置的程序存储区的次序进行选择。优先级的高低(ID顺序、预设次序)可以根据程序存储区的类型、可靠程度等进行设置。If there are multiple correct programs, an optional selection method may be to select the running program in a priority manner, for example, selecting the program with the highest order according to the order of the ID (identification number) of the program storage area, or selecting according to the order of the program storage area set in advance. The priority level (ID order, preset order) may be set according to the type of program storage area, reliability, etc.
另一种可替代地方式为从判定为正确的程序中随机选择运行程序,使得每个程序存储区均有被使用的机会。Another alternative is to randomly select a running program from the programs determined to be correct, so that each program storage area has a chance to be used.
步骤S105,执行选择出的运行程序。执行程序的一种实现方式为:将引导加载代码中的程序起始地址定位至运行程序;在进行程序初始化的过程中,根据引导加载代码的程序起始地址加载对应的程序,将运行程序加载至内存中,从而按照运行程序完成后续功能。引导加载代码一般为固化在固件(firmware)中,其本身出现异常的可能性极小。Step S105, executing the selected running program. One implementation of executing the program is: locating the program start address in the boot loading code to the running program; during the program initialization process, loading the corresponding program according to the program start address of the boot loading code, loading the running program into the memory, and completing subsequent functions according to the running program. The boot loading code is generally solidified in the firmware, and the possibility of abnormality itself is extremely small.
在执行选择出的运行程序,可以进一步使用判定为正确的程序替换判定为错误的程序,实现对正确程序的备份。When executing the selected running program, the program determined to be correct can be further used to replace the program determined to be wrong, thereby backing up the correct program.
本发明的家电程序的启动方法,多个程序存储区中的分别程序,在自检过程中分别对多个程序存储区中的程序进行校验计算,得到多个程序存储区的校验结果。利用校验结果判断多个程序存储区的程序是否正确;从判定为正确的程序中选择一个作为运行程序;执行运行程序。多个程序存储区中的程序独立运行,可以各自完成家电的相应功能,互为备用。在任一程序存储区中的程序出现运行异常的情况下,可以快速排除故障的程序。The method for starting a home appliance program of the present invention performs verification calculations on the programs in the multiple program storage areas during the self-check process to obtain verification results of the multiple program storage areas. The verification results are used to determine whether the programs in the multiple program storage areas are correct; one of the programs determined to be correct is selected as a running program; and the running program is executed. The programs in the multiple program storage areas run independently, and can each complete the corresponding functions of the home appliance and serve as backup for each other. In the case that a program in any program storage area runs abnormally, the faulty program can be quickly eliminated.
图2是根据本发明一个实施例的家电程序的启动方法中双程序存储区的示意图。家电设置两个程序存储区210、220,程序存储区210存储有程序211、程序存储区220存储有程序221。两个程序存储区210、220为两个独立的存储器或者一个存储器划分出的两个存储区。Fig. 2 is a schematic diagram of dual program storage areas in a method for starting a home appliance program according to an embodiment of the present invention. The home appliance is provided with two program storage areas 210 and 220, wherein the program storage area 210 stores a program 211 and the program storage area 220 stores a program 221. The two program storage areas 210 and 220 are two independent memories or two storage areas divided from one memory.
图3是根据本发明一个实施例的家电程序的启动方法应用于双程序存储区的流程示意图。该流程包括:FIG3 is a schematic diagram of a process of applying a method for starting a home appliance program to a dual program storage area according to an embodiment of the present invention. The process includes:
步骤S301,冰箱上电启动;Step S301, the refrigerator is powered on and started;
步骤S302,判断是否触发程序校验;Step S302, determining whether program verification is triggered;
步骤S303,在触发程序校验之后,读取校验代码;Step S303, after triggering the program verification, reading the verification code;
步骤S304,执行校验代码,对正在运行的程序存储区210中的程序211进行校验计算;Step S304, executing the verification code to perform verification calculation on the program 211 in the running program storage area 210;
步骤S305,将程序211的校验结果与预期结果进行比较;Step S305, comparing the verification result of program 211 with the expected result;
步骤S306,如果程序211的校验结果与预期结果一致,则持续执行程序211;Step S306, if the verification result of program 211 is consistent with the expected result, then continue to execute program 211;
步骤S307,如果程序211的校验结果与预期结果不一致,则利用校验代码对另一程序存储区220中的程序221进行校验计算;Step S307, if the verification result of the program 211 is inconsistent with the expected result, the verification code is used to perform verification calculation on the program 221 in another program storage area 220;
步骤S308,将程序221的校验结果与预期结果进行比较;Step S308, comparing the verification result of program 221 with the expected result;
步骤S309,如果程序221的校验结果仍与预期结果不一致,则表明全部程序出错,进行报错。该种情况属于极小概率情况,一般不会发生。Step S309: If the verification result of program 221 is still inconsistent with the expected result, it indicates that all programs are wrong and an error is reported. This situation is extremely rare and generally does not occur.
步骤S310,如果程序221的校验结果与预期结果一致,则将该正确的程序作为运行程序,并执行。Step S310: If the verification result of program 221 is consistent with the expected result, the correct program is used as the running program and executed.
步骤S311,使用正确的程序221写入程序存储区210,替换掉错误的程序211。从而将程序存储区210的程序作为备份。Step S311, write the correct program 221 into the program storage area 210 to replace the wrong program 211. Thus, the program in the program storage area 210 is used as a backup.
图3示出的流程中的双程序存储区210、220互为备份,提高了家电程序的整体可靠性。In the process shown in FIG. 3 , the dual program storage areas 210 and 220 back up each other, thereby improving the overall reliability of the home appliance program.
图4是根据本发明一个实施例的家电程序的启动方法中双程序存储区的示意图。家电设置三个程序存储区410、420、430,程序存储区410存储有程序411、程序存储区420存储有程序421、程序存储区430存储有程序431。上述三个程序存储区410、420、430可以设置为多个独立的存储器或者一个存储器划分出的多个存储区。可替代地,在一些实施例中,三个程序存储区410、420、430可以包括一个独立的存储器以及另一存储器划分出的两个存储区,其在正常运行时可以优选选择独立的存储器的程序运行。Fig. 4 is a schematic diagram of dual program storage areas in a method for starting a home appliance program according to an embodiment of the present invention. The home appliance is provided with three program storage areas 410, 420, and 430, wherein program storage area 410 stores program 411, program storage area 420 stores program 421, and program storage area 430 stores program 431. The above three program storage areas 410, 420, and 430 may be set as a plurality of independent memories or a plurality of storage areas divided from a memory. Alternatively, in some embodiments, the three program storage areas 410, 420, and 430 may include an independent memory and two storage areas divided from another memory, which may preferably select the program of the independent memory to run during normal operation.
图5是根据本发明一个实施例的家电程序的启动方法应用于双程序存储区的流程示意图。该流程包括:FIG5 is a schematic diagram of a process of applying a method for starting a home appliance program to a dual program storage area according to an embodiment of the present invention. The process includes:
步骤S501,冰箱上电启动;Step S501, the refrigerator is powered on and started;
步骤S502,判断是否触发程序校验;Step S502, determining whether program verification is triggered;
步骤S503,在触发程序校验之后,读取校验代码;Step S503, after triggering the program verification, reading the verification code;
步骤S504,执行校验代码,对三个程序存储区410、420、430中的程序411、421、431进行校验计算;Step S504, executing the verification code to perform verification calculation on the programs 411, 421, 431 in the three program storage areas 410, 420, 430;
步骤S505,将三个程序411、421、431的校验结果与预期结果分别比较;Step S505, comparing the verification results of the three programs 411, 421, and 431 with the expected results respectively;
步骤S506,存在与预期结果一致的程序;Step S506, there is a program that is consistent with the expected result;
步骤S507,从正确的程序中选择运行程序,并执行;如果仅有一个程序正确,可以使用该正确程序作为运行程序;如果存在两个程序正确,可以选择其中一个作为运行程序;如果三个程序411、421、431均判定为正确程序,则可以任选其一作为运行程序。Step S507, select a running program from the correct programs and execute it; if only one program is correct, the correct program can be used as the running program; if there are two correct programs, one of them can be selected as the running program; if the three programs 411, 421, and 431 are all determined to be correct programs, any one of them can be selected as the running program.
步骤S508,使用正确的程序替换错误的程序。Step S508: Use the correct program to replace the incorrect program.
上述两个程序存储区210、220以及三个程序存储区410、420、430均为举例说明,本领域技术人员可以在此基础上实现更多个程序存储区,例如4个或5个程序存储区。The two program storage areas 210 and 220 and the three program storage areas 410 , 420 , and 430 are all examples. Those skilled in the art can implement more program storage areas, such as 4 or 5 program storage areas, based on this.
需要说明的是,在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。It should be noted that the logic and/or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or equipment (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or equipment and execute instructions), or used in combination with these instruction execution systems, devices or equipment.
图6是根据本发明一个实施例的机器可读存储介质600的示意图,其上存储有机器可执行程序610,机器可执行程序610被处理器执行时实现上述任一种的家电程序的启动方法。6 is a schematic diagram of a machine-readable storage medium 600 according to an embodiment of the present invention, on which a machine-executable program 610 is stored. When the machine-executable program 610 is executed by a processor, any of the above methods for starting a home appliance program can be implemented.
就本实施例的描述而言,机器可读存储介质600可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器)。For the purpose of the description of this embodiment, the machine-readable storage medium 600 can be any device that can contain, store, communicate, propagate or transmit a program for use with an instruction execution system, device or apparatus or in conjunction with such instruction execution system, device or apparatus. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection having one or more wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory).
用于执行本发明操作的机器可执行程序610可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。机器可执行程序610可以完全地在计算机上执行、部分地在计算机上执行、作为一个独立的软件包执行。The machine executable program 610 for performing the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. The machine executable program 610 may be executed entirely on a computer, partially on a computer, or as a stand-alone software package.
本实施例的家电程序的启动方法,多个程序存储区中的分别存储程序,在自检过程中分别对多个程序存储区中的程序进行校验计算,得到多个程序存储区的校验结果。利用校验结果判断多个程序存储区的程序是否正确;从判定为正确的程序中选择一个作为运行程序;执行运行程序。多个程序存储区中的程序独立运行,可以各自完成家电的相应功能,互为备用。在任一程序存储区中的程序出现运行异常的情况下,可以快速排除故障的程序。In the method for starting the home appliance program of this embodiment, the programs are stored in the multiple program storage areas respectively, and the programs in the multiple program storage areas are verified and calculated respectively during the self-check process to obtain the verification results of the multiple program storage areas. The verification results are used to determine whether the programs in the multiple program storage areas are correct; one of the programs determined to be correct is selected as the running program; and the running program is executed. The programs in the multiple program storage areas run independently, and can each complete the corresponding functions of the home appliance and serve as backup for each other. In the case that a program in any program storage area runs abnormally, the faulty program can be quickly eliminated.
进一步地,本实施例的家电程序的启动方法,直接使用判定为正确的程序作为运行程序并执行,相比于现有的程序修复技术,处理更加快速,并且可以避免修复失败的情况。Furthermore, the method for starting the home appliance program of this embodiment directly uses the program determined to be correct as the running program and executes it. Compared with the existing program repair technology, the processing is faster and the repair failure can be avoided.
本实施例的家电程序的启动方法尤其适用于智能冰箱等冰箱产品中,能够自动修复被破坏或篡改的冰箱程序代码,保证冰箱功能的正常运行。特别对于冰箱程序存储芯片被写保护的情况,可以利用内置的备份程序的方式,及时启用备份程序,提高了冰箱的运行可靠性。The method for starting the home appliance program of this embodiment is particularly suitable for refrigerator products such as smart refrigerators, and can automatically repair damaged or tampered refrigerator program codes to ensure the normal operation of refrigerator functions. In particular, when the refrigerator program storage chip is write-protected, the built-in backup program can be used to enable the backup program in time, thereby improving the operating reliability of the refrigerator.
至此,本领域技术人员应认识到,虽然本文已详尽示出和描述了本发明的多个示例性实施例,但是,在不脱离本发明精神和范围的情况下,仍可根据本发明公开的内容直接确定或推导出符合本发明原理的许多其他变型或修改。因此,本发明的范围应被理解和认定为覆盖了所有这些其他变型或修改。At this point, those skilled in the art should recognize that, although multiple exemplary embodiments of the present invention have been shown and described in detail herein, many other variations or modifications that conform to the principles of the present invention can still be directly determined or derived based on the content disclosed in the present invention without departing from the spirit and scope of the present invention. Therefore, the scope of the present invention should be understood and identified as covering all such other variations or modifications.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310086640.8A CN118409894A (en) | 2023-01-28 | 2023-01-28 | Method for starting household appliance program and machine-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310086640.8A CN118409894A (en) | 2023-01-28 | 2023-01-28 | Method for starting household appliance program and machine-readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118409894A true CN118409894A (en) | 2024-07-30 |
Family
ID=91994851
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310086640.8A Pending CN118409894A (en) | 2023-01-28 | 2023-01-28 | Method for starting household appliance program and machine-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118409894A (en) |
-
2023
- 2023-01-28 CN CN202310086640.8A patent/CN118409894A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113064747A (en) | Fault positioning method, system and device in server starting process | |
TWI470420B (en) | Dubugging method and computer system using the smae | |
TW202030602A (en) | The method and system of bios recovery and update | |
US9946600B2 (en) | Method of detecting power reset of a server, a baseboard management controller, and a server | |
CN102023908A (en) | Method and device for backing up boot program | |
CN106547653B (en) | Computer system fault state detection method, device and system | |
WO2016206514A1 (en) | Startup processing method and device | |
CN110737481A (en) | Starting method of embedded LINUX operating system based on multiple backup bootstrap programs | |
CN100395713C (en) | Method and module for automatically repairing basic input output system element | |
CN116932010B (en) | System firmware upgrading method, device and server | |
CN114138527A (en) | A method, device and medium for improving server performance | |
JP2000221238A (en) | Testing system for self-testing circuit board | |
CN111309388B (en) | Automatic rollback system and method for system software version of equipment | |
CN109933374B (en) | Computer starting method | |
CN105183580A (en) | Storage method and fault recovery method for bootstrap program, and devices | |
TW200809489A (en) | BIOS damage detection and repair method and the motherboard | |
CN118409894A (en) | Method for starting household appliance program and machine-readable storage medium | |
CN113315675A (en) | White box switch U-Boot automatic testing method, system and storage medium | |
CN113721992A (en) | BIOS starting method and related device of server | |
CN118276985B (en) | RISC-V chip starting method, equipment and medium | |
CN110059005A (en) | The program detecting method and implantable medical device of flash memory | |
JP6723400B1 (en) | Information processing apparatus and information processing method | |
CN114816884B (en) | A computer testing method and related components | |
TW201604781A (en) | Circuit and method for writing BIOS code into BIOS | |
US11507385B1 (en) | Embedded electronic device, boot method, and embedded electronic device readable recording medium with stored program |
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 |