Virus detection and killing method, device, electronic equipment and storage medium

By generating the files to be identified as tasks and putting them into the task pool, multiple virus detection and killing engines work in parallel, the problem of slow response caused by the series connection of virus detection and killing engines in the existing technology is solved, and the efficiency of virus detection and killing is significantly improved.

CN112214765BActive Publication Date: 2024-11-01ZHUHAI LEOPARD FUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011068478.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-29
Publication Date
2024-11-01
Estimated Expiration
2040-09-29

AI Technical Summary

Technical Problem

When there are multiple virus detection engines in existing virus detection software, the work between the engines is connected in series, resulting in slow reaction and low work efficiency, especially when most files are white files.

Method used

By generating the files to be identified as virus identification tasks and putting these tasks into the task pool, multiple virus detection engines can work in parallel, and each engine performs related tasks within its time slice to improve efficiency.

Benefits of technology

It realizes that when multiple virus detection engines work in parallel, the efficiency of virus detection and killing is greatly improved and the processing time is reduced, especially when the number of files to be identified is large.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112214765B_ABST
    Figure CN112214765B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a virus detection method, device, electronic device and storage medium, which relates to the field of computer security technology and can greatly improve the efficiency of virus detection. The method includes: generating a virus identification task according to a file to be identified; placing the virus identification task into a task pool; in a first time slice, a first virus detection engine obtains and executes the first virus identification task from the task pool to obtain a first identification result; according to the first identification result, a second virus identification task is generated, and the second virus identification task is placed into the task pool; in a second time slice, the first virus detection engine obtains and executes a third virus identification task from the task pool, and at the same time, the second virus detection engine obtains and executes the second virus identification task from the task pool. The present invention is suitable for virus detection of files to be identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer security technology, and in particular to a virus detection and removal method, apparatus, electronic device, and storage medium. Background Technology

[0002] Virus detection engine: Simply put, a virus detection engine is a technical mechanism that determines whether a specific program's behavior is that of a virus (or something suspicious). The virus detection engine is the main part of antivirus software; it's the program that detects and discovers viruses. The virus database contains samples of discovered viruses. These samples are compared to all programs or files on the machine to see if they match. If they do, it's a virus; otherwise, it might not (because there are many undiscovered or newly created viruses).

[0003] Current antivirus software typically integrates multiple antivirus engines, each with its own advantages and disadvantages. Integration generally results in better virus detection. However, when multiple antivirus engines exist, their operation is usually sequential (see...). Figure 1 This means that only one engine is working at any given time, while the other engines are idle. In reality, most files are blank files and not viruses, so virus scanning takes a lot of time, resulting in slow response and low efficiency of virus scanning software. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a virus detection and removal method, apparatus, electronic device and storage medium, in which multiple virus detection and removal engines can work in parallel, thereby greatly improving the efficiency of virus detection and removal.

[0005] In a first aspect, embodiments of the present invention provide a virus detection and removal method, comprising:

[0006] Generate a virus identification task based on the file to be identified;

[0007] The virus identification task is placed in the task pool;

[0008] In the first time slice, the first virus detection engine retrieves and executes the first virus identification task from the task pool to obtain the first identification result; wherein, the first virus identification task is related to the first virus detection engine;

[0009] The first virus detection engine generates a second virus identification task based on the first identification result and puts the second virus identification task into the task pool;

[0010] In the second time slice, the first virus detection engine retrieves and executes the third virus identification task from the task pool, while the second virus detection engine retrieves and executes the second virus identification task from the task pool; wherein the third virus identification task is related to the first virus detection engine, and the second virus identification task is related to the second virus detection engine.

[0011] Optionally, each virus identification task in the task pool has an identifier related to the virus detection engine;

[0012] The first virus detection engine retrieves and executes a first virus identification task from the task pool to obtain a first identification result, including:

[0013] The first virus detection engine searches for virus identification tasks with a first identifier from the task pool according to the generation time of the virus identification tasks, wherein the first identifier is related to the first virus detection engine;

