CN103902342B - System update upgrade method and system under a kind of enclosed environment - Google Patents

System update upgrade method and system under a kind of enclosed environment Download PDF

Info

Publication number
CN103902342B
CN103902342B CN201410151514.7A CN201410151514A CN103902342B CN 103902342 B CN103902342 B CN 103902342B CN 201410151514 A CN201410151514 A CN 201410151514A CN 103902342 B CN103902342 B CN 103902342B
Authority
CN
China
Prior art keywords
code
color
data
upgrade
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.)
Expired - Fee Related
Application number
CN201410151514.7A
Other languages
Chinese (zh)
Other versions
CN103902342A (en
Inventor
张吉
奚加荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NANJING RESEARCH INSTITUTE COLLEGE OF ENGINEERING OF PEKING UNIVERSITY
Original Assignee
NANJING RESEARCH INSTITUTE COLLEGE OF ENGINEERING OF PEKING UNIVERSITY
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NANJING RESEARCH INSTITUTE COLLEGE OF ENGINEERING OF PEKING UNIVERSITY filed Critical NANJING RESEARCH INSTITUTE COLLEGE OF ENGINEERING OF PEKING UNIVERSITY
Priority to CN201410151514.7A priority Critical patent/CN103902342B/en
Publication of CN103902342A publication Critical patent/CN103902342A/en
Application granted granted Critical
Publication of CN103902342B publication Critical patent/CN103902342B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to system update upgrade method under enclosed environment, it the described method comprises the following steps, 1)Upgrade file is encoded into binary data stream by software maintenance staff using precoding protocol algorithm, and by color 2 D code coding tools, is generated color 2 D code;2)The color 2 D code of generation is placed on and is presented on carrier before the camera of device to be upgraded;3)Color 2 D code is read in preset renewal upgrade service in device to be upgraded, and is parsed by color 2 D code decoder module, and the binary data parsed is restored into original upgrade file by precoding protocol analysis afterwards;4)Update upgrade service and upgrading is updated to application program or software systems using the upgrade file restored.Colored Quick Response Code medium with device to be upgraded without contacting in this method upgrading renewal process, and escalation process is intelligently reliable, supports data encryption, realizes system update under enclosed environment and upgrades.

Description

