Scanning task processing method and device

By grouping business scanners and determining the call order processing based on dependencies, the problem of low scanning task processing efficiency in software development is solved, efficient and accurate scanning task processing is achieved, and the user experience is improved.

CN118760484APending Publication Date: 2024-10-11BEIJING PACTERA JINXIN TECH LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410823565.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

In the existing technology, scanning task processing during the software development process relies on manual operations, resulting in poor accuracy and low efficiency, which seriously affects the development progress.

Method used

By grouping business scanners and determining dependencies, the business scanners in the group are processed using the calling sequence to achieve parallel processing and automatic scheduling, and avoid conflicts and repeated processing caused by improper execution order.

Benefits of technology

It improves the accuracy and efficiency of scanning task processing, reduces unnecessary repeated processing and waiting time, improves the rationality of resource utilization, supports accurate identification of bottlenecks and problems in scanning tasks, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760484A_ABST
    Figure CN118760484A_ABST
Patent Text Reader

Abstract

The invention provides a scanning task processing method and device, and the method comprises the steps: carrying out the initialization of an environment context object through employing a plurality of pieces of system configuration information and code versions in response to the verification of a plurality of pieces of system configuration information and the code versions of a target application; obtaining at least one service scanner, and grouping the at least one service scanner to obtain at least one group; determining a calling sequence of each group according to a dependency relationship between the at least one service scanner; and according to the calling sequence, the service scanners in each group process the to-be-scanned task based on the environment context object in sequence, so that scanning task processing conflicts caused by improper execution sequence of the service scanners are avoided, unnecessary repeated processing or waiting time is reduced, and the processing efficiency is improved. Therefore, the utilization rationality of scanning resources and the accuracy of scanning task processing are improved, meanwhile, the service scanners in the same group process the scanning tasks in parallel, and the processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a scanning task processing method and device. Background Art

[0002] During the software application development process, in order to ensure the quality of the developed software application, it is necessary to process the scanning tasks in the software application (for example, scanning the components or codes in the software application) to find out some potential problems, security vulnerabilities or irregularities in the software application, and correct the above problems in time.

[0003] At present, scanning tasks are mainly handled manually by relevant scanning personnel. However, the accuracy of manual scanning task processing is poor, and when there are many scanning tasks, the processing efficiency is low, which seriously affects the development progress. Summary of the invention

[0004] The present disclosure provides a scanning task processing method and device to solve one of the technical problems in the related art at least to a certain extent. The technical solution of the present disclosure is as follows:

[0005] According to the first aspect of an embodiment of the present disclosure, a scanning task processing method is provided, comprising: in response to multiple system configuration information and code versions of a target application being verified, initializing an environment context object using the multiple system configuration information and the code versions; acquiring at least one business scanner, and grouping the at least one business scanner according to an execution level of the at least one business scanner to obtain at least one group; wherein the execution levels of the business scanners in the same group are the same; determining a calling order of each group according to a dependency relationship between the at least one business scanner; and processing the scanning task in turn for the business scanners in each of the groups based on the environment context object according to the calling order.

[0006] According to the second aspect of an embodiment of the present disclosure, a scanning task processing device is provided, including: a verification module, for initializing an environment context object using the multiple system configuration information and the code version of the target application in response to verification; a grouping module, for acquiring at least one business scanner, and grouping the at least one business scanner according to the execution level of the at least one business scanner to obtain at least one group; wherein the execution levels of the business scanners in the same group are the same; a determination module, for determining a calling order of each group according to the dependency relationship between the at least one business scanner; and a processing module, for processing the scanning task for the business scanners in each of the groups based on the environment context object in turn according to the calling order.