[0014] The first virus identification task found is taken as the first virus identification task;

[0015] Perform the first virus identification task to obtain the first identification result.

[0016] Optionally, the first virus detection engine generates a second virus identification task based on the first identification result, and places the second virus identification task into the task pool; including:

[0017] If the first identification result indicates that a risk has been found, then the first virus detection engine determines, based on the first identification result, that the file to be identified corresponding to the first virus identification task is a risky file.

[0018] If the first identification result is no risk found, the first virus detection engine generates a second virus identification task based on the first identification result and puts the second virus identification task into the task pool.

[0019] Optionally, if the first identification result indicates no risk was found, the first virus detection engine generates a second virus identification task based on the first identification result; including:

[0020] The first virus detection engine generates a second virus detection task by replacing the first identifier in the first virus identification task with the second identifier based on the first identification result; wherein the second identifier is different from the first identifier.

[0021] Optionally, if the first identification result indicates no risk was found, generating a second virus identification task based on the first identification result includes:

[0022] The first virus detection engine determines whether the file to be identified corresponding to the first virus identification task has been identified by all virus detection engines in the virus detection engine set, wherein the virus detection engine set includes the first virus detection engine and the second virus detection engine;

[0023] If so, then the file to be identified corresponding to the first virus identification task is determined to be a safe file;

[0024] If not, then a second virus identification task is generated based on the first identification result.

[0025] Optionally, each of the virus scanning engines in the virus scanning engine set is run by an independent thread.

[0026] Secondly, embodiments of the present invention provide a virus detection and removal device, comprising:

[0027] The generation unit is used to generate virus identification tasks based on the file to be identified.

[0028] The placement unit is used to place the virus identification task into the task pool;

[0029] The first virus detection unit is used to obtain and execute a first virus identification task from the task pool using a first virus detection engine in the first time slice, and obtain a first identification result; wherein the first virus identification task is related to the first virus detection engine.

[0030] The first virus detection engine generates a second virus identification task based on the first identification result and puts the second virus identification task into the task pool;

[0031] The second virus detection unit is used to retrieve and execute a third virus identification task from the task pool using the first virus detection engine during the second time slice, and simultaneously retrieve and execute a second virus identification task from the task pool using the second virus detection engine; wherein the third virus identification task is related to the first virus detection engine, and the second virus identification task is related to the second virus detection engine.

[0032] Optionally, each virus identification task in the task pool has an identifier related to the virus detection engine;

[0033] The first virus detection unit uses the first virus detection engine to obtain and execute a first virus identification task from the task pool, and obtains a first identification result; including:

[0034] The first virus detection engine is used to search for virus identification tasks with a first identifier in the task pool according to the generation time of the virus identification tasks, wherein the first identifier is related to the first virus detection engine.

[0035] The first virus identification task found is taken as the first virus identification task;

[0036] Perform the first virus identification task to obtain the first identification result.

[0037] Optionally, the first virus detection unit uses the first virus detection engine to generate a second virus identification task based on the first identification result, and puts the second virus identification task into the task pool; including:

[0038] If the first identification result indicates that a risk has been found, then the first virus detection engine determines, based on the first identification result, that the file to be identified corresponding to the first virus identification task is a risky file.

[0039] If the first identification result is no risk found, the first virus detection engine generates a second virus identification task based on the first identification result and puts the second virus identification task into the task pool.

[0040] Optionally, if the first identification result indicates no risk was found, the first virus detection unit uses the first virus detection engine to generate a second virus identification task based on the first identification result; including:

[0041] Based on the first identification result, the first identification engine replaces the first identifier in the first virus identification task with the second identifier to generate a second virus identification task; wherein the second identifier is different from the first identifier.

[0042] Optionally, if the first identification result indicates no risk was found, the first virus detection unit uses the first virus detection engine to generate a second virus identification task based on the first identification result, including:

[0043] The first virus detection engine is used to determine whether the file to be identified corresponding to the first virus identification task has been identified by all virus detection engines in the virus detection engine set, wherein the virus detection engine set includes the first virus detection engine and the second virus detection engine.

