Power embedded terminal program upgrading method, module, terminal and storage medium
By including multiple program upgrade processes in the BIOS, the appropriate process is automatically selected according to the needs of the target device, and the problem of unfixed configuration of BIOS for different types of power embedded terminals is solved, and the applicability and portability of various types of BIOS are realized.
Patent Information
- Application Number
- CN202510251010.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-27
AI Technical Summary
When iterating program versions of different types of power embedded terminals, different BIOS configurations are required, resulting in unfixed BIOS configuration process and unfixed parameters, which makes it inconvenient to transplant.
By including multiple program upgrade processes in the BIOS, we can judge whether the upgrade is needed based on the program upgrade data and operating parameters of the target device, and determine the appropriate target upgrade process from the various processes to perform program upgrades.
It realizes program upgrades that the same BIOS can be suitable for multiple types of power embedded terminals, making the BIOS suitable for more scenarios and reducing the workload of BIOS porting and updating.
Smart Images

Figure CN120215976A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of electronic digital data processing, and particularly relates to a method, module, terminal, and storage medium for upgrading the program of a power embedded terminal. Background Art
[0002] Currently, when the programs of different power embedded terminals are iterating versions, they all need to be updated through the BIOS (Basic Input / Output System). Generally speaking, there is a running program in a power embedded terminal, and different types of power embedded terminals run different types of programs. Therefore, when different types of power embedded terminals iterate versions (upgrade or update), different BIOS configurations are required. This results in non-fixed processes and non-fixed parameters for BIOS configurations of different types of devices, and it is not convenient to transplant. Summary of the Invention
[0003] Embodiments of this application provide a method, module, terminal, and storage medium for upgrading the program of a power embedded terminal, so that the same BIOS can be applicable to upgrading the programs in multiple types of power embedded terminals.
[0004] This application is implemented through the following technical solutions:
[0005] In a first aspect, embodiments of this application provide a method for upgrading the program of a power embedded terminal, which is applied to the BIOS for a power embedded terminal. A upgradable program runs in the power embedded terminal, and the BIOS includes multiple program upgrade processes. The method includes:
[0006] Obtain the program upgrade data, program operation parameters, and program configuration of the target device; where the target device is any power embedded terminal.
[0007] Based on the program upgrade data and program operation parameters, determine whether the target device needs to upgrade the program.
[0008] If the target device needs to upgrade the program, then based on the program configuration, determine the target upgrade process corresponding to the target device from multiple program upgrade processes.
[0009] Based on the target upgrade process, use the program upgrade data to upgrade the program in the target device.
[0010] In combination with the first aspect, in some possible implementation manners, using the program upgrade data to upgrade the program in the target device includes:
[0011] Erase the program in the target device and write all the program upgrade data into the target device.
[0012] In combination with the first aspect, in some possible implementation manners, before erasing the program in the target device, the method further includes:
[0013] Perform a CRC check on the program upgrade data to determine whether the program upgrade data is complete and correct upgrade data.
[0014] If the program upgrade data is complete and correct upgrade data, erase the program in the target device and write all the program upgrade data into the target device.
[0015] If the program upgrade data is not complete and correct upgrade data, perform a CRC check on the program in the target device; if the program in the target device is complete and correct data, execute the original program; if the program in the target device is not complete and correct data, re-obtain the program upgrade data.
[0016] In combination with the first aspect, in some possible implementation manners, performing a CRC check on the program upgrade data to determine whether the program upgrade data is complete and correct upgrade data includes:
[0017] Based on a preset generation polynomial, perform an exclusive OR operation on the program upgrade data in binary to obtain a first CRC check value.
[0018] If the CRC check value stored in the check bit in the program upgrade data is the same as the first CRC check value, the program upgrade data is complete and correct upgrade data.
[0019] In combination with the first aspect, in some possible implementation manners, the preset generation polynomial includes: CRC-8 generation polynomial, CRC-16 generation polynomial, CRC-32 generation polynomial, CRC-64 generation polynomial, or CRC-CCITT generation polynomial.
[0020] In combination with the first aspect, in some possible implementation manners, writing all the program upgrade data into the target device includes:
[0021] Divide the program upgrade data into multiple consecutive sub-data sets.
[0022] Write the multiple consecutive sub-data sets in sequence.
[0023] For each sub-dataset, after the writing of the sub-dataset is completed, obtain the content corresponding to the sub-dataset in the target device at this time; if the program corresponding to the sub-dataset in the target device at this time is exactly the same as the sub-dataset, the data comparison of the sub-dataset is correct, and if the content corresponding to the sub-dataset in the target device at this time is not exactly the same as the sub-dataset, the data comparison of the sub-dataset is incorrect, and the writing of the sub-dataset is restarted. If the number of times the data comparison of the sub-dataset is incorrect exceeds the preset threshold, the upgrade is restarted.
[0024] If the data comparison of all sub-datasets is correct, the upgrade of the target device program is completed.
[0025] Combined with the first aspect, in some possible implementation manners, the method further includes:
[0026] After the upgrade of the target device program is completed, update the program running parameters of the target device at this time; wherein, the updated program running parameters will not cause the target device to be upgraded again.
[0027] In a second aspect, an embodiment of the present application provides a power embedded terminal program upgrade module, including:
[0028] A data acquisition module, configured to acquire program upgrade data, program running parameters, and program configurations of a target device; wherein, the target device is any power embedded terminal.
[0029] A first judgment module, configured to judge whether the target device performs a program upgrade based on the program upgrade data and the program running parameters.
[0030] A second judgment module, configured to, if the target device needs to perform a program upgrade, determine a target upgrade process corresponding to the target device from multiple program upgrade processes based on the program configuration.
[0031] A device upgrade module, configured to upgrade the program in the target device using the program upgrade data based on the target upgrade process.
[0032] In a third aspect, an embodiment of the present application provides a power embedded terminal, including: a processor and a memory, where the memory is used to store an embedded program, and when the processor executes the embedded program, the power embedded terminal program upgrade method described in any item of the first aspect is implemented.
[0033] In a fourth aspect, an embodiment of the present application provides an embedded readable storage medium, where the embedded readable storage medium stores an embedded program, and when the embedded program is executed by a processor, the power embedded terminal program upgrade method described in any item of the first aspect is implemented.
[0034] It can be understood that the beneficial effects of the above second to fourth aspects can be referred to the relevant descriptions in the above first aspect, and will not be elaborated here.
[0035] The beneficial effects of the embodiments of the present application compared with the prior art are as follows:
[0036] The present application can determine whether the program of the target device needs to be upgraded according to the program upgrade data and program operation parameters of the target device. When the program needs to be upgraded, it can determine the target upgrade process corresponding to the target device from multiple program upgrade processes according to the program configuration, and upgrade the program in the target device using the program upgrade data according to the target upgrade process. Compared with the traditional BIOS, the BIOS of the present application can be applied to upgrade the programs in various types of power embedded terminals, making the BIOS applicable to more scenarios. When the BIOS is transplanted and used, only the configuration and underlying drivers of the BIOS itself need to be modified, without caring about the problems of the update program process and logic. Compared with the traditional BIOS that rewrites the entire set of logic according to different requirements, the workload is greatly reduced.
[0037] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit this specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0039] Figure 1 is a flowchart of a method for upgrading a program of a power embedded terminal provided by an embodiment of the present application;
[0040] Figure 2 is a schematic structural diagram of a program upgrade module of a power embedded terminal provided by an embodiment of the present application;
[0041] Figure 3 is a schematic structural diagram of a power embedded terminal provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0042] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from obscuring the description of the present application.
[0043] It should be understood that when used in the specification and appended claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0044] It should also be understood that the term "and / or" used in the specification and appended claims of the present application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0045] As used in the specification and appended claims of the present application, the term "if" can be interpreted as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrases "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined" or "in response to determining" or "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]" depending on the context.
[0046] In addition, in the description of the specification and appended claims of the present application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0047] The reference to "one embodiment" or "some embodiments" etc. described in the specification of the present application means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0048] The embodiments of the present application provide a method for upgrading a power embedded terminal program, which is applied to a standardized BIOS including multiple program upgrade processes, and one program runs in one power embedded terminal.Figure 1 It is a schematic flowchart of a method for upgrading a power embedded terminal program provided by an embodiment of the present application. Referring to Figure 1 , the detailed description of the method for upgrading the power embedded terminal program is as follows:
[0049] Step 101: Obtain the program upgrade data, program running parameters, and program configuration of the target device; where the target device is any power embedded terminal.
[0050] Step 102: Based on the program upgrade data and program running parameters, determine whether the target device needs to upgrade the program.
[0051] Exemplarily, if the data in the program upgrade data and the program running parameters conform to the upgrade logic of the standardized BIOS, that is, the upgrade times data in the upgrade data is 0x0101 more than the upgrade times data in the running parameters, the target device needs to upgrade the program.
[0052] Step 103: If the target device needs to upgrade the program, based on the program configuration, determine the target upgrade process corresponding to the target device from multiple program upgrade processes.
[0053] Exemplarily, there is a flag in the program configuration representing the type of this device. Therefore, the type of the target device can be directly determined through the program running parameters, and then the target upgrade process corresponding to the target device can be determined.
[0054] Step 104: Based on the target upgrade process, use the program upgrade data to upgrade the program in the target device.
[0055] Exemplarily, using the program upgrade data to upgrade the program in the target device may include:
[0056] Erase the program in the target device and write all the program upgrade data into the target device.
[0057] Exemplarily, during the existing program upgrade process, relevant data and program running parameters in the program upgrade data are modified after the upgrade is completed; while the program in the present application does not modify the upgrade data after the upgrade is completed, but only updates the program running parameters. The prior art erases the data to be modified and then fills in the modified data. However, there is a minimum erasure limit for the amount of erased data. In short, if you want to modify 3 data items, assuming the minimum erasure limit is 6, then at this time, 3 additional data items need to be erased. At the same time, such an operation is equivalent to modifying the original upgrade data. When a problem occurs in the program, it is impossible to accurately locate the position where the problem occurred. While for the program in the present application, if a problem occurs, it can be directly compared with the original upgrade data to directly locate the problem. In addition, the solution of the present application can also distinguish the first upgrade of the program according to the above steps and is no longer affected by the old-level data.
[0058] Exemplarily, before erasing the program in the target device, the method may further include:
[0059] Perform a CRC check on the program upgrade data to determine whether the program upgrade data is complete and correct upgrade data.
[0060] If the program upgrade data is complete and correct upgrade data, erase the program in the target device and write all the program upgrade data into the target device.
[0061] If the program upgrade data is not complete and correct upgrade data, perform a CRC check on the program in the target device; if the program in the target device is complete and correct data, execute the original program; if the program in the target device is not complete and correct data, re-obtain the program upgrade data.
[0062] Exemplarily, when writing the program upgrade data into the target device, it is necessary to ensure that the program upgrade data is complete and correct upgrade data, so as to ensure the stable operation of the program in the target device after the upgrade.
[0063] Exemplarily, performing a CRC check on the program upgrade data to determine whether the program upgrade data is complete and correct upgrade data may include:
[0064] Based on a preset generation polynomial, perform an exclusive OR operation on the program upgrade data in binary to obtain a first CRC check value.
[0065] If the CRC check value stored in the check bit of the program upgrade data is the same as the first CRC check value, the program upgrade data is complete and correct upgrade data.
[0066] Exemplarily, the preset generation polynomial may include: CRC-8 generation polynomial, CRC-16 generation polynomial, CRC-32 generation polynomial, CRC-64 generation polynomial, or CRC-CCITT generation polynomial.
[0067] Exemplarily, the polynomial representation of the CRC-8 generation polynomial is: x 8 +x 2 +x 1 +1, and the binary representation is: 100000111. The polynomial representation of the CRC-16 generation polynomial is: x 16 +x 15 +x 2 +1, and the binary representation is: 11000000000000101. The polynomial representation of the CRC-32 generation polynomial is:
[0068] x 32 +x 26 +x 23 +x 22 +x 16 +x 12 +x 11 +x 10 +x 8 +x 7 +x 5 +x 4 +x 2 +x 1 +1, and the binary representation is: 1001100000110111011011011111101. The polynomial representation of the CRC-64 generation polynomial is:
[0069] x 64 +x 4 +x 3 +x 1 +1, and the binary representation is:
[0070] 100000000000000000000000000000000000000000000000000000000000111. The polynomial representation of the CRC-CCITT generation polynomial is: x 16 +x 12 +x 5 +1, and the binary representation is: 10001000000100001.
[0071] Exemplarily, based on the preset generation polynomial, perform an exclusive OR operation on the program upgrade data in binary. Simply put, it is to calculate the remainder of the program upgrade data based on the preset generation polynomial, and the final remainder is the first CRC check value.
[0072] Exemplarily, writing all the program upgrade data into the target device may include:
[0073] Dividing the program upgrade data into multiple consecutive sub - data sets.
[0074] Writing the multiple consecutive sub - data sets in sequence.
[0075] For each sub - data set, after the writing of the sub - data set is completed, obtain the content corresponding to the sub - data set in the target device at this time; if the program corresponding to the sub - data set in the target device at this time is exactly the same as the sub - data set, the data comparison of the sub - data set is correct, if the content corresponding to the sub - data set in the target device at this time is not exactly the same as the sub - data set, the data comparison of the sub - data set is incorrect, re - write the sub - data set, if the number of times of incorrect data comparison of the sub - data set exceeds the preset threshold, re - perform the upgrade.
[0076] If the data comparison of all sub - data sets is correct, the upgrade of the program in the target device is completed.
[0077] Exemplarily, the method may further include:
[0078] After the upgrade of the program in the target device is completed, update the program operation parameters of the target device at this time; wherein, the updated program operation parameters will not cause the target device to perform an upgrade again.
[0079] Exemplarily, after the upgrade is completed, no changes are made to the program upgrade data, only the program operation parameters are updated to ensure the integrity of the upgrade data.
[0080] The above - mentioned power embedded terminal program upgrade method can determine whether the program of the target device needs to be upgraded according to the program upgrade data and program operation parameters of the target device. When the program needs to be upgraded, it can also determine the target upgrade process corresponding to the target device from multiple program upgrade processes according to the program configuration, and upgrade the program in the target device using the program upgrade data according to the target upgrade process. Compared with the traditional BIOS, the BIOS of the present application can be applied to upgrade the programs in various types of power embedded terminals, making the BIOS applicable to more scenarios. When the BIOS is transplanted and used, only the configuration of the BIOS itself and the underlying driver need to be modified, without caring about the issues of the process and logic of the update program. Compared with the traditional BIOS that rewrites the entire set of logic according to different requirements, the workload is greatly reduced.
[0081] It should be understood that the magnitudes of the sequence numbers of the steps in the above - mentioned embodiments do not mean the sequence of execution. The execution sequence of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0082] Corresponding to the power embedded terminal program upgrade method described in the above embodiments, Figure 2 FIG. shows a structural block diagram of a power embedded terminal program upgrade module provided by an embodiment of the present application. For the sake of convenience of description, only the parts related to the embodiments of the present application are shown.
[0083] See Figure 2 , the power embedded terminal program upgrade module in the embodiments of the present application may include:
[0084] A data acquisition module 201, configured to acquire program upgrade data, program operation parameters, and program configurations of a target device; wherein the target device is any power embedded terminal.
[0085] A first judgment module 202, configured to judge whether the target device needs to perform a program upgrade based on the program upgrade data and the program operation parameters.
[0086] A second judgment module 203, configured to, if the target device needs to perform a program upgrade, determine a target upgrade process corresponding to the target device from multiple program upgrade processes based on the program configuration.
[0087] A device upgrade module 204, configured to upgrade the program in the target device using the program upgrade data based on the target upgrade process.
[0088] Exemplarily, the device upgrade module 204 may be configured to:
[0089] After erasing the program in the target device, write all the program upgrade data into the target device.
[0090] Exemplarily, before erasing the program in the target device, the device upgrade module 204 may be configured to:
[0091] Perform a CRC check on the program upgrade data to judge whether the program upgrade data is complete and correct upgrade data.
[0092] If the program upgrade data is complete and correct upgrade data, erase the program in the target device and write all the program upgrade data into the target device.
[0093] If the program upgrade data is not complete and correct upgrade data, perform a CRC check on the program in the target device; if the program in the target device is complete and correct data, execute the original program; if the program in the target device is not complete and correct data, re-acquire the program upgrade data.
[0094] Exemplarily, the device upgrade module 204 may be configured to:
[0095] Based on a preset generation polynomial, perform an exclusive OR operation on the program upgrade data in binary to obtain a first CRC check value.
[0096] If the CRC check value stored in the check bit of the program upgrade data is the same as the first CRC check value, then the program upgrade data is complete and correct upgrade data.
[0097] Exemplarily, the preset generation polynomial may include: CRC-8 generation polynomial, CRC-16 generation polynomial, CRC-32 generation polynomial, CRC-64 generation polynomial, or CRC-CCITT generation polynomial.
[0098] Exemplarily, the device upgrade module 204 may also be used for:
[0099] Divide the program upgrade data into multiple consecutive sub-datasets.
[0100] Perform writes of multiple consecutive sub-datasets in sequence.
[0101] For each sub-dataset, after the write of the sub-dataset is completed, obtain the content corresponding to the sub-dataset in the target device at this time; if the program corresponding to the sub-dataset in the target device at this time is exactly the same as the sub-dataset, then the data comparison of the sub-dataset is correct, if the content corresponding to the sub-dataset in the target device at this time is not exactly the same as the sub-dataset, then the data comparison of the sub-dataset is incorrect, and re-perform the write of the sub-dataset. If the number of times the data comparison of the sub-dataset is incorrect exceeds a preset threshold, then re-perform the upgrade.
[0102] If the data comparison of all sub-datasets is correct, then the upgrade of the target device program is completed.
[0103] Exemplarily, the device upgrade module 204 may also be used for:
[0104] After the upgrade of the target device program is completed, update the program operation parameters of the target device at this time; wherein, the updated program operation parameters will not cause the target device to perform an upgrade again.
[0105] It should be noted that for the information interaction, execution process, etc. between the above modules / units, since they are based on the same concept as the method embodiment of the present application, for their specific functions and the technical effects brought, please refer to the method embodiment part specifically, and will not be elaborated here.
[0106] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of the functional units and modules are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiment and will not be elaborated herein.
[0107] An embodiment of this application also provides a power embedded terminal. Refer to Figure 3 , the power embedded terminal 300 may include: at least one processor 310, a memory 320. The memory 320 is used to store an embedded program 321. The processor 310 is used to call and run the embedded program 321 stored in the memory 320 to implement the steps in any of the foregoing method embodiments, such as Figure 1 the steps 101 to 104 in the illustrated embodiment. Alternatively, when the processor 310 executes the embedded program, it implements the functions of each module / unit in each device embodiment of the foregoing, such as Figure 2 the functions of each module shown.
[0108] Exemplarily, the embedded program 321 can be divided into one or more modules / units. One or more modules / units are stored in the memory 320 and executed by the processor 310 to complete this application. The one or more modules / units can be a series of embedded program segments capable of completing specific functions, and these program segments are used to describe the execution process of the embedded program in the power embedded terminal 300.
[0109] Those skilled in the art can understand that Figure 3 this is only an example of a power embedded terminal and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or combine some components, or different components, such as input and output devices, network access devices, buses, etc.
[0110] The processor 310 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0111] The memory 320 may be an internal storage unit of the terminal device, or may also be an external storage device of the terminal device, such as a Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, Synchronous Dynamic Random Access Memory (SDRAM), Non-Volatile Flash (NOR Flash), etc. The memory 320 is used to store the embedded program and other programs and data required by the power embedded terminal. The memory 320 may also be used to temporarily store data that has been output or is to be output.
[0112] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.
[0113] The power embedded terminal program upgrade method provided by the embodiments of this application can be applied to a power embedded terminal, and the embodiments of this application do not impose any restrictions on the specific type of the terminal device.
[0114] The embodiments of this application also provide an embedded-readable storage medium that stores an embedded program, and when the embedded program is executed by a processor, the steps in each of the embodiments of the above-mentioned power embedded terminal program upgrade method can be implemented.
[0115] The embodiments of this application provide an embedded program product, and when the embedded program product runs on a power embedded terminal, the power embedded terminal is caused to execute the steps in each of the embodiments of the above-mentioned power embedded terminal program upgrade method.
[0116] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in an embedded readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of this application, an embedded program can be used to instruct relevant hardware to complete. The embedded program can be stored in an embedded readable storage medium. When the embedded program is executed by a processor, the steps of the above-described method embodiments can be implemented. Among them, the embedded program includes embedded program code, and the embedded program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The embedded readable medium can at least include: any entity or device that can carry the embedded program code to the power embedded terminal, a recording medium, an embedded memory, a read-only memory (ROM), and a random access memory (RAM).
[0117] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0118] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of embedded software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0119] In the embodiments provided in this application, it should be understood that the disclosed module / power embedded device and method can be implemented in other ways. For example, the above-described module / power embedded terminal embodiments are merely illustrative. For example, the division of the module or unit is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in an electrical, mechanical, or other form.
[0120] The unit described as the separation component may or may not be physically separated. The component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed over multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for upgrading a power embedded terminal program, characterized in that: Applied to a BIOS for an electric power embedded terminal, the electric power embedded terminal runs an upgradeable program, the BIOS includes multiple program upgrade processes, and the method includes: Obtaining program upgrade data, program running parameters and program configuration of a target device; wherein the target device is any power embedded terminal; Based on the program upgrade data and the program running parameters, determining whether the target device is to perform a program upgrade; If the target device needs to perform a program upgrade, then based on the program configuration, a target upgrade process corresponding to the target device is determined from the multiple program upgrade processes; Based on the target upgrade process, the program in the target device is upgraded using the program upgrade data.
2. The program upgrade method according to claim 1, characterized in that: The using the program upgrade data to upgrade the program in the target device includes: The program in the target device is erased, and all the program upgrade data is written into the target device.
3. The method for upgrading a power embedded terminal program according to claim 2, characterized in that: Before erasing the program in the target device, the method further includes: Performing a CRC check on the program upgrade data to determine whether the program upgrade data is complete and correct upgrade data; If the program upgrade data is complete and correct, erasing the program in the target device and writing all the program upgrade data into the target device; If the program upgrade data is not complete and correct, a CRC check is performed on the program in the target device; if the program in the target device is complete and correct, the original program is executed; if the program in the target device is not complete and correct, the program upgrade data is reacquired.
4. The method for upgrading a power embedded terminal program according to claim 3, characterized in that: The performing CRC check on the program upgrade data to determine whether the program upgrade data is complete and correct upgrade data includes: Based on a preset generator polynomial, performing a binary XOR operation on the program upgrade data to obtain a first CRC check value; If the CRC check value stored in the check bit in the program upgrade data is the same as the first CRC check value, the program upgrade data is complete and correct upgrade data.
5. The method for upgrading a power embedded terminal program according to claim 4, characterized in that: The preset generator polynomial includes: CRC-8 generator polynomial, CRC-16 generator polynomial, CRC-32 generator polynomial, CRC-64 generator polynomial or CRC-CCITT generator polynomial.
6. The method for upgrading a power embedded terminal program according to claim 2, characterized in that: Writing all the program upgrade data into the target device comprises: Dividing the program upgrade data into a plurality of continuous sub-data sets; Writing multiple consecutive sub-data sets in sequence; For each sub-dataset, after the sub-dataset is written, the content corresponding to the sub-dataset in the target device is obtained; if the program corresponding to the sub-dataset in the target device is exactly the same as the sub-dataset, the data comparison of the sub-dataset is correct; if the content corresponding to the sub-dataset in the target device is not exactly the same as the sub-dataset, the data comparison of the sub-dataset is wrong, and the sub-dataset is rewritten; if the number of data comparison errors of the sub-dataset exceeds a preset threshold, the upgrade is performed again; If the data comparison of all the sub-data sets is correct, the upgrade of the target device program is completed.
7. The method for upgrading a power embedded terminal program according to claim 6, characterized in that: The method further comprises: After the target device program upgrade is completed, the program running parameters of the target device at this time are updated; wherein the updated program running parameters will not cause the target device to be upgraded again.
8. A power embedded terminal program upgrade module, characterized in that: include: A data acquisition module, used to acquire program upgrade data, program running parameters and program configuration of a target device; wherein the target device is any power embedded terminal; A first judgment module, used for judging whether the target device is to perform a program upgrade based on the program upgrade data and the program running parameters; A second determination module is configured to determine, if the target device needs to perform a program upgrade, a target upgrade process corresponding to the target device from the multiple program upgrade processes based on the program configuration; A device upgrade module is used to upgrade the program in the target device using the program upgrade data based on the target upgrade process.
9. A power embedded terminal, comprising: A processor and a memory, wherein the memory stores an embedded program that can be run on the processor, and wherein when the processor executes the embedded program, the method for upgrading the power embedded terminal program as described in any one of claims 1 to 7 is implemented.
10. An embedded readable storage medium storing an embedded program, characterized in that: When the embedded program is executed by the processor, the power embedded terminal program upgrade method as described in any one of claims 1 to 7 is implemented.