[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the scanning task processing method as described in the embodiment of the first aspect of the present disclosure.

[0008] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the scanning task processing method as described in the embodiment of the first aspect of the present disclosure.

[0009] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including: a computer program, which, when executed by a processor, implements the scanning task processing method as described in the embodiment of the first aspect of the present disclosure.

[0010] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0011] In the technical solution, at least one business scanner is grouped according to the execution level, and the calling order of each group is determined according to the dependency relationship between at least one business scanner, so that the business scanners in each group process the scanning task based on the environment context object in turn according to the calling order. Therefore, the business scanners in the group are called in turn according to the calling order determined according to the dependency relationship between at least one business scanner, thereby avoiding scanning task processing conflicts caused by improper execution order of the business scanners, reducing unnecessary repeated processing or waiting time, improving the rationality of scanning resource utilization and the accuracy of scanning task processing, and at the same time, achieving business in the same group The scanner processes the scanning task in parallel, which improves the processing efficiency. Furthermore, after any business scanner in the currently called group is called, the scanning result of any business scanner is written into the data context object. By querying the data context object, the scanning results of all business scanners in the currently called group are obtained, which improves the query efficiency of the scanning result. At the same time, it helps relevant personnel to more accurately identify the bottlenecks and problems of the scanning task, improves the user experience, and after all the business scanners in the groups are called, the scanning results of the business scanners in each group are obtained, and the scanning results of the business scanners in each group are sent to the database manager for subsequent data query. Among them, when the business scanners in each group process the task to be scanned based on the environment context object according to the calling order, according to the scanning type of any business scanner, the task to be scanned matching with any business scanner is obtained, and the business scanners in each group process the task to be scanned based on the environment context object, which realizes matching the task to be scanned by the scanning type of the scanner, ensures that the scanner most suitable for the current scanning task is used to work, improves the rationality of resource utilization, and avoids obtaining system environment information from the system configuration file when each scanning task is processed, further improving the processing efficiency.

[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0014] Figure 1 is a flowchart of a scanning task processing method shown in the first embodiment of the present disclosure;

[0015] Figure 2 is a flowchart of a scanning task processing method shown in the second embodiment of the present disclosure;

[0016] Figure 3 is a flowchart of a scanning task processing method shown in the third embodiment of the present disclosure;

[0017] Figure 4 is a schematic diagram of the principle of the scanning task processing method shown in the embodiment of the present disclosure;

[0018] Figure 5 is a schematic structural diagram of a scanning task processing device shown in the fourth embodiment of the present disclosure;

[0019] Figure 6 It is a schematic structural diagram of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0022] It should be noted that in the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, and are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0023] In the traditional software development process, the processing of scanning tasks (scanning of components and codes) mostly relies on manual settings and lacks a unified automation mechanism, especially in the configuration, scheduling and execution of scanning tasks; this manual method usually does not have the ability to reuse common functions, such as configuration verification and log management, resulting in the development team having to repeat the same setup work for each scanning task, which not only reduces efficiency but also increases the risk of errors.

[0024] The following describes the scanning task processing method and device according to the embodiments of the present disclosure with reference to the accompanying drawings.

[0025] Figure 1It is a flowchart of the scanning task processing method shown in the first embodiment of the present disclosure. It should be noted that, in order to improve the processing efficiency of the scanning task, the execution subject of the scanning task processing method can be a scanner container, wherein the scanner container can have functional duplication and reuse capabilities.

[0026] like Figure 1 As shown, the scanning task processing method may include the following steps:

[0027] Step 101 : in response to multiple system configuration information and code versions of a target application being verified, initializing an environment context object using the multiple system configuration information and code versions.

[0028] In order to avoid obtaining system environment information from the system configuration file when processing each scanning task, as an example, multiple system configuration information and code versions of the target application can be verified. When multiple system configuration information and code versions of the target application are verified, the multiple system configuration information and code versions are used to initialize the environment context object. The multiple system configuration information includes but is not limited to the system code, application code and environment identifier, and the code version indicates the version information corresponding to the target application.

[0029] Step 102: Acquire at least one service scanner, and group the at least one service scanner according to the execution level of the at least one service scanner to obtain at least one group.

[0030] The execution levels of the service scanners in the same group are the same.

[0031] In order to improve the processing efficiency of scanning tasks, as a possible implementation method, at least one registered business scanner can be obtained from the specified container, and the business scanners with the same execution level can be divided into the same group. Each business scanner in the group can correspond to a scanning task. Thus, the business scanners in the same group are executed in parallel, thereby realizing parallel processing of scanning tasks corresponding to the business scanners in the same group, and improving the processing efficiency of scanning tasks.

