CN102347772A - Compression processing method and equipment for base station files - Google Patents

Compression processing method and equipment for base station files Download PDF

Info

Publication number
CN102347772A
CN102347772A CN201110132382XA CN201110132382A CN102347772A CN 102347772 A CN102347772 A CN 102347772A CN 201110132382X A CN201110132382X A CN 201110132382XA CN 201110132382 A CN201110132382 A CN 201110132382A CN 102347772 A CN102347772 A CN 102347772A
Authority
CN
China
Prior art keywords
compressed
subfile
current
compressed package
package
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.)
Granted
Application number
CN201110132382XA
Other languages
Chinese (zh)
Other versions
CN102347772B (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.)
Beijing Haiyun Technology Co. Ltd.
Original Assignee
New Postcom Equipment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New Postcom Equipment Co Ltd filed Critical New Postcom Equipment Co Ltd
Priority to CN201110132382.XA priority Critical patent/CN102347772B/en
Publication of CN102347772A publication Critical patent/CN102347772A/en
Application granted granted Critical
Publication of CN102347772B publication Critical patent/CN102347772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a compression processing method and equipment for base station files. The method comprises the steps of: reading header information from a historical compressed packet; modifying the header information, wherein the step of modifying the header information comprises the substep of modifying path information of each subfile to be compressed, and the modified header information is taken as the header information of a current compressed packet; and compressing all the subfiles to be compressed to obtain the current compressed packet according to the header information of the current compressed packet. According to the scheme provided by the invention, the base station files can be compressed rapidly.

Description

