CN102347772B - 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
CN102347772B
CN102347772B CN201110132382.XA CN201110132382A CN102347772B CN 102347772 B CN102347772 B CN 102347772B CN 201110132382 A CN201110132382 A CN 201110132382A CN 102347772 B CN102347772 B CN 102347772B
Authority
CN
China
Prior art keywords
compressed
subfile
information
compressed package
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110132382.XA
Other languages
Chinese (zh)
Other versions
CN102347772A (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

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 compression processing method and the equipment of base station file.
Background technology
In actual applications, usually need to upload various types of compressed packages to base station, as the compressed package for upgrading processing.
While building a station the compression of file, need artificial input compressed package head information, and this head comprises the information such as the path, type, title of each subfile to be compressed; Then,, according to the header information of the current compressed package obtaining, each subfile to be compressed is compressed and obtained current compressed package, particularly, read corresponding subfile to be compressed by the routing information in header information, subfile to be compressed is compressed, and break into a compressed package.Finally, just the current compressed package obtaining can be sent to base station.
Be illustrated for the compressed package that upgrades processing with certain, in this example, need 20 subfiles to be compressed to compress, each subfile to be compressed has the information such as path separately, title, type, wherein, title, type etc. are intrinsic constant information, and routing information may change to some extent.Along with the evolution of technology, the content of some subfile to be compressed will change, and need to re-start compression and process, and upload up-to-date renewal compressed package to base station.But, adopt existing scheme, compressing while processing at every turn, all need artificially input the information such as path, type, title of each subfile to be compressed, this complex operation, speed is slow, has reduced the efficiency of compressing processing.
Summary of the invention
The invention provides the compression processing method of a kind of base station file, the method can be carried out the compression processing 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 compression processing of base station file fast.
A compression processing method for base station file, the method comprises:
Reading head information from historical compressed package;
Header information is modified, described in modify and comprise that the routing information to each subfile to be compressed modifies, the header information using amended header information as current compressed package;
According to the header information of the current compressed package obtaining, each subfile to be compressed is compressed and obtained current compressed package.
A compressing treatment device for base station file, this equipment comprises reading unit, amendment unit and compression unit;
Described reading unit, for from historical compressed package reading head information, sends amendment unit to;
Described amendment unit, for the header information receiving is modified, described in modify and comprise that the routing information to each subfile to be compressed modifies, the header information using amended header information as current compressed package, sends compression unit to;
Described compression unit, for according to the header information of the current compressed package receiving, compresses and obtains current compressed package each subfile to be compressed.
Can find out from such scheme, the compressed package head information obtaining after compressing before the present invention is based on, the information that amendment wherein changes, header information using amended header information as current compressed package, like this, need not input one by one the every content in header information, save input time, accelerate compression and processed, improved efficiency; And, the defect of holiday content while having avoided inputting header information one by one.
Brief description of the 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 schematic diagram 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, technical solutions and advantages of the present invention clearer, below in conjunction with embodiment and accompanying drawing, the present invention is described in more detail.
According to the feature of base station compressing file bag, for the base station compressing file bag of a certain type, while compression for each time, the quantity of subfile to be compressed and the intrinsic information such as type, title of each subfile to be compressed of input are all identical, and routing information wherein may change to some extent.The compressed package head information obtaining after compressing before the present invention is based on, the information that only amendment wherein changes, retain the information not changing, header information using amended header information as current compressed package, like this, need not input one by one the every content in header information, save the time of input header information, accelerate compression and processed.
Referring to Fig. 1, be the compression processing method indicative flowchart of base station of the present invention file, it comprises the following steps:
Step 101, reading head information from historical compressed package.
Step 102, modifies to header information, described in modify and comprise that the routing information to each subfile to be compressed modifies, the header information using amended header information as current compressed package.
The content of amendment can be set as required, for example, can also modify to the version information in header information.
Step 103, according to the header information of the current compressed package obtaining, compresses and obtains current compressed package.
Header information amendment based on historical compressed package obtains the header information of current compressed package, the information of holiday subfile to be compressed can avoid inputting one by one each subfile information to be compressed time.
Usually, in subfile to be compressed, having one is configuration file, has recorded the filename that needs each subfile to be compressed of compression in configuration file, and filename people before compressing processing is typing; In the process of compressing, need in subfile list to be compressed, input according to prompting the filename of each subfile to be compressed, subfile list to be compressed is for recording the filename of the each subfile that is compressed to current compressed package.
In order further to ensure the complete property of the each subfile of current compressed package, also can carry out following complete property verification to current compressed package: read configuration file, the filename comprising in include file name in configuration file and subfile list to be compressed is checked, if do not omit, perform step 103; Otherwise, show and omit prompting to user.
Further, in order to ensure the correctness of each subfile content in current compressed package, also can carry out following correctness verification to current compressed package: the temporary position that current compressed package is unziped to appointment, read the each subfile in temporary position, according to the routing information in current compressed package head information, read source file corresponding to each subfile again; Each subfile in temporary position is compared with corresponding source file one by one, if content is consistent, determine that compressed package completes, otherwise compressed package makes unsuccessfully, show that to user correctness verification unsuccessfully points out.
The instrument that carries out base station compressing file is for example LmtBZipVc, and normally, LmtBZipVc carries out first compression to subfile to be compressed, just the current compressed package obtaining can be sent to afterwards to base station; And some execute file, as deflate.exe, also can compress file; And, according to the function of LmtBZipVc, can again compress the packet after execute file compression; But, in existing scheme, also do not utilize this function of LmtBZipVc again to compress the technology of processing.Compression processing method of the present invention has made up this defect, particularly: generate after the header information of current compressed package, attribute to the each subfile to be compressed recording in header information judges one by one, if attribute is second-compressed, call execute file, corresponding subfile to be compressed is carried out to first compression, and the file then first compression being obtained is squeezed in current compressed package; If attribute is not second-compressed, directly subfile to be compressed is squeezed in current compressed package.Correspondingly, base station receives after compressed package, first adopts LmtBZipVc to carry out decompress(ion) one time to compressed package, and then calls deflate.exe and carry out secondary decompress(ion), obtains original subfile.
Adopt second-compressed, compression ratio can reach 70% left and right, has significantly saved the memory space that compressed package takies.
Below by the flow process of Fig. 2-6, compression processing method of the present invention is illustrated.
Fig. 2 is the flow chart that carries out compressing file according to the header information of historical compressed package, in this example, supposes to revise routing information and version information, and it comprises the following steps:
Step 201, reading head information from historical compressed package.
So-called historical compressed package, generates the also compressed package of available mistake before.
Step 202, modifies to the routing information of each subfile to be compressed in historical compressed package head information.
Carry out routing information when amendment, can search corresponding subfile according to routing information, if found, modify, if do not found,, to user's demonstrations that report an error, show that the routing information of inputting is wrong, reminding user re-enters routing information.
Execution step 201-202, user's corresponding operating can be by the information realization shown in input Fig. 3, here, to generate before also available compressed package as template, particularly, first in the drawings " select template compressed package files path " locates to input path, historical compressed package place, then, according to prompting in the drawings " chooser file path " locate to input 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 historical compressed package head information, the header information using amended header information as current compressed package.
Step 204, according to the header information of the current compressed package obtaining, compresses subfile to be compressed one by one, obtains current compressed package.
Particularly, obtaining one by one subfile to be compressed according to the routing information in header information compresses.
Fig. 4 is the example flow diagram of current compressed package being carried out to the verification of complete property, and it comprises the following steps:
Step 401, judges in current compressed package whether have configuration file, if had, performs step 402; Otherwise show the prompting that reports an error without configuration file to user.
Step 402, reads first filename that configuration file records.
In this step, while reading configuration file, can carry out decompress(ion) to current compressed package, read configuration file wherein; Also can, according to the routing information in current compressed package head information, directly read source profile.
Step 403, searches in listed files to be compressed whether comprise first filename that step 402 reads, if comprised, performs step 404; Otherwise, show and omit prompting to user.
Step 404, judges whether the current filename reading is last filename in configuration file, if so, shows by complete property verification prompting to user; Otherwise, read the next filename in configuration file, execution step 405.
Step 405, searches in listed files to be compressed whether comprise the next filename that step 404 reads, if comprised, performs step 404; Otherwise, show and omit prompting to user.
Fig. 5 is the example flow diagram of current compressed package being carried out to correctness verification, and it comprises the following steps:
Step 501, unzips to the current compressed package generating under the temporary path of appointment.
Step 502, obtains the length information of a subfile under temporary path.
A subfile under described temporary path, that is to say current subfile of carrying out verification.
Step 503 is obtained the routing information of current subfile of carrying out verification from compressed package head information, obtains the length information of corresponding source file according to routing information.
Step 504, judges and currently carries out the subfile of verification and whether the length of source file is consistent, if so, performs step 505; Otherwise, filename is added in " the inconsistent list of length ".
Step 505, reads current subfile of carrying out verification under temporary path, and reads corresponding source file according to the routing information obtaining, and judges that whether both contents are consistent, if so, performs step 506; Otherwise, filename is added in " the inconsistent list of content ".
Particularly, can be taking 1024 bytes as unit, read respectively current subfile and the corresponding source file that carries out verification, both contents are compared.
In the present embodiment, be provided with " the inconsistent list of length " and " the inconsistent list of content ", for check results is carried out to record.
Step 506, judges whether the subfile of current verification is last subfile under temporary path, if so, shows the prompting of correctness verification succeeds to user; Otherwise, read the length information of next son file, execution step 503.
In this example, first the length information of subfile and source file is judged, if length is identical, then both contents are judged.Natch, also can directly judge content, and length not prejudged.
Fig. 6 is the example flow diagram of current compressed package being carried out to second-compressed, and it comprises the following steps:
Step 601, reads the information of first subfile to be compressed to recording in header information.
The information of first subfile to be compressed reading, is the information of the current subfile of compressing.
Step 602, judges whether the current subfile attribute compressing is second-compressed, if so, performs step 603, otherwise, directly subfile to be compressed is squeezed in current compressed package.
Described judgement can realize by the mode that shows input prompt to user, and for a certain subfile to be compressed, if the information of user's input is second-compressed, its attribute is second-compressed.
Step 603, calls deflate.exe execute file, and the current subfile of compressing is carried out to first compression, generates temporary file.
Step 604, squeezes into the temporary file of generation in current compressed package.
Step 605, judges that whether the current subfile of compressing is last subfile to be compressed recording in header information, if so, shows that to user compressed package generates complete prompting; Otherwise, execution step 606.
Step 606, reads the information of the next one subfile to be compressed to recording in header information, execution 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, amendment unit and compression unit;
Described reading unit, for from historical compressed package reading head information, sends amendment unit to;
Described amendment unit, for the header information receiving is modified, described in modify and comprise that the routing information to each subfile to be compressed modifies, the header information using amended header information as current compressed package, sends compression unit to;
Described compression unit, for according to the header information of the current compressed package receiving, compresses and obtains current compressed package each subfile to be compressed.
Alternatively, described compression unit comprises complete property syndrome unit, for reading configuration file, the filename comprising in the filename comprising in configuration file and listed files to be compressed is checked, if do not omit, each subfile to be compressed compressed and obtained current compressed package.
Alternatively, described compression unit also comprises correctness syndrome unit, for the current compressed package obtaining being unziped to the temporary position of appointment, reads the each subfile in temporary position, according to the routing information in current compressed package head information, read source file corresponding to each subfile again; Each subfile is compared with corresponding source file one by one, if content is consistent, determine that compressed package completes.
This equipment can be specially the PC that service is provided for base station.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any amendment of making, be equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.

Claims (8)

1. a compression processing method for base station file, is characterized in that, the method also comprises:
Reading head information from historical compressed package;
Header information is modified, the information changing in amendment header information, retain the information that do not change, described in modify and comprise that the routing information to each subfile to be compressed modifies, the header information using amended header information as current compressed package;
According to the header information of the current compressed package obtaining, each subfile to be compressed is compressed and obtained current compressed package.
2. the method for claim 1, is characterized in that, described in modify and also comprise version information is modified.
3. the method for claim 1, is characterized in that, described each subfile to be compressed is compressed and is obtained current compressed package before, the method also comprises:
Read configuration file, the filename comprising in the filename comprising in configuration file and subfile list to be compressed is checked, if not do not omitted, carry out and described each subfile to be compressed is compressed to the step that obtains current compressed package.
4. the method for claim 1, is characterized in that, described each subfile to be compressed is compressed and is obtained current compressed package after, the method also comprises:
Current compressed package is unziped to the temporary position of appointment, read the each subfile in temporary position, then according to the routing information in current compressed package head information, read source file corresponding to each subfile; Each subfile in temporary position is compared with corresponding source file one by one, if content is consistent, determine that compressed package completes, otherwise compressed package is made unsuccessfully.
5. the method as described in any one in claim 1 to 4, is characterized in that, the header information of the current compressed package that described basis obtains compresses and obtains current compressed package, specifically comprises:
Attribute to the each subfile to be compressed recording in header information judges one by one, if attribute is second-compressed, call execute file, corresponding subfile to be compressed is carried out to first compression, the file then first compression being obtained is squeezed in current compressed package; If attribute is not second-compressed, directly subfile to be compressed is squeezed in current compressed package.
6. a compressing treatment device for base station file, is characterized in that, this equipment comprises reading unit, amendment unit and compression unit;
Described reading unit, for from historical compressed package reading head information, sends amendment unit to;
Described amendment unit, for the header information receiving is modified, the information changing in amendment header information, retain the information not changing, described modifying comprises that the routing information to each subfile to be compressed modifies, header information using amended header information as current compressed package, sends compression unit to;
Described compression unit, for according to the header information of the current compressed package receiving, compresses and obtains current compressed package each subfile to be compressed.
7. equipment as claimed in claim 6, it is characterized in that, described compression unit comprises complete property syndrome unit, be used for reading configuration file, the filename comprising in the filename comprising in configuration file and listed files to be compressed is checked, if do not omit, each subfile to be compressed compressed and obtained current compressed package.
8. equipment as claimed in claim 6, it is characterized in that, described compression unit also comprises correctness syndrome unit, for the current compressed package obtaining being unziped to the temporary position of appointment, read the each subfile in temporary position, according to the routing information in current compressed package head information, read source file corresponding to each subfile again; Each subfile is compared with corresponding source file one by one, if content is consistent, determine that compressed package completes.
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 CN102347772A (en) 2012-02-08
CN102347772B true 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)

