CN116360809B - Remote firmware upgrading method, system and medium for embedded intelligent terminal - Google Patents

Remote firmware upgrading method, system and medium for embedded intelligent terminal Download PDF

Info

Publication number
CN116360809B
CN116360809B CN202310630917.9A CN202310630917A CN116360809B CN 116360809 B CN116360809 B CN 116360809B CN 202310630917 A CN202310630917 A CN 202310630917A CN 116360809 B CN116360809 B CN 116360809B
Authority
CN
China
Prior art keywords
firmware
upgrade
matching
byte
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310630917.9A
Other languages
Chinese (zh)
Other versions
CN116360809A (en
Inventor
陈泽鹏
刘福亮
宋国强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Weike Technology Co ltd
Original Assignee
Shenzhen Wake Up Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Wake Up Technology Co ltd filed Critical Shenzhen Wake Up Technology Co ltd
Priority to CN202310630917.9A priority Critical patent/CN116360809B/en
Publication of CN116360809A publication Critical patent/CN116360809A/en
Application granted granted Critical
Publication of CN116360809B publication Critical patent/CN116360809B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • G06F21/125Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a method, a system and a medium for remotely upgrading firmware of an embedded intelligent terminal, wherein the method comprises the following steps: configuring a programming program, programming the box firmware according to the programming program, establishing an upgrade data packet, and generating a plurality of programming configuration files; configuring terminal equipment parameters, establishing an upgrade model, and generating terminal equipment target parameter information; matching the target parameter information of the terminal equipment with the burning configuration file; if the matching is successful, starting to upgrade the terminal firmware, and after the upgrade is finished, sending an optical machine instruction to the box firmware. If the matching is unsuccessful, reconfiguring terminal firmware equipment parameters, and searching and matching the terminal equipment through the box firmware; the application can realize the fast unattended batch upgrade of the firmware of the production line end or the whole machine, realize the intellectualization of the firmware upgrade and improve the upgrade efficiency.

Description

Remote firmware upgrading method, system and medium for embedded intelligent terminal
Technical Field
The application relates to the field of remote upgrading of intelligent terminals, in particular to a remote upgrading method, a remote upgrading system and a remote upgrading medium for firmware of an embedded intelligent terminal.
Background
In recent years, mobile intelligent terminals have rapidly become core portals and main research and development platforms for internet information service services, and further become key hubs for electronic information commerce, internet technology resources, intelligent network resources and the like. From this, the rapid development of mobile intelligent terminals in recent years has become a high point for the information technology industry to combine with each other.
Firmware can repair the deficiency of the terminal device in terms of hardware resources to a great extent, so it is significant to upgrade the firmware. In the development of a mobile intelligent terminal system and the use process of a user, on one hand, the diversified demands of the user require manufacturers to improve terminal equipment so as to meet the good experience of the user; on the other hand, in the process of developing and maintaining the terminal equipment, manufacturers need to repair defects in the equipment and optimize the defects to improve the performance of the product.
At present, firmware upgrading of embedded equipment mainly depends on direct burning and mobile phone terminal upgrading through a program, and cannot adapt to the following scenes: fast unattended batch upgrade of the product line end firmware update; the whole machine firmware is updated quickly and in an unattended batch, and the prior art lacks a reliable and effective intelligent terminal firmware remote upgrading technical means.
In view of the above problems, an effective technical solution is currently needed.
Disclosure of Invention
The embodiment of the application aims to provide a method, a system and a medium for remotely upgrading firmware of an embedded intelligent terminal, which can realize the rapid unattended batch upgrade of the firmware of an output line terminal or the whole machine, realize the intellectualization of the firmware upgrade and improve the upgrade efficiency.
The embodiment of the application also provides a remote upgrading method for the firmware of the embedded intelligent terminal, which comprises the following steps:
configuring a programming program, programming the box firmware according to the programming program, establishing an upgrade data packet, and generating a plurality of programming configuration files;
configuring terminal equipment parameters, establishing an upgrade model, and generating terminal equipment target parameter information;
matching the target parameter information of the terminal equipment with the burning configuration file;
if the matching is successful, starting to upgrade the terminal firmware, and after the upgrade is finished, sending an optical machine instruction to the box firmware;
if the matching is unsuccessful, reconfiguring terminal firmware equipment parameters, and searching and matching the terminal equipment through the box firmware.
Optionally, in the method for remotely upgrading firmware of an embedded intelligent terminal according to the embodiment of the present application, the configuring the programming program, programming the box firmware according to the programming program, creating an upgrade data packet, and generating a plurality of programming configuration files includes:
the burning program comprises a physical layer, a protocol layer and an application layer;
the physical layer is used for acquiring communication serial port information, configuring a serial port, and writing data into the communication serial port or/and reading data from the communication serial port;
the protocol layer is used for sending an upgrade data packet, carrying out data processing or splitting on the upgrade data packet, and generating an upgrade encryption protocol;
the application layer adopts a multithreading mode to upgrade and monitor the box firmware, and backs up or restores the burning configuration file.
Optionally, in the method for remotely upgrading firmware of an embedded intelligent terminal according to the embodiment of the present application, the protocol layer is configured to send an upgrade data packet, perform data processing or splitting on the upgrade data packet, and generate an upgrade encryption protocol, and specifically includes:
acquiring an upgrade data packet, establishing an encryption rule, encrypting data according to the encryption rule, and generating an encryption key;
configuring a memory address, and storing the encrypted data;
configuring a calling mode, generating a decryption secret key, and verifying the matching degree of the decryption secret key and the encryption secret key to obtain a matching degree deviation rate;
judging whether the matching degree deviation rate is larger than a preset matching degree deviation rate threshold value or not;
if the decryption key is larger than the preset value, popping up the decryption key;
and if the data is smaller than the data, performing decryption calling on the encrypted data through a decryption key.
Optionally, in the method for remotely upgrading firmware of an embedded intelligent terminal according to the embodiment of the present application, the matching the target parameter information of the terminal device with the burning configuration file includes:
acquiring target parameter information of terminal equipment, establishing a first search engine, and performing byte segmentation search on the target parameter information of the terminal equipment to obtain a target parameter byte packet;
constructing a second search engine to perform byte segmentation search on the burning configuration file to obtain a burning configuration byte packet;
performing byte differential calculation on the target parameter byte packet and the burning configuration byte packet to generate a byte differential file;
packaging the byte differential file to generate a firmware update package, and transmitting the firmware update package to terminal equipment;
unpacking the firmware update package after the transmission is completed to obtain update data;
and synthesizing the updated data with the original firmware data to generate a new version of firmware.
Optionally, in the method for remotely upgrading firmware of an embedded intelligent terminal according to the embodiment of the present application, the performing byte differential computation on the target parameter byte packet and the burning configuration byte packet to generate a byte differential file includes:
carrying out macro matching pretreatment on the firmware update package to obtain macro matching analysis information;
establishing a macro matching strategy, and extracting byte streams from the firmware update package;
analyzing and processing the byte stream of the update package and the original firmware data, and storing the byte stream and the original firmware data in a domain;
the macro-matching policy includes prefix matching, suffix matching, and matching of internal matching substring lengths.
Optionally, in the method for remotely upgrading firmware of an embedded intelligent terminal according to the embodiment of the present application, the method further includes:
establishing a firmware reserved storage area, and dividing the reserved storage area into a plurality of storage blocks;
acquiring an address vector table of a storage block, and establishing reserved address information;
performing program address space mapping on the programming configuration file to obtain the actual address of the programming program;
synchronously matching the reserved address information with the actual address of the burning program, and judging the pointer of the storage block;
if the pointer of the storage block is larger than the preset position, changing the reserved address information;
copying the burning program into the changed reserved address area.
Optionally, in the method for remotely upgrading firmware of an embedded intelligent terminal according to the embodiment of the present application, the matching is performed between target parameter information of the terminal device and a burning configuration file, and if the matching is successful, the upgrading of the firmware of the terminal is started, including:
acquiring a burning configuration file, reading internal program data of the configuration file, and judging the type of the internal program data;
if the type accords with the upgrade type, creating a new node;
byte reading is carried out on the program data in the configuration file, and the nodes are filled according to byte reading contents;
judging whether bytes in the node meet the preset byte quantity or not;
if yes, the upgrading is finished.
In a second aspect, an embodiment of the present application provides a system for remotely upgrading firmware of an embedded intelligent terminal, where the system includes: the embedded intelligent terminal firmware remote upgrading method comprises a memory and a processor, wherein the memory comprises a program of an embedded intelligent terminal firmware remote upgrading method, and the program of the embedded intelligent terminal firmware remote upgrading method realizes the following steps when being executed by the processor:
configuring a programming program, programming the box firmware according to the programming program, establishing an upgrade data packet, and generating a plurality of programming configuration files;
configuring terminal equipment parameters, establishing an upgrade model, and generating terminal equipment target parameter information;
matching the target parameter information of the terminal equipment with the burning configuration file;
if the matching is successful, starting to upgrade the terminal firmware, and after the upgrade is finished, sending an optical machine instruction to the box firmware;
if the matching is unsuccessful, reconfiguring terminal firmware equipment parameters, and searching and matching the terminal equipment through the box firmware.
Optionally, in the remote firmware upgrading system for an embedded intelligent terminal according to the embodiment of the present application, the configuration programming program performs programming of the box firmware according to the programming program, establishes an upgrade data packet, and generates a plurality of programming configuration files, including:
the burning program comprises a physical layer, a protocol layer and an application layer;
the physical layer is used for acquiring communication serial port information, configuring a serial port, and writing data into the communication serial port or/and reading data from the communication serial port;
the protocol layer is used for sending an upgrade data packet, carrying out data processing or splitting on the upgrade data packet, and generating an upgrade encryption protocol;
the application layer adopts a multithreading mode to upgrade and monitor the box firmware, and backs up or restores the burning configuration file.
In a third aspect, an embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium includes an embedded intelligent terminal firmware remote upgrade method program, where when the embedded intelligent terminal firmware remote upgrade method program is executed by a processor, the steps of the embedded intelligent terminal firmware remote upgrade method described in any one of the foregoing are implemented.
As can be seen from the above, according to the method, system and medium for remote upgrading of firmware of an embedded intelligent terminal provided by the embodiments of the present application, by configuring a programming program, programming of box firmware is performed according to the programming program, an upgrade data packet is established, and a plurality of programming configuration files are generated; configuring terminal equipment parameters, establishing an upgrade model, and generating terminal equipment target parameter information; matching the target parameter information of the terminal equipment with the burning configuration file; if the matching is successful, starting to upgrade the terminal firmware, and after the upgrade is finished, sending an optical machine instruction to the box firmware; if the matching is unsuccessful, reconfiguring terminal firmware equipment parameters, and searching and matching the terminal equipment through the box firmware; the method can realize the fast unattended batch upgrade of the firmware of the production line end or the whole machine, realize the intellectualization of the firmware upgrade and improve the upgrade efficiency.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the embodiments of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for remotely upgrading firmware of an embedded intelligent terminal according to an embodiment of the present application;
fig. 2 is a flowchart of encryption protocol generation of an embedded intelligent terminal firmware remote upgrade method according to an embodiment of the present application;
FIG. 3 is a flowchart of a new firmware generation method of an embedded intelligent terminal firmware remote upgrade method according to an embodiment of the present application;
fig. 4 is a flowchart of a recording program of a remote firmware upgrade method for an embedded intelligent terminal according to an embodiment of the present application stored in a reserved address area;
fig. 5 is a schematic structural diagram of an embedded intelligent terminal firmware remote upgrade system according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, fig. 1 is a flowchart of a method for remotely upgrading firmware of an embedded intelligent terminal according to some embodiments of the present application. The embedded intelligent terminal firmware remote upgrading method is used in terminal equipment, such as computers, mobile phone terminals and the like. The method for remotely upgrading the firmware of the embedded intelligent terminal comprises the following steps:
s101, configuring a programming program, programming box firmware according to the programming program, establishing an upgrade data packet, and generating a plurality of programming configuration files;
s102, configuring terminal equipment parameters, establishing an upgrade model, and generating terminal equipment target parameter information;
s103, matching the target parameter information of the terminal equipment with the burning configuration file;
and S104, if the matching is successful, starting to upgrade the terminal firmware, and after the upgrade is finished, sending an optical machine instruction to the box firmware.
S105, if the matching is unsuccessful, reconfiguring terminal firmware equipment parameters, and searching and matching the terminal equipment through the box firmware.
According to the embodiment of the application, a programming program is configured, programming of box firmware is performed according to the programming program, an upgrade data packet is established, and a plurality of programming configuration files are generated, including:
the burning program comprises a physical layer, a protocol layer and an application layer;
the physical layer is used for acquiring communication serial port information, configuring the serial port, and writing data into the communication serial port or/and reading data from the communication serial port;
the protocol layer is used for sending an upgrade data packet, carrying out data processing or splitting on the upgrade data packet, and generating an upgrade encryption protocol;
the application layer adopts a multithreading mode to upgrade and monitor the box firmware, and backs up or restores the burning configuration file.
Referring to fig. 2, fig. 2 is a flowchart illustrating an encryption protocol generation method for remote firmware upgrade of an embedded intelligent terminal according to some embodiments of the present application. According to the embodiment of the application, the protocol layer is used for sending the upgrade data packet, carrying out data processing or splitting on the upgrade data packet, and generating an upgrade encryption protocol, and specifically comprises the following steps:
s201, acquiring an upgrade data packet, establishing an encryption rule, encrypting data according to the encryption rule, and generating an encryption key;
s202, configuring a memory address, and storing the encrypted data;
s203, configuring a calling mode, generating a decryption key, and verifying the matching degree of the decryption key and the encryption key to obtain a matching degree deviation rate;
s204, judging whether the matching degree deviation rate is larger than a preset matching degree deviation rate threshold value;
s205, if the decryption key is larger than the preset value, popping up the decryption key; and if the data is smaller than the data, performing decryption calling on the encrypted data through a decryption key.
It should be noted that, in general, the read configuration file is in plaintext and is not encrypted, so the configuration file can be directly used after being stolen. If the configuration file is encrypted, even if the encrypted configuration file is stolen, the configuration file cannot be used as long as the configuration file cannot be decrypted, and the safety of data is improved.
Referring to fig. 3, fig. 3 is a flowchart of a new firmware generation method of an embedded intelligent terminal firmware remote upgrade method according to some embodiments of the present application. According to the embodiment of the application, the matching of the target parameter information of the terminal equipment and the burning configuration file comprises the following steps:
s301, acquiring target parameter information of terminal equipment, establishing a first search engine, and performing byte segmentation search on the target parameter information of the terminal equipment to obtain a target parameter byte packet;
s302, constructing a second search engine to perform byte segmentation search on the burning configuration file to obtain a burning configuration byte packet;
s303, performing byte differential calculation on the target parameter byte packet and the burning configuration byte packet to generate a byte differential file;
s304, packaging the byte differential file to generate a firmware update package, and transmitting the firmware update package to the terminal equipment;
s305, unpacking the firmware update package after the transmission is completed to obtain update data;
s306, synthesizing the updated data with the original firmware data to generate new version firmware.
According to the embodiment of the application, the byte differential calculation is carried out on the target parameter byte packet and the burning configuration byte packet to generate a byte differential file, which comprises the following steps:
carrying out macro matching pretreatment on the firmware update package to obtain macro matching analysis information;
establishing a macro matching strategy, and extracting byte streams from the firmware update package;
analyzing and processing the byte stream of the update package and the original firmware data, and storing the byte stream and the original firmware data in a domain;
the macro-matching policy includes prefix matching, suffix matching, and matching of internal matching substring lengths.
Referring to fig. 4, fig. 4 is a flowchart illustrating a recording procedure of a remote firmware upgrade method for an embedded intelligent terminal according to some embodiments of the present application stored in a reserved address area. According to an embodiment of the present application, further comprising:
s401, establishing a firmware reserved storage area, and dividing the reserved storage area into a plurality of storage blocks;
s402, acquiring an address vector table of a storage block, and establishing reserved address information;
s403, performing program address space mapping on the burning configuration file to obtain the actual address of the burning program;
s404, synchronously matching the reserved address information with the actual address of the burning program, and judging the pointer of the storage block;
s405, if the pointer of the storage block is larger than the preset position, changing the reserved address information;
s406, copying the burning program into the changed reserved address area.
According to the embodiment of the application, the target parameter information of the terminal equipment is matched with the burning configuration file, and if the matching is successful, the terminal firmware is started to be upgraded, which comprises the following steps:
acquiring a burning configuration file, reading internal program data of the configuration file, and judging the type of the internal program data;
if the type accords with the upgrade type, creating a new node;
byte reading is carried out on the program data in the configuration file, and the nodes are filled according to byte reading contents;
judging whether bytes in the node meet the preset byte quantity or not;
if yes, the upgrading is finished.
It should be noted that, the data and the code information of the internal program data of the configuration file are written into the appointed storage area node by modulating the IAP function, so as to complete the program upgrading of the firmware.
According to an embodiment of the present application, further comprising: obtaining new firmware of the terminal equipment after upgrading is completed, and checking attribute information of the new firmware;
comparing the length of the new firmware with the length of the old firmware, copying the configuration file data of the new firmware to the old firmware storage area if the length of the new firmware is smaller than the length of the old firmware, and successfully distributing;
if the length of the new firmware is greater than that of the old firmware, searching a reserved address area; judging whether the reserved address area meets the length of the new firmware;
if yes, distributing the storage block corresponding to the reserved address area to the new firmware;
it should be noted that, if there is no suitable reserved area, firstly checking the idle resource table to find a suitable idle block, if there is, distributing the idle block to the new firmware, and returning the distribution successfully; if the free block is not suitable, calling a function, executing the dynamic memory arrangement work, updating the address vector table and the free resource table, re-executing the flow of accessing the free resource table, if the free block is not suitable after arrangement, successfully distributing and returning.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an embedded intelligent terminal firmware remote upgrade system according to some embodiments of the present application. In a second aspect, an embodiment of the present application provides an embedded intelligent terminal firmware remote upgrade system 5, which includes: the memory 51 and the processor 52, the memory 51 includes a program of the remote upgrade method of the firmware of the embedded intelligent terminal, and the program of the remote upgrade method of the firmware of the embedded intelligent terminal realizes the following steps when being executed by the processor:
configuring a programming program, programming the box firmware according to the programming program, establishing an upgrade data packet, and generating a plurality of programming configuration files;
configuring terminal equipment parameters, establishing an upgrade model, and generating terminal equipment target parameter information;
matching the target parameter information of the terminal equipment with the burning configuration file;
if the matching is successful, starting to upgrade the terminal firmware, and after the upgrade is finished, sending an optical machine instruction to the box firmware.
If the matching is unsuccessful, reconfiguring terminal firmware equipment parameters, and searching and matching the terminal equipment through the box firmware.
According to the embodiment of the application, a programming program is configured, programming of box firmware is performed according to the programming program, an upgrade data packet is established, and a plurality of programming configuration files are generated, including:
the burning program comprises a physical layer, a protocol layer and an application layer;
the physical layer is used for acquiring communication serial port information, configuring the serial port, and writing data into the communication serial port or/and reading data from the communication serial port;
the protocol layer is used for sending an upgrade data packet, carrying out data processing or splitting on the upgrade data packet, and generating an upgrade encryption protocol;
the application layer adopts a multithreading mode to upgrade and monitor the box firmware, and backs up or restores the burning configuration file.
According to the embodiment of the application, the protocol layer is used for sending the upgrade data packet, carrying out data processing or splitting on the upgrade data packet, and generating an upgrade encryption protocol, and specifically comprises the following steps:
acquiring an upgrade data packet, establishing an encryption rule, encrypting data according to the encryption rule, and generating an encryption key;
configuring a memory address, and storing the encrypted data;
configuring a calling mode, generating a decryption secret key, and verifying the matching degree of the decryption secret key and the encryption secret key to obtain a matching degree deviation rate;
judging whether the matching degree deviation rate is larger than a preset matching degree deviation rate threshold value or not;
if the decryption key is larger than the preset value, popping up the decryption key;
and if the data is smaller than the data, performing decryption calling on the encrypted data through a decryption key.
It should be noted that, in general, the read configuration file is in plaintext and is not encrypted, so the configuration file can be directly used after being stolen. If the configuration file is encrypted, even if the encrypted configuration file is stolen, the configuration file cannot be used as long as the configuration file cannot be decrypted, and the safety of data is improved.
According to the embodiment of the application, the matching of the target parameter information of the terminal equipment and the burning configuration file comprises the following steps:
acquiring target parameter information of terminal equipment, establishing a first search engine, and performing byte segmentation search on the target parameter information of the terminal equipment to obtain a target parameter byte packet;
constructing a second search engine to perform byte segmentation search on the burning configuration file to obtain a burning configuration byte packet;
performing byte differential calculation on the target parameter byte packet and the burning configuration byte packet to generate a byte differential file;
packaging the byte differential file to generate a firmware update package, and transmitting the firmware update package to terminal equipment;
unpacking the firmware update package after the transmission is completed to obtain update data;
and synthesizing the updated data with the original firmware data to generate a new version of firmware.
According to the embodiment of the application, the byte differential calculation is carried out on the target parameter byte packet and the burning configuration byte packet to generate a byte differential file, which comprises the following steps:
carrying out macro matching pretreatment on the firmware update package to obtain macro matching analysis information;
establishing a macro matching strategy, and extracting byte streams from the firmware update package;
analyzing and processing the byte stream of the update package and the original firmware data, and storing the byte stream and the original firmware data in a domain;
the macro-matching policy includes prefix matching, suffix matching, and matching of internal matching substring lengths.
According to an embodiment of the present application, further comprising:
establishing a firmware reserved storage area, and dividing the reserved storage area into a plurality of storage blocks;
acquiring an address vector table of a storage block, and establishing reserved address information;
performing program address space mapping on the programming configuration file to obtain the actual address of the programming program;
synchronously matching the reserved address information with the actual address of the burning program, and judging the pointer of the storage block;
if the pointer of the storage block is larger than the preset position, changing the reserved address information;
copying the burning program into the changed reserved address area.
According to the embodiment of the application, the target parameter information of the terminal equipment is matched with the burning configuration file, and if the matching is successful, the terminal firmware is started to be upgraded, which comprises the following steps:
acquiring a burning configuration file, reading internal program data of the configuration file, and judging the type of the internal program data;
if the type accords with the upgrade type, creating a new node;
byte reading is carried out on the program data in the configuration file, and the nodes are filled according to byte reading contents;
judging whether bytes in the node meet the preset byte quantity or not;
if yes, the upgrading is finished.
It should be noted that, the data and the code information of the internal program data of the configuration file are written into the appointed storage area node by modulating the IAP function, so as to complete the program upgrading of the firmware.
According to an embodiment of the present application, further comprising: obtaining new firmware of the terminal equipment after upgrading is completed, and checking attribute information of the new firmware;
comparing the length of the new firmware with the length of the old firmware, copying the configuration file data of the new firmware to the old firmware storage area if the length of the new firmware is smaller than the length of the old firmware, and successfully distributing;
if the length of the new firmware is greater than that of the old firmware, searching a reserved address area; judging whether the reserved address area meets the length of the new firmware;
if yes, distributing the storage block corresponding to the reserved address area to the new firmware;
it should be noted that, if there is no suitable reserved area, firstly checking the idle resource table to find a suitable idle block, if there is, distributing the idle block to the new firmware, and returning the distribution successfully; if the free block is not suitable, calling a function, executing the dynamic memory arrangement work, updating the address vector table and the free resource table, re-executing the flow of accessing the free resource table, if the free block is not suitable after arrangement, successfully distributing and returning.
The third aspect of the present application provides a computer readable storage medium, where the readable storage medium includes an embedded intelligent terminal firmware remote upgrade method program, and when the embedded intelligent terminal firmware remote upgrade method program is executed by a processor, the steps of the embedded intelligent terminal firmware remote upgrade method according to any one of the above steps are implemented.
The application discloses a method, a system and a medium for remotely upgrading firmware of an embedded intelligent terminal, which are characterized in that a programming program is configured to carry out program programming of box firmware according to the programming program, an upgrading data packet is established, and a plurality of programming configuration files are generated; configuring terminal equipment parameters, establishing an upgrade model, and generating terminal equipment target parameter information; matching the target parameter information of the terminal equipment with the burning configuration file; if the matching is successful, starting to upgrade the terminal firmware, and after the upgrade is finished, sending an optical machine instruction to the box firmware; if the matching is unsuccessful, reconfiguring terminal firmware equipment parameters, and searching and matching the terminal equipment through the box firmware; the method can realize the fast unattended batch upgrade of the firmware of the production line end or the whole machine, realize the intellectualization of the firmware upgrade and improve the upgrade efficiency.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above described device embodiments are only illustrative, e.g. the division of units is only one logical function division, and there may be other divisions in actual implementation, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units; can be located in one place or distributed to a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, or the like, which can store program codes.
Alternatively, the above-described integrated units of the present application may be stored in a readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the embodiments of the present application may be embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, ROM, RAM, magnetic or optical disk, or other medium capable of storing program code.

Claims (7)

1. The method for remotely upgrading the firmware of the embedded intelligent terminal is characterized by comprising the following steps of:
configuring a programming program, programming the box firmware according to the programming program, establishing an upgrade data packet, and generating a plurality of programming configuration files;
configuring terminal equipment parameters, establishing an upgrade model, and generating terminal equipment target parameter information; matching the target parameter information of the terminal equipment with the burning configuration file;
if the matching is successful, starting to upgrade the terminal firmware, and after the upgrade is finished, sending an optical machine instruction to the box firmware;
if the matching is unsuccessful, reconfiguring terminal firmware equipment parameters, and searching and matching the terminal equipment through the box firmware;
the matching the target parameter information of the terminal equipment with the burning configuration file comprises the following steps:
acquiring target parameter information of terminal equipment, establishing a first search engine, and performing byte segmentation search on the target parameter information of the terminal equipment to obtain a target parameter byte packet;
constructing a second search engine to perform byte segmentation search on the burning configuration file to obtain a burning configuration byte packet; performing byte differential calculation on the target parameter byte packet and the burning configuration byte packet to generate a byte differential file; packaging the byte differential file to generate a firmware update package, and transmitting the firmware update package to terminal equipment;
unpacking the firmware update package after the transmission is completed to obtain update data;
synthesizing the updated data with the original firmware data to generate a new version of firmware;
performing byte differential calculation on the target parameter byte packet and the burning configuration byte packet to generate a byte differential file, including:
carrying out macro matching pretreatment on the firmware update package to obtain macro matching analysis information;
establishing a macro matching strategy, and extracting byte streams from the firmware update package;
analyzing and processing the byte stream of the update package and the original firmware data, and storing the byte stream and the original firmware data in a domain;
the macro matching strategy comprises prefix matching, suffix matching and matching of the internal matching substring length;
the step of matching the target parameter information of the terminal equipment with the burning configuration file, and if the matching is successful, starting to upgrade the terminal firmware, specifically comprising:
acquiring a burning configuration file, reading internal program data of the configuration file, and judging the type of the internal program data;
if the type accords with the upgrade type, creating a new node;
byte reading is carried out on the program data in the configuration file, and the nodes are filled according to byte reading contents;
judging whether bytes in the node meet the preset byte quantity or not;
if yes, finishing upgrading;
further comprises:
obtaining new firmware of the terminal equipment after upgrading is completed, and checking attribute information of the new firmware;
comparing the length of the new firmware with the length of the old firmware, copying the configuration file data of the new firmware to the old firmware storage area if the length of the new firmware is smaller than the length of the old firmware, and successfully distributing;
if the length of the new firmware is greater than that of the old firmware, searching a reserved address area;
judging whether the reserved address area meets the length of the new firmware;
and if so, distributing the storage block corresponding to the reserved address area to the new firmware.
2. The method for remotely upgrading firmware of an embedded intelligent terminal according to claim 1, wherein the configuring the programming program, programming the box firmware according to the programming program, creating an upgrade data packet, and generating a plurality of programming configuration files includes:
the burning program comprises a physical layer, a protocol layer and an application layer;
the physical layer is used for acquiring communication serial port information, configuring a serial port, and writing data into the communication serial port or/and reading data from the communication serial port;
the protocol layer is used for sending an upgrade data packet, carrying out data processing or splitting on the upgrade data packet, and generating an upgrade encryption protocol;
the application layer adopts a multithreading mode to upgrade and monitor the box firmware, and backs up or restores the burning configuration file.
3. The method for remotely upgrading firmware of an embedded intelligent terminal according to claim 2, wherein the protocol layer is configured to send an upgrade data packet, perform data processing or splitting on the upgrade data packet, and generate an upgrade encryption protocol, and specifically includes:
acquiring an upgrade data packet, establishing an encryption rule, encrypting data according to the encryption rule, and generating an encryption key; configuring a memory address, and storing the encrypted data;
configuring a calling mode, generating a decryption secret key, and verifying the matching degree of the decryption secret key and the encryption secret key to obtain a matching degree deviation rate;
judging whether the matching degree deviation rate is larger than a preset matching degree deviation rate threshold value or not; if the decryption key is larger than the preset value, popping up the decryption key;
and if the data is smaller than the data, performing decryption calling on the encrypted data through a decryption key.
4. The method for remotely upgrading firmware of an embedded intelligent terminal according to claim 1, further comprising:
establishing a firmware reserved storage area, and dividing the reserved storage area into a plurality of storage blocks;
acquiring an address vector table of a storage block, and establishing reserved address information;
performing program address space mapping on the programming configuration file to obtain the actual address of the programming program;
synchronously matching the reserved address information with the actual address of the burning program, and judging the pointer of the storage block;
if the pointer of the storage block is larger than the preset position, changing the reserved address information;
copying the burning program into the changed reserved address area.
5. An embedded intelligent terminal firmware remote upgrade system, which is characterized in that the system comprises: the embedded intelligent terminal firmware remote upgrading method comprises a memory and a processor, wherein the memory comprises a program of an embedded intelligent terminal firmware remote upgrading method, and the program of the embedded intelligent terminal firmware remote upgrading method realizes the following steps when being executed by the processor:
configuring a programming program, programming the box firmware according to the programming program, establishing an upgrade data packet, and generating a plurality of programming configuration files;
configuring terminal equipment parameters, establishing an upgrade model, and generating terminal equipment target parameter information; matching the target parameter information of the terminal equipment with the burning configuration file;
if the matching is successful, starting to upgrade the terminal firmware, and after the upgrade is finished, sending an optical machine instruction to the box firmware;
if the matching is unsuccessful, reconfiguring terminal firmware equipment parameters, and searching and matching the terminal equipment through the box firmware;
the matching the target parameter information of the terminal equipment with the burning configuration file comprises the following steps:
acquiring target parameter information of terminal equipment, establishing a first search engine, and performing byte segmentation search on the target parameter information of the terminal equipment to obtain a target parameter byte packet;
constructing a second search engine to perform byte segmentation search on the burning configuration file to obtain a burning configuration byte packet; performing byte differential calculation on the target parameter byte packet and the burning configuration byte packet to generate a byte differential file; packaging the byte differential file to generate a firmware update package, and transmitting the firmware update package to terminal equipment;
unpacking the firmware update package after the transmission is completed to obtain update data;
synthesizing the updated data with the original firmware data to generate a new version of firmware;
performing byte differential calculation on the target parameter byte packet and the burning configuration byte packet to generate a byte differential file, including:
carrying out macro matching pretreatment on the firmware update package to obtain macro matching analysis information;
establishing a macro matching strategy, and extracting byte streams from the firmware update package;
analyzing and processing the byte stream of the update package and the original firmware data, and storing the byte stream and the original firmware data in a domain;
the macro matching strategy comprises prefix matching, suffix matching and matching of the internal matching substring length;
the step of matching the target parameter information of the terminal equipment with the burning configuration file, and if the matching is successful, starting to upgrade the terminal firmware, specifically comprising:
acquiring a burning configuration file, reading internal program data of the configuration file, and judging the type of the internal program data;
if the type accords with the upgrade type, creating a new node;
byte reading is carried out on the program data in the configuration file, and the nodes are filled according to byte reading contents;
judging whether bytes in the node meet the preset byte quantity or not;
if yes, finishing upgrading;
further comprises:
obtaining new firmware of the terminal equipment after upgrading is completed, and checking attribute information of the new firmware;
comparing the length of the new firmware with the length of the old firmware, copying the configuration file data of the new firmware to the old firmware storage area if the length of the new firmware is smaller than the length of the old firmware, and successfully distributing;
if the length of the new firmware is greater than that of the old firmware, searching a reserved address area;
judging whether the reserved address area meets the length of the new firmware;
and if so, distributing the storage block corresponding to the reserved address area to the new firmware.
6. The remote upgrade system of firmware of an embedded intelligent terminal according to claim 5, wherein the configuration programming program is configured to program the box firmware according to the programming program, build an upgrade data packet, and generate a plurality of programming configuration files, including:
the burning program comprises a physical layer, a protocol layer and an application layer;
the physical layer is used for acquiring communication serial port information, configuring a serial port, and writing data into the communication serial port or/and reading data from the communication serial port;
the protocol layer is used for sending an upgrade data packet, carrying out data processing or splitting on the upgrade data packet, and generating an upgrade encryption protocol;
the application layer adopts a multithreading mode to upgrade and monitor the box firmware, and backs up or restores the burning configuration file.
7. A computer readable storage medium, wherein the computer readable storage medium includes an embedded intelligent terminal firmware remote upgrade method program, and when the embedded intelligent terminal firmware remote upgrade method program is executed by a processor, the steps of the embedded intelligent terminal firmware remote upgrade method according to any one of claims 1 to 4 are implemented.
CN202310630917.9A 2023-05-31 2023-05-31 Remote firmware upgrading method, system and medium for embedded intelligent terminal Active CN116360809B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310630917.9A CN116360809B (en) 2023-05-31 2023-05-31 Remote firmware upgrading method, system and medium for embedded intelligent terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310630917.9A CN116360809B (en) 2023-05-31 2023-05-31 Remote firmware upgrading method, system and medium for embedded intelligent terminal

Publications (2)

Publication Number Publication Date
CN116360809A CN116360809A (en) 2023-06-30
CN116360809B true CN116360809B (en) 2023-08-22

Family

ID=86941934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310630917.9A Active CN116360809B (en) 2023-05-31 2023-05-31 Remote firmware upgrading method, system and medium for embedded intelligent terminal

Country Status (1)

Country Link
CN (1) CN116360809B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117075958B (en) * 2023-10-16 2024-01-23 广东优力普物联科技有限公司 Firmware generation method suitable for multiple models, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957765A (en) * 2010-09-02 2011-01-26 北京中星微电子有限公司 Method, system and equipment for updating equipment firmware
CN111954040A (en) * 2020-07-17 2020-11-17 深圳市华曦达科技股份有限公司 Remote controller upgrading method and device, electronic equipment and storage medium
CN113434179A (en) * 2021-07-08 2021-09-24 恒安嘉新(北京)科技股份公司 Online upgrade method, device, equipment and storage medium for programmable power supply
CN113608761A (en) * 2021-07-26 2021-11-05 安徽华米信息科技有限公司 Firmware file matching method and device, electronic equipment and storage medium
CN114356367A (en) * 2021-12-21 2022-04-15 浪潮金融信息技术有限公司 Intelligent firmware batch upgrading method, system and medium for terminal equipment
CN115348173A (en) * 2022-05-31 2022-11-15 青岛海信宽带多媒体技术有限公司 Area upgrading control method for household intelligent gateway
CN116088882A (en) * 2023-03-31 2023-05-09 深圳市微克科技有限公司 Function configuration method, system and medium based on intelligent wearable device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552491A (en) * 2020-04-22 2020-08-18 北京小马智行科技有限公司 Method, device and storage medium for upgrading firmware of transfer equipment of mobile carrier

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957765A (en) * 2010-09-02 2011-01-26 北京中星微电子有限公司 Method, system and equipment for updating equipment firmware
CN111954040A (en) * 2020-07-17 2020-11-17 深圳市华曦达科技股份有限公司 Remote controller upgrading method and device, electronic equipment and storage medium
CN113434179A (en) * 2021-07-08 2021-09-24 恒安嘉新(北京)科技股份公司 Online upgrade method, device, equipment and storage medium for programmable power supply
CN113608761A (en) * 2021-07-26 2021-11-05 安徽华米信息科技有限公司 Firmware file matching method and device, electronic equipment and storage medium
CN114356367A (en) * 2021-12-21 2022-04-15 浪潮金融信息技术有限公司 Intelligent firmware batch upgrading method, system and medium for terminal equipment
CN115348173A (en) * 2022-05-31 2022-11-15 青岛海信宽带多媒体技术有限公司 Area upgrading control method for household intelligent gateway
CN116088882A (en) * 2023-03-31 2023-05-09 深圳市微克科技有限公司 Function configuration method, system and medium based on intelligent wearable device

Also Published As

Publication number Publication date
CN116360809A (en) 2023-06-30

Similar Documents

Publication Publication Date Title
CN107770182B (en) Data storage method of home gateway and home gateway
CN108197891B (en) Electronic signing device and method based on block chain
CN116360809B (en) Remote firmware upgrading method, system and medium for embedded intelligent terminal
CN104796491A (en) Server and software downloading and registration method based on once code-scanning
CN111460394A (en) Copyright file verification method and device and computer readable storage medium
CN113961226B (en) Software development kit repairing method, terminal, server and equipment
CN111488169A (en) Method and device for hot updating of application program, storage medium and electronic equipment
CN111144878A (en) Instruction generation method and instruction generation device
CN112036125A (en) Document management method and device and computer equipment
CN111241152B (en) Policy information mining method and device and cloud server
CN112134908B (en) Application adaptation method, server, medium and vehicle-mounted multimedia system
WO2005038661A1 (en) Terminal authentication apparatus and method
CN115422218A (en) Device and method compatible with Ethernet EVM through virtual fragmentation mode
CN109005219A (en) A kind of the mobile intelligent terminal system and its implementation of shared system
CN112367661B (en) USAT application matching implementation method, USIM, terminal, device and medium
CN115150143A (en) Industrial control equipment network access authentication method, device, equipment and storage medium
CN113342811A (en) HBase table data processing method and device
CN114489737A (en) Multi-firmware OTA (over the air) upgrading method and device, server and storage medium
CN114567678A (en) Resource calling method and device of cloud security service and electronic equipment
CN112528333A (en) User privacy protection method, MEC server, terminal, device and medium
CN113852624A (en) Data cross-network transmission method, device and computer medium thereof
CN113064898A (en) Retrieval method and device based on miniature index of contract on chain and electronic equipment
CN112416875A (en) Log management method and device, computer equipment and storage medium
CN112416619A (en) Interface configuration method, equipment, terminal and storage medium
CN117009992B (en) Upgrade package processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 4208, Tower A, Hongrongyuan North Station Center, Minzhi Street North Station Community, Longhua District, Shenzhen City, Guangdong Province, 518000

Patentee after: Shenzhen Weike Technology Co.,Ltd.

Country or region after: China

Address before: 518109 room 1501, building e, phase II, Xinghe world, Minle community, Minzhi street, Longhua District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN WAKE UP TECHNOLOGY CO.,LTD.

Country or region before: China