[0032] Since there may be dependencies between different groups, a business scanner within a group may need the scanning results of a business scanner that has a dependency on the business scanner within the group when processing a scanning task. Therefore, in order to facilitate the acquisition of scanning results, a data context object may be initialized to store the scanning results of the business scanner.

[0033] As an example, in response to successful initialization of the environment context, the data context object is initialized; in response to successful initialization of the data context object, at least one business scanner is obtained from a specified container.

[0034] Step 103: Determine the calling order of each group according to the dependency relationship between at least one service scanner.

[0035] In order to avoid scanning task processing conflicts caused by improper execution order of business scanners, reduce unnecessary repeated processing or waiting time, and improve the rationality of scanning resource utilization and the accuracy of scanning task processing, as an example, the dependency relationship between at least one business scanner is obtained, and based on the dependency relationship, the calling order of each group is determined.

[0036] Step 104: According to the calling sequence, the service scanners in each group process the tasks to be scanned based on the environment context object in turn.

[0037] Furthermore, according to the calling sequence, the business scanners in each group process the tasks to be scanned based on the environment context object in turn, thereby achieving parallel execution of business scanners in the same group.

[0038] In summary, by grouping at least one business scanner according to the execution level, and determining the calling order of each group according to the dependency relationship between at least one business scanner, the business scanner in each group processes the scanning task based on the environment context object in turn according to the calling order. Therefore, the business scanners in the group are called in turn according to the calling order determined according to the dependency relationship between at least one business scanner, thereby avoiding scanning task processing conflicts caused by improper execution order of the business scanners, reducing unnecessary repeated processing or waiting time, improving the rationality of scanning resource utilization and the accuracy of scanning task processing, and at the same time, enabling the business scanners in the same group to process scanning tasks in parallel, thereby improving processing efficiency.

[0039] In order to clearly explain how the above embodiment processes the scanning tasks based on the environment context object in turn according to the calling order for the business scanners in each group, the present disclosure proposes another scanning task processing method.

[0040] Figure 2 It is a flowchart of the scanning task processing method shown in the second embodiment of the present disclosure.

[0041] like Figure 2 As shown, the scanning task processing method includes the following steps:

[0042] Step 201 : in response to multiple system configuration information and code versions of the target application being verified, initializing an environment context object using the multiple system configuration information and code versions.

[0043] Step 202: Acquire at least one service scanner, and group the at least one service scanner according to the execution level of the at least one service scanner to obtain at least one group.

[0044] The execution levels of the service scanners in the same group are the same.

[0045] Step 203: Determine the calling order of each group according to the dependency relationship between at least one service scanner.

[0046] Step 204: Determine the currently called group from at least one group according to the calling sequence.

[0047] As an example, the calling sequence number of each group can be determined according to the calling order, and then, the group currently called can be determined according to the current calling sequence number.

[0048] Furthermore, according to the calling sequence number of the currently called group, it can be determined whether the currently called group is the first called group.

[0049] Step 205 : in response to the calling sequence of the currently called group being the first, according to the scanning type of each service scanner in the currently called group, a task to be scanned matching each service scanner is obtained.

[0050] As a possible implementation method, based on the calling sequence number of the currently called group, it can be determined whether the currently called group is the first called group. When the currently called group is the first called group, in order to ensure that the scanner most suitable for the current scanning task is used, the scanning type of each business scanner in the currently called group is obtained, and then based on the scanning type of each business scanner in the currently called group, the task to be scanned that matches each business scanner is obtained.

[0051] As an example, the calling order of the currently called group is the first and the scanning type of a business scanner in the currently called group is class scanning, that is, the business scanner is a class scanner, and the scanning address of the business scanner is obtained from the system configuration file according to the identification information of the business scanner; if the scanning address is verified, the task to be scanned matching the business scanner is obtained according to the scanning address. It should be noted that the tasks to be scanned matching the class scanner may include but are not limited to development interface scanning, full interface scanning and persistent object (PersistenceObject, referred to as PO) scanning.