Families Citing this family (2)

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

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136854A (en) * 2007-03-19 2008-03-05 中兴通讯股份有限公司 Method and apparatus for implementing data packet linear speed processing

Family Cites Families (2)

* 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
TWI432044B (en) * 2009-07-27 2014-03-21 Inst Information Industry Wireless communication apparatus, header compression method thereof, and header decompression method thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136854A (en) * 2007-03-19 2008-03-05 中兴通讯股份有限公司 Method and apparatus for implementing data packet linear speed processing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JP特开平5-161018A 1993.06.25
鼎桥通信技术有限公司.BBP530V400R005C00SPC400升级指导书.《BBP530V400R005C00SPC400升级指导书》.2010,(第1版), *

Also Published As

Publication number Publication date
CN102347772A (en) 2012-02-08

Similar Documents

Publication Publication Date Title
CN106815370B (en) Method, device and system for updating resource file
CN106936441B (en) Data compression method and device
US10204108B2 (en) Method and apparatus for manufacturing file system update package, method and apparatus for updating file system update package, and terminal
CN103942058B (en) A kind of EMBEDDED AVIONICS method for upgrading software and system
AU2011205480B2 (en) Operating system auto-update procedure
CN102831001B (en) The upgrade method of the method for making of software upgrade package and device, program and equipment
CN104503780A (en) Method and device for providing application channel packet
CN106126397A (en) The processing method of program crashing message and system
CN108491326B (en) Test behavior a recombination process apparatus and storage medium
CN106648766B (en) Method and device for generating patch upgrade patch based on folder and differentially upgrading patch based on folder
CN105446975B (en) A kind of file packing method and device
CN108762743A (en) Data table operation code generation method 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
CN110543301A (en) Method and device for generating jenkins code file
CN104768025A (en) Method and device for repairing bad frames in video
CN102347772B (en) Compression processing method and equipment for base station files
CN104408178A (en) Device and method for WEB control loading
CN103139298B (en) Method for transmitting network data and device
CN112579141A (en) Firmware updating method, device, equipment and storage medium of embedded system
CN112765270A (en) Block chain data processing method and device, computer equipment and medium
CN104049998A (en) Upgrade package processing method, device and apparatus in Android system
CN106648784A (en) OTA upgrading method and system based on android system and android terminal
CN106326310B (en) Resource encryption updating method for mobile phone client software
CN106775802B (en) Method and system for quickly updating mass small files

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
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.