CN108446300B - Data information scanning method and device - Google Patents

Data information scanning method and device Download PDF

Info

Publication number
CN108446300B
CN108446300B CN201810076830.0A CN201810076830A CN108446300B CN 108446300 B CN108446300 B CN 108446300B CN 201810076830 A CN201810076830 A CN 201810076830A CN 108446300 B CN108446300 B CN 108446300B
Authority
CN
China
Prior art keywords
data information
scanned
memory
information
capacity
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.)
Expired - Fee Related
Application number
CN201810076830.0A
Other languages
Chinese (zh)
Other versions
CN108446300A (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810076830.0A priority Critical patent/CN108446300B/en
Publication of CN108446300A publication Critical patent/CN108446300A/en
Application granted granted Critical
Publication of CN108446300B publication Critical patent/CN108446300B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files

Abstract

The invention discloses a method and a device for scanning data information. Wherein, the method comprises the following steps: judging whether the data information to be scanned meets a preset compression condition or not according to the information capacity of the data information to be scanned; if so, compressing the data information to be scanned, and loading the compressed data information into the memory; decompressing the compressed data information loaded in the memory; and analyzing the decompressed data information to determine a scanning result of the data information to be scanned. Therefore, by using the scheme provided by the invention, the data information is compressed, and only the compressed data information is loaded in the memory, so that the problem that the data information is too large to scan is avoided, the scanning method can be suitable for various large files, and the service application scene is widened.

Description

Data information scanning method and device
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for scanning data information.
Background
At present, in many application scenarios, data information needs to be scanned so as to perform subsequent processing according to a scanning result. For example, in many scenarios, such as virus killing and updating, a database, such as a virus library or an update library, needs to be scanned. Specifically, during scanning, the file needs to be loaded into the memory first, so that the system performs scanning processing.
However, the inventor finds that the scanning mode in the prior art has at least the following defects in the process of implementing the invention: because the file to be scanned must be loaded into the memory for scanning, the size of the file to be scanned is limited by the remaining space of the memory. If the size of the file is larger than the remaining space of the memory, the file cannot be loaded into the memory, and the scanning operation fails.
Disclosure of Invention
In view of the above, the present invention has been made to provide a method and apparatus for scanning data information that overcomes or at least partially solves the above-mentioned problems.
According to an aspect of the present invention, there is provided a method of scanning data information, comprising:
judging whether the data information to be scanned meets a preset compression condition or not according to the information capacity of the data information to be scanned;
if so, compressing the data information to be scanned, and loading the compressed data information into the memory;
decompressing the compressed data information loaded in the memory;
and analyzing the decompressed data information to determine a scanning result of the data information to be scanned.
According to another aspect of the present invention, there is provided a scanning apparatus for data information, comprising:
the judging module is suitable for judging whether the data information to be scanned meets the preset compression condition or not according to the information capacity of the data information to be scanned;
the loading module is suitable for compressing the data information to be scanned if the data information to be scanned is in the positive state and loading the compressed data information into the memory;
the decompression module is suitable for decompressing the compressed data information loaded in the memory;
and the determining module is suitable for analyzing the decompressed data information to determine a scanning result of the data information to be scanned.
According to still another aspect of the present invention, there is provided an electronic apparatus including: the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the scanning method of the data information.
According to still another aspect of the present invention, there is provided a computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to the scanning method for data information as described above.
According to the data information scanning method and the data information scanning device, when the data information to be scanned is judged to accord with the preset compression condition according to the information capacity of the data information to be scanned, the data information to be scanned is compressed, and the compressed data information is loaded into the memory; and decompressing and analyzing the compressed data information loaded in the memory to determine the scanning result of the data information to be scanned. Therefore, the method compresses the data information, and only loads the compressed data information in the memory, so that the problem that the data information is too large to scan is avoided, the scanning method can be suitable for various large files, and the service application scenes are widened.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart diagram illustrating a method for scanning data information according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method for scanning data information according to another embodiment of the present invention;
fig. 3 is a diagram illustrating an apparatus structure of a scanning apparatus for data information according to still another embodiment of the present invention;
fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a flowchart illustrating a method for scanning data information according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step S110: and judging whether the data information to be scanned meets a preset compression condition or not according to the information capacity of the data information to be scanned.
The preset compression condition can be flexibly set, and the invention does not limit the specific setting mode. For example, a capacity threshold may be set in advance according to the total capacity of the memory, the information capacity is compared with the capacity threshold, whether the data information to be scanned meets the preset compression condition is determined according to the comparison result, and for example, the available capacity of the memory may be dynamically obtained, the information capacity is compared with the available capacity of the memory, and whether the data information to be scanned meets the preset compression condition is determined according to the comparison result.
Step S120: and if so, compressing the data information to be scanned, and loading the compressed data information into the memory.
And when the data information to be scanned is determined to accord with the preset compression condition, compressing the data information to be scanned, and loading the compressed data information into the memory. Various compression algorithms can be flexibly adopted for compression, so long as the purpose of reducing the size of the file can be achieved. In this embodiment, the file may be loaded into the memory after being compressed in the hard disk, or may be directly loaded into the memory and compressed.
Step S130: and decompressing the compressed data information loaded in the memory.
This step may be performed immediately after the step S120 is completed, or may be performed as needed after the step S120 is completed. For example, the decompression processing may be performed on the part of the data information when the corresponding data information needs to be used.
Step S140: and analyzing the decompressed data information to determine a scanning result of the data information to be scanned.
By the aid of the method, analytic scanning can be performed after decompression is completed, and scanning results can be determined. According to the method, the data information is compressed, and only the compressed data information is loaded in the memory, so that the problem that the data information is too large to scan is solved, the scanning method can be suitable for various large files, and the service application scenes are widened.
According to the data information scanning method provided by the embodiment, when the data information to be scanned is judged to meet the preset compression condition according to the information capacity of the data information to be scanned, the data information to be scanned is compressed, and the compressed data information is loaded into the memory; and decompressing and analyzing the compressed data information loaded in the memory to determine the scanning result of the data information to be scanned. Therefore, the method compresses the data information, and only loads the compressed data information in the memory, so that the problem that the data information is too large to scan is avoided, the scanning method can be suitable for various large files, and the service application scenes are widened.
Fig. 2 is a flow chart of a scanning method of data information according to another embodiment of the present invention. In this embodiment, data information is taken as updated data information as an example for explanation. The update data information may be information in the form of an update package to be downloaded, or the like, for implementing an update function of the software or system. Of course, in other embodiments of the present invention, the data information may also be bug fixing data information, for example, the data information may be in the form of a patch package, and is used to implement an automatic fixing function. As shown in fig. 2, the method includes:
step S210: and judging whether the data information to be scanned meets a preset compression condition or not according to the information capacity of the data information to be scanned.
Since the embodiment is mainly used for reducing the occupation of the memory so as to be beneficial to the scanning of the large file, the preset compression condition can be set according to the information capacity of the data information to be scanned and the memory information. Two possible implementations of the preset compression condition are described below:
in a first implementation manner, a capacity threshold is set in advance according to the total capacity of the memory, the information capacity is compared with the capacity threshold, and whether the data information to be scanned meets the preset compression condition or not is determined according to the comparison result. Specifically, if the total memory capacity is large, the capacity threshold may be set to be large; otherwise, the capacity threshold may be set smaller. Correspondingly, when the information capacity is larger than the capacity threshold value, the data information to be scanned is determined to accord with the preset compression condition. In addition, the capacity threshold may be set in association with an external condition such as a scanning frequency. This implementation is equivalent to a preset capacity threshold, and all data information greater than the capacity threshold needs to be compressed.
In a second implementation manner, the available capacity of the memory may be dynamically obtained, the information capacity is compared with the available capacity of the memory, and whether the data information to be scanned meets the preset compression condition is determined according to the comparison result. Specifically, after the data information to be scanned is acquired, the current available capacity of the memory is acquired in real time, and then whether the preset compression condition is met is dynamically determined according to a comparison result between the data information to be scanned and the current available capacity of the memory. For example, if the ratio or the difference between the data information to be scanned and the current available memory capacity meets a certain condition, it is determined that the preset compression condition is met. In fact, a dynamically adjustable threshold may be set according to a ratio or a difference between the data information to be scanned and the current available memory capacity, and it is determined whether a preset compression condition is met according to the threshold. The method can dynamically adjust the compression condition so that the current compression condition is more consistent with the current system state.
In practical applications, the two implementation manners may be used alone or in combination, and the present invention is not limited thereto.
Step S220: if so, dividing the data information to be scanned into a plurality of data blocks; compressing each data block respectively to obtain a compressed data block, and establishing a data block index for the compressed data block; and loading the compressed data block into a memory, and generating an index file according to the data block index.
And when the data information to be scanned is determined to accord with the preset compression condition, compressing the data information to be scanned, and loading the compressed data information into the memory.
Specifically, in this embodiment, in order to facilitate the segmentation of the large file to achieve the effect of saving the memory space, before compressing the data information, the data information to be scanned is divided into a plurality of data blocks in advance, and each data block is compressed respectively to obtain each compressed data block, and each compressed data block is loaded into the memory. When dividing the data block, the division may be performed according to various factors such as the information size, the content type, and the frequency of use of each part included in the data information. After division, compression processing is performed on each data block, so that targeted decompression operation can be realized in the subsequent process.
In addition, in order to facilitate implementation of targeted decompression operation in the subsequent process and improve information query efficiency, in this embodiment, a data block index is further established for the compressed data block, and an index file is generated according to the data block index. For example, when one data information is divided into five data blocks, one data block index is set for each compressed data block, and the five data block indexes are stored in the index file so as to be quickly located to the corresponding data blocks.
Step S230: and respectively acquiring each compressed data block according to each data block index contained in the index file, and respectively decompressing each acquired data block.
This step may be performed immediately after the step S220 is completed, or may be performed as needed after the step S220 is completed.
For example, in a specific business scenario, the scan engine would process as follows:
firstly, all the data information to be scanned is loaded into the memory. This process corresponds to step S210 and step S220. In this process, basic attributes of each data information, such as file size, file type, file update time, etc., need to be scanned; and all the data information is loaded into the memory according to the basic attributes. For example, in the process, whether compression processing needs to be performed on the file can be judged, and the file which does not need to be compressed is preferentially loaded; and/or, files that do not require compression and files that require compression are stored separately. In this step, if it is determined that one file conforms to the preset compression rule, the file is compressed and stored in the memory, so that the memory space is saved.
And then, acquiring data information required to be processed from the memory according to a preset processing sequence and executing scanning processing. This process corresponds to step S230. The preset processing sequence may be various sequence rules such as processing data that does not need to be compressed preferentially, and then processing data that needs to be compressed. It can be seen that this process is essentially implemented on demand, and the next data information to be scanned is obtained from the memory according to the current processing schedule. In the specific acquisition process, it is considered that the size of a file obtained by decompressing all large files may be larger than the remaining available space of the memory, and even if the size of the file is not larger than the remaining available space of the memory, the operation efficiency of the system may be affected due to the fact that the memory occupies too large space. In order to solve the problem, in the process, each compressed data block is respectively obtained according to each data block index contained in the index file, and each obtained data block is respectively decompressed. For example, assuming that a complete compressed data message contains 10 data blocks, if 10 data blocks are decompressed into the memory at the same time, the memory consumption will be too large, so that only one or two or three data blocks are decompressed at a time according to the actual processing requirement, thereby reducing the memory consumption in the same time, and effectively preventing the scan failure caused by the too large data message.
Step S240: and analyzing each decompressed data block to determine a scanning result of the data information to be scanned.
After step S230 is completed and a data block is obtained, the decompressed data block is analyzed in this step, so as to obtain an analysis result of the data block. And finally, determining the whole scanning result of the data information to be scanned according to the analysis result of each data block contained in one data information.
Therefore, in the embodiment, by executing compression processing in the memory (the conventional compression processing is implemented in the hard disk) and directly storing the compressed file in the memory, the occupation of the memory by the large file can be effectively reduced, and the system operation efficiency is improved. And because the compressed file can be decompressed according to the data block without decompressing all data information at a time, the memory amount occupied by the large file in the scanning process is obviously reduced, and the scanning function can be completed in the mode even if the size of the file is larger than the residual space of the memory, so that the application range of the scanning function is widened, and the scanning function can be realized by some applications which are originally limited by the memory space and cannot apply the scanning function, thereby providing more comprehensive service for users. The method is particularly suitable for scanning the updating scene, and the traditional scanning scheme cannot be applied to scanning of the updating library because the updating library is very large.
In addition, various possible modifications or extensions may be made to the above-described embodiments by those skilled in the art. For example, before the step of determining whether the data information to be scanned meets the preset compression condition according to the information capacity of the data information to be scanned is executed, the method may further include the following steps:
monitoring whether a shutdown instruction is received; if yes, intercepting operation is executed according to the shutdown instruction, and the step of judging whether the data information to be scanned meets the preset compression condition or not according to the information capacity of the data information to be scanned is executed.
Because the file to be scanned must be loaded into the memory for scanning, a large memory is occupied in the scanning process, a lot of resources are consumed, the use of the computer is influenced, even the computer cannot be used, and the normal use of the computer is influenced. When monitoring whether a shutdown instruction is received, the shutdown function used for sending the shutdown instruction can be determined in advance, then the shutdown function is monitored through a hook function or other types of functions which can be related to the shutdown function, and whether the shutdown instruction is received or not can be monitored in time through monitoring the shutdown function. If yes, the interception operation can be executed by suspending the transmission of the shutdown instruction.
Optionally, after the step of performing the interception operation on the shutdown instruction, in order to save resources and increase the processing speed, the process unrelated to the scanning operation is further marked as the target process, and the target process is ended. Processes that are not relevant to various bug fixes operations, such as documents, browsers, etc., that are open on a computer may be marked as target processes and the target processes may be terminated. By shutting down processes unrelated to the bug fix operation, the efficiency of executing the bug fix operation can be improved, and the time taken for fixing can be reduced. And after the target process is finished, executing the step of judging whether the data information to be scanned meets the preset compression condition according to the information capacity of the data information to be scanned and the subsequent steps, and finally executing release operation aiming at the shutdown instruction when the condition that the data information to be scanned is finished is monitored. Specifically, the releasing operation may be performed by resuming the transmission of the shutdown instruction. When the system receives the transmitted shutdown instruction, the shutdown operation can be executed to perform shutdown.
Through the execution steps, the data information scanning process can be started when the user does not use the computer and triggers the shutdown instruction, so that the situation that the scanning data information occupies a large amount of computer memory and resources to influence the normal use of the computer by the user when the user uses the computer is avoided, and the user experience is greatly improved.
Fig. 3 is a block diagram illustrating an apparatus for scanning data information according to another embodiment of the present invention, and as shown in fig. 3, the apparatus includes:
the judging module 33 is adapted to judge whether the data information to be scanned meets a preset compression condition according to the information capacity of the data information to be scanned;
the loading module 34 is adapted to compress the data information to be scanned and load the compressed data information into the memory if the data information to be scanned is compressed;
the decompression module 35 is adapted to decompress the compressed data information loaded in the memory;
the determining module 36 is adapted to parse the decompressed data information to determine a scanning result of the data information to be scanned.
In another embodiment of the present invention, wherein the determining module 33 is specifically adapted to:
setting a capacity threshold value in advance according to the total capacity of the memory, comparing the information capacity with the capacity threshold value, and determining whether the data information to be scanned meets a preset compression condition or not according to a comparison result; and/or the presence of a gas in the gas,
and dynamically acquiring the available capacity of the memory, comparing the information capacity with the available capacity of the memory, and determining whether the data information to be scanned meets a preset compression condition according to a comparison result.
Optionally, wherein the loading module 34 is specifically adapted to:
dividing the data information to be scanned into a plurality of data blocks;
compressing each data block respectively to obtain a compressed data block, and establishing a data block index for the compressed data block;
and loading the compressed data block into a memory, and generating an index file according to the data block index.
Optionally, wherein the decompression module 35 is specifically adapted to:
and respectively acquiring each compressed data block according to each data block index contained in the index file, and respectively decompressing each acquired data block.
Optionally, wherein the data information includes: and updating data information and vulnerability repair data information.
Optionally, wherein the apparatus further comprises:
a monitoring module 31 adapted to monitor whether a shutdown instruction is received;
and the execution module 32 is adapted to execute an interception operation aiming at the shutdown instruction and execute the content in the judgment module if the shutdown instruction is yes.
Optionally, wherein the apparatus further comprises a releasing module 37,
is adapted to: and when the fact that the scanning of the data information to be scanned is finished is monitored, the releasing operation is executed aiming at the shutdown instruction.
Optionally, wherein the execution module 32 is further adapted to:
and marking the process irrelevant to the scanning operation as a target process, and ending the target process.
The specific structure and the working principle of each module may refer to the description of the corresponding step in the method embodiment, and are not described herein again.
The embodiment of the application provides a non-volatile computer storage medium, wherein at least one executable instruction is stored in the computer storage medium, and the computer executable instruction can execute the scanning method of the data information in any method embodiment.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
As shown in fig. 4, the electronic device may include: a processor (processor)402, a Communications Interface 404, a memory 406, and a Communications bus 408.
Wherein:
the processor 402, communication interface 404, and memory 406 communicate with each other via a communication bus 408.
A communication interface 404 for communicating with network elements of other devices, such as clients or other servers.
The processor 402 is configured to execute the program 410, and may specifically perform relevant steps in the above embodiments of the data information scanning method.
In particular, program 410 may include program code comprising computer operating instructions.
The processor 402 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention. The electronic device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 410 may specifically be configured to cause the processor 402 to perform the following operations:
judging whether the data information to be scanned meets a preset compression condition or not according to the information capacity of the data information to be scanned;
if so, compressing the data information to be scanned, and loading the compressed data information into a memory;
decompressing the compressed data information loaded in the memory;
and analyzing the decompressed data information to determine a scanning result of the data information to be scanned.
In an alternative manner, the program 410 may be further specifically configured to cause the processor 402 to perform the following operations:
setting a capacity threshold value in advance according to the total capacity of the memory, comparing the information capacity with the capacity threshold value, and determining whether the data information to be scanned meets a preset compression condition or not according to a comparison result; and/or the presence of a gas in the gas,
and dynamically acquiring the available capacity of the memory, comparing the information capacity with the available capacity of the memory, and determining whether the data information to be scanned meets a preset compression condition according to a comparison result.
In an alternative manner, the program 410 may be further specifically configured to cause the processor 402 to perform the following operations: dividing the data information to be scanned into a plurality of data blocks;
compressing each data block respectively to obtain a compressed data block, and establishing a data block index for the compressed data block;
and loading the compressed data block into a memory, and generating an index file according to the data block index.
In an alternative manner, the program 410 may be further specifically configured to cause the processor 402 to perform the following operations: and respectively acquiring each compressed data block according to each data block index contained in the index file, and respectively decompressing each acquired data block.
In an alternative manner, the program 410 may be further specifically configured to cause the processor 402 to perform the following operations: the data information includes: and updating data information and vulnerability repair data information.
In an alternative manner, the program 410 may be further specifically configured to cause the processor 402 to perform the following operations: monitoring whether a shutdown instruction is received;
if yes, intercepting operation is executed according to the shutdown instruction, and whether the data information to be scanned meets preset compression conditions or not is judged according to the information capacity of the data information to be scanned.
In an alternative manner, the program 410 may be further specifically configured to cause the processor 402 to perform the following operations: and when the fact that the scanning of the data information to be scanned is finished is monitored, the releasing operation is executed aiming at the shutdown instruction.
In an alternative manner, the program 410 may be further specifically configured to cause the processor 402 to perform the following operations: and marking the process irrelevant to the scanning operation as a target process, and ending the target process.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of a scanning device for data information in accordance with embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (12)

1. A method of scanning data information, comprising:
judging whether the data information to be scanned meets a preset compression condition or not according to the information capacity of the data information to be scanned;
if so, compressing the data information to be scanned, and loading the compressed data information into a memory;
decompressing the compressed data information loaded in the memory;
analyzing the decompressed data information to determine a scanning result of the data information to be scanned;
the step of judging whether the data information to be scanned meets the preset compression condition according to the information capacity of the data information to be scanned specifically comprises the following steps:
setting a capacity threshold value in advance according to the total capacity of the memory, comparing the information capacity with the capacity threshold value, and determining whether the data information to be scanned meets a preset compression condition or not according to a comparison result; and/or the presence of a gas in the gas,
dynamically acquiring the available capacity of the memory, comparing the information capacity with the available capacity of the memory, and determining whether the data information to be scanned meets a preset compression condition according to a comparison result;
the step of compressing the data information to be scanned and loading the compressed data information into the memory specifically includes:
dividing the data information to be scanned into a plurality of data blocks;
compressing each data block respectively to obtain a compressed data block, and establishing a data block index for the compressed data block;
loading the compressed data block into a memory, and generating an index file according to the data block index;
the decompressing the compressed data information loaded in the memory specifically includes:
and respectively acquiring each compressed data block according to each data block index contained in the index file, and respectively decompressing each acquired data block.
2. The method of claim 1, wherein the data information comprises: and updating data information and vulnerability repair data information.
3. The method according to claim 1 or 2, wherein before the step of determining whether the data information to be scanned meets the preset compression condition according to the information capacity of the data information to be scanned, the method further comprises:
monitoring whether a shutdown instruction is received;
if yes, intercepting operation is executed according to the shutdown instruction, and whether the data information to be scanned meets preset compression conditions or not is judged according to the information capacity of the data information to be scanned.
4. The method of claim 3, wherein the method further comprises:
and when the fact that the scanning of the data information to be scanned is finished is monitored, the releasing operation is executed aiming at the shutdown instruction.
5. The method of claim 3, wherein after the step of performing an intercept operation for the shutdown instruction, further comprising:
and marking the process irrelevant to the scanning operation as a target process, and ending the target process.
6. An apparatus for scanning data information, comprising:
the judging module is suitable for judging whether the data information to be scanned meets a preset compression condition or not according to the information capacity of the data information to be scanned;
the loading module is suitable for compressing the data information to be scanned if the data information to be scanned is in the positive state and loading the compressed data information into the memory;
the decompression module is suitable for decompressing the compressed data information loaded in the memory;
the determining module is suitable for analyzing the decompressed data information to determine a scanning result of the data information to be scanned;
wherein the judging module is specifically adapted to:
setting a capacity threshold value in advance according to the total capacity of the memory, comparing the information capacity with the capacity threshold value, and determining whether the data information to be scanned meets a preset compression condition or not according to a comparison result; and/or the presence of a gas in the gas,
dynamically acquiring the available capacity of the memory, comparing the information capacity with the available capacity of the memory, and determining whether the data information to be scanned meets a preset compression condition according to a comparison result;
wherein the loading module is specifically adapted to:
dividing the data information to be scanned into a plurality of data blocks;
compressing each data block respectively to obtain a compressed data block, and establishing a data block index for the compressed data block;
loading the compressed data block into a memory, and generating an index file according to the data block index;
wherein the decompression module is specifically adapted to:
and respectively acquiring each compressed data block according to each data block index contained in the index file, and respectively decompressing each acquired data block.
7. The apparatus of claim 6, wherein the data information comprises: and updating data information and vulnerability repair data information.
8. The apparatus of claim 6 or 7, wherein the apparatus further comprises:
the monitoring module is suitable for monitoring whether a shutdown instruction is received;
and the execution module is suitable for executing interception operation aiming at the shutdown instruction and executing the content in the judgment module if the shutdown instruction is yes.
9. The apparatus of claim 8, wherein the apparatus further comprises a pass module,
is adapted to: and when the fact that the scanning of the data information to be scanned is finished is monitored, the releasing operation is executed aiming at the shutdown instruction.
10. The apparatus of claim 8, wherein the execution module is further adapted to:
and marking the process irrelevant to the scanning operation as a target process, and ending the target process.
11. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the data information scanning method according to any one of claims 1-5.
12. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the method of scanning data information according to any one of claims 1-5.
CN201810076830.0A 2018-01-26 2018-01-26 Data information scanning method and device Expired - Fee Related CN108446300B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810076830.0A CN108446300B (en) 2018-01-26 2018-01-26 Data information scanning method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810076830.0A CN108446300B (en) 2018-01-26 2018-01-26 Data information scanning method and device

Publications (2)

Publication Number Publication Date
CN108446300A CN108446300A (en) 2018-08-24
CN108446300B true CN108446300B (en) 2021-04-09

Family

ID=63191028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810076830.0A Expired - Fee Related CN108446300B (en) 2018-01-26 2018-01-26 Data information scanning method and device

Country Status (1)

Country Link
CN (1) CN108446300B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941478B (en) * 2018-09-21 2024-03-01 北京奇虎科技有限公司 Execution method and device of file scanning task and computing equipment
CN111510155B (en) * 2020-04-17 2023-09-26 深圳市科思科技股份有限公司 Data compression method, data decompression method, electronic device and storage medium
CN113452378A (en) * 2021-06-28 2021-09-28 国网北京市电力公司 Twin data compression method and device and computer readable storage medium
CN114116234B (en) * 2022-01-24 2022-05-10 山东捷瑞数字科技股份有限公司 Three-dimensional scene model decompression loading method based on browser

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436421A (en) * 2010-09-29 2012-05-02 腾讯科技(深圳)有限公司 Data caching method
CN103218224A (en) * 2013-03-29 2013-07-24 东莞宇龙通信科技有限公司 Method and terminal for improving utilization ratio of memory space
CN103384884A (en) * 2012-12-11 2013-11-06 华为技术有限公司 File compression method and device, file decompression method and device, and server
CN105451042A (en) * 2015-12-14 2016-03-30 福建新大陆通信科技股份有限公司 Set top box based file upgrading system and method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930515B (en) * 2010-08-27 2012-11-21 奇智软件(北京)有限公司 System and method for safely decompressing compressed file
CN102025983B (en) * 2010-09-19 2013-05-01 北京邮电大学 Data transmission processing method and system and corresponding light-emitting diode (LED) display system
CN102289484B (en) * 2011-08-03 2014-10-01 Tcl集团股份有限公司 Method for scanning multimedia files of storage equipment based on android system
CN102411628B (en) * 2011-12-19 2015-05-20 Tcl集团股份有限公司 Android system-based file scanning method and device
CN103793649A (en) * 2013-11-22 2014-05-14 北京奇虎科技有限公司 Method and device for cloud-based safety scanning of files
CN104636165A (en) * 2015-02-02 2015-05-20 广东小天才科技有限公司 Mobile device starting method and device
CN105677259A (en) * 2016-02-29 2016-06-15 珠海市魅族科技有限公司 Method for storing file in mobile terminal and mobile terminal
CN105955722A (en) * 2016-04-20 2016-09-21 合肥师范学院 UBI device partition rapid loading method in embedded system
CN106503165A (en) * 2016-10-31 2017-03-15 杭州华为数字技术有限公司 Compression, decompressing method, device and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436421A (en) * 2010-09-29 2012-05-02 腾讯科技(深圳)有限公司 Data caching method
CN103384884A (en) * 2012-12-11 2013-11-06 华为技术有限公司 File compression method and device, file decompression method and device, and server
CN103218224A (en) * 2013-03-29 2013-07-24 东莞宇龙通信科技有限公司 Method and terminal for improving utilization ratio of memory space
CN105451042A (en) * 2015-12-14 2016-03-30 福建新大陆通信科技股份有限公司 Set top box based file upgrading system and method

Also Published As

Publication number Publication date
CN108446300A (en) 2018-08-24

Similar Documents

Publication Publication Date Title
CN108446300B (en) Data information scanning method and device
CN107832100B (en) APK plug-in loading method and terminal thereof
CN107563201B (en) Associated sample searching method and device based on machine learning and server
CN107506284B (en) Log processing method and device
CN111124470A (en) Automatic optimization method and device for program package based on cloud platform
CN111371585A (en) Configuration method and device for CDN node
CN107463332B (en) File segmentation method and device
CN110750744A (en) Page presentation method and device
WO2018161791A1 (en) Method and device for compressing executable file
CN112363841B (en) Application process searching and killing method and device, electronic equipment and storage medium
WO2019237239A1 (en) Data test method and apparatus, device/terminal/server and computer readable storage medium
CN113395242A (en) Packet capturing method and device for application data packet and computing equipment
US11216352B2 (en) Method for automatically analyzing bottleneck in real time and an apparatus for performing the method
CN108062224B (en) Data reading and writing method and device based on file handle and computing equipment
CN107861807B (en) Optimization method and device for program call
CN111352810A (en) Performance monitoring method and device based on multiple processes and computing equipment
CN113396391A (en) Method and device for starting application program, electronic equipment and storage medium
CN113660260B (en) Message detection method, system, computer equipment and readable storage medium
CN114296747A (en) Installation method and device of software installation package
CN110175182B (en) Data checking method and device
CN110647753B (en) Method, device and equipment for acquiring kernel file and storage medium
CN110896391B (en) Message processing method and device
CN111475220B (en) Cold start method and device, electronic equipment and computer storage medium
CN109408063B (en) Instruction pile inserting method and device based on virtual machine
CN113472874A (en) File concurrent transmission method, system, storage medium and electronic equipment

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210409

CF01 Termination of patent right due to non-payment of annual fee