[0052] As another example, in the calling order of the currently called group, the scanning type of a service scanner in the currently called group is event scanning, that is, the service scanner is an event scanner, and the scanning task associated with the service scanner is obtained, and the scanning task associated with the service scanner is used as the task to be scanned that matches the service scanner. It should be noted that the task to be scanned that matches the event scanner may include but is not limited to database scanning, system configuration information scanning, and full-link scanning.

[0053] Step 206: Use each service scanner to process the to-be-scanned tasks that match each service scanner based on the environment context object.

[0054] Furthermore, according to the environment context object, environment information related to the task to be scanned can be obtained, and based on the environment information, the business scanner is used to process the task to be scanned that matches the business scanner. The environment information may include but is not limited to: system code, application code, environment identifier, etc.

[0055] Step 207 : In response to the calling sequence of the currently called group being non-first, for any service scanner in the currently called group, obtain the scanning result of the target service scanner in the group called last time before the currently called group.

[0056] The target service scanner has a dependency relationship with any service scanner.

[0057] As a possible implementation method, when the calling order of the currently called group is not the first, it may be necessary to rely on the scanning result of the business scanner in the previously called group. As an example, for any business scanner in the currently called group, the scanning result of the business scanner that has a dependent relationship with any scanner can be obtained.

[0058] Step 208: Acquire a to-be-scanned task matching any service scanner according to the scan type of any service scanner and the scan result of the target service scanner.

[0059] As an example, in response to the scanning type of any business scanner being a class scan, the scanning address of any business scanner is obtained from a system configuration file according to the identification information of any business scanner; at least one candidate scanning code is obtained according to the scanning address; based on the scanning result of the target business scanner, a target scanning code is determined from at least one candidate scanning code; and the target scanning code is used as a task to be scanned that matches any business scanner.

[0060] That is to say, when the calling order of the currently called group is not the first, and a business scanner in the group is a class scanner, the class scanner needs to rely on the scanning result of the business scanner of the group called last time. According to the identification information of the business scanner, a scanning address matching the identification information can be obtained from the system configuration file. After the scanning address is verified, at least one candidate scanning code can be obtained according to the scanning address. Then, combined with the scanning result of the business scanner called last time that has a dependency relationship with the business scanner (i.e., the target scanner), the scanning result of the target scanner includes a scanning condition or a scanning code. From at least one candidate scanning code, a target scanning code that meets the scanning result of the target scanner is determined, and the target scanning code is used as a task to be scanned that matches any business scanner.

[0061] As another example, when the calling order of the currently called group is not the first, and the class business scanner in the currently called group does not need to rely on the scanning result of the business scanner of the previously called group, the scanning address of any business scanner can be directly obtained from the system configuration file based on the identification information of any business scanner. After the scanning address is verified, the task to be scanned that matches the class scanner is obtained from the scanning address.

[0062] As another example, in response to the scanning type of any business scanner being event scanning, at least one scanning task associated with the scanning result of the target business scanner is obtained; and the at least one scanning task is used as a task to be scanned that matches any business scanner.

[0063] That is to say, when the calling order of the currently called group is not the first and a business scanner in the group is an event scanner, the scanning result of the business scanner in the previously called group that has a dependency relationship with the event business scanner is obtained, and at least one scanning task that has an association with the scanning result is obtained, and then the scanning task is used as the task to be scanned that matches the event scanner.

[0064] As another example, when the calling order of the currently called group is not the first, and the event business scanner in the currently called group does not need to rely on the scanning result of the business scanner of the previously called group, the scanning task associated with the event scanner can be directly obtained, and the scanning task associated with the event scanner can be used as the task to be scanned that matches the event scanner.

[0065] Step 209: Use any service scanner to process the to-be-scanned tasks that match any service scanner based on the environment context object.

[0066] Furthermore, according to the environment context object, environment information related to the task to be scanned can be obtained, and based on the environment information, a business scanner is used to process the task to be scanned that matches the business scanner.