System update upgrade method and system under a kind of enclosed environment
Technical field
The present invention relates to a kind of upgrade method, system update upgrade method under enclosed environment is related in particular to, belongs to meter Calculation machine Internet technical field.
Background technology
Software upgrading, refers to software developer when software is write, because designer considers not comprehensive or program Function imperfection, after software publishing, after the modification to program or the new function of addition, the side issued in the form of patch Formula.User updates these patches, i.e. upgrading is completed, and software upgrading is the demand of user and to prevent virus to better meet Invasion;But the upgrading of software at present is carried out under open environment, is generally required by network or serial ports etc. pair External tapping uses USB flash disk, the electronic installation of the solid-state such as SD card, but for some special environment, such as enclosed ring Under border, it is above-mentioned by condition it is all non-existent in the case of, then system is difficult to be upgraded, and those skilled in the art is also carried out Multiple trial, but the technical problem is not solved well, in the prior art system upgrade has some limitations, There is no network or without system upgrade is difficult to realize in the case of other electronic installations, therefore, exigence is a kind of new Technical scheme solves above-mentioned technical problem.
The content of the invention
The present invention exactly upgrades for technical problem present in prior art there is provided system update under a kind of enclosed environment Method, this method, without external device or interface, and supports data encryption in escalation process, escalation process intelligence Reliably.
To achieve these goals, technical scheme is as follows, system update upgrade method under enclosed environment, a kind of System update upgrade method under enclosed environment, it is characterised in that the described method comprises the following steps,
1)Upgrade file is compiled into binary number by research and development of software personnel or attendant using precoding protocol algorithm According to stream, and by color 2 D code coding tools, generated color 2 D code;
2)The color 2 D of generation is piled up and put on Quick Response Code carrier, is presented before the camera of device to be upgraded;
3)Color 2 D code is read in preset renewal upgrade service in device to be upgraded, and passes through color 2 D code decoding mould Block is parsed, and the binary data parsed is restored into original upgrade file by precoding protocol analysis afterwards;
4)Update upgrade service and upgrading is updated to application program or software systems using the upgrade file restored.
As a further improvement on the present invention, the step 1)The middle color 2 D code for making upgrade file, concrete operations It is as follows, 11)By upgrade file use GZip compression algorithms, generate compressed package data file C1, and fill in AKU version, when Between, Back ground Information K, whether need the information such as reset routine;12)MD5 calculating is carried out to compressed package files C1, generation MD5 is examined Code;
13)By the information capacity upper limit M of color 2 D code coded system, the data that compressed file C1 needs to cut into are calculated Block sum P;Such as the color 2 D code information capacity upper limit is 10MB, and compressed file C1 is 100MB, then needs to cut into 10 data Block is handled respectively.
14)Using M as stepping, C1 files are read, binary data blocks D1 is obtained, and D1 data blocks are numbered, are numbered For N, wherein N is the independent increment since 1;
15)Judge whether to need encryption, if there is provided need encryption, needing that D1 data blocks are encrypted, after encryption Data block be D2;
16)Encoded by precoding algorithms agreement, by data block numbering N, data block total number P, AKU version, when Between, Back ground Information K, MD5 check code, data encryption mark, if need to restart mark and be packaged into information header, it is non-encrypted at present Using D1 data blocks as imformosome, use D2 data blocks as imformosome in encryption, information header and imformosome are constituted Data block step-by-step carries out XOR calculating and obtains check code, by information header, imformosome, check code sequential concatenation, and after splicing Data block before and after add flag, obtain binary data blocks D3, that is, complete the coding carried out by precoding algorithms agreement;
17)D3 is submitted into color 2 D code encryption algorithm module, generation color 2 D code picture, and exports and preserves;
18)The processing to compressed file C1 total datas is completed by above step, color 2 D code Making programme is completed, should During, generate 1 or multiple color 2 Ds code.
As a further improvement on the present invention, the step 3)The middle flow concrete operations for reading color 2 D code are as follows, 31)Read, into reading after flow, upgrading more new demand servicing first empties the All Files in particular category SF;Camera reads color Color Quick Response Code, and the picture of reading is decoded by color 2 D code decoder module, if can not enter in this process The code decoding of row color 2 D, then reuse camera and read color 2 D code;If can normally decode, by color 2 D Obtained binary data is stored in catalogue SF after code decoding, entitled Tn, wherein n since 1 ing from increasing, if also need to after Continuous input Quick Response Code, then repeat this step, if it is not required, then into next step operation, that is, reducing flow.
As a further improvement on the present invention, the step 3)Middle reduction flow concrete operations are as follows,
The step 3)Middle reduction flow concrete operations are as follows, and 32)Reduction, into after reduction flow, first from catalogue SF Temporary file Tn is successively read, is read after file data, flag and check bit end to end are removed according to precoding agreement, to residue Data step-by-step carries out exclusive or check, calculates check code, judge to calculate the check code generated and original check bit whether one Cause, if it is inconsistent, exiting;Tn file data is parsed according to precoding agreement, number is parsed from information header According to block number N, data block total number P, AKU version, the time, Back ground Information K, MD5 check code M1, data encryption mark, whether Need to restart mark, data block D1 is parsed from imformosome;According to whether encryption identification, judges whether to need to solve D1 It is close, if need not decrypt, data block D1 is directly placed sequentially in queue L by data block numbering N ascending orders, solved if necessary It is close, data block D2 is obtained after D1 is decrypted, D2 is placed sequentially in queue L by data block numbering N ascending orders;Repeat the step of the above Suddenly, until all temporary files all have been processed;According to the data block in data block total number P and queue L, number is determined whether According to the situation of lost block, if so, then exiting;Data block in queue L is spliced successively by data block numbering N ascending orders, obtained Binary data file DF;MD5 calculating is carried out to DF, MD5 check code M2 is obtained, judges whether M1 is consistent with M2, if differed Cause is then exited;DF is decompressed by GZip algorithms, initial upgrade file is obtained, upgrading flow is subsequently entered.
As a further improvement on the present invention, the step 3)Middle upgrading flow concrete operations are as follows, and 33)Upgrading, updates Upgrade service judges the version number of local last time upgrading and the tandem of upgraded version number, if upgraded version mistake It is old, then upgrading is terminated,
Update upgrade service and send upgrade notification instruction to application program, application program is received after instruction, inspection is currently It is no to be upgraded, and notify to update upgrade service, update upgrade service and judge whether to enter next step according to notice result Suddenly;
If application program can upgrade, update upgrade service and send the path of upgrade file and whether need to restart Information, application program receives rear loading upgrading file and more new procedures and data, and constantly sends renewal to upgrade service is updated Progress, and shown by renewal upgrade service,
After application program completes loading upgrading file, upgrading acknowledgement notification mark is created, if application need not be restarted Program, then according to upgrading acknowledgement notification mark, directly to the confirmation message that upgrade service transmission upgrading is completed is updated, if desired Restart, then according to upgrading acknowledgement notification mark after having restarted, then the confirmation message completed of upgrading to renewal upgrade service transmission, Update upgrade service and preserve version number of the new version number for last time upgrading, and notify upgrading to complete, while deleting SF mesh All Files in record.
As a further improvement on the present invention, color 2 D code carrier be mobile phone or the paper printed or other On the carrier for carrying color 2 D code.
As a further improvement on the present invention, the system turns color 2 D code system including upgrade file and upgrading updates Service system, the upgrade file, which turns color 2 D code system, includes GZip compression modules, MD5 correction verification modules, encrypting and decrypting mould Block, data processing and precoding module, color 2 D code coding module and document processing module, the upgrading update service system Including GZip decompression modules, MD5 correction verification modules, Encryption Decryption module, data processing and precoding module, color 2 D code decoding Module, document processing module and renewal service module;
The GZip compression modules and GZip decompression modules are compressed and decompressed by GZip algorithms to data block respectively;
The MD5 correction verification modules are calculated by MD5 algorithms data block, generate MD5 check codes;
Data block is encrypted and decrypted the Encryption Decryption module by irreversible cryptographic algorithm;
Each data file that the data processing and precoding module are used in processing system is queued up, according to precoding agreement Carry out data encoding and decoding;The color 2 D code coding module is by certain color 2 D code encoding and decoding algorithm, to binary number According to color 2 D code coding is carried out, the color 2 D code decoder module is by certain color 2 D code encoding and decoding algorithm to picture Data carry out color 2 D code decoding;The document processing module is handled picture and the read-write operation of data file, including is read Take picture file, generation picture file, read data file, generate data file;The renewal service module, by restoring Upgrade file upgrading is updated to application program or software systems;The upgrade file turns in color 2 D code system, rises Level file submits to MD5 correction verification modules and calculates generation MD5 codes after being compressed by GZip compression modules, as previously described flow, such as When fruit needs encryption, data block is encrypted by Encryption Decryption module, the data after encryption are transferred to data processing and prelisted Code module is encoded by precoding agreement, and the data after coding transfer to color 2 D code coding module to be encoded, and generation is color Color two-dimension code image data, image data ultimately generates color 2 D code by document processing module;The upgrading more new demand servicing In system, color 2 D code picture is read by document processing module and obtains image data;Data transfer to color 2 D code coding Module is decoded, and decoded data transfers to data processing and precoding module to be decoded by precoding agreement, according to whether The condition identity of encryption, data block is decrypted by Encryption Decryption module, and the data after decryption submit to MD5 correction verification modules Generation MD5 codes are calculated, and carry out MD5 comparison, after being identified through decompression of the data of MD5 comparisons by GZip decompression modules, Final upgrade file is restored, upgrade file is submitted into renewal service module carries out system upgrade.
As a further improvement on the present invention, the precoding agreement of upgrade file is specific as follows,
(1)Complete information data
Flag Information header Imformosome Check bit Flag
(2)Information header
Data block is numbered Order is from sequence of blocks of data number is increased, since 1
Data block number Total data block number
AKU version The version number of upgrade file
Time Upgrade file creation time
MD5 check codes Upgrade file MD5 check codes
Back ground Information Such as founder
Whether restart Restarting whether is needed after the completion of mark upgrading
Data encryption mode Identify whether encryption, and cipher mode
Information body length The length of identification information volume data block
(3)Check bit
Information header Imformosome
Above two parts are carried out with step-by-step XOR successively, an exclusive or check code is ultimately produced.
Relative to prior art, beneficial effects of the present invention are as follows:1)Quick Response Code medium in this method upgrading renewal process Without being contacted with device to be upgraded, device to be upgraded is without there is external interface, and the mounting medium of color 2 D code enriches, Can be mobile phone, paper material etc., and electronics shelves transmission is convenient;2)Escalation process is intelligently reliable, supports data encryption;3)Branch The combination of multiple Quick Response Codes is held, the renewal of Large Copacity program file can be supported;4)This method is truly realized under enclosed environment System upgrade, extends the application space of software upgrading significantly, and application is more extensive, for some particular surroundings there is provided More stable, more intelligent software update service.
Brief description of the drawings
Fig. 1:The overall escalation process schematic diagram of the present invention;
Fig. 2:Entirety upgrade method flow chart of the invention;
Fig. 3:Make the color 2 D code stream journey of upgrade file;
Fig. 4:Upgrading, which is carried out, using color 2 D code stream journey updates reading process flow chart;
Fig. 5:Upgrading, which is carried out, using color 2 D code stream journey updates reduction process flow chart;
Fig. 6:Upgrading, which is carried out, using color 2 D code stream journey updates escalation process flow chart;
Fig. 7:Upgrade file turns color 2 D code system module diagram;
Fig. 8:Upgrading updates service system system module schematic diagram.
Embodiment
In order to deepen the understanding of the present invention and understanding, the present invention is made with reference to the accompanying drawings and detailed description into The explanation of one step and introduction.
Embodiment 1:
Referring to Fig. 1, a kind of system update upgrade method under enclosed environment, the technical scheme turns colour two by upgrade file Code system is tieed up, upgrade file is converted into color 2 D code, using the camera scanning colour Quick Response Code in device to be upgraded, is led to Cross upgrading renewal service system and be reduced into upgrade file, and complete final upgrading and update.
Referring to Fig. 2, Fig. 2 is overall upgrade method flow chart;System update upgrade method under a kind of enclosed environment, the side Method comprises the following steps,
1)Upgrade file is compiled into binary number by research and development of software personnel or attendant using precoding protocol algorithm According to stream, and by color 2 D code coding tools, generated color 2 D code;
2)The color 2 D of generation is piled up and put on Quick Response Code carrier, is presented before the camera of device to be upgraded; The color 2 D code carrier is on the carrier of mobile phone or the paper printed or other carrying color 2 D codes;
3)Color 2 D code is read in preset renewal upgrade service in device to be upgraded, and passes through color 2 D code decoding mould Block is parsed, and the binary data parsed is restored into original upgrade file by precoding protocol analysis afterwards;
4)Update Service Notification application program or software systems reload upgrade file, complete upgrading.
Referring to Fig. 3, as a further improvement on the present invention, the step 1)The middle color 2 D code for making upgrade file, Concrete operations are as follows, and 11)Upgrade file is used after GZip compression algorithms, compressed package data file C1 is generated, and fill in upgrading Version, time, whether need reset routine and Back ground Information K;12)MD5 verifications, generation MD5 inspections are carried out to compressed package files C1 Test code;
13)By the information capacity upper limit M of color 2 D code coded system, the data that compressed file C1 needs to cut into are calculated Block sum P;Such as the color 2 D code information capacity upper limit is 10MB, and compressed file C1 is 100MB, then needs to cut into 10 data Block is handled respectively;
14)Using M as stepping, C1 files are read, binary data blocks D1 is obtained, and D1 data blocks are numbered, are numbered For N, wherein N is the independent increment since 1;
15)Judge whether to need encryption, if there is provided need encryption, needing that D1 data blocks are encrypted, after encryption Data block be D2;
16)Encoded by precoding algorithms agreement, by data block numbering N, data block total number P, AKU version, when Between, Back ground Information K, MD5 check code, data encryption mark, if need to restart mark and be packaged into information header, it is non-encrypted at present Using D1 data blocks as imformosome, use D2 data blocks as imformosome in encryption, information header and imformosome are constituted Data block step-by-step carries out XOR calculating and obtains check code, by information header, imformosome, check code sequential concatenation, and after splicing Data block before and after add flag, obtain binary data blocks D3, that is, complete the coding carried out by precoding algorithms agreement;
17)D3 is submitted into color 2 D code encryption algorithm module, generation color 2 D code picture, and exports and preserves;
18)The processing to compressed file C1 total datas is completed by above step, color 2 D code Making programme is completed, should During, generate 1 or multiple color 2 Ds code.
Referring to Fig. 4, as a further improvement on the present invention, the step 3)The middle flow for reading color 2 D code is specifically grasped Make as follows, 31)Read, into reading after flow, upgrading more new demand servicing first empties the All Files in particular category SF;Camera Color 2 D code is read, and the picture of reading is decoded by color 2 D code decoder module, if in this process Color 2 D code decoding can not be carried out, then reuses camera and reads color 2 D code;If can normally decode, by coloured silk The binary data obtained after the decoding of color Quick Response Code is stored in catalogue SF, and entitled Tn, wherein n increase certainly since 1, if also Need to continue to input Quick Response Code, then repeat this step, if it is not required, then into next step operation, that is, reducing flow.
Referring to Fig. 5, as a further improvement on the present invention, the step 3)Middle reduction flow concrete operations are as follows, and 32)Also Original, into after reduction flow, is first successively read temporary file Tn from catalogue SF, reads after file data, assisted according to precoding View removes flag and check bit end to end, and exclusive or check is carried out to remaining data step-by-step, calculates check code, judges to calculate life Into check code it is whether consistent with original check bit, if it is inconsistent, exiting;
Tn file data is parsed according to precoding agreement, data block numbering N, data are parsed from information header Whether block sum P, AKU version, time, Back ground Information K, MD5 check code M1, data encryption identify, need to restart mark, Data block D1 is parsed from imformosome;
According to whether encryption identification, judges whether to need that D1 is decrypted, it is if need not decrypt, data block D1 is straight Connect and be placed sequentially in by data block numbering N ascending orders in queue L, decrypt if necessary, data block D2 is obtained after D1 is decrypted, by D2 It is placed sequentially in by data block numbering N ascending orders in queue L;
The step of repeating the above, until all temporary files all have been processed;
According to the data block in data block total number P and queue L, the situation of dropout of data block is determined whether, if so, then Exit;
Data block in queue L is spliced successively by data block numbering N ascending orders, binary data file DF is obtained;
MD5 calculating is carried out to DF, MD5 check code M2 is obtained, judges whether M1 is consistent with M2, is exited if inconsistent;
DF is decompressed by GZip algorithms, initial upgrade file is obtained, upgrading flow is subsequently entered.
Referring to Fig. 6, as a further improvement on the present invention, the step 3)Middle upgrading flow concrete operations are as follows, and 33)Rise Level, updates upgrade service and judges the version number of local last time upgrading and the tandem of upgraded version number, if upgrade version This number is excessively old, then terminates upgrading,
Update upgrade service and send upgrade notification instruction to application program, application program is received after instruction, inspection is currently It is no to be upgraded, and notify to update upgrade service, update upgrade service and judge whether to enter next ring according to notice result Step;
If application program can upgrade, update upgrade service and send the path of upgrade file and whether need to restart Information, application program receives rear loading upgrading file and more new procedures and data, and constantly sends renewal to upgrade service is updated Progress, and shown by renewal upgrade service,
After application program completes loading upgrading file, upgrading acknowledgement notification mark is created, restarts apply journey if desired Sequence, then restarted, and according to upgrading acknowledgement notification mark, the confirmation message that upgrading is completed is sent to upgrade service is updated, if Need to restart, then retransmited after having restarted, update upgrade service and preserve version number of the new version number for last time upgrading, and And notify upgrading to complete, while deleting the All Files in SF catalogues.
The step 1)In, the precoding agreement of upgrade file is specific as follows,
(1)Complete information data
Flag Information header Imformosome Check bit Flag
(2)Information header
Data block is numbered Order is from sequence of blocks of data number is increased, since 1
Data block number Total data block number
AKU version The version number of upgrade file
Time Upgrade file creation time
MD5 check codes Upgrade file MD5 check codes
Back ground Information Such as founder
Whether restart Restarting whether is needed after the completion of mark upgrading
Data encryption mode Identify whether encryption, and cipher mode
Information body length The length of identification information volume data block
(3)Check bit
Information header Imformosome
Above two parts are carried out with step-by-step XOR successively, an exclusive or check code is ultimately produced.
Embodiment 2:
Referring to Fig. 7, Fig. 8, a kind of system update upgrade-system under enclosed environment, the system includes upgrade file and turns colour 2 D code system and upgrading update service system, and the upgrade file, which turns color 2 D code system, includes GZip compression modules, MD5 Correction verification module, Encryption Decryption module, data processing and precoding module, color 2 D code coding module and document processing module, The upgrading, which updates service system, includes GZip decompression modules, MD5 correction verification modules, Encryption Decryption module, data processing and prelists Code module, color 2 D code decoder module, document processing module and renewal service module;GZip compression modules and the GZip solution Die block is compressed and decompressed by GZip algorithms to data block respectively;The MD5 correction verification modules are entered to data block by MD5 algorithms Row is calculated, and generates MD5 check codes;Data block is encrypted and decrypted the Encryption Decryption module by irreversible cryptographic algorithm;Institute State data processing and precoding module:Each data file in processing system queues up, data volume solution is carried out according to precoding agreement Code;
The color 2 D code coding module is carried out color by certain color 2 D code encoding and decoding algorithm to binary data Color Quick Response Code is encoded, and the color 2 D code decoder module is carried out by certain color 2 D code encoding and decoding algorithm to image data Color 2 D code decoding, the document processing module is handled picture and the read-write operation of data file, including reads picture text Part, generation picture file, reading data file, generate data file;The renewal service module, passes through the upgrading text restored Part is updated upgrading to application system.
Referring to Fig. 7, the upgrade file turns in color 2 D code system, after upgrade file is compressed by GZip compression modules Submit to MD5 correction verification modules and calculate generation MD5 codes, flow, during if necessary to encrypt, passes through Encryption Decryption module as previously described Data block is encrypted, the data after encryption transfer to data processing and precoding module to be encoded by precoding agreement, compiled Data after code transfer to color 2 D code coding module to be encoded, and generation color 2 D code image data, image data passes through Document processing module ultimately generates color 2 D code;
Referring to Fig. 8, the upgrading is updated in service system, and reading color 2 D code picture by document processing module obtains Image data;Data transfer to color 2 D code coding module to be decoded, and decoded data transfers to data processing and precoding mould Block is decoded by precoding agreement, according to whether the condition identity of encryption, is solved by Encryption Decryption module to data block Close, the data after decryption submit to MD5 correction verification modules and calculate generation MD5 codes, and carry out MD5 comparison, are identified through MD5 comparisons Decompression of the data by GZip decompression modules after, restore final upgrade file, upgrade file submitted into more new demand servicing Module carries out system upgrade.
It should be noted that above-described embodiment is only presently preferred embodiments of the present invention, not for limiting the present invention's Protection domain, on the basis of the above made equivalent substitution or replacement belong to protection scope of the present invention, it is of the invention Protection domain is defined by claims.

