CN104424207A - New-file reminding method and device - Google Patents

New-file reminding method and device Download PDF

Info

Publication number
CN104424207A
CN104424207A CN201310369389.2A CN201310369389A CN104424207A CN 104424207 A CN104424207 A CN 104424207A CN 201310369389 A CN201310369389 A CN 201310369389A CN 104424207 A CN104424207 A CN 104424207A
Authority
CN
China
Prior art keywords
data
tables
file
file path
newly
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.)
Pending
Application number
CN201310369389.2A
Other languages
Chinese (zh)
Inventor
董宇
朱承
李天宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201310369389.2A priority Critical patent/CN104424207A/en
Publication of CN104424207A publication Critical patent/CN104424207A/en
Pending legal-status Critical Current

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/13File access structures, e.g. distributed indices
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Telephone Function (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a new-file reminding method and device and belongs to the technical field of mobile terminals. The method comprises establishing two data tables, including a first data table and a second data table, in a database, wherein the first data table and the second data table both have file path fields; storing this time and last time of file path scanning results of files in the mobile terminals in the first data table and the second data table respectively; performing increment comparing on the first data table and the second data table to obtain the file paths corresponding to added files; identifying the added files according to the file paths corresponding to the added files to remind users. By means of the method and the device, occupation time of mobile terminal calculation resources can be reduced, and power consumption can be further reduced.

Description

New document reminding method and apparatus
Technical field
The present invention relates to field of mobile terminals, be specifically related to a kind of new document reminding method and apparatus.
Background technology
In the exploitation of mobile terminal such as smart mobile phone, usually need to do to some content (such as desktop icons, file etc.) in smart mobile phone the mark newly increased, to help user's Timeliness coverage new content.New document reminding refers to makes mark to new file, and inform that this file of user is for newly-increased file, wherein, than last time, more additional file is called as new file or newly-increased file.
A kind of implementation carrying out new document reminding in prior art is: by by mobile terminal this and last time the scanning result to file path read in internal memory, use Java code and sequence, comparison algorithm compare one by one, finally draw newly-increased result.
But, on smart mobile phone, be subject to the restriction of mobile hardware equipment and running environment, the comparison speed of Java code to file path character string is slower, code memory manner of comparison is only suitable for a small amount of (thousand) data and compares, comparatively speed big data quantity such as being crossed to ten thousand data is very slow, affects smart mobile phone performance.
Summary of the invention
In view of the above problems, the present invention is proposed to provide a kind of new document reminding method and apparatus overcoming the problems referred to above or solve the problem at least in part.
According to one aspect of the present invention, provide a kind of new document reminding method, it comprises:
Set up two tables of data in a database: the first tables of data and the second tables of data, described first tables of data and described second tables of data all have file path field;
By this and last time to the scanning result of the file path of mobile terminal file, be stored in the first tables of data and the second tables of data respectively;
Quotient of difference is carried out comparatively to the first tables of data and the second tables of data, to obtain file path corresponding to newly-increased file;
The file path corresponding according to newly-increased file identifies newly-increased file, with reminding user.
Alternatively, described database is Sqlite database.
Alternatively, described by this and last time to the scanning result of the file path of mobile terminal file, be stored into respectively in the first tables of data and the second tables of data, comprise:
The content of the second tables of data is emptied, by the data Replica of last stored in the first tables of data in the second tables of data;
The content of the first tables of data is emptied, by this scanning result to the file path of mobile terminal file, is stored in the first tables of data.
Alternatively, described quotient of difference is carried out comparatively to the first tables of data and the second tables of data, comprising: adopt sql statement to carry out quotient of difference comparatively to the first tables of data and the second tables of data.
According to a further aspect in the invention, provide a kind of new document reminding device, it comprises:
Tables of data sets up unit, is suitable for setting up two tables of data in a database: the first tables of data and the second tables of data, and described first tables of data and described second tables of data all have file path field;
Scanning storage unit, to be suitable for this and last time, to the scanning result of the file path of mobile terminal file, being stored in the first tables of data and the second tables of data respectively;
Comparing unit, is suitable for carrying out quotient of difference comparatively to the first tables of data and the second tables of data, to obtain file path corresponding to newly-increased file;
Reminding unit, is suitable for the file path corresponding according to newly-increased file and identifies, with reminding user newly-increased file.
Alternatively, described database is Sqlite database.
Alternatively, described scanning storage unit to be further adapted for:
The content of the second tables of data is emptied, by the data Replica of last stored in the first tables of data in the second tables of data;
The content of the first tables of data is emptied, by this scanning result to the file path of mobile terminal file, is stored in the first tables of data.
Alternatively, described comparing unit is further adapted for: adopt sql statement to carry out quotient of difference comparatively to the first tables of data and the second tables of data.
According to technical scheme of the present invention, quotient of difference is carried out comparatively by utilizing the tables of data in database, the newly-increased file in mobile terminal can be identified rapidly, greatly reduce computing time, the performance of mobile terminal can be improved, the holding time to mobile terminal computational resource can be reduced again, and then can power consumption be reduced.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of instructions, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows new according to an embodiment of the invention document reminding method flow diagram;
Fig. 2 shows new according to an embodiment of the invention document reminding structure drawing of device;
Fig. 3 shows in the embodiment of the present invention a kind of mode schematic diagram that newly-increased file identifies;
Fig. 4 shows in the embodiment of the present invention the another kind of mode schematic diagram that newly-increased file identifies.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
When carrying out new document reminding in the terminal for prior art, adopt Java code to carry out internal memory to compare and have that speed is comparatively slow, to the long problem of the computational resource holding time of mobile terminal, the embodiment of the present invention provides a kind of new document reminding method and apparatus.
Fig. 1 shows new according to an embodiment of the invention document reminding method flow diagram, and with reference to Fig. 1, described method can comprise:
Step 102, sets up two tables of data: the first tables of data and the second tables of data in a database, and described first tables of data and described second tables of data all have file path field;
Step 104, by this and last time to the scanning result of the file path of mobile terminal file, was stored in the first tables of data and the second tables of data respectively;
Step 106, carries out quotient of difference comparatively to the first tables of data and the second tables of data, to obtain file path corresponding to newly-increased file;
Step 108, the file path corresponding according to newly-increased file identifies newly-increased file, with reminding user.
From the above, technical scheme according to one embodiment of the invention is passed through to set up two tables of data in a database, this and last time are stored in these two tables to the scanning result of the file path of mobile terminal file respectively, then quotient of difference is carried out to these two tables and comparatively obtain file path corresponding to newly-increased file, the newly-increased file in mobile terminal can be identified so rapidly, greatly reduce computing time, the performance of mobile terminal can be improved, the holding time to mobile terminal computational resource can be reduced again, and then can power consumption be reduced.
Wherein, described mobile terminal can be smart mobile phone, mobile phone or personal digital assistant (PDA) etc.
Alternatively, described database is the database of Sqlite database or other types.Suppose that the first tables of data and the second tables of data are Table A and table B, Table A is identical with the structure of table B, and all has file path field: path, other fields are not necessary, can determine as the case may be.
A kind of example statement building Table A is:
create table if not exists A(_id integer primary key autoincrement,pathvarchar(255));
A kind of example statement building table B is:
create table if not exists B(_id integer primary key autoincrement,pathvarchar(255));
At step 104, scan the file path of mobile terminal file, the trigger condition of scanning can be arranged as required, such as, carry out single pass when starting shooting; Again such as, single pass is carried out every the schedule time.
What store in table B is the scanning result of last time, and what store in Table A is this scanning result.Particularly, before carrying out present scan, first the content of table B can be emptied, by the data Replica of last stored in Table A in table B, then, the content of Table A is emptied, start to carry out present scan, and this scanning result to the file path of mobile terminal file is stored in Table A.
The code of the content of delete list B is exemplified below:
The content replication of Table A is exemplified below to the code in table B:
The code snippet that All Files in scanning mobile terminal is also put in storage is exemplified below:
In step 106, quotient of difference can be carried out comparatively to Table A and table B, to obtain file path corresponding to newly-increased file, particularly, sql statement can be adopted to carry out quotient of difference comparatively to Table A and table B.
To Table A and table B carry out quotient of difference comparatively and the code snippet returning new content be exemplified below:
In step 108, the file path corresponding according to newly-increased file identifies newly-increased file, have multiple to the mode that newly-increased file identifies, such as, the file path of newly-increased file can be shown with runic, or, the mark such as " increasing newly " or " new " (as shown in Figure 3) is increased after the file path of newly-increased file, or, numeral (as shown in Figure 4) is added above the icon that the file at newly-increased file place is corresponding, the quantity of documents newly increased in this file of this numeral, the embodiment of the present invention does not limit this.
Adopt the said method of the embodiment of the present invention, for big data quantity on smart mobile phone (ten thousand grades) data, by utilizing SQLite database to compare, comparing speed and improving nearly 10 times (because smart mobile phone hardware configuration and operating system version difference lifting result can be variant).
Corresponding with the above-mentioned new document reminding method of the embodiment of the present invention, the embodiment of the present invention also provides a kind of new document reminding device realizing said method, described new document reminding device is arranged in the terminal, and described mobile terminal can be smart mobile phone, mobile phone or personal digital assistant (PDA) etc.
With reference to Fig. 2, the new document reminding device of the embodiment of the present invention can comprise tables of data and set up unit 10, scanning storage unit 20, comparing unit 30 and reminding unit 40, wherein:
Tables of data is set up unit 10 and is suitable for setting up two tables of data in a database: the first tables of data and the second tables of data, and described first tables of data and described second tables of data all have file path field.Described database can be the database of Sqlite database or other types.
Scanning storage unit 20 to be suitable for this and last time, to the scanning result of the file path of mobile terminal file, being stored into respectively in the first tables of data and the second tables of data.Particularly, the content of the second tables of data can first empty by scanning storage unit 10, then by the data Replica of last stored in the first tables of data in the second tables of data, finally the content of the first tables of data is emptied, by this scanning result to the file path of mobile terminal file, be stored in the first tables of data.
Comparing unit 30 is suitable for carrying out quotient of difference comparatively to the first tables of data and the second tables of data, to obtain file path corresponding to newly-increased file.Comparing unit 30 can adopt sql statement to carry out quotient of difference comparatively to the first tables of data and the second tables of data.
Reminding unit 40 is suitable for the file path corresponding according to newly-increased file and identifies, with reminding user newly-increased file.Have multiple to the mode that newly-increased file identifies, such as, the file path of newly-increased file can be shown with runic, or after the file path of newly-increased file, increase the mark such as " increasing newly " or " new ", the embodiment of the present invention does not limit this.
Adopt the said apparatus of the embodiment of the present invention, for big data quantity on smart mobile phone (ten thousand grades) data, by utilizing SQLite database to compare, comparing speed and improving nearly 10 times (because smart mobile phone hardware configuration and operating system version difference lifting result can be variant).
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In instructions provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary array mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize according to the some or all parts in the new document reminding device of the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.

Claims (8)

1. a new document reminding method, it comprises:
Set up two tables of data in a database: the first tables of data and the second tables of data, described first tables of data and described second tables of data all have file path field;
By this and last time to the scanning result of the file path of mobile terminal file, be stored in the first tables of data and the second tables of data respectively;
Quotient of difference is carried out comparatively to the first tables of data and the second tables of data, to obtain file path corresponding to newly-increased file;
The file path corresponding according to newly-increased file identifies newly-increased file, with reminding user.
2. new document reminding method as claimed in claim 1, wherein, described database is Sqlite database.
3. document reminding method as claimed in claim 1 or 2 new, wherein, described by this and last time to the scanning result of the file path of mobile terminal file, be stored into respectively in the first tables of data and the second tables of data, comprise:
The content of the second tables of data is emptied, by the data Replica of last stored in the first tables of data in the second tables of data;
The content of the first tables of data is emptied, by this scanning result to the file path of mobile terminal file, is stored in the first tables of data.
4. the new document reminding method as described in claim 1,2 or 3, wherein, describedly carries out quotient of difference comparatively to the first tables of data and the second tables of data, comprising: adopt sql statement to carry out quotient of difference comparatively to the first tables of data and the second tables of data.
5. a new document reminding device, it comprises:
Tables of data sets up unit, is suitable for setting up two tables of data in a database: the first tables of data and the second tables of data, and described first tables of data and described second tables of data all have file path field;
Scanning storage unit, to be suitable for this and last time, to the scanning result of the file path of mobile terminal file, being stored in the first tables of data and the second tables of data respectively;
Comparing unit, is suitable for carrying out quotient of difference comparatively to the first tables of data and the second tables of data, to obtain file path corresponding to newly-increased file;
Reminding unit, is suitable for the file path corresponding according to newly-increased file and identifies, with reminding user newly-increased file.
6. new document reminding device as claimed in claim 5, wherein, described database is Sqlite database.
7. the new document reminding device as described in claim 5 or 6, wherein, to be describedly further adapted for scanning storage unit:
The content of the second tables of data is emptied, by the data Replica of last stored in the first tables of data in the second tables of data;
The content of the first tables of data is emptied, by this scanning result to the file path of mobile terminal file, is stored in the first tables of data.
8. the new document reminding device as described in claim 5,6 or 7, wherein, described comparing unit is further adapted for: adopt sql statement to carry out quotient of difference comparatively to the first tables of data and the second tables of data.
CN201310369389.2A 2013-08-22 2013-08-22 New-file reminding method and device Pending CN104424207A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310369389.2A CN104424207A (en) 2013-08-22 2013-08-22 New-file reminding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310369389.2A CN104424207A (en) 2013-08-22 2013-08-22 New-file reminding method and device

Publications (1)

Publication Number Publication Date
CN104424207A true CN104424207A (en) 2015-03-18

Family

ID=52973206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310369389.2A Pending CN104424207A (en) 2013-08-22 2013-08-22 New-file reminding method and device

Country Status (1)

Country Link
CN (1) CN104424207A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108038112A (en) * 2017-09-28 2018-05-15 广东欧珀移动通信有限公司 Document handling method, mobile terminal and computer-readable recording medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1570919A (en) * 2004-05-09 2005-01-26 丁力 Method for creating, immigrating, emigrating and deleting file
CN101789042A (en) * 2010-01-29 2010-07-28 华东电网有限公司 Model increment comparing tool of common information model (CIM) of electric network enterprise
CN102087574A (en) * 2009-12-08 2011-06-08 宏碁股份有限公司 Method and system for displaying file position and electronic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1570919A (en) * 2004-05-09 2005-01-26 丁力 Method for creating, immigrating, emigrating and deleting file
CN102087574A (en) * 2009-12-08 2011-06-08 宏碁股份有限公司 Method and system for displaying file position and electronic device
CN101789042A (en) * 2010-01-29 2010-07-28 华东电网有限公司 Model increment comparing tool of common information model (CIM) of electric network enterprise

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108038112A (en) * 2017-09-28 2018-05-15 广东欧珀移动通信有限公司 Document handling method, mobile terminal and computer-readable recording medium
CN108038112B (en) * 2017-09-28 2020-01-10 Oppo广东移动通信有限公司 File processing method, mobile terminal and computer readable storage medium

Similar Documents

Publication Publication Date Title
US8380680B2 (en) Piecemeal list prefetch
US8977626B2 (en) Indexing and searching a data collection
Schröder-Preikschat The logical design of parallel operating systems
US8407245B2 (en) Efficient string pattern matching for large pattern sets
US7908283B2 (en) Finding superlatives in an unordered list
CN102867147B (en) A kind of method and apparatus of file scan
US10621189B2 (en) In-application history search
CN104572920A (en) Data arrangement method and data arrangement device
US9218394B2 (en) Reading rows from memory prior to reading rows from secondary storage
US20200142674A1 (en) Extracting web api endpoint data from source code
CN106708825A (en) Data file processing method and system
CN102446100B (en) For the type of data type and the abstract system and method for length
CN105095367A (en) Method and device for acquiring client data
CN110688096A (en) Method, device, medium and electronic equipment for constructing application program containing plug-in
CN105389509A (en) Document scanning method and apparatus
US10592572B2 (en) Application view index and search
CN104253903A (en) Method and device for searching information
CN103353887A (en) Method and device for searching user data
CN104715067A (en) Method, device and system for making key words on web page and browser client
CN104361094A (en) Storage method and device for file in search result, and browser client
CN104376126A (en) Method and device for binding kernel symbols in Linux driver
CN104424207A (en) New-file reminding method and device
CN105183749A (en) Method and device for crawling promotion content and providing crawled promotion content for use in search
CN107451050B (en) Function acquisition method and device and server
CN105404695A (en) Test question query method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150318