CN109241005A - A kind of file management method and relevant apparatus - Google Patents

A kind of file management method and relevant apparatus Download PDF

Info

Publication number
CN109241005A
CN109241005A CN201811115232.6A CN201811115232A CN109241005A CN 109241005 A CN109241005 A CN 109241005A CN 201811115232 A CN201811115232 A CN 201811115232A CN 109241005 A CN109241005 A CN 109241005A
Authority
CN
China
Prior art keywords
file
checked
binary type
check
type 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.)
Withdrawn
Application number
CN201811115232.6A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811115232.6A priority Critical patent/CN109241005A/en
Publication of CN109241005A publication Critical patent/CN109241005A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a kind of file management methods, after determining wait check in file, first get the file to be checked in of binary type, and it carries out lossless compression to it to handle to obtain file destination, to when checking in operation, no longer the snapshot of binary type file is checked in remote warehouse, but lossless compression will be carried out treated file destination check-in to remote warehouse.Since lossless compression processing can reduce the volume of binary type file, after check-in to remote warehouse, the memory space occupied can also reduce, and due to the reduction of volume, when detecting this document, the requirement to bandwidth also be can decrease.Present invention also provides a kind of file management system, device and computer readable storage mediums, and above-mentioned technical effect equally may be implemented.

Description

