CN111901685A - File scanning method and related device - Google Patents

File scanning method and related device Download PDF

Info

Publication number
CN111901685A
CN111901685A CN202010750906.0A CN202010750906A CN111901685A CN 111901685 A CN111901685 A CN 111901685A CN 202010750906 A CN202010750906 A CN 202010750906A CN 111901685 A CN111901685 A CN 111901685A
Authority
CN
China
Prior art keywords
file
files
scanning
interface
folder
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
CN202010750906.0A
Other languages
Chinese (zh)
Other versions
CN111901685B (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.)
Shenzhen Kangguan Technology Co ltd
Original Assignee
Shenzhen Kangguan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kangguan Technology Co ltd filed Critical Shenzhen Kangguan Technology Co ltd
Priority to CN202010750906.0A priority Critical patent/CN111901685B/en
Publication of CN111901685A publication Critical patent/CN111901685A/en
Application granted granted Critical
Publication of CN111901685B publication Critical patent/CN111901685B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • 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
    • 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/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor
    • 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

Abstract

The invention discloses a file scanning method.A JNI (just noticeable information) interface can realize the interaction between java codes and C language codes or C + + language codes, and a program constructed based on the C language codes or the C + + language codes realizes the scanning of files stored in an intelligent television, so that the faster file scanning speed can be realized; the AIDL interface AIDL is an Android system interface definition language, and the AIDL interface is an interface for data communication among different processes in the Android system. The communication among different threads in the Android system can be realized through the AIDL interface, so that the data updating message can be sent to the target application in time. The invention also provides a device, equipment and a storage medium, which also have the beneficial effects.

Description