The compression processing method of base station file and equipment
Technical field
The present invention relates to data processing technique, relate in particular to the compression processing method and the equipment of base station file.
Background technology
In practical application, usually need upload various types of compressed packages, as be used for the compressed package of update processing to the base station.
When building a station the compression of file, need artificial input compressed package head information, this head comprises information such as the path, type, title of each subfile to be compressed; Then, according to the header information of the current compressed package that obtains, each subfile to be compressed compressed obtain current compressed package; Particularly; Read corresponding subfile to be compressed by the routing information in the header information, subfile to be compressed is compressed, and break into a compressed package.At last, just the current compressed package that obtains can be sent to the base station.
Be illustrated with certain compressed package that is used for update processing; Need compress 20 subfiles to be compressed in this instance; Each subfile to be compressed has information such as separately path, title, type; Wherein, Title, type etc. are intrinsic constant information, and routing information possibly change to some extent.Along with the evolution of technology, the content of some subfile to be compressed will change, and need carry out processed compressed again, upload up-to-date renewal compressed package to the base station.Yet, adopt existing scheme, when carrying out processed compressed, all need artificially to import the information such as path, type, title of each subfile to be compressed at every turn, this complex operation, speed is slow, has reduced the efficient of processed compressed.
Summary of the invention
The invention provides the compression processing method of a kind of base station file, this method can be carried out the processed compressed of base station file fast.
The invention provides the compressing treatment device of a kind of base station file, this equipment can carry out the processed compressed of base station file fast.
The compression processing method of a kind of base station file, this method comprises:
Reading head information from historical compressed package;
Header information is made amendment, and said making amendment comprises that the routing information to each subfile to be compressed makes amendment, with the header information of amended header information as current compressed package;
According to the header information of the current compressed package that obtains, each subfile to be compressed compressed obtain current compressed package.
The compressing treatment device of a kind of base station file, this equipment comprise reading unit, revise unit and compression unit;
Said reading unit is used for sending the modification unit to from historical compressed package reading head information;
Said modification unit is used for the header information that receives is made amendment, and said making amendment comprises that the routing information to each subfile to be compressed makes amendment, and with the header information of amended header information as current compressed package, sends compression unit to;
Said compression unit is used for the header information according to the current compressed package that receives, and each subfile to be compressed is compressed obtain current compressed package.
Can find out from such scheme; The compressed package head information that obtains after compressing before the present invention is based on; Revise the information that wherein changes; With the header information of amended header information as current compressed package; Like this, need not import each item content in the header information one by one, save input time; Accelerate processed compressed, improved efficient; And, the defective of holiday content when having avoided importing header information one by one.
Description of drawings
Fig. 1 is the compression processing method indicative flowchart of base station of the present invention file;
Fig. 2 is the compression processing method flow chart illustration one of base station of the present invention file;
Fig. 3 is the interface sketch map of input compressed package template;
Fig. 4 is the compression processing method flow chart illustration two of base station of the present invention file;
Fig. 5 is the compression processing method flow chart illustration three of base station of the present invention file;
Fig. 6 is the compression processing method flow chart illustration four of base station of the present invention file;
Fig. 7 is the structural representation of compressing treatment device of the present invention.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, below in conjunction with embodiment and accompanying drawing, to further explain of the present invention.
Characteristics according to base station File Compress bag; Base station File Compress bag for a certain type; Intrinsic informations such as the type of the quantity of the subfile to be compressed of input and each subfile to be compressed, title were all identical when each time compressed, and routing information wherein possibly change to some extent.The compressed package head information that obtains after compressing before the present invention is based on; Only revise the information that wherein changes; Keep the information that does not change; With the header information of amended header information as current compressed package; Like this; Need not import each item content in the header information one by one, save the time of input header information, accelerate processed compressed.
Referring to Fig. 1, be the compression processing method indicative flowchart of base station of the present invention file, it may further comprise the steps:
Step 101, reading head information from historical compressed package.
Step 102 is made amendment to header information, and said making amendment comprises that the routing information to each subfile to be compressed makes amendment, with the header information of amended header information as current compressed package.
The content of revising can be set as required, for example, can also make amendment to the version information in the header information.
Step 103 according to the header information of the current compressed package that obtains, is compressed and is obtained current compressed package.
Revise the header information that obtains current compressed package based on the header information of historical compressed package, the information of holiday subfile to be compressed in the time of can avoiding importing one by one each subfile information to be compressed.
Usually, having one in the subfile to be compressed is configuration file, has write down the filename that needs each subfile to be compressed of compression in the configuration file, and filename people before carrying out processed compressed is typing; In the process of compressing, need be according to the filename of prompting each subfile to be compressed of input in subfile tabulation to be compressed, subfile tabulation to be compressed is used for writing down the filename of each subfile that is compressed to current compressed package.
In order further to guarantee the complete property of current each subfile of compressed package; Also can carry out following complete property verification: read configuration file to current compressed package; The filename that comprises in include file name in the configuration file and the subfile to be compressed tabulation is checked; If do not omit, then execution in step 103; Otherwise, show the omission prompting to the user.
Further; In order to guarantee the correctness of each subfile content in the current compressed package; Also can carry out following correctness verification: the temporary position that current compressed package is unziped to appointment to current compressed package; Read each subfile in the temporary position; According to the routing information in the current compressed package head information, read the corresponding source file of each subfile again; Each subfile in the temporary position is compared with corresponding source file one by one,, confirm that then compressed package completes, otherwise compressed package is made failure, show correctness verification failure prompting to the user if content is consistent.
The instrument that carries out the base station File Compress for example is LmtBZipVc, and normally, LmtBZipVc once compresses subfile to be compressed, just the current compressed package that obtains can be sent to the base station afterwards; And some execute file like deflate.exe, also can compress file; And,, can the packet after the execute file compression be compressed once more according to the function of LmtBZipVc; Yet, in the existing scheme, also do not utilize this function of LmtBZipVc to carry out once more the technology of processed compressed.Compression processing method of the present invention has remedied this defective; Particularly: after generating the header information of current compressed package; Attribute to each subfile to be compressed of writing down in the header information is judged one by one; If attribute is a second-compressed; Then call execute file; Corresponding subfile to be compressed is once compressed, will once be compressed the file that obtains then and squeeze in the current compressed package; If attribute is not a second-compressed, then directly subfile to be compressed is squeezed in the current compressed package.Correspondingly, the base station is at first adopted LmtBZipVc that compressed package is carried out decompress(ion) one time, and then is called deflate.exe and carry out the secondary decompress(ion) after receiving compressed package, obtains the original sub file.
Adopt second-compressed, compression ratio can reach about 70%, has saved the memory space that compressed package takies significantly.
Through the flow process of Fig. 2-6, compression processing method of the present invention is illustrated below.
Fig. 2 is for carrying out the flow chart of File Compress according to the header information of historical compressed package, in this instance, supposing needs to revise routing information and version information, and it may further comprise the steps:
Step 201, reading head information from historical compressed package.
So-called historical compressed package promptly generates the also compressed package of available mistake before.
Step 202 is made amendment to the routing information of each subfile to be compressed in the historical compressed package head information.
Carry out routing information when revising, can search corresponding subfile according to routing information, if find, then make amendment, if do not find, then to user's demonstrations that report an error, show that the routing information of input is wrong, the prompting user re-enters routing information.
Execution in step 201-202; User's corresponding operating can be realized through input information shown in Figure 3; Here; To generate also available compressed package before as template; Particularly; " select template compressed package files path " locates to import path, historical compressed package place at first in the drawings, then, according to prompting in the drawings " chooser file path " locate to import one by one the path of each subfile to be compressed.
Step 203 generates the version information of current compressed package, replaces the version information in the historical compressed package head information, with the header information of amended header information as current compressed package.
Step 204 according to the header information of the current compressed package that obtains, is compressed subfile to be compressed one by one, obtains current compressed package.
Particularly, obtaining subfile to be compressed one by one according to the routing information in the header information compresses.
The example flow diagram of Fig. 4 for current compressed package is carried out the verification of complete property, it may further comprise the steps:
Step 401, whether judge has configuration file in the current compressed package, if having, then execution in step 402; Otherwise show the prompting that reports an error of no configuration file to the user.
Step 402 reads first filename that configuration file writes down.
In this step, when reading configuration file, can carry out decompress(ion), read configuration file wherein current compressed package; Also can directly read source profile according to the routing information in the current compressed package head information.
Step 403 searches whether comprise first filename that step 402 reads in the listed files to be compressed, if comprise, then execution in step 404; Otherwise, show the omission prompting to the user.
Step 404 judges whether the current filename that reads is last filename in the configuration file, if then show through complete property verification prompting to the user; Otherwise, read the next filename in the configuration file, execution in step 405.
Step 405 searches whether comprise the next filename that step 404 reads in the listed files to be compressed, if comprise, then execution in step 404; Otherwise, show the omission prompting to the user.
The example flow diagram of Fig. 5 for current compressed package is carried out the correctness verification, it may further comprise the steps:
Step 501 unzips to the current compressed package that generates under the temporary path of appointment.
Step 502 is obtained the length information of the sub-files under the temporary path.
Sub-files under the said temporary path that is to say current subfile of carrying out verification.
Step 503 is obtained the current routing information that carries out the subfile of verification from compressed package head information, obtain the length information of corresponding source file according to routing information.
Step 504 judges whether current subfile of carrying out verification is consistent with the length of source file, if then execution in step 505; Otherwise, filename is added in " the inconsistent tabulation of length ".
Step 505 reads current subfile of carrying out verification under the temporary path, and reads corresponding source file according to the routing information that obtains, and judges whether both contents are consistent, if then execution in step 506; Otherwise, filename is added in " the inconsistent tabulation of content ".
Particularly, can be the unit with 1024 bytes, read current subfile and the corresponding source file that carries out verification respectively, both contents are compared.
In the present embodiment, be provided with " the inconsistent tabulation of length " and " the inconsistent tabulation of content ", be used for check results is carried out record.
Step 506 judges whether the subfile of current verification is last subfile under the temporary path, if then show the prompting of correctness verification succeeds to the user; Otherwise, read the length information of next son file, execution in step 503.
In this instance, earlier the length information of subfile and source file is judged,, again both contents are judged if length is identical.Natch, also can directly judge, and length not prejudged content.
Fig. 6 is for carrying out the example flow diagram of second-compressed to current compressed package, it may further comprise the steps:
Step 601 reads the information to first subfile to be compressed that writes down in the header information.
The information of first that reads subfile to be compressed is the information of the current subfile of compressing.
Step 602 judges whether the current subfile attribute that compresses is second-compressed, if then execution in step 603, otherwise, directly subfile to be compressed is squeezed in the current compressed package.
Said judgement can realize that to a certain subfile to be compressed, if the information of user's input is second-compressed, then its attribute is a second-compressed through the mode that shows input prompt to the user.
Step 603 is called the deflate.exe execute file, and the current subfile of compressing is once compressed, and generates temporary file.
Step 604 is squeezed into the temporary file that generates in the current compressed package.
Step 605 judges whether the current subfile of compressing is last subfile to be compressed that writes down in the header information, if then show that to the user compressed package generates the prompting that finishes; Otherwise, execution in step 606.
Step 606 reads the information to the next subfile to be compressed that writes down in the header information, execution in step 602.
Referring to Fig. 7, be the structural representation of compressing treatment device of the present invention, this equipment comprises that this equipment comprises reading unit, revises unit and compression unit;
Said reading unit is used for sending the modification unit to from historical compressed package reading head information;
Said modification unit is used for the header information that receives is made amendment, and said making amendment comprises that the routing information to each subfile to be compressed makes amendment, and with the header information of amended header information as current compressed package, sends compression unit to;
Said compression unit is used for the header information according to the current compressed package that receives, and each subfile to be compressed is compressed obtain current compressed package.
Alternatively; Said compression unit comprises complete property syndrome unit, is used to read configuration file, and the filename that comprises in the filename that comprises in the configuration file and the listed files to be compressed is checked; If obtain current compressed package less than omitting, then each subfile to be compressed being compressed.
Alternatively; Said compression unit also comprises correctness syndrome unit, is used for the current compressed package that obtains is unziped to the temporary position of appointment, reads each subfile in the temporary position; According to the routing information in the current compressed package head information, read the corresponding source file of each subfile again; Each subfile is compared with corresponding source file one by one,, confirm that then compressed package completes if content is consistent.
This equipment can be specially the PC that service is provided for the base station.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope that the present invention protects.