A kind of file management method and relevant apparatus
Technical field
The present invention relates to Version Control fields, more specifically to a kind of file management method, system, device and meter Calculation machine readable storage medium storing program for executing.
Background technique
Version Control refers to program codes various in software development process, configuration file and illustrates that the files such as document become Management more.The main contents of Version Control include check-in and detection.Check-in is exactly that the file of various changes is stored in long-range storehouse Library, detection are the inverse process of check-in, i.e., the file changed is downloaded from remote warehouse.
In actual items management, the content for being stored in remote warehouse includes but is not limited to that program code, configuration file etc. are pure Text file usually will also include the binary files such as executable file.Current version control tool is in check-in binary system text When part, the snapshot of binary file can only be stored, thus very big memory space can be occupied, and in detection this document When, it can also be limited by the bandwidth of network transmission.
Therefore, the memory space occupied after binary file check-in how is reduced, is that those skilled in the art need to solve The problem of.
Summary of the invention
The purpose of the present invention is to provide a kind of file management method, system, device and computer readable storage medium, with Solve the problems, such as how to reduce the memory space occupied after binary file check-in.
To achieve the above object, the embodiment of the invention provides following technical solutions:
A kind of file management method, comprising:
Determine file to be checked in;
Binary type file is obtained in file wait check in described;
Binary type file progress lossless compression is obtained into file destination;
The file destination is checked in remote warehouse.
It is wherein, described that binary type file is obtained in file wait check in described, comprising:
The file to be checked in is classified, plain text type file and binary type file are obtained;
Plain text type file and the binary type file are serialized respectively, obtain JSON character string;
The catalogue of the binary type file is determined using the JSON character string;
The binary type file is obtained using the catalogue.
Wherein, further includes:
The catalogue of the plain text type file is determined using the JSON character string;
The plain text type file is obtained using the catalogue;
The plain text type file is checked in remote warehouse.
It is wherein, described to check in the file destination to remote warehouse, comprising:
The file destination is checked in remote warehouse using SVN or git.
Wherein, determination file to be checked in, comprising:
Determine file to be checked in;
It determines described wait check in file the file to be checked in modified frequency and be greater than preset threshold.
Present invention also provides a kind of file management systems, comprising:
Determining module, for determining file to be checked in;
Module is obtained, for obtaining binary type file in file wait check in described;
Compression module, for binary type file progress lossless compression to be obtained file destination;
Check-in module, for checking in the file destination to remote warehouse.
Wherein, the acquisition module, comprising:
Taxon obtains plain text type file and binary type for the file to be checked in be classified File;
Serialization unit is obtained for serializing respectively to plain text type file and the binary type file To JSON character string;
Determination unit, for determining the catalogue of the binary type file using the JSON character string;
Acquiring unit, for obtaining the binary type file using the catalogue.
Wherein, the determining module, comprising:
First determination unit, for determining file to be checked in;
Second determination unit, it is described wait check in file the text to be checked in modified frequency and be greater than preset threshold for determining Part.
Present invention also provides a kind of document management apparatus, comprising:
Memory, for storing computer program;
Processor is realized when for executing the computer program such as the step of the file management method.
Present invention also provides a kind of computer readable storage medium, meter is stored on the computer readable storage medium Calculation machine program is realized when the computer program is executed by processor such as the step of the file management method.
By above scheme it is found that a kind of file management method provided by the invention, comprising: determine file to be checked in;? It is described that binary type file is obtained in file wait check in;Binary type file progress lossless compression is obtained into target text Part;The file destination is checked in remote warehouse.
It can be seen that a kind of file management method provided by the embodiments of the present application first obtains after determining wait check in file The file to be checked in of binary type is got, and lossless compression is carried out to it and handles to obtain file destination, to be grasped in check-in When making, no longer the snapshot of binary type file is checked in remote warehouse, but lossless compression will be carried out treated target File is checked in remote warehouse.Since lossless compression processing can reduce the volume of binary type file, check-in is to far After Cheng Cangku, the memory space occupied can also reduce, and due to the reduction of volume, when detecting this document, to bandwidth Requirement also can decrease.Present invention also provides a kind of file management system, device and computer readable storage mediums, together Above-mentioned technical effect may be implemented in sample.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of file management method flow chart disclosed by the embodiments of the present invention;
Fig. 2 is a kind of specific file management method flow chart disclosed by the embodiments of the present invention;
Fig. 3 is a kind of file management system structural schematic diagram disclosed by the embodiments of the present invention;
Fig. 4 is a kind of document management apparatus structural schematic diagram disclosed by the embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a kind of file management method, system, device and computer readable storage mediums, with solution The problem of certainly how reducing the memory space occupied after binary file check-in.
Referring to Fig. 1, a kind of file management method provided in an embodiment of the present invention is specifically included:
S101 determines file to be checked in.
Specifically, it is first determined all files to be checked in, file to be checked in are to need to be uploaded to remote warehouse File.
It should be noted that under normal conditions, the instruction checked in file that user issues can be first received, from And file to be checked in is determined according to instruction, and wait check in file, some files are not modified, and this document The frequency of modification is also very low, therefore, because this file will not generally be modified, that is, the version of this file will not be sent out Changing, therefore, also just it is not necessary that such file is uploaded to remote warehouse.
Therefore, in one preferred embodiment, file to be checked in is determined;It is repaired described in determining wait check in file Change the file to be checked in that frequency is greater than preset threshold.
Specifically, preset threshold can determine according to the actual situation, be not specifically limited in this programme.
S102 obtains binary type file wait check in described in file.
It is needing to illustrate but, usually wait check in file include text-only file also include binary file, plain text File only needs directly check-in to remote warehouse, and in the present solution, no longer check in binary snapshot, and need Specially treated is carried out to binary file.
Firstly, all wait check in file the file for obtaining binary type.
Binary type file progress lossless compression is obtained file destination by S103.
Specifically, binary type file is subjected to lossless compression processing using tool of compression, obtains file destination.
S104 checks in the file destination to remote warehouse.
The file destination obtain after lossless compression processing is checked in remote warehouse.
Specifically, SVN (Subversion, the version control system of an open source code) or git (distribution be can use Formula version control system) file destination is checked in remote warehouse.
It can be seen that a kind of file management method provided by the embodiments of the present application first obtains after determining wait check in file The file to be checked in of binary type is got, and lossless compression is carried out to it and handles to obtain file destination, to be grasped in check-in When making, no longer the snapshot of binary type file is checked in remote warehouse, but lossless compression will be carried out treated target File is checked in remote warehouse.Since lossless compression processing can reduce the volume of binary type file, check-in is to far After Cheng Cangku, the memory space occupied can also reduce, and due to the reduction of volume, when detecting this document, to bandwidth Requirement also can decrease.
A kind of specific file management method provided by the embodiments of the present application is introduced below, one kind described below Specific file management method can be cross-referenced with above-described embodiment.
Referring to fig. 2, a kind of specific file management method provided by the embodiments of the present application, specifically includes:
S201 determines file to be checked in.
The file to be checked in is classified, obtains plain text type file and binary type file by S202.
Specifically, treating check-in file determining after checking in file and classifying, to obtain plain text type file With binary type file.
S203 serializes plain text type file and the binary type file respectively, obtains JSON character String.
Specifically, plain text type file and binary type file are serialized respectively, to obtain JSON word Symbol string, the JSON character string is for describing the information of plain text type file and the information of binary type file.Wherein, JSON is a kind of data interchange format of lightweight, so as to obtain the relevant information of file by JSON character string.
S204 determines the catalogue of the binary type file using the JSON character string.
Specifically, catalogue of the binary type file in current device is determined using JSON character string, that is, deposit Storage space is set.
S205 obtains the binary type file using the catalogue.
Binary type file progress lossless compression is obtained file destination by S206.
S207 checks in the file destination to remote warehouse.
S208 determines the catalogue of the plain text type file using the JSON character string.
In the present solution, can also determine the catalogue where it by JSON character string for text-only file.
S209 obtains the plain text type file using the catalogue.
S210 checks in the plain text type file to remote warehouse.
After the file for getting plain text type in catalogue, plain text type file is directly checked in long-range storehouse Library.
A kind of file management system provided by the embodiments of the present application is introduced below, a kind of file pipe described below Reason system can be cross-referenced with above-described embodiment.
Referring to Fig. 3, a kind of file management system provided by the embodiments of the present application is specifically included:
Determining module 301, for determining file to be checked in.
In a specific embodiment, determining module 301 specifically includes:
First determination unit, for determining file to be checked in;
Second determination unit, it is described wait check in file the text to be checked in modified frequency and be greater than preset threshold for determining Part.
Module 302 is obtained, for obtaining binary type file in file wait check in described.
In a specific embodiment, module 302 is obtained to specifically include:
Taxon obtains plain text type file and binary type for the file to be checked in be classified File;
Serialization unit is obtained for serializing respectively to plain text type file and the binary type file To JSON character string;
Determination unit, for determining the catalogue of the binary type file using the JSON character string;
Acquiring unit, for obtaining the binary type file using the catalogue.
Compression module 303, for binary type file progress lossless compression to be obtained file destination.
Check-in module 304, for checking in the file destination to remote warehouse.
The file management system of the present embodiment is for realizing file management method above-mentioned, therefore in file management system The embodiment part of the visible file management method hereinbefore of specific embodiment, for example, determining module 301, obtains module 302, compression module 303, check-in module 304 is respectively used to realize step S101, S102, S103 in above-mentioned file management method And S104, so, specific embodiment is referred to the description of corresponding various pieces embodiment, and details are not described herein.
A kind of document management apparatus provided by the embodiments of the present application is introduced below, a kind of file pipe described below Managing device can be cross-referenced with any of the above-described embodiment.
Referring to fig. 4, a kind of document management apparatus provided by the embodiments of the present application, specifically includes:
Memory 401, for storing computer program;
Processor 402, realizing the file management method as described in any embodiment when for executing the computer program Step.
Specifically, memory 401 includes non-volatile memory medium, built-in storage.Non-volatile memory medium storage There are operating system and computer-readable instruction, which is that the operating system and computer in non-volatile memory medium can The operation of reading instruction provides environment.Processor 402 provides calculating and control ability for document management apparatus, may be implemented above-mentioned Step provided by one file management method embodiment.
Present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the computer Step provided by above-described embodiment may be implemented when program is executed by processor.The storage medium may include: USB flash disk, movement Hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), the various media that can store program code such as magnetic or disk.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of file management method characterized by comprising
Determine file to be checked in;
Binary type file is obtained in file wait check in described;
Binary type file progress lossless compression is obtained into file destination;
The file destination is checked in remote warehouse.
2. the method according to claim 1, wherein described obtain binary type wait check in described in file File, comprising:
The file to be checked in is classified, plain text type file and binary type file are obtained;
Plain text type file and the binary type file are serialized respectively, obtain JSON character string;
The catalogue of the binary type file is determined using the JSON character string;
The binary type file is obtained using the catalogue.
3. according to the method described in claim 2, it is characterized by further comprising:
The catalogue of the plain text type file is determined using the JSON character string;
The plain text type file is obtained using the catalogue;
The plain text type file is checked in remote warehouse.
4. the method according to claim 1, wherein described check in the file destination to remote warehouse, packet It includes:
The file destination is checked in remote warehouse using SVN or git.
5. the method according to claim 11 is gone, which is characterized in that the determination file to be checked in, comprising:
Determine file to be checked in;
It determines described wait check in file the file to be checked in modified frequency and be greater than preset threshold.
6. a kind of file management system characterized by comprising
Determining module, for determining file to be checked in;
Module is obtained, for obtaining binary type file in file wait check in described;
Compression module, for binary type file progress lossless compression to be obtained file destination;
Check-in module, for checking in the file destination to remote warehouse.
7. system according to claim 6, which is characterized in that the acquisition module, comprising:
Taxon obtains plain text type file and binary type file for the file to be checked in be classified;
Serialization unit is obtained for serializing respectively to plain text type file and the binary type file JSON character string;
Determination unit, for determining the catalogue of the binary type file using the JSON character string;
Acquiring unit, for obtaining the binary type file using the catalogue.
8. system according to claim 6 or 7, which is characterized in that the determining module, comprising:
First determination unit, for determining file to be checked in;
Second determination unit, it is described wait check in file the file to be checked in modified frequency and be greater than preset threshold for determining.
9. a kind of document management apparatus characterized by comprising
Memory, for storing computer program;
Processor, realizing the file management method as described in any one of claim 1 to 5 when for executing the computer program Step.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes the step of the file management method as described in any one of claim 1 to 5 when the computer program is executed by processor Suddenly.
CN201811115232.6A 2018-09-25 2018-09-25 A kind of file management method and relevant apparatus Withdrawn CN109241005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811115232.6A CN109241005A (en) 2018-09-25 2018-09-25 A kind of file management method and relevant apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811115232.6A CN109241005A (en) 2018-09-25 2018-09-25 A kind of file management method and relevant apparatus