[0067] In addition, it should be noted that in order to facilitate data query, after the call of any business scanner in the currently called group is completed, the scanning result of any business scanner is written into the data context object, and the scanning result can be queried by querying the data context object.

[0068] It should be noted that steps 205 to 206 and steps 207 to 209 are two parallel execution modes, and only one is executed during actual execution.

[0069] It should be noted that the execution process of steps 201 to 203 can be implemented in any manner in the embodiments of the present disclosure, and the embodiments of the present disclosure do not limit this and will not be described in detail.

[0070] In summary, according to the calling order of the groups and the type of business scanner in the currently called group, the tasks to be scanned that match the scanner type are determined and processed, thereby realizing automatic scheduling of scanning tasks and improving the accuracy of scanning task processing.

[0071] As an example, in order to facilitate data query, after any service scanner in the currently called group is called, the scanning result of any service scanner is written into the data context object. Therefore, after all service scanners in the currently called group are called, the quality of the scanned task can be determined according to the scanning result of the service scanner in the currently called group in the data context object. Figure 3 The embodiments are described in detail.

[0072] Figure 3 It is a flowchart of a scanning task processing method shown in the third embodiment of the present disclosure.

[0073] Based on any of the above embodiments, determining the quality of the scanned task according to the scanning result of the service scanner in the currently called group in the data context includes the following steps:

[0074] Step 301: in response to the service scanners in the currently called group all being finished calling, the scanning results of the service scanners in the currently called group are obtained from the data context object.

[0075] In order to obtain the quality of the scanned task in time, as an example, after all the service scanners in the currently called group have finished calling, the scanning results of all the service scanners in the currently called group can be obtained by querying the data context object.

[0076] As another example, after a service scanner in the currently called group is called, the scanning result of the service scanner is obtained by querying the data context object.

[0077] Step 302: Determine, according to the scanning result of the service scanner in the currently called group, the indicator value of at least one performance indicator of the scanned task corresponding to the scanning result of the service scanner in the currently called group.

[0078] Furthermore, performance statistics are performed on the scanning results of the business scanner in the currently called group to determine the indicator value of at least one performance indicator of the scanned task corresponding to the scanning results of the business scanner in the currently called group, wherein the performance indicators may include: code standardization, data security, data structure error rate, etc.

[0079] Step 303: Determine the quality of the scanned task according to the indicator value of at least one performance indicator.

[0080] As a possible implementation manner, a quality score of the scanned task is determined according to an indicator value of at least one performance indicator, and the quality of the scanned task is determined according to the quality score.

[0081] As an example, a quality score of the scanned task may be obtained by performing a weighted summation on the indicator value of at least one performance indicator.

[0082] As another example, an average value of the indicator value of at least one performance indicator is determined, and a quality score of the scanned task is determined based on the average value.

[0083] To facilitate subsequent data query, the scanning results of the business scanner of each group are stored in the database. As an example, after the business scanners of all groups are called, the scanning results of the business scanners in each group are obtained and sent to the database manager to store the scanning results of the business scanners in each group in the database.

[0084] In summary, based on the scanning results of the business scanner in the currently called group, the quality of the scanned tasks corresponding to the scanning results of the business scanner in the currently called group can be effectively determined, which helps relevant personnel to more accurately identify the bottlenecks and problems of the scanning tasks and improve the user experience.

[0085] Based on any embodiment of the present disclosure, Figure 4 As shown, taking the scanner container as an example, the execution subject of the scanning task processing method of the embodiment of the present disclosure is implemented. In actual implementation, the scanning task processing method of the embodiment of the present disclosure can also be implemented based on the following steps:

[0086] 1. Initialize the scan context object (environment context object)

[0087] Perform detailed syntax and logic verification on project configuration files, such as yml files. This process uses verification algorithms to ensure that the required configuration items meet the predetermined format requirements and business logic requirements. Through this step, the system can automatically determine the system, application, operating environment, and Git version required for the release, thereby ensuring the consistency and accuracy of the release process;

[0088] 2. Scan for launcher objects