Claims (8)

1. the compression processing method of a base station file is characterized in that, this method also comprises:
Reading head information from historical compressed package;
Header information is made amendment, and said making amendment comprises that the routing information to each subfile to be compressed makes amendment, with the header information of amended header information as current compressed package;
According to the header information of the current compressed package that obtains, each subfile to be compressed compressed obtain current compressed package.
2. the method for claim 1 is characterized in that, said making amendment also comprises version information is made amendment.
3. the method for claim 1 is characterized in that, said each subfile to be compressed is compressed obtains before the current compressed package, and this method also comprises:
Read configuration file, the filename that comprises in the filename that comprises in the configuration file and the subfile to be compressed tabulation is checked,, then carry out and said each subfile to be compressed is compressed the step that obtains current compressed package if do not omit.
4. the method for claim 1 is characterized in that, said each subfile to be compressed is compressed obtains after the current compressed package, and this method also comprises:
Current compressed package is unziped to the temporary position of appointment, read each subfile in the temporary position,, read the corresponding source file of each subfile again according to the routing information in the current compressed package head information; Each subfile in the temporary position is compared with corresponding source file one by one,, confirm that then compressed package completes, otherwise compressed package is made failure if content is consistent.
5. like each described method in the claim 1 to 4, it is characterized in that the header information of the current compressed package that said basis obtains compresses and obtains current compressed package, specifically comprises:
Attribute to each subfile to be compressed of writing down in the header information is judged one by one; If attribute is a second-compressed; Then call execute file, corresponding subfile to be compressed is once compressed, will once compress the file that obtains then and squeeze in the current compressed package; If attribute is not a second-compressed, then directly subfile to be compressed is squeezed in the current compressed package.
6. the compressing treatment device of a base station file is characterized in that, this equipment comprises reading unit, revises unit and compression unit;
Said reading unit is used for sending the modification unit to from historical compressed package reading head information;
Said modification unit is used for the header information that receives is made amendment, and said making amendment comprises that the routing information to each subfile to be compressed makes amendment, and with the header information of amended header information as current compressed package, sends compression unit to;
Said compression unit is used for the header information according to the current compressed package that receives, and each subfile to be compressed is compressed obtain current compressed package.
7. equipment as claimed in claim 6; It is characterized in that; Said compression unit comprises complete property syndrome unit; Be used to read configuration file; The filename that comprises in the filename that comprises in the configuration file and the listed files to be compressed is checked; If obtain current compressed package less than omitting, then each subfile to be compressed being compressed.
8. equipment as claimed in claim 6; It is characterized in that; Said compression unit also comprises correctness syndrome unit; The current compressed package that is used for obtaining unzips to the temporary position of appointment; Read each subfile in the temporary position; According to the routing information in the current compressed package head information, read the corresponding source file of each subfile again; Each subfile is compared with corresponding source file one by one,, confirm that then compressed package completes if content is consistent.
CN201110132382.XA 2011-05-20 2011-05-20 Compression processing method and equipment for base station files Active CN102347772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110132382.XA CN102347772B (en) 2011-05-20 2011-05-20 Compression processing method and equipment for base station files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110132382.XA CN102347772B (en) 2011-05-20 2011-05-20 Compression processing method and equipment for base station files