Publications (1)

Publication Number Publication Date
CN109241005A true CN109241005A (en) 2019-01-18

Family

ID=65056104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811115232.6A Withdrawn CN109241005A (en) 2018-09-25 2018-09-25 A kind of file management method and relevant apparatus

Country Status (1)

Country Link
CN (1) CN109241005A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526902A (en) * 2008-12-25 2009-09-09 北京邮电大学 Executable file compression and loading technologies for movable terminal
CN108228846A (en) * 2018-01-08 2018-06-29 江苏神州信源系统工程有限公司 Resource file management method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526902A (en) * 2008-12-25 2009-09-09 北京邮电大学 Executable file compression and loading technologies for movable terminal
CN108228846A (en) * 2018-01-08 2018-06-29 江苏神州信源系统工程有限公司 Resource file management method and device

Similar Documents

Publication Publication Date Title
KR102007070B1 (en) Reference block aggregating into a reference set for deduplication in memory management
Faust et al. SAMBLASTER: fast duplicate marking and structural variant read extraction
US9710256B2 (en) Software upgrade method and system for mobile terminal
US10534753B2 (en) Caseless file lookup in a distributed file system
US20130067448A1 (en) Application deployment
US10572544B1 (en) Method and system for document similarity analysis
US20140325193A1 (en) Dynamic instrumentation
US10310748B2 (en) Determining data locality in a distributed system using aggregation of locality summaries
US8560543B2 (en) Configuration item reconciliation
CN110851209A (en) Data processing method and device, electronic equipment and storage medium
CN109977976B (en) Executable file similarity detection method and device and computer equipment
CN102737205B (en) Protection comprises can the file of editing meta-data
CN103108033B (en) File uploading method and system
CN110704194A (en) Method and system for managing memory data and maintaining data in memory
CN104092555A (en) Parameter value updating method, device and system
CN109299205B (en) Method and device for warehousing spatial data used by planning industry
US11620065B2 (en) Variable length deduplication of stored data
CN107832470A (en) A kind of object storage method and device based on storage system
CN106055375A (en) Application program installation method and device
CA2852948A1 (en) System and method for optimizing the loading of data submissions
US20140201174A1 (en) Encoding and decoding delta values
CN109871408B (en) Multi-type database adaptation method, device, electronic equipment and storage medium
CN109241005A (en) A kind of file management method and relevant apparatus
CN109710626B (en) Data warehousing management method and device, electronic equipment and storage medium
EP3343395A1 (en) Data storage method and apparatus for mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20190118

WW01 Invention patent application withdrawn after publication