[0044] If so, then the file to be identified corresponding to the first virus identification task is determined to be a safe file;

[0045] If not, then a second virus identification task is generated based on the first identification result.

[0046] Optionally, each of the virus scanning engines in the virus scanning engine set is run by an independent thread.

[0047] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed within the space enclosed by the housing, and the processor and the memory are disposed on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the virus detection and removal method described in any of the foregoing embodiments.

[0048] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the virus detection and removal method described in any of the foregoing embodiments.

[0049] This invention provides a virus detection method, apparatus, electronic device, and storage medium. Based on a file to be identified, the method generates a virus identification task; places the virus identification task into a task pool; in a first time slice, a first virus detection engine retrieves and executes the first virus identification task from the task pool to obtain a first identification result; wherein the first virus identification task is related to the first virus detection engine; the first virus detection engine generates a second virus identification task based on the first identification result and places the second virus identification task into the task pool; in a second time slice, the first virus detection engine retrieves and executes a third virus identification task from the task pool, and simultaneously, a second virus detection engine retrieves and executes the second virus identification task from the task pool; wherein the third virus identification task is related to the first virus detection engine, and the second virus identification task is related to the second virus detection engine. By placing each file to be identified into a task pool and having each virus detection engine run in parallel, each virus detection engine only needs to select and execute the task relevant to it from the task pool. This significantly improves the efficiency of virus detection when there are a large number of files to be identified. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 This is a schematic diagram of existing virus detection and removal methods.

[0052] Figure 2 A flowchart illustrating a virus detection and removal method provided as an embodiment of the present invention;

[0053] Figure 3 A timing diagram of the operation of three engines in a specific virus detection method provided as an embodiment of the present invention;

[0054] Figure 4 This is a timing diagram of the operation of three engines in a specific virus detection and removal method in the prior art.

[0055] Figure 5 This is a schematic diagram of the structure of a virus detection and removal device provided in an embodiment of the present invention;

[0056] Figure 6 A schematic diagram of an electronic device provided as an embodiment of the present invention. Detailed Implementation

[0057] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0058] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0059] Firstly, embodiments of the present invention provide a virus detection and removal method in which multiple virus detection and removal engines can work in parallel, thereby greatly improving the efficiency of virus detection and removal.

[0060] like Figure 1 As shown, this embodiment of the invention provides a virus detection and removal method, including:

[0061] S101. Generate a virus identification task based on the file to be identified;

[0062] In this step, a virus identification task is generated for each of the files to be identified. When there are multiple files to be identified, multiple virus identification tasks are generated for each file.

[0063] S102. Place the virus identification task into the task pool;

[0064] In this step, the task pool includes at least one virus identification task, and each virus identification task can be placed into the task pool in the order of its generation time.

[0065] S103. In the first time slice, the first virus detection engine obtains and executes the first virus identification task from the task pool to obtain the first identification result; wherein, the first virus identification task is related to the first virus detection engine; the first virus detection engine generates a second virus identification task based on the first identification result and puts the second virus identification task into the task pool;

[0066] In this step, the first time slice may be a segment of CPU time allocated to the first virus scanning engine by the time-sharing operating system. During the first time slice, the first virus scanning engine performs the operation in S103.

[0067] Each virus identification task in the task pool is associated with at least one virus detection engine. The first virus detection engine retrieves one associated virus identification task from the task pool each time it executes, such as the first virus identification task itself. The process of the virus detection engine executing a virus identification task is the process by which the virus detection engine identifies the file to be identified corresponding to the virus identification task.

[0068] Optionally, in the above steps, the first virus detection engine generates a second virus identification task based on the first identification result, and puts the second virus identification task into the task pool; specifically, it may include:

[0069] If the first identification result indicates that a risk has been found, then the first virus detection engine determines, based on the first identification result, that the file to be identified corresponding to the first virus identification task is a risky file.