Publications (2)

Publication Number Publication Date
CN102347772A true CN102347772A (en) 2012-02-08
CN102347772B CN102347772B (en) 2014-07-30

Family

ID=45546095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110132382.XA Active CN102347772B (en) 2011-05-20 2011-05-20 Compression processing method and equipment for base station files

Country Status (1)

Country Link
CN (1) CN102347772B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622226A (en) * 2012-02-24 2012-08-01 中标软件有限公司 Method for generating Linux software package storage
CN111414339A (en) * 2020-03-13 2020-07-14 浙江大华技术股份有限公司 File processing method, system, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05161018A (en) * 1991-12-06 1993-06-25 Dainippon Screen Mfg Co Ltd Picture transmission system
CN101136854A (en) * 2007-03-19 2008-03-05 中兴通讯股份有限公司 Method and apparatus for implementing data packet linear speed processing
US20110019695A1 (en) * 2009-07-27 2011-01-27 Institute For Information Industry Wireless communication apparatus, header compression method thereof, and header decompression method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05161018A (en) * 1991-12-06 1993-06-25 Dainippon Screen Mfg Co Ltd Picture transmission system
CN101136854A (en) * 2007-03-19 2008-03-05 中兴通讯股份有限公司 Method and apparatus for implementing data packet linear speed processing
US20110019695A1 (en) * 2009-07-27 2011-01-27 Institute For Information Industry Wireless communication apparatus, header compression method thereof, and header decompression method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
鼎桥通信技术有限公司: "《BBP530V400R005C00SPC400升级指导书》", 21 September 2010, article "BBP530V400R005C00SPC400升级指导书" *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622226A (en) * 2012-02-24 2012-08-01 中标软件有限公司 Method for generating Linux software package storage
CN102622226B (en) * 2012-02-24 2015-07-29 中标软件有限公司 A kind of method generating Linux software package storage
CN111414339A (en) * 2020-03-13 2020-07-14 浙江大华技术股份有限公司 File processing method, system, device, equipment and medium
CN111414339B (en) * 2020-03-13 2023-04-25 浙江大华技术股份有限公司 File processing method, system, device, equipment and medium

