[go: up one dir, main page]

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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

本发明公开了一种数据信息的扫描方法及装置。其中,该方法包括:根据待扫描的数据信息的信息容量判断待扫描的数据信息是否符合预设压缩条件;若是,对待扫描的数据信息进行压缩,将压缩后的数据信息加载到内存中;针对内存中加载的压缩后的数据信息进行解压缩;针对解压缩后的数据信息进行解析,以确定待扫描的数据信息的扫描结果。由此可见,利用本发明提供的方案,通过对数据信息进行压缩,仅在内存中加载压缩后的数据信息,从而避免了因数据信息过大而无法扫描的问题,使扫描方法能够适用于各类大文件中,拓宽了业务应用场景。

Figure 201810076830

The invention discloses a scanning method and device for data information. The method includes: judging whether the data information to be scanned meets a preset compression condition 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; The compressed data information loaded in the memory is decompressed; the decompressed data information is analyzed to determine the scanning result of the data information to be scanned. It can be seen that, by using the solution provided by the present invention, by compressing the data information, only the compressed data information is loaded in the memory, thereby avoiding the problem that the data information cannot be scanned because the data information is too large, so that the scanning method can be applied to various In the class large file, the business application scenarios are broadened.

Figure 201810076830

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.一种数据信息的扫描方法,包括:1. A scanning method for data information, comprising: 根据待扫描的数据信息的信息容量判断所述待扫描的数据信息是否符合预设压缩条件;According to the information capacity of the data information to be scanned, determine whether the data information to be scanned meets the preset compression conditions; 若是,对所述待扫描的数据信息进行压缩,将压缩后的数据信息加载到内存中;If so, compress the data information to be scanned, and load the compressed data information into the memory; 针对内存中加载的所述压缩后的数据信息进行解压缩;Decompressing the compressed data information loaded in the memory; 针对解压缩后的数据信息进行解析,以确定所述待扫描的数据信息的扫描结果;Analyze the decompressed data information to determine the scanning result of the data information to be scanned; 其中,所述根据待扫描的数据信息的信息容量判断所述待扫描的数据信息是否符合预设压缩条件的步骤具体包括:Wherein, the step of judging whether the data information to be scanned meets the preset compression conditions according to the information capacity of the data information to be scanned specifically includes: 预先根据内存总容量设置容量阈值,将所述信息容量与所述容量阈值进行比较,根据比较结果确定所述待扫描的数据信息是否符合预设压缩条件;和/或,Setting a capacity threshold in advance according to the total memory capacity, comparing the information capacity with the capacity threshold, and determining whether the data information to be scanned meets the preset compression conditions according to the comparison result; and/or, 动态获取内存可用容量,将所述信息容量与所述内存可用容量进行比较,根据比较结果确定所述待扫描的数据信息是否符合预设压缩条件;Dynamically obtain the available memory capacity, compare the information capacity with the available memory capacity, and determine whether the data information to be scanned meets the preset compression conditions according to the comparison result; 其中,所述对所述待扫描的数据信息进行压缩,将压缩后的数据信息加载到内存中的步骤具体包括:Wherein, 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; 将该压缩后的数据块加载到内存中,并根据所述数据块索引生成索引文件;Load the compressed data block into the memory, and generate an index file according to the data block index; 其中,所述针对内存中加载的所述压缩后的数据信息进行解压缩的步骤具体包括:Wherein, the step of decompressing the compressed data information loaded in the memory specifically includes: 根据所述索引文件中包含的各个数据块索引,分别获取压缩后的各个数据块,并分别针对获取到的各个数据块进行解压缩。According to each data block index included in the index file, each compressed data block is obtained respectively, and each obtained data block is decompressed respectively. 2.根据权利要求1所述的方法,其中,所述数据信息包括:更新数据信息、漏洞修复数据信息。2. The method according to claim 1, wherein the data information comprises: update data information and vulnerability repair data information. 3.根据权利要求1或2所述的方法,其中,所述根据待扫描的数据信息的信息容量判断所述待扫描的数据信息是否符合预设压缩条件的步骤之前,进一步包括:3. The method according to claim 1 or 2, wherein, before 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, further comprising: 监测是否接收到关机指令;Monitor whether a shutdown command is received; 若是,针对所述关机指令执行拦截操作,并执行所述根据待扫描的数据信息的信息容量判断所述待扫描的数据信息是否符合预设压缩条件的步骤。If so, perform an interception operation on the shutdown instruction, and perform 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. 4.根据权利要求3所述的方法,其中,所述方法进一步包括:4. The method of claim 3, wherein the method further comprises: 当监测到待扫描的数据信息扫描完毕时,针对所述关机指令执行放行操作。When it is monitored that the data information to be scanned has been scanned, a release operation is performed for the shutdown instruction. 5.根据权利要求3所述的方法,其中,所述针对所述关机指令执行拦截操作的步骤之后,进一步包括:5. The method according to claim 3, wherein after the step of executing the intercepting operation for the shutdown instruction, further comprising: 将与扫描操作无关的进程标记为目标进程,结束所述目标进程。Processes not related to the scan operation are marked as target processes, and the target processes are terminated. 6.一种数据信息的扫描装置,包括:6. A scanning device for data information, comprising: 判断模块,适于根据待扫描的数据信息的信息容量判断所述待扫描的数据信息是否符合预设压缩条件;a judgment module, adapted to judge whether the data information to be scanned meets the preset compression condition according to the information capacity of the data information to be scanned; 加载模块,适于若是,对所述待扫描的数据信息进行压缩,将压缩后的数据信息加载到内存中;A loading module, adapted to compress the data information to be scanned, and load the compressed data information into the memory, if so; 解压缩模块,适于针对内存中加载的所述压缩后的数据信息进行解压缩;a decompression module, adapted to decompress the compressed data information loaded in the memory; 确定模块,适于针对解压缩后的数据信息进行解析,以确定所述待扫描的数据信息的扫描结果;a determination module, adapted to analyze the decompressed data information to determine the scanning result of the data information to be scanned; 其中,所述判断模块具体适于:Wherein, the judging module is specifically adapted to: 预先根据内存总容量设置容量阈值,将所述信息容量与所述容量阈值进行比较,根据比较结果确定所述待扫描的数据信息是否符合预设压缩条件;和/或,Setting a capacity threshold in advance according to the total memory capacity, comparing the information capacity with the capacity threshold, and determining whether the data information to be scanned meets the preset compression conditions according to the comparison result; and/or, 动态获取内存可用容量,将所述信息容量与所述内存可用容量进行比较,根据比较结果确定所述待扫描的数据信息是否符合预设压缩条件;Dynamically obtain the available memory capacity, compare the information capacity with the available memory capacity, and determine whether the data information to be scanned meets the preset compression conditions according to the comparison result; 其中,所述加载模块具体适于:Wherein, the loading module is specifically suitable for: 将所述待扫描的数据信息划分为多个数据块;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; 将该压缩后的数据块加载到内存中,并根据所述数据块索引生成索引文件;Load the compressed data block into the memory, and generate an index file according to the data block index; 其中,所述解压缩模块具体适于:Wherein, the decompression module is specifically adapted to: 根据所述索引文件中包含的各个数据块索引,分别获取压缩后的各个数据块,并分别针对获取到的各个数据块进行解压缩。According to each data block index included in the index file, each compressed data block is obtained respectively, and each obtained data block is decompressed respectively. 7.根据权利要求6所述的装置,其中,所述数据信息包括:更新数据信息、漏洞修复数据信息。7. The apparatus according to claim 6, wherein the data information comprises: update data information and vulnerability repair data information. 8.根据权利要求6或7所述的装置,其中,所述装置进一步包括:8. The apparatus of claim 6 or 7, wherein the apparatus further comprises: 监测模块,适于监测是否接收到关机指令;a monitoring module, adapted to monitor whether a shutdown command is received; 执行模块,适于若是,针对所述关机指令执行拦截操作,并执行所述判断模块中的内容。The execution module is adapted to, if yes, execute an interception operation for the shutdown instruction, and execute the content in the judgment module. 9.根据权利要求8所述的装置,其中,所述装置进一步包括放行模块,9. The apparatus of claim 8, wherein the apparatus further comprises a release module, 适于:当监测到待扫描的数据信息扫描完毕时,针对所述关机指令执行放行操作。Suitable for: when it is monitored that the data information to be scanned is scanned, a release operation is performed for the shutdown instruction. 10.根据权利要求8所述的装置,其中,所述执行模块进一步适于:10. The apparatus of claim 8, wherein the execution module is further adapted to: 将与扫描操作无关的进程标记为目标进程,结束所述目标进程。Processes not related to the scan operation are marked as target processes, and the target processes are terminated. 11.一种电子设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;11. An electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; 所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行如权利要求1-5中任一项所述的数据信息的扫描方法对应的操作。The memory is used for storing at least one executable instruction, and the executable instruction causes the processor to perform an operation corresponding to the data information scanning method according to any one of claims 1-5. 12.一种计算机存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如权利要求1-5中任一项所述的数据信息的扫描方法对应的操作。12. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction causes the processor to execute the corresponding scanning method of the data information according to any one of claims 1-5. operate.
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
CN113452378B (en) * 2021-06-28 2024-07-05 国网北京市电力公司 Twin data compression method, 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 腾讯科技(深圳)有限公司 Method for caching data
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 华为技术有限公司 A file compression method, file decompression method, 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 equipment 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 腾讯科技(深圳)有限公司 Method for caching data
CN103384884A (en) * 2012-12-11 2013-11-06 华为技术有限公司 A file compression method, file decompression method, 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
CN106302632B (en) Downloading method of basic mirror image and management node
CN107563201B (en) Associated sample searching method and device based on machine learning and server
CN107688538B (en) Script execution method and device and computing equipment
CN113986533A (en) A data transmission method, DMA controller and computer-readable storage medium
CN110716848A (en) Data collection method and device, electronic equipment and storage medium
CN107544828A (en) Configuring load application method and device
WO2019237239A1 (en) Data test method and apparatus, device/terminal/server and computer readable storage medium
CN111124470A (en) Automatic optimization method and device for program package based on cloud platform
WO2020077765A1 (en) Webpage loading method, intermediate server, and webpage loading system
WO2018161791A1 (en) Method and device for compressing executable file
CN115686663A (en) Online file preview method and device and computer equipment
CN105204917A (en) Method and device for loading configuration files at starting moment of application program
CN107656860A (en) Performance test methods, apparatus and system
CN113885971A (en) State management method and device based on self-adaptive platform system
CN116560791A (en) Process processor affinity management method, device and electronic equipment
CN115658185A (en) Method, device, storage medium and electronic device for quick start of cloud application
CN115185962A (en) Data verification method, device, server and computer readable storage medium
CN113472874A (en) File concurrent transmission method, system, storage medium and electronic equipment
CN113553214A (en) Idempotent checking method and device
CN119336718A (en) A method and system for quickly parsing compressed file content
CN113395242A (en) Packet capturing method and device for application data packet and computing equipment
WO2020210955A1 (en) Application program starting method and apparatus, and electronic device and storage medium
CN112433743A (en) File updating method and device, electronic equipment 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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210409