[0089] The scan initiator object includes the start time and execution order of the scan task. After the project is started, the scan initiator object is automatically triggered, and first identifies and obtains the Spring container (specified container). Subsequently, the system sorts and groups the scanners according to the preset rules (execution level and dependency) to ensure the rationality of the execution order and data dependency; among them, in order to improve the scanning efficiency, the present disclosure adopts a concurrent execution strategy. The system enables multi-threaded concurrent execution for each group of business scanners, which reduces the overall scanning time and effectively utilizes computing resources.

[0090] 3. Data context object

[0091] Data context object, used to cache data generated during the scanning process. The data context object provides data sharing function for scanners at different levels, avoiding repeated calculation and storage of data.

[0092] 4. Scan template object

[0093] The scan template object is used to process the specific logic of different scanners. At the same time, the template object integrates common functions such as logging and performance statistics to facilitate monitoring and optimization of the scanning process. As an example, when the scanner type is a class scanner, the scan address matching the business scanner is obtained from the system configuration file, the scan address is verified, and when the scan address is verified, the task to be scanned is obtained according to the scan address; in response to the scan type of any business scanner being an event scan (i.e., an event scanner), the task to be scanned matching the event scanner can be obtained according to the scan results of the business scanner that has a dependency relationship with the business scanner.

[0094] Corresponding to the scanning task processing method provided in the above-mentioned embodiment, the present disclosure also provides a scanning task processing device. Since the scanning task processing device provided in the embodiment of the present disclosure corresponds to the scanning task processing method provided in the above-mentioned embodiment, the implementation method of the scanning task processing method is also applicable to the scanning task processing device provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.

[0095] Figure 5 It is a structural diagram of a scanning task processing device shown in the fourth embodiment of the present disclosure.

[0096] like Figure 5 As shown, the scanning task processing device 500 includes: a verification module 510 , a grouping module 520 , a determination module 530 and a processing module 540 .

[0097] Among them, the verification module 510 is used to initialize the environment context object using multiple system configuration information and code versions in response to multiple system configuration information and code versions of the target application being verified; the grouping module 520 is used to obtain at least one business scanner and group at least one business scanner according to the execution level of at least one business scanner to obtain at least one group; wherein the execution levels of the business scanners in the same group are the same; the determination module 530 is used to determine the calling order of each group according to the dependency relationship between at least one business scanner; the processing module 540 is used to process the scanning tasks of the business scanners in each group based on the environment context object in turn according to the calling order.

[0098] As a possible implementation method of the embodiment of the present disclosure, the processing module 540 is used to determine the currently called group from at least one group according to the calling order; in response to the calling order of the currently called group being the first, according to the scanning type of each business scanner in the currently called group, obtain the tasks to be scanned that match each business scanner; using each business scanner, process the tasks to be scanned that match each business scanner based on the environment context object.

[0099] As a possible implementation method of an embodiment of the present disclosure, the processing module 540 is used to obtain the scanning result of the target business scanner in the group that was called before the current call for any business scanner in the group that is currently called, in response to the calling order of the group that is currently called being non-first; wherein the target business scanner has a dependency relationship with any business scanner; according to the scanning type of any business scanner and the scanning result of the target business scanner, obtain the task to be scanned that matches any business scanner; and use any business scanner to process the task to be scanned that matches any business scanner based on the environment context object.

[0100] As a possible implementation method of the embodiment of the present disclosure, the processing module 540 is used to, in response to the scanning type of any business scanner being a class scan, obtain the scanning address of any business scanner from the system configuration file according to the identification information of any business scanner; in response to the scanning address passing the verification, obtain at least one candidate scanning code according to the scanning address; according to the scanning result of the target business scanner, determine the target scanning code from at least one candidate scanning code; and use the target scanning code as the task to be scanned that matches any business scanner.

[0101] As a possible implementation method of the embodiment of the present disclosure, the processing module 540 is also used to obtain at least one scanning task associated with the scanning result of the target business scanner in response to the scanning type of any business scanner being event scanning; and to use at least one scanning task as a task to be scanned that matches any business scanner.

[0102] As a possible implementation of the embodiment of the present disclosure, the grouping module 520 is configured to initialize a data context object in response to successful initialization of the environment context; and obtain at least one business scanner from a specified container in response to successful initialization of the data context object.

[0103] As a possible implementation of the embodiment of the present disclosure, the scanning task processing device 500 further includes: a writing module.

[0104] The writing module is used to write the scanning result of any business scanner into the data context object in response to the completion of the call of any business scanner in the currently called group; wherein the data context object is used for data query.

[0105] As a possible implementation method of the embodiment of the present disclosure, the determination module 530 is also used to obtain the scanning result of the business scanner in the currently called group from the data context object in response to the completion of the call of all business scanners in the currently called group; determine the index value of at least one performance indicator of the scanned task corresponding to the scanning result of the business scanner in the currently called group according to the scanning result of the business scanner in the currently called group; and determine the quality of the scanned task according to the index value of at least one performance indicator.

[0106] As a possible implementation of the embodiment of the present disclosure, the scanning task processing device 500 further includes: a sending module.

[0107] The sending module is used to obtain the scanning results of the business scanner in each group; and send the scanning results of the business scanner in each group to the database manager to store the scanning results of the business scanner in each group in the database.

[0108] The scanning task processing device of the embodiment of the present disclosure uses multiple system configuration information and code versions to initialize the environment context object in response to multiple system configuration information and code versions of the target application being verified; obtains at least one business scanner, and groups the at least one business scanner according to the execution level of the at least one business scanner to obtain at least one group; wherein the execution level of the business scanners in the same group is the same; determines the calling order of each group according to the dependency relationship between at least one business scanner; and processes the scanning task for the business scanner in each group based on the environment context object according to the calling order, thereby calling the business scanners in the group in turn according to the calling order determined according to the dependency relationship between at least one business scanner, thereby avoiding scanning task processing conflicts caused by improper execution order of the business scanners, reducing unnecessary repeated processing or waiting time, improving the rationality of scanning resource utilization and the accuracy of scanning task processing, and at the same time, enabling the business scanners in the same group to process scanning tasks in parallel, thereby improving processing efficiency.

[0109] In an exemplary embodiment, an electronic device is also provided.

[0110] Among them, electronic equipment includes:

[0111] processor;

[0112] a memory for storing processor-executable instructions;

[0113] The processor is configured to execute instructions to implement the scanning task processing method proposed in any of the aforementioned embodiments.

[0114] As an example, Figure 6 is a schematic diagram of the structure of an electronic device 600 shown in an exemplary embodiment of the present disclosure, such as Figure 6 As shown, the electronic device 600 may further include:

[0115] The memory 610 and the processor 620, a bus 630 connecting different components (including the memory 610 and the processor 620), the memory 610 stores a computer program, and when the processor 620 executes the program, the scanning task processing method described in the embodiment of the present disclosure is implemented.

[0116] Bus 630 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0117] The electronic device 600 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 600, including volatile and non-volatile media, removable and non-removable media.

[0118] The memory 610 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 640 and / or cache memory 650. The server 600 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 660 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 630 via one or more data medium interfaces. The memory 610 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0119] A program / utility 680 having a set (at least one) of program modules 670 may be stored, for example, in the memory 610, such program modules 670 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 670 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0120] The electronic device 600 may also communicate with one or more external devices 690 (e.g., keyboard, pointing device, display 691, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface 692. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) via a network adapter 693. As shown, the network adapter 693 communicates with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0121] The processor 620 executes various functional applications and data processing by running the programs stored in the memory 610 .

[0122] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the scanning task processing method of the embodiment of the present disclosure, and will not be repeated here.

[0123] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor of an electronic device to complete the scanning task processing method proposed in any of the above embodiments. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0124] In an exemplary embodiment, a computer program product is also provided, including a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the scanning task processing method proposed in any of the above embodiments.

[0125] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0126] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A scanning task processing method, characterized in that: include: In response to multiple system configuration information and the code version of the target application being verified, initializing the environment context object using the multiple system configuration information and the code version; Acquire at least one service scanner, and group the at least one service scanner according to the execution level of the at least one service scanner to obtain at least one group; wherein the execution levels of the service scanners in the same group are the same; Determining a calling order of each group according to a dependency relationship between the at least one service scanner; According to the calling sequence, the service scanners in each of the groups process the tasks to be scanned based on the environment context object in turn.