Claims (2)

1. system update upgrade method under a kind of enclosed environment, it is characterised in that the described method comprises the following steps, 1)Software Upgrade file is compiled into binary data stream by research staff or attendant using precoding protocol algorithm, and passes through colour Quick Response Code coding tools, is generated color 2 D code; 2)The color 2 D of generation is piled up and put on Quick Response Code carrier, by it Before the camera for being presented on device to be upgraded; 3)Color 2 D code is read in preset renewal upgrade service in device to be upgraded, and Parsed by color 2 D code decoder module, the binary data parsed is restored into original by precoding protocol analysis afterwards Beginning upgrade file; 4)Upgrade service is updated to be updated application program or software systems using the upgrade file restored Upgrading, the step 1)The middle color 2 D code for making upgrade file, concrete operations are as follows, and 11)Upgrade file is used into GZip Compression algorithm, generates compressed package data file C1, and fill in AKU version, time, Back ground Information K and whether need to restart journey Sequence is identified; 12)MD5 calculating is carried out to compressed package files C1, MD5 check codes are generated; 13)By color 2 D code coded system Information capacity upper limit M, calculates the data block total number P that compressed file C1 needs to cut into;14)Using M as stepping, C1 files are read, Binary data blocks D1 is obtained, and D1 data blocks are numbered, numbering is N, and wherein N is the independent increment since 1; 15)Sentence It is disconnected whether to need encryption, if there is provided need encryption, needing that D1 data blocks are encrypted, the data block after encryption is D2; 16)Encoded by precoding algorithms agreement, data block numbering N, data block total number P, AKU version, time, basis are believed Cease K, MD5 check code, data encryption mark, if need to restart mark and be packaged into information header, use D1 data when non-encrypted Block uses D2 data blocks in encryption as imformosome, the data block step-by-step that information header and imformosome are constituted as imformosome Carry out XOR calculating and obtain check code, by information header, imformosome, check code sequential concatenation, and before spliced data block Flag is added afterwards, binary data blocks D3 is obtained, that is, completes the coding carried out by precoding algorithms agreement;17)D3 is submitted Color 2 D code encryption algorithm module, generation color 2 D code picture are given, and exports and preserves;
18)The processing to compressed file C1 total datas is completed by above step, color 2 D code Making programme, the flow is completed During, generate 1 or multiple color 2 Ds code;The step 3)The middle flow concrete operations for reading color 2 D code are such as Under, 31)Read, into reading after flow, upgrading more new demand servicing first empties the All Files in particular category SF;Camera is read Color 2 D code, and the picture of reading is decoded by color 2 D code decoder module, if in this process can not Color 2 D code decoding is carried out, then reuses camera and reads color 2 D code;If can normally decode, by colour two The binary data obtained after dimension code decoding is stored in catalogue SF, and entitled Tn, wherein n increase certainly since 1, if also needed to Continue to input Quick Response Code, then repeat this step, if it is not required, then into next step operation, that is, reducing flow, the step 3) Middle reduction flow concrete operations are as follows, and 32)Reduction, into after reduction flow, is first successively read temporary file Tn from catalogue SF, Read after file data, flag and check bit end to end are removed according to precoding agreement, XOR meter is carried out to remaining data step-by-step Calculate, calculate check code, judge whether the check code for calculating generation is consistent with original check bit, if it is inconsistent, moving back Go out;Tn file data is parsed according to precoding agreement, data block numbering N, data block are parsed from information header total Whether number P, AKU version, time, Back ground Information K, MD5 check code M1, data encryption identify, need to restart mark, from letter Data block D1 is parsed in breath body;According to whether encryption identification, judges whether to need that D1 is decrypted, if need not solve It is close, data block D1 is directly placed sequentially in queue L by data block numbering N ascending orders, decrypted if necessary, after D1 is decrypted To data block D2, D2 is placed sequentially in queue L by data block numbering N ascending orders;The step of repeating the above, until all Temporary file all has been processed;According to the data block in data block total number P and queue L, the feelings of dropout of data block are determined whether Condition, if so, then exiting;Data block in queue L is spliced successively by data block numbering N ascending orders, binary data text is obtained Part DF;MD5 calculating is carried out to DF, MD5 check code M2 is obtained, judges whether M1 is consistent with M2, is exited if inconsistent;To DF Decompressed by GZip algorithms, obtain initial upgrade file, subsequently enter upgrading flow, the step 3)Middle upgrading flow tool Gymnastics makees as follows, and 33)Upgrading, update upgrade service judge local last time upgrading version number and upgraded version number it is front and rear Sequentially, if upgraded version number is excessively old, upgrading is terminated, upgrade service is updated and sends upgrade notification instruction to application program, should Received with program after instruction, inspection whether can currently be upgraded, and notify update upgrade service, renewal upgrade service according to Result is notified to judge whether to enter next step;If application program can upgrade, update upgrade service and send upgrade file Path and whether needing the information such as restart, application program receives rear loading upgrading file and more new procedures and data, and to more New upgrade service constantly sends renewal progress, and is shown by renewal upgrade service, when application program completes loading upgrading text After part, upgrading acknowledgement notification mark is created, if not needing re-launching applications, is identified according to upgrading acknowledgement notification, directly The confirmation message that upgrading is completed is sent to upgrade service is updated, restarts if desired, then confirms after having restarted further according to upgrading Mark is notified, the confirmation message that upgrading is completed is sent to upgrade service is updated, it is last to update upgrade service to preserve new version number The version number once upgraded, and notify upgrading to complete, while deleting the All Files in SF catalogues, the color 2 D code is carried Body is on the carrier of mobile phone or the paper printed or other carrying color 2 D codes.
2. a kind of a kind of system update upgrade-system under enclosed environment, it is characterised in that closed-loop described in usage right requirement 1 System update upgrade-system turns color 2 D code system including upgrade file under system update upgrade method under border, the enclosed environment System and upgrading update service system, and the upgrade file, which turns color 2 D code system, includes GZip compression modules, MD5 calibration modes Block, Encryption Decryption module, data processing and precoding module, color 2 D code coding module and document processing module, the liter Level update service system include GZip decompression modules, MD5 correction verification modules, Encryption Decryption module, data processing and precoding module, Color 2 D code decoder module, document processing module and renewal service module;The GZip compression modules and GZip decompression modules Data block is compressed and decompressed by GZip algorithms respectively;The MD5 correction verification modules are to data block based on the progress of MD5 algorithms Calculate, generate MD5 check codes;Data block is encrypted and decrypted the Encryption Decryption module by irreversible cryptographic algorithm;The number Each data file being used for according to processing and precoding module in processing system is queued up, solved according to precoding agreement progress data volume Code;The color 2 D code coding module carries out colour two by certain color 2 D code encoding and decoding algorithm to binary data Code coding is tieed up, the color 2 D code decoder module is carried out colored by certain color 2 D code encoding and decoding algorithm to image data Quick Response Code is decoded;The document processing module is handled picture and the read-write operation of data file, including reads picture file, life Into picture file, data file is read, data file is generated;The renewal service module, passes through the upgrade file pair restored Application program or software systems are updated upgrading;The upgrade file turns in color 2 D code system, and upgrade file passes through MD5 correction verification modules are submitted to after the compression of GZip compression modules and calculate generation MD5 codes, by flow described in claim 1, if needed When encrypting, data block is encrypted by Encryption Decryption module, the data after encryption transfer to data processing and precoding mould Block is encoded by precoding agreement, and the data after coding transfer to color 2 D code coding module to be encoded, generation colour two Code image data is tieed up, image data ultimately generates color 2 D code by document processing module;The upgrading updates service system In, color 2 D code picture is read by document processing module and obtains image data;Data transfer to color 2 D code coding module Decoded, decoded data transfers to data processing and precoding module to be decoded by precoding agreement, according to whether encryption Condition identity, data block is decrypted by Encryption Decryption module, the data after decryption submit to MD5 correction verification modules calculating MD5 codes are generated, and carry out the comparison of MD5 uniformity, decompression of the data of MD5 comparisons Jing Guo GZip decompression modules is identified through Afterwards, final upgrade file is restored, upgrade file is submitted into renewal service module carries out system upgrade.
CN201410151514.7A 2014-04-16 2014-04-16 System update upgrade method and system under a kind of enclosed environment Expired - Fee Related CN103902342B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410151514.7A CN103902342B (en) 2014-04-16 2014-04-16 System update upgrade method and system under a kind of enclosed environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410151514.7A CN103902342B (en) 2014-04-16 2014-04-16 System update upgrade method and system under a kind of enclosed environment