[0070] If the first identification result is no risk found, the first virus detection engine generates a second virus identification task based on the first identification result and puts the second virus identification task into the task pool.

[0071] In this embodiment, when the first virus scanning engine detects a risk in the file to be identified corresponding to the first virus identification task, it can directly classify the file as a risky file. Simultaneously, the first virus identification task is removed from the task pool. When the task pool is empty, all virus scanning engines shut down and exit. If the first virus scanning engine does not detect a risk in the file to be identified corresponding to the first virus identification task, a new virus identification task (a second virus identification task) is generated and placed in the task pool for other virus scanning engines to execute. The new virus identification task is related to the file to be identified corresponding to the first virus identification task. When the other virus scanning engines execute the new virus identification task, they determine whether the file to be identified is risky.

[0072] S104. In the second time slice, the first virus detection engine obtains and executes the third virus identification task from the task pool, and at the same time, the second virus detection engine obtains and executes the second virus identification task from the task pool; wherein, the third virus identification task is related to the first virus detection engine, and the second virus identification task is related to the second virus detection engine.

[0073] In this step, the second time slice can be another CPU time allocated to the first virus detection engine by the time-sharing operating system. During the second time slice, the first virus detection engine obtains and executes the third virus identification task related to it from the task pool.

[0074] Meanwhile, within the second time slice, the time-sharing operating system also allocates a segment of CPU time to the second virus scanning engine. This segment of CPU time may completely overlap with the second time slice or partially overlap with it. During this CPU time, the second virus scanning engine retrieves and executes the related second virus identification task from the task pool. That is, within the second time slice, the first virus scanning engine and the second virus scanning engine can execute in parallel. Specifically, the first virus scanning engine and the second virus scanning engine can each be run by an independent thread.

[0075] This embodiment provides a virus detection method that generates a virus identification task based on the file to be identified; places the virus identification task into a task pool; in a first time slice, a first virus detection engine retrieves and executes the first virus identification task from the task pool to obtain a first identification result; wherein, the first virus identification task is related to the first virus detection engine; the first virus detection engine generates a second virus identification task based on the first identification result and places the second virus identification task into the task pool; in a second time slice, the first virus detection engine retrieves and executes a third virus identification task from the task pool, and simultaneously, a second virus detection engine retrieves and executes the second virus identification task from the task pool; wherein, the third virus identification task is related to the first virus detection engine, and the second virus identification task is related to the second virus detection engine. In this way, by placing each file to be identified into a task pool as a task and having each virus detection engine run in parallel, each virus detection engine only needs to select and execute the task relevant to it from the task pool, which can greatly improve the efficiency of virus detection when there are a large number of files to be identified.

[0076] Optionally, in any of the above embodiments, each virus identification task in the task pool may have an identifier associated with a virus detection engine. For example, each virus identification task has an identifier that indicates which virus detection engine the virus identification task is associated with, so that the virus detection engine can search for a virus identification task related to itself in the task pool based on the identifier.

[0077] At this point, the first virus detection engine retrieves and executes the first virus identification task from the task pool, obtaining the first identification result; this may include:

[0078] The first virus detection engine searches for a virus identification task with a first identifier from the task pool according to the generation time sequence of the virus identification tasks, wherein the first identifier is related to the first virus detection engine; the first virus identification task found is taken as the first virus identification task; the first virus identification task is executed to obtain the first identification result.

[0079] In this embodiment, each virus identification task in the task pool has a timestamp recording its generation time. The first virus detection engine can search for virus identification tasks with a first identifier in order of generation time from earliest to latest, and execute the first virus identification task found as the first virus identification task. In this way, the virus identification tasks can be processed according to the first-in-first-out principle, avoiding the delay in processing a certain virus identification task in the task pool.

[0080] Optionally, in the above embodiments, if the first identification result indicates no risk was found, the first virus detection engine generates a second virus identification task based on the first identification result; this may include:

[0081] The first virus detection engine generates a second virus detection task by replacing the first identifier in the first virus identification task with the second identifier based on the first identification result; wherein the second identifier is different from the first identifier.