2. The method according to claim 1, characterized in that The processing of the scanned tasks by the service scanners in each of the groups based on the environment context object in turn according to the calling order includes: Determining a currently called group from the at least one group according to the calling sequence; In response to the calling order of the currently called group being the first, according to the scanning type of each service scanner in the currently called group, obtaining a task to be scanned that matches each service scanner; Each of the service scanners is used to process the to-be-scanned tasks that match each of the service scanners based on the environment context object.

3. The method according to claim 2, characterized in that The processing of the scanning task based on the environment context object for the service scanners in each of the groups in turn according to the calling order also includes: In response to the calling order of the currently called group being non-first, for any service scanner in the currently called group, obtaining a scanning result of a target service scanner in a group called before the currently called group; wherein the target service scanner has a dependency relationship with any service scanner; According to the scanning type of any one of the service scanners and the scanning result of the target service scanner, acquiring a task to be scanned that matches any one of the service scanners; Using any of the service scanners, based on the environment context object, a task to be scanned that matches the any of the service scanners is processed.

4. The method according to claim 3, characterized in that The acquiring, according to the scanning type of the any business scanner and the scanning result of the target business scanner, a task to be scanned that matches the any business scanner comprises: In response to the scanning type of any of the service scanners being class scanning, acquiring a scanning address of any of the service scanners from a system configuration file according to identification information of any of the service scanners; In response to the scan address being verified, obtaining at least one candidate scan code according to the scan address; Determining a target scan code from the at least one candidate scan code according to a scan result of the target service scanner; The target scanning code is used as a task to be scanned that matches any of the business scanners.

5. The method according to claim 3, characterized in that: The acquiring, according to the scanning type of any one of the service scanners and the scanning result of the target service scanner, a task to be scanned that matches any one of the service scanners, further includes: In response to the scanning type of any one of the service scanners being event scanning, acquiring at least one scanning task associated with the scanning result of the target service scanner; The at least one scanning task is used as a task to be scanned that matches any one of the business scanners.

6. The method according to claim 1, characterized in that The acquiring of at least one service scanner comprises: In response to the environment context being successfully initialized, initializing a data context object; In response to the data context object being successfully initialized, at least one service scanner is obtained from a specified container.

7. The method according to claim 6, characterized in that The method further comprises: In response to the completion of the call of any service scanner in the currently called group, writing the scanning result of any service scanner into the data context object; The data context object is used for data query.

8. The method according to claim 7, characterized in that The method further comprises: In response to the service scanners in the currently called group all being called and finished, obtaining the scanning results of the service scanners in the currently called group from the data context object; Determine, according to the scanning result of the service scanner in the currently called group, an indicator value of at least one performance indicator of the scanned task corresponding to the scanning result of the service scanner in the currently called group; The quality of the scanned task is determined according to the indicator value of the at least one performance indicator.

9. The method according to claim 1, characterized in that: After scanning the code to be scanned based on the environment context object by the service scanners in each of the groups in turn according to the calling order, the method further includes: Obtaining scanning results of the service scanners in each of the groups; The scanning results of the service scanners in each of the groups are sent to the database manager, so that the scanning results of the service scanners in each of the groups are stored in the database.

10. A scanning task processing device, characterized in that: include: A verification module, configured to initialize an environment context object using the multiple system configuration information and the code version of the target application in response to the multiple system configuration information and the code version being verified; A grouping module, used to obtain at least one service scanner, and group the at least one service scanner according to the execution level of the at least one service scanner to obtain at least one group; wherein the execution level of the service scanners in the same group is the same; A determination module, configured to determine a calling order of each group according to a dependency relationship between the at least one service scanner; The processing module is used to process the tasks to be scanned based on the environment context object in turn for the service scanners in each of the groups according to the calling sequence.

Citation Information

Cited By

  • Code scanning method and device, storage medium and electronic equipment

    CN119166160A