CN111901685B - File scanning method and related device - Google Patents

File scanning method and related device Download PDF

Info

Publication number
CN111901685B
CN111901685B CN202010750906.0A CN202010750906A CN111901685B CN 111901685 B CN111901685 B CN 111901685B CN 202010750906 A CN202010750906 A CN 202010750906A CN 111901685 B CN111901685 B CN 111901685B
Authority
CN
China
Prior art keywords
file
files
scanning
folder
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010750906.0A
Other languages
Chinese (zh)
Other versions
CN111901685A (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

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

Landscapes

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

Abstract

The invention discloses a file scanning method, wherein a JNI interface can realize 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 can realize scanning of files stored in an intelligent television, so that 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 carrying out data communication between different processes in an Android system. Communication among different threads in the Android system can be realized through the AIDL interface, so that the data update message can be timely sent to the target application. 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 technical field of smart televisions, and in particular, to a file scanning method, a file scanning device, a file scanning apparatus, and a computer readable storage medium.
Background
The system used by the smart television at the present stage is usually an Android system, and file scanning based on the Android system is mainly carried out by a MediaScanner of the Android system. However, mediaScanner scanning speed is slower, monitoring in the scanning process cannot be performed, support for larger-capacity storage equipment is poor, and file classification preview work which is performed immediately after hard disk plug-in cannot be performed. It is an urgent problem for those skilled in the art to provide a file scanning method that can be scanned at a high speed and can monitor during the scanning process.
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, the scanning speed is high, and monitoring can be realized in the scanning process.
In order to solve the above technical problems, the present invention provides a file scanning method, including:
scanning files stored in the intelligent television through the JNI 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 the suffix of the file; if yes, saving the file basic information of the file;
after the file basic information is stored, counting the number of 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 a target application through an AIDL interface.
Optionally, after the determining whether the file corresponds to the preset required file type according to the suffix of the file, 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 tv includes:
and calling a preset program segment constructed based on C++ through a JNI interface to scan the file stored in the intelligent television.
Optionally, the files stored in the smart television include files stored in the smart television and files stored in the 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, 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 types meeting the preset condition, and file basic information corresponding to the file types meeting the preset condition.
The invention also provides a file scanning device, which comprises:
and a scanning module: the method comprises the steps of scanning files stored in the intelligent television through a JNI interface;
a first scanning module: when the scanned file is a folder, scanning the file in the folder;
and a second scanning module: 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; if yes, saving the file basic information of the file;
and a statistics module: after the file basic information is stored, counting the number of files corresponding to any file type;
and a sharing module: and the data updating information corresponding to the file types meeting the preset conditions is sent to the target application through the AIDL interface when the number of the files corresponding to any file type meets the preset conditions.
The invention also provides a document scanning device, comprising:
a memory: for storing a computer program;
a processor: steps for implementing a method for scanning a document according to any one of the preceding claims when executing said computer program.
The present invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the file scanning method as described in any of the preceding claims.
The file scanning method provided by the invention comprises the steps of scanning files stored in the intelligent television through the JNI 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 the suffix of the file; if yes, saving the file basic information of the file; after the basic information of the files is stored, counting the number of the files corresponding to any file type; and when the number of the files corresponding to any file type meets the 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 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 can realize scanning of files stored in the intelligent television, and because the C language and the C++ language are closer to the bottom layer language of the computer, 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 carrying out data communication between different processes in an Android system. Communication among different threads in the Android system can be realized through the AIDL interface, so that the data update message can be timely sent to the target application, and monitoring in the scanning process is realized while the faster scanning speed is realized.
The invention also provides a file scanning device, a file scanning device and a computer readable storage medium, which have the same beneficial effects and are not described in detail herein.
Drawings
For a clearer description of embodiments of the invention or of the prior art, the drawings that are used in the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained from them without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for scanning a file according to an embodiment of the present invention;
FIG. 2 is a flowchart of a specific document scanning method according to an embodiment of the present invention;
FIG. 3 is a block diagram illustrating 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, a system used by the smart television is usually an Android system, and file scanning based on the Android system is mainly performed by a MediaScanner of the Android system. However, the Android system uses Java managed codes for self-contained media scanning service, so that the efficiency is low, the scanning speed is low, monitoring of a scanning process cannot be performed, support for a larger-capacity storage device is poor, and file classification preview work which is performed immediately after a hard disk is plugged in and plugged out cannot be performed.
The file scanning method provided by the invention comprises the steps of scanning files stored in the intelligent television through the JNI 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 the suffix of the file; if yes, saving the file basic information of the file; after the basic information of the files is stored, counting the number of the files corresponding to any file type; and when the number of the files corresponding to any file type meets the 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 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 can realize scanning of files stored in the intelligent television, and because the C language and the C++ language are closer to the bottom layer language of the computer, 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 carrying out data communication between different processes in an Android system. Communication among different threads in the Android system can be realized through the AIDL interface, so that the data update message can be timely sent to the target application, and monitoring in the scanning process is realized while the faster scanning speed is realized.
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a file scanning method according to an embodiment of the invention.
Referring to fig. 1, in an embodiment of the present invention, a file scanning method includes:
s101: and scanning files stored in the intelligent television through the JNI interface.
JNI is an abbreviation of Java Native Interface, and by writing a program using a Java native interface, it can be ensured that code is convenient to migrate on different platforms. 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 to implement java code and code constructed based on c++ language, and interact with code constructed based on C language. Accordingly, in the embodiment of the invention, the smart television is generally a smart television with an Android system.
S102: and when the scanned file is a folder, scanning the file in the folder.
When the file stored in the smart television is scanned in S101, a folder is 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 files in the new folder are continuously scanned until all the files in the folder are scanned, the previous-level folder is skipped to continue scanning, and the step is usually repeated to S101.
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 invention, required file types and suffixes of files corresponding to each file type are required to be preset. In this step, when a file other than the folder is scanned, it is determined whether the scanned file corresponds to a preset desired file type according to the suffix of the scanned file, and whether the scanned file is a desired file is determined. If yes, means that the file is the required file, the following step S104 is executed to save the file basic information of the file; if not, the file is not needed, and the file can be skipped directly to scan other files. And skipping the file if the file does not correspond to the preset required file type.
The file types described above are generally required to include any one or any combination of the following in embodiments of the invention: video files, music files, picture files, apk installation package files. Of course, the specific inclusion scope for the file type is not specifically limited in the present invention facts, as the case may be. In general, the file types in the embodiments of the present invention need to include all of the file types described above.
S104: and saving 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, the file basic information generally needs to include a file path and a file name in the embodiment of the present invention. Of course, the above-mentioned file basic information is also generally required to include basic information such as a file size.
S105: after the basic information of the files is stored, the number of the files corresponding to any file type is counted.
In general, this step, S104, and S101 to S103 are executed by different threads, that is, S104 is executed to save the basic information of the file that meets the condition while S101 to S103 scan each file, and this step is executed to count the number of files during the saving. In this step, the number of files corresponding to each file type is generally counted separately.
S106: and when the number of the files corresponding to any file type meets the preset condition, sending data updating information corresponding to the file type meeting the preset condition to the target application through the AIDL interface.
AIDL is the Android system interface definition language, and AIDL interface is the interface for carrying out data communication between different processes in the Android system. In the step, communication among different threads in the Android system can be realized through the AIDL interface, so that the data update message can be timely sent to the target application.
In this step, when the number of files meets the preset condition, data update information corresponding to each file type is actively sent to the target application, where the target application includes a file manager, multimedia software, and other software capable of displaying the 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 the information of the file stored in the smart television according to the data update information.
In general, in this step, when the number of newly added files in any file type reaches a number threshold, for example, when the number of newly added files reaches ten, a data update message is sent to the target application, so that the user can know the information of the stored files in the smart tv through the target application based on the data update message. In this step, the data update message is generally sent to the target application when the number of files newly added in any file type reaches the number threshold value every time.
The file scanning method provided by the embodiment of the invention comprises the steps of scanning files stored in the intelligent television through the JNI 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 the suffix of the file; if yes, saving the file basic information of the file; after the basic information of the files is stored, counting the number of the files corresponding to any file type; and when the number of the files corresponding to any file type meets the 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 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 can realize scanning of files stored in the intelligent television, and because the C language and the C++ language are closer to the bottom layer language of the computer, 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 carrying out data communication between different processes in an Android system. Communication among different threads in the Android system can be realized through the AIDL interface, so that the data update message can be timely sent to the target application, and monitoring in the scanning process is realized while the faster scanning speed is realized.
The details of the document scanning method provided by the present invention will be described in detail in the following embodiments of the present invention.
Referring to fig. 2, fig. 2 is a flowchart of a specific file scanning method according to an embodiment of the 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 interface to scan the file stored in the intelligent television.
In the embodiment of the invention, a JNI programming technology is generally used for writing C++ codes to scan files stored in the intelligent television. The JNI allows Java codes, codes written by the C++ language and the preset program segments to interact, and the C++ language is closer to the bottom layer, so that compared with a scanning algorithm written by the traditional Java language, the preset program segments have better performance and higher efficiency, and therefore, better scanning speed and memory management can be obtained, and 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 file stored in the smart television of the Android system is scanned.
It should be noted that, in the embodiment of the present invention, the files stored in the smart tv include files stored in the smart tv and files stored in the external storage device of the smart tv. And 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: and when the scanned file is a folder, scanning the file in the folder.
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 file basic information of the file.
S205: after the basic information of the files is stored, the 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 the preset condition, sending data updating information corresponding to the file type meeting the preset condition to the target application through the AIDL interface.
The above S202 to S206 are substantially identical to S102 to S106 in the above embodiment of the present invention, and the details are described in detail in the above embodiment of the present invention, which is not repeated here. Specifically, in this step, the data update information includes the number of files corresponding to the file types satisfying the preset condition, and the file basic information corresponding to the file types satisfying the preset condition. And the data updating information can reflect how many files the corresponding file types currently comprise, and include the specific path, name and other basic information 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 the number of the files, that is, the number of files belonging to a certain file type in the files stored in the smart tv, is displayed on the primary interface; and then the file basic information corresponding to the file type can be displayed in a scrolling mode on the secondary interface. Of course, the target application may display the information of the storage file in the smart tv in other manners, which is not specifically limited in the embodiment of the present invention.
According to the file scanning method provided by the embodiment of the invention, the JNI interface specifically realizes interaction between the java code and the C++ language code, and the program constructed based on the C++ language code realizes scanning of the file stored in the intelligent television, and as the C++ language is closer to the bottom language of the computer, the faster file scanning speed can be realized; communication among different threads in the Android system can be realized through the AIDL interface, so that the data update message can be timely sent to the target application, and monitoring in the scanning process is realized while the faster scanning speed is realized.
The following describes a document scanning device according to an embodiment of the present invention, and the document scanning device 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 device according to an embodiment of the invention.
Referring to fig. 3, in an embodiment of the present invention, a document scanning apparatus may include:
scanning module 100: and the file scanning module is used for scanning files stored by the intelligent television through the JNI interface.
The first scanning module 200: and the method is used for scanning the files in the folder when the scanned files are the folder.
The second scanning module 300: 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; if yes, the file basic information of the file is saved.
Statistics module 400: and after the file basic information is stored, counting the number of files corresponding to any file type.
Sharing module 500: and the data updating information corresponding to the file types meeting the preset conditions is sent to the target application through the AIDL interface when the number of the files corresponding to any file type meets the preset conditions.
Preferably, in an embodiment of the present invention, the method further includes:
skipping the 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 interface to scan the file stored in the intelligent television.
Preferably, in the embodiment of the present invention, the file stored in the smart tv includes a file stored in the smart tv and a file stored in an external storage device of the smart tv.
Preferably, in an embodiment of the present invention, the file type includes any one or any combination of the following:
video files, music files, picture files, apk installation package files.
Preferably, in an 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 a number of files corresponding to file types satisfying the preset condition, and file basic information corresponding to file types satisfying the preset condition.
The document scanning device of the present embodiment is used to implement the foregoing document scanning method, so that the specific implementation in the document scanning device may be referred to the foregoing example portions of the document scanning method, for example, the scanning module 100, the first scanning module 200, the second scanning module 300, and the statistics module 400, and the sharing module 500 are respectively used to implement steps S101 to S106 in the foregoing document scanning method, so that the specific implementation may refer to the description of the corresponding examples of each portion, and will not be repeated herein.
The following describes a document scanning device according to an embodiment of the present invention, where the document scanning device described below and the document scanning method and the document scanning device described above may be referred to correspondingly.
Referring to fig. 4, fig. 4 is a block diagram illustrating a file scanning apparatus according to an embodiment of the present invention.
Referring to fig. 4, the document scanning apparatus 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 described in the above embodiment of the invention when executing the computer program.
The processor 11 in the document scanning apparatus of the present embodiment is used to install the document scanning device described in the above embodiment of the invention, and the processor 11 in combination with the memory 12 can implement the document scanning method described in any of the above embodiments of the invention. Therefore, the detailed description of the document scanning device can be found in the foregoing example portions of the document scanning method, and the detailed description of the example portions may be referred to for the corresponding description of the examples of the respective portions, which are not repeated herein.
The present invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method of scanning a file as described in any of the above embodiments of the invention. The remainder of this disclosure may refer to the prior art and will not be described further herein.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
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 elements and steps are described above generally in terms of functionality in order to clearly illustrate the 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 solution. 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. The software modules may be disposed 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 is further noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above describes in detail a document scanning method, a document scanning apparatus, a document scanning device, and a computer-readable storage medium provided by the present invention. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.

Claims (10)

1. A document scanning method, comprising:
scanning files stored in the intelligent television through the JNI interface;
when the scanned file is a folder, scanning the file in the folder;
when a new folder is scanned in a certain folder, scanning files in the new folder until all files in the folder are scanned, and jumping to the folder at the previous stage to continue scanning;
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; if yes, saving the file basic information of the file;
after the file basic information is stored, counting the number of files corresponding to any file type;
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 a target application through an AIDL interface;
storing file basic information corresponding to a preset required file type while scanning the file through a plurality of threads, and counting the number of the files when storing the file basic information;
when the number of the files corresponding to any file type meets a preset condition, sending data update information corresponding to the file type meeting the preset condition to a target application through an AIDL interface comprises:
and when the number of the newly added files of any file type reaches a number threshold value every time, sending the data updating message to a target application through an AIDL interface.
2. The method according to claim 1, further comprising, after said determining whether the file corresponds to a preset desired file type according to the suffix of the file:
and if the file does not correspond to the preset required file type, skipping the file.
3. The method of claim 2, wherein scanning the file stored by the smart tv through the JNI interface comprises:
and calling a preset program segment constructed based on C++ through a JNI interface to scan the file stored in the intelligent television.
4. The method of claim 3, wherein the files stored by the smart tv include files stored inside the smart tv and files stored in an external storage device of the smart tv.
5. The method of claim 1, wherein the file type comprises any one or any combination of the following:
video files, music files, picture files, apk installation package files.
6. The method of claim 1, wherein the file base information includes a file path and a file name.
7. The method of claim 6, wherein the data update information includes a number of files corresponding to file types satisfying the preset condition, and file basic information corresponding to file types satisfying the preset condition.
8. A document scanning apparatus, comprising:
and a scanning module: the method comprises the steps of scanning files stored in the intelligent television through a JNI interface;
a first scanning module: when the scanned file is a folder, scanning the file in the folder;
and a cyclic scanning module: when a new folder is scanned in a certain folder, scanning the files in the new folder until all the files in the folder are scanned, and jumping to the folder at the previous stage to continue scanning;
and a second scanning module: 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; if yes, saving the file basic information of the file;
and a statistics module: after the file basic information is stored, counting the number of files corresponding to any file type;
and a sharing module: when the number of the files corresponding to any file type meets a preset condition, sending data update information corresponding to the file type meeting the preset condition to a target application through an AIDL interface;
storing file basic information corresponding to a preset required file type while scanning the file through a plurality of threads, and counting the number of the files when storing the file basic information;
the sharing module is specifically configured to:
and when the number of the newly added files of any file type reaches a number threshold value every time, sending the data updating message to a target application through an AIDL interface.
9. A document scanning apparatus, the apparatus comprising:
a memory: for storing a computer program;
a processor: steps for implementing the file scanning method according to any of claims 1 to 7 when said computer program is executed.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the file scanning method according to any 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 CN111901685A (en) 2020-11-06
CN111901685B true 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 (10)

* 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
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
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9779069B2 (en) * 2014-01-31 2017-10-03 Yahoo Holdings, Inc. Model traversing based compressed serialization of user interaction data and communication from a client-side application
GB2551735B (en) * 2016-06-28 2020-10-14 Sophos Ltd Cloud storage scanner

Patent Citations (10)

* 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
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
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快速扫描算法;齐耀龙;;合作经济与科技(第13期);全文 *

Also Published As

Publication number Publication date
CN111901685A (en) 2020-11-06

Similar Documents

Publication Publication Date Title
CN108055264B (en) Scheduling apparatus and method for push streaming server, and computer-readable storage medium
CN102932777B (en) The update method of a kind of terminal applies and user terminal
CN100549948C (en) A kind of method and equipment thereof that generates layered user interface
CN1838830A (en) Selecting a carrier channel based on channel capability
EP2651106A1 (en) Method and device for automatic classification of applications in mobile terminal
CN102761736A (en) Video decoding method and device
CN101287189B (en) Displaying method of terminal, server and terminal
CN108337127B (en) Application performance monitoring method, system, terminal and computer readable storage medium
CN112817657B (en) Application program starting item loading method, device, system and storage medium
CN105630932A (en) Method and device for managing files of intelligent terminals
CN109117153B (en) Application processing method, device, terminal and storage medium
CN108549534B (en) Graphical user interface redrawing method, terminal device and computer-readable storage medium
CN108052575A (en) File scanning method, equipment and storage medium
CN110609710B (en) Android system starting speed control method, intelligent device and storage medium
CN111901685B (en) File scanning method and related device
US20030066059A1 (en) Method for executing java application midlet using communication among java applications
CN105094776A (en) List processing method and device
CN103500099A (en) Method for achieving quick software secondary development through expansion points and expansion
CN108920333B (en) Event state monitoring method and event state monitor
CN106792202B (en) Set top box data adaptation method, device and system
CN107480269B (en) Object display method and system, medium and computing equipment
CN115623063A (en) Message pushing method, device, equipment and storage medium for full-scale equipment
CN108595262B (en) Data processing method and device
CN112559647A (en) Method and device for updating data of map layer
CN113721936A (en) Application management method, intelligent terminal, device and storage medium

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