CN106845273B - A kind of method and apparatus for protecting intelligent terminal local file - Google Patents

A kind of method and apparatus for protecting intelligent terminal local file Download PDF

Info

Publication number
CN106845273B
CN106845273B CN201710059022.9A CN201710059022A CN106845273B CN 106845273 B CN106845273 B CN 106845273B CN 201710059022 A CN201710059022 A CN 201710059022A CN 106845273 B CN106845273 B CN 106845273B
Authority
CN
China
Prior art keywords
file
rule
protected
intelligent terminal
saved
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
CN201710059022.9A
Other languages
Chinese (zh)
Other versions
CN106845273A (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 Hongxiang Technical Service Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201710059022.9A priority Critical patent/CN106845273B/en
Publication of CN106845273A publication Critical patent/CN106845273A/en
Priority to PCT/CN2017/115665 priority patent/WO2018133580A1/en
Application granted granted Critical
Publication of CN106845273B publication Critical patent/CN106845273B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Abstract

The invention discloses a kind of methods for protecting intelligent terminal local file, wherein this method comprises: obtaining customized file saves rule;Determining needs one or more files to be protected;The designated storage area that rule will need document to be protected to be stored in intelligent terminal is saved according to customized file.As it can be seen that according to the technique and scheme of the present invention, saving rule according to customized file; one or more files to be protected are saved; to achieve the effect that the protection to file, which improves the safeties of the local file of intelligent terminal, realize protection intelligent terminal local file.

Description

A kind of method and apparatus for protecting intelligent terminal local file
Technical field
The present invention relates to field of computer technology, and in particular to a kind of method and dress for protecting intelligent terminal local file It sets.
Background technique
As the function of intelligent terminal constantly improve, user can complete various things on intelligent terminal Business, while also can be along with the generation of various local secret files.Criminal would generally be stolen using various methods Local secret file in user's intelligent terminal, causes the leakage or loss of the secret file of user, brings to user very big Loss.The safety of the local file in intelligent terminal in order to protect user is usually to carry out to intelligent terminal in the prior art Setting, such as coded lock or Fingerprint Lock are locked, but various unlocking methods are also come into being in reality, the locking of intelligent terminal is set Set the requirement for being no longer satisfied the safety of secret file.So being badly in need of a kind of intelligent terminal local file of can protect Method or apparatus.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State problem protection intelligent terminal local file method and corresponding device.
According to one aspect of the present invention, a kind of method for protecting intelligent terminal local file is provided, wherein this method Include:
It obtains customized file and saves rule;
Determining needs one or more files to be protected;
The specified storage that rule will need document to be protected to be stored in intelligent terminal is saved according to the customized file Area.
Optionally, this method further comprises:
Rule, which is saved, according to the customized file reads file from the designated storage area of intelligent terminal.
Optionally, described document to be protected to be needed to be stored in intelligent terminal according to the customized file preservation rule Designated storage area include:
Multiple data fields of continuous equal length are marked off in the designated storage area of intelligent terminal;
It is each to need the corresponding data field of document to be protected;
For each data field, the storage information of respective file is saved in its preceding first predetermined number byte, described The name information of respective file, the institute in the data field are saved in the second predetermined number byte after preceding first predetermined number byte The content of respective file is saved in region after stating the second predetermined number byte.
Optionally, the storage information of the respective file saved in the preceding first predetermined number byte includes:
File name length;
File size.
Optionally, described document to be protected to be needed to be stored in intelligent terminal according to the customized file preservation rule Designated storage area include:
The data field of file head region and multiple equal lengths is marked off in the designated storage area of intelligent terminal;
It is each to need the corresponding data field of document to be protected;
It is saved in file head region: file size and file number;
For each data field, the name information of respective file is saved in its preceding first predetermined number byte, in the number According to the content for saving respective file in the region after the first predetermined number byte in area.
Optionally, the customized file preservation rule of the acquisition includes:
Customized file, which is obtained, from given server saves rule;
Alternatively,
Customized file, which is obtained, from the local designated storage location of intelligent terminal saves rule;
Alternatively,
Customized file is obtained from the local designated storage location of intelligent terminal and saves rule, and periodically from server Customized file is obtained to save rule and be updated the customized file preservation rule locally saved.
Optionally, this method further comprises:
It is customized to getting according to preconfigured decryption method after getting customized file and saving rule File saves rule and is decrypted.
Optionally, the determining need one or more files to be protected include:
Receive the file information to be protected that server is sent;
Being determined according to the file information to be protected needs one or more files to be protected.
According to another aspect of the present invention, a kind of device for protecting intelligent terminal local file is provided, wherein the device Include:
Rule unit is suitable for obtaining customized file and saves rule;
Document determining unit, being adapted to determine that needs one or more files to be protected;
File protection location will need document to be protected to be stored in intelligence suitable for saving rule according to the customized file The designated storage area of energy terminal.
Optionally, the file protection location is further adapted for saving rule from intelligence according to the customized file Read file in the designated storage area of terminal.
Optionally, the file protection location, it is continuous etc. suitable for being marked off in the designated storage area of intelligent terminal Multiple data fields of length, it is each to need the corresponding data field of document to be protected;It is preceding first pre- at its for each data field If saving the storage information of respective file, the second predetermined number word after the preceding first predetermined number byte in number byte The name information that respective file is saved in section, saves in the region after the second predetermined number byte of the data field and corresponds to The content of file.
Optionally, the storage information of the respective file saved in the preceding first predetermined number byte includes:
File name length;
File size.
Optionally, the file protection location, suitable for marking off file Head Section in the designated storage area of intelligent terminal The data field in domain and multiple equal lengths;It is each to need the corresponding data field of document to be protected;It is saved in file head region: text Part length and file number;For each data field, the title letter of respective file is saved in its preceding first predetermined number byte Breath saves the content of respective file in the region after the first predetermined number byte of the data field.
Optionally, the Rule unit is suitable for obtaining customized file preservation rule from given server;Or Person saves rule suitable for obtaining customized file from the local designated storage location of intelligent terminal;Alternatively, being suitable for from intelligence The local designated storage location of terminal obtains customized file and saves rule, and periodically obtains customized text from server Part saves rule and saves rule to the customized file locally saved and is updated.
Optionally, the Rule unit is further adapted for after getting customized file and saving rule, according to Preconfigured decryption method is decrypted to customized file preservation rule is got.
Optionally, the document determining unit, suitable for receive server send the file information to be protected, according to it is described to Protecting the file information to determine needs one or more files to be protected.
According to the technique and scheme of the present invention, rule is saved according to customized file, by one or more text to be protected Part is saved, and to achieve the effect that the protection to file, which improves the safeties of the local file of intelligent terminal, real Protection intelligent terminal local file is showed.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of process of method for protecting intelligent terminal local file according to an embodiment of the invention Figure;
Fig. 2 shows a kind of signals for the device for protecting intelligent terminal local file according to an embodiment of the invention Figure.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Fig. 1 shows a kind of process of method for protecting intelligent terminal local file according to an embodiment of the invention Figure.As shown in Figure 1, this method comprises:
Step S110 obtains customized file and saves rule.
Step S120, determining needs one or more files to be protected;
Step S130, saving rule according to customized file will need document to be protected to be stored in the specified of intelligent terminal Memory block.
Here it is customized that the file obtained, which saves rule, therefore can save rule using different files according to demand Then.In order to which the safety of the local file in intelligent terminal is stronger, this document saves rule and can carry out irregularly or regularly Replacement.After getting customized file preservation rule, will be needed by saving rule according to the file got by one to be protected Or multiple files are stored in the corresponding position on intelligent terminal.For the ease of the reading of file, can be specified on intelligent terminal Corresponding memory block is stored.For example, it is desired to the file saved is certain pictures of intelligent terminal local, then it can be according to The file of acquisition saves rule and these pictures with protection is stored in the picture conservation zone specified on intelligent terminal.
As it can be seen that method of the invention is to save rule according to customized file, by one or more files to be protected It is saved, to achieve the effect that the protection to file, which improves the safeties of the local file of intelligent terminal, realize Protection intelligent terminal local file.
After file is saved in the designated storage area of intelligent terminal according to file preservation rule, when the opening for needing to carry out file When, it is necessary first to file is read out from corresponding memory block, it is in one embodiment of the invention, shown in FIG. 1 Method further comprises: saving rule according to customized file and reads file from the designated storage area of intelligent terminal.Because literary Part is to be saved according to preservation rule, and have recorded corresponding storage information when saving, if necessary to progress file It reads, needs to know that file saves rule, and the regular reading for carrying out file from corresponding memory block is saved according to file.The reading File is taken to be different from opening file, reading file here only reads out file from corresponding memory block, when needs are beaten When open file, the opening that corresponding decryption rule carries out file can also be further set.
It is as previously mentioned file to save there are many kinds of rules, rule can be saved using different files according to demand. In one embodiment of the invention, it lists one of file and saves rule: the file header of specific length being written first, it should File header can recorde the essential informations such as the title of file and storage information etc.;Start to save file then followed by file header Content.So, in step s 130 according to customized file save rule document to be protected will be needed to be stored in intelligence The designated storage area of terminal includes: multiple data that continuous equal length is marked off in the designated storage area of intelligent terminal Area, since it is desired that the file of protection is stored in a specified memory block, for the ease of searching, the data field marked off here It is equal length, and the length of data field here not necessarily meets the actual occupancy length of file, for example, the number divided Length according to area is 1000 bytes, and the practical occupancy of the file stored is 800 bytes, this meets the requirement of the present embodiment; Then, each to need the corresponding data field of document to be protected;When carrying out file preservation, for each data field, In The storage information that respective file is saved in its preceding first predetermined number byte, second after preceding first predetermined number byte are default The name information that respective file is saved in number byte, the preservation pair in the region after the second predetermined number byte of the data field Answer the content of file.It should be noted that the first predetermined number byte and the second predetermined number byte here do not need yet and The occupancy of the information actually saved is consistent, but need to guarantee corresponding preservation information preservation is complete.
Further, the storage information of the respective file saved in preceding first predetermined number byte includes: file name Length;File size, such as the length of the practical data field occupied of file.
Above-mentioned file saves rule and is suitable for single file, is also applied for batch documents.If for each file, The rule of file header and data field can be all made of.For example, the length of the data field divided in entire memory block is 1000 Byte, that is to say, that 0-1000 byte saves first file, and 1001-2000 byte saves the second file, and so on.Because Here it is the same that file, which saves rule, so being illustrated by taking the rule that first file saves as an example.Corresponding to first In 1000 bytes of a file, preceding first predetermined number byte is set as 20 bytes, the second predetermined number byte is 10 bytes. In the data field 0-1000 byte of corresponding first file, what is saved in 0-20 byte is the corresponding storage letter of first file Breath: file name length and file size.The name information that respective file is saved from 21-30 byte, then in 31-1000 byte The content of respective file can be saved.That is preceding 30 bytes here are considered the file header of respective file.
So in the above example, when carrying out the reading of file, so that it may according to filename corresponding in file header The length of length and file is claimed to be read out, for example, the file name length that 0-20 byte saves is 8 in 0-1000 byte, File size is 500, it follows that 8 bytes are the title of file before in the second predetermined number byte of 0-1000 byte, 500 bytes are the contents of file before in the region after the second predetermined number byte, i.e., 21-28 byte be file name Claim, in the content that 31-530 is file, carry out reading 21-28 byte and 31-530 byte when file reading, so that it may File to be read out.
In another specific example, the method for the protection intelligent terminal local file can be in user's intelligent terminal In attending to anything else.The a certain application software for needing login account is not allow to log in two simultaneously in intelligent terminal under normal conditions Account, it can thus bring great inconvenience to users.Referring to attending to anything else here can in the application on intelligent terminal To log in two accounts simultaneously.For example, wechat application, may log into two wechat accounts using attending to anything else, user can be simultaneously Personal account and work account are logged in, the experience of user is enhanced.But the secrecy of a certain account is carried out if necessary, such as can It is related to the work account of business secret, then the guard method of the file in the technical program can be used.Herein to protect It protects for good friend's head portrait in wechat work account, because good friend's image may expose the customer information in work.So With regard to providing that each head portrait is necessarily less than 1K, setting 0-1000 belongs to first head portrait file, and 1000-2000 belongs to second head portrait File, and so on.In this head portrait file of 0-1000, the storage information of preceding 16 byte records files, the 17-64 word Section is the name of file, is exactly its content then after 64 bytes, i.e. the specific content of head portrait.Here first 16 Byte just has recorded file and stores in the initial position of memory block, the length of name, the initial position of content, length of content etc. Information.
If it is batch documents, then batch documents are directed to, it is whole only with a file header, then in several equal lengths Data field storage batch documents name information and file content.In one embodiment of the invention, in step S130 Saving rule document to be protected will be needed to be stored in the designated storage area of intelligent terminal according to customized file includes: in intelligence The data field of file head region and multiple equal lengths is marked off in the designated storage area of terminal, file header and data field here It need to be continuous;It is each to need the corresponding data field of document to be protected;It is saved in file head region: file size and file Number;For each data field, the name information of respective file is saved in its preceding first predetermined number byte, in the data field The first predetermined number byte after region in save respective file content.
Each of in one example, if the file saved is several pictures, divided in entire memory block The length in image data area is 1000 bytes, and dividing file header is 20 bytes, that is to say, that 20-1020 byte saves the One picture, 1021-2020 byte save second picture, and so on.File size and guarantor are saved in 20 byte of file header The number for the picture deposited.Then it is corresponding in turn to after 21 bytes and saves each picture, the data field that each picture here saves In be additionally added the name information of every picture.The first predetermined number byte is set as 15 bytes, i.e., preceding 15 word of each data field Section saves the title of corresponding picture.For example, the picture that corresponding 20-1020 byte saves, what 21-35 was saved is the picture pair The title answered, 36-1020 save the content of picture.Meanwhile it also can be reserved for and corresponding in preceding first predetermined number byte here The length of picture.
Here need to carry out the acquisition that file saves rule before carrying out file preservation, file saves rule and can protect in advance It deposits in an intelligent terminal, can also be obtained in real time from server end.So in one embodiment of the invention, step It includes: to obtain customized file from given server to save rule that the customized file of acquisition in S110, which saves rule,;Or Person obtains customized file from the local designated storage location of intelligent terminal and saves rule.
Because file saves rule and can be replaced according to demand, to reinforce the safety of file.So in the present invention One embodiment in, the customized file of acquisition in step S110 saves rule further include: from the local of intelligent terminal Designated storage location obtains customized file and saves rule, and periodically obtains customized file from server and save rule simultaneously Rule is saved to the customized file locally saved to be updated.
Here the update that file saves rule can be the whole updating of rule, is also possible to same file and saves rule In parameter update.One of file is already indicated above in the above description and saves rule as the text of write-in specific length first Part head starts the content for saving file then followed by file header.It so can when carrying out the update of file safeguard rule Not use the rule, a rule is redefined;It can continue to using the rule, then can be by changing file The length of parameter or file header and data area in head is updated.For example, file header is 20 bytes, the data of file The length in area is 1000 bytes, then can update are as follows: file header is 30 bytes, and the length of the data field of file is 1500 words Section.
When file is read out, the memory block that rule is specified in an intelligent terminal can be saved according to file and is carried out It reads.Certain decryption rule can also be so pre-saved when opening file saves rule to customized file is got It is decrypted, prevents from opening file using other modes, further protect file.In one embodiment of the invention, Fig. 1 institute The method shown further comprises: after getting customized file and saving rule, according to preconfigured decryption method to obtaining Customized file preservation rule is got to be decrypted.
Because the premise of the technical program is to exist to need document to be protected, in order to which determination needs document to be protected, It is specified to can be user oneself, can also be specified by server.In one embodiment of the invention, in step S120 Determine that needing one or more files for protecting includes: the file information to be protected for receiving server and sending;According to be protected The file information, which determines, needs one or more files to be protected.
Fig. 2 shows a kind of signals for the device for protecting intelligent terminal local file according to an embodiment of the invention Figure.As shown in Fig. 2, the device 200 of the protection intelligent terminal local file includes:
Rule unit 210 is suitable for obtaining customized file and saves rule;
Document determining unit 220, being adapted to determine that needs one or more files to be protected;
File protection location 230 will need document to be protected to be stored in intelligence suitable for saving rule according to customized file The designated storage area of energy terminal.
Here it is customized that the file obtained, which saves rule, therefore can save rule using different files according to demand Then.In order to which the safety of the local file in intelligent terminal is stronger, this document saves rule and can carry out irregularly or regularly Replacement.After getting customized file preservation rule, will be needed by saving rule according to the file got by one to be protected Or multiple files are stored in the corresponding position on intelligent terminal.For the ease of the reading of file, can be specified on intelligent terminal Corresponding memory block is stored.For example, it is desired to the file saved is certain pictures of intelligent terminal local, then it can be according to The file of acquisition saves rule and these pictures with protection is stored in the picture conservation zone specified on intelligent terminal.
As it can be seen that method of the invention is to save rule according to customized file, by one or more files to be protected It is saved, to achieve the effect that the protection to file, which improves the safeties of the local file of intelligent terminal, realize Protection intelligent terminal local file.
After file is saved in the designated storage area of intelligent terminal according to file preservation rule, when the opening for needing to carry out file When, it is necessary first to file is read out from corresponding memory block, in one embodiment of the invention, file protection is single Member 230 is further adapted for saving rule according to customized file from the designated storage area of intelligent terminal reading file.Because literary Part is to be saved according to preservation rule, and have recorded corresponding storage information when saving, if necessary to progress file It reads, needs to know that file saves rule, and the regular reading for carrying out file from corresponding memory block is saved according to file.The reading File is taken to be different from opening file, reading file here only reads out file from corresponding memory block, when needs are beaten When open file, the opening that corresponding decryption rule carries out file can also be further set.
It is as previously mentioned file to save there are many kinds of rules, rule can be saved using different files according to demand. In one embodiment of the invention, it lists one of file and saves rule: the file header of specific length being written first, it should File header can recorde the essential informations such as the title of file and storage information etc.;Start to save file then followed by file header Content.So, file protection location 230, suitable for marking off continuous equal length in the designated storage area of intelligent terminal Multiple data fields, since it is desired that protection file be stored in a specified memory block, for the ease of search, divide here Data field out is equal length, and the length of data field here not necessarily meets the actual occupancy length of file, example Such as, the length of the data field of division is 1000 bytes, and the practical occupancy of the file stored is 800 bytes, this meets this reality Apply the requirement of example;Then, each to need the corresponding data field of document to be protected;When carrying out file preservation, for every A data field saves the storage information of respective file, in preceding first predetermined number byte in its preceding first predetermined number byte The name information that respective file is saved in the second predetermined number byte afterwards, after the second predetermined number byte of the data field The content of respective file is saved in region.It should be noted that the first predetermined number byte and the second predetermined number word here Section does not need to be consistent with the occupancy of the information actually saved yet, but need to guarantee corresponding preservation information preservation is complete.
Further, the storage information of the respective file saved in preceding first predetermined number byte includes: file name Length;File size, such as the length of the practical data field occupied of file.
Above-mentioned file saves rule and is suitable for single file, is also applied for batch documents.If for each file, The rule of file header and data field can be all made of.For example, the length of the data field divided in entire memory block is 1000 Byte, that is to say, that 0-1000 byte saves first file, and 1001-2000 byte saves the second file, and so on.Because Here it is the same that file, which saves rule, so being illustrated by taking the rule that first file saves as an example.Corresponding to first In 1000 bytes of a file, preceding first predetermined number byte is set as 20 bytes, the second predetermined number byte is 10 bytes. In the data field 0-1000 byte of corresponding first file, what is saved in 0-20 byte is the corresponding storage letter of first file Breath: file name length and file size.The name information of the respective file saved from 21-30 byte, then 31-1000 byte In can save the content of respective file.That is preceding 30 bytes here are considered the file header of respective file.
So in the above example, when carrying out the reading of file, so that it may according to filename corresponding in file header The length of length and file is claimed to be read out, for example, the file name length that 0-20 byte saves is 8 in 0-1000 byte, File size is 500, it follows that 8 bytes are the title of file before in the second predetermined number byte of 0-1000 byte, 500 bytes are the contents of file before in the region after the second predetermined number byte, i.e., 21-28 byte be file name Claim, in the content that 31-530 is file, carry out reading 21-28 byte and 31-530 byte when file reading, so that it may File to be read out.
In another specific example, the method for the protection intelligent terminal local file can be in user's intelligent terminal In attending to anything else.The a certain application software for needing login account is not allow to log in two simultaneously in intelligent terminal under normal conditions Account, it can thus bring great inconvenience to users.Referring to attending to anything else here can in the application on intelligent terminal To log in two accounts simultaneously.For example, wechat application, may log into two wechat accounts using attending to anything else, user can be simultaneously Personal account and work account are logged in, the experience of user is enhanced.But the secrecy of a certain account is carried out if necessary, such as can It is related to the work account of business secret, then the guard method of the file in the technical program can be used.Herein to protect It protects for good friend's head portrait in wechat work account, because good friend's image may expose the customer information in work.So With regard to providing that each head portrait is necessarily less than 1K, setting 0-1000 belongs to first head portrait file, and 1000-2000 belongs to second head portrait File, and so on.In this head portrait file of 0-1000, the storage information of preceding 16 byte records files, the 17-64 word Section is the name of file, is exactly its content then after 64 bytes, i.e. the specific content of head portrait.Here first 16 Byte just has recorded file and stores in the initial position of memory block, the length of name, the initial position of content, length of content etc. Information.
If it is batch documents, then batch documents are directed to, it is whole only with a file header, then in several equal lengths Data field storage batch documents name information and file content.The file protection location 230, suitable in intelligent terminal The data field of file head region and multiple equal lengths is marked off in designated storage area, file header and data field here need to be connected Continuous;It is each to need the corresponding data field of document to be protected;It is saved in file head region: file size and file number; For each data field, the name information of respective file, the institute in the data field are saved in its preceding first predetermined number byte The content of respective file is saved in region after stating the first predetermined number byte.
Each of in one example, if the file saved is several pictures, divided in entire memory block The length in image data area is 1000 bytes, and dividing file header is 20 bytes, that is to say, that 20-1020 byte saves the One picture, 1021-2020 byte save second picture, and so on.File size and guarantor are saved in 20 byte of file header The number for the picture deposited.Then it is corresponding in turn to after 21 bytes and saves each picture, the data field that each picture here saves In be additionally added the name information of every picture.The first predetermined number byte is set as 15 bytes, i.e., preceding 15 word of each data field Section saves the title of corresponding picture.For example, the picture that corresponding 20-1020 byte saves, what 21-35 was saved is the picture pair The title answered, 36-1020 save the content of picture.Meanwhile it also can be reserved for and corresponding in preceding first predetermined number byte here The length of picture.
Here need to carry out the acquisition that file saves rule before carrying out file preservation, file saves rule and can protect in advance It deposits in an intelligent terminal, can also be obtained in real time from server end.So in one embodiment of the invention, rule Acquiring unit 210 is suitable for obtaining customized file preservation rule from given server;Alternatively, being suitable for the sheet from intelligent terminal The designated storage location on ground obtains customized file and saves rule.
Because file saves rule and can be replaced according to demand, to reinforce the safety of file.So in the present invention One embodiment in, the customized file of acquisition in step S110 saves rule further include: suitable for the sheet from intelligent terminal The designated storage location on ground obtains customized file and saves rule, and periodically obtains customized file from server and save rule Then and rule is saved to the customized file locally saved to be updated.
Here the update that file saves rule can be the whole updating of rule, is also possible to same file and saves rule In parameter update.One of file is already indicated above in the above description and saves rule as the text of write-in specific length first Part head starts the content for saving file then followed by file header.It so can when carrying out the update of file safeguard rule Not use the rule, a rule is redefined;It can continue to using the rule, then can be by changing file The length of parameter or file header and data area in head is updated.For example, file header is 20 bytes, the data of file The length in area is 1000 bytes, then can update are as follows: file header is 30 bytes, and the length of the data field of file is 1500 words Section.
When file is read out, the memory block that rule is specified in an intelligent terminal can be saved according to file and is carried out It reads.Certain decryption rule can also be so pre-saved when opening file saves rule to customized file is got It is decrypted, prevents from opening file using other modes, further protect file.In one embodiment of the invention, regular Acquiring unit 210 is further adapted for after getting customized file and saving rule, according to preconfigured decryption method pair Customized file preservation rule is got to be decrypted.
Because the premise of the technical program is to exist to need document to be protected, in order to which determination needs document to be protected, It is specified to can be user oneself, can also be specified by server.In one embodiment of the invention, file determines single Member 220, the file information to be protected sent suitable for receiving server, being determined according to the file information to be protected needs one to be protected Or multiple files.
In conclusion according to the technique and scheme of the present invention, rule is saved according to customized file, by be protected one Or multiple files are saved, to achieve the effect that the protection to file, which improves the local files of intelligent terminal Safety realizes protection intelligent terminal local file.
It should be understood that
Algorithm and display be not inherently related to any certain computer, virtual bench or other equipment provided herein. Various fexible units can also be used together with teachings based herein.As described above, it constructs required by this kind of device Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, In Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) realize protection intelligent terminal local file according to an embodiment of the present invention The some or all functions of some or all components in device.The present invention is also implemented as being retouched here for executing The some or all device or device programs (for example, computer program and computer program product) for the method stated. It is such to realize that program of the invention can store on a computer-readable medium, or can have one or more signal Form.Such signal can be downloaded from an internet website to obtain, be perhaps provided on the carrier signal or with it is any its He provides form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.
The invention discloses A1, a kind of method for protecting intelligent terminal local file, wherein this method comprises:
It obtains customized file and saves rule;
Determining needs one or more files to be protected;
The specified storage that rule will need document to be protected to be stored in intelligent terminal is saved according to the customized file Area.
A2, method as described in a1, wherein this method further comprises:
Rule, which is saved, according to the customized file reads file from the designated storage area of intelligent terminal.
A3, method as described in a1, wherein described to need text to be protected according to the customized file preservation rule The designated storage area that part is stored in intelligent terminal includes:
Multiple data fields of continuous equal length are marked off in the designated storage area of intelligent terminal;
It is each to need the corresponding data field of document to be protected;
For each data field, the storage information of respective file is saved in its preceding first predetermined number byte, described The name information of respective file, the institute in the data field are saved in the second predetermined number byte after preceding first predetermined number byte The content of respective file is saved in region after stating the second predetermined number byte.
A4, the method as described in A3, wherein the storage of the respective file saved in the preceding first predetermined number byte Information includes:
File name length;
File size.
A5, method as described in a1, wherein described to need text to be protected according to the customized file preservation rule The designated storage area that part is stored in intelligent terminal includes:
The data field of file head region and multiple equal lengths is marked off in the designated storage area of intelligent terminal;
It is each to need the corresponding data field of document to be protected;
It is saved in file head region: file size and file number;
For each data field, the name information of respective file is saved in its preceding first predetermined number byte, in the number According to the content for saving respective file in the region after the first predetermined number byte in area.
A6, method as described in a1, wherein the customized file of acquisition saves rule and includes:
Customized file, which is obtained, from given server saves rule;
Alternatively,
Customized file, which is obtained, from the local designated storage location of intelligent terminal saves rule;
Alternatively,
Customized file is obtained from the local designated storage location of intelligent terminal and saves rule, and periodically from server Customized file is obtained to save rule and be updated the customized file preservation rule locally saved.
A7, method as described in a1, wherein this method further comprises:
It is customized to getting according to preconfigured decryption method after getting customized file and saving rule File saves rule and is decrypted.
A8, method as described in a1, wherein described determining to need one or more files to be protected to include:
Receive the file information to be protected that server is sent;
Being determined according to the file information to be protected needs one or more files to be protected.
The invention also discloses B9, a kind of device for protecting intelligent terminal local file, wherein the device includes:
Rule unit is suitable for obtaining customized file and saves rule;
Document determining unit, being adapted to determine that needs one or more files to be protected;
File protection location will need document to be protected to be stored in intelligence suitable for saving rule according to the customized file The designated storage area of energy terminal.
B10, the device as described in B9, wherein
The file protection location is further adapted for saving finger of the rule from intelligent terminal according to the customized file Determine memory block and reads file.
B11, the device as described in B9, wherein
The file protection location, suitable for marking off the more of continuous equal length in the designated storage area of intelligent terminal A data field, it is each to need the corresponding data field of document to be protected;For each data field, in its preceding first predetermined number word The storage information that respective file is saved in section, saves in the second predetermined number byte after the preceding first predetermined number byte The name information of respective file saves in respective file in the region after the second predetermined number byte of the data field Hold.
B12, device as described in b11, wherein the respective file saved in the preceding first predetermined number byte is deposited Storing up information includes:
File name length;
File size.
B13, the device as described in B9, wherein the file protection location, suitable for the designated storage area in intelligent terminal In mark off the data field of file head region and multiple equal lengths;It is each to need the corresponding data field of document to be protected;In text It is saved in part head region: file size and file number;For each data field, saved in its preceding first predetermined number byte The name information of respective file saves in respective file in the region after the first predetermined number byte of the data field Hold.
B14, the device as described in B9, wherein
The Rule unit is suitable for obtaining customized file preservation rule from given server;Alternatively, be suitable for from The local designated storage location of intelligent terminal obtains customized file and saves rule;Alternatively, being suitable for the sheet from intelligent terminal The designated storage location on ground obtains customized file and saves rule, and periodically obtains customized file from server and save rule Then and rule is saved to the customized file locally saved to be updated.
B15, the device as described in B9, wherein
The Rule unit is further adapted for after getting customized file and saving rule, according to matching in advance The decryption method set is decrypted to customized file preservation rule is got.
B16, the device as described in B9, wherein
The document determining unit, the file information to be protected sent suitable for receiving server, according to the text to be protected Part information, which determines, needs one or more files to be protected.

