CN109558382A - File management method, electronic device and computer readable storage medium - Google Patents
File management method, electronic device and computer readable storage medium Download PDFInfo
- Publication number
- CN109558382A CN109558382A CN201811487052.0A CN201811487052A CN109558382A CN 109558382 A CN109558382 A CN 109558382A CN 201811487052 A CN201811487052 A CN 201811487052A CN 109558382 A CN109558382 A CN 109558382A
- Authority
- CN
- China
- Prior art keywords
- record
- file
- version file
- records ends
- importance
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A kind of file management method, electronic device and computer readable storage medium, in business side after the first version file for issuing target application on electronic device, the record of first version file can be generated according to the metadata and preset record create-rule of the first version file of acquisition, and saved into the corresponding set of records ends of target application;Condition is determined according to preset storage importance, the version file that importance is unsatisfactory for the first preset standard is stored in the version file of delete target application on the electronic device, and the record that importance is unsatisfactory for the second preset standard is stored in set of records ends, the history file that the application generates the publication because of version file based on above scheme, it can carry out part deletion, the amount of storage of version file is effectively reduced, it also can guarantee that certain version file carries out quick rollback for user simultaneously, and the deletion recorded in set of records ends may make that the bibliographic structure for the target application for being presented to business side is more clear simply, the burden of reduction business side.
Description
Technical field
This application involves art file management technology field more particularly to a kind of file management methods, electronic device and computer
Readable storage medium storing program for executing.
Background technique
Currently, business can be carried out by distribution platforms such as PaaS (Platform-as-a-Service, platform service)
The operation such as publication, update and rollback of application.With the continuous development of business, the application that business side updates on platform can be got over
Come it is more, using update during can generate a large amount of history file, business platform can retain these history files, so as to industry
Business side needs to carry out usage history file when rollback and quickly carries out rollback.And the publication of application that distribution platform provides, rollback, time
The operations such as going through also can allow the history file of application more and more, most important to the rationally deletion of file at this time.
Summary of the invention
The embodiment of the present application a kind of file management method, electronic device and computer readable storage medium are provided, it can be achieved that
Automatic management to file, reasonably deletes file.
The embodiment of the present application first aspect provides a kind of file management method, and this document management method includes:
In business side after the first version file for issuing target application on electronic device, the first version file is obtained
Metadata;
According to preset record create-rule and the metadata, the record of the first version file is generated, is saved
The record is into the corresponding set of records ends of the target application;
Condition is determined according to preset storage importance, deletes the version text of the target application on said electronic device
The version file that importance is unsatisfactory for the first preset standard is stored in part, and is stored described in the deletion set of records ends important
Property is unsatisfactory for the record of the second preset standard.
The embodiment of the present application second aspect provides a kind of electronic device, comprising:
Module is obtained, for after the first version file for issuing target application on electronic device, obtaining institute in business side
State the metadata of first version file;
Generation module, for generating the first edition herein according to preset record create-rule and the metadata
The record of part saves the record into the corresponding set of records ends of the target application;
Management module deletes the mesh for determining condition according to preset storage importance on said electronic device
It marks storage importance in the version file of application and is unsatisfactory for the version file of the first preset standard, and delete the set of records ends
Described in storage importance be unsatisfactory for the record of the second preset standard.
The embodiment of the present application third aspect provides another electronic device, comprising: memory, processor and is stored in storage
On device and the computer program that can run on a processor, when processor executes computer program, realize that above-mentioned the application is implemented
Each step in file management method that example first aspect provides.
The embodiment of the present application fourth aspect provides a kind of computer readable storage medium, is stored thereon with computer program,
When computer program is executed by processor, realize each in the file management method of above-mentioned the embodiment of the present application first aspect offer
Step.
Therefore in application scheme, in business side in the first version file for issuing target application on electronic device
Afterwards, the note of first version file can be generated according to the metadata and preset record create-rule of the first version file of acquisition
Record;Condition is determined according to preset storage importance, deletes store in the version file of the target application on the electronic device
Importance is unsatisfactory for the version file of the first preset standard, and deletes storage importance described in the set of records ends and be unsatisfactory for
The record of second preset standard is based on above-mentioned application scheme, and the embodiment of the present application is for because of business side's released version file institute
The history file of generation can carry out part deletion, the quantity of the version file of storage is effectively reduced, while also can guarantee one
Fixed version file provides quick rollback function for user, and the part deletion recorded in set of records ends can be presented to industry
The bibliographic structure of the target application of business side is more clear simply, realize the automation to the version file of target application and catalogue,
Intelligent management effectively reduces the cost of manual maintenance.
Detailed description of the invention
Fig. 1 is the flow diagram for the file management method that the application first embodiment provides;
Fig. 2 is the flow diagram for the file management method that the application second embodiment provides;
Fig. 3 is the program module schematic diagram for the electronic device that the application 3rd embodiment provides;
Fig. 4 is the structural schematic diagram for the electronic device that the application fourth embodiment provides.
Specific embodiment
To enable present invention purpose, feature, advantage more obvious and understandable, below in conjunction with the application
Attached drawing in embodiment, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described reality
Applying example is only some embodiments of the present application, and not all embodiments.Based on the embodiment in the application, those skilled in the art
Member's every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Currently, constantly publication application often generates many file and catalogue on distribution platform, excessive file is deposited
Storage can bring pressure to distribution platform, and excessive record can also allow business side to face the catalogue of substantial amounts in rollback, make
At the burden of business side.First embodiment of the invention provide a kind of file management method, it can be achieved that file automatic management, drop
The burden of low distribution platform and business side, this document management method include the following steps:
Step 101, business side on electronic device issue target application first version file after, obtain first version
The metadata of file;
In the present embodiment, the platform that business side issues the first version file of target application is distribution platform, and the publication is flat
The type of platform is unlimited, such as can be PaaS platform.
Above-mentioned target application can be any type of, arbitrary size application, and the present embodiment is not limited in this respect, example
It such as can be the video website of webpage version.The electronic device of the present embodiment can be deployed on distribution platform, by acting on behalf of Agent
It is communicated with distribution platform, Agent cooperates with distribution platform, application to be released can be mounted on corresponding electronic device
On, for each business side, its corresponding electronic device is respectively connected on distribution platform.
In the present embodiment, metadata includes but is not limited to download address, decompression path, the path of program, publication in operation
The information such as the MD5 value of user, issuing time and first version file.
Step 102, according to preset record create-rule and metadata, generate the record of first version file, save
Record is into the corresponding set of records ends of target application;
In the present embodiment, the record of multiple version files of target application can be used for forming the version file of target application
Catalogue, the information of each version file is quickly understood when needing rollback for business side.It optionally, include metadata in record
Information, optionally, each record in set of records ends separately includes the download address of corresponding version file, decompression path, fortune
The path of program in row, publication user, issuing time and first version file the information such as MD5 value.
Each of above-mentioned set of records ends record is corresponding with a version file of target application.It is understood that
On the electronic device, the record that target application is corresponding, has been stored on electronic device at present is contained in set of records ends.But
It is understood that recording corresponding version file for each in set of records ends, then not necessarily it is stored on electronic device.Example
Such as, 4 version files (including first version file) of target application are only stored at present on electronic device, but stores target
Corresponding 100 records of 100 version files of application, then include 100 records in set of records ends.
It optionally,, can when generating the record of first version file according to preset record create-rule and metadata
To be the metadata directly according to first version file, the record of first version file is generated.But this mode may be made
It records and occurs at the repetition of identical version file, in order to avoid such case, optionally, in the record for generating first version file
Before, the record that version file identical with first version file whether is had existed on electronic device can be first determined, if so,
Need to guarantee the record of only one final first version file.
Optionally, in the present embodiment can by can the information of unique identification version file determine and first version file
Whether the record of identical version file is already present on electronic device.In the present embodiment, the unique identification version file
Information can be the information in the metadata of version file, such as version is literary in the number, metadata of version file in metadata
The download address etc. of version file in the MD5 value and metadata of part.
Step 103 determines condition according to preset storage importance, on the electronic device the version text of delete target application
In part store importance be unsatisfactory for the first preset standard version file and deletion record set in storage importance be unsatisfactory for
The record of second preset standard.
In above-mentioned steps 103, can version file and record to the target application being currently stored on electronic device, base
Determine that condition carries out the analysis of storage importance in storage importance, storage importance meets the version file of the first preset standard
And the record of storage importance the second preset standard of satisfaction can just be saved, other version files and record are deleted.
In one embodiment, the first importance scores can be set by the first preset standard, by the second preset standard
It is set as the second importance scores;Condition is determined according to storage importance, is carried out for the importance respectively recorded in set of records ends
Assessment obtains the importance scores of each record;Will be less than the first importance scores records corresponding version file, is considered as storage
Importance is unsatisfactory for the version file of the first preset standard and is deleted;The record that will be less than the first importance scores, is considered as
Storage importance is unsatisfactory for the record of the second preset standard and is deleted.
In another embodiment, it is also based on storage importance and determines condition, each record in set of records ends is pressed
It is ranked up from high to low according to storage importance;Sequence is then based on to delete the version file and record of sequence rearward.
It is understood that in the present embodiment, after step 103, the version file and the record that are saved in electronic device
Quantity can not be identical.Generally, the memory space that version file occupies is larger, it is possible to which selection retains less version text
The burden of electronic device is effectively reduced in part;The record for retaining more version files may be selected, as a result, in business side's needs pair
It, can also be with even if the second edition file is not present in the version file of storage when target application is rolled back to second edition file
By the quick-downloading second edition file of the download address in set of records ends in the record of second edition file, rollback is completed.
In the present embodiment, suitable storage importance is set and determines condition, can be promoted and delete version file in the present embodiment
With the reasonability of record, guarantees the version file retained and record is that user is more likely to needs.
Optionally, item can be determined as setting storage importance using the issuing time of each version file in the present embodiment
The basis of part, can also be using information such as performance, user experience, the full-featured property of version file of target application as setting
Storage importance determines the basis of condition, and the present embodiment is not limited in this respect.
In the present embodiment, business side is downloaded in the target application for having issued first version on electronic device, electronic device
There is the application file of the version, and the also decompressing files of the application file with the version on electronic device, for the practical writing
Part and decompressing files can be regarded as above-mentioned first version file, using the file management side in embodiment as shown in Figure 1
Method, the decompression text of each version of the application file to each version of target application and target application carries out file management respectively.
For example, setting storage importance determines condition are as follows: issuing time is more early, and storage importance is lower;Alternatively, version is literary
The performance of part is better, and storage importance is higher;Alternatively, the better storage importance of user experience is higher;Alternatively, function is deposited more comprehensively
It is higher to store up importance.
Above scheme based on the present embodiment, the application is for because of the text of history caused by business side's released version file
Part can carry out part deletion, the quantity of the version file of storage is effectively reduced, while also can guarantee that certain version file is
User provides quick rollback function, and the part deletion recorded in set of records ends may make the target application for being presented to business side
Bibliographic structure is more clear simply, effectively promotes the usage experience of business side.
Method in Fig. 2 is a kind of file management method for refinement that second embodiment of the invention provides, this document management
Method includes:
Step 201, business side on electronic device issue target application first version file after, obtain first version
The metadata of file;
Step 202, according to metadata, in the corresponding set of records ends of target application, search whether that there are same version files
Record, is then to enter step 203, otherwise, enters step 204, wherein records corresponding version file and the with version file
One version file is identical;
Step 203, by same version file record in target application version file issuing time, be updated to the first edition
The issuing time of this document, and updated same version file is recorded into the record as first version file, save the record
Into set of records ends;Enter step 205;
Step 204, the record that first version file is generated according to metadata, save the record into set of records ends;Into
Step 205;
Step 205 determines condition according to preset storage importance, on the electronic device the version text of delete target application
In part store importance be unsatisfactory for the first preset standard version file and deletion record set in storage importance be unsatisfactory for
The record of second preset standard.
Above-mentioned steps 202-204 is the refinement step of step 102 in embodiment one.By step 202-204, for identical
The version file of version can only retain the version file of the newest record of an issuing time and a version.
In the present embodiment, can based in metadata can unique identification version file information, identify electronic device on
In set of records ends, if there is same version file record.This can unique identification version file information type it is unlimited, such as can
To be the MD5 value of version file, it can be the download address of version file, can also be start context of version file etc..
Optionally, it according to metadata, in the corresponding set of records ends of target application, searches whether to exist and remember with version file
The implementation of record includes but is not limited to three kinds below:
The first: in the corresponding set of records ends of target application, searching whether that there are under in download address and metadata
Identical first record of set address, and if it exists, then determine that first is recorded as same version file record, if it does not exist, it is determined that same
Version file record is not present;
Second, in the corresponding set of records ends of target application, search whether that there are the MD5 values in MD5 value and metadata
Identical second record, and if it exists, then determine that second is recorded as same version file record, if it does not exist, it is determined that with version text
Part record is not present;
The third searches whether that there are start contexts and first version file in the corresponding set of records ends of target application
Metadata in start context identical third record, and if it exists, then determine that the third is recorded as same version file record, if
It is not present, it is determined that be not present with version file record.
Using above-mentioned implementation, in the present embodiment, based on respectively remembering in information existing in metadata and set of records ends
The information that record includes can be determined quickly and accurately in the set of records ends on electronic device and be remembered with the presence or absence of with version file
Record, promotes the efficiency of file management.
In one embodiment, the catalogue of target application can be the generation of the record based on each version file on electronic device
, in the set of records ends on electronic device, when searching with version file record, it can be answered by target on traversal electronic device
Catalogue searches whether or to search whether there are download address the first record identical with the download address in metadata
There are identical second records of MD5 value in MD5 value and metadata, or search whether that there are in start context and metadata
The identical third record of start context.
Optionally, in the present embodiment, condition is determined according to preset storage importance, delete target is answered on the electronic device
Importance is stored in version file to be unsatisfactory for storing weight in the version file and deletion record set of the first preset standard
The record that the property wanted is unsatisfactory for the second preset standard includes: to determine condition according to preset storage importance, in set of records ends
The storage importance respectively recorded is analyzed, according to storage importance sequence from high to low in set of records ends respectively record into
Row sequence;According to sequence, corresponding version is recorded to being arranged in after the first predeterminated position in set of records ends on the electronic device
This document is deleted, and is deleted the record being arranged in after the second predeterminated position in set of records ends.
Optionally, in above scheme, the first predeterminated position is before the second predeterminated position, i.e., the note that saves in electronic device
Quantity of the quantity of record more than the version file saved in electronic device.
Optionally, the first predeterminated position can be arbitrarily arranged according to actual needs in the second predeterminated position, such as by first
Predeterminated position is set as in the record of arrangement, from front to back the 5th position of number, sets arrangement for the second preset quantity
In record, from front to back number the 100th position, i.e., on the electronic device to be arranged in set of records ends the 5th record after
The corresponding version file that records deleted, and to be arranged in set of records ends the 100th record after record carry out
It deletes
In the present embodiment, storage importance determines that condition can be configured from multiple angles, and the present embodiment does not have this
Limitation.
In practice, after business side makes improvements target application, the target application of new version is often issued, so
Issuing time is closer from current time, then its version is very big may be higher, and the performance of application may be better, storage weight
The property wanted is higher.So in one embodiment, one of condition can be determined using issuing time as setting storage importance
Basis, storage importance determine that condition is that the more early storage importance of issuing time is lower, and issuing time is deposited closer to current time
It is higher to store up importance.
Optionally, condition is determined according to preset storage importance, to the storage importance respectively recorded in set of records ends
It is analyzed, being ranked up according to the sequence of storage importance from high to low to each record in set of records ends includes: according to hair
The lower storage importance of cloth time more early storage importance, which determines, respectively records corresponding version text in condition and set of records ends
The issuing time of part is ranked up each record in set of records ends according to the sequence of storage importance from high to low.
It is understood that in one embodiment, to respectively being recorded in set of records ends according to storage importance from high to low
Sequence when being ranked up, the record of the currently running version file of electronic device is arranged in first.
For example, the record in electronic device in set of records ends has 120, then according to the publication for including in 120 records when
Between sequencing be ranked up, issuing time records more forward arrangement closer to current time.It is understood that if mesh
The new edition file publication of mark application, then it is currently running be the publication new edition file, the currently running new edition is herein
The issuing time of part is arranged in first closest to current time, the record of the new edition file.
In practice, the different editions of target application often bring the different experience of user, and user experience is often
User's selection uses an important measurement standard of the service of target application, it is possible to think the version file of target application
User experience is better, then it is higher to store importance for it.So in one embodiment, using user experience as setting storage weight
The property wanted determines a basis of condition, and storage importance determines that condition is that the better storage importance of user experience is higher, user's body
It is lower to test poorer storage importance.
Optionally, condition is determined according to preset storage importance, to the storage importance respectively recorded in set of records ends
It is analyzed, being ranked up according to the sequence of storage importance from high to low to each record in set of records ends includes: to obtain note
The user experience that corresponding version file is respectively recorded in record set, according to the higher storage weight of the better storage importance of user experience
The property wanted determines condition, is ranked up to each record in set of records ends according to the sequence of storage importance from high to low.
Optionally, in one embodiment, to the sequence respectively recorded in set of records ends according to storage importance from high to low
When being ranked up, the record of the currently running version file of electronic device is arranged in first, the note of remaining version file
Record is ranked up according to the higher rule of the better storage importance of user experience.
Optionally, in one embodiment, user experience can be by electronic device or distribution platform in corresponding version text
In the operational process of part, the information based on user feedback, and/or the Caton number based on the version file, and/or it is based on the version
What the informixes such as the errors number of this document, and/or the Caton duration based on the version file obtained.
It in one embodiment, can be by the user experience and third after the user experience for obtaining third version file
The corresponding relationship of version file saves, for example, by the record of the user experience write-in third version file of third version file into
Row saves.
In practice, distribution platform provides rollback function for business side, target application can be returned from current version
It is rolled to the second edition, after business side is rolled back to the target application of the second edition, the target application of the second edition can also recognize
For the second edition file for being business Fang Xin publication, text can also be carried out using the file management method of above-mentioned steps 201-205
Part management guarantees the quantity of version file and record stored on electronic device not over range.
Optionally, condition is being determined according to preset storage importance, on the electronic device the version of delete target application
It is discontented to be unsatisfactory for storage importance in the version file and deletion record set of the first preset standard for storage importance in file
After the record of the second preset standard of foot, further includes:
When publisher needs to roll back to the second edition file of target application, if preserving the second edition in electronic device
File then runs second edition file, completes the publication of second edition file;If the second edition is not saved in electronic device herein
Part downloads second edition file then according to the download address in set of records ends in the corresponding record of second edition file, operation the
Two version files complete the publication of second edition file, wherein the issuing time of second edition file is this publication second edition
The time of this document.
It is understood that if there is no the records of second edition file, then electronic device can lead in set of records ends
It crosses distribution platform and reports second edition file record missing information, issue the second edition file again by business side.
The embodiment of the present application discloses a kind of file management method, can answer in business side in publication target on electronic device
After first version file, the is generated according to the metadata of the first version file of acquisition and preset record create-rule
The record of one version file is kept records of into the corresponding set of records ends of target application;It is determined according to preset storage importance
Condition stores the version text that importance is unsatisfactory for the first preset standard on the electronic device in the version file of delete target application
The record that importance is unsatisfactory for the second preset standard is stored in part and deletion record set, is based on above scheme, the application couple
In because multiple history files caused by business side's released version file, can carry out part deletion, the version of storage is effectively reduced
The quantity of this document, while also can guarantee that certain version file provides quick rollback function for user, and set of records ends
Part, which is deleted, may make the bibliographic structure for the target application for being presented to business side to be more clear simply, effectively promote making for business side
With experience.
Fig. 3 is a kind of electronic device that third embodiment of the invention provides.The electronic device can be used for realizing Fig. 1 or Fig. 2
File management method in illustrated embodiment.As shown in figure 3, the electronic device specifically includes that
Module 301 is obtained, for after the first version file for issuing target application on electronic device, obtaining in business side
The metadata of first version file;
Generation module 302, for generating the note of first version file according to preset record create-rule and metadata
Record, keeps records of into the corresponding set of records ends of target application;
Management module 303, for determining condition according to preset storage importance, delete target application on the electronic device
Version file in storage importance be unsatisfactory for storing in the version file and deletion record set of the first preset standard it is important
Property is unsatisfactory for the record of the second preset standard.
In the present embodiment, the record of multiple version files of target application can be used for forming the version file of target application
Catalogue, the information of each version file is quickly understood when needing rollback for business side.It optionally, include metadata in record
Information, optionally, each record in set of records ends separately includes the download address of corresponding version file, decompression path, fortune
The path of program in row, publication user, issuing time and first version file the information such as MD5 value.
Optionally, management module 303, for determining condition according to preset storage importance, to each in set of records ends
The storage importance of record is analyzed, and is carried out according to the sequence of storage importance from high to low to each record in set of records ends
Sequence;According to sequence, corresponding version is recorded to being arranged in after the first predeterminated position in set of records ends on the electronic device
File is deleted, and is deleted the record being arranged in after the second predeterminated position in set of records ends, wherein first is pre-
If position is before the second predeterminated position.
Optionally, management module 303, for being determined according to the lower storage importance of the more early storage importance of issuing time
The issuing time that corresponding version file is respectively recorded in condition and set of records ends, to each record in set of records ends according to depositing
The sequence of storage importance from high to low is ranked up.
Optionally, management module 303, for obtaining the user experience for respectively recording corresponding version file in set of records ends,
Condition is determined according to the higher storage importance of the better storage importance of user experience, and each in set of records ends is recorded according to depositing
The sequence of storage importance from high to low is ranked up.
Optionally, generation module 302, for being searched whether in the corresponding set of records ends of target application according to metadata
It is recorded in the presence of same version file;If so, by same version file record in target application version file issuing time, more
New is the issuing time of first version file, and updated same version file is recorded to the record as first version file;
If it is not, then generating the record of first version file according to metadata, wherein record corresponding version file and the with version file
One version file is identical.
Optionally, in one embodiment, generation module 302, for searching in the corresponding set of records ends of target application
With the presence or absence of download address the first record identical with the download address in metadata, and if it exists, then determine that first is recorded as together
Version file record, if it does not exist, it is determined that be not present with version file record.
Optionally, in another embodiment, generation module 302, for looking into the corresponding set of records ends of target application
It looks for the presence or absence of identical second record of MD5 value in MD5 value and metadata, and if it exists, then determine that second is recorded as same version
File record, if it does not exist, it is determined that be not present with version file record.
Optionally, which further includes roll-back module, for needing to roll back to the second of target application as publisher
When version file, if preserving second edition file in electronic device, second edition file is run, completes second edition file
Publication;If not saving second edition file in electronic device, according to the corresponding record of second edition file in set of records ends
In download address, download second edition file, run second edition file, complete the publication of second edition file, wherein the
The issuing time of two version files is the time of this publication second edition file.
The electronic device of the present embodiment can reasonably delete target application old version file and record, be effectively reduced
The quantity of the version file of storage, while also can guarantee that certain version file provides quick rollback function for user, and remember
The deletion of record in record set may make the bibliographic structure for the target application for being presented to business side to be more clear simply, effectively mention
Rise the usage experience of business side.
Referring to Fig. 4, Fig. 4 is a kind of electronic device that fourth embodiment of the invention provides.The electronic device can be used for reality
File management method in existing Fig. 1 and embodiment illustrated in fig. 2.As shown in figure 4, the electronic device specifically includes that
It memory 401, processor 402, bus 403 and is stored on memory 401 and can run on the processor 402
Computer program, memory 401 and processor 402 are connected by bus 403.It is real when processor 402 executes the computer program
Show the file management method in Fig. 1 or embodiment illustrated in fig. 2.Wherein, the quantity of processor can be one or more.
Memory 401 can be high random access memory body (RAM, Random Access Memory) memory,
It can be non-labile memory (non-volatile memory), such as magnetic disk storage.Memory 401 can for storing
Program code is executed, processor 402 is coupled with memory 401.
Therefore the electronic device of the embodiment of the present invention business side on electronic device issue target application first
After version file, first version can be generated according to the metadata of the first version file of acquisition and preset record create-rule
The record of file is kept records of into the corresponding set of records ends of target application;Condition is determined according to preset storage importance,
Storage importance is unsatisfactory for the version file of the first preset standard in the version file that delete target is applied on electronic device, and
Store importance in deletion record set and be unsatisfactory for the record of the second preset standard, be based on above scheme, the application for because
History file caused by business side's released version file can carry out part deletion, the number of the version file of storage is effectively reduced
Amount, while also can guarantee that certain version file provides quick rollback function for user, and the deletion of the part of set of records ends can
So that the bibliographic structure for being presented to the target application of business side is more clear simply, the usage experience of business side is effectively promoted.
Further, the embodiment of the present application also provides a kind of computer readable storage medium, the computer-readable storages
Medium can be in the electronic device being set in the various embodiments described above, which can be earlier figures 4
Memory in illustrated embodiment.
Be stored with computer program on the computer readable storage medium, the program realized when being executed by processor Fig. 1 or
File management method in embodiment illustrated in fig. 2.Further, the computer can storage medium can also be USB flash disk, mobile hard
Disk, read-only memory (ROM, Read-Only Memory), RAM, magnetic or disk etc. be various to can store program code
Medium.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it
Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of module, only
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple module or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of device or module
It connects, can be electrical property, mechanical or other forms.
Module may or may not be physically separated as illustrated by the separation member, show as module
Component may or may not be physical module, it can and it is in one place, or may be distributed over multiple networks
In module.Some or all of the modules therein can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, can integrate in a processing module in each functional module in each embodiment of the application
It is that modules physically exist alone, can also be integrated in two or more modules in a module.Above-mentioned integrated mould
Block both can take the form of hardware realization, can also be realized in the form of software function module.
If integrated module is realized and when sold or used as an independent product in the form of software function module, can
To be stored in a computer readable storage medium.Based on this understanding, the technical solution of the application substantially or
Say that all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products
Out, which is stored in a readable storage medium storing program for executing, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) execute each embodiment method of the application whole or
Part steps.And readable storage medium storing program for executing above-mentioned includes: that USB flash disk, mobile hard disk, ROM, RAM, magnetic or disk etc. are various can be with
Store the medium of program code.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because
According to the application, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this Shen
It please be necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
The above are retouching to file management method provided herein, electronic device and computer readable storage medium
It states, for those skilled in the art, according to the thought of the embodiment of the present application, can in specific embodiments and applications
There is change place, to sum up, the contents of this specification should not be construed as limiting the present application.
Claims (10)
1. a kind of file management method characterized by comprising
In business side after the first version file for issuing target application on electronic device, the member of the first version file is obtained
Data;
According to preset record create-rule and the metadata, the record of the first version file is generated, described in preservation
Record is into the corresponding set of records ends of the target application;
Condition is determined according to preset storage importance, in the version file for deleting the target application on said electronic device
Storage importance is unsatisfactory for the version file of the first preset standard, and deletes storage importance described in the set of records ends not
Meet the record of the second preset standard.
2. file management method according to claim 1, which is characterized in that described to be determined according to preset storage importance
Condition deletes storage importance in the version file of the target application on said electronic device and is unsatisfactory for the first preset standard
Version file, and delete storage importance described in the set of records ends and be unsatisfactory for the record of the second preset standard and include:
Condition is determined according to preset storage importance, and the storage importance respectively recorded in the set of records ends is divided
Analysis is ranked up each record in the set of records ends according to the sequence of the storage importance from high to low;
According to the sequence, on said electronic device to the record being arranged in the set of records ends after the first predeterminated position
Corresponding version file is deleted, and is deleted to the record being arranged in after the second predeterminated position in the set of records ends
It removes, wherein first predeterminated position is before second predeterminated position.
3. file management method according to claim 2, which is characterized in that described to be determined according to preset storage importance
Condition analyzes the storage importance respectively recorded in the set of records ends, from high to low according to the storage importance
Sequence each record in the set of records ends is ranked up and includes:
It is determined in condition and the set of records ends according to the lower storage importance of the more early storage importance of issuing time and is respectively remembered
The issuing time for recording corresponding version file, in the set of records ends it is each record according to the storage importance from high to low
Sequence be ranked up.
4. file management method according to claim 2, which is characterized in that described to be determined according to preset storage importance
Condition analyzes the storage importance respectively recorded in the set of records ends, from high to low according to the storage importance
Sequence each record in the set of records ends is ranked up and includes:
The user experience that corresponding version file is respectively recorded in the set of records ends is obtained, it is important according to the better storage of user experience
Property higher storage importance determine condition, to each record in the set of records ends according to the storage importance from high to low
Sequence be ranked up.
5. file management method according to claim 1-4, which is characterized in that described to be given birth to according to preset record
Include: at rule and the metadata, the record for generating the first version file
According to the metadata, in the corresponding set of records ends of Yu Suoshu target application, search whether exist with version file record,
It is wherein, described that with version file to record corresponding version file identical as the first version file;
If so, the issuing time of the version file of the target application in the same version file record is updated to institute
The issuing time of first version file is stated, and by the updated same version file record as the first version file
Record;
If it is not, then generating the record of the first version file according to the metadata.
6. file management method according to claim 5, which is characterized in that described according to the metadata, Yu Suoshu mesh
Mark application corresponding set of records ends in, search whether exist with version file record include:
In the corresponding set of records ends of the target application, search whether there are the downloading in download address and the metadata
Identical first record in location, and if it exists, then determine that described first is recorded as same version file record, if it does not exist, it is determined that institute
Same version file record is stated to be not present;
Alternatively, searching whether that there are the MD5 in MD5 value and the metadata in the corresponding set of records ends of the target application
It is worth identical second record, and if it exists, then determine that described second is recorded as same version file record, if it does not exist, it is determined that institute
Same version file record is stated to be not present.
7. file management method according to claim 1-4, which is characterized in that described according to preset storage
Importance determines condition, deletes on said electronic device and stores importance in the version file of the target application and be unsatisfactory for the
The version file of one preset standard, and delete storage importance described in the set of records ends and be unsatisfactory for the second preset standard
After record, further includes:
When the publisher needs to roll back to the second edition file of the target application, if being preserved in the electronic device
The second edition file then runs the second edition file, completes the publication of the second edition file;If the electronics
The second edition file is not saved in device, then in the corresponding record of second edition file according to the set of records ends
Download address, download the second edition file, run the second edition file, complete the hair of the second edition file
Cloth, wherein the issuing time of the second edition file is that this issues the time of the second edition file.
8. a kind of electronic device characterized by comprising
Module is obtained, after the first version file that target application is issued on the electronic device described in business Fang Yu, obtains institute
State the metadata of first version file;
Generation module, for generating the first version file according to preset record create-rule and the metadata
Record saves the record into the corresponding set of records ends of the target application;
Management module is deleted the target on said electronic device and is answered for determining condition according to preset storage importance
The version file that importance is unsatisfactory for the first preset standard is stored in version file, and deletes institute in the set of records ends
State the record that storage importance is unsatisfactory for the second preset standard.
9. a kind of electronic device, comprising: memory, processor and be stored on the memory and can transport on the processor
Capable computer program, which is characterized in that when the processor executes the computer program, realize in claim 1 to 7 and appoint
Step in the method for anticipating.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
When being executed by processor, the step in any one the method in claim 1 to 7 is realized.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811487052.0A CN109558382B (en) | 2018-12-06 | 2018-12-06 | File management method, electronic device and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811487052.0A CN109558382B (en) | 2018-12-06 | 2018-12-06 | File management method, electronic device and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109558382A true CN109558382A (en) | 2019-04-02 |
CN109558382B CN109558382B (en) | 2022-07-19 |
Family
ID=65869416
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811487052.0A Active CN109558382B (en) | 2018-12-06 | 2018-12-06 | File management method, electronic device and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109558382B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112148350A (en) * | 2020-09-04 | 2020-12-29 | 深圳市大富网络技术有限公司 | Remote version management method for works, electronic device and computer storage medium |
CN112817923A (en) * | 2021-02-20 | 2021-05-18 | 北京奇艺世纪科技有限公司 | Application program data processing method and device |
WO2022095395A1 (en) * | 2020-11-09 | 2022-05-12 | 百度在线网络技术(北京)有限公司 | Sampling target determination method and apparatus, and electronic device and computer-readable storage medium |
US11934292B2 (en) | 2020-11-09 | 2024-03-19 | Baidu Online Network Technology (Beijing) Co., Ltd. | Sampling object determination method, electronic device, and computer-readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090043774A1 (en) * | 2007-08-11 | 2009-02-12 | Gosukonda Naga Sudhakar | Techniques for retaining security restrictions with file versioning |
US9304980B1 (en) * | 2007-10-15 | 2016-04-05 | Palamida, Inc. | Identifying versions of file sets on a computer system |
CN106886410A (en) * | 2017-01-06 | 2017-06-23 | 深圳云天励飞技术有限公司 | A kind of software version management system |
CN108009186A (en) * | 2017-02-15 | 2018-05-08 | 北京车和家信息技术有限责任公司 | Service release switching method, service release switching device and server |
CN108108467A (en) * | 2017-12-29 | 2018-06-01 | 北京奇虎科技有限公司 | Data-erasure method and device |
CN108595186A (en) * | 2018-03-27 | 2018-09-28 | 天津麒麟信息技术有限公司 | Multiversion software management method based on total function on a kind of platform of soaring |
-
2018
- 2018-12-06 CN CN201811487052.0A patent/CN109558382B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090043774A1 (en) * | 2007-08-11 | 2009-02-12 | Gosukonda Naga Sudhakar | Techniques for retaining security restrictions with file versioning |
US9304980B1 (en) * | 2007-10-15 | 2016-04-05 | Palamida, Inc. | Identifying versions of file sets on a computer system |
CN106886410A (en) * | 2017-01-06 | 2017-06-23 | 深圳云天励飞技术有限公司 | A kind of software version management system |
CN108009186A (en) * | 2017-02-15 | 2018-05-08 | 北京车和家信息技术有限责任公司 | Service release switching method, service release switching device and server |
CN108108467A (en) * | 2017-12-29 | 2018-06-01 | 北京奇虎科技有限公司 | Data-erasure method and device |
CN108595186A (en) * | 2018-03-27 | 2018-09-28 | 天津麒麟信息技术有限公司 | Multiversion software management method based on total function on a kind of platform of soaring |
Non-Patent Citations (1)
Title |
---|
彭刚: "一种面向容灾存储系统的重复数据删除方法", 《网络安全技术与应用》, no. 04, 15 April 2018 (2018-04-15) * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112148350A (en) * | 2020-09-04 | 2020-12-29 | 深圳市大富网络技术有限公司 | Remote version management method for works, electronic device and computer storage medium |
WO2022095395A1 (en) * | 2020-11-09 | 2022-05-12 | 百度在线网络技术(北京)有限公司 | Sampling target determination method and apparatus, and electronic device and computer-readable storage medium |
US11934292B2 (en) | 2020-11-09 | 2024-03-19 | Baidu Online Network Technology (Beijing) Co., Ltd. | Sampling object determination method, electronic device, and computer-readable storage medium |
CN112817923A (en) * | 2021-02-20 | 2021-05-18 | 北京奇艺世纪科技有限公司 | Application program data processing method and device |
CN112817923B (en) * | 2021-02-20 | 2024-03-26 | 北京奇艺世纪科技有限公司 | Application program data processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109558382B (en) | 2022-07-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109558382A (en) | File management method, electronic device and computer readable storage medium | |
US10248661B2 (en) | Method and device for pulling virtual machine mirror file | |
CN103678494B (en) | Client synchronization services the method and device of end data | |
CN104391725A (en) | Page display method and page display device | |
CN106484906A (en) | A kind of distributed objects storage system flash back method and device | |
CN106933836B (en) | Data storage method and system based on sub-tables | |
CN107480205B (en) | Method and device for partitioning data | |
CN108140050A (en) | A kind of method and device using Bloom filter filtering file | |
CN112328872A (en) | Information display method, information search method and device | |
CN111444181A (en) | Knowledge graph updating method and device and electronic equipment | |
CN106227893A (en) | A kind of file type acquisition methods and device | |
CN109117442B (en) | Application recommendation method and device | |
CN110018982A (en) | Method, apparatus, equipment and the computer readable storage medium of locating file | |
CN104850428A (en) | Method and device for updating user interface of mobile client | |
CN107247722A (en) | File scanning method and device and intelligent terminal | |
CN114281779A (en) | Data synchronization method and device, computer equipment and storage medium | |
CN104331343A (en) | File backup method and system | |
CN105138604A (en) | Terminal data processing method and apparatus | |
CN108200127A (en) | Data transmission method for uplink, device, server, terminal and storage medium | |
CN105653550A (en) | Web page filtering method and device | |
CN110502173A (en) | A kind of interface content processing method, device and computer readable storage medium | |
CN110147381B (en) | Information processing method, system and recording medium | |
CN106156210B (en) | Method and device for determining application identifier matching list | |
CN106325925A (en) | Browser service information updating method and device | |
CN114466387B (en) | Updating method and device of configuration file of base station, storage medium and electronic device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |