CN103870564A - Data updating method and electronic equipment - Google Patents

Data updating method and electronic equipment Download PDF

Info

Publication number
CN103870564A
CN103870564A CN201410086305.9A CN201410086305A CN103870564A CN 103870564 A CN103870564 A CN 103870564A CN 201410086305 A CN201410086305 A CN 201410086305A CN 103870564 A CN103870564 A CN 103870564A
Authority
CN
China
Prior art keywords
file
electronic equipment
storage unit
database
scanned
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410086305.9A
Other languages
Chinese (zh)
Other versions
CN103870564B (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

Images

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 data updating method, which is used for timely updating files in an SD (secure digital) card into a mobile phone database. The method comprises the following steps that when first electronic equipment is confirmed to be connected with second electronic equipment by detecting, the files in a storage unit are scanned, and whether files which are not updated into the database of the first electronic equipment exist or not is judged; when the files which are not updated into the database exist, the files which are not updated into the database are updated into the database so that the files can be displayed in a display unit of the second electronic equipment. The invention also discloses the corresponding electronic equipment.

Description

A kind of data-updating method and electronic equipment
Technical field
The present invention relates to field of computer technology, particularly a kind of data-updating method and electronic equipment.
Background technology
In prior art, use Android(mobile phone operating system) there is a database in mobile phone, be for example mediaprovider(media provision end) file(file) form.The SD(Secure Digital Memory Card inserting in mobile phone, safe digital card) data of card, be only updated in this database, in the time that the equipment such as mobile phone and PC are connected, these data are held just visible at PC.
At present, mobile phone with PC(personal computer) etc. when equipment connection, be generally by MTP(Media Transfer Protocol, media transmission protocol) realize data interaction.But MTP is multimedia transmission agreement, general only can be by the multimedia file real-time update in SD card to the database in mobile phone, and for the file of other types, even if it is present in SD card, mobile phone can be updated in database yet, obviously, in the time that mobile phone connects PC, PC end is all sightless for a lot of files, thereby cannot operate these files at PC end, cause operation inconvenience, weakened the operability of electronic equipment.
For this situation, probably there are at present following two kinds of solutions:
1, mobile phone production firm processes separately some more crucial application of certainly grinding, and guarantees that the data that these application are produced update in database.The shortcoming of this scheme is: present types of applications is very various, if change one by one, obviously workload is very huge, and if only change is a small amount of, obviously cannot satisfy the demands.
2, general mobile phone, more new database of meeting active in the time restarting start, therefore, after mobile phone is restarted, PC end is visible to All Files.The shortcoming of this scheme is: operation is comparatively complicated, and required time is longer.
Visible, in prior art, the problem that cannot upgrade for the file in SD card, there is no good solution.
Summary of the invention
The embodiment of the present invention provides a kind of data-updating method and electronic equipment, cannot update to the technical matters in data in mobile phone storehouse for the file solving in prior art SD card.
A kind of data-updating method, is applied to the first electronic equipment, and described the first electronic equipment is connected with a storage unit, said method comprising the steps of:
In the time that detection determines that described the first electronic equipment is connected with the second electronic equipment, the file in described storage unit is scanned, whether judgement wherein has file not to be updated in the database of described the first electronic equipment;
In the time having file not to be updated in described database, will not be updated to file update in described database in described database, so that these files can be presented in the display unit of described the second electronic equipment.
Preferably, in the time that detection determines that described the first electronic equipment is connected with the second electronic equipment, the file in described storage unit is scanned, comprising:
Monitoring event detected, determine that described the first electronic equipment is connected with described the second electronic equipment;
Whether the type that judges described the second electronic equipment is preset kind;
In the time that the type of described the second electronic equipment is described preset kind, the file in described storage unit is scanned.
Preferably, the file in described storage unit is scanned, comprising: the file that in described storage unit, level is the first order is scanned.
Preferably, when the file that level is the first order in to described storage unit scans, also comprise:
Detect and determine that existence is for the wherein operation of the first file;
Produce interrupt event, interrupt the scanning to current file, and start described the first file to scan, judge whether described the first file has been updated in described database;
If described the first file is not updated in described database, by described the first file update in described database;
If described the first file has been updated in described database, continue the scanning to current file.
Preferably, after the file that level is the first order in to described storage unit scans, also comprise: according to preset rules, the residue file in described storage unit is scanned.
Preferably, according to preset rules, the residue file in described storage unit is scanned, comprising:
According to the level of residue file, successively residue file is scanned; Or
According to the modification time of residue file, start scanning from the file of up-to-date modification; Or
At random residue file is scanned; Or
According to catalogue corresponding to residue file, successively residue file is scanned.
Preferably, after the file in described storage unit is scanned, also comprise:
Detection determines that described the first electronic equipment is first number with the number of times that is connected of described the second electronic equipment in default duration;
Judge whether described first number is greater than preset times threshold value;
If described first number is greater than described preset times threshold value, continue the file in described storage unit to scan;
If described first number is less than described preset times threshold value, stop the file in described storage unit to scan.
A kind of electronic equipment, described electronic equipment is connected with a storage unit, and described electronic equipment comprises:
Scanning element, in the time that detection determines that described the first electronic equipment is connected with the second electronic equipment, scans the file in described storage unit, and whether judgement wherein has file not to be updated in the database of described the first electronic equipment;
Updating block, in the time having file not to be updated to described database, will not be updated to file update in described database in described database, so that these files can be presented in the display unit of described the second electronic equipment.
Preferably, described scanning element specifically for: monitoring event detected, determine that described the first electronic equipment is connected with described the second electronic equipment; Whether the type that judges described the second electronic equipment is preset kind; In the time that the type of described the second electronic equipment is described preset kind, the file in described storage unit is scanned.
Preferably, described scanning element specifically for: the file that in described storage unit, level is the first order is scanned.
Preferably, described scanning element also for: detect determine exist for the wherein operation of the first file; Produce interrupt event, interrupt the scanning to current file, and start described the first file to scan, judge whether described the first file has been updated in described database; If described the first file is not updated in described database, by described the first file update in described database; If described the first file has been updated in described database, continue the scanning to current file.
Preferably, described scanning element also for: according to preset rules, the residue file of described storage unit is scanned.
Preferably, described scanning element specifically also for: according to residue file level, successively to residue file scan; Or, according to the modification time of residue file, start scanning from the file of up-to-date modification; Or, at random residue file is scanned; Or, according to catalogue corresponding to residue file, successively residue file is scanned.
Preferably, described electronic equipment also comprises detecting unit and judging unit;
Described detecting unit is for detection of determining that described the first electronic equipment is first number with the number of times that is connected of described the second electronic equipment in default duration;
Described judging unit is used for judging whether described first number is greater than preset times threshold value;
If described scanning element is also greater than described preset times threshold value for described first number, continue the file in described storage unit to scan; And if described first number be less than described preset times threshold value, stop the file in described storage unit to scan.
In the embodiment of the present invention, in the time that described the first electronic equipment is connected with described the second electronic equipment, described the first electronic equipment can scan the file in described storage unit, thereby the file not being updated in described database can be updated in described database, like this, no matter for the file of what type in described storage unit, as long as described the first electronic equipment is connected with described the second electronic equipment, described the first electronic equipment can by scanning automatically by these file updates in described database, for example described the first electronic equipment is mobile phone, described the second electronic equipment is PC, described storage unit is SD card, , obviously, in the time that mobile phone connects PC, PC end is all visible for each file, thereby can directly operate these files at PC end, offer convenience to operation, improve the operability of electronic equipment.
Accompanying drawing explanation
Fig. 1 is the main process 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, described method can be applied to the first electronic equipment, described the first electronic equipment can be connected with a storage unit, described method comprises: in the time that detection determines that described the first electronic equipment is connected with the second electronic equipment, file in described storage unit is scanned, and whether judgement wherein has file not to be updated in the database of described the first electronic equipment; In the time having file not to be updated in described database, will not be updated to file update in described database in described database, so that these files can be presented in the display unit of described the second electronic equipment.
In the embodiment of the present invention, in the time that described the first electronic equipment is connected with described the second electronic equipment, described the first electronic equipment can scan the file in described storage unit, thereby the file not being updated in described database can be updated in described database, like this, no matter for the file of what type in described storage unit, as long as described the first electronic equipment is connected with described the second electronic equipment, described the first electronic equipment can by scanning automatically by these file updates in described database, for example described the first electronic equipment is mobile phone, described the second electronic equipment is PC, described storage unit is SD card, , obviously, in the time that mobile phone connects PC, PC end is all visible for each file, thereby can directly operate these files at PC end, offer convenience to operation, improve the operability of electronic equipment.
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
In the embodiment of the present invention, described the first electronic equipment can be mobile phone, PAD(panel computer) etc. different electronic equipments, the present invention is not restricted this.
In the embodiment of the present invention, described the second electronic equipment can be the different electronic equipment of PC, intelligent television etc., and the present invention is not restricted this.
In addition, term "and/or" herein, is only a kind of incidence relation of describing affiliated partner, and expression can exist three kinds of relations, and for example, A and/or B, can represent: individualism A exists A and B, these three kinds of situations of individualism B simultaneously.In addition, character "/" herein, generally represents that forward-backward correlation is to liking a kind of relation of "or".
Below in conjunction with accompanying drawing, the preferred embodiment of the present invention is elaborated.
Refer to Fig. 1, the embodiment of the present invention provides a kind of data-updating method, and described method can be applied to the first electronic equipment, and described the first electronic equipment can be connected with a storage unit.The main flow process of described method is described below.
Step 101: in the time that detection determines that described the first electronic equipment is connected with the second electronic equipment, the file in described storage unit is scanned, whether judgement wherein has file not to be updated in the database of described the first electronic equipment.
Preferably, in the embodiment of the present invention, described the first electronic equipment can be connected by wired mode with described the second electronic equipment, for example, by USB(USB (universal serial bus)) interface is connected, or also can be connected by wireless mode.
Preferably, in the time that detection determines that described the first electronic equipment is connected with described the second electronic equipment, the file in described storage unit is scanned, can comprise: monitoring event detected, determine that described the first electronic equipment is connected with described the second electronic equipment; Whether the type that judges described the second electronic equipment is preset kind; In the time that the type of described the second electronic equipment is described preset kind, the file in described storage unit is scanned.
Kernel(kernel in described the first electronic equipment) layer increase AVAILABLE(monitoring) event, whether described the first electronic equipment can be connected with described the second electronic equipment by monitoring the first electronic equipment described in action listener, and whether the type that can judge described the second electronic equipment is described preset kind.If take described the first electronic equipment be mobile phone, described the second electronic equipment be PC as example, be to monitor the USB of mobile phone whether to be effectively connected to PC upper, but not be connected on charger.
Framework(framework) layer is by AVAILABLE event, if determine, described the first electronic equipment has been connected to described the second electronic equipment, and the type of described the second electronic equipment is described preset kind, can open scanning, file in described storage unit is scanned, and whether judgement wherein has file not to be updated in the database of described the first electronic equipment.
If be that mobile phone, described the second electronic equipment are that PC is as example take described the first electronic equipment, described storage unit can refer to the SD card embedding in described mobile phone, in SD card, can store multiple files, described the first electronic equipment can be opened the scanning to described SD card.Whether described database can refer to the file form of mediaprovider in described mobile phone, scan in described SD card and have file not to be updated in described database.
In the embodiment of the present invention, by a file update in database, refer to and in described database, store the information that this file is corresponding, what be stored in described database can be this file itself, or can be also descriptor of this file etc., as long as information corresponding this file is stored in described database, when described the first electronic equipment is connected with described the second electronic equipment, just can see this file by the display unit of described the second electronic equipment.
Preferably, in one embodiment of the invention, the file in described storage unit is scanned, can comprise: the file that in described storage unit, level is the first order is scanned.
For described storage unit, can store multiple files, multiple files of storage can be divided into multiple levels.In general, the level of opening the file that described storage unit just can see can be called the first order, needs the level of carrying out the file that opening operation just can see for first class paper can be called the second level, by that analogy again.
Because first class paper is to open the file that described storage unit just will be seen at first, therefore in the embodiment of the present invention, can first scan first class paper, if user opens described storage unit in the display unit of described the second electronic equipment like this, first just can see all first class papers, guarantee user's demand.
Preferably, in one embodiment of the invention, when the file that level is the first order in to described storage unit scans, can also comprise: detect and determine that existence is for the wherein operation of the first file; Produce interrupt event, interrupt the scanning to current file, and start described the first file to scan, judge whether described the first file has been updated in described database; If described the first file is not updated in described database, by described the first file update in described database; If described the first file has been updated in described database, continue the scanning to current file.
Described the first file can be the arbitrary file in multiple files of storing in described storage unit, and the level of described the first file may be also arbitrary level.
In the time that described the first electronic equipment is connected with described the second electronic equipment, in the display unit of described the second electronic equipment, can show the file of storing in described storage unit.If user checks the file of storing in described storage unit by the display unit of described the second electronic equipment, user may operate one of them file, for example user operates for described the first file wherein, the file that described the first electronic equipment is being the first order to level scans, determine the operation existing for described the first file if detect, can produce interrupt event, interrupt the scanning to the current file scanning, and start to scan described the first file, judge whether described the first file has been updated in described database.
Preferably, in described the first file, can also include multiple various level son files, described the first file, corresponding to a catalogue, can include multiple files in this catalogue, and these multiple files are corresponding to different levels.User is in the time operating described the first file, the file that level is arranged on the level of described the first file has probably been updated to described database, and the file that level is arranged under the level of described the first file is not probably also updated to described database, , described the first electronic equipment can scan the son file of each level wherein, scanning process can be to scan successively according to level, or can be also that each level scans simultaneously, preferably, also can be that the file that level is positioned under the level of described the first file scans, whether judgement wherein has file not to be updated in described database.If determining, judgement wherein have file not to be updated in described database, be the equal of to determine that described the first file is not updated in described database, described the first electronic equipment will not be updated to file update in described database in described database in described the first file, be equivalent to described the first electronic equipment by described the first file update in described database.After to described the first file been scanned, if user's further operation do not detected, described the first electronic equipment can continue to scan before the not file of been scanned, if user's further operation detected, can according to user's operation continue scanning user operation for file.
And after to described the first file been scanned, if determining in described the first file, judgement do not have file not to be updated in described database, be that described the first file has been updated in described database, described the first electronic equipment can continue to scan before the not file of been scanned, continues the scanning to current file.
Can customer-centric, in the time that user operates described the first file, be generally need to see described the first file and comprising all son files, described the first electronic equipment can preferentially scan described the first file, guarantee that user can see described the first file in time, meet user's demand.Meanwhile, to after described the first file been scanned, can continue to before not the file of been scanned scan, can not delay normal file scanning work.
Further, in one embodiment of the invention, after the file that level is the first order in to described storage unit scans, can also comprise: according to preset rules, the residue file in described storage unit is scanned.Said residue file refers to the residue file except first class paper herein.
Preferably, in one embodiment of the invention, according to preset rules, the residue file in described storage unit is scanned, can comprise: according to the level of residue file, successively residue file is scanned; Or, according to the modification time of residue file, start scanning from the file of up-to-date modification; Or, at random residue file is scanned; Or, according to catalogue corresponding to residue file, successively residue file is scanned.
For example, can scan according to the level of residue file, for example, can first scan the file that level is the second level, scan afterwards the file that level is the third level, etc.
For example can scan according to the modification time of residue file.The modification time that can determine each file in residue file, scans successively according to modification time order from the near to the remote.Because, the file of up-to-date modification is likely and does not also have enough time to be updated in described database, can preferentially scan these files, the effect that can obtain upgrading in time like this, modification time has been pass by longer file and has probably been updated in described database, can follow-uply these files be scanned again.
For example, can scan successively according to catalogue corresponding to residue file.In general, may have multiple files corresponding to a catalogue, under this catalogue, these multiple files have been divided into first class paper, second level file etc., can scan respectively according to catalogue.
Preferably, in one embodiment of the invention, in the time the residue file in described storage unit being scanned according to preset rules, also comprise: detect and determine that existence is for the wherein operation of the second file; Produce interrupt event, interrupt the scanning to current file, and start described the second file to scan, judge whether described the second file has been updated in described database; If described the second file is not updated in described database, by described the second file update in described database; If described the second file has been updated in described database, continue the scanning to current file.
Described the second file can be the arbitrary file in multiple files of storing in described storage unit, and the level of described the second file may be also arbitrary level.
In the time that described the first electronic equipment is connected with described the second electronic equipment, in the display unit of described the second electronic equipment, can show the file of storing in described storage unit.If user checks the file of storing in described storage unit by the display unit of described the second electronic equipment, user may operate one of them file, for example user operates for described the second file wherein, described the first electronic equipment scans the residue file except first class paper, determine the operation existing for described the second file if detect, can produce interrupt event, interrupt the scanning to the current file scanning, and start to scan described the second file, judge whether described the second file has been updated in described database.
Preferably, in described the second file, can also include multiple various level son files, described the second file, corresponding to a catalogue, can include multiple files in this catalogue, and these multiple files are corresponding to different levels.User is in the time operating described the second file, the file that level is arranged on the level of described the second file has probably been updated to described database, and the file that level is arranged under the level of described the second file is not probably also updated to described database, , described the first electronic equipment can scan the son file of each level wherein, scanning process can be to scan successively according to level, or can be also that each level scans simultaneously, preferably, also can be that the file that level is positioned under the level of described the second file scans, whether judgement wherein has file not to be updated in described database.If determining, judgement wherein have file not to be updated in described database, be the equal of to determine that described the second file is not updated in described database, described the first electronic equipment will not be updated to file update in described database in described database in described the second file, be equivalent to described the first electronic equipment by described the second file update in described database.After to described the second file been scanned, if user's further operation do not detected, described the first electronic equipment can continue to scan before the not file of been scanned, if user's further operation detected, can according to user's operation continue scanning user operation for file.
And after to described the second file been scanned, if determining in described the second file, judgement do not have file not to be updated in described database, be that described the second file has been updated in described database, described the first electronic equipment can continue to scan before the not file of been scanned, continues the scanning to current file.
Can customer-centric, in the time that user operates described the second file, be generally need to see described the second file and comprising all son files, described the first electronic equipment can preferentially scan described the second file, guarantee that user can see described the second file in time, meet user's demand.Meanwhile, to after described the second file been scanned, can continue to before not the file of been scanned scan, can not delay normal file scanning work.
That is, no matter at any time, as long as there is user's operation, described the first electronic equipment all can preferentially scan according to user's operation, guarantees user's demand.
Further, in one embodiment of the invention, after the file in described storage unit is scanned, can also comprise: detect and determine that described the first electronic equipment is first number with the number of times that is connected of described the second electronic equipment in default duration; Judge whether described first number is greater than preset times threshold value; If described first number is greater than described preset times threshold value, continue the file in described storage unit to scan; If described first number is less than described preset times threshold value, stop the file in described storage unit to scan.
Described the first electronic equipment is after being connected with described the second electronic equipment, if be connected by wired mode, be for example connected by USB interface, user may ceaselessly plug USB interface, or USB interface may loose contact, thereby there is repeatedly the phenomenon of break-make.In general, when described the first electronic equipment is connected with described the second electronic equipment, described the first electronic equipment can start scanning, and in the time that described the first electronic equipment and described the second electronic equipment disconnect, described the first electronic equipment can stop scanning.And if there is the above repeatedly situation of break-make, described the first electronic equipment need to ceaselessly stop scanner uni and start scanning, comparatively power consumption also easily causes the fault of described the first electronic equipment.Therefore the embodiment of the present invention adopts a kind of protection mechanism, after described the first electronic equipment starts scanning, if detect that described the first electronic equipment is first number with the number of times that is connected of described the second electronic equipment in described default duration, can judge whether described first number is greater than described preset times threshold value, if described first number is greater than described preset times threshold value, be likely loose contact, described the first electronic equipment can continue the file in described storage unit to scan, and be not subject to the impact of break-make between described the first electronic equipment and described the second electronic equipment, can meet like this user's demand, also avoid described the first electronic equipment to break down as far as possible.If described first number is less than described preset times threshold value, may be that user has disconnected being connected between described the first electronic equipment and described the second electronic equipment, the display unit of described the second electronic equipment may be without the file showing in described storage unit, described the first electronic equipment is also without scanning, and described the first electronic equipment can stop current scanning work.Can save like this electric energy, the work that also alleviates described the first electronic equipment.
Step 102: in the time having file not to be updated in described database, will not be updated to file update in described database in described database, so that these files can be presented in the display unit of described the second electronic equipment.
If determining in described storage unit has file not to be updated in described database, the file update these not being upgraded is in described database, like this, user just can see these files on the display unit of described the second electronic equipment, thereby conveniently these files is operated.
Refer to Fig. 2, the embodiment of the present invention provides a kind of electronic equipment, and described electronic equipment can be connected with a storage unit, and described electronic equipment can be foregoing the first electronic equipment.Described electronic equipment can comprise scanning element 201 and updating block 202.
Scanning element 201 can, in the time that detection determines that described the first electronic equipment is connected with the second electronic equipment, scan the file in described storage unit, and whether judgement wherein has file not to be updated in the database of described the first electronic equipment.
Updating block 202 can be in the time having file not to be updated in described database, will not be updated to file update in described database in described database, so that these files can be presented in the display unit of described the second electronic equipment.
Optionally, in the embodiment of the present invention, scanning element 201 specifically can be for: monitoring event detected, determine that described the first electronic equipment is connected with described the second electronic equipment; Whether the type that judges described the second electronic equipment is preset kind; In the time that the type of described the second electronic equipment is described preset kind, the file in described storage unit is scanned.
Optionally, in the embodiment of the present invention, scanning element 201 specifically can be for: the file that in described storage unit, level is the first order is scanned.
Optionally, in the embodiment of the present invention, scanning element 201 can also be used for: detect and determine that existence is for the wherein operation of the first file; Produce interrupt event, interrupt the scanning to current file, and start described the first file to scan, judge whether described the first file has been updated in described database; If described the first file is not updated in described database, by described the first file update in described database; If described the first file has been updated in described database, continue the scanning to current file.
Optionally, in the embodiment of the present invention, scanning element 201 can also be used for: according to preset rules, the residue file of described storage unit is scanned.
Optionally, in the embodiment of the present invention, scanning element 201 specifically can also be used for: according to the level of residue file, successively residue file is scanned; Or, according to the modification time of residue file, start scanning from the file of up-to-date modification; Or, at random residue file is scanned; Or, according to catalogue corresponding to residue file, successively residue file is scanned.
Optionally, in the embodiment of the present invention, described electronic equipment can also comprise detecting unit and judging unit.
Described detecting unit can be for detection of determining that described the first electronic equipment is first number with the number of times that is connected of described the second electronic equipment in default duration;
Described judging unit can be for judging whether described first number is greater than preset times threshold value;
If scanning element 201 can also be used for described first number and be greater than described preset times threshold value, continue the file in described storage unit to scan; And if described first number be less than described preset times threshold value, stop the file in described storage unit to scan.
A kind of data-updating method is provided in the embodiment of the present invention, described method can be applied to the first electronic equipment, described the first electronic equipment can be connected with a storage unit, described method comprises: in the time that detection determines that described the first electronic equipment is connected with the second electronic equipment, file in described storage unit is scanned, and whether judgement wherein has file not to be updated in the database of described the first electronic equipment; In the time having file not to be updated in described database, will not be updated to file update in described database in described database, so that these files can be presented in the display unit of described the second electronic equipment.
In the embodiment of the present invention, in the time that described the first electronic equipment is connected with described the second electronic equipment, described the first electronic equipment can scan the file in described storage unit, thereby the file not being updated in described database can be updated in described database, like this, no matter for the file of what type in described storage unit, as long as described the first electronic equipment is connected with described the second electronic equipment, described the first electronic equipment can by scanning automatically by these file updates in described database, for example described the first electronic equipment is mobile phone, described the second electronic equipment is PC, described storage unit is SD card, , obviously, in the time that mobile phone connects PC, PC end is all visible for each file, thereby can directly operate these files at PC end, offer convenience to operation, improve the operability of electronic equipment.
Those skilled in the art can be well understood to, for convenience and simplicity of description, only be illustrated with the division of above-mentioned each functional module, in practical application, can above-mentioned functions be distributed and completed by different functional modules as required, be divided into different functional modules by the inner structure of device, to complete all or part of function described above.The system of foregoing description, the specific works process of device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
In the several embodiment that provide in the application, should be understood that, disclosed system, apparatus and method, can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described module or unit, be only that a kind of logic function is divided, when actual realization, can have other dividing mode, for example multiple unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in multiple network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, the each functional unit in each embodiment of the application can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and also can adopt the form of SFU software functional unit to realize.
If described integrated unit is realized and during as production marketing independently or use, can be stored in a computer read/write memory medium using the form of SFU software functional unit.Based on such understanding, the all or part of of the part that the application's technical scheme contributes to prior art in essence in other words or this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions (can be personal computers in order to make a computer equipment, server, or the network equipment etc.) or processor (processor) carry out all or part of step of method described in each embodiment of the application.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CDs.
Specifically, computer program instructions corresponding to a kind of data-updating method in the embodiment of the present application can be stored in CD, hard disk, on the storage mediums such as USB flash disk, in the time that the computer program instructions corresponding with a kind of data-updating method in storage medium read or be performed by an electronic equipment, comprise the steps:
In the time that detection determines that described the first electronic equipment is connected with the second electronic equipment, the file in described storage unit is scanned, whether judgement wherein has file not to be updated in the database of described the first electronic equipment;
In the time having file not to be updated in described database, will not be updated to file update in described database in described database, so that these files can be presented in the display unit of described the second electronic equipment.
Optionally, in described storage medium, store with step: determine that when detecting described the first electronic equipment while being connected with the second electronic equipment, scans the file in described storage unit, the computer instruction of correspondence, in the process being performed, specifically comprises:
Monitoring event detected, determine that described the first electronic equipment is connected with described the second electronic equipment;
Whether the type that judges described the second electronic equipment is preset kind;
In the time that the type of described the second electronic equipment is described preset kind, the file in described storage unit is scanned.
Optionally, that store in described storage medium and step: the file in described storage unit is scanned, and corresponding computer instruction being specifically performed in process, specifically comprises:
The file that in described storage unit, level is the first order is scanned.
Optionally, that store in described storage medium and step: the file that in described storage unit, level is the first order is scanned, and corresponding computer instruction being specifically performed in process, specifically also comprises:
Detect and determine that existence is for the wherein operation of the first file;
Produce interrupt event, interrupt the scanning to current file, and start described the first file to scan, judge whether described the first file has been updated in described database;
If described the first file is not updated in described database, by described the first file update in described database;
If described the first file has been updated in described database, continue the scanning to current file.
Optionally, that store in described storage medium and step: the file that in described storage unit, level is the first order is scanned, and corresponding computer instruction, after being specifically performed, also comprises:
According to preset rules, the residue file in described storage unit is scanned.
Optionally, that store in described storage medium and step: according to preset rules, the residue file in described storage unit is scanned, corresponding computer instruction, in the process being specifically performed, specifically comprises:
According to the level of residue file, successively residue file is scanned; Or
According to the modification time of residue file, start scanning from the file of up-to-date modification; Or
At random residue file is scanned; Or
According to catalogue corresponding to residue file, successively residue file is scanned.
Optionally, that store in described storage medium and step: the file in described storage unit is scanned, and corresponding computer instruction, after being specifically performed, also comprises:
Detection determines that described the first electronic equipment is first number with the number of times that is connected of described the second electronic equipment in default duration;
Judge whether described first number is greater than preset times threshold value;
If described first number is greater than described preset times threshold value, continue the file in described storage unit to scan;
If described first number is less than described preset times threshold value, stop the file in described storage unit to scan.
The above, above embodiment is only described in detail in order to the technical scheme to the application, but the explanation of above embodiment is just understood method of the present invention and core concept thereof for helping, and should not be construed as limitation of the present invention.In the technical scope that those skilled in the art disclose in the present invention, the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.

Claims (14)

1. a data-updating method, is applied to the first electronic equipment, and described the first electronic equipment is connected with a storage unit, said method comprising the steps of:
In the time that detection determines that described the first electronic equipment is connected with the second electronic equipment, the file in described storage unit is scanned, whether judgement wherein has file not to be updated in the database of described the first electronic equipment;
In the time having file not to be updated in described database, will not be updated to file update in described database in described database, so that described file can be presented in the display unit of described the second electronic equipment.
2. the method for claim 1, is characterized in that, in the time that detection determines that described the first electronic equipment is connected with the second electronic equipment, the file in described storage unit is scanned, and comprising:
Monitoring event detected, determine that described the first electronic equipment is connected with described the second electronic equipment;
Whether the type that judges described the second electronic equipment is preset kind;
In the time that the type of described the second electronic equipment is described preset kind, the file in described storage unit is scanned.
3. the method for claim 1, is characterized in that, the file in described storage unit is scanned, and comprising: the file that in described storage unit, level is the first order is scanned.
4. the method as described in as arbitrary in claim 1-3, is characterized in that, when the file that level is the first order in to described storage unit scans, also comprises:
Detect and determine that existence is for the wherein operation of the first file;
Produce interrupt event, interrupt the scanning to current file, and start described the first file to scan, judge whether described the first file has been updated in described database;
If described the first file is not updated in described database, by described the first file update in described database;
If described the first file has been updated in described database, continue the scanning to current file.
5. method as claimed in claim 3, is characterized in that, after the file that level is the first order in to described storage unit scans, also comprises: according to preset rules, the residue file in described storage unit is scanned.
6. method as claimed in claim 5, is characterized in that, according to preset rules, the residue file in described storage unit is scanned, and comprising:
According to the level of residue file, successively residue file is scanned; Or
According to the modification time of residue file, start scanning from the file of up-to-date modification; Or
At random residue file is scanned; Or
According to catalogue corresponding to residue file, successively residue file is scanned.
7. the method as described in claim 1-3,5 or 6, is characterized in that, after the file in described storage unit is scanned, also comprises:
Detection determines that described the first electronic equipment is first number with the number of times that is connected of described the second electronic equipment in default duration;
Judge whether described first number is greater than preset times threshold value;
If described first number is greater than described preset times threshold value, continue the file in described storage unit to scan;
If described first number is less than described preset times threshold value, stop the file in described storage unit to scan.
8. an electronic equipment, described electronic equipment is connected with a storage unit, and described electronic equipment comprises:
Scanning element, in the time that detection determines that described the first electronic equipment is connected with the second electronic equipment, scans the file in described storage unit, and whether judgement wherein has file not to be updated in the database of described the first electronic equipment;
Updating block, in the time having file not to be updated to described database, will not be updated to file update in described database in described database, so that these files can be presented in the display unit of described the second electronic equipment.
9. electronic equipment as claimed in claim 8, is characterized in that, described scanning element specifically for: monitoring event detected, determine that described the first electronic equipment is connected with described the second electronic equipment; Whether the type that judges described the second electronic equipment is preset kind; In the time that the type of described the second electronic equipment is described preset kind, the file in described storage unit is scanned.
10. electronic equipment as claimed in claim 8, is characterized in that, described scanning element specifically for: the file that in described storage unit, level is the first order is scanned.
11. electronic equipments as described in as arbitrary in claim 8-10, is characterized in that, described scanning element also for: detect and determine and exist for the wherein operation of the first file; Produce interrupt event, interrupt the scanning to current file, and start described the first file to scan, judge whether described the first file has been updated in described database; If described the first file is not updated in described database, by described the first file update in described database; If described the first file has been updated in described database, continue the scanning to current file.
12. electronic equipments as claimed in claim 10, is characterized in that, described scanning element also for: according to preset rules, the residue file of described storage unit is scanned.
13. electronic equipments as claimed in claim 12, is characterized in that, described scanning element specifically also for: according to residue file level, successively to residue file scan; Or, according to the modification time of residue file, start scanning from the file of up-to-date modification; Or, at random residue file is scanned; Or, according to catalogue corresponding to residue file, successively residue file is scanned.
14. electronic equipments as described in claim 8-10,12 or 13, is characterized in that, described electronic equipment also comprises detecting unit and judging unit;
Described detecting unit is for detection of determining that described the first electronic equipment is first number with the number of times that is connected of described the second electronic equipment in default duration;
Described judging unit is used for judging whether described first number is greater than preset times threshold value;
If described scanning element is also greater than described preset times threshold value for described first number, continue the file in described storage unit to scan; And if described first number be less than described preset times threshold value, stop the file in described storage unit to scan.
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 true CN103870564A (en) 2014-06-18
CN103870564B 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)

Cited By (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
CN107770265A (en) * 2017-10-17 2018-03-06 广东欧珀移动通信有限公司 A kind of method of data synchronization, data synchronization unit and mobile terminal

Citations (3)

* 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
US20120223131A1 (en) * 2011-03-03 2012-09-06 Lim John W Method and apparatus for dynamically presenting content in response to successive scans of a static code
CN102867044A (en) * 2012-09-05 2013-01-09 深圳市网卓信息科技有限公司 Method for synchronizing files at PC (personal computer) end by mobile terminal

Patent Citations (3)

* 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
US20120223131A1 (en) * 2011-03-03 2012-09-06 Lim John W Method and apparatus for dynamically presenting content in response to successive scans of a static code
CN102867044A (en) * 2012-09-05 2013-01-09 深圳市网卓信息科技有限公司 Method for synchronizing files at PC (personal computer) end by mobile terminal

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YOUTH0632: " android 的Android Media Scanner多媒体扫描路径问题", 《仰思的专栏》 *
YOUTH0632: "android 的Android Media Scanner多媒体扫描路径问题", 《仰思的专栏》 *
YOUTH0632: "android的AndroidMediaScanner多媒体扫描路径问题", 《仰思的专栏》 *

Cited By (5)

* 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
CN107770265A (en) * 2017-10-17 2018-03-06 广东欧珀移动通信有限公司 A kind of method of data synchronization, data synchronization unit and mobile terminal
CN107770265B (en) * 2017-10-17 2019-08-23 Oppo广东移动通信有限公司 A kind of method of data synchronization, data synchronization unit and mobile terminal

Also Published As

Publication number Publication date
CN103870564B (en) 2017-12-29

Similar Documents

Publication Publication Date Title
CN101452435B (en) USB terminal mode switching method and terminal
CN104915306B (en) A kind of data manipulation control method and equipment manager
KR102081274B1 (en) IOT device state monitor-control system using blockchain network
CN104777891A (en) OTG (on-the-go) connecting control method applied to intelligent terminal and connecting control device
CN104765466A (en) Key control method and device for mobile terminal
CN103870564A (en) Data updating method and electronic equipment
CN106201811A (en) The fault recovery method of application program and terminal
CN104572348A (en) Terminal
CN104199917A (en) Method and device for translating webpage content and client
CN104267997A (en) Terminal device and starting method of application software in same
CN108874414A (en) Software upgrading method and device, readable storage medium and television equipment
CN103731733A (en) Version upgrading method and electronic device
CN102073602A (en) Computer system, connection control device as well as connecting and disconnecting method
CN105573757A (en) Language updating method and device of Android system
CN103870319A (en) Method and device for information processing and electronic device
CN103561089A (en) Virtual machine desktop log-in method, device and system
CN105791512A (en) Interactive method and device and user terminal
US10007529B2 (en) Data terminal running mode switching method, device, and data terminal
CN105425997A (en) Method for displaying interface after reboot of user terminal and user terminal
US20150149677A1 (en) Hot plugging system and method
CN113412480B (en) Mounting processing method, mounting processing device, electronic equipment and computer readable storage medium
CN103870378A (en) Monitoring method for terminal device and terminal device
CN105100344A (en) Hot plug processing method for user recognition module card, and mobile terminal
CN105893867A (en) Terminal equipment operation method and terminal equipment
CN105183673A (en) Method and apparatus for supporting hot swap of external storage device under recovery mode

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