Claims (14)

1. a kind of method for protecting intelligent terminal local file, wherein this method comprises:
It obtains customized file and saves rule;
Determining needs one or more files to be protected;
The designated storage area that rule will need document to be protected to be stored in intelligent terminal is saved according to the customized file;
It is described that the specified storage that rule will need document to be protected to be stored in intelligent terminal is saved according to the customized file Area includes:
Multiple data fields of continuous equal length are marked off in the designated storage area of intelligent terminal;
It is each to need the corresponding data field of document to be protected;
For each data field, the storage information of respective file is saved in its preceding first predetermined number byte, described preceding the The name information that respective file is saved in the second predetermined number byte after one predetermined number byte, described the of the data field The content of respective file is saved in region after two predetermined number bytes.
2. the method for claim 1, wherein this method further comprises:
Rule, which is saved, according to the customized file reads file from the designated storage area of intelligent terminal.
3. the respective file the method for claim 1, wherein saved in the preceding first predetermined number byte is deposited Storing up information includes:
File name length;
File size.
4. the method for claim 1, wherein it is described according to the customized file save rule will need it is to be protected The designated storage area that file is stored in intelligent terminal includes:
The data field of file head region and multiple equal lengths is marked off in the designated storage area of intelligent terminal;
It is each to need the corresponding data field of document to be protected;
It is saved in file head region: file size and file number;
For each data field, the name information of respective file is saved in its preceding first predetermined number byte, in the data field The first predetermined number byte after region in save respective file content.
5. the method for claim 1, wherein the customized file preservation rule of the acquisition includes:
Customized file, which is obtained, from given server saves rule;
Alternatively,
Customized file, which is obtained, from the local designated storage location of intelligent terminal saves rule;
Alternatively,
Customized file is obtained from the local designated storage location of intelligent terminal and saves rule, and is periodically obtained from server Customized file saves rule and saves rule to the customized file locally saved and is updated.
6. the method for claim 1, wherein this method further comprises:
After getting customized file and saving rule, according to preconfigured decryption method to getting customized file Rule is saved to be decrypted.
7. the method for claim 1, wherein the determining need one or more files to be protected include:
Receive the file information to be protected that server is sent;
Being determined according to the file information to be protected needs one or more files to be protected.
8. a kind of device for protecting intelligent terminal local file, wherein the device includes:
Rule unit is suitable for obtaining customized file and saves rule;
Document determining unit, being adapted to determine that needs one or more files to be protected;
File protection location will need document to be protected to be stored in intelligent end suitable for saving rule according to the customized file The designated storage area at end;
The file protection location, suitable for marking off multiple numbers of continuous equal length in the designated storage area of intelligent terminal It is each to need the corresponding data field of document to be protected according to area;For each data field, in its preceding first predetermined number byte The storage information for saving respective file is saved in the second predetermined number byte after the preceding first predetermined number byte and is corresponded to The name information of file saves the content of respective file in the region after the second predetermined number byte of the data field.
9. device as claimed in claim 8, wherein
The file protection location is further adapted for being deposited according to the customized file preservation rule from the specified of intelligent terminal Storage area reads file.
10. device as claimed in claim 8, wherein the respective file saved in the preceding first predetermined number byte Storing information includes:
File name length;
File size.
11. device as claimed in claim 8, wherein the file protection location, suitable in the designated storage area of intelligent terminal The data field of file head region and multiple equal lengths is marked off in domain;It is each to need the corresponding data field of document to be protected;In It is saved in file head region: file size and file number;For each data field, protected in its preceding first predetermined number byte The name information for depositing respective file saves respective file in the region after the first predetermined number byte of the data field Content.
12. device as claimed in claim 8, wherein
The Rule unit is suitable for obtaining customized file preservation rule from given server;Alternatively, being suitable for from intelligence The local designated storage location of terminal obtains customized file and saves rule;Alternatively, being suitable for from the local of intelligent terminal Designated storage location obtains customized file and saves rule, and periodically obtains customized file from server and save rule simultaneously Rule is saved to the customized file locally saved to be updated.
13. device as claimed in claim 8, wherein
The Rule unit is further adapted for after getting customized file and saving rule, according to preconfigured Decryption method is decrypted to customized file preservation rule is got.
14. device as claimed in claim 8, wherein
The document determining unit, the file information to be protected sent suitable for receiving server are believed according to the file to be protected Breath, which determines, needs one or more files to be protected.
CN201710059022.9A 2017-01-23 2017-01-23 A kind of method and apparatus for protecting intelligent terminal local file Active CN106845273B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710059022.9A CN106845273B (en) 2017-01-23 2017-01-23 A kind of method and apparatus for protecting intelligent terminal local file
PCT/CN2017/115665 WO2018133580A1 (en) 2017-01-23 2017-12-12 Method and device for protecting local file of smart terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710059022.9A CN106845273B (en) 2017-01-23 2017-01-23 A kind of method and apparatus for protecting intelligent terminal local file