File scanning method and related device
Technical Field
The present invention relates to the field of smart tv technologies, and in particular, to a file scanning method, a file scanning apparatus, a file scanning device, and a computer-readable storage medium.
Background
At present, the system used by the smart television is generally an Android system, and the Android system-based file scanning mostly takes the MediaScanner of the Android system as a main part. However, the MediaScanner has a slow scanning speed, cannot monitor the scanning process, has poor support for a storage device with a large capacity, and cannot perform file classification preview work immediately after the hard disk is plugged. Therefore, how to provide a file scanning method which has a fast scanning speed and can realize interception in the scanning process is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a file scanning method, which has higher scanning speed and can realize monitoring in the scanning process; the invention also provides a file scanning device, a file scanning device and a computer readable storage medium, which have higher scanning speed and can realize monitoring in the scanning process.
To solve the above technical problem, the present invention provides a file scanning method, including:
scanning files stored by the intelligent television through a JNI (Java native interface);
when the scanned file is a folder, scanning the file in the folder;
when the scanned file is a non-folder, judging whether the file corresponds to a preset required file type according to a suffix of the file; if so, saving the file basic information of the file;
after the basic information of the files is saved, counting the number of the files corresponding to any file type;
and when the number of the files corresponding to any one file type meets a preset condition, sending data updating information corresponding to the file type meeting the preset condition to a target application through an AIDL interface.
Optionally, after the determining, according to the suffix of the file, whether the file corresponds to a preset required file type, the method further includes:
and if the file does not correspond to the preset required file type, skipping the file.
Optionally, the scanning, through the JNI interface, the file stored in the smart television includes:
and calling a preset program segment constructed based on C + + through a JNI (Java native interface) interface to scan files stored in the intelligent television.
Optionally, the files stored in the smart television include files stored in the smart television and files stored in an external storage device of the smart television.
Optionally, the file type includes any one or any combination of the following:
video files, music files, picture files, and apk installation package files.
Optionally, the file basic information includes a file path and a file name.
Optionally, the data update information includes the number of files corresponding to the file type meeting the preset condition, and the file basic information corresponding to the file type meeting the preset condition.
The present invention also provides a document scanning apparatus, comprising:
a scanning module: the file scanning device is used for scanning files stored in the intelligent television through the JNI interface;
the first scanning module: the file scanning device is used for scanning files in a folder when the scanned files are the folder;
a second scanning module: the method comprises the steps of judging whether a scanned file corresponds to a preset required file type or not according to a suffix of the file when the scanned file is a non-folder; if so, saving the file basic information of the file;
a statistic module: after the basic information of the files is saved, counting the number of the files corresponding to any file type;
sharing the module: and when the number of the files corresponding to any one of the file types meets a preset condition, sending data updating information corresponding to the file type meeting the preset condition to a target application through an AIDL interface.
The present invention also provides a document scanning device, the device comprising:
a memory: for storing a computer program;
a processor: for implementing the steps of the document scanning method as claimed in any one of the above when executing said computer program.
The invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the document scanning method as claimed in any one of the above.
The invention provides a file scanning method, which comprises the steps of scanning files stored in an intelligent television through a JNI (Java native interface); when the scanned file is a folder, scanning the file in the folder; when the scanned file is a non-folder, judging whether the file corresponds to a preset required file type according to a suffix of the file; if so, saving the file basic information of the file; after the basic information of the files is saved, counting the number of the files corresponding to any file type; and when the number of the files corresponding to any file type meets a preset condition, sending data updating information corresponding to the file type meeting the preset condition to the target application through the AIDL interface.
The JNI interface can realize the interaction between java codes and C language codes or C + + language codes, and a program constructed based on the C language codes or the C + + language codes realizes the scanning of files stored in the smart television; the AIDL interface AIDL is an Android system interface definition language, and the AIDL interface is an interface for data communication among different processes in the Android system. The AIDL interface can realize communication among different threads in the Android system so as to ensure that the data updating message can be timely sent to the target application, thereby realizing higher scanning speed and realizing monitoring in the scanning process.
The invention also provides a file scanning device, a file scanning device and a computer readable storage medium, which also have the beneficial effects and are not repeated herein.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a flowchart of a file scanning method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a specific file scanning method provided in an embodiment of the present invention;
FIG. 3 is a block diagram of a document scanning apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of a file scanning device according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a file scanning method. In the prior art, the system used by the smart television is generally an Android system, and the Android system-based file scanning mostly takes MediaScanner of the Android system as a main part. However, since the media scanning service provided by the Android system uses Java managed codes, the efficiency is low, the scanning speed is slow, monitoring of the scanning process cannot be performed, the support for a storage device with a large capacity is poor, and the file classification preview work immediately after the hard disk is plugged and unplugged cannot be performed.
The file scanning method provided by the invention comprises the steps of scanning files stored in the smart television through a JNI (Java native interface); when the scanned file is a folder, scanning the file in the folder; when the scanned file is a non-folder, judging whether the file corresponds to a preset required file type according to a suffix of the file; if so, saving the file basic information of the file; after the basic information of the files is saved, counting the number of the files corresponding to any file type; and when the number of the files corresponding to any file type meets a preset condition, sending data updating information corresponding to the file type meeting the preset condition to the target application through the AIDL interface.
The JNI interface can realize the interaction between java codes and C language codes or C + + language codes, and a program constructed based on the C language codes or the C + + language codes realizes the scanning of files stored in the smart television; the AIDL interface AIDL is an Android system interface definition language, and the AIDL interface is an interface for data communication among different processes in the Android system. The AIDL interface can realize communication among different threads in the Android system so as to ensure that the data updating message can be timely sent to the target application, thereby realizing higher scanning speed and realizing monitoring in the scanning process.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a file scanning method according to an embodiment of the present invention.
Referring to fig. 1, in an embodiment of the present invention, a file scanning method includes:
s101: and scanning files stored by the intelligent television through the JNI interface.
JNI is an abbreviation of Java Native Interface, and codes can be guaranteed to be conveniently transplanted on different platforms by writing programs through a Java Native Interface. Starting from Java1.1, the JNI standard becomes part of the Java platform, which allows Java code to interact with code written in other languages. That is, the JNI interface can implement interaction between java code and code written in other languages, and is generally used for implementing java code and code constructed based on C + + language, and interacting with code constructed based on C language. Correspondingly, in the embodiment of the invention, the smart television is a smart television with an Android system.
S102: when the scanned file is a folder, the file in the folder is scanned.
When the files stored in the smart television are scanned in S101, the folders are scanned. In this step, each time a folder is scanned, the files in the folder are directly scanned. It should be noted that, when a new folder is continuously scanned in a certain folder, the file in the new folder is continuously scanned until all the files in the folder are scanned, the previous folder is jumped to continue scanning, and it is usually necessary to loop back to S101 after this step.
S103: and when the scanned file is a non-folder, judging whether the file corresponds to a preset required file type according to the suffix of the file.
In the embodiment of the present invention, the required file types and suffixes of files corresponding to each file type need to be preset. In this step, when the non-folder file is scanned, whether the scanned file corresponds to the preset required file type or not and whether the scanned file is the required file or not are judged according to the suffix of the scanned file in this step. If yes, the file is a required file, and the following step S104 is executed to store the file basic information of the file; if not, the file is not the required file, and the file can be skipped over directly to continue scanning other files. And skipping the file if the file does not correspond to the preset required file type.
The above file types generally need to include any one or any combination of the following in embodiments of the present invention: video files, music files, picture files, and apk installation package files. Of course, the specific inclusion range of the file type is not particularly limited in the present invention, as the case may be. Generally, the file types need to include all the above file types in the embodiment of the present invention.
S104: and saving the file basic information of the file.
The file basic information needs to ensure that other software can query the file based on the file basic information, and in particular, in the embodiment of the present invention, the file basic information generally needs to include a file path and a file name. Of course, the basic information of the file usually needs to include basic information such as the size of the file.
S105: after the basic information of the files is saved, the file number of the files corresponding to any file type is counted.
In general, this step, the above-mentioned S104 and the above-mentioned S101 to S103 are all executed by different threads, that is, while the above-mentioned S101 to S103 scan each file, S104 is executed to save the file basic information meeting the condition, and this step is executed to count the number of files when saving. In this step, the number of files corresponding to each file type is usually counted separately.
S106: and when the number of the files corresponding to any file type meets a preset condition, sending data updating information corresponding to the file type meeting the preset condition to the target application through the AIDL interface.
The AIDL is an Android system interface definition language, and the AIDL is an interface for data communication among different processes in the Android system. In this step, communication among different threads in the Android system can be realized through the AIDL interface, so that the data updating message can be sent to the target application in time.
In this step, when the number of files meets a preset condition, data update information corresponding to each file type is actively sent to a target application, where the target application includes a file manager, multimedia software and other software capable of displaying a file scanning progress, and the data update information may generally include information such as a file path, a file name, and a file type of a file stored in the smart television, so that the target application displays information of the file stored in the smart television according to the data update information.
In this step, in general, when the number of newly added files in any file type reaches a number threshold, for example, the number of newly added files reaches ten, a data update message is sent to the target application, so that the user can know information of the files stored in the smart television based on the data update message through the target application. It should be noted that, in this step, the data update message is generally sent to the target application when the number of newly added files of any file type reaches a number threshold value every time.
The file scanning method provided by the embodiment of the invention comprises the steps of scanning files stored in an intelligent television through a JNI (just noticeable information) interface; when the scanned file is a folder, scanning the file in the folder; when the scanned file is a non-folder, judging whether the file corresponds to a preset required file type according to a suffix of the file; if so, saving the file basic information of the file; after the basic information of the files is saved, counting the number of the files corresponding to any file type; and when the number of the files corresponding to any file type meets a preset condition, sending data updating information corresponding to the file type meeting the preset condition to the target application through the AIDL interface.
The JNI interface can realize the interaction between java codes and C language codes or C + + language codes, and a program constructed based on the C language codes or the C + + language codes realizes the scanning of files stored in the smart television; the AIDL interface AIDL is an Android system interface definition language, and the AIDL interface is an interface for data communication among different processes in the Android system. The AIDL interface can realize communication among different threads in the Android system so as to ensure that the data updating message can be timely sent to the target application, thereby realizing higher scanning speed and realizing monitoring in the scanning process.
The following embodiments of the present invention will be described in detail with reference to the specific contents of a document scanning method provided by the present invention.
Referring to fig. 2, fig. 2 is a flowchart illustrating a specific file scanning method according to an embodiment of the present invention.
Referring to fig. 2, in an embodiment of the present invention, a file scanning method includes:
s201: and calling a preset program segment constructed based on C + + through a JNI (Java native interface) interface to scan files stored in the intelligent television.
In the embodiment of the invention, the files stored in the smart television are scanned by writing C + + codes by using a JNI programming technology generally. The JNI allows Java codes and codes written by C + + language to interact with the preset program segment, and the C + + language is closer to the bottom layer, so that the preset program segment has better performance and higher efficiency compared with the traditional scanning algorithm written by the Java language, better scanning speed and memory management can be obtained, and the scanning work of a large number of files can be realized in a short time. In the step, a preset program segment constructed based on C + + can be realized by calling the JNI interface, and the stored files in the smart television of the Android system are scanned.
It should be noted that, in the embodiment of the present invention, the files stored in the smart television include files stored inside the smart television and files stored in an external storage device of the smart television. In the scanning process, the files stored in the intelligent television and the files stored in the external storage equipment of the intelligent television need to be scanned.
S202: when the scanned file is a folder, the file in the folder is scanned.
S203: and when the scanned file is a non-folder, judging whether the file corresponds to a preset required file type according to the suffix of the file.
S204: and saving the file basic information of the file.
S205: after the basic information of the files is saved, the file number of the files corresponding to any file type is counted.
S206: and when the number of the files corresponding to any file type meets a preset condition, sending data updating information corresponding to the file type meeting the preset condition to the target application through the AIDL interface.
S202 to S206 are substantially the same as S102 to S106 in the above embodiment of the invention, and the details are already described in the above embodiment of the invention and will not be described herein again. Specifically, in this step, the data update information includes the number of files corresponding to the file type that satisfies the preset condition, and the file basic information corresponding to the file type that satisfies the preset condition. The data updating information can reflect the current number of files included in the corresponding file type and basic information including specific paths, names and the like of the files.
At this time, after receiving the data update message, the target application may display corresponding information according to its own setting, for example, only display the number of the files on a primary interface, that is, the number of files belonging to a certain file type in the files stored in the smart television; and then, the basic information of the file corresponding to the file type can be displayed in a scrolling manner on the secondary interface. Of course, the target application may display the information of the file stored in the smart television in other manners, which is not specifically limited in the embodiment of the present invention.
In the file scanning method provided by the embodiment of the invention, the JNI interface specifically realizes the interaction between java codes and C + + language codes, and the program constructed based on the C + + language codes realizes the scanning of files stored in the smart television; the AIDL interface can realize communication among different threads in the Android system so as to ensure that the data updating message can be timely sent to the target application, thereby realizing higher scanning speed and realizing monitoring in the scanning process.
In the following, a document scanning apparatus provided by an embodiment of the present invention is introduced, and the document scanning apparatus described below and the document scanning method described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a block diagram of a file scanning apparatus according to an embodiment of the present invention.
Referring to fig. 3, in an embodiment of the present invention, a document scanning apparatus may include:
the scanning module 100: the file scanning method is used for scanning files stored in the intelligent television through the JNI interface.
The first scanning module 200: and when the scanned file is a folder, scanning the file in the folder.
The second scanning module 300: the method comprises the steps of judging whether a scanned file corresponds to a preset required file type or not according to a suffix of the file when the scanned file is a non-folder; if so, saving the file basic information of the file.
The statistics module 400: and after the basic information of the files is saved, counting the number of the files corresponding to any file type.
The sharing module 500: and when the number of the files corresponding to any one of the file types meets a preset condition, sending data updating information corresponding to the file type meeting the preset condition to a target application through an AIDL interface.
Preferably, in the embodiment of the present invention, the method further includes:
and a skipping module: and skipping the file if the file does not correspond to the preset required file type.
Preferably, in the embodiment of the present invention, the scanning module 100 is specifically configured to:
and calling a preset program segment constructed based on C + + through a JNI (Java native interface) interface to scan files stored in the intelligent television.
Preferably, in the embodiment of the present invention, the files stored in the smart television include files stored inside the smart television and files stored in an external storage device of the smart television.
Preferably, in the embodiment of the present invention, the file type includes any one or any combination of the following items:
video files, music files, picture files, and apk installation package files.
Preferably, in the embodiment of the present invention, the file basic information includes a file path and a file name.
Preferably, in the embodiment of the present invention, the data update information includes the number of files corresponding to the file type that meets the preset condition, and the file basic information corresponding to the file type that meets the preset condition.
The document scanning apparatus of the present embodiment is used to implement the aforementioned document scanning method, and therefore, the specific implementation of the document scanning apparatus can be seen in the above embodiments of the document scanning method, for example, the scanning module 100, the first scanning module 200, the second scanning module 300, the statistics module 400, and the sharing module 500 are respectively used to implement steps S101 to S106 in the aforementioned document scanning method, and therefore, the specific implementation thereof can refer to the description of the corresponding embodiments of each part, and is not described herein again.
In the following, a document scanning device according to an embodiment of the present invention is introduced, and the document scanning device described below, the document scanning method described above, and the document scanning apparatus described above may be referred to correspondingly.
Referring to fig. 4, fig. 4 is a block diagram of a file scanning apparatus according to an embodiment of the present invention.
Referring to fig. 4, the document scanning device may include a processor 11 and a memory 12.
The memory 12 is used for storing a computer program; the processor 11 is configured to implement the file scanning method in the above embodiment of the invention when executing the computer program.
The processor 11 in the document scanning device of this embodiment is used to install the document scanning apparatus in the above embodiment of the invention, and the processor 11 and the memory 12 are combined to implement the document scanning method in any embodiment of the invention. Therefore, the specific implementation manner of the file scanning device can be seen in the foregoing embodiment section of the file scanning method, and the specific implementation manner thereof may refer to the description of each corresponding embodiment section, which is not described herein again.
The present invention also provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements a file scanning method as described in any of the above embodiments of the invention. The rest can be referred to the prior art and will not be described in an expanded manner.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
A document scanning method, a document scanning apparatus, a document scanning device, and a computer-readable storage medium according to the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A method of scanning a document, comprising:
scanning files stored by the intelligent television through a JNI (Java native interface);
when the scanned file is a folder, scanning the file in the folder;
when the scanned file is a non-folder, judging whether the file corresponds to a preset required file type according to a suffix of the file; if so, saving the file basic information of the file;
after the basic information of the files is saved, counting the number of the files corresponding to any file type;
and when the number of the files corresponding to any one file type meets a preset condition, sending data updating information corresponding to the file type meeting the preset condition to a target application through an AIDL interface.
2. The method according to claim 1, after said determining whether the file corresponds to a preset required file type according to the suffix of the file, further comprising:
and if the file does not correspond to the preset required file type, skipping the file.
3. The method according to claim 2, wherein scanning files stored by the smart television through the JNI interface comprises:
and calling a preset program segment constructed based on C + + through a JNI (Java native interface) interface to scan files stored in the intelligent television.
4. The method according to claim 3, wherein the files stored in the smart television comprise files stored inside the smart television and files stored in an external storage device of the smart television.
5. The method according to claim 1, wherein the file type comprises any one or any combination of the following:
video files, music files, picture files, and apk installation package files.
6. The method of claim 1, wherein the file basic information comprises a file path and a file name.
7. The method according to claim 6, wherein the data update information includes the number of files corresponding to the file type satisfying the preset condition, and the basic information of the file corresponding to the file type satisfying the preset condition.
8. A document scanning apparatus, comprising:
a scanning module: the file scanning device is used for scanning files stored in the intelligent television through the JNI interface;
the first scanning module: the file scanning device is used for scanning files in a folder when the scanned files are the folder;
a second scanning module: the method comprises the steps of judging whether a scanned file corresponds to a preset required file type or not according to a suffix of the file when the scanned file is a non-folder; if so, saving the file basic information of the file;
a statistic module: after the basic information of the files is saved, counting the number of the files corresponding to any file type;
sharing the module: and when the number of the files corresponding to any one of the file types meets a preset condition, sending data updating information corresponding to the file type meeting the preset condition to a target application through an AIDL interface.
9. A document scanning device, characterized in that the device comprises:
a memory: for storing a computer program;
a processor: for implementing the steps of the document scanning method according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the file scanning method according to any one of claims 1 to 7.
CN202010750906.0A 2020-07-30 2020-07-30 File scanning method and related device Active CN111901685B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010750906.0A CN111901685B (en) 2020-07-30 2020-07-30 File scanning method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010750906.0A CN111901685B (en) 2020-07-30 2020-07-30 File scanning method and related device

