A kind of method for upgrading software and device
Technical field
The present invention relates to field of computer technology more particularly to a kind of method for upgrading software and device.
Background technique
Currently, terminal device (such as smart television) needs to download all update files when upgrading software, and will update
File, which is all loaded onto terminal device, to be upgraded, and many data can be thus transmitted, and causes software updating efficiency lower, separately
Outside, after repeatedly updating, update every time file all can occupied terminal equipment memory space, it is empty to cause terminal device storage
Between great waste, due to the limited storage space of terminal device, in some instances it may even be possible to cause software upgrading to can not be successfully progress, use
Family experience is poor.
Summary of the invention
The embodiment of the present invention provides a kind of method for upgrading software and device, to solve due to software upgrading in the prior art
The problem of efficiency is lower, wastes memory space.
The embodiment of the present invention provides a kind of method for upgrading software, which comprises
Equipment to be upgraded receives software upgrade package;It include at least one first upgrade file, institute in the software upgrade package
State the first upgrade file include in multiple first data cells and each first data cell the data of at least one byte and other
The data of byte are different;
The equipment to be upgraded determines writing area and the erasing of first upgrade file according to the software upgrade package
Region;
Data in erasing region described in the device erasing to be upgraded, and by each first in first upgrade file
Data cell is written to said write region.
A kind of possible implementation, the equipment to be upgraded determine first upgrading according to the software upgrade package
The erasing region of file, comprising:
The equipment to be upgraded determines the first upgrade file write-in according to the upgrade script in the software upgrade package
The storage region of the equipment to be upgraded;The storage region includes writing area and erasing region;
Data in erasing region described in the device erasing to be upgraded, and by each first in first upgrade file
Data cell is written to said write region, comprising:
Data in storage region described in the device erasing to be upgraded;
After being erased, each first data cell in first upgrade file is written to described for the equipment to be upgraded
Writing area.
A kind of possible implementation, the equipment to be upgraded determine first upgrading according to the software upgrade package
The erasing region of file, comprising:
The equipment to be upgraded determines the first upgrade file write-in according to the upgrade script in the software upgrade package
The storage region of the equipment to be upgraded;
The software upgrade package further includes the address information of the second data cell in each upgrade file;Second data
The data of each byte are identical in unit;
The equipment to be upgraded determines writing area and the erasing of first upgrade file according to the software upgrade package
Region, comprising:
The equipment to be upgraded determines each upgrading text according to the address information of the second data cell in each upgrade file
The corresponding writing area of part and erasing region.
Each first data cell in first upgrade file is written to said write a kind of possible implementation
Region, comprising:
According to the address information of each first data cell in first upgrade file, by institute in said write region
Each first data cell is stated to be written to corresponding region.
The embodiment of the present invention provides a kind of method for upgrading software, which comprises
Updating apparatus obtains initial software upgrade package;The initial software upgrade package includes at least one upgrade file;
For at least one upgrade file, the updating apparatus is if it is determined that there are the first data cells in the upgrade file
With the second data cell, then software upgrade package is generated according to first data cell;Each word in second data cell
The data of section are identical;Its in the data and first data cell of at least one byte storage in first data cell
The data of his byte are different.
The embodiment of the present invention provides a kind of software updating apparatus, and described device includes:
Module is obtained, for receiving software upgrade package;It include at least one first upgrade file in the software upgrade package,
First upgrade file include in multiple first data cells and each first data cell the data of at least one byte and its
The data of his byte are different;
Processing module, for determining writing area and the erasing of first upgrade file according to the software upgrade package
Region;The data in the erasing region are wiped, and each first data cell in first upgrade file is written to institute
State writing area.
A kind of possible implementation, the processing module are specifically used for:
According to the upgrade script in the software upgrade package, determine that the equipment to be upgraded is written in first upgrade file
Storage region;The storage region includes writing area and erasing region;Wipe the data in the storage region;It is wiping
Afterwards, each first data cell in first upgrade file is written to said write region.
A kind of possible implementation, the processing module are specifically used for:
According to the upgrade script in the software upgrade package, determine that the equipment to be upgraded is written in first upgrade file
Storage region;The software upgrade package further includes the address information of the second data cell in each upgrade file;Described second
The data of each byte are identical in data cell;According to the address information of the second data cell in each upgrade file, determine every
The corresponding writing area of a upgrade file and erasing region.
A kind of possible implementation, the processing module are specifically used for:
According to the address information of each first data cell in first upgrade file, by institute in said write region
Each first data cell is stated to be written to corresponding region.
The embodiment of the present invention provides a kind of software updating apparatus, and described device includes:
Module is obtained, for obtaining initial software upgrade package;The initial software upgrade package includes at least one upgrading text
Part;
Processing module, for being directed at least one upgrade file, however, it is determined that there are the first data sheets in the upgrade file
Member and the second data cell then generate software upgrade package according to first data cell;It is each in second data cell
The data of byte are identical;In the data and first data cell of at least one byte storage in first data cell
The data of other bytes are different.
The embodiment of the present invention provides a kind of computer storage medium, is stored with computer executable instructions, the computer
Executable instruction is for executing method either as described in the embodiments of the present invention.
The embodiment of the present invention provides a kind of electronic equipment, comprising:
At least one processor;And
The memory being connect at least one described processor communication;
Wherein, the memory is stored with the instruction that can be executed by least one described processor, and described instruction is described
At least one processor execute so that at least one described processor be able to carry out as described in the embodiments of the present invention either
Method.
A kind of method for upgrading software provided in an embodiment of the present invention, equipment to be upgraded receive software upgrade package;The software
It include at least one first upgrade file in upgrade package, first upgrade file includes multiple first data cells and each the
The data of at least one byte and the data of other bytes are different in one data cell;The equipment to be upgraded is according to the software
Upgrade package determines the writing area and erasing region of first upgrade file;Scratching area described in the device erasing to be upgraded
Data in domain, and each first data cell in first upgrade file is written to said write region.The present invention is real
It applies in example, in the embodiment of the present invention, updating apparatus is when sending upgrade file to equipment to be upgraded, only by data in upgrade file
The first different data cell of byte is sent to equipment to be upgraded in unit, to be upgraded without entire upgrade file to be sent to
Equipment greatly improves software updating efficiency to reduce many unnecessary space holds and reading and writing data.
Detailed description of the invention
Fig. 1 a is the application scenarios schematic diagram of the embodiment of the present invention;
Fig. 1 b is a kind of schematic diagram of software upgrading file provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of method for upgrading software provided in an embodiment of the present invention;
Fig. 3 is to provide the schematic diagram of method for upgrading software in the embodiment of the present invention;
Fig. 4 is to provide the schematic diagram of data cell in the embodiment of the present invention;
Fig. 5 a is to provide the schematic diagram of software upgrade package in the embodiment of the present invention;
Fig. 5 b is to provide the schematic diagram of software upgrading file in the embodiment of the present invention;
Fig. 6 is to provide the schematic diagram of method for upgrading software in the embodiment of the present invention;
Fig. 7 is method for upgrading software flow chart provided in an embodiment of the present invention;
Fig. 8 is method for upgrading software flow chart provided in an embodiment of the present invention;
Fig. 9 is software updating apparatus structural schematic diagram provided in an embodiment of the present invention;
Figure 10 is software updating apparatus structural schematic diagram provided in an embodiment of the present invention;
Figure 11 is software updating apparatus structural schematic diagram provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
The term that this programme is related to:
Caching: Random-Access Memory, random access memory, storage content are lost when power is off, operation
The user program of system and user installation is run on caching.
Memory: Embedded Multi Media Card, built-in multimedia storage card are deposited for storage file etc.
Storing up content power-off can be reserved for.Memory can be the hard disk of PC computer, be used for deposit operation system image, application program and data
Deng.In order to facilitate management, memory is usually divided into multiple subregions, such as boot, kernel, system, userdata subregion
Deng.Memory such as would generally be written and read and be wiped by block at the operation, and common data unit size is 512Byte.Memory is certainly
Band erasing order need to only be arranged initial data unit, terminate data cell, then retransmit erasing order, memory inside
Block in address range can be erased to full 0 or complete 1 according to factory settings by controller.
It as shown in Figure 1a, is the application scenarios schematic diagram of the embodiment of the present invention, the embodiment of the present invention is applied to terminal device
In, taking a smart TV as an example, terminal device includes processor, memory and caching, wherein memory can be next generation Fei Yi
Lose solid-state storage (Non-Violate Memory, NVM) medium, or memory, such as phase transition storage (Phase
Change Memory, PCM), variable resistance type memory (Resistive Random Access Memory, Re caching), magnetic
Property random access memory (Magnetic Random Access Memory, M caching) etc., what the memory of these types was supported
Minimum addressing unit is a byte.
As shown in Fig. 2, processor reads upgrade file from storage equipment in escalation process, storage equipment is stored with soft
Part upgrade package, and according to upgrade package configuration file by upgrade package segmentation read caching in and decompress, preprocessor further according to
Script will solve the data of extrusion in caching, be written in the corresponding subregion of memory.The upgrading meeting of current embedded system will be whole
All write-in one times of a memory, but the time of upgrading can in this way lengthened, and update time can be with memory capacity
It increases and lengthens.
With reference to the accompanying drawings of the specification, the embodiment of the present invention is described in further detail.
In present case, described so that memory is erased to full 0 as an example.As shown in Figure 1 b, current software upgrade package is will to rise
Grade script, upgrade package configuration file and each upgrade file, for example, upgrade file 1 and upgrade file 2 combine by certain format and
At.Upgrade file can be the compressed file of mirror image.
As shown in figure 3, mode of the embodiment of the present invention provides a kind of method for upgrading software, which comprises
Step 301: updating apparatus obtains initial software upgrade package;The initial software upgrade package includes at least one upgrading
File;
Step 302: being directed at least one upgrade file, the updating apparatus is if it is determined that there are first in the upgrade file
Data cell and the second data cell then generate software upgrade package according to first data cell;
Wherein, the data of each byte are identical in second data cell;At least one in first data cell
The data of byte storage are different from the data of other bytes in first data cell.
It should be noted that sending corresponding software to equipment to be upgraded after updating apparatus can receive update request
Upgrade package, equipment to be upgraded carry out software upgrading when receiving software upgrade package.For example, if software upgrade package is newly-increased
The corresponding software upgrade package of hardware revision information, then update device increases subregion newly in memory, in the subregion head of newly-increased subregion
The information such as device name, hardware version numbers, the software version number of adding hardware version information are stored, in the program point of newly-increased subregion
The corresponding software upgrade package of adding hardware version information is stored in area;If software upgrade package is that the software version number updated corresponds to
Software upgrade package, then update device finds the corresponding subregion of hardware revision information in memory, in regeneration block head
Software version number, and update the software upgrade package content in program sectioning.
The utility model has the advantages that
In the embodiment of the present invention, updating apparatus is when sending upgrade file to equipment to be upgraded, only by number in upgrade file
It is sent to equipment to be upgraded according to the first different data cell of byte in unit, without being sent to entire upgrade file wait rise
Grade equipment greatly improves software updating efficiency to reduce many unnecessary space holds and reading and writing data.
In step 301, the address information for the upgrade file that updating apparatus needs to read, the address information can be first
Logical address, virtual address or physical address of upgrade file etc..
For updating apparatus by each upgrade file according to granularity division is set as multiple portions, each part is known as a data
The size of unit, the size namely each data cell that set granularity can be set according to actual needs number in specific implementation
According to the size of unit, for example, can be by each upgrade file according to afterbody cache line (Last Level Cache
Line) granularity is divided, in this way, the size of each data cell is the size of Last Level Cache Line granularity, is
Tens bytes.
For example, the upgrade file that the size of reading is 4KB is divided into five data cells, each data cell is corresponding
Ranges of logical addresses is successively are as follows: and 000000000000~1100110011,1100110011~11001100110,
11001100110~100110011001,100110011001~110011001100,110011001100~
111111111111;If it is determined that the first data cell is the last one data cell of the upgrade file, then it can label first
Data cell is the initial position of the last one data cell, and data length is the length of a data cell.If it is determined that first
Data cell be the upgrade file preceding 2 data cells, then can the first data cell of label initial position be first
The initial position of data cell, data length are the length of 2 data cells.
It in the specific implementation process, can be the first data after judging the first data cell and the second data cell
Unit setting flag;According to the label of setting, the address information of the first data cell and the first data cell is determined.Setting mark
There are many modes of note, for example, data unit number label method can be used, then address above mentioned information mainly includes the first data
The address of the initial position of the affiliated upgrade file of unit and the element number of the first data cell.
Updating apparatus determines the address of data cell according to the information in the upgrade file of software upgrade package, such as virtually
Location, logical address, physical address etc..
In above-mentioned steps, updating apparatus is after being marked any one data cell, to identify the data cell
In byte have a different data, updating apparatus is marked according to the one or more of setting, determines that these labels identify respectively
The first data cell and the first data cell address information.The address information of first data cell of label and the first number
It can store according to the length of unit to configuration file, also can store into upgrade script, it is not limited here.Specifically, if
Tagging can pass through element number label method;In this mode, different data cells has different element numbers;
Specifically, the updating apparatus records the element number of the first data cell;The updating apparatus is according to record
Element number determines the address information of the first data cell and the first data cell, wherein the address information includes the first number
According to the address of the initial position of the affiliated upgrade file of unit and the element number of the first data cell.
As shown in figure 4, including the first data cell 1 and the second data cell 1,2 He of the first data cell in upgrade file 1
Second data cell 2;Determine the element number 1 and data length 1 of the first data cell 1;And determine the list of the first data cell 2
First number 2 and data length 2;Updated first upgrade file can include 1 sum number of element number of the first data cell 1
According to length 1;And determine the element number 2 and data length 2 of the first data cell 2;First data cell 1 and the first data cell
2.Element number 1 can be to indicate with the address locations offset amount of the initial position of upgrade file 1, can also be according to other modes
It is numbered, it is not limited here.
As shown in Fig. 2, may include that upgrade file 1 and upgrade file 2 are such as schemed according to the above method in software upgrade package
Shown in 5a, upgrade file 1 can be converted to the first upgrade file 1, upgrade file 2 is converted to the first upgrade file 2, effectively
Software upgrade package is had compressed, and update time can be saved.
In the specific implementation process, can after determining and completing to the modification of upgrade file, according to the element number of record,
It determines the first data cell in the upgrade file, and will own in the address of the initial position of the upgrade file, the upgrade file
The element number of all first data cells and each first data cell in the number of first data cell, the upgrade file
It is transmitted to equipment to be upgraded after generating software upgrade package, here, the number of the first data cell connects for equipment to be upgraded determination
The length of the software upgrade package of receipts can be identified with 1 byte;As shown in Figure 5 b, it is passed for updating apparatus to equipment to be upgraded
The schematic diagram of defeated the first data cell and the address information based on element number.
As shown in fig. 6, the embodiment of the present invention provides a kind of method for upgrading software, which comprises
Step 601: equipment to be upgraded receives software upgrade package;It include at least one first upgrading in the software upgrade package
File, first upgrade file include the number of at least one byte in multiple first data cells and each first data cell
According to different from the data of other bytes;
Step 602: equipment to be upgraded according to the software upgrade package, determine first upgrade file writing area and
Wipe region;
Step 603: the data in erasing region described in device erasing to be upgraded, and will be each in first upgrade file
First data cell is written to said write region.
In the embodiment of the present invention, after updating apparatus reads the upgrade file in equipment to be upgraded, by the upgrade file of reading
Write-in caching modifies to the data cell of the upgrade file in write-in caching after receiving data modification instruction;Its
In, the upgrade file in each caching includes multiple data cells;Here, updating apparatus presses each upgrade file in caching
According to granularity division is set as multiple portions, each part is known as a data cell.The size of the data cell is N number of word
Section, N are the positive integer more than or equal to 1.After updating apparatus determines the first data cell in upgrade file, each first is determined
The data write request of generation is sent to be upgraded set by the address information of data cell and the first data cell, updating apparatus
Standby, equipment to be upgraded determines the address of the first data cell according to address information, according to determining address, by the first data sheet
In member write-in memory.In the embodiment of the present invention, updating apparatus, only will upgrading text when sending upgrade file to equipment to be upgraded
The first different data cell of byte is sent to equipment to be upgraded in data cell in part, without sending entire upgrade file
To equipment to be upgraded, to reduce many unnecessary space holds and reading and writing data, software upgrading effect is greatly improved
Rate.
It should be noted that before equipment to be upgraded obtains software upgrading file, in all devices information simply by the presence of with
When the facility information that stored facility information does not match that in equipment to be upgraded, illustrate stored equipment in equipment to be upgraded
Corresponding software needs are updated.Facility information does not match that may include: that hardware revision information does not match that or software
Version number does not match that.Hardware revision information mentioned here does not match that, refers to that two hardware revision informations are not exactly the same,
Such as the device name of two hardware is identical, is video camera, but hardware version numbers are different, one is 001, and another
A is 002, then two hardware revision informations do not match that;Or hardware revision information does not match that, can also refer to two hardware
Version information is not completely identical, i.e. device name and hardware version numbers is different from, then two hardware revision informations do not match that.
Software version number does not match that, refers to that two software version numbers are not completely identical, such as a software version number is Version
A, another software version number are Version B, then the two software version numbers do not match that.Upgrading software in updating apparatus
It can store in the memory of updating apparatus.In order to which the difference for guaranteeing to store the equipment to be upgraded of all kinds of models simultaneously is soft
The software upgrade package of part version, the memory of the present embodiment can be the memory of large capacity, and memory includes N number of point altogether
Area, each subregion includes a subregion head and program sectioning, for example, subregion 1 includes the 1st subregion head and the 1st program sectioning, divides
Area 2 includes the 2nd subregion head and the 2nd program sectioning, and the information that can store in subregion head includes: subregion serial number, device name, hard
Part version number, software version number, software upgrade package size and data check and wait new, what is stored in program sectioning is software upgrading
Packet.For software version number is identical and facility information that hardware revision information is different, update device can be directed to the software version
Number formed a list, correspond to multiple hardware revision informations.Wherein, subregion serial number successively adds 1 since 0, and device name is
The start context for the software program that equipment to be upgraded uses, software upgrade package size are the software upgrade packages that equipment to be upgraded uses
The size of occupied space, data detection and the legitimacy for verifying software upgrading bag data.
After equipment determination to be upgraded can upgrade, the first data cell is being received and based on the address information of element number
Afterwards, it according to the address information, determines the address of each first data cell, corresponding address is written into each first data cell
In.
In the specific implementation process, if updating apparatus has read multiple upgrade files, and to each upgrade file therein
It is all modified, in addition to above- mentioned information, a upgrading text can also be added again in the data packet for being sent to equipment to be upgraded
Part number information;If having part upgrade file in the multiple upgrade files read includes the first data cell, another part liter
Grade file does not store the first data cell, then can distinguish the upgrading including the first data cell using different transmission marks
File and do not include the first data cell upgrade file, indicate to include the first data using the first upgrade file separately below
The upgrade file of unit and the second upgrade file indicate the upgrade file including the first data cell;It can be using the first transmission mark
Will (such as 0x00) carrys out mark the second upgrade file, using the second transmission mark (such as 0xFF) come mark the first upgrade file, first
After being followed successively by the number of the second upgrade file, the address of the initial position of each second upgrade file and modification after transmission mark
Upgrade file, the address letter of the number of the first upgrade file, each first upgrade file is followed successively by after the second transmission mark
Breath and the first data cell.
Embodiment one
The equipment to be upgraded determines the erasing region of first upgrade file according to the software upgrade package, comprising:
The equipment to be upgraded determines the first upgrade file write-in according to the upgrade script in the software upgrade package
The storage region of the equipment to be upgraded;The storage region includes writing area and erasing region;
Data in erasing region described in the device erasing to be upgraded, and by each first in first upgrade file
Data cell is written to said write region, comprising:
Data in storage region described in the device erasing to be upgraded;
After being erased, each first data cell in first upgrade file is written to described for the equipment to be upgraded
Writing area.
Each first data cell in first upgrade file is written to said write a kind of possible implementation
Region, comprising:
According to the address information of each first data cell in first upgrade file, by institute in said write region
Each first data cell is stated to be written to corresponding region.
In the specific implementation process, the first data cell of the first upgrade file that equipment to be upgraded determines, being includes the
The upgrade file of one data cell, the address information of the first data cell of label and the length of the first data cell are stored to matching
When setting file, the first data cell needs the address information in the writing area being written to solve before parsing the first upgrade file
It can confirm when analysing configuration file, the address information of the first data cell of label and the length of the first data cell are stored to liter
When in grade script, the first data cell needs the address information in the writing area being written can be when parsing the first upgrade file
Confirmation is it is not limited here.If it is determined that there are the second upgrade files in software upgrade package, then it can be directly according to the second upgrading text
Data cell in part is sequentially written in said write region, does not need to determine that the initial position of each data cell and data are long
Degree, to improve write efficiency.
Embodiment two
The equipment to be upgraded determines the erasing region of first upgrade file according to the software upgrade package, comprising:
The equipment to be upgraded determines the first upgrade file write-in according to the upgrade script in the software upgrade package
The storage region of the equipment to be upgraded;
The software upgrade package further includes the address information of the second data cell in each upgrade file;Second data
The data of each byte are identical in unit;
The equipment to be upgraded determines writing area and the erasing of first upgrade file according to the software upgrade package
Region, comprising:
The equipment to be upgraded determines each upgrading text according to the address information of the second data cell in each upgrade file
The corresponding writing area of part and erasing region.
Each first data cell in first upgrade file is written to said write a kind of possible implementation
Region, comprising:
According to the address information of each first data cell in first upgrade file, by institute in said write region
Each first data cell is stated to be written to corresponding region.
In the specific implementation process, the first upgrade file that equipment to be upgraded determines, may include the first data cell and
The upgrade file of second data cell, the address information and the second data sheet in writing area that the first data cell needs to be written
The address information of member can confirm when parsing the first upgrade file, can also confirm before parsing the first upgrade file,
This is without limitation.If it is determined that there are the second upgrade files in software upgrade package, then it can be directly according in the second upgrade file
Data cell is sequentially written in said write region, does not need to execute erasing and determines the initial position sum number of each data cell
According to the operation of length, to improve write efficiency.
As shown in fig. 7, being erased to full 0 for the method for upgrading software flow chart that the embodiment of the present invention one provides with memory
For describe.
S701: in compilation process, judge whether data are complete zero by data cell;
S702: if data are not complete zero in data cell, the data in the first data cell are recorded in upgrade file
In offset address and data length, and retain the first data cell in data;Otherwise, ignore the number of the second data cell
According to.
S703:, will treated upgrade file boil down to compressed file after having handled all upgrade files.
S704: configuration file, upgrade script and each compressed file are bundled in software upgrade package.
By the above method, the data for extracting the first data cell are in compiling when progress, escalation process without again
It calculates, the time for reading file and decompression in escalation process can be reduced in this way.
Below by the specific embodiment method that the embodiment of the present invention will be further explained carries out software upgrading;
As shown in figure 8, being method for upgrading software flow chart provided in an embodiment of the present invention, comprising:
S801: processor reads software upgrade package from storage equipment;
Wherein, storage equipment can be transmitted to for software upgrade package for updating apparatus by storing the software upgrade package in equipment
's.Storage equipment may be the storage equipment in updating apparatus, and storage equipment may be for storing software upgrade package
Individual equipment, for example, storage equipment can store equipment for USB flash memory etc., it is not limited here.
S802: upgrade package segmentation is read according to software upgrade package configuration file, is unziped in caching by processor.
S803: the specific subregion of memory is first erased to full 0 with the order that memory carries according to script by processor;
The specific subregion is the subregion for needing to be written upgrade file;Or need to be written the firstth area of the subregion of upgrade file
Domain;Or need to be written the first area of the subregion of the first data cell, it is not limited here.
S804: processor will solve the data of extrusion in caching, be written in the specific subregion of memory.
By doing duplicate removal processing to being all 0 (or being all 1) data in upgrade file in compiling, and to treated data
Compression is all the spy of zero (or being all 1) using data after the memory erasing in equipment to be upgraded in software upgrade process
Property, the write-in with erasing data identical data is skipped, to accelerate the speed of software upgrading.By the above method, equipment to be upgraded
The data cell for needing to be written full 0 can be skipped, to save the time.
Based on the same inventive concept, a kind of software liter corresponding with method for upgrading software is additionally provided in the embodiment of the present invention
Stage arrangement, since the principle that the device solves the problems, such as is similar to method for upgrading software of the embodiment of the present invention, the reality of the device
The implementation for the method for may refer to is applied, overlaps will not be repeated.
Based on identical inventive concept, as shown in figure 9, the embodiment of the present invention provides a kind of software updating apparatus, the dress
It sets and includes:
Module 901 is obtained, for receiving software upgrade package;It include at least one first upgrading text in the software upgrade package
Part, first upgrade file include the data of at least one byte in multiple first data cells and each first data cell
It is different from the data of other bytes;
Processing module 902, for determining writing area and the wiping of first upgrade file according to the software upgrade package
Except region;Wipe it is described erasing region in data, and by each first data cell in first upgrade file be written to
Said write region.
A kind of possible implementation, the processing module 902, is specifically used for:
According to the upgrade script in the software upgrade package, determine that the equipment to be upgraded is written in first upgrade file
Storage region;The storage region includes writing area and erasing region;Wipe the data in the storage region;It is wiping
Afterwards, each first data cell in first upgrade file is written to said write region.
A kind of possible implementation, the processing module 902, is specifically used for:
According to the upgrade script in the software upgrade package, determine that the equipment to be upgraded is written in first upgrade file
Storage region;The software upgrade package further includes the address information of the second data cell in each upgrade file;Described second
The data of each byte are identical in data cell;According to the address information of the second data cell in each upgrade file, determine every
The corresponding writing area of a upgrade file and erasing region.
A kind of possible implementation, the processing module 902, is specifically used for:
According to the address information of each first data cell in first upgrade file, by institute in said write region
Each first data cell is stated to be written to corresponding region.
Based on identical inventive concept, as shown in Figure 10, the embodiment of the present invention provides a kind of software updating apparatus, the dress
It sets and includes:
Module 1001 is obtained, for obtaining initial software upgrade package;The initial software upgrade package includes at least one liter
Grade file;
Processing module 1002, for being directed at least one upgrade file, however, it is determined that there are the first numbers in the upgrade file
According to unit and the second data cell, then software upgrade package is generated according to first data cell;In second data cell
The data of each byte are identical;The data of at least one byte storage in first data cell and first data sheet
The data of other bytes are different in member.
It as shown in figure 11, is software updating apparatus structural schematic diagram provided in an embodiment of the present invention, described device, which is located at, deposits
In storage system, the storage system includes described device and storage equipment, which includes:
One or more processors 1110 and memory 1120, in Figure 11 by taking a processor 1110 as an example.
The electronic equipment of software upgrade method can also include: input unit 1130 and output device 1140.
Processor 1110, memory 1120, input unit 1130 and output device 1140 can by bus or other
Mode connects, in Figure 11 for being connected by bus.
Memory 1120 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software journey
Sequence, non-volatile computer executable program and module, such as the corresponding program of method for upgrading software in the embodiment of the present application
Instruction/module/unit.Processor 1110 by operation be stored in memory 1120 non-volatile software program, instruction with
And module/unit realizes above-mentioned side thereby executing the various function application and data processing of server or intelligent terminal
Method embodiment method for upgrading software.
Memory 1120 may include storing program area and storage data area, wherein storing program area can store operation system
Application program required for system, at least one function;Storage data area can be stored to be created according to using for data synchronization unit
Data etc..In addition, memory 1120 may include high-speed random access memory, it can also include nonvolatile memory,
A for example, at least disk memory, flush memory device or other non-volatile solid state memory parts.In some embodiments,
Optional memory 1120 includes the memory remotely located relative to processor 1110, these remote memories can pass through network
It is connected to software updating apparatus.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, moves and lead to
Letter net and combinations thereof.
Input unit 1130 can receive the number or character information of input, and generates and set with the user of software updating apparatus
It sets and the related key signals of function control inputs.Output device 1140 may include that display screen etc. shows equipment.
One or more of modules are stored in the memory 1120, when by one or more of processors
When 1110 execution, the method for upgrading software in above-mentioned any means embodiment is executed.
Method provided by the embodiment of the present application can be performed in the said goods, has the corresponding functional module of execution method and has
Beneficial effect.The not technical detail of detailed description in the present embodiment, reference can be made to method provided by the embodiment of the present application.
The embodiment of the present application provides a kind of computer program product, wherein the computer program product includes storage
Computer program in non-transient computer readable storage medium, the computer program include program instruction, wherein work as institute
When stating program instruction and being computer-executed, the computer is made to execute the software upgrading of any one of the application above method embodiment
Method.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of device (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.