Publications (2)

Publication Number Publication Date
CN106845273A CN106845273A (en) 2017-06-13
CN106845273B true CN106845273B (en) 2019-11-29

Family

ID=59121642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710059022.9A Active CN106845273B (en) 2017-01-23 2017-01-23 A kind of method and apparatus for protecting intelligent terminal local file

Country Status (2)

Country Link
CN (1) CN106845273B (en)
WO (1) WO2018133580A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106845273B (en) * 2017-01-23 2019-11-29 北京奇虎科技有限公司 A kind of method and apparatus for protecting intelligent terminal local file
GB201810533D0 (en) * 2018-06-27 2018-08-15 Nordic Semiconductor Asa Hardware protection of files in an intergrated-circuit device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1501263A (en) * 2002-11-13 2004-06-02 �������ʿƿƼ����޹�˾ Method of actualizing safety data storage and algorithm storage in virtue of semiconductor memory device
CN101529433A (en) * 2006-10-09 2009-09-09 桑迪士克Il有限公司 Application dependent storage control

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289475A (en) * 2011-07-29 2011-12-21 宇龙计算机通信科技(深圳)有限公司 Terminal and method for storing file
CN105468692A (en) * 2015-11-17 2016-04-06 盛趣信息技术(上海)有限公司 File system structure as well as packaging method and reading method thereof
CN105740425A (en) * 2016-01-29 2016-07-06 宇龙计算机通信科技(深圳)有限公司 File storage method and apparatus
CN105787012B (en) * 2016-02-23 2019-08-27 深圳市瑞驰信息技术有限公司 A kind of method and storage system improving storage system processing small documents
CN106845273B (en) * 2017-01-23 2019-11-29 北京奇虎科技有限公司 A kind of method and apparatus for protecting intelligent terminal local file

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1501263A (en) * 2002-11-13 2004-06-02 �������ʿƿƼ����޹�˾ Method of actualizing safety data storage and algorithm storage in virtue of semiconductor memory device
CN101529433A (en) * 2006-10-09 2009-09-09 桑迪士克Il有限公司 Application dependent storage control