Also Published As

Publication number Publication date
CN102347772B (en) 2014-07-30

Similar Documents

Publication Publication Date Title
CN104714819A (en) File system upgrading package making method, upgrading method and device and terminal
CN106815370B (en) Method, device and system for updating resource file
AU2011205480B2 (en) Operating system auto-update procedure
CN109034993A (en) Account checking method, equipment, system and computer readable storage medium
CN104503780A (en) Method and device for providing application channel packet
CN105446975B (en) A kind of file packing method and device
CN108762743A (en) Data table operation code generation method and device
CN110442377A (en) Service packs generation method, using update method, device and electronic equipment
CN109800005A (en) A kind of hot update method of client and device
CN112947983A (en) Application program updating method and device, electronic equipment and storage medium
CN103761095B (en) Method for generating universal upgrade file head data information
CN113220660A (en) Data migration method, device and equipment and readable storage medium
CN109408682A (en) A kind of method of regular expression matching, system and equipment
CN106776266A (en) The collocation method and terminal device of testing tool
CN106776125B (en) Method and device for realizing real-time restoration of PC client software
CN102347772B (en) Compression processing method and equipment for base station files
CN106033335A (en) An installation package generating method and device
CN112286565B (en) Embedded system differential upgrading method based on storage container
CN103139298B (en) Method for transmitting network data and device
CN112765270A (en) Block chain data processing method and device, computer equipment and medium
CN106326310B (en) Resource encryption updating method for mobile phone client software
CN106648784A (en) OTA upgrading method and system based on android system and android terminal
CN106775802B (en) Method and system for quickly updating mass small files
CN104320454A (en) Method and system for realizing user-defined output in HTTP protocol recovery
CN109002710A (en) A kind of detection method, device and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20170829

Address after: 100070, No. 188, building 25, No. eighteen, South Fourth Ring Road, Fengtai District, Beijing, 1, 101

Patentee after: Beijing Haiyun Technology Co. Ltd.

Address before: 510663, No. 3, color road, Science City, Guangzhou Development Zone, Guangdong

Patentee before: New Post Communication Equipment Co., Ltd.

TR01 Transfer of patent right