Publications (2)

Publication Number Publication Date
CN103902342A CN103902342A (en) 2014-07-02
CN103902342B true CN103902342B (en) 2017-10-17

Family

ID=50993681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410151514.7A Expired - Fee Related CN103902342B (en) 2014-04-16 2014-04-16 System update upgrade method and system under a kind of enclosed environment

Country Status (1)

Country Link
CN (1) CN103902342B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072398B (en) * 2015-08-06 2018-07-13 浙江宇视科技有限公司 A kind of device updating method and device
CN105808465B (en) * 2016-03-04 2018-12-07 浙江大华技术股份有限公司 A kind of upgrade method and device of picture pick-up device
CN107247607A (en) * 2017-05-26 2017-10-13 河南职业技术学院 Computer based method for updating system and system updating device
CN109218412A (en) * 2018-08-27 2019-01-15 河南辉煌科技股份有限公司 Remote upgrade method and system for STP system
CN109408085A (en) * 2018-09-27 2019-03-01 上海和数软件有限公司 Upgrade method, device, system and the storage medium of hardware wallet
CN109358875B (en) * 2018-09-27 2022-02-11 上海和数软件有限公司 Ubuntu system-based hardware wallet offline upgrading device and method
CN109670222B (en) * 2018-12-07 2023-05-09 广联达科技股份有限公司 Model or drawing online difference comparison method, device and system
CN111131833B (en) * 2019-12-27 2022-04-19 宁波深寻信息科技有限公司 Narrow-band communication transmission method based on color graph coding and compression algorithm
CN111368345A (en) * 2020-03-09 2020-07-03 浙江众邦机电科技有限公司 Method, device, equipment and computer readable storage medium for decrypting encrypted program
CN111897563A (en) * 2020-08-11 2020-11-06 深圳牛图科技有限公司 Method for updating code scanning of two-dimensional code scanning module
CN112506554A (en) * 2020-11-10 2021-03-16 深圳市广和通无线股份有限公司 Internet of things module upgrading method and device, computer equipment and storage medium
CN114268454B (en) * 2021-11-18 2023-12-22 南京国电南自维美德自动化有限公司 Data ferrying method for physical isolation environment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202795416U (en) * 2012-08-23 2013-03-13 晏华艳 False-proof identification system based on two-dimensional bar code
CN103246540A (en) * 2013-05-23 2013-08-14 福建伊时代信息科技股份有限公司 Update method and update device of application program
CN103530146A (en) * 2013-09-16 2014-01-22 成都交大光芒科技股份有限公司 Low-power-consumption embedded device remote wireless updating method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060077184A1 (en) * 2004-03-17 2006-04-13 James Marggraff Methods and devices for retrieving and using information stored as a pattern on a surface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202795416U (en) * 2012-08-23 2013-03-13 晏华艳 False-proof identification system based on two-dimensional bar code
CN103246540A (en) * 2013-05-23 2013-08-14 福建伊时代信息科技股份有限公司 Update method and update device of application program
CN103530146A (en) * 2013-09-16 2014-01-22 成都交大光芒科技股份有限公司 Low-power-consumption embedded device remote wireless updating method