[0082] In this embodiment, when the first virus scanning engine does not find any risk in the file to be identified corresponding to the first virus identification task, it is necessary for other virus scanning engines to re-identify the file to be identified. At this time, the first virus scanning engine can add a second identifier corresponding to other virus scanning engines to the first virus identification task to generate a second virus identification task. The second virus identification task still corresponds to the file to be identified corresponding to the first virus identification task. In this way, other virus scanning engines can obtain and execute the second virus identification task according to the second tag to re-identify the file to be identified.

[0083] The number of virus scanning engines used to perform the virus identification task is limited. The identification order of each virus scanning engine for the same file to be identified can be preset. For example, if the number of virus scanning engines is N (N is a positive integer greater than 1), the first virus scanning engine is set to execute the virus identification task generated based on the file to be identified, the second virus scanning engine executes the virus identification task generated by the first virus scanning engine, the third virus scanning engine executes the virus identification task generated by the second virus scanning engine, and so on, until the Nth virus scanning engine executes the virus identification task generated by the (N-1)th virus scanning engine.

[0084] If any virus scanning engine generates an identification result indicating a risk after performing a virus identification task, the file to be identified corresponding to that virus identification task is directly classified as a risky file. If the identification results generated by the first to N-1 virus scanning engines after performing a virus identification task indicate no risk, a new virus identification task is generated based on that task for the virus scanning engine with the next identification order to continue executing. If the identification result generated by the Nth virus scanning engine after performing a virus identification task indicates no risk, the file to be identified corresponding to that virus identification task is directly classified as a safe file, without the need to generate a new virus identification task.

[0085] Optionally, as another possible implementation of the above embodiments, the identification order of each virus scanning engine for the same file to be identified can be random. For example, when the virus identification task carries the tags of all virus scanning engines that have identified the corresponding file to be identified, for each virus scanning engine, a virus identification task can be randomly selected from the task pool, and it can be determined whether the virus identification task carries its own tag. If the virus identification task does not carry its own tag, then the virus identification task can be executed. When the virus scanning engine executes the virus identification task, it can add its own tag to the virus identification task.

[0086] The virus detection engine's marker and the identifier associated with the virus detection engine are different. When the identification order of the same file to be identified by each virus detection engine is preset, both can coexist in the virus identification task. The virus detection engine-related identifier indicates which virus detection engine should perform the virus identification task, while the virus detection engine's marker indicates which virus detection engine has already identified the file to be identified corresponding to that virus identification task. When the identification order of the same file to be identified by each virus detection engine is random, only the virus detection engine's marker needs to exist in the virus identification task. When each virus detection engine obtains a virus identification task related to itself from the task pool, it only needs to check whether the virus identification task contains its own marker. If the virus identification task does not contain its own marker, it indicates that the virus identification task is related to itself.

[0087] In the above embodiments, when the identification order of the same file to be identified by each virus detection engine is random, for the first virus detection engine, if the first identification result obtained after performing the first virus identification task is that no risk was found, the step of generating the second virus identification task based on the first identification result may include:

[0088] The first virus detection engine determines whether the file to be identified corresponding to the first virus identification task has been identified by all virus detection engines in the virus detection engine set, wherein the virus detection engine set includes the first virus detection engine and the second virus detection engine;

[0089] If so, then the file to be identified corresponding to the first virus identification task is determined to be a safe file;

[0090] If not, then a second virus identification task is generated based on the first identification result.

[0091] In this embodiment, each virus scanning engine in the virus scanning engine set can be run by an independent thread. The first virus scanning engine's determination of whether the file to be identified corresponding to the first virus identification task has been identified by all virus scanning engines in the virus scanning engine set can include:

[0092] The first virus detection engine determines whether the first virus identification task includes the tags of all virus detection engines in the virus detection engine set.

[0093] In this way, if the first identification result obtained after the first virus detection engine performs the first virus identification task is that no risk is found, it can be further determined whether the file to be identified corresponding to the first virus identification task needs to be identified again by other virus detection engines.

[0094] The following specific embodiment illustrates how the method provided in this embodiment can greatly improve the efficiency of virus detection and removal.

[0095] The task pool contains four virus identification tasks: A, B, C, and D. It is assumed that the files to be identified for each of these tasks are safe, and that there are a total of three virus scanning engines (Engine 1, Engine 2, and Engine 3). These three engines identify the files corresponding to the same virus identification task in a preset order, for example, Engine 1 → Engine 2 → Engine 3. The timing diagram for the three engines is as follows: Figure 3 As shown.

[0096] The timing diagram of each engine operating in a series manner according to the prior art is as follows: Figure 4 As shown (this is just a schematic diagram; in reality, the time spent by each engine in processing each task may vary), it can be seen that with three virus scanning engines and four files that need to be identified, the existing solution requires 12 hours, while the solution provided in this embodiment only requires 6 hours.

[0097] Assuming there are 10 files to be identified, existing methods require 40 time steps, while the method provided in this embodiment only requires 12 time steps. Ideally, when the number of files is large enough, the method provided in this embodiment is four times faster than existing methods. Therefore, using the virus detection method provided in this embodiment can significantly improve the efficiency of virus detection.

[0098] Secondly, embodiments of the present invention provide a virus detection and removal device in which multiple virus detection and removal engines can work in parallel, thereby greatly improving the efficiency of virus detection and removal.

[0099] like Figure 5 As shown, this embodiment provides a virus detection and removal device, including:

[0100] The generation unit 21 is used to generate a virus identification task based on the file to be identified.

[0101] The placement unit 22 is used to place the virus identification task into the task pool;

[0102] The first virus detection unit 23 is used to obtain and execute a first virus identification task from the task pool using a first virus detection engine in a first time slice, and obtain a first identification result; wherein, the first virus identification task is related to the first virus detection engine.

[0103] The first virus detection engine generates a second virus identification task based on the first identification result and puts the second virus identification task into the task pool;

[0104] The second virus detection unit 24 is used to obtain and execute a third virus identification task from the task pool using the first virus detection engine in the second time slice, and at the same time, obtain and execute a second virus identification task from the task pool using the second virus detection engine; wherein the third virus identification task is related to the first virus detection engine, and the second virus identification task is related to the second virus detection engine.

[0105] Optionally, each virus identification task in the task pool has an identifier related to the virus detection engine;

[0106] The first virus detection unit uses the first virus detection engine to obtain and execute a first virus identification task from the task pool, and obtains a first identification result; including:

[0107] The first virus detection engine is used to search for virus identification tasks with a first identifier in the task pool according to the generation time of the virus identification tasks, wherein the first identifier is related to the first virus detection engine.

[0108] The first virus identification task found is taken as the first virus identification task;

[0109] Perform the first virus identification task to obtain the first identification result.

[0110] Optionally, the first virus detection unit uses the first virus detection engine to generate a second virus identification task based on the first identification result, and puts the second virus identification task into the task pool; including:

[0111] If the first identification result indicates that a risk has been found, then the first virus detection engine determines, based on the first identification result, that the file to be identified corresponding to the first virus identification task is a risky file.

[0112] If the first identification result is no risk found, the first virus detection engine generates a second virus identification task based on the first identification result and puts the second virus identification task into the task pool.

[0113] Optionally, if the first identification result indicates no risk was found, the first virus detection unit uses the first virus detection engine to generate a second virus identification task based on the first identification result; including:

[0114] Based on the first identification result, the first identification engine replaces the first identifier in the first virus identification task with the second identifier to generate a second virus identification task; wherein the second identifier is different from the first identifier.

[0115] Optionally, if the first identification result indicates no risk was found, the first virus detection unit uses the first virus detection engine to generate a second virus identification task based on the first identification result, including:

[0116] The first virus detection engine is used to determine whether the file to be identified corresponding to the first virus identification task has been identified by all virus detection engines in the virus detection engine set, wherein the virus detection engine set includes the first virus detection engine and the second virus detection engine.