Publications (2)

Publication Number Publication Date
CN111901685A true CN111901685A (en) 2020-11-06
CN111901685B CN111901685B (en) 2023-09-08

Family

ID=73182627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010750906.0A Active CN111901685B (en) 2020-07-30 2020-07-30 File scanning method and related device

Country Status (1)

Country Link
CN (1) CN111901685B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019839A (en) * 2012-11-15 2013-04-03 广东欧珀移动通信有限公司 Fast document display method, fast document display device and fast document display terminal
CN104778222A (en) * 2015-03-23 2015-07-15 四川长虹电器股份有限公司 Media library establishing and updating method on basis of USB (Universal Serial Bus) storage equipment
US20150220502A1 (en) * 2014-01-31 2015-08-06 Yahoo! Inc. Compressed serialization of data for communication from a client-side application
CN106055611A (en) * 2016-05-25 2016-10-26 努比亚技术有限公司 Display device for scanning processes, mobile terminal and method
CN106802812A (en) * 2016-12-02 2017-06-06 乐视控股(北京)有限公司 A kind of method of load document, device and electronic equipment
CN107273433A (en) * 2017-05-22 2017-10-20 努比亚技术有限公司 A kind of file scanning method, equipment and computer-readable recording medium
US20170372070A1 (en) * 2016-06-28 2017-12-28 Sophos Limited Cloud storage scanner
CN108052575A (en) * 2017-12-08 2018-05-18 深圳市创维软件有限公司 File scanning method, equipment and storage medium
CN109086087A (en) * 2018-08-07 2018-12-25 中国建设银行股份有限公司 A kind of apparatus scanning method and device based on TWAIN agreement
CN110232043A (en) * 2019-05-20 2019-09-13 深圳前海达闼云端智能科技有限公司 Show method, system, electronic equipment and the computer storage medium of file
WO2019237822A1 (en) * 2018-06-15 2019-12-19 深圳Tcl新技术有限公司 Android system boot speed control method, smart device, and storage medium
CN111200587A (en) * 2019-11-29 2020-05-26 云深互联(北京)科技有限公司 SDK construction method and system for software defined boundary function

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019839A (en) * 2012-11-15 2013-04-03 广东欧珀移动通信有限公司 Fast document display method, fast document display device and fast document display terminal
US20150220502A1 (en) * 2014-01-31 2015-08-06 Yahoo! Inc. Compressed serialization of data for communication from a client-side application
CN104778222A (en) * 2015-03-23 2015-07-15 四川长虹电器股份有限公司 Media library establishing and updating method on basis of USB (Universal Serial Bus) storage equipment
CN106055611A (en) * 2016-05-25 2016-10-26 努比亚技术有限公司 Display device for scanning processes, mobile terminal and method
US20170372070A1 (en) * 2016-06-28 2017-12-28 Sophos Limited Cloud storage scanner
CN106802812A (en) * 2016-12-02 2017-06-06 乐视控股(北京)有限公司 A kind of method of load document, device and electronic equipment
CN107273433A (en) * 2017-05-22 2017-10-20 努比亚技术有限公司 A kind of file scanning method, equipment and computer-readable recording medium
CN108052575A (en) * 2017-12-08 2018-05-18 深圳市创维软件有限公司 File scanning method, equipment and storage medium
WO2019237822A1 (en) * 2018-06-15 2019-12-19 深圳Tcl新技术有限公司 Android system boot speed control method, smart device, and storage medium
CN109086087A (en) * 2018-08-07 2018-12-25 中国建设银行股份有限公司 A kind of apparatus scanning method and device based on TWAIN agreement
CN110232043A (en) * 2019-05-20 2019-09-13 深圳前海达闼云端智能科技有限公司 Show method, system, electronic equipment and the computer storage medium of file
CN111200587A (en) * 2019-11-29 2020-05-26 云深互联(北京)科技有限公司 SDK construction method and system for software defined boundary function

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
齐耀龙;: "基于嵌入式多媒体系统的LAN快速扫描算法", 合作经济与科技, no. 13 *