Also Published As

Publication number Publication date
CN106845273A (en) 2017-06-13
WO2018133580A1 (en) 2018-07-26

Similar Documents

Publication Publication Date Title
US20090210945A1 (en) Personal Information/Confidential Information Managing System And Personal Information/Confidential Information Managing Method
CN105530261B (en) The guard method of privacy information and device
CN105988896B (en) The backup method and device of a kind of mobile terminal data
CN107122169B (en) Flash function encryption method and device
US7962492B2 (en) Data management apparatus, data management method, data processing method, and program
CN105630932B (en) A kind of file management method and device of intelligent terminal
Epifani et al. Learning iOS forensics
US10706160B1 (en) Methods, systems, and articles of manufacture for protecting data in an electronic document using steganography techniques
CN108416212A (en) Method for identifying application program and device
CN104637039B (en) Picture processing method and device
CN103677638A (en) Method and device for processing private documents
CN106845273B (en) A kind of method and apparatus for protecting intelligent terminal local file
US11741259B2 (en) Protection of databases, data transmissions and files without the use of encryption
CN103561000B (en) A kind of carry out the method for multimedia authentication, device and browser
CN106203141A (en) The data processing method of a kind of application and device
JP2007179375A (en) Method and system for preventing data falsification
Tahiri Mastering mobile forensics
CN109617703B (en) Key management method and device, electronic equipment and storage medium
US20160225004A1 (en) Token verification
CN106503586B (en) A kind of method and mobile communication terminal handling application file
CN108345627A (en) The newer method, apparatus of local cache data, readable storage medium storing program for executing and equipment
WO2016188079A1 (en) Data storage method for terminal device and terminal device
JP4787077B2 (en) Personal information data processing method, program and recording medium for spreadsheet software
JP2007034423A (en) Data management device, data management method, data processing method, data storage method, and program
CN105989116B (en) A kind of collection of data method and device of collection

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211206

Address after: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, high tech Zone, Binhai New Area, Tianjin

Patentee after: 3600 Technology Group Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230627

Address after: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: Beijing Hongxiang Technical Service Co.,Ltd.

Address before: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, high tech Zone, Binhai New Area, Tianjin

Patentee before: 3600 Technology Group Co.,Ltd.