CN107943501A - Embedded device upgrade method, device, computer equipment and storage medium - Google Patents
Embedded device upgrade method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN107943501A CN107943501A CN201711242989.7A CN201711242989A CN107943501A CN 107943501 A CN107943501 A CN 107943501A CN 201711242989 A CN201711242989 A CN 201711242989A CN 107943501 A CN107943501 A CN 107943501A
- Authority
- CN
- China
- Prior art keywords
- upgrading
- upgrade
- file
- ancient deed
- image file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/606—Protecting data by securing the transmission between two devices or processes
Abstract
A kind of embedded device upgrade method, including:The encrypted upgrade image file that receiving terminal is sent;Upgrade status in the built-in upgrading mark text of modification, which is identified as, to be upgraded;Upgrade image file is decrypted according to built-in clear crytpographic key, the upgrade image file after being decrypted;Upgrade information is obtained from the upgrade image file after decryption;Upgrading mode and upgrading object ancient deed position in upgrade information upgrade corresponding upgrading object;Upgrade status in the built-in upgrading mark text of modification is identified as upgrading and completes, and realizes the upgrading to embedded device, improves the efficiency of upgrading, convenient for users to use.A kind of embedded device update device, computer equipment and storage medium are also provided.
Description
Technical field
The present invention relates to field of embedded technology, more particularly to a kind of embedded device upgrade method, device, computer
Equipment and storage medium.
Background technology
Embedded device is mainly made of embeded processor, associated support hardware and embedded software system, to insertion
The upgrading of formula equipment mainly rises the firmware of embedded system device, file system, user program, device resource file etc.
Level, can be applied to such as digital audio processor, video and audio coding, middle control, video conference terminal, web camera, tuning
In the products such as platform.Traditional upgrading to embedded system device is directly to carry out erasing to the memory space of embedded system to cover
Cover to achieve the purpose that more new system, this upgrade method upgrade package is big, and upgrading efficiency is than relatively low.Or some fixations are answered
It is replaced with files such as program, dynamic base, static library, configuration, data and achievees the purpose that upgrading.This upgrade method needs to make
The various pieces in system are upgraded with different upgrade package, when upgrading needs user to carry out multiple updating operation, compares
Trouble.
The content of the invention
Based on this, it is necessary to for above-mentioned technical problem, there is provided one kind upgrading is efficient, upgrades convenient embedded device
Upgrade method, device, computer equipment and storage medium.
A kind of embedded device upgrade method, including:
The encrypted upgrade image file that receiving terminal is sent;
Upgrade status in the built-in upgrading mark text of modification, which is identified as, to be upgraded;
Upgrade image file is decrypted according to built-in clear crytpographic key, the upgrade image file after being decrypted;
Upgrade information is obtained from the upgrade image file after decryption, it is old that upgrade information includes upgrading object, upgrading object
File position and corresponding upgrading mode;
Upgrading mode and upgrading object ancient deed position in upgrade information carry out corresponding upgrading object
Upgrading;
Upgrade status in the built-in upgrading mark text of modification is identified as upgrading and completes.
In one of the embodiments, upgrading object includes the mould in embedded device system or embedded device system
Block;Upgrade information file, upgrade file are included in upgrade image file.
In one of the embodiments, embedded device upgrade method further includes:
When be abnormal cause upgrading terminate when, detection upgrade status mark;
Upgrading if upgrade status is identified as, into factory reset state, under factory reset state
Initial mirror file built in acquisition, reduces dispatch from the factory program and setting, afterwards according to built-in initial mirror file from read-only mirror image area
Modification upgrade status is identified as upgrading and completes;
When upgrade status, which is identified as upgrading, to be completed, then start embedded device operating system.
In one of the embodiments, upgrade image file includes script file;In the upgrading in upgrade information
Mode and upgrading object ancient deed position carry out in escalation process corresponding upgrading object, and perform script file is with to embedding
The corresponding module entered in formula equipment performs respective operations.
In one of the embodiments, the upgrading mode in upgrade information includes deleting ancient deed;According in upgrade information
Upgrading mode and upgrading object ancient deed position corresponding upgrading object is upgraded, including:
Corresponding file operation interface is called according to upgrading object ancient deed position, by the old of corresponding upgrading object
File is deleted.
In one of the embodiments, the upgrading mode in upgrade information includes newly-increased upgrade file;According to upgrade information
In upgrading mode and upgrading object ancient deed position corresponding upgrading object is upgraded, including:
Newly-increased upgrade file is obtained from upgrade image file, is called and corresponded to according to upgrading object ancient deed position
File operation interface, newly-increased upgrade file is copied into upgrading object ancient deed position.
In one of the embodiments, it is upgrade file that the upgrading mode in upgrade information, which includes replacing ancient deed,;According to
Upgrading mode and upgrading object ancient deed position in upgrade information upgrade corresponding upgrading object, including:
The corresponding upgrade file of upgrading object is obtained from upgrade image file, according to upgrading object ancient deed position
Corresponding file operation interface is called, the ancient deed of corresponding upgrading object is deleted;
File operation interface is called, upgrade file is copied into upgrading object ancient deed position.
A kind of embedded device update device, including:
File reception module, the encrypted upgrade image file sent for receiving terminal;
First modified module, is upgrading for changing the upgrade status in built-in upgrading mark text and being identified as;
Deciphering module, for upgrade image file to be decrypted according to built-in clear crytpographic key, the liter after being decrypted
Class mirror-image file;
Data obtaining module, for obtaining upgrade information from the upgrade image file after decryption, upgrade information includes rising
Level and upgrades mode at object, upgrading object ancient deed position accordingly;
Upgraded module, for the upgrading mode in upgrade information and upgrading object ancient deed position to corresponding
Upgrading object is upgraded;
Second modified module, upgrading completion is identified as changing the upgrade status in built-in upgrading mark text.
A kind of computer equipment, including memory, processor and storage can be run on a memory and on a processor
Computer program, when processor executive program, realize the step in any of the above-described embedded device upgrade method.
A kind of computer-readable storage medium, is stored thereon with computer program, which realizes above-mentioned when being executed by processor
Step in any one embedded device upgrade method.
Above-mentioned embedded device upgrade method, device, computer equipment and storage medium, are added by what receiving terminal was sent
Upgrade image file after close;Upgrade status in the built-in upgrading mark text of modification, which is identified as, to be upgraded;According to built-in
Upgrade image file is decrypted in clear crytpographic key, the upgrade image file after being decrypted;From the upgrade image text after decryption
Upgrade information is obtained in part, upgrade information includes upgrading object, upgrading object ancient deed position and upgrades mode accordingly;
Upgrading mode and upgrading object ancient deed position in upgrade information upgrade corresponding upgrading object;Modification
Upgrade status in built-in upgrading mark text is identified as upgrading and completes.User can once complete to rise in escalation process operation
Level, use is more convenient, and embedded device is upgraded using upgrade information in upgrade image file, improves upgrading
Efficiency.
Brief description of the drawings
Fig. 1 is the applied environment figure of embedded device upgrade method in one embodiment;
Fig. 2 is the flow diagram of embedded device upgrade method in one embodiment;
Fig. 3 is the flow diagram that processing upgrading is abnormal in one embodiment;
Fig. 4 is the structure diagram of embedded device update device in one embodiment;
Fig. 5 is the cut-away view of one embodiment Computer equipment;
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
As shown in Figure 1, in one embodiment, there is provided a kind of applied environment figure of embedded device upgrade method.Wherein,
Including terminal 102 and the embedded device 104 to be upgraded, wherein, terminal 102 and 104 network connection of embedded device.It is embedded
Equipment 104 receives the encrypted upgrade image file of the transmission of terminal 102, and embedded device 104 just changes built-in upgrading mark
Upgrade status in knowledge text, which is identified as, to be upgraded, and then, embedded device 104 is according to built-in clear crytpographic key to upgrading mirror
As file is decrypted, the upgrade image file after being decrypted.In upgrade image file of the embedded device 104 after decryption
Upgrade information is obtained, the upgrading mode and upgrading object ancient deed position in upgrade information are to corresponding upgrading object
Upgraded.The upgrade status that embedded device 104 will be also changed in built-in upgrading mark text after the completion of upgrading is identified as liter
Level is completed.
As shown in Fig. 2, in one embodiment, there is provided a kind of flow diagram of embedded device upgrade method.The party
Method is applied to be illustrated in the embedded device 104 shown in Fig. 1, comprises the following steps:
S202, the encrypted upgrade image file that receiving terminal is sent.
Preserved specifically, user downloads encrypted upgrade image file from the upgrading website of embedded device in the terminal
In local.Then upgrading tool is run in terminal, into upgrading interface, selection is stored in local encrypted upgrade image
File and the corresponding embedded device to be upgraded, click on the upgrade button on upgrading interface, terminal will be by encrypted liter
Class mirror-image file is transferred to corresponding embedded device.Embedded device will receive encrypted upgrade image file.
In one embodiment, embedded device receives the upgrade image file after decryption.Specifically, terminal is being sent
Before upgrade image file, first encrypted upgrade image file is solved according to the clear crytpographic key being built in upgrading tool
Close, upgrade image file after decryption is sent to embedded device by terminal again, so that embedded device can directly be risen
Level operation, it is not necessary to be decrypted.
S204, the upgrade status that the built-in upgrading of modification is identified in text, which is identified as, to be upgraded.
Specifically, embedded device built-in upgrading can identify text when dispatching from the factory, wherein, upgrades shape in upgrading mark text
State is identified as upgrading and completes.Embedded device, first can be by upgrading mark text after encrypted upgrade image file is received
Upgrade status mark is revised as upgrading in this.In one embodiment, the upgrade status mark in upgrading mark text
Can be that True represents that upgrading is completed, amended upgrade status mark modification can also be that False represents upgrading.
S206, is decrypted upgrade image file according to built-in clear crytpographic key, the upgrade image text after being decrypted
Part.
Specifically, upgrade image file is using the encrypted file of Encryption Algorithm, wherein, Encryption Algorithm can be AES
(Advanced Encryption Standard, Advanced Encryption Standard), DES (Data Encryption Standard, data
Encryption standard) etc..The password of decryption is built into embedded device in advance when equipment is dispatched from the factory.Then, embedded device root
Encrypted upgrade image file is decrypted according to built-in clear crytpographic key, the upgrade image file after being decrypted.
S208, obtains upgrade information from the upgrade image file after decryption, and upgrade information includes upgrading object, upgrading pair
As ancient deed position and corresponding upgrading mode.
Specifically, obtaining upgrade information from the upgrade image file after decryption, upgrade information includes upgrading object, upgrading
Object ancient deed position and corresponding upgrading mode.
S210, the upgrading mode and upgrading object ancient deed position in upgrade information are to corresponding upgrading object
Upgraded.
Specifically, the object of upgrading, then the upgrading object ancient deed in upgrade information are determined according to upgrade information
Position determines the specific location of upgrading object, and finally upgrading object is upgraded according to upgrading mode.
In one embodiment, upgrade information further include whether the information of backup upgrading object ancient deed.If specifically,
Indispensable file when the upgrading object starts operation for embedded device, is abnormal in escalation process, leads in order to prevent
Cause file to lose, back-up processing is carried out according to the information of backup upgrading object ancient deed in upgrade information before upgrading.
S212, the upgrade status that the built-in upgrading of modification is identified in text are identified as upgrading completion.
Specifically, after upgrading is completed, the upgrade status mark in the built-in upgrading mark text of embedded device modification
Completed for upgrading.
In the above-described embodiments, embedded device sets upgrade status by receiving encrypted upgrade image file
It is identified as and is upgrading, after decryption, the upgrade information in upgrade image file is upgraded, will upgrading after the completion of upgrading
Status indicator, which is revised as upgrading, to be completed.Realize user's progress once-through operation embedded device can be completed to upgrade, facilitate
The use of user, and embedded device is upgraded using upgrading mode in escalation process, improve the efficiency of upgrading.
In one embodiment, upgrading object includes the module in embedded device system or embedded device system;
Upgrade information file, upgrade file are included in upgrade image file.
Specifically, upgrading object can be the tool upgraded in embedded device system or embedded device system
The module of body, wherein, the module in embedded device system can be a module or multiple modules.It is embedded to set
Any module in standby system can be upgrading object.Upgrade information file, upgrade file are included in upgrade image file.Its
In, upgrade file is the file to be used for carrying out updating operation in escalation process, and upgrade information file includes upgrading letter
Breath.Upgrade file is the file that be used for upgrading embedded device of respective upgrades information.Upgrade information file is that have to fix
The file of title.Such as:Upgrade information file is json files in upgrade image file, its title is fixed as update_pkg_
Desc.json and corresponding upgrade file.Wherein, the partial content of upgrade information is " C66-RubyDsp1.out ":{"
path":"./../C66-RubyDsp1.out","needBak":false,"description":""}}.Wherein " C66-
RubyDsp1.out " represents that upgrading object is C66-RubyDsp1.out file items."path":"./../C66-
RubyDsp1.out " represents the relative path of the upgrading object ancient deed position."needBak":False represents the upgrading
Object need not back up." description " is used for the relevant information for describing the upgrading object, such as, this can be described
Effect of the upgrading object in embedded device, or empty, its main function is the work for facilitating developer to understand this
With.
In the above-described embodiments, the content in upgrade image file and the object of upgrading are specifically illustrated so that upgrading
During more efficiency and conveniently.
As shown in figure 3, in one embodiment, embedded device upgrade method further includes step:
S302, when be abnormal cause upgrading terminate when, detection upgrade status mark.
Specifically, when be abnormal cause upgrading terminate when, i.e., when embedded device occur power-off or other interrupt feelings
During condition, upgrading is caused to terminate.When wherein, in the event of powering off, incoming call is waited, then detects upgrade status mark, if its
When he interrupts situation, upgrade status mark is directly detected.
S304, is upgrading if upgrade status is identified as, into factory reset state, in factory reset shape
Initial mirror file built in being obtained under state, dispatch from the factory program and setting are reduced according to built-in initial mirror file from read-only mirror image area,
Modification upgrade status is identified as upgrading and completes afterwards.
Specifically, when upgrade status is identified as and is upgrading, illustrate that embedded device upgrading does not complete that just there occurs different
Often, it is directly entered factory reset state.Initial mirror file built in being obtained under factory reset state, the initial mirror
As file is just arranged in read-only mirror image area when equipment is dispatched from the factory, any means can't be provided and allow user to go to delete, be used for
Recover dispatch from the factory program and setting.Dispatch from the factory program and setting are reduced according to initial mirror file, then upgrade status is identified and is changed
Completed for upgrading.
S306, when upgrade status, which is identified as upgrading, to be completed, then starts embedded device operating system.
Specifically, when upgrade status is identified as upgrading completion, then normally starts embedded device operating system, make insertion
Formula equipment can work normally.After start completion, embedded device can re-start upgrading.
In above-described embodiment, when being abnormal in escalation process, embedded device is made again according to initial mirror file
Start operation, improve the stability of embedded device, avoid causes embedded device to need user couple because upgrading and interrupting
It, which does some specific operations or depot repair, could recover normal trouble, convenient for users to use.
In one embodiment, upgrade image file includes script file;In the upgrading mode in upgrade information
Corresponding upgrading object is carried out in escalation process with upgrading object ancient deed position, perform script file is with to embedded
Corresponding module in equipment performs respective operations.
Specifically, can also include script file in upgrade image file, embedded device can be according in upgrade information
Upgrading mode and upgrading object ancient deed position to corresponding upgrading object carry out escalation process in perform script file
Make corresponding response action.Wherein, the type of the information of script file, i.e. script file can be included in upgrade information
The path to be performed with script file.Script file can be found according to the script information in upgrade information, then according to script
The path that file to be performed performs corresponding script file.Wherein, the content of script file can be embedded in escalation process
The content for the autgmentability that formula equipment can perform.For example if being provided with indicator light on embedded device, indicator light can be controlled to exist
For embedded device into line flicker in escalation process, it is dimmed that rear indicator light is completed in upgrading.For another example, perform script file can reach
To the effect of renewal FPGA (Field-Programmable Gate Array, field programmable gate array) firmware, specifically,
The type of corresponding script file can be shell (computer shell) script of text in upgrade information, wherein, to perform
Path can be/home/root/system/sh/write_fpga_flash.sh.The wherein content of script file can be with
It is #!/bin/sh flashcp-v/home/root/program/ruby/fpga/RubyRouterFPGA.bin/dev/
mtd0.The script file content meant in RubyRouterFPGA.bin burning files to/dev/mtd0, wherein
RubyRouterFPGA.bin is the firmware binary file of FPGA, and it is program storage that FPGA starts that/dev/mtd0 is corresponding
Device.
In the above-described embodiments, by the script file in upgrade image file, embedded device can be controlled to upgrade
During respective operations are performed to corresponding module so that embedded device needs in escalation process or after escalation process can be with
Some corresponding or variable responses are made, improve scalability of the embedded device in escalation process.
In one embodiment, the upgrading mode in upgrade information includes deleting ancient deed;Liter in upgrade information
Level mode and upgrading object ancient deed position upgrade corresponding upgrading object, including:
Corresponding file operation interface is called according to upgrading object ancient deed position, by the old of corresponding upgrading object
File is deleted.
Specifically, the upgrading mode in upgrade information can delete ancient deed.It can be found first in upgrade information
Upgrading object ancient deed storage position, then the file operation interface of call operation system deleted.Such as:It is if embedded
The operating system Linux system of equipment, in upgrading, it is necessary to when deleting C66-RubyDsp1.out files, call operation system
File operation interface in the function such as DeleteFile ("/../C66-RubyDsp1.out ") of deletion file deleted
Remove.
In one embodiment, the upgrading mode in upgrade information includes newly-increased upgrade file;According in upgrade information
Upgrading mode and upgrading object ancient deed position upgrade corresponding upgrading object, including:
Newly-increased upgrade file is obtained from upgrade image file, is called and corresponded to according to upgrading object ancient deed position
File operation interface, newly-increased upgrade file is copied into upgrading object ancient deed position.
Specifically, the upgrading mode in upgrade information can be newly-increased upgrade file, obtained from upgrade image file new
The upgrade file of increasing, the position stored according to upgrading object ancient deed in upgrade information, the file operation of call operation system connect
Newly-increased upgrade file, is copied to the position of upgrading object ancient deed storage by mouth.Such as:In upgrading, it is necessary to newly-increased C66-
During RubyDsp1.out files, the duplication documentation function CopyFile in the file operation interface of operating system is directly invoked
(" C66-RubyDsp1.out ", " and/../C66-RubyDsp1.out "), newly-increased C66-RubyDsp1.out files are replicated
To the position of upgrading object ancient deed storage.
In one embodiment, it is upgrade file that the upgrading mode in upgrade information, which includes replacing ancient deed,;According to upgrading
Upgrading mode and upgrading object ancient deed position in information upgrade corresponding upgrading object, including:
The corresponding upgrade file of upgrading object is obtained from upgrade image file, according to upgrading object ancient deed position
Corresponding file operation interface is called, the ancient deed of corresponding upgrading object is deleted;
File operation interface is called, upgrade file is copied into upgrading object ancient deed position.
Specifically, it is upgrade file that the upgrading mode in upgrade information, which can be replacement ancient deed,.First, from upgrade file
In find the corresponding upgrade file of upgrading object, corresponding file operation is then called according to upgrading object ancient deed position
Interface, the ancient deed of corresponding upgrading object is deleted, and finally, recalls file operation interface, the upgrading that will be got
The corresponding upgrade file of object copies to upgrading object ancient deed position, achievees the purpose that replacement.Such as:In upgrading,
When needing to replace C66-RubyDsp1.out files, the position of the ancient deed storage of this document is found in upgrade information, is first adjusted
With function such as DeleteFile ("/../C66- of the deletion file in the file operation interface of operating system
RubyDsp1.out ") ancient deed is deleted.Then, the duplication file in the file operation interface of call operation system
Function CopyFile (" C66-RubyDsp1.out ", " and/../C66-RubyDsp1.out ") by upgrade image file
The corresponding upgrade file of upgrading object copies to the position of ancient deed storage, reaches the purpose of replacement.
In the above-described embodiments, embedded device is upgraded by different upgrading modes, it is not necessary to embedded
The memory space of equipment, which carries out clashing covering, to be upgraded, and improves efficiency of the embedded device in escalation process.
As shown in figure 4, in one embodiment, a kind of embedded device update device 400, including file reception module
402nd, the first modified module 404, deciphering module 406, data obtaining module 408,410 and second modified module 412 of upgraded module,
Wherein:
File reception module 402, the encrypted upgrade image file sent for receiving terminal.
First modified module 404, is upgrading for changing the upgrade status in built-in upgrading mark text and being identified as.
Deciphering module 406, for upgrade image file to be decrypted according to built-in clear crytpographic key, after being decrypted
Upgrade image file.
Data obtaining module 408, for obtaining upgrade information from the upgrade image file after decryption, upgrade information includes
Upgrading object, upgrading object ancient deed position and upgrade mode accordingly.
Upgraded module 410, for the upgrading mode in upgrade information and upgrading object ancient deed position to phase
The upgrading object answered is upgraded.
Second modified module 412, upgrading completion is identified as changing the upgrade status in built-in upgrading mark text.
In above-described embodiment, by 402 receiving terminal of file reception module send encrypted upgrade image file, so
Afterwards upgrade status mark is revised as upgrading in the first modified module 404, then will be encrypted in deciphering module 406
Upgrade image file is decrypted, then obtains in data obtaining module 408 upgrade information in upgrade image file, according to liter
Level information is upgraded in upgraded module 410, finally identifies the upgrade status upgraded in the second modified module 412
It is revised as upgrading to complete, realizing user's progress once-through operation can complete to upgrade to embedded device, facilitate making for user
With, and embedded device is upgraded using upgrading mode in escalation process, improve the efficiency of upgrading.
In one embodiment, the upgrading object in embedded device update device 400 include embedded device system or
Module in person's embedded device system;Upgrade information file, upgrade file are included in upgrade image file.
In one of the embodiments, embedded device update device 400 further includes:
Detection module, for when be abnormal cause upgrading terminate when, detection upgrade status mark;
Recovery module, is upgrading if being identified as upgrade status, into factory reset state, is recovering
Initial mirror file built in being obtained under factory's setting state, program of dispatching from the factory is reduced according to built-in initial mirror file from read-only mirror image area
And setting, upgrade status is changed afterwards is identified as upgrading completion;
Starting module, for when upgrade status is identified as upgrading completion, then starting embedded device operating system.
In one embodiment, the upgrade image file in embedded device update device 400 includes script file;Rise
Level module 410 includes script execution module, for where the upgrading mode in upgrade information and upgrading object ancient deed
Position carries out in escalation process corresponding upgrading object, and perform script file is with to the corresponding module execution in embedded device
Respective operations.
In one embodiment, the upgrading mode in upgrade information includes deleting ancient deed;Upgraded module 410, including delete
Except module, for calling corresponding file operation interface according to upgrading object ancient deed position, by corresponding upgrading object
Ancient deed deleted.
In one embodiment, the upgrading mode in upgrade information includes newly-increased upgrade file;Upgraded module 410, including
Newly-increased module, for obtaining newly-increased upgrade file from upgrade image file, according to upgrading object ancient deed position tune
With corresponding file operation interface, newly-increased upgrade file is copied into upgrading object ancient deed position.
In one embodiment, it is upgrade file that the upgrading mode in upgrade information, which includes replacing ancient deed,;Upgraded module
410, including replacement module, for obtaining the corresponding upgrade file of upgrading object from upgrade image file, according to upgrading object
Corresponding file operation interface is called in ancient deed position, and the ancient deed of corresponding upgrading object is deleted;Call text
Part operate interface, upgrading object ancient deed position is copied to by upgrade file.
In one embodiment, as shown in Figure 5, there is provided a kind of computer equipment, the computer equipment are applied in Fig. 1
In embedded device 104, including processor, built-in storage, non-volatile memory medium and the network connected by system bus
Interface.Operating system and a kind of embedded device update device are stored with the non-volatile memory medium of the computer equipment
Computer program, the computer program of the embedded device update device are used for realization a kind of embedded device upgrade method.Should
The processor of computer equipment is used to provide calculating and control ability, is configured as performing a kind of embedded device upgrade method.
Built-in storage provides environment for the operation of the computer program in non-volatile memory medium in computer equipment.Computer equipment
Middle network interface carries out data interaction with other hardware, for example, the encrypted upgrade image file of receiving terminal transmission.Ability
Field technique personnel are appreciated that the structure shown in Fig. 5, only with the block diagram of the relevant part-structure of the present invention program, and
The restriction for the computer equipment being applied thereon to the present invention program is not formed, and specific computer equipment can be included than figure
Shown in more or fewer components, either combine some components or arranged with different components.
A kind of computer-readable recording medium, is stored thereon with computer program, which realizes when being executed by processor
The step of following embedded device upgrade method:The encrypted upgrade image file that receiving terminal is sent;The built-in upgrading of modification
Upgrade status in mark text, which is identified as, to be upgraded;Upgrade image file is decrypted according to built-in clear crytpographic key,
Upgrade image file after being decrypted;Upgrade information is obtained from the upgrade image file after decryption, upgrade information includes rising
Level and upgrades mode at object, upgrading object ancient deed position accordingly;Upgrading mode and upgrading in upgrade information
Object ancient deed position upgrades corresponding upgrading object;Upgrade status mark in the built-in upgrading mark text of modification
Know and completed for upgrading.
In one embodiment, upgrading object includes the module in embedded device system or embedded device system;
Upgrade information file, upgrade file are included in upgrade image file.
In one embodiment, embedded device upgrade method further includes step:When be abnormal cause upgrading terminate when,
Detect upgrade status mark;Upgrading if upgrade status is identified as, into factory reset state, recovering to dispatch from the factory to set
Initial mirror file built in being obtained under configuration state, dispatches from the factory from the reduction of read-only mirror image area according to built-in initial mirror file and program and sets
Put, change upgrade status afterwards and be identified as upgrading completion;When upgrade status, which is identified as upgrading, to be completed, then start embedded device
Operating system.
In one embodiment, upgrade image file includes script file;In the upgrading mode in upgrade information
Corresponding upgrading object is carried out in escalation process with upgrading object ancient deed position, perform script file is with to embedded
Corresponding module in equipment performs respective operations.
In one embodiment, the upgrading mode in upgrade information includes deleting ancient deed;Liter in upgrade information
Level mode and upgrading object ancient deed position upgrade corresponding upgrading object, including step:According to upgrading object
Corresponding file operation interface is called in ancient deed position, and the ancient deed of corresponding upgrading object is deleted.
In one embodiment, the upgrading mode in upgrade information includes newly-increased upgrade file;According in upgrade information
Upgrading mode and upgrading object ancient deed position upgrade corresponding upgrading object, including step:From upgrade image
Newly-increased upgrade file is obtained in file, corresponding file operation interface is called according to upgrading object ancient deed position, will
Newly-increased upgrade file copies to upgrading object ancient deed position.
In one embodiment, it is upgrade file that the upgrading mode in upgrade information, which includes replacing ancient deed,;According to upgrading
Upgrading mode and upgrading object ancient deed position in information upgrade corresponding upgrading object, including step:From
The corresponding upgrade file of upgrading object is obtained in upgrade image file, is called according to upgrading object ancient deed position corresponding
File operation interface, the ancient deed of corresponding upgrading object is deleted;File operation interface is called, upgrade file is replicated
To upgrading object ancient deed position.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, it is non-volatile computer-readable that the program can be stored in one
Take in storage medium, in the embodiment of the present invention, which can be stored in the non-volatile memory medium of computer system, and
Performed by least one processor in the computer system, to realize the flow for including the embodiment such as above-mentioned each method.Its
In, the storage medium can be nand flash (NAND-type flash memory), nor flash (NOR type flash memory), eMMC
(Embedded Multi Media Card, embedded multi-media card) or SD card (Secure Digital Memory Card,
Safe digital card) etc..Each technical characteristic of embodiment described above can be combined arbitrarily, not right to make description succinct
The all possible combination of each technical characteristic in above-described embodiment is all described, as long as however, the group of these technical characteristics
Contradiction is not present in conjunction, is all considered to be the scope of this specification record.
Embodiment described above only expresses the several embodiments of the present invention, its description is more specific and detailed, but simultaneously
Cannot therefore it be construed as limiting the scope of the patent.It should be pointed out that come for those of ordinary skill in the art
Say, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention
Scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (10)
- A kind of 1. embedded device upgrade method, it is characterised in that including:The encrypted upgrade image file that receiving terminal is sent;Upgrade status in the built-in upgrading mark text of modification, which is identified as, to be upgraded;The upgrade image file is decrypted according to built-in clear crytpographic key, the upgrade image file after being decrypted;Upgrade information is obtained from the upgrade image file after the decryption, the upgrade information includes upgrading object, upgrading pair As ancient deed position and corresponding upgrading mode;Upgrading mode and upgrading object ancient deed position in the upgrade information carry out corresponding upgrading object Upgrading;The upgrade status changed in the built-in upgrading mark text is identified as upgrading completion.
- 2. according to the method described in claim 1, it is characterized in that, the upgrading object includes embedded device system or embedding Enter the module in formula device systems;Upgrade information file, upgrade file are included in the upgrade image file.
- 3. according to the method described in claim 1, it is characterized in that, the method further includes:When be abnormal cause upgrading terminate when, detection upgrade status mark;Upgrading if the upgrade status is identified as, into factory reset state, in the factory reset shape Initial mirror file built in being obtained under state, dispatch from the factory program and setting are reduced according to built-in initial mirror file from read-only mirror image area, The upgrade status is changed afterwards is identified as upgrading completion;When the upgrade status, which is identified as upgrading, to be completed, then start embedded device operating system.
- 4. according to the method described in claim 1, it is characterized in that, the upgrade image file includes script file;In root Corresponding upgrading object upgraded according to the upgrading mode in the upgrade information and upgrading object ancient deed position Cheng Zhong, performs the script file to perform respective operations to the corresponding module in embedded device.
- 5. according to the method described in claim 1, it is characterized in that, the upgrading mode in the upgrade information includes deleting old text Part;Upgrading mode and upgrading object ancient deed position in upgrade information upgrade corresponding upgrading object, Including:Corresponding file operation interface is called according to upgrading object ancient deed position, by the ancient deed of corresponding upgrading object Deleted.
- 6. according to the method described in claim 1, it is characterized in that, the upgrading mode in the upgrade information includes newly-increased upgrading File;Upgrading mode and upgrading object ancient deed position in upgrade information rise corresponding upgrading object Level, including:Newly-increased upgrade file is obtained from the upgrade image file, is called and corresponded to according to upgrading object ancient deed position File operation interface, the newly-increased upgrade file is copied into the upgrading object ancient deed position.
- 7. according to the method described in claim 1, it is characterized in that, the upgrading mode in the upgrade information includes replacing old text Part is upgrade file;Upgrading mode and upgrading object ancient deed position in upgrade information is to corresponding upgrading object Upgraded, including:The corresponding upgrade file of upgrading object is obtained from the upgrade image file, according to upgrading object ancient deed position Corresponding file operation interface is called, the ancient deed of corresponding upgrading object is deleted;File operation interface is called, the upgrade file is copied into the upgrading object ancient deed position.
- A kind of 8. embedded device update device, it is characterised in that including:File reception module, the encrypted upgrade image file sent for receiving terminal;First modified module, is upgrading for changing the upgrade status in built-in upgrading mark text and being identified as;Deciphering module, for the upgrade image file to be decrypted according to built-in clear crytpographic key, the liter after being decrypted Class mirror-image file;Data obtaining module, for obtaining upgrade information, the upgrade information bag from the upgrade image file after the decryption Include upgrading object, upgrading object ancient deed position and upgrade mode accordingly;Upgraded module, for the upgrading mode in the upgrade information and upgrading object ancient deed position to corresponding Upgrading object is upgraded;Second modified module, upgrading completion is identified as changing the upgrade status in the built-in upgrading mark text.
- 9. a kind of computer equipment, including memory, processor and storage are on a memory and the meter that can run on a processor Calculation machine program, it is characterised in that the processor is realized that any one of claim 1-7 is described and embedded set when performing described program Step in standby upgrade method.
- 10. a kind of computer-readable storage medium, is stored thereon with computer program, it is characterised in that the program is executed by processor Step in any one of the Shi Shixian claims 1-7 embedded device upgrade methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711242989.7A CN107943501A (en) | 2017-11-30 | 2017-11-30 | Embedded device upgrade method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711242989.7A CN107943501A (en) | 2017-11-30 | 2017-11-30 | Embedded device upgrade method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107943501A true CN107943501A (en) | 2018-04-20 |
Family
ID=61947144
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711242989.7A Pending CN107943501A (en) | 2017-11-30 | 2017-11-30 | Embedded device upgrade method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107943501A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109271190A (en) * | 2018-10-15 | 2019-01-25 | 迈普通信技术股份有限公司 | A kind of device updating method and embedded device |
CN110955441A (en) * | 2018-09-27 | 2020-04-03 | 华为技术有限公司 | Algorithm updating method and device |
CN111045709A (en) * | 2019-12-26 | 2020-04-21 | 联想(北京)有限公司 | Firmware upgrading method and firmware upgrading device |
CN111736883A (en) * | 2020-05-11 | 2020-10-02 | 山东浪潮通软信息科技有限公司 | Computer management system hot upgrading method and device based on data delay upgrading |
CN113285927A (en) * | 2021-04-28 | 2021-08-20 | 深圳市联洲国际技术有限公司 | File operation method of embedded network equipment and embedded network equipment |
CN113377408A (en) * | 2021-06-08 | 2021-09-10 | 北京计算机技术及应用研究所 | High-reliability SRAM type FPGA online upgrading method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101655801A (en) * | 2009-09-11 | 2010-02-24 | 华为技术有限公司 | Method and device for upgrading drive software |
US20110167174A1 (en) * | 2005-11-16 | 2011-07-07 | Cisco Technology Inc. | Method and System for In-Band Signaling of Multiple Media Streams |
CN103546576A (en) * | 2013-10-31 | 2014-01-29 | 中安消技术有限公司 | Remote automatic updating method and system of embedded equipment |
CN103942058A (en) * | 2013-01-17 | 2014-07-23 | 深圳市潮流网络技术有限公司 | Embedded electronic equipment software updating method and system |
CN107168818A (en) * | 2017-03-30 | 2017-09-15 | 努比亚技术有限公司 | Terminal and brush machine failure recovery method |
-
2017
- 2017-11-30 CN CN201711242989.7A patent/CN107943501A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110167174A1 (en) * | 2005-11-16 | 2011-07-07 | Cisco Technology Inc. | Method and System for In-Band Signaling of Multiple Media Streams |
CN101655801A (en) * | 2009-09-11 | 2010-02-24 | 华为技术有限公司 | Method and device for upgrading drive software |
CN103942058A (en) * | 2013-01-17 | 2014-07-23 | 深圳市潮流网络技术有限公司 | Embedded electronic equipment software updating method and system |
CN103546576A (en) * | 2013-10-31 | 2014-01-29 | 中安消技术有限公司 | Remote automatic updating method and system of embedded equipment |
CN107168818A (en) * | 2017-03-30 | 2017-09-15 | 努比亚技术有限公司 | Terminal and brush machine failure recovery method |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110955441A (en) * | 2018-09-27 | 2020-04-03 | 华为技术有限公司 | Algorithm updating method and device |
CN110955441B (en) * | 2018-09-27 | 2021-11-26 | 华为技术有限公司 | Algorithm updating method and device |
US11740886B2 (en) | 2018-09-27 | 2023-08-29 | Huawei Technologies Co., Ltd. | Algorithm update method and apparatus |
CN109271190A (en) * | 2018-10-15 | 2019-01-25 | 迈普通信技术股份有限公司 | A kind of device updating method and embedded device |
CN111045709A (en) * | 2019-12-26 | 2020-04-21 | 联想(北京)有限公司 | Firmware upgrading method and firmware upgrading device |
CN111736883A (en) * | 2020-05-11 | 2020-10-02 | 山东浪潮通软信息科技有限公司 | Computer management system hot upgrading method and device based on data delay upgrading |
CN113285927A (en) * | 2021-04-28 | 2021-08-20 | 深圳市联洲国际技术有限公司 | File operation method of embedded network equipment and embedded network equipment |
CN113377408A (en) * | 2021-06-08 | 2021-09-10 | 北京计算机技术及应用研究所 | High-reliability SRAM type FPGA online upgrading method and system |
CN113377408B (en) * | 2021-06-08 | 2023-07-14 | 北京计算机技术及应用研究所 | High-reliability SRAM type FPGA online upgrading method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107943501A (en) | Embedded device upgrade method, device, computer equipment and storage medium | |
CN101641681B (en) | Self-managed processing device | |
US10742694B2 (en) | Method for migrating data and terminal | |
US11662996B2 (en) | System and method for downgrading applications | |
CN102521289B (en) | File synchronization method, device and system | |
WO2008054058A1 (en) | Apparatus and method for updating firmware | |
CN104035842A (en) | Method for deleting and recovering built-in application program | |
CN107480001A (en) | System recovery method and device | |
WO2018233668A1 (en) | Android system-based abnormality recovery method and apparatus, smart device and storage medium | |
CN110162429A (en) | System repair, server and storage medium | |
CN104573497A (en) | Processing method and device for starting items | |
CN111258613B (en) | Firmware upgrading method, device, electronic equipment and storage medium | |
CN105867962A (en) | System upgrading method and device | |
CN113961226B (en) | Software development kit repairing method, terminal, server and equipment | |
CN106776908B (en) | Data cleaning method and device and terminal | |
CN102880478A (en) | Software updating method | |
CN101340675A (en) | Method and apparatus for implementing backup and recovery by mobile terminal | |
CN105786575A (en) | Mobile terminal and data elimination avoiding method thereof during system rewriting | |
KR101085681B1 (en) | System and method for recovering data in mobile terminal | |
CN113032183A (en) | System management method, device, computer equipment and storage medium | |
CN104765631A (en) | Restoration method and device for application program of mobile terminal | |
CN109032762B (en) | Virtual machine backtracking method and related equipment | |
CN104317727B (en) | The processing method of mobile terminal and data partition | |
CN115292740A (en) | Method and device for managing clipboard and nonvolatile storage medium | |
WO2021102849A1 (en) | Resource acquisition method and apparatus, and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180420 |