Also Published As

Publication number Publication date
CN111901685B (en) 2023-09-08

Similar Documents

Publication Publication Date Title
CN105867947B (en) Data processing method and device after preset application program updating
CN102932777B (en) The update method of a kind of terminal applies and user terminal
CN104866342A (en) Method and device for simultaneously starting multiple same applications on intelligent terminal
CN104461504A (en) Managing method of terminal application program
US20100042801A1 (en) Apparatus and method for reallocation of memory in a mobile communication terminal
CN1838830A (en) Selecting a carrier channel based on channel capability
CN103369003A (en) A method and a system for scanning redundancy files in a mobile device by using cloud computing
CN106681581B (en) Application icon arrangement method and device
CN108337127B (en) Application performance monitoring method, system, terminal and computer readable storage medium
CN111045714A (en) Firmware updating method and device, earphone and computer readable storage medium
CN105955770A (en) Application program uninstalling method and terminal
CN102612023A (en) Mobile terminal and application updating method and server thereof
CN105630932A (en) Method and device for managing files of intelligent terminals
US20120191756A1 (en) Terminal having searching function and method for searching using data saved in clipboard
CN109117153B (en) Application processing method, device, terminal and storage medium
CN104219356A (en) Method and device for displaying and searching contact man information and mobile terminal
CN108052575A (en) File scanning method, equipment and storage medium
US8787979B2 (en) Method and terminal for displaying cell phone menu with personalized setting
CN112114804A (en) Application program generation method, device and system
JP2006252354A (en) Data management device, cellular phone, data management method, program, and recording medium
CN111901685A (en) File scanning method and related device
CN107766086B (en) Function option display method and device, electronic equipment and readable storage medium
US7778660B2 (en) Mobile communications terminal, information transmitting system and information receiving method
CN113721936A (en) Application management method, intelligent terminal, device and storage medium
US20100262927A1 (en) Method and a device for controlling the display of an information area on the welcome screen of a mobile terminal

Legal Events

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