Also Published As

Publication number Publication date
CN103902342A (en) 2014-07-02

Similar Documents

Publication Publication Date Title
CN103902342B (en) System update upgrade method and system under a kind of enclosed environment
CN102804160B (en) For the method that operates data and storage component part
CN109688289B (en) Image encryption transmission method, image decryption method and device
CN108055585A (en) Data processing method, set top box upgrading method, terminal and set-top box
CN114124502B (en) Message transmission method, device, equipment and medium
CN105631361A (en) Application program channel source identification method and device
US20140215220A1 (en) Application distribution system and method
CN106529643B (en) A kind of two dimensional code coding and decoding generating device and method
US9231927B2 (en) Information processing apparatus, data generation method, information processing method, and information processing system for updating and verifying software programs
CN102779048A (en) Method and device for operating hypertext markup language5 (HTML5) application program at mobile terminal
US20080288788A1 (en) Digital Rights Management Metafile, Management Protocol and Applications Thereof
CN103563289A (en) Protecting control vector in cryptographic system
CN114337988A (en) Media data decryption method and device, computer equipment and storage medium
CN105159797A (en) Oracle database based backup and recovery method
CN110532290B (en) Information verification device, method and storage medium based on block chain
CN108710804A (en) A kind of band hardware encryption Rapid Updating of computer UEFI firmwares
CN105897745A (en) Upgrade package transmission server, system and method
CN111552938B (en) File encryption method and device
CN110232570B (en) Information supervision method and device
CN107426256A (en) A kind of method for uploading of upgrade file, terminal and server
CN115756538A (en) Method for software online upgrade
CN105808979A (en) Improved Android software installation package signature and signature verification method
CN105760202A (en) Server, computing equipment, software compression pack processing device and method
CN104393988A (en) Reversible data encryption method and device
CN103226673A (en) Method and device for processing SWF (Shock Wave Flash) separation encryption in batches

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171017

Termination date: 20210416