CN103870564B - A kind of data-updating method and electronic equipment - Google Patents

A kind of data-updating method and electronic equipment Download PDF

Info

Publication number
CN103870564B
CN103870564B CN201410086305.9A CN201410086305A CN103870564B CN 103870564 B CN103870564 B CN 103870564B CN 201410086305 A CN201410086305 A CN 201410086305A CN 103870564 B CN103870564 B CN 103870564B
Authority
CN
China
Prior art keywords
file
electronic equipment
scanned
memory cell
database
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
CN201410086305.9A
Other languages
Chinese (zh)
Other versions
CN103870564A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201410086305.9A priority Critical patent/CN103870564B/en
Publication of CN103870564A publication Critical patent/CN103870564A/en
Application granted granted Critical
Publication of CN103870564B publication Critical patent/CN103870564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of data-updating method, for the file in SD card to be updated in mobile phone database.Methods described includes:When detection determines that first electronic equipment is connected with the second electronic equipment, the file in the memory cell is scanned, whether judgement wherein has in the database that file does not update first electronic equipment;When there is file not update in the database, by the file not updated in database renewal into the database, so that these files can be shown in the display unit of second electronic equipment.The invention also discloses corresponding electronic equipment.

Description

A kind of data-updating method and electronic equipment
Technical field
The present invention relates to field of computer technology, more particularly to a kind of data-updating method and electronic equipment.
Background technology
In the prior art, using Android(A kind of mobile phone operating system)A database in mobile phone be present, be, for example, mediaprovider(Media provision end)File(File)Form.The SD inserted in mobile phone(Secure Digital Memory Card, safe digital card)The data of card, only update in the database, when mobile phone is connected with equipment such as PC, These data are just visible at PC ends.
At present, mobile phone with PC(Personal computer)When being connected etc. equipment, generally by MTP(Media Transfer Protocol, media transmission protocol)To realize data interaction.But MTP is media transport protocol, general can be by SD card Database in multimedia file real-time update to mobile phone, and for other kinds of file, even if it is present in SD card, hand Machine will not be also updated in database, it is clear that when mobile phone connect PC when, PC ends be all for many files it is sightless, So as to be operated at PC ends to these files, operation inconvenience is caused, weakens the operability of electronic equipment.
For such case, probably there are following two solutions at present:
1st, mobile phone production firm applies to some more crucial grinding certainly and individually handled, that is, ensures these applying institute Caused data are updated in database.The shortcomings that program is:Present types of applications is very various, if one by one more Changing, it is clear that workload is very huge, and if only change is a small amount of, it is clear that can not meet demand.
2nd, in general mobile phone, storehouse can be actively updated the data when restarting start, therefore, PC ends are to all after mobile phone is restarted File is visible.The shortcomings that program is:Operate complex, required time is longer.
It can be seen that in the prior art, the problem of can not being updated for the file in SD card, it there is no preferable solution method.
The content of the invention
The embodiment of the present invention provides a kind of data-updating method and electronic equipment, for solving in SD card in the prior art File can not update to the technical problem in mobile phone database.
A kind of data-updating method, applied to the first electronic equipment, first electronic equipment is connected with a memory cell Connect, the described method comprises the following steps:
When detection determines that first electronic equipment is connected with the second electronic equipment, to the file in the memory cell It is scanned, whether judgement wherein has in the database that file does not update first electronic equipment;
When there is file not update in the database, by the file not updated in database renewal described in In database, so that these files can be shown in the display unit of second electronic equipment.
Preferably, when detection determines that first electronic equipment is connected with the second electronic equipment, to the memory cell In file be scanned, including:
Monitoring event is detected, determines that first electronic equipment is connected with second electronic equipment;
Whether the type for judging second electronic equipment is preset kind;
When the type of second electronic equipment is the preset kind, the file in the memory cell is swept Retouch.
Preferably, the file in the memory cell is scanned, including:It is first to level in the memory cell The file of level is scanned.
Preferably, when level in the memory cell is scanned for the file of the first order, in addition to:
Detection determines the operation for having for wherein the first file;
Interrupt event is produced, interrupts the scanning to current file, and starts to be scanned first file, judges institute State whether the first file has been updated in the database;
If first file is not updated in the database, by first file renewal into the database;
If first file has been updated in the database, continue the scanning to current file.
Preferably, after level is scanned for the file of the first order in the memory cell, in addition to:According to pre- If rule is scanned to the remaining file in the memory cell.
Preferably, the remaining file in the memory cell is scanned according to preset rules, including:
According to the level of remaining file, remaining file is scanned successively;Or
According to the modification time of remaining file, scanned since the file of newest modification;Or
Remaining file is scanned at random;Or
According to catalogue corresponding to remaining file, remaining file is scanned successively.
Preferably, after the file in the memory cell is scanned, in addition to:
Detection determines the connection number of first electronic equipment and second electronic equipment in preset duration for the Number;
Judge whether first number is more than preset times threshold value;
If first number is more than the preset times threshold value, continue to sweep the file in the memory cell Retouch;
If first number is less than the preset times threshold value, stop sweeping the file in the memory cell Retouch.
A kind of electronic equipment, the electronic equipment are connected with a memory cell, and the electronic equipment includes:
Scanning element, for when detection determines that first electronic equipment is connected with the second electronic equipment, being deposited to described File in storage unit is scanned, and whether judgement wherein has in the database that file does not update first electronic equipment;
Updating block, for when there is file not update in the database, will not update in the database File is updated into the database, so that these files can be shown in the display unit of second electronic equipment.
Preferably, the scanning element is specifically used for:Detect monitoring event, determine first electronic equipment with it is described Second electronic equipment is connected;Whether the type for judging second electronic equipment is preset kind;When second electronic equipment Type when being the preset kind, the file in the memory cell is scanned.
Preferably, the scanning element is specifically used for:Level in the memory cell is swept for the file of the first order Retouch.
Preferably, the scanning element is additionally operable to:Detection determines the operation for having for wherein the first file;Produce interruption Event, the scanning to current file is interrupted, and start to be scanned first file, whether to judge first file Update in the database;If first file is not updated in the database, institute is arrived into first file renewal State in database;If first file has been updated in the database, continue the scanning to current file.
Preferably, the scanning element is additionally operable to:The remaining file in the memory cell is carried out according to preset rules Scanning.
Preferably, the scanning element is specifically additionally operable to:According to the level of remaining file, remaining file is swept successively Retouch;Or, the modification time according to remaining file, scanned since the file of newest modification;Or, remaining file is swept at random Retouch;Or, the catalogue according to corresponding to remaining file, remaining file is scanned successively.
Preferably, the electronic equipment also includes detection unit and judging unit;
The detection unit, which is used to detect, determines that first electronic equipment is set with second electronics in preset duration Standby connection number is first number;
The judging unit is used to judge whether first number is more than preset times threshold value;
If the scanning element, which is additionally operable to first number, is more than the preset times threshold value, continue single to the storage File in member is scanned;And if first number is less than the preset times threshold value, stops in the memory cell File be scanned.
In the embodiment of the present invention, when first electronic equipment is connected with second electronic equipment, first electricity Sub- equipment can scan the file in the memory cell, timely more so as to will not update the file in the database Newly into the database, so, no matter for the what kind of file in the memory cell, as long as first electronics Equipment is connected with second electronic equipment, and first electronic equipment automatically can be arrived the renewal of these files by scanning In the database, such as first electronic equipment is mobile phone, second electronic equipment is PC, the memory cell is SD Card, then, it is clear that when mobile phone connects PC, PC ends are visible for each file, so as to directly enter at PC ends to these files Row operation, offers convenience to operation, improves the operability of electronic equipment.
Brief description of the drawings
Fig. 1 is the broad flow diagram of data-updating method in the embodiment of the present invention;
Fig. 2 is the primary structure block diagram of the first electronic equipment in the embodiment of the present invention.
Embodiment
A kind of data-updating method is provided in the embodiment of the present invention, methods described can apply to the first electronic equipment, institute Stating the first electronic equipment can be connected with a memory cell, and methods described includes:When detection determines first electronic equipment When being connected with the second electronic equipment, the file in the memory cell is scanned, whether judgement wherein has file not update Into the database of first electronic equipment;When there is file not update in the database, the number will not be updated Updated according to the file in storehouse into the database, so that these files can be shown in the display list of second electronic equipment In member.
In the embodiment of the present invention, when first electronic equipment is connected with second electronic equipment, first electricity Sub- equipment can scan the file in the memory cell, timely more so as to will not update the file in the database Newly into the database, so, no matter for the what kind of file in the memory cell, as long as first electronics Equipment is connected with second electronic equipment, and first electronic equipment automatically can be arrived the renewal of these files by scanning In the database, such as first electronic equipment is mobile phone, second electronic equipment is PC, the memory cell is SD Card, then, it is clear that when mobile phone connects PC, PC ends are visible for each file, so as to directly enter at PC ends to these files Row operation, offers convenience to operation, improves the operability of electronic equipment.
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
In the embodiment of the present invention, first electronic equipment can be mobile phone, PAD(Tablet personal computer)Etc. different electronics Equipment, the invention is not limited in this regard.
In the embodiment of the present invention, second electronic equipment can be the different electronic equipment of PC, intelligent television etc., this Invention is not restricted to this.
In addition, the terms "and/or", only a kind of incidence relation for describing affiliated partner, represents there may be Three kinds of relations, for example, A and/or B, can be represented:Individualism A, while A and B be present, these three situations of individualism B.Separately Outside, character "/" herein, it is a kind of relation of "or" to typically represent forward-backward correlation object.
The preferred embodiment of the present invention is described in detail below in conjunction with the accompanying drawings.
Fig. 1 is referred to, the embodiment of the present invention provides a kind of data-updating method, and methods described can apply to the first electronics Equipment, first electronic equipment can be connected with a memory cell.The main flow of methods described is described as follows.
Step 101:When detection determines that first electronic equipment is connected with the second electronic equipment, to the memory cell In file be scanned, judgement wherein whether have in the database that file does not update first electronic equipment.
Preferably, in the embodiment of the present invention, first electronic equipment can be by wired with second electronic equipment Mode is connected, such as passes through USB(USB)Interface is connected, or can also wirelessly be connected.
Preferably, when detection determines that first electronic equipment is connected with second electronic equipment, to the storage File in unit is scanned, and can be included:Monitoring event is detected, determines first electronic equipment and the described second electricity Sub- equipment is connected;Whether the type for judging second electronic equipment is preset kind;When the type of second electronic equipment When being the preset kind, the file in the memory cell is scanned.
Kernel in first electronic equipment(Kernel)Layer increase AVAILABLE(Monitor)Event, first electricity Sub- equipment can be by monitoring whether the first electronic equipment described in action listener is connected with second electronic equipment, and can sentence Whether breaking, the type of second electronic equipment be the preset kind.If it is mobile phone with first electronic equipment, described Exemplified by second electronic equipment is PC, it is whether the USB for monitoring mobile phone has been effectively connected on PC, rather than is connected to charger On.
Framework(Framework)Layer passes through AVAILABLE events, however, it is determined that first electronic equipment is connected to described Second electronic equipment, and the type of second electronic equipment is the preset kind, then scanning can be opened, to the storage File in unit is scanned, and whether judgement wherein has in the database that file does not update first electronic equipment.
If it is that the memory cell can exemplified by mobile phone, second electronic equipment are PC by first electronic equipment To refer to the SD card being embedded in the mobile phone, multiple files can be stored with SD card, first electronic equipment can be opened Scanning to the SD card.The database can refer to the file forms of mediaprovider in the mobile phone, that is, scan institute Whether state in SD card has file not update in the database.
In the embodiment of the present invention, by a file renewal into database, refer to store this document in the database Corresponding information, be stored in the database can be this document in itself, or can also be the description information of this document etc., As long as by information storage corresponding to this document in the database, by first electronic equipment and second electronic equipment When being connected, by the display unit of second electronic equipment with regard to this document can be seen.
Preferably, in one embodiment of the invention, the file in the memory cell is scanned, can be included:To institute Level in memory cell is stated to be scanned for the file of the first order.
For the memory cell, multiple files can be stored with, multiple files of storage can be divided into multiple layers Level.In general, the level for opening file of the memory cell with regard to that can see is properly termed as the first order, it is necessary to be directed to first again The level that level file carries out the file that an opening operation can just be seen is properly termed as the second level, by that analogy.
Because first class paper is to open the file just to be seen at first of memory cell, therefore in the embodiment of the present invention First class paper can be scanned first, so if user opens institute in the display unit of second electronic equipment State memory cell, first just it can be seen that all first class papers, ensure the demand of user.
Preferably, in one embodiment of the invention, level is scanned for the file of the first order in the memory cell When, it can also include:Detection determines the operation for having for wherein the first file;Interrupt event is produced, is interrupted to current file Scanning, and start to be scanned first file, judge whether first file has been updated in the database; If first file is not updated in the database, by first file renewal into the database;If described One file has been updated in the database, continues the scanning to current file.
First file can be any file in the multiple files stored in the memory cell, first text The level of part is also likely to be any level.
When first electronic equipment is connected with second electronic equipment, the display unit of second electronic equipment In can show the file stored in the memory cell.If user is checked by the display unit of second electronic equipment The file stored in the memory cell, then user may operate to one of file, such as user is for wherein First file operated, first electronic equipment is scanned to level for the file of the first order, if Detection determines the operation for having for first file, then can produce interrupt event, interrupt the text to currently scanning The scanning of part, and start to scan first file, judge whether first file has been updated in the database.
Preferably, can also include the subfile of multiple different levels in first file, i.e., described first file Corresponding to a catalogue, multiple files can be included in the catalogue, this multiple file corresponds to different levels.User exists When being operated to first file, the file that level is located on the level of first file is likely to be updated to In the database, and the file that level is located under the level of first file is likely to not update the data also In storehouse, then, first electronic equipment can be scanned to the subfile of wherein each level, scanning process can be by Scanned successively according to level, or can also be each level while be scanned, preferably or to level positioned at described File under the level of first file is scanned, and whether judgement wherein has file not update in the database.If Judge to determine wherein there is file not update in the database, be the equal of to determine that first file does not update the number According in storehouse, then first electronic equipment arrives the file not updated in first file in database renewal described In database, first file is updated into the database equivalent to first electronic equipment.To described first After file scan, if not detecting the further operation of user, first electronic equipment can continue to scan on it Preceding not scanned file, if detecting the further operation of user, user can be continued to scan on according to the operation of user The targeted file of operation.
And after to first file scan, if it is determined that determining there is no file not update in first file Into the database, i.e., described first file has been updated in the database, then first electronic equipment can continue Not scanned file, that is, continue the scanning to current file before scanning.
Can customer-centric, when user operates first file, usually need to see described First file and including all subfiles, then first electronic equipment preferentially first file can be swept Retouch, ensure that user can see first file in time, meet the needs of user.It is meanwhile complete to first file scan It can continue to be scanned file not scanned before after finishing, normal file scan work will not be delayed.
Further, in one embodiment of the invention, level is swept for the file of the first order in the memory cell After retouching, it can also include:The remaining file in the memory cell is scanned according to preset rules.It is described surplus herein Remaining file refers to the remaining file in addition to first class paper.
Preferably, in one embodiment of the invention, the remaining file in the memory cell is swept according to preset rules Retouch, can include:According to the level of remaining file, remaining file is scanned successively;Or, during according to the modification of remaining file Between, scanned since the file of newest modification;Or, remaining file is scanned at random;Or, according to mesh corresponding to remaining file Record, is scanned to remaining file successively.
For example, can be scanned according to the level of remaining file, such as the file that level is the second level can be first scanned, it Level is scanned afterwards as file of the third level, etc..
Such as it can be scanned according to the modification time of remaining file.Each file in remaining file can then be determined Modification time, be scanned successively according to the order of modification time from the near to the remote.Because the file of newest modification is likely to It is not in time for renewal also into the database, preferentially these files can be scanned, can so obtains in time more New effect, modification time pass by longer file and are likely to be updated in the database, can be subsequently right again These files are scanned.
For example, it can be scanned successively according to catalogue corresponding to remaining file.In general, multiple files pair be might have Ying Yuyi catalogue, under this catalogue, this multiple file divide into first class paper, second level file etc., can be according to Catalogue is respectively scanned.
Preferably, in one embodiment of the invention, the remaining file in the memory cell is being carried out according to preset rules During scanning, in addition to:Detection determines the operation for having for wherein the second file;Interrupt event is produced, is interrupted to current file Scanning, and start to be scanned second file, judge whether second file has been updated in the database; If second file is not updated in the database, by second file renewal into the database;If described Two files have been updated in the database, continue the scanning to current file.
Second file can be any file in the multiple files stored in the memory cell, second text The level of part is also likely to be any level.
When first electronic equipment is connected with second electronic equipment, the display unit of second electronic equipment In can show the file stored in the memory cell.If user is checked by the display unit of second electronic equipment The file stored in the memory cell, then user may operate to one of file, such as user is for wherein Second file operated, first electronic equipment is swept to the remaining file in addition to first class paper Retouch, if detection determines the operation for having for second file, interrupt event can be produced, interrupted to currently scanning File scanning, and start to scan second file, judge whether second file has been updated in the database.
Preferably, can also include the subfile of multiple different levels in second file, i.e., described second file Corresponding to a catalogue, multiple files can be included in the catalogue, this multiple file corresponds to different levels.User exists When being operated to second file, the file that level is located on the level of second file is likely to be updated to In the database, and the file that level is located under the level of second file is likely to not update the data also In storehouse, then, first electronic equipment can be scanned to the subfile of wherein each level, scanning process can be by Scanned successively according to level, or can also be each level while be scanned, preferably or to level positioned at described File under the level of second file is scanned, and whether judgement wherein has file not update in the database.If Judge to determine wherein there is file not update in the database, be the equal of to determine that second file does not update the number According in storehouse, then first electronic equipment arrives the file not updated in second file in database renewal described In database, second file is updated into the database equivalent to first electronic equipment.To described second After file scan, if not detecting the further operation of user, first electronic equipment can continue to scan on it Preceding not scanned file, if detecting the further operation of user, user can be continued to scan on according to the operation of user The targeted file of operation.
And after to second file scan, if it is determined that determining there is no file not update in second file Into the database, i.e., described second file has been updated in the database, then first electronic equipment can continue Not scanned file, that is, continue the scanning to current file before scanning.
Can customer-centric, when user operates second file, usually need to see described Second file and including all subfiles, then first electronic equipment preferentially second file can be swept Retouch, ensure that user can see second file in time, meet the needs of user.It is meanwhile complete to second file scan It can continue to be scanned file not scanned before after finishing, normal file scan work will not be delayed.
I.e., no matter at any time, as long as there is the operation of user, first electronic equipment all can be preferentially according to user Operation is scanned, and ensures the demand of user.
Further,, can be with after the file in the memory cell is scanned in one embodiment of the invention Including:Detection determines that the connection number of first electronic equipment and second electronic equipment is first time in preset duration Number;Judge whether first number is more than preset times threshold value;If first number is more than the preset times threshold value, after It is continuous that file in the memory cell is scanned;If first number is less than the preset times threshold value, stop to institute The file stated in memory cell is scanned.
First electronic equipment with second electronic equipment after being connected, if being connected by wired mode, Such as be connected by USB interface, user may ceaselessly plug USB interface, or the possible loose contact of USB interface, so as to The phenomenon of multiple break-make occurs.In general, when first electronic equipment is connected with second electronic equipment, described first Electronic equipment can start to scan, and when first electronic equipment and second electronic equipment disconnect, described first Electronic equipment can stop scanning.And repeatedly the situation of break-make, first electronic equipment need ceaselessly to stop in the event of more than Only scanner uni starts to scan, more power consumption, also easily causes the failure of first electronic equipment.Therefore the embodiment of the present invention is adopted With a kind of protection mechanism, after first electronic equipment starts scanning, if detected described in the preset duration The connection number of first electronic equipment and second electronic equipment is first number, then whether may determine that first number More than the preset times threshold value, if first number is more than the preset times threshold value, it is likely to loose contact, then First electronic equipment can continue to be scanned the file in the memory cell, without by first electronic equipment The influence of break-make, can so meet the needs of user between second electronic equipment, also avoid first electricity as far as possible Sub- equipment breaks down.It is probably that user is disconnected described if first number is less than the preset times threshold value Connection between one electronic equipment and second electronic equipment, the display unit of second electronic equipment may be without display File in the memory cell, then first electronic equipment is without being scanned, then first electronic equipment can be with Stop current scanning work.Electric energy can be so saved, also mitigates the work of first electronic equipment.
Step 102:When there is file not update in the database, by the file not updated in the database more Newly into the database, so that these files can be shown in the display unit of second electronic equipment.
If it is determined that there is file not update in the database in the memory cell, then the file not updated these is more Newly into the database, so, user just can see these files on the display unit of second electronic equipment, from And conveniently these files are operated.
Fig. 2 is referred to, the embodiment of the present invention provides a kind of electronic equipment, and the electronic equipment can be with a memory cell phase Connection, the electronic equipment can be foregoing first electronic equipment.The electronic equipment can include scanning element 201 And updating block 202.
Scanning element 201 can be used for when detection determines that first electronic equipment is connected with the second electronic equipment, right File in the memory cell is scanned, and whether judgement wherein has the data that file does not update first electronic equipment In storehouse.
Updating block 202 can be used for, when there is file not update in the database, updating the data File in storehouse is updated into the database, so that these files can be shown in the display unit of second electronic equipment In.
Optionally, in the embodiment of the present invention, scanning element 201 specifically can be used for:Monitoring event is detected, it is determined that described First electronic equipment is connected with second electronic equipment;Whether the type for judging second electronic equipment is preset kind; When the type of second electronic equipment is the preset kind, the file in the memory cell is scanned.
Optionally, in the embodiment of the present invention, scanning element 201 specifically can be used for:It is to level in the memory cell The file of the first order is scanned.
Optionally, in the embodiment of the present invention, scanning element 201 can be also used for:Detection, which determines to exist, is directed to wherein first The operation of file;Interrupt event is produced, interrupts the scanning to current file, and starts to be scanned first file, is sentenced Whether first file that breaks has been updated in the database;, will if first file is not updated in the database The first file renewal is into the database;If first file has been updated in the database, continue to current The scanning of file.
Optionally, in the embodiment of the present invention, scanning element 201 can be also used for:It is single to the storage according to preset rules Remaining file in member is scanned.
Optionally, in the embodiment of the present invention, scanning element 201 specifically can be also used for:According to the level of remaining file, according to It is secondary that remaining file is scanned;Or, the modification time according to remaining file, scanned since the file of newest modification;Or, with Machine is scanned to remaining file;Or, the catalogue according to corresponding to remaining file, remaining file is scanned successively.
Optionally, in the embodiment of the present invention, the electronic equipment can also include detection unit and judging unit.
The detection unit can be used for detection and determine first electronic equipment and the described second electricity in preset duration The connection number of sub- equipment is first number;
The judging unit can be used for judging whether first number is more than preset times threshold value;
If scanning element 201, which can be also used for first number, is more than the preset times threshold value, continue to deposit to described File in storage unit is scanned;And if first number is less than the preset times threshold value, stop single to the storage File in member is scanned.
A kind of data-updating method is provided in the embodiment of the present invention, methods described can apply to the first electronic equipment, institute Stating the first electronic equipment can be connected with a memory cell, and methods described includes:When detection determines first electronic equipment When being connected with the second electronic equipment, the file in the memory cell is scanned, whether judgement wherein has file not update Into the database of first electronic equipment;When there is file not update in the database, the number will not be updated Updated according to the file in storehouse into the database, so that these files can be shown in the display list of second electronic equipment In member.
In the embodiment of the present invention, when first electronic equipment is connected with second electronic equipment, first electricity Sub- equipment can scan the file in the memory cell, timely more so as to will not update the file in the database Newly into the database, so, no matter for the what kind of file in the memory cell, as long as first electronics Equipment is connected with second electronic equipment, and first electronic equipment automatically can be arrived the renewal of these files by scanning In the database, such as first electronic equipment is mobile phone, second electronic equipment is PC, the memory cell is SD Card, then, it is clear that when mobile phone connects PC, PC ends are visible for each file, so as to directly enter at PC ends to these files Row operation, offers convenience to operation, improves the operability of electronic equipment.
It is apparent to those skilled in the art that for convenience and simplicity of description, only with above-mentioned each function The division progress of module, can be as needed and by above-mentioned function distribution by different function moulds for example, in practical application Block is completed, i.e., the internal structure of device is divided into different functional modules, to complete all or part of work(described above Energy.The specific work process of the system, apparatus, and unit of foregoing description, it may be referred to corresponding in preceding method embodiment Journey, it will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with Realize by another way.For example, device embodiment described above is only schematical, for example, the module or The division of unit, only a kind of division of logic function, can there are other dividing mode, such as multiple units when actually realizing Or component can combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, institute Display or the mutual coupling discussed or direct-coupling or communication connection can be by some interfaces, device or unit INDIRECT COUPLING or communication connection, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use When, it can be stored in a computer read/write memory medium.Based on such understanding, the technical scheme of the application is substantially The part to be contributed in other words to prior art or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are causing a computer Equipment(Can be personal computer, server, or network equipment etc.)Or processor(processor)It is each to perform the application The all or part of step of embodiment methods described.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory(RAM, Random Access Memory), magnetic disc or CD Etc. it is various can be with the medium of store program codes.
Specifically, computer program instructions corresponding to a kind of data-updating method in the embodiment of the present application can be deposited Storage is in the storage mediums such as CD, hard disk, USB flash disk, when computer journey corresponding with a kind of data-updating method in storage medium When sequence instruction is read or is performed by an electronic equipment, comprise the following steps:
When detection determines that first electronic equipment is connected with the second electronic equipment, to the file in the memory cell It is scanned, whether judgement wherein has in the database that file does not update first electronic equipment;
When there is file not update in the database, by the file not updated in database renewal described in In database, so that these files can be shown in the display unit of second electronic equipment.
Optionally, stored in the storage medium and step:When detection determines first electronic equipment and the second electricity When sub- equipment is connected, the file in the memory cell is scanned, corresponding computer instruction during being performed, Specifically include:
Monitoring event is detected, determines that first electronic equipment is connected with second electronic equipment;
Whether the type for judging second electronic equipment is preset kind;
When the type of second electronic equipment is the preset kind, the file in the memory cell is swept Retouch.
Optionally, stored in the storage medium and step:File in the memory cell is scanned, it is corresponding Computer instruction during specific be performed, specifically include:
Level in the memory cell is scanned for the file of the first order.
Optionally, stored in the storage medium and step:To the file that level in the memory cell is the first order It is scanned, corresponding computer instruction specifically also includes during specific be performed:
Detection determines the operation for having for wherein the first file;
Interrupt event is produced, interrupts the scanning to current file, and starts to be scanned first file, judges institute State whether the first file has been updated in the database;
If first file is not updated in the database, by first file renewal into the database;
If first file has been updated in the database, continue the scanning to current file.
Optionally, stored in the storage medium and step:To the file that level in the memory cell is the first order Be scanned, corresponding computer instruction after specific be performed, in addition to:
The remaining file in the memory cell is scanned according to preset rules.
Optionally, stored in the storage medium and step:According to preset rules to the residue in the memory cell File is scanned, and corresponding computer instruction specifically includes during specific be performed:
According to the level of remaining file, remaining file is scanned successively;Or
According to the modification time of remaining file, scanned since the file of newest modification;Or
Remaining file is scanned at random;Or
According to catalogue corresponding to remaining file, remaining file is scanned successively.
Optionally, stored in the storage medium and step:File in the memory cell is scanned, it is corresponding Computer instruction after specific be performed, in addition to:
Detection determines the connection number of first electronic equipment and second electronic equipment in preset duration for the Number;
Judge whether first number is more than preset times threshold value;
If first number is more than the preset times threshold value, continue to sweep the file in the memory cell Retouch;
If first number is less than the preset times threshold value, stop sweeping the file in the memory cell Retouch.
Described above, above example is implemented above only the technical scheme of the application to be described in detail The explanation of example is only intended to help the method and its core concept for understanding the present invention, should not be construed as limiting the invention.This Those skilled in the art the invention discloses technical scope in, the change or replacement that can readily occur in should all be covered Within protection scope of the present invention.

Claims (12)

1. a kind of data-updating method, applied to the first electronic equipment, first electronic equipment is connected with a memory cell, It the described method comprises the following steps:
When detection determines that first electronic equipment is connected with the second electronic equipment, the file in the memory cell is carried out Whether scanning, judgement wherein have in the database that file does not update first electronic equipment;
When there is file not update in the database, the data are arrived into the file not updated in database renewal In storehouse, so that the file can be shown in the display unit of second electronic equipment;
After the file in the memory cell is scanned, in addition to:
Detection determines that the connection number of first electronic equipment and second electronic equipment is first time in preset duration Number;
Judge whether first number is more than preset times threshold value;
If first number is more than the preset times threshold value, continue to be scanned the file in the memory cell;
If first number is less than the preset times threshold value, stop being scanned the file in the memory cell.
2. the method as described in claim 1, it is characterised in that when detection determines that first electronic equipment is set with the second electronics When standby connected, the file in the memory cell is scanned, including:
Monitoring event is detected, determines that first electronic equipment is connected with second electronic equipment;
Whether the type for judging second electronic equipment is preset kind;
When the type of second electronic equipment is the preset kind, the file in the memory cell is scanned.
3. the method as described in claim 1, it is characterised in that the file in the memory cell is scanned, including:It is right Level is scanned for the file of the first order in the memory cell.
4. the method as described in claim 1-3 is any, it is characterised in that level is the first order in the memory cell When file is scanned, in addition to:
Detection determines the operation for having for wherein the first file;
Interrupt event is produced, interrupts the scanning to current file, and start to be scanned first file, judges described the Whether one file has been updated in the database;
If first file is not updated in the database, by first file renewal into the database;
If first file has been updated in the database, continue the scanning to current file.
5. method as claimed in claim 3, it is characterised in that level is entered for the file of the first order in the memory cell After row scanning, in addition to:The remaining file in the memory cell is scanned according to preset rules.
6. method as claimed in claim 5, it is characterised in that according to preset rules to the remaining file in the memory cell It is scanned, including:
According to the level of remaining file, remaining file is scanned successively;Or
According to the modification time of remaining file, scanned since the file of newest modification;Or
Remaining file is scanned at random;Or
According to catalogue corresponding to remaining file, remaining file is scanned successively.
7. a kind of electronic equipment, the electronic equipment is connected with a memory cell, and the electronic equipment includes:
Scanning element, for when detection determines that the electronic equipment is connected with the second electronic equipment, in the memory cell File be scanned, judgement wherein whether have in the database that file does not update the electronic equipment;
Updating block, for when there is file not update in the database, will not update the file in the database Update in the database, so that these files can be shown in the display unit of second electronic equipment;
Detection unit, the connection number of the electronic equipment and second electronic equipment in preset duration is determined for detecting For first number;
Judging unit, for judging whether first number is more than preset times threshold value;
If the scanning element, which is additionally operable to first number, is more than the preset times threshold value, continue in the memory cell File be scanned;And if first number is less than the preset times threshold value, stops to the text in the memory cell Part is scanned.
8. electronic equipment as claimed in claim 7, it is characterised in that the scanning element is specifically used for:Detect monitoring thing Part, determine that the electronic equipment is connected with second electronic equipment;Whether the type for judging second electronic equipment is pre- If type;When the type of second electronic equipment is the preset kind, the file in the memory cell is swept Retouch.
9. electronic equipment as claimed in claim 7, it is characterised in that the scanning element is specifically used for:It is single to the storage Level is scanned for the file of the first order in member.
10. the electronic equipment as described in claim 7-9 is any, it is characterised in that the scanning element is additionally operable to:Detection determines In the presence of the operation for wherein the first file;Interrupt event is produced, interrupts the scanning to current file, and start to described first File is scanned, and judges whether first file has been updated in the database;If first file does not update In the database, by first file renewal into the database;If first file has updated the data In storehouse, continue the scanning to current file.
11. electronic equipment as claimed in claim 9, it is characterised in that the scanning element is additionally operable to:According to preset rules pair Remaining file in the memory cell is scanned.
12. electronic equipment as claimed in claim 11, it is characterised in that the scanning element is specifically additionally operable to:According to residue The level of file, remaining file is scanned successively;Or, the modification time according to remaining file, from the file of newest modification Start to scan;Or, remaining file is scanned at random;Or, the catalogue according to corresponding to remaining file, remaining file is entered successively Row scanning.
CN201410086305.9A 2014-03-10 2014-03-10 A kind of data-updating method and electronic equipment Active CN103870564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410086305.9A CN103870564B (en) 2014-03-10 2014-03-10 A kind of data-updating method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410086305.9A CN103870564B (en) 2014-03-10 2014-03-10 A kind of data-updating method and electronic equipment

Publications (2)

Publication Number Publication Date
CN103870564A CN103870564A (en) 2014-06-18
CN103870564B true CN103870564B (en) 2017-12-29

Family

ID=50909094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410086305.9A Active CN103870564B (en) 2014-03-10 2014-03-10 A kind of data-updating method and electronic equipment

Country Status (1)

Country Link
CN (1) CN103870564B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105205100A (en) * 2015-08-24 2015-12-30 青岛海信移动通信技术股份有限公司 Data synchronization method based on MTP between terminals and terminals
CN106339494A (en) * 2016-08-31 2017-01-18 重庆卓美华视光电有限公司 Playing content management and control method and device
CN106649596A (en) * 2016-11-24 2017-05-10 歌尔科技有限公司 Method and device for displaying folder catalogue in intelligent terminal
CN107770265B (en) * 2017-10-17 2019-08-23 Oppo广东移动通信有限公司 A kind of method of data synchronization, data synchronization unit and mobile terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957854A (en) * 2010-09-26 2011-01-26 宇龙计算机通信科技(深圳)有限公司 Data storage method of media files and mobile terminal
CN102867044A (en) * 2012-09-05 2013-01-09 深圳市网卓信息科技有限公司 Method for synchronizing files at PC (personal computer) end by mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8413884B2 (en) * 2011-03-03 2013-04-09 Life In Mobile, Inc. Method and apparatus for dynamically presenting content in response to successive scans of a static code

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957854A (en) * 2010-09-26 2011-01-26 宇龙计算机通信科技(深圳)有限公司 Data storage method of media files and mobile terminal
CN102867044A (en) * 2012-09-05 2013-01-09 深圳市网卓信息科技有限公司 Method for synchronizing files at PC (personal computer) end by mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
youth0632. android 的Android Media Scanner多媒体扫描路径问题.《仰思的专栏》.2011,第1-3页. *

Also Published As

Publication number Publication date
CN103870564A (en) 2014-06-18

Similar Documents

Publication Publication Date Title
CN104156414B (en) A kind of method for cleaning of garbage files, device and terminal
CN103870564B (en) A kind of data-updating method and electronic equipment
CN104915306B (en) A kind of data manipulation control method and equipment manager
CN106060909A (en) Network access method and mobile terminal
CN103488498A (en) Computer booting method and computer
CN108228210A (en) A kind of resource regeneration method and system
CN104125206B (en) The hardware environment adaptation method of a kind of client, device, server and system
CN104035857B (en) System junk cleaning performance detecting method and device
CN109739690B (en) Backup method and related products
CN104123496B (en) The hold-up interception method and device of a kind of rogue software, terminal
CN107608705A (en) A kind of wireless WIFI video equipments and its firmware upgrade method
CN104182330B (en) Application recommendation method and device and terminal
CN106201811A (en) The fault recovery method of application program and terminal
CN107608828A (en) Method, system, device and the storage medium that data center's power down recovers automatically
CN103853594A (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND COMPUTER Program
CN103473145B (en) Terminal crash reset method, device and terminal
CN103870319B (en) Information processing method, device and electronic equipment
CN106776908A (en) Data clearing method, device and terminal
CN102656575B (en) Message transfer system and information transferring method
CN103561089B (en) Virtual machine desktop log-in, Apparatus and system
CN103838642B (en) A kind of data reconstruction method, device and system
CN105468348A (en) Method and apparatus for displaying custom interface on terminal, and terminal
CN103383652B (en) The switching method of the multiple operating systems of computer platform
CN106354359A (en) Method and device for managing copy application and terminal
CN109508323A (en) A kind of document storage system and file memory method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant