Virus scanning method, system, scanner and storage medium
By using the remote desktop program that comes with the target operating system in the virus scanning system, virtualization technology is implemented, which solves the problem of limited scalability of multiple scanners, improves the scalability and system efficiency of the scanner, and reduces hardware requirements. and security risks.
Patent Information
- Application Number
- CN202410444530.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-15
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-04-15
AI Technical Summary
In the existing technology, when expanding multiple scanners, they are limited by the display and splitter hardware, resulting in the problem of running tasks in an idle state.
By using the remote desktop program that comes with the target operating system between the scanner and the window retention server, virtualization technology is implemented, which avoids dependence on the monitor and splitter, improves the scalability of the scanner, and allocates it through the scheduler Virus scanning tasks optimize task allocation and execution.
It achieves efficient expansion of scanners, avoids the need for additional hardware equipment, reduces supply chain security risks through automatic updates, and improves system stability and efficiency.
Smart Images

Figure CN118036007B
Abstract
Description
Technical Field
[0001] The present application relates to the field of security service technology, and in particular to a virus scanning method, system, scanner and storage medium. Background Art
[0002] When using user interface (UI) automation technology to perform virus scanning tasks, a display is usually required to obtain screen resolution to obtain graphic coordinates and locate graphics.
[0003] In the related art, multiple scanners for performing virus scanning tasks can be connected to a server with a display, and a screen splitter can be used to display the display images of the multiple scanners on corresponding split screens.
[0004] However, in the process of implementing the present application, the inventors discovered that there are at least the following problems in the related art: In the above method, when it is necessary to expand multiple scanners, it will be limited by the existing hardware such as displays and screen splitters. Summary of the invention
[0005] The present application provides a virus scanning method, system, scanner and storage medium, which are used to solve the problem in the prior art that a large number of threads created are in a waiting state, causing tasks to be in an idle running state.
[0006] In a first aspect, the present application provides a virus scanning method, which is applied to a virus scanning system; the virus scanning system includes a scheduling machine, a window holding server, and multiple scanning machines, wherein the window holding server and the multiple scanning machines are both installed with a target operating system, and the target operating system has a target remote desktop program; the method includes:
[0007] The target remote desktop program is started by the window maintenance server, the account information of each scanner is obtained through the target remote desktop program, and each scanner is logged in according to the account information of each scanner to maintain the remote login window;
[0008] Creating a virus scanning task by the scheduling machine, and assigning the virus scanning task to a plurality of the scanning machines;
[0009] For each scanner, based on the remote login window, the corresponding to-be-scanned file is scanned according to the assigned virus scanning task to obtain the scanning result.
[0010] In a possible design, creating a virus scanning task by the scheduling machine and assigning the virus scanning task to a plurality of the scanning machines includes:
[0011] The scheduling machine receives virus scanning task information, and creates a virus scanning task in a database according to the virus scanning task information; the virus scanning task information includes a download path of a file to be scanned;
[0012] The scheduling machine traverses the working status of each scanning machine to assign the virus scanning task to the scanning machine in the idle state.
[0013] In a possible design, traversing the working status of each scanner to assign the virus scanning task to a scanner in an idle state includes:
[0014] If the current mode is the first working mode, in the first working mode, the working status of each scanner is traversed, and the virus scanning task is assigned to the scanner in the idle state, and then it is determined whether the number of virus scanning tasks to be assigned in the scheduling machine is greater than or equal to a second preset value;
[0015] If the number of virus scanning tasks to be assigned is greater than or equal to a second preset value, switching to a second working mode, in which each scanner obtains a virus scanning task from the scheduling machine, or the scheduling machine assigns a virus scanning task to each scanner, so that the number of virus scanning tasks to be processed in each scanner is greater than a third preset value; the third preset value is greater than or equal to 1 and less than the second preset value;
[0016] For each scanner, the scanner downloads the corresponding file to be scanned according to the download path corresponding to the assigned virus scanning task in the database, and decompresses the corresponding file to be scanned into a preset disk space, including:
[0017] In the second working mode, for each scanner, multiple virus scanning tasks to be processed are scanned in sequence based on a preset order. For each virus scanning task, the corresponding file to be scanned is downloaded according to the corresponding download path of the assigned virus scanning task in the database, and the corresponding file to be scanned is decompressed to the preset disk space.
[0018] In a possible design, traversing the working status of each scanner to assign the virus scanning task to a scanner in an idle state further includes:
[0019] If the current working mode is the second working mode, determining whether the number of virus scanning tasks to be assigned in the scheduling machine is less than a first preset value; the first preset value is less than a second preset value;
[0020] If the number of virus scanning tasks to be allocated is less than a first preset value, the first working mode is switched.
[0021] In a possible design, traversing the working status of each scanner to assign the virus scanning task to a scanner in an idle state includes:
[0022] After the dispatch machine is started, it enters the first working mode by default;
[0023] In the first working mode, the working status of each scanner is traversed, and the virus scanning task is assigned to a scanner in an idle state.
[0024] In a possible design, for each scanner, based on the remote login window, scanning the corresponding to-be-scanned file according to the assigned virus scanning task to obtain the scanning result includes:
[0025] For each scanner, the scanner downloads the corresponding file to be scanned according to the download path corresponding to the assigned virus scanning task in the database, and decompresses the corresponding file to be scanned into a preset disk space;
[0026] Based on the remote login window, a preset user interface UI automation testing tool is called, and a preset anti-virus program is called to scan the decompressed files to be scanned stored in the preset disk space by imitating mouse and keyboard operations;
[0027] The scan log obtained by scanning is parsed to obtain the scan result, and the scan result is stored in the database.
[0028] In a possible design, the preset disk space includes a first preset disk space and a second preset disk space; and decompressing the corresponding file to be scanned into the preset disk space includes:
[0029] Determine whether the file size of the corresponding file to be scanned is smaller than a preset value;
[0030] If the file size of the corresponding file to be scanned is smaller than a preset value, decompressing the corresponding file to be scanned into the first disk space;
[0031] If the file size of the corresponding file to be scanned is greater than a preset value, the corresponding file to be scanned is decompressed into a second disk space; the capacity of the second disk space is greater than the capacity of the first disk space, and the hardware cost of the second disk space is lower than the hardware cost of the first disk space.
[0032] In a possible design, before determining whether the file size of the corresponding file to be scanned is smaller than a preset value, the process further includes:
[0033] Clearing the preset disk space;
[0034] Decompressing the corresponding to-be-scanned file into the first disk space includes:
[0035] If it is detected that the file size of the to-be-scanned file after decompression is larger than the capacity of the first disk space, the to-be-scanned file is decompressed into the second disk space.
[0036] In a possible design, after decompressing the corresponding to-be-scanned file into a preset disk space, the method further includes:
[0037] Determine the MD5 value of the information digest algorithm of the decompressed file to be scanned;
[0038] Compare the MD5 value of the decompressed file to be scanned with the MD5 value of the file to be scanned that has been scanned and recorded in the database by each scanner;
[0039] If the MD5 value of the decompressed file to be scanned exists in the database, the file to be scanned is not scanned.
[0040] In a possible design, the remote login-based window calls a preset user interface UI automation testing tool, and imitates mouse and keyboard operations to call a preset anti-virus program to scan the decompressed files to be scanned stored in the preset disk space, including:
[0041] Capture the output in the scan log during the scan process;
[0042] Determine whether the current scene is abnormal according to the output content;
[0043] If it is determined that the current scenario is abnormal, the preset UI automation test tool is called again, and the preset anti-virus program is called to scan the decompressed files to be scanned stored in the preset disk space by imitating mouse and keyboard operations.
[0044] In a possible design, judging whether the current situation is abnormal according to the output content includes:
[0045] Performing periodic detection on the display page according to the output content;
[0046] If the displayed page does not include a scanning window for a second preset time period, it is determined that the current situation is an abnormal scenario in which the window is abnormally exited.
[0047] In a possible design, the determining whether the current situation is abnormal according to the output content further includes:
[0048] If the content of the scanning window included in the displayed page remains unchanged for a first preset time period, it is determined that the current situation is a window stuck abnormal scene;
[0049] If it is determined that the current scene is abnormal, the preset UI automation test tool is called again, and the preset anti-virus program is called to scan the decompressed files to be scanned stored in the preset disk space by imitating the mouse and keyboard operation, including:
[0050] If it is determined that the window is currently stuck in an abnormal scenario, the scanning window is controlled to force exit, and the preset UI automation testing tool is called again to imitate the mouse and keyboard operations to call the preset anti-virus program to scan the decompressed files to be scanned stored in the preset disk space.
[0051] In a second aspect, the present application provides a virus scanning method, which is applied to a scanner, wherein the scanner is used to connect to a window holding server and a scheduling machine, wherein the window holding server and multiple scanners connected thereto are both installed with a target operating system, and the target operating system has a target remote desktop program; the method comprises:
[0052] Based on the remote login window, the corresponding files to be scanned are scanned according to the assigned virus scanning tasks to obtain the scanning results; the virus scanning tasks are created and assigned by the scheduling machine; the remote login window is maintained by the window holding server starting the target remote desktop program, obtaining the account information of each scanning machine through the target remote desktop program, and logging in to each scanning machine according to the account information of each scanning machine.
[0053] In a third aspect, the present application provides a virus scanning system, characterized in that it includes: a scheduling machine, a window holding server and multiple scanning machines; the window holding server and the multiple scanning machines are all installed with a target operating system, and the target operating system comes with a target remote desktop program; the virus scanning system is used to execute the virus scanning method described in the first aspect and various possible designs of the first aspect.
[0054] In a fourth aspect, the present application provides a scanner, comprising: a scanning module, which is used to scan the corresponding files to be scanned based on a remote login window according to the assigned virus scanning task to obtain a scanning result; the virus scanning task is created and assigned by the scheduling machine; the remote login window is maintained by the window holding server starting the target remote desktop program, obtaining the account information of each scanner through the target remote desktop program, and logging in to each scanner according to the account information of each scanner.
[0055] In the fifth aspect, an embodiment of the present application provides a scanner, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the virus scanning method described in the second aspect and various possible designs of the second aspect.
[0056] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the virus scanning method described in the second aspect and various possible designs of the second aspect is implemented.
[0057] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the virus scanning method described in the second aspect and various possible designs of the second aspect.
[0058] The virus scanning method, system, scanner and storage medium provided by the present application start the target remote desktop program through the window maintenance server, obtain the account information of each scanner through the target remote desktop program, and log in to each scanner according to the account information of each scanner to maintain the remote login window, create a virus scanning task through the scheduling machine, assign the virus scanning task to multiple scanners, and for each scanner, based on the remote login window, scan the corresponding file to be scanned according to the assigned virus scanning task to obtain the scanning result. The method provided by the embodiment of the present application realizes the construction of virtualization technology by setting a window maintenance server and adopting the target remote desktop program (such as RDP remote desktop) provided by the target operating system (such as Windows), which improves the scalability of the scanner and facilitates the expansion of enough scanners without adding new servers, displays, splitters and other hardware devices, and because it adopts the built-in remote desktop program, it can be automatically updated without the introduction of external software products, effectively avoiding supply chain-related security risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0060] Figure 1 A schematic diagram of the architecture of a virus scanning system provided in an embodiment of the present application;
[0061] Figure 2 The process of the virus scanning method provided in the embodiment of the present application Figure 1 ;
[0062] Figure 3The process of the virus scanning method provided in the embodiment of the present application Figure 2 ;
[0063] Figure 4 The process of the virus scanning method provided in the embodiment of the present application Figure 3 ;
[0064] Figure 5 A schematic diagram of the structure of a scanner provided in an embodiment of the present application;
[0065] Figure 6 A schematic diagram of the structure of a scanner provided in an embodiment of the present application.
[0066] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0067] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0068] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.
[0069] In view of the technical problem that the method of using a display and a screen splitter to realize UI automatic virus scanning in the related technology has poor scalability, the inventor of the present application has found that the remote desktop program that comes with the operating system (such as the RDP remote desktop program that comes with the Windows system) can be used to maintain the existence of the graphical window, realize the construction of virtualization technology, and save the hardware cost of the display and the screen splitter. In addition, it is convenient to expand enough scanners without adding new servers, displays, screen splitters and other hardware equipment. And because the program that comes with the operating system is used, it can be automatically updated when the program is updated without the introduction of external software products, effectively avoiding supply chain-related security risks, and the network isolation environment of the financial industry will not affect its update. Based on this, the embodiment of the present application provides a virus scanning method.
[0070] Figure 1 The schematic diagram of the architecture of the virus scanning system provided in the embodiment of the present application is as follows. Figure 1 As shown, the virus scanning system includes a scheduling machine 101, a scanning machine 102, a window holding server 103 and a database 104. Among them, each scanning machine 102 and the window holding server 103 are installed with a target operating system, and the target operating system has a target remote desktop program. The scheduling machine 101 and the scanning machine 102 are connected, and both can read / write to the database 104. Optionally, the target operating system can be a Windows system, and accordingly, the target remote desktop program can be an RDP remote desktop program.
[0071] In the specific implementation process, the target remote desktop program is started through the window holding server, the account information of each scanner is obtained through the target remote desktop program, and each scanner is logged in according to the account information of each scanner to maintain the remote login window, and the virus scanning task is created through the scheduling machine, and the virus scanning task is assigned to multiple scanners. For each scanner, based on the remote login window, the corresponding file to be scanned is scanned according to the assigned virus scanning task to obtain the scanning result. The virus scanning system provided in the embodiment of the present application realizes the construction of virtualization technology by setting a window holding server and using the remote desktop program that comes with the target operating system, which improves the scalability of the scanner and facilitates the expansion of enough scanners without adding new servers, displays, splitters and other hardware devices, and because it uses a built-in remote desktop program, it can be automatically updated without the introduction of external software products, effectively avoiding supply chain-related security risks.
[0072] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0073] Figure 2 The process of the virus scanning method provided in the embodiment of the present application Figure 1 .like Figure 2 As shown, the virus scanning method is applied to a virus scanning system; the virus scanning system includes a scheduling machine, a window holding server and a plurality of scanning machines, wherein the window holding server and the plurality of scanning machines are both installed with a target operating system, and the target operating system has a target remote desktop program; the method includes:
[0074] 201. Starting the target remote desktop program through the window maintenance server, obtaining the account information of each scanner through the target remote desktop program, and logging into each scanner according to the account information of each scanner to maintain the remote login window.
[0075] Specifically, taking the target operating system as Windows operating system and the target remote desktop program as RDP remote desktop program as an example, the dispatcher can be a Windows server or other server, but since it does not need to execute the scanning task, it does not need to maintain the open window. The scanner needs to use the window maintenance server to maintain the window. The scanner needs to install the Windows system. Similarly, the window maintenance server also needs to install the Windows server. The window maintenance server uses the RDP software to log in to the windows of all scanners to maintain the remote login windows. Specifically, the window maintenance server can receive the account information of each scanner input by the user through the RDP software to log in to the windows of each scanner. In addition, since the window maintenance server does not need to execute the program, its configuration can be lower than that of the scanner, and the window maintenance server does not need to maintain the window through the display and the screen splitter, which saves hardware costs. The only requirement for the window maintenance server is that the user login status cannot be logged off and the computer cannot be shut down.
[0076] In addition, in business scenarios with high security requirements, such as financial business scenarios, the scenario is usually isolated from the outside world to ensure data security. This isolated environment does not allow the automatic update function of external software products. Since this solution uses the RDP software that comes with the Window system, it is not affected by this and can be automatically updated, while meeting the convenience and security requirements.
[0077] 202. Create a virus scanning task through the scheduling machine, and distribute the virus scanning task to a plurality of the scanning machines.
[0078] Specifically, the scheduling machine can schedule tasks for multiple scanners connected to it, so that the virus scanning tasks can be processed more efficiently and stably. There can be multiple allocation methods, and different allocation methods are selected according to the number of scanning tasks. For example, when there are fewer scanning tasks, the scanning tasks can be allocated to idle scanners. When there are more scanning tasks, multiple tasks can be pre-allocated to the scanner to improve the utilization rate of the scanner. For details, please refer to the introduction of the subsequent embodiments, which will not be repeated here.
[0079] 203. For each scanner, based on the remote login window, the corresponding to-be-scanned file is scanned according to the assigned virus scanning task to obtain a scanning result.
[0080] Specifically, when the window-keeping server maintains the login window of each scanner, each scanner can execute the assigned virus scanning task, first download the file to be scanned of the virus scanning task, and then perform virus scanning on the file to be scanned based on the virus scanning tool to obtain the scanning result. The scanning result can be a scanning log generated during the scanning process, or analysis data obtained after parsing the scanning log, which is not limited in this embodiment.
[0081] The virus scanning method provided in this embodiment detects whether the file to be scanned in the current virus scanning task has been scanned based on the MD5 value, and then deletes the scanned file to avoid repeated scanning, thereby improving the scanning efficiency.
[0082] Figure 3 Schematic diagram of the virus scanning method provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, the virus scanning method includes:
[0083] 301. Start the target remote desktop program through the window maintenance server, obtain the account information of each scanner through the target remote desktop program, and log in to each scanner according to the account information of each scanner to maintain the remote login window.
[0084] Step 301 in this embodiment is similar to step 201 in the above embodiment and will not be described again here.
[0085] 302. Receive virus scanning task information through the scheduling machine, and create a virus scanning task in a database according to the virus scanning task information; the virus scanning task information includes a download path of a file to be scanned.
[0086] 303. The scheduling machine traverses the working status of each scanner to assign the virus scanning task to a scanner in an idle state.
[0087] In this embodiment, when the upstream business platform needs to scan files, for example, before releasing a software product, it needs to scan the files of the software product, and then it can send virus scanning task information to the scheduling machine. The virus scanning task information can include the download path of the file to be scanned and the identification information of the project involved in the file to be scanned. The identification information is unique to distinguish different projects, so that after creating a virus scanning task in the database based on the virus scanning task information, the corresponding virus scanning task can be read based on the identification information.
[0088] Specifically, the scheduling machine may periodically detect the working status of the scanner. If an idle scanner is detected, the virus scanning task created in the database may be assigned to the idle scanner.
[0089] In actual applications, after receiving a piece of virus scanning task information, the scheduling machine creates a virus scanning task based on the information, that is, the virus scanning task information and the virus scanning task are in a one-to-one correspondence. When the frequency of the received virus scanning task information is high, more virus scanning tasks will be created. In order to improve the continuity and efficiency of the scanner's work, it is not necessary to wait until the scanner is detected to be idle before assigning tasks to the scanner. Another working mode can be adopted, in which the scheduling machine assigns multiple virus scanning tasks to the scanner at one time, and the scanner then executes the assigned tasks in sequence. For details, please refer to the follow-up Figure 3 Description of the illustrated embodiment.
[0090] 304. For each scanner, the scanner downloads the corresponding file to be scanned according to the download path corresponding to the assigned virus scanning task in the database, and decompresses the corresponding file to be scanned into a preset disk space.
[0091] 305. Based on the remote login window, call the preset user interface UI automation testing tool, imitate the mouse and keyboard operation to call the preset anti-virus program to scan the decompressed files to be scanned stored in the preset disk space, parse the scan logs obtained by the scan, obtain the scan results, and store the scan results in the database.
[0092] Specifically, in order to improve transmission efficiency, the files to be scanned are usually in the form of compressed packages. After obtaining the assigned virus scanning task, the scanner can determine the download path of the files to be scanned corresponding to the virus scanning task from the database, and then download the compressed package of the files to be scanned based on the download path. In order to facilitate the decompression scanning of the scanner, a dedicated disk space can be pre-configured for each scanner so that the scanner can decompress the obtained compressed package into the disk space. When the server maintains the scanning window based on RDP through the window, the UI automation testing tool can be called to call the preset virus scanning program to scan the decompressed files to be scanned. After the scan is completed, the scanner can parse the scan log obtained by the scan to obtain the scan results, and store the scan results in the entry corresponding to the virus scanning task in the database.
[0093] In some embodiments, in order to balance cost and efficiency, a first disk space with a higher cost but a faster scanning speed can be set as a primary disk space, and a second disk space with a lower cost but a slower scanning speed can be set as a backup disk space. For example, the first disk space can be a solid-state disk, and the second disk space can be a mechanical disk. Specifically, the preset disk space includes the first preset disk space and the second preset disk space. The decompressing the corresponding file to be scanned into the preset disk space can include:
[0094] Step a1, determine whether the file size of the corresponding file to be scanned is smaller than a preset value; if the file size of the corresponding file to be scanned is smaller than the preset value, execute step a2; if the file size of the corresponding file to be scanned is larger than the preset value, execute step a3.
[0095] Step a2: decompress the corresponding file to be scanned into the first disk space.
[0096] Step a3, decompressing the corresponding to-be-scanned file into a second disk space; the capacity of the second disk space is greater than the capacity of the first disk space, and the hardware cost of the second disk space is lower than the hardware cost of the first disk space.
[0097] In some embodiments, it is considered that there may be a situation where the file size is smaller than the preset value, but the compression ratio is large, so that the first disk space cannot accommodate the file to be scanned. In view of the above situation, this embodiment defines a technical solution of decompressing the file to a second disk space with a larger capacity when the file size exceeds the capacity of the first disk space. Specifically, the decompressing the corresponding file to be scanned into the preset disk space may include:
[0098] Step b1, clearing the preset disk space.
[0099] In this embodiment, in order to fully utilize the disk space, after the previous virus scanning task is completed, the decompressed to-be-scanned files corresponding to the previous virus scanning task stored in the disk space may be deleted first when the current virus scanning task is performed.
[0100] Step b2, determine whether the file size of the corresponding file to be scanned is smaller than a preset value; if the file size of the corresponding file to be scanned is smaller than the preset value, execute step b3; if the file size of the corresponding file to be scanned is larger than the preset value, execute step b5.
[0101] Step b3: decompress the corresponding file to be scanned into the first disk space.
[0102] Step b4, determine whether the file size after decompression of the to-be-scanned file is larger than the capacity of the first disk space; if so, execute b5.
[0103] Step b5, decompressing the corresponding file to be scanned into a second disk space; the capacity of the second disk space is greater than the capacity of the first disk space, and the hardware cost of the second disk space is lower than the hardware cost of the first disk space.
[0104] In some embodiments, in the related art, when a scan is abnormally terminated, human intervention is usually required to perform subsequent scans. In view of this situation, in this embodiment, in order to improve efficiency, a technical solution of abnormal monitoring and automatic processing is added. Specifically, based on the remote login window, calling a preset user interface UI automation testing tool, imitating mouse and keyboard operations to call a preset anti-virus program to scan the decompressed files to be scanned stored in the preset disk space, may include:
[0105] Step c1: Capture the output content in the scan log during the scan process.
[0106] Step c2: determine whether the current situation is abnormal according to the output content; if so, execute step c3.
[0107] Step c3: re-call the preset UI automated testing tool, and imitate the mouse and keyboard operation to call the preset anti-virus program to scan the decompressed files to be scanned stored in the preset disk space.
[0108] In some embodiments, the abnormal scenario may be that the scanning window exits abnormally or the window freezes. For these two abnormal scenarios, this embodiment provides an abnormal monitoring method and an abnormal handling method. Specifically, scanning the decompressed files to be scanned stored in the preset disk space may include:
[0109] Step d1: Capture the output content in the scan log during the scan process.
[0110] Step d2: periodically detect the display page according to the output content.
[0111] Step d3: during the detection process, determine whether the content of the scanning window included in the display page remains unchanged for a first preset time period. If so, execute step d4.
[0112] Step d4: determine that the current window is stuck abnormally. Control the scanning window to force exit, re-call the preset UI automation test tool, imitate the mouse and keyboard operation to call the preset anti-virus program to scan the decompressed files to be scanned stored in the preset disk space.
[0113] Step d5: during the detection process, determine whether the displayed page does not contain a scanning window for a second preset time period. If so, execute step d6.
[0114] Step d6: Determine that the current abnormal scenario is an abnormal window exit. Re-call the preset UI automation test tool, imitate the mouse and keyboard operation to call the preset anti-virus program to scan the decompressed files to be scanned stored in the preset disk space.
[0115] In this embodiment, the detection step for the abnormal window freezing scenario, step d3, and the detection step for the abnormal window exit scenario, step d5, can be executed sequentially, for example, step d3 is executed first and then step d5, or step d5 is executed first and then step d3, or they can be executed in parallel, which is not limited in this embodiment.
[0116] This embodiment realizes the construction of virtualization technology by setting up a window to maintain the server and adopting the target remote desktop program that comes with the target operating system, thereby improving the scalability of the scanner and facilitating the expansion of a sufficient number of scanners without adding new servers, monitors, splitters and other hardware equipment. In addition, since a built-in remote desktop program is used, it can be automatically updated without the introduction of external software products, thereby effectively avoiding supply chain-related security risks.
[0117] In some embodiments, based on the above embodiments, for example, Figure 2 On the basis of the embodiment shown, in order to improve the scanning efficiency, the scanned files can be recorded so that the scanned files are not scanned repeatedly in the subsequent scanning process. Specifically, after step 304, the following may also be included:
[0118] Step e1, determining the MD5 value of the information digest algorithm of the decompressed file to be scanned.
[0119] Step e2, determine whether the MD5 value of the decompressed file to be scanned is included in the MD5 value of the file to be scanned that has been scanned and recorded in the database by each scanner. If yes, execute step e3; if not, execute step 305.
[0120] Step e3: delete the scanned file, do not scan the file to be scanned, and return to step 302.
[0121] Specifically, after the file to be scanned is decompressed to the preset disk space, the MD5 value of the decompressed file to be scanned can be calculated, and then the MD5 value can be stored in the database, so that when a new file to be scanned is subsequently scanned, the MD5 value can be retrieved in time, and the MD5 value can be compared with the MD5 value of the new file to be scanned. In addition, by storing the MD5 value in the database, each scanner can read it, so that the repeated scanning situation that may exist on different scanners can be eliminated. Exemplarily, scanner 1 has completed the scanning of file x to be scanned, and stored the MD5 value of x in the database. When the virus scanning task y assigned to scanner 2 is also file x to be scanned, the MD5 value of file x to be scanned can be determined, and the MD5 value can be compared one by one with the MD5 value stored by its own scanner 2 and other scanners, such as scanner 1, in the database. In this way, it can be found that scanner 1 has completed the scanning of file x to be scanned, so that file x to be scanned can be deleted, and the scanning result obtained by scanner 1 can be directly copied to the entry corresponding to virus scanning task y.
[0122] This embodiment realizes the construction of virtualization technology by setting up a window to maintain the server and adopting the target remote desktop program that comes with the target operating system, thereby improving the scalability of the scanner and facilitating the expansion of a sufficient number of scanners without adding new servers, monitors, splitters and other hardware equipment. In addition, since a built-in remote desktop program is used, it can be automatically updated without the introduction of external software products, thereby effectively avoiding supply chain-related security risks.
[0123] Based on the above embodiments, in order to balance the cost of the scanner and the stability of the scanning work, the scheduling method can be divided into two modes. The first working mode is for the situation where there are fewer tasks and the scanner is prone to idleness, and the second working mode is for the situation where there are more tasks and the scanner is always busy. The present application proposes the following embodiments.
[0124] Figure 4 The process of the virus scanning method provided in the embodiment of the present application Figure 3 .like Figure 4 As shown, the virus scanning method includes the following steps:
[0125] 401. Start the target remote desktop program through the window maintenance server, obtain the account information of each scanner through the target remote desktop program, and log in to each scanner according to the account information of each scanner to maintain the remote login window.
[0126] Step 401 in this embodiment is similar to step 201 in the above embodiment and will not be described again here.
[0127] 402. Receive virus scanning task information through the scheduling machine, and create a virus scanning task in a database according to the virus scanning task information; the virus scanning task information includes a download path of a file to be scanned.
[0128] 403. Determine whether the current working mode is the first working mode, if so, execute step 404, if not, execute step 405.
[0129] 404. If the current working mode is the first working mode, determine whether the number of virus scanning tasks to be assigned in the scheduling machine is greater than or equal to a second preset value. If so, execute step 405.
[0130] 405. Switch to the second working mode, in which each scanner obtains a virus scanning task from the scheduling machine, or the scheduling machine assigns a virus scanning task to each scanner, so that the number of virus scanning tasks to be processed in each scanner is greater than a third preset value; the third preset value is greater than or equal to 1 and less than the second preset value. For each scanner, scan the multiple virus scanning tasks to be processed in sequence based on a preset order, and for each virus scanning task, download the corresponding file to be scanned according to the download path corresponding to the assigned virus scanning task in the database, and decompress the corresponding file to be scanned into a preset disk space.
[0131] 406. If the current working mode is the second working mode, determine whether the number of virus scanning tasks to be allocated in the scheduling machine is less than a first preset value; if the first preset value is less than the second preset value, if so, execute step 407.
[0132] 407. Switch to the first working mode. For each scanner, the scanner downloads the corresponding file to be scanned according to the download path corresponding to the assigned virus scanning task in the database, and decompresses the corresponding file to be scanned into a preset disk space.
[0133] 408. Based on the remote login window, call the preset user interface UI automation testing tool, imitate the mouse and keyboard operation to call the preset anti-virus program to scan the decompressed files to be scanned stored in the preset disk space; parse the scan log obtained by the scan to obtain the scan result, and store the scan result in the database.
[0134] Specifically, when the number of virus scanning tasks increases, the number of scanners can be increased through the scalability of RDP. However, considering the cost of scanners, the occasional increase in virus scanning tasks can be solved by setting different working modes. When there are fewer tasks, the scheduling method based on the scheduling machine can be adopted. When there are more tasks, the initiative of the scanner can be improved.
[0135] Exemplarily, two working modes can be set: the first working mode is for situations where there are fewer tasks (i.e., virus scanning tasks) and the scanner is prone to being idle. Based on this, when the dispatcher creates a task, it can usually match the task to an idle scanner, and there will be no backlog at the dispatcher. The second working mode is for situations where there are many tasks and the scanner is always busy. Specifically, when the scanner is still processing the assigned task, the dispatcher creates a new task. However, since all the scanners are busy and there is no idle scanner, if the first working mode is still used, the dispatcher will have a backlog of tasks and cannot assign them. In addition, in the first working mode, the scanner must be idle before it can be assigned a task, that is, the scanner will not process tasks continuously, but will leave gaps, wasting the processing resources of the scanner. In view of this, the second working mode is set to alleviate the backlog of the dispatcher and improve the utilization rate of the scanner.
[0136] In the specific implementation process, the scheduling machine enters the first working mode by default after startup. The scheduling machine responds to the continuously received virus scanning task information and creates corresponding virus scanning tasks accordingly. The virus scanning task information and the virus scanning task correspond one to one. In the first working mode, each time a virus scanning task is created, the scheduling machine traverses and scans each scanning machine until a scanning machine in an idle state is found, and the virus scanning task is assigned to the scanning machine in an idle state. In one scenario, due to the high frequency of virus scanning task information received, the scanner is always busy, and the created virus scanning tasks are backlogged. When the virus scanning tasks to be assigned are greater than or equal to the second preset value (for example, 4), it indicates that the current scenario is in a scenario with many tasks, so it can be switched to the second working mode. After entering the second working mode, the scanner can obtain virus scanning tasks from the scheduling machine, or the scheduling machine assigns virus tasks to the scanner, so that the virus scanning tasks to be processed in the scanner are greater than or equal to the third preset value (for example, 1). The scanner processes multiple virus scanning tasks in sequence. In one implementable method, after the scanner completes processing a task, it records the processing completion status in the database so that the scheduling machine can obtain the remaining task amount of the scanner in time, and assign scanning tasks based on the remaining task amount, so that the virus scanning tasks to be processed in the scanner are greater than or equal to the third preset value (for example, 1); in another implementable method, the scanner can obtain the virus scanning task from the scheduling machine again when there is still one virus scanning task left, so that the virus scanning tasks to be processed in the scanner are greater than or equal to the third preset value (for example, 1). When the number of virus scanning tasks to be allocated in the scheduling machine is less than a first preset value (eg, 2 scanning tasks), the first working mode is switched back.
[0137] This embodiment provides a virus scanning method, which sets two working modes and uses different thresholds (a first preset value and a second preset value) to achieve switching between the two working modes, so that occasional sudden increases in scanning tasks can be dealt with without adding scanners.
[0138] The embodiment of the present application also provides a virus scanning system, comprising: a scheduling machine, a window holding server and a plurality of scanning machines; the window holding server and the plurality of scanning machines are both installed with a target operating system, and the target operating system has a target remote desktop program;
[0139] The window holding server is used to start the target remote desktop program, obtain the account information of each scanner through the target remote desktop program, and log in to each scanner according to the account information of each scanner to maintain the remote login window;
[0140] The scheduling machine is used to create a virus scanning task and distribute the virus scanning task to a plurality of the scanning machines;
[0141] Each scanner is used to scan the corresponding to-be-scanned file based on the remote login window according to the assigned virus scanning task to obtain the scanning result.
[0142] The virus scanning system provided in the embodiment of the present application can be used to execute the technical solution of the virus scanning method in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0143] Figure 5 This is a schematic diagram of the structure of the scanner provided in the embodiment of the present application. Figure 5 As shown, the scanner 50 includes: a scanning module 501;
[0144] Among them, the scanning module 501 is used to scan the corresponding files to be scanned based on the remote login window according to the assigned virus scanning task to obtain the scanning results; the virus scanning task is created and assigned by the scheduling machine; the remote login window is maintained by the window holding server starting the target remote desktop program, obtaining the account information of each scanning machine through the target remote desktop program, and logging in to each scanning machine according to the account information of each scanning machine.
[0145] This embodiment realizes the construction of virtualization technology by setting up a window to maintain the server and adopting the target remote desktop program that comes with the target operating system, thereby improving the scalability of the scanner and facilitating the expansion of a sufficient number of scanners without adding new servers, monitors, splitters and other hardware equipment. In addition, since a built-in remote desktop program is used, it can be automatically updated without the introduction of external software products, thereby effectively avoiding supply chain-related security risks.
[0146] In some embodiments, the scanning module 501 may include: a decompression unit 5011, which is used to download the corresponding file to be scanned according to the download path corresponding to the virus scanning task assigned by the scheduling machine in the database, and decompress the corresponding file to be scanned into a preset disk space; the virus scanning task is created in the database according to the virus scanning task information received by the scheduling machine; the virus scanning task information includes the download path of the file to be scanned; the virus scanning task is allocated by traversing the working status of each scanning machine through the scheduling machine, and allocating the virus scanning task to the scanning machine in the idle state;
[0147] The scanning unit 5012 is used to call a preset user interface UI automation testing tool based on the remote login window, and imitate the mouse and keyboard operation to call the preset anti-virus program to scan the decompressed to-be-scanned files stored in the preset disk space; the remote login window is maintained by starting the RDP remote desktop program through the window holding server, obtaining the account information of each scanner through the RDP remote desktop program, and logging in to each scanner according to the account information of each scanner;
[0148] The parsing unit 5013 is used to parse the scan log obtained by scanning, obtain the scan result, and store the scan result in a database.
[0149] In some embodiments, the preset disk space includes a first preset disk space and a second preset disk space; the decompression unit 5011 is specifically used to: determine whether the file size of the corresponding file to be scanned is less than a preset value; if the file size of the corresponding file to be scanned is less than the preset value, the corresponding file to be scanned is decompressed into the first disk space; if the file size of the corresponding file to be scanned is greater than the preset value, the corresponding file to be scanned is decompressed into the second disk space; the capacity of the second disk space is greater than the capacity of the first disk space, and the hardware cost of the second disk space is lower than the hardware cost of the first disk space.
[0150] In some embodiments, the decompression unit 5011 is also used to: clear the preset disk space; decompress the corresponding file to be scanned into the first disk space, including: if it is detected that the file size of the decompressed file to be scanned is larger than the capacity of the first disk space, then decompress the file to be scanned into the second disk space.
[0151] In some embodiments, the decompression unit 5011 is also used to: determine the MD5 value of the information digest algorithm of the decompressed file to be scanned; compare the MD5 value of the decompressed file to be scanned with the MD5 value of the scanned file to be scanned recorded in the database by each scanner; if the MD5 value of the decompressed file to be scanned exists in the database, the file to be scanned is not scanned.
[0152] In some embodiments, the scanning unit 5012 is specifically used to: capture the output content in the scanning log during the scanning process; determine whether the current scenario is abnormal based on the output content; if it is determined that the current scenario is abnormal, re-call the preset UI automation testing tool, imitate the mouse and keyboard operations to call the preset virus scanning program to scan the decompressed files to be scanned stored in the preset disk space.
[0153] In some embodiments, the scanning unit 5012 is specifically used to: periodically detect the display page according to the output content; if the display page does not contain a scanning window for a second preset time period, determine that the current scene is an abnormal window exit.
[0154] In some embodiments, the scanning unit 5012 is specifically used for: if the content of the scanning window included in the displayed page remains unchanged for a first preset time period, it is determined that the current situation is a window stuck abnormal scenario; if it is determined that the current situation is a window stuck abnormal scenario, the scanning window is controlled to force exit, and the preset UI automation testing tool is called again, and the preset virus scanning program is called to imitate the mouse and keyboard operations to scan the decompressed files to be scanned stored in the preset disk space.
[0155] The scanner provided in the embodiment of the present application can be used to execute the technical solution of the virus scanning method with the scanner as the execution body in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0156] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the scanning unit 5012 can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above scanning unit 5012. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0157] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device may include: a processor 601 and a memory 602 .
[0158] The processor 601 executes the computer execution instructions stored in the memory, so that the processor 601 executes the scheme in the above embodiment. The processor 601 can be a general-purpose processor, including a central processing unit CPU, a network processor (network processor, NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0159] The memory 602 is connected to the processor 601 via a system bus and completes communication between them. The memory 602 is used to store computer program instructions.
[0160] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.
[0161] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.
[0162] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the virus scanning method in the above embodiment.
[0163] The embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the virus scanning method of the above embodiment.
[0164] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, the technical solution of the virus scanning method in the above embodiment can be implemented.
[0165] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0166] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
[0167] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0168] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0169] It should be understood that the above processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
[0170] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0171] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0172] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0173] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.
[0174] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A virus scanning method, characterized in that: Applied to a virus scanning system; the virus scanning system comprises a scheduling machine, a window holding server and a plurality of scanning machines, wherein the window holding server and the plurality of scanning machines are both installed with a target operating system, and the target operating system has a target remote desktop program; the method comprises: The target remote desktop program is started by the window maintenance server, the account information of each scanner is obtained through the target remote desktop program, and each scanner is logged in according to the account information of each scanner to maintain the remote login window; Creating a virus scanning task by the scheduling machine, and assigning the virus scanning task to a plurality of the scanning machines; For each scanner, the scanner downloads the corresponding file to be scanned according to the download path corresponding to the assigned virus scanning task in the database, and decompresses the corresponding file to be scanned into a preset disk space; Based on the remote login window, a preset user interface UI automation testing tool is called, and a preset anti-virus program is called to scan the decompressed files to be scanned stored in the preset disk space by imitating mouse and keyboard operations; Parsing the scan logs obtained by scanning to obtain scan results, and storing the scan results in a database; After decompressing the corresponding to-be-scanned file into the preset disk space, the method further includes: Determine the MD5 value of the information digest algorithm of the decompressed file to be scanned; Compare the MD5 value of the decompressed file to be scanned with the MD5 value of the file to be scanned that has been scanned and recorded in the database by each scanner; If the MD5 value of the decompressed file to be scanned exists in the database, the file to be scanned is not scanned.
2. The method according to claim 1, characterized in that The step of creating a virus scanning task by the scheduling machine and assigning the virus scanning task to a plurality of the scanning machines includes: The scheduling machine receives virus scanning task information, and creates a virus scanning task in a database according to the virus scanning task information; the virus scanning task information includes a download path of a file to be scanned; The scheduling machine traverses the working status of each scanning machine to assign the virus scanning task to the scanning machine in the idle state.
3. The method according to claim 2, characterized in that The traversing the working status of each scanner to assign the virus scanning task to the scanner in an idle state includes: If the current mode is the first working mode, in the first working mode, the working status of each scanner is traversed, and the virus scanning task is assigned to the scanner in the idle state, and then it is determined whether the number of virus scanning tasks to be assigned in the scheduling machine is greater than or equal to a second preset value; If the number of virus scanning tasks to be assigned is greater than or equal to a second preset value, switching to a second working mode, in which each scanner obtains a virus scanning task from the scheduling machine, or the scheduling machine assigns a virus scanning task to each scanner so that the number of virus scanning tasks to be processed in each scanner is greater than a third preset value; the third preset value is greater than or equal to 1 and less than the second preset value; For each scanner, the scanner downloads the corresponding file to be scanned according to the download path corresponding to the assigned virus scanning task in the database, and decompresses the corresponding file to be scanned into a preset disk space, including: In the second working mode, for each scanner, multiple virus scanning tasks to be processed are scanned in sequence based on a preset order. For each virus scanning task, the corresponding file to be scanned is downloaded according to the corresponding download path of the assigned virus scanning task in the database, and the corresponding file to be scanned is decompressed to the preset disk space.
4. The method according to claim 3, characterized in that The traversing the working status of each scanner to assign the virus scanning task to the scanner in an idle state also includes: If the current working mode is the second working mode, determining whether the number of virus scanning tasks to be assigned in the scheduling machine is less than a first preset value; the first preset value is less than a second preset value; If the number of virus scanning tasks to be allocated is less than a first preset value, the first working mode is switched.
5. The method according to claim 2, characterized in that: The traversing the working status of each scanner to assign the virus scanning task to the scanner in an idle state includes: After the dispatch machine is started, it enters the first working mode by default; In the first working mode, the working status of each scanner is traversed, and the virus scanning task is assigned to a scanner in an idle state.
6. The method according to claim 1, characterized in that The preset disk space includes a first preset disk space and a second preset disk space; The step of decompressing the corresponding file to be scanned into a preset disk space includes: Determine whether the file size of the corresponding file to be scanned is smaller than a preset value; If the file size of the corresponding file to be scanned is smaller than a preset value, decompressing the corresponding file to be scanned into the first disk space; If the file size of the corresponding file to be scanned is greater than a preset value, the corresponding file to be scanned is decompressed into a second disk space; the capacity of the second disk space is greater than the capacity of the first disk space, and the hardware cost of the second disk space is lower than the hardware cost of the first disk space.
7. The method according to claim 6, characterized in that Before determining whether the file size of the corresponding file to be scanned is smaller than a preset value, the method further includes: Clearing the preset disk space; Decompressing the corresponding to-be-scanned file into the first disk space includes: If it is detected that the file size of the to-be-scanned file after decompression is larger than the capacity of the first disk space, the to-be-scanned file is decompressed into the second disk space.
8. The method according to claim 1, characterized in that The remote login-based window calls a preset user interface UI automation test tool, and imitates mouse and keyboard operations to call a preset anti-virus program to scan the decompressed files to be scanned stored in the preset disk space, including: Capture the output in the scan log during the scan process; Determine whether the current scene is abnormal according to the output content; If it is determined that the current scenario is abnormal, the preset UI automation test tool is called again, and the preset anti-virus program is called to scan the decompressed files to be scanned stored in the preset disk space by imitating mouse and keyboard operations.
9. The method according to claim 8, characterized in that The determining whether the current situation is abnormal according to the output content includes: Performing periodic detection on the display page according to the output content; If the displayed page does not include a scanning window for a second preset time period, it is determined that the current situation is an abnormal scenario in which the window is abnormally exited.
10. The method according to claim 9, characterized in that The determining whether the current situation is abnormal according to the output content further includes: If the content of the scanning window included in the displayed page remains unchanged for a first preset time period, it is determined that the current situation is a window stuck abnormal scene; If it is determined that the current scene is abnormal, the preset UI automation test tool is called again, and the preset anti-virus program is called to scan the decompressed files to be scanned stored in the preset disk space by imitating the mouse and keyboard operation, including: If it is determined that the window is currently stuck in an abnormal scenario, the scanning window is controlled to force exit, and the preset UI automation testing tool is called again to imitate the mouse and keyboard operations to call the preset anti-virus program to scan the decompressed files to be scanned stored in the preset disk space.
11. A virus scanning system, characterized in that: include: A scheduling machine, a window holding server and multiple scanning machines; the window holding server and the multiple scanning machines are all installed with a target operating system, and the target operating system has a target remote desktop program; the virus scanning system is used to execute the method described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 10 when executed by a processor.
13. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 10 when being executed by a processor.