[0117] If so, then the file to be identified corresponding to the first virus identification task is determined to be a safe file;

[0118] If not, then a second virus identification task is generated based on the first identification result.

[0119] Optionally, each of the virus scanning engines in the virus scanning engine set is run by an independent thread.

[0120] Thirdly, embodiments of the present invention also provide an electronic device in which multiple virus scanning engines can work in parallel, thereby greatly improving the efficiency of virus scanning.

[0121] Figure 6 This is a schematic diagram of the structure of an embodiment of the electronic device of the present invention, as shown below. Figure 6 As shown, the above-mentioned electronic device may include: a housing 31, a processor 32, a memory 33, a circuit board 34, and a power supply circuit 35, wherein the circuit board 34 is disposed inside the space enclosed by the housing 31, and the processor 32 and the memory 33 are disposed on the circuit board 34; the power supply circuit 35 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 33 is used to store executable program code; the processor 32 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 33, for executing the method described in any of the foregoing embodiments.

[0122] For details on the specific execution process of the above steps by the processor 32 and the steps further executed by the processor 32 by running executable program code, please refer to the description of the foregoing embodiments, which will not be repeated here.

[0123] The aforementioned electronic devices exist in various forms, including but not limited to:

[0124] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and primarily aim to provide voice and data communication. These terminals include: smartphones (e.g., iPhones), multimedia phones, feature phones, and low-end phones, etc.

[0125] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, possessing computing and processing capabilities, and generally also have mobile internet access features. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.

[0126] (3) Portable entertainment devices: These devices can display and play multimedia content. This category includes: audio and video players (such as iPods), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.

[0127] (4) Server: A device that provides computing services. The components of a server include a processor, hard disk, memory, system bus, etc. Servers are similar to general computer architectures, but because they need to provide highly reliable services, they have higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0128] (5) Other electronic devices with data interaction functions.

[0129] Accordingly, embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement any of the methods provided in the foregoing embodiments, and thus can also achieve the corresponding technical effects. This has been described in detail above and will not be repeated here.

[0130] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0131] The various embodiments in this specification are described in a related manner. For the same or similar parts between the various embodiments, please refer to each other. Each embodiment focuses on describing the differences from other embodiments.

[0132] In particular, the device embodiment is basically similar to the method embodiment, so the description is relatively simple. For relevant details, please refer to the description of the method embodiment.

[0133] For ease of description, the above apparatus is described by dividing it into various functional units / modules. Of course, in implementing this invention, the functions of each unit / module can be implemented in one or more software and / or hardware.

[0134] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0135] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A virus detection and killing method, characterized in that: include: Generate virus identification tasks based on the files to be identified; Putting the virus identification task into a task pool; In a first time slice, the first virus detection engine obtains and executes a first virus identification task from the task pool to obtain a first identification result; wherein the first virus identification task is related to the first virus detection engine; The first virus detection engine generates a second virus identification task according to the first identification result, and puts the second virus identification task into the task pool; In the second time slice, the first virus detection engine obtains and executes the third virus identification task from the task pool, and at the same time, the second virus detection engine obtains and executes the second virus identification task from the task pool; wherein the third virus identification task is related to the first virus detection engine, and the second virus identification task is related to the second virus detection engine; Each virus identification task in the task pool has an identifier related to the virus detection engine and a timestamp recording the generation time; The first virus detection engine obtains and executes a first virus identification task from the task pool to obtain a first identification result; including: The first virus detection engine searches for a virus identification task with a first identifier from the task pool according to the generation time sequence of the virus identification tasks, wherein the first identifier is related to the first virus detection engine; The first virus identification task found is used as the first virus identification task; The first virus identification task is executed to obtain a first identification result.

2. The method according to claim 1, characterized in that The first virus detection engine generates a second virus identification task according to the first identification result, and puts the second virus identification task into the task pool; including: If the first identification result is that a risk is found, the first virus detection engine determines, based on the first identification result, that the file to be identified corresponding to the first virus identification task is a risky file; If the first identification result is that no risk is found, the first virus detection engine generates a second virus identification task according to the first identification result, and puts the second virus identification task into the task pool.

3. The method according to claim 2, characterized in that When the first identification result is that no risk is found, the first virus detection engine generates a second virus identification task according to the first identification result; including: The first virus detection engine replaces the first identifier in the first virus identification task with a second identifier according to the first identification result, and generates a second virus identification task; wherein the second identifier is different from the first identifier.

4. The method according to claim 1, characterized in that When the first identification result is that no risk is found, generating a second virus identification task according to the first identification result includes: The first virus detection engine determines whether the to-be-identified file corresponding to the first virus identification task has been identified by all virus detection engines in a virus detection engine set, wherein the virus detection engine set includes the first virus detection engine and the second virus detection engine; If yes, determining that the file to be identified corresponding to the first virus identification task is a safe file; If not, a second virus identification task is generated according to the first identification result.

5. The method according to claim 4, characterized in that Each of the virus detection and killing engines in the virus detection and killing engine set is respectively run by an independent thread.

6. A virus detection and killing device, characterized in that: include: A generating unit, used for generating a virus identification task according to the file to be identified; An inserting unit, used for inserting the virus identification task into a task pool; A first virus detection unit is used to obtain and execute a first virus identification task from the task pool using a first virus detection engine in a first time slice to obtain a first identification result; wherein the first virus identification task is related to the first virus detection engine; The first virus detection engine generates a second virus identification task according to the first identification result, and puts the second virus identification task into the task pool; The second virus detection unit is used to obtain and execute a third virus identification task from the task pool using the first virus detection engine in a second time slice, and at the same time, obtain and execute the second virus identification task from the task pool using the second virus detection engine; wherein the third virus identification task is related to the first virus detection engine, and the second virus identification task is related to the second virus detection engine; Each virus identification task in the task pool has an identifier related to the virus detection engine and a timestamp recording the generation time; The first virus detection unit uses the first virus detection engine to obtain and execute a first virus identification task from the task pool to obtain a first identification result, including: Using the first virus detection engine to search the task pool for a virus identification task with a first identifier in the order of the generation time of the virus identification tasks, wherein the first identifier is related to the first virus detection engine; The first virus identification task found is used as the first virus identification task; The first virus identification task is executed to obtain a first identification result.

7. The device according to claim 6, characterized in that The first virus detection unit generates a second virus identification task by using the first virus detection engine according to the first identification result, and puts the second virus identification task into the task pool; including: If the first identification result is that a risk is found, the first virus detection engine determines, based on the first identification result, that the file to be identified corresponding to the first virus identification task is a risky file; If the first identification result is that no risk is found, the first virus detection engine generates a second virus identification task according to the first identification result, and puts the second virus identification task into the task pool.

8. The device according to claim 7, characterized in that When the first identification result is that no risk is found, the first virus detection unit generates a second virus identification task using the first virus detection engine according to the first identification result; including: The first virus detection engine is used to replace the first identifier in the first virus identification task with a second identifier according to the first identification result to generate a second virus identification task; wherein the second identifier is different from the first identifier.

9. The device according to claim 6, characterized in that When the first identification result is that no risk is found, the first virus detection unit generates a second virus identification task using the first virus detection engine according to the first identification result, including: Using the first virus detection engine to determine whether the to-be-identified file corresponding to the first virus identification task has been identified by all virus detection engines in a virus detection engine set, wherein the virus detection engine set includes the first virus detection engine and the second virus detection engine; If yes, determining that the file to be identified corresponding to the first virus identification task is a safe file; If not, a second virus identification task is generated according to the first identification result.

10. The device according to claim 9, characterized in that Each of the virus detection and killing engines in the virus detection and killing engine set is respectively run by an independent thread.

11. An electronic device, characterized in that: The electronic device comprises: a shell, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the virus detection and killing method described in any one of claims 1 to 5.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the virus detection and killing method described in any one of claims 1 to 5.