An adaptive orchestration and isolated execution method and related equipment for software analysis tasks in power monitoring stations.
By constructing a directed dependency graph and a constrained execution environment, the software analysis tasks of power monitoring stations are adaptively selected, solving the problems of resource waste and duplicate execution, and realizing adaptive adjustment of analysis tasks and full traceability.
Patent Information
- Application Number
- CN202611310802.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, the fixed pipeline of software analysis tasks in power monitoring stations fails to effectively utilize intermediate evidence, resulting in resource waste and repeated execution, and lacks full traceability.
By constructing a directed dependency graph between evidence objects and analysis tasks, calculating marginal utility, adaptively selecting tasks and executing them in a constrained execution environment, and generating execution credentials to achieve full traceability.
It enables adaptive adjustment of power monitoring station software analysis tasks, avoids resource waste, ensures the integrity and traceability of analysis conclusions, and adapts to station environments with frequent version updates.
Smart Images

Figure CN123116286A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software security analysis technology, and in particular to an adaptive orchestration and isolated execution method and related equipment for software analysis tasks in power monitoring stations. Background Technology
[0002] In related technologies, the relevant software platforms employ a fixed pipeline: after a sample enters, all tools are executed sequentially, or the analysis task is manually selected by personnel. This fixed pipeline does not consider whether intermediate evidence is sufficient. For example, continuing to execute tasks dependent on complete call relationships after structural recovery fails will only produce empty results; once the source of a component has been confirmed by strong evidence, running multiple similar identifiers will repeatedly consume resources.
[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention
[0004] The main objective of this application is to propose an adaptive orchestration and isolated execution method and related equipment for software analysis tasks in power monitoring stations, so as to realize adaptive adjustment and full traceability of software analysis tasks.
[0005] To achieve the above objectives, one aspect of this application proposes an adaptive orchestration and isolated execution method for software analysis tasks in power monitoring stations, the method comprising the following steps: Obtain the available resources and site policies of the current analysis node to form environmental constraints; All types of information generated during the analysis process are uniformly represented as evidence objects with status tags, thus obtaining an evidence set; Each analysis task is defined according to a preset task template. Based on the state of the evidence objects in the evidence set and the environmental constraints, the execution readiness of each analysis task is determined, and a directed dependency graph between the evidence objects and the analysis tasks is constructed. For the analysis task in the directed dependency graph, the marginal utility is calculated based on the state of the evidence set; Based on the environmental constraints and the marginal utility, select the task composition of the current execution batch and determine the amount of resources allocated to each task; Based on the site strategy and resource quantity in the environmental constraints, a restricted execution environment is constructed for each selected analysis task. The sample to be analyzed and the evidence objects in the evidence set are connected to the restricted execution environment. After execution, the entire process record is encapsulated as an execution certificate. The state of the evidence object is refreshed according to the execution credentials. When a sample change is detected, the set of tasks that need to be re-executed is determined, and the unaffected execution credentials are reused to obtain input for subsequent orchestration cycles.
[0006] In some embodiments, obtaining the available resources and site policies of the current analysis node to form environmental constraints includes: The content summary of the sample to be analyzed is used as the sample summary; the sample summary records the software name, software version, file set, processor architecture, source site, sensitivity level and allowed analysis period of the sample; Collect available resource information for the current analysis node; the available resource information includes the number of processor cores, available memory size, storage space capacity, acceleration device type, and isolation capability level; Read the site policy; the site policy includes whether dynamic execution is allowed, whether network access is prohibited, the maximum execution time of a single task, and whether samples are allowed to be scheduled across nodes; The sample summary, the available resource information, and the site strategy are combined into environmental constraints.
[0007] In some embodiments, the step of uniformly representing various types of information generated during the analysis process as evidence objects with status markers to obtain an evidence set includes: The samples and the output information generated after each analysis task is completed are all regarded as evidence objects; the evidence objects include evidence type, evidence value, source task identifier, input evidence number on which they are based, program segment identifier, evidence generation timestamp, evidence confidence level, and evidence status marker; the evidence status marker includes confirmed status, pending confirmation status, conflicting status, and invalid status. For evidence objects that originate from different tasks but have contradictory content, retain their complete evidence records and establish conflict relationship markers between the evidence objects; All the evidence objects are managed in a unified manner in the form of an evidence set, and the evidence set is retrieved and filtered according to the source task identifier, evidence type or evidence status mark.
[0008] In some embodiments, the step of defining each analysis task according to a preset task template, determining the execution readiness of each analysis task based on the state of the evidence objects in the evidence set and the environmental constraints, and constructing a directed dependency graph between the evidence objects and the analysis tasks includes: A task template is established for each type of analysis capability in the software platform. The task template includes the types of prerequisite evidence and default evidence types required for the analysis task, the confidence threshold that the prerequisite evidence must meet, the types of evidence that the analysis task can output, the range of processor architectures that the analysis task is adapted to, the minimum amount of resources required to execute the analysis task, the concurrency relationship between the analysis task and other analysis tasks, the fallback task identifier that can be called when the analysis task fails, and the security execution level required by the analysis task. Based on the evidence status marker and evidence confidence level of each evidence object in the current evidence set, and combined with the processor architecture and sample sensitivity level in the environmental constraints, it is determined one by one whether all the necessary preliminary evidence for each analysis task exists in the evidence set and the confidence level is not lower than the confidence level threshold. If so, the analysis task is marked as executable. Using the evidence objects in the current evidence set as the starting node, the analysis tasks marked as executable as the intermediate nodes, and the evidence objects expected to be output after the completion of each analysis task as the ending node, a directed dependency graph is constructed according to the causal relationship of evidence objects being supplied to analysis tasks for consumption after their generation and new evidence objects being generated after the completion of analysis tasks.
[0009] In some embodiments, the step of calculating marginal utility based on the state of the evidence set for the analysis task in the directed dependency graph includes: Each analysis task marked as executable in the directed dependency graph is selected as a candidate task. For each candidate task, based on the similarity of the same processor architecture, the same sample file type, and the evidence state used when entering the executable state in the historical execution records, the expected execution time, the expected peak memory usage, and the failure probability of the candidate task are obtained. For each candidate task, based on the total number of existing evidence objects in the current evidence set, the confidence level of each evidence object, and the conflict relationship between each evidence object, the expected reduction in uncertainty in the current evidence set by the newly added evidence objects after the completion of the candidate task is calculated, which is taken as the uncertainty reduction benefit. Based on the expected execution time, the expected peak memory usage, and the failure probability of the candidate task, calculate the execution time cost, memory consumption cost, and failure risk cost of the candidate task. The marginal utility of the candidate task is calculated based on the uncertainty reduction benefit, the execution time cost, the memory consumption cost, and the failure risk cost.
[0010] In some embodiments, selecting the task composition of the current execution batch and determining the amount of resources allocated to each task based on the environmental constraints and the marginal utility includes: The upper limit of processor cores, the upper limit of available memory, the upper limit of acceleration device resources, the upper limit of sample sensitivity level, and the end point of the allowed analysis period in the environmental constraints are used as resource constraint boundaries. The preceding dependencies between the analysis tasks in the directed dependency graph are used as the temporal constraint boundaries. Using the concurrency relationships recorded in the task template as parallel constraint boundaries, multiple analysis tasks with concurrency relationships are allowed to be scheduled into the same execution batch for parallel execution. Concurrency conflict flags are set between analysis tasks that do not have concurrency relationships recorded in the task template and depend on the same large sample file, prohibiting them from being scheduled into the same execution batch. Using marginal utility as the basis for returns, and under the premise of satisfying the resource constraint boundary, the timing constraint boundary, and the parallel constraint boundary, with the goal of maximizing the sum of the marginal utility of all selected analysis tasks in the execution batch and the marginal returns of their respective allocated resource amounts, and minimizing the concurrency conflict loss, the task composition of the current execution batch is selected from the candidate tasks, and resource amounts are allocated to each selected analysis task.
[0011] In some embodiments, the step of constructing restricted execution environments for each selected analysis task based on the site strategy and resource quantity in the environmental constraints, connecting the sample to be analyzed and the evidence objects in the evidence set to the restricted execution environment, and encapsulating the entire process record into an execution credential after execution includes: For each selected analysis task in the execution batch, a separate, one-time isolation sandbox is created as the restricted execution environment; Configure network access permissions for the restricted execution environment according to the site policy in the environmental constraints. When the site policy prohibits network access, all external network connections are prohibited in the restricted execution environment. Based on the resource quantity, configure the resource consumption limit for the restricted execution environment; the resource consumption limit includes the upper limit of the number of processor cores, the upper limit of available memory, the upper limit of the number of file handles, the upper limit of disk write volume, and the upper limit of execution time; The sample to be analyzed is mounted to the restricted execution environment in read-only mode; The prerequisite evidence objects required for the analysis task in the evidence set are mounted to the restricted execution environment in read-only mode. After verifying that the digital signature or hash digest of the analysis tool invoked by the analysis task is consistent with the information registered in the software platform, the analysis tool is loaded and executed in the restricted execution environment. Perform integrity verification on the output data in the temporary storage area, and submit the output data to the evidence set after the verification passes. The input summary of the analysis task, the number of the prior evidence object used, the digital signature or summary of the analysis tool invoked, the execution parameters of the analysis tool, the amount of resources, the execution start timestamp, the execution end timestamp, the complete log generated during execution, the original output of the analysis tool, the structured evidence extracted from the original output, the exit status of the analysis tool, and the integrity verification value are collectively encapsulated into an immutable evidence package, which serves as the execution credential for the analysis task.
[0012] In some embodiments, the step of refreshing the state of the evidence object based on the execution credentials, determining the set of tasks that need to be re-executed when a sample change is detected, reusing the unaffected execution credentials, and obtaining input for subsequent orchestration cycles includes: The structured evidence contained in the execution certificate is added to the evidence set as a new evidence object, and the status of the evidence object is refreshed according to the execution status in the execution certificate. When the execution status in the execution certificate is "execution successful", the evidence status of the newly added evidence object is marked as "confirmed". When the newly added evidence object contradicts the content of existing evidence objects in the evidence set, the evidence status of the existing evidence object is marked as conflicting, and the evidence confidence of the existing evidence object is reduced. The analysis task that can output new evidence that resolves conflicts is found based on the directed dependency graph. The found analysis task is marked as pending execution and included in the execution batch. When the execution status in the execution certificate is execution failure, update the failure probability of the analysis task under the same processor architecture and the same sample file type according to the failure type. When the deviation between the actual resource consumption in the execution certificate and the preset expected resource consumption exceeds the preset deviation threshold, the expected execution time and expected memory peak of the analysis task under the same processor architecture and the same sample file type are corrected. When a local change is detected in the sample to be analyzed, the changed sample is compared with the sample before the change to obtain a set of changed fragments; Starting from the evidence object that references any change fragment in the set of change fragments in the directed dependency graph, trace backward along the directed dependency graph to the upstream analysis task that generated the evidence object, and then propagate the failure effect forward along the directed dependency graph to calculate the failure intensity of each evidence object in the directed dependency graph. Evidence objects whose failure intensity exceeds a preset failure threshold are marked as failed, and the remaining evidence objects are marked as reusable. Based on the direct source analysis task of the evidence objects marked as invalid, the minimum set of tasks that can regenerate all the invalid evidence objects is determined in reverse along the directed dependency graph, and all the preceding analysis tasks required by each analysis task in the minimum set of tasks are added. Execute the analysis tasks in the minimum task set, and reuse all evidence objects marked as reusable and the execution credentials; Preserve the comparison relationship between the evidence objects in the evidence set before the change and the evidence set after the change; The updated evidence set, the execution results of the minimum task set, and the evidence object comparison relationship are used as inputs for subsequent orchestration cycles.
[0013] To achieve the above objectives, another aspect of this application proposes an adaptive orchestration and isolated execution system for software analysis tasks in power monitoring stations, used to implement the method described above. The system includes: The environmental constraint acquisition module is used to acquire the available resources and site policies of the current analysis node and form environmental constraint conditions. The evidence management module is used to uniformly represent various types of information generated during the analysis process as evidence objects with status markers, thus obtaining an evidence set; The task orchestration module is used to define each analysis task according to a preset task template, determine the execution readiness of each analysis task based on the state of the evidence objects in the evidence set and the environmental constraints, and construct a directed dependency graph between the evidence objects and the analysis tasks. The utility evaluation module is used to calculate the marginal utility for the analysis task in the directed dependency graph based on the state of the evidence set. The batch generation module is used to select the task composition of the current execution batch and determine the amount of resources allocated to each task based on the environmental constraints and the marginal utility. The isolated execution module is used to construct restricted execution environments for each selected analysis task according to the site strategy and resource quantity in the environmental constraints, connect the sample to be analyzed and the evidence objects in the evidence set to the restricted execution environment, and encapsulate the entire process record into an execution certificate after execution. The state update and incremental reuse module is used to refresh the state of the evidence object based on the execution credential. When a sample change is detected, the module determines the set of tasks that need to be re-executed, reuses the unaffected execution credential, and obtains the input for subsequent orchestration cycles.
[0014] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0015] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.
[0016] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method.
[0017] The embodiments of this application include at least the following beneficial effects: This application provides a method, system, electronic device, storage medium, and program product for adaptive orchestration and isolated execution of software analysis tasks for power monitoring stations. The solution includes: acquiring the available resources and station policies of the current analysis node to form environmental constraints; uniformly representing various types of information generated during the analysis process as evidence objects with state tags to obtain an evidence set; constructing a directed dependency graph between the evidence objects and analysis tasks; calculating the marginal utility of the analysis tasks in the directed dependency graph based on the state of the evidence set; selecting the task composition of the current execution batch and determining the resource allocation for each task; according to the station policies and resource allocation in the environmental constraints, connecting the sample to be analyzed and the evidence objects in the evidence set to the restricted execution environment, and encapsulating the entire process record as an execution credential after execution; obtaining input for subsequent orchestration cycles. This application achieves adaptive adjustment and full traceability of software analysis tasks. Attached Figure Description
[0018] Figure 1 This is a flowchart of a method for adaptive orchestration and isolated execution of software analysis tasks for power monitoring stations, provided in an embodiment of this application. Figure 2 This is an overall flowchart of adaptive orchestration of site software vulnerability mining tasks provided in the embodiments of this application; Figure 3 This is a schematic diagram of the evidence state-task dependency graph and adaptive selection relationship provided in the embodiments of this application; Figure 4 This is a schematic diagram illustrating isolated execution, evidence encapsulation, and incremental reuse after software version changes, provided in the embodiments of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0021] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.
[0022] 1) Power monitoring stations refer to physical locations for real-time monitoring, control, and data collection of the power system's operating status, such as power plants, substations, and distribution rooms; 2) Adaptive orchestration refers to the system's ability to dynamically and autonomously determine which vulnerability analysis tasks should be executed next, in what order, and how many resources should be allocated, based on the current evidence status (what analysis results have been obtained), resource constraints (CPU / memory / duration), and site policies (whether network access is allowed, sensitivity level, etc.). It also automatically adjusts subsequent decisions based on feedback after task execution. 3) Cost model, a set of parameter estimation methods used to predict how much resources a task will consume and how much risk of failure it will have during execution, including three core parameters: expected execution time, expected peak memory usage, and failure probability.
[0023] This application takes into account the large number of software programs used in power monitoring master stations and substations, and the inconsistent delivery formats, including executable files and dynamic link libraries, as well as offline upgrade packages and vendor-customized components. Vulnerability discovery platforms are typically configured with multiple analysis capabilities, such as decompilation, program structure recovery, rule retrieval, supply chain identification, model interpretation, and dynamic verification. These capabilities have pre-dependencies and different requirements regarding processor architecture, memory, execution time, network conditions, and sample sensitivity levels.
[0024] Existing platforms mostly employ fixed pipelines: once a sample enters, all tools are executed sequentially, or personnel manually select analysis tasks. Fixed pipelines do not consider whether intermediate evidence is sufficient. For example, continuing to execute tasks dependent on complete call relationships after structural recovery fails will only produce empty results; once the source of a component has been confirmed by strong evidence, running multiple similar identifiers will repeatedly consume resources. Manual methods, on the other hand, rely on operator experience, making it difficult to maintain consistency across multiple sites and numerous version updates.
[0025] Power monitoring stations also face constraints such as lack of internet connectivity, limited analysis timeframes, limited computing resources, and the requirement for samples to be stored locally. Some analysis tools execute untrusted target files or parse malformed input; if run directly in the platform's main process, this could compromise the security of the analysis node itself. While conventional containers can isolate processes, they do not store task inputs, tool versions, parameters, resource limitations, and output evidence as a verifiable whole, making it difficult to determine which execution led to a particular conclusion.
[0026] Furthermore, the same software application frequently releases minor versions. Existing platforms typically rerun the entire process for each new version, failing to utilize analytical evidence from unchanged code snippets in older versions; or they directly reuse historical results without assessing whether upstream changes would invalidate the results based on the source of evidence. The former wastes on-site computing resources, while the latter may reuse conclusions that are no longer valid.
[0027] In view of this, this application provides a method and related equipment for adaptive orchestration and isolated execution of software analysis tasks for power monitoring stations. This solution protects the technical mechanisms in a multi-engine platform for "how to select the next task, how to allocate resources, how to isolate and execute tasks, how to encapsulate evidence, and which tasks need to be rerun after version changes".
[0028] Figure 1 This is an optional flowchart of a software analysis task adaptive orchestration and isolated execution method for power monitoring stations provided in this application embodiment. Figure 1 The method may include, but is not limited to, steps S101 to S107.
[0029] Step S101: Obtain the available resources and site policies of the current analysis node to form environmental constraints; Step S102: All types of information generated during the analysis process are uniformly represented as evidence objects with status tags to obtain the evidence set; Step S103: Define each analysis task according to the preset task template, determine the execution readiness of each analysis task based on the state of the evidence objects in the evidence set and the environmental constraints, and construct a directed dependency graph between the evidence objects and the analysis tasks. Step S104: For the analysis task in the directed dependency graph, the marginal utility is calculated based on the state of the evidence set. Step S105: Based on environmental constraints and marginal utility, select the task composition of the current execution batch and determine the amount of resources allocated to each task. Step S106: Based on the site strategy and resource quantity in the environmental constraints, construct a restricted execution environment for each selected analysis task, connect the sample to be analyzed and the evidence objects in the evidence set to the restricted execution environment, and encapsulate the entire process record into an execution certificate after execution. Step S107: Refresh the status of the evidence object according to the execution voucher. When a sample change is detected, determine the set of tasks that need to be re-executed, reuse the unaffected execution voucher, and obtain the input for subsequent orchestration cycles.
[0030] Steps S101 to S107 of this application embodiment achieve adaptive scheduling and secure execution of power monitoring station vulnerability analysis tasks by constructing an orchestration mechanism of "evidence-driven + constraint-aware + closed-loop feedback": First, by acquiring available resources and station policies to form environmental constraints, it ensures that all subsequent decisions operate within the actual resource limits and security policy boundaries; Second, the intermediate analysis results are uniformly modeled as evidence objects with state and confidence, and a directed dependency graph is used to depict the causal chain between evidence and tasks, so that tasks are only judged as executable when the necessary prior evidence is complete and the environment is suitable, avoiding the waste of resources caused by blindly executing invalid tasks in a fixed pipeline; On this basis, by calculating marginal utility (combining information gain and execution cost) and using this as the basis for benefit, the execution batch and resources are optimized and selected under multiple constraints such as processor, memory, duration, and concurrency conflicts. Quotas prioritize the allocation of limited computing resources to tasks with high information value, low cost, and no conflicts, while resource saturation functions prevent single tasks from monopolizing resources. During execution, a one-time isolation sandbox is built for each task, with input mounted in read-only mode, unauthorized access prohibited, and resource limits imposed. After execution, the entire process record is encapsulated as an immutable execution credential, thus allowing for the processing of untrusted samples while enabling complete traceability and verification of analysis conclusions. Finally, the evidence confidence and conflict status are updated based on the execution credential feedback, and the failure intensity is propagated along the dependency graph when the sample version changes. Only a very small set of affected tasks is rerun, and the remaining evidence and credentials are reused. This significantly reduces redundant calculations during version iterations without sacrificing accuracy, enabling the entire vulnerability discovery process to operate adaptively and continuously efficiently under the actual conditions of limited resources, security sensitivity, and frequent version updates in power monitoring stations.
[0031] In some embodiments, step S101 may include, but is not limited to, steps S111 to S114: Step S111: Calculate a content summary of the sample to be analyzed as a sample summary; the sample summary records the software name, software version, file set, processor architecture, source site, sensitivity level, and allowed analysis period of the sample; Step S112: Collect available resource information of the current analysis node; available resource information includes the number of processor cores, available memory size, storage space capacity, acceleration device type, and isolation capability level; Step S113: Read the site policy; the site policy includes whether dynamic execution is allowed, whether network access is prohibited, the maximum execution time of a single task, and whether cross-node scheduling of samples is allowed. Step S114: Combine the sample summary, available resource information, and site strategy into environmental constraints.
[0032] In steps S111 to S114 of some embodiments, by obtaining the available resources (number of processor cores, available memory, storage space, acceleration device type, isolation capability level) and site policies (whether dynamic execution is allowed, whether network access is prohibited, maximum execution time for a single task, and whether samples are allowed to be scheduled across nodes) of the current analysis node, and combining the sample summary (software name, version, file set, processor architecture, source site, sensitivity level, and allowed analysis period) into environmental constraints, the orchestration decision is precisely bound to the real physical environment. This embodiment ensures that all subsequent task selection, benefit evaluation, and resource allocation operate within clearly defined resource limits and security boundaries, avoiding task failures due to resource over-provisioning or performance bottlenecks due to resource under-provisioning.
[0033] In some embodiments, step S102 may include, but is not limited to, steps S201 to S203: Step S201: The sample and the output information generated after each analysis task is completed are all regarded as evidence objects; the evidence objects include evidence type, evidence value, source task identifier, input evidence number on which they are based, program segment identifier, evidence generation timestamp, evidence confidence level, and evidence status marker; the evidence status marker includes confirmed status, pending confirmation status, conflict status, and invalid status. Step S202: For evidence objects that come from different tasks but have contradictory content, retain their complete evidence records and establish conflict relationship markers between evidence objects; Step S203: All evidence objects are managed in a unified manner in the form of evidence sets, and the evidence sets are searched and filtered according to the source task identifier, evidence type or evidence status mark.
[0034] In steps S201 to S203 of some embodiments, the output information generated by the samples and each analysis task is uniformly represented as evidence objects containing evidence type, evidence value, source task identifier, input evidence number, program segment identifier, timestamp, confidence level, and status marker. All evidence objects are managed uniformly in the form of an evidence set, achieving structured, traceable, and evolving management of the analysis process information. This application's embodiments distinguish reliable evidence from evidence to be verified through a confidence level mechanism, track the lifecycle status of evidence through status markers (confirmed, pending confirmation, conflicting, invalid), and establish causal chains between evidence through source task identifiers and input evidence numbers, providing a unified data foundation for subsequent task dependency judgment, marginal utility calculation, and failure propagation.
[0035] In some embodiments, step S103 may include, but is not limited to, steps S301 to S303: Step S301: Establish task templates for each type of analysis capability in the software platform. The task templates include the types of prerequisite evidence and default evidence required for the analysis task, the confidence threshold that the prerequisite evidence must meet, the types of evidence that the analysis task can output, the range of processor architectures that the analysis task is adapted to, the minimum amount of resources required to execute the analysis task, the concurrency relationship between the analysis task and other analysis tasks, the fallback task identifier that can be called when the analysis task fails, and the security execution level required by the analysis task. Step S302: Based on the evidence status markers and evidence confidence levels of each evidence object in the current evidence set, and combined with the processor architecture and sample sensitivity level in the environmental constraints, determine one by one whether all the necessary preliminary evidence for each analysis task exists in the evidence set and whether the confidence level is not lower than the confidence level threshold. If so, mark the analysis task as executable. Step S303: Using the evidence objects in the current evidence set as the starting node, the analysis tasks marked as executable as the intermediate nodes, and the evidence objects expected to be output after the completion of each analysis task as the ending node, construct a directed dependency graph according to the causal relationship of evidence objects being supplied to analysis tasks after their generation and new evidence objects being generated after the completion of analysis tasks.
[0036] In steps S301 to S303 of some embodiments, a task template is established for each type of analysis capability, including the type of prerequisite evidence, the type of optional evidence, the confidence threshold, the type of output evidence, the architecture adaptation range, the minimum resources, the concurrent relationship, the rollback task, and the security execution level. Based on the current evidence state and environmental constraints, it is determined whether the task meets the execution conditions, and a directed dependency graph between the evidence object and the analysis task is constructed. This achieves accurate determination of task execution conditions and topological organization of the execution order. In this embodiment, only tasks with all necessary prerequisite evidence present and a confidence level not lower than the threshold are marked as executable, avoiding the waste of computing resources caused by executing invalid tasks due to unmet prerequisite conditions. At the same time, the optional evidence mechanism allows tasks to still be executed when some non-critical evidence is missing, improving the flexibility of orchestration. The directed dependency graph organizes task nodes according to causal relationships, so that subsequent batch generation can strictly follow the order of evidence generation.
[0037] In some embodiments, step S104 may include, but is not limited to, steps S401 to S405: Step S401: Select each analysis task marked as executable in the directed dependency graph as a candidate task. Step S402: For each candidate task, based on the similarity of the same processor architecture, the same sample file type, and the evidence state used when entering the executable state in the historical execution records, obtain the expected execution time, the expected peak memory usage, and the failure probability of the candidate task. Step S403: For each candidate task, based on the total number of existing evidence objects in the current evidence set, the confidence level of each evidence object, and the conflict relationship between each evidence object, calculate the amount of uncertainty reduction in the current evidence set that is expected to be reduced by the newly added evidence objects after the candidate task is completed, as the uncertainty reduction benefit. Step S404: Calculate the execution time cost, memory consumption cost, and failure risk cost of the candidate task based on its expected execution time, expected peak memory usage, and failure probability. Step S405: Calculate the marginal utility of the candidate task based on the uncertainty reduction benefit, execution time cost, memory consumption cost, and failure risk cost.
[0038] In steps S401 to S405 of some embodiments, the expected execution time, expected peak memory usage, and failure probability of candidate tasks are obtained based on historical execution records. Uncertainty reduction benefits are calculated based on the total number of existing evidence objects in the current evidence set, the confidence level of each evidence object, and the conflict relationships between evidence objects. Finally, the marginal utility is calculated by comprehensively considering the execution time cost, memory consumption cost, and failure risk cost, thus achieving a quantitative assessment of the task execution value. This application embodiment quantifies the "information value" and "execution cost" of a task into marginal utility, enabling the system to scientifically prioritize multiple executable tasks—tasks with high uncertainty, low evidence coverage, and numerous conflicts receive higher utility, while tasks with long execution times, large memory usage, and high failure rates have correspondingly lower utility, thereby ensuring that subsequent batches prioritize the task with the highest overall benefit.
[0039] In some embodiments, step S105 may include, but is not limited to, steps S501 to S504: Step S501: The upper limit of processor core count, upper limit of available memory, upper limit of acceleration device resources, upper limit of sample sensitivity level, and the end point of allowed analysis period in the environmental constraints are used as resource constraint boundaries. Step S502: Use the prior dependencies between each analysis task in the directed dependency graph as the temporal constraint boundary; Step S503: Using the concurrency relationships recorded in the task template as parallel constraint boundaries, multiple analysis tasks with concurrency relationships are allowed to be scheduled into the same execution batch for parallel execution. Concurrency conflict flags are set between analysis tasks that do not have concurrency relationships recorded in the task template and depend on the same large sample file, and they are prohibited from being scheduled into the same execution batch. Step S504: Using marginal utility as the basis for returns, and under the premise of satisfying resource constraint boundaries, timing constraint boundaries, and parallel constraint boundaries, with the goal of maximizing the sum of the marginal utility of all selected analysis tasks in the execution batch and the marginal returns of their respective allocated resource amounts, and minimizing concurrency conflict losses, the task composition of the current execution batch is selected from the candidate tasks, and resource amounts are allocated to each selected analysis task.
[0040] In steps S501 to S504 of some embodiments, by using the number of processor cores, available memory, acceleration devices, sample sensitivity level, and the allowed analysis period endpoint as resource constraint boundaries, the preceding dependencies in the directed dependency graph as temporal constraint boundaries, and the concurrent relationships in the task template as parallel constraint boundaries, and using marginal utility as the benefit basis, the execution batch is selected and resources are allocated to each task with the goal of maximizing the sum of marginal utility and resource marginal benefits and minimizing concurrency conflict losses, under the premise of satisfying all constraints. This achieves the optimal task combination and resource allocation under limited resource conditions. The embodiments of this application prevent a single task from consuming resources indefinitely through a resource saturation function, prohibit tasks that read the same large sample and compete for disk space from being included in the same batch due to concurrency conflicts, and improve execution efficiency by setting batch affinity for tasks that can share read-only intermediate results. Finally, under multiple constraints, an execution batch scheme that balances maximizing benefits and minimizing conflicts is generated.
[0041] In some embodiments, step S106 may include, but is not limited to, steps S601 to S608: Step S601: Create an independent, one-time isolation sandbox as a restricted execution environment for each selected analysis task in the batch. Step S602: Configure network access permissions for the restricted execution environment according to the site policy in the environmental constraints. When the site policy prohibits network access, all external network connections are prohibited in the restricted execution environment. Step S603: Configure the resource consumption limit of the restricted execution environment according to the amount of resources; the resource consumption limit includes the upper limit of the number of processor cores, the upper limit of available memory, the upper limit of the number of file handles, the upper limit of disk write volume, and the upper limit of execution time. Step S604: Mount the sample to be analyzed to the restricted execution environment in read-only mode; Step S605: Mount the prerequisite evidence objects required for the analysis task in the evidence set to the restricted execution environment in read-only mode; Step S606: After verifying that the digital signature or hash digest of the analysis tool called by the analysis task is consistent with the information registered in the software platform, the analysis tool is loaded and executed in the restricted execution environment. Step S607: Perform integrity verification on the output data in the temporary storage area. After the verification is successful, submit the output data to the evidence set. Step S608: The input summary of the analysis task, the number of the prior evidence object used, the digital signature or summary of the analysis tool called, the execution parameters of the analysis tool, the amount of resources, the execution start timestamp, the execution end timestamp, the complete log generated during execution, the original output of the analysis tool, the structured evidence extracted from the original output, the exit status of the analysis tool, and the integrity verification value are encapsulated together into an immutable evidence package, which serves as the execution credential for the analysis task.
[0042] In steps S601 to S608 of some embodiments, an independent one-time isolation sandbox is created for each selected analysis task. Network access permissions are configured according to the site policy. The number of processor cores, available memory, file handles, disk write volume, and execution time limit are configured according to the resource volume. The sample and prior evidence are mounted in read-only mode, and loading and execution are only allowed after the verification tool signature is consistent with the registration information. After execution, the input summary, evidence number, tool signature, parameters, resource volume, timestamp, complete log, original output, structured evidence, exit status, and integrity verification value are encapsulated into an immutable evidence package, realizing the secure execution of untrusted samples and the complete traceability of analysis conclusions. The one-time sandbox isolation in this application ensures that malicious samples or vulnerable tools cannot affect the host machine and other tasks, resource limits prevent a single task from exhausting the station's resources, read-only mounting prevents existing evidence from being tampered with, tool signature verification ensures that only registered security tools are allowed to execute, and the immutable evidence package enables the formation process of analysis conclusions (who, when, what tools, what parameters were added, what was input, and what was output) to be fully reviewed and audited, thus solving the dual requirements of power monitoring stations for security and traceability.
[0043] In some embodiments, step S107 may include, but is not limited to, steps S701 to S70D: Step S701: Add the structured evidence contained in the execution certificate as a new evidence object to the evidence set, and refresh the status of the evidence object according to the execution status in the execution certificate; Step S702: When the execution status in the execution certificate is "execution successful", mark the evidence status of the newly added evidence object as "confirmed". Step S703: When the content of the newly added evidence object contradicts that of the existing evidence object in the evidence set, the evidence status of the existing evidence object is marked as conflicting, and the evidence confidence of the existing evidence object is reduced. Step S704: Based on the directed dependency graph, find the analysis task that can output new evidence that can resolve conflicts, mark the found analysis task as pending execution, and include it in the execution batch; Step S705: When the execution status in the execution certificate is execution failure, update the failure probability of the analysis task under the same processor architecture and the same sample file type according to the failure type. Step S706: When the deviation between the actual resource consumption in the execution certificate and the preset expected resource consumption exceeds the preset deviation threshold, correct the expected execution time and expected memory peak of the analysis task under the same processor architecture and the same sample file type. Step S707: When a local change is detected in the sample to be analyzed, the changed sample is compared with the sample before the change to obtain a set of changed fragments; Step S708: Starting from the evidence object that references any change fragment in the set of change fragments in the directed dependency graph, trace backward along the directed dependency graph to the upstream analysis task that generated the evidence object, and then propagate the failure effect forward along the directed dependency graph to calculate the failure intensity of each evidence object in the directed dependency graph. Step S709: Mark evidence objects whose failure intensity exceeds a preset failure threshold as failed, and mark the remaining evidence objects as reusable. Step S70A: Based on the direct source analysis task of the evidence objects marked as in failure, determine the minimum task set that can regenerate all in failure evidence objects by going backward along the directed dependency graph, and add all the preceding analysis tasks required by each analysis task in the minimum task set. Step S70B: Execute the analysis tasks in the minimum task set and reuse all evidence objects and execution credentials marked as reusable. Step S70C: Save the evidence object comparison relationship between the evidence set before the change and the evidence set after the change; Step S70D uses the updated evidence set, the execution results of the minimum task set, and the evidence object comparison relationship as inputs for subsequent orchestration cycles.
[0044] In steps S701 to S70D of some embodiments, the structured evidence in the execution credential is added to the evidence set, and the status of the evidence object is refreshed according to the execution status (marked as confirmed when successful, and the confidence of the original evidence is reduced and the resolution task is activated when there is a conflict). The failure probability is updated by failure type, the expected duration and memory peak are corrected by actual consumption deviation, and the failure intensity is propagated along the directed dependency graph when a sample change is detected. Failed evidence is marked as failed, the minimum task set that can regenerate all failed evidence is determined in reverse, only the minimum task set is executed and the unfailed evidence and execution credential are reused, and the comparison relationship between the old and new versions of evidence is saved. This achieves closed-loop iterative learning of the orchestration system and accurate incremental reuse after version changes. The execution feedback real-time correction cost model in the embodiments of this application makes subsequent orchestration increasingly accurate; the conflict resolution mechanism automatically activates new tasks that can resolve evidence contradictions, forming a self-correcting closed loop; the incremental reuse mechanism only reruns a very small number of affected tasks when the software is updated to a minor version, reducing redundant calculations.
[0045] The technical problems solved by the embodiments of this application include: The first technical problem this invention aims to solve is that different analysis tasks have prerequisite evidence dependencies, architectural adaptation conditions, and resource constraints, and a fixed pipeline cannot skip invalid tasks or perform necessary tasks based on the current evidence state. Therefore, it is necessary to construct an evidence state-task dependency graph and determine whether a task is executable based on this graph.
[0046] The second technical problem this invention aims to solve is that multiple executable tasks may exist simultaneously, but their expected evidence gain, ability to reduce current uncertainty, computational cost, and failure risk differ. It is necessary to select execution batches and resource quotas under constraints of the total site budget, task deadlines, and concurrency conflicts.
[0047] The third technical problem this invention aims to solve is that the analysis tool needs to handle untrusted samples, and its execution process must be verifiable. This requires creating a one-time isolated environment for each task and saving the input summary, tool signature, parameters, resource limits, logs, and output in an immutable evidence package.
[0048] The fourth technical problem this invention aims to solve is that when a new version only changes a portion of the code, it cannot either be fully rerun or unconditionally reuse historical results. It requires calculating the failure domain based on the changes in program segments and the relationship between evidence sources, reusing unaffected evidence, and rerunning only the minimum set of tasks that can regenerate failed evidence.
[0049] As an optional implementation, this invention provides an adaptive orchestration and isolated execution method for software vulnerability mining tasks in power monitoring stations (an adaptive orchestration and isolated execution method for software analysis tasks in power monitoring stations). The overall process is as follows: Figure 2As shown, this includes sample registration, evidence status establishment, task dependency judgment, marginal utility estimation, budget orchestration, isolation execution, evidence archiving, and incremental re-orchestration. The orchestrator selects "what to do next, where to do it, and how many resources to use," but does not replace the internal algorithms of each analysis engine.
[0050] Overall adaptive orchestration process for site software vulnerability discovery tasks: Step 1: Register samples, site environment, and execution strategy: The system performs computational summaries on the samples to be analyzed, recording the software name, version, file set, processor architecture, source site, sensitivity level, and allowed analysis period. It also collects the number of processor cores, available memory, storage space, acceleration devices, and isolation capabilities of the current analysis node, and reads the site policies, including whether dynamic execution is allowed, whether network access is prohibited, the maximum duration of a single task, and whether samples can be scheduled across nodes.
[0051] Environmental constraints are expressed as:
[0052] in, The environment constraint vector encapsulates the overall representation of all environment constraints of the analysis node; This refers to the number of processor cores, i.e., the number of CPU cores available in the current analysis node. Available memory, i.e., the memory capacity currently available to the analysis node; Acceleration devices, i.e., GPUs or other acceleration device resources available to the current analysis node; This is the maximum execution time for a single task, i.e., the maximum time allowed for a single analysis task to execute. The sample sensitivity level refers to the safety sensitivity level of the sample to be analyzed. This refers to the networking policy, specifically whether or not analytics tasks are allowed to access the external network. This refers to the cross-node movement strategy, i.e., whether a sample is allowed to be scheduled to other analysis nodes for execution.
[0053] Step 2: Establish a set of evidence with confidence levels: The information generated from the samples and various analysis tasks is uniformly represented as evidence items. Each piece of evidence includes evidence type, value, source task, input fragment, tool version, parameters, generation time, confidence level, and status. Evidence status is categorized as confirmed, pending confirmation, conflicting, and invalid.
[0054] time The state of evidence is represented as follows:
[0055] in, For a moment The set of evidence states; For the first The type of evidence; For the first The value of each piece of evidence; For the first The status of each piece of evidence; For the first Confidence level of each piece of evidence; For the first A collection of direct sources of evidence; For the first A collection of related procedural fragments for each piece of evidence; For a moment The total number of pieces of evidence. Conflicting evidence is not directly overridden; instead, its respective sources are preserved and a conflict relationship is established.
[0056] Step 3: Constructing the task template and evidence status—task dependency graph: Establish task templates for each type of analytical capability in the platform. Task templates include required preliminary evidence, optional augmenting evidence, output evidence type, tool architecture compatibility, minimum resources, concurrency relationships, failure rollback tasks, and security execution level.
[0057] Set a task The set of prior evidence is Its executability is defined as:
[0058] in, For a moment Task Executability; For the analysis task, that is, the specific analysis task currently being evaluated; As preliminary evidence, it belongs to A specific piece of evidence within the set; For the task The set of prior evidence, i.e., the task execution All required prior evidence; As evidence The confidence level, the confidence value in the evidence object, with a value range of [0,1]; For the task On the evidence The strength of dependence; This is an indicator function. If it is evidence that can be omitted, it takes the value of 1 (this item is included in the calculation), otherwise it takes the value of 1 (it is always 1, but it indicates that it can be omitted). To adapt the function, the task Environmental constraints The degree of compatibility, This function adapts to the minimum requirements of architecture, sensitivity level, networking policy, and resources. Tasks with an executability below a threshold are excluded from the current candidate set, and missing prior evidence is recorded.
[0059] Construct a directed dependency graph based on the relationship of "evidence generation - task consumption - new evidence generation". The relationship between evidence state and task selection is as follows: Figure 3 As shown.
[0060] Evidence State—Task Dependency Graph and Adaptive Selection Relationship: Step 4: Estimate the marginal utility and failure risk of the candidate tasks: For executable tasks Based on historical execution records of similar architectures, file types, and evidence states, the following are estimated: new evidence coverage, conflict reduction, uncertainty reduction, computation time, peak memory usage, and failure probability. The task's marginal utility is defined as:
[0061] in, For a moment Task marginal utility; For a moment Task Executability; This refers to the expected reduction in uncertainty, i.e., the execution of tasks. Subsequently, it is expected to reduce the degree of uncertainty in the current evidence set; To increase the coverage of new evidence, i.e., to execute the task. Subsequently, the expected number of new evidence objects or the scope of coverage; To predict conflict reduction, i.e., to carry out tasks Subsequently, it is expected that the degree of conflicting relationships in the current evidence set can be reduced; The estimated execution time, i.e., the task Estimated execution time (based on historical data); To predict peak memory usage, i.e., task Maximum expected memory usage (estimated based on historical data); The probability of failure, i.e., the task Probability of execution failure (estimated based on historical records); , , The weighting coefficient for the benefit item; , , For cost term weighting coefficients; It is a very small positive number.
[0062] For new tools that have never been used before, instead of setting their expected benefits to zero, an exploration gain is set; as the number of times similar tasks are executed increases, the exploration gain decays by the inverse square root. This avoids the platform permanently favoring existing tasks and failing to accumulate performance data for new tools.
[0063] Step 5: Generate execution batches under multiple budget and concurrency constraints: Let the current set of candidate tasks be... , Indicates whether to select a task. Indicates assignment to task The Class resources. The goal of batch optimization is:
[0064] in, To find the maximum value of the decision variable, Choose a vector for the task. The resource allocation matrix represents the search for the solution that maximizes the objective function among all possible combinations of task selection and resource allocation. For a moment The set of candidate tasks, that is, the set of all executable tasks at the current moment; As a candidate task, it belongs to One of the analysis tasks in the process; To select a task A binary decision variable, taking the value 0 or 1, where 1 indicates that the task is selected to enter the current batch of execution; To select a task ,and "Same" is a binary decision variable, taking values of 0 or 1, where 1 indicates the choice of task. Enter the current batch; For a moment Task marginal utility; For the task For the The marginal revenue coefficient of a resource type represents the marginal benefit to the task. Allocation of the first When considering similar resources, the marginal benefit that a unit of resource can bring; Assigned to task The Resource quantity, i.e., decision variable, represents the task. Obtain the The specific quantity of the resource type; This is the conflict penalty coefficient, i.e., the preset weight, used to balance the relative importance between utility gains and concurrent conflict losses; For the task With the task The concurrency conflict coefficient indicates the degree of conflict that occurs when two tasks are executed simultaneously, such as competing for the same disk resources.
[0065] It satisfies constraints on processor, memory, acceleration devices, total duration, sensitivity level, and pre-dependencies. Resource gains are calculated using a saturation function to prevent a single task from consuming resources indefinitely. Concurrency conflicts are implemented for tasks reading the same large sample and competing for disk space, while batch affinity is used for tasks that can share read-only intermediate results.
[0066] First, divide candidate tasks according to dependency layers, and then use branch delimitation or heuristic search at each layer to obtain execution batches. Each batch saves the task order, resource quota, time limit, isolation level, and failure rollback point.
[0067] Step 6: Perform the task in a one-time isolation environment: A one-time isolation sandbox is created for each task, mounting samples and confirmed prior evidence in read-only mode; external networks are prohibited by default, and processor, memory, file handle, disk writes, and execution time are limited; only analysis tools whose signatures match the registration information are allowed to be loaded. Task output is first written to a temporary area, and only submitted to the evidence repository after successful execution and integrity checks.
[0068] The risk level of isolation is defined as:
[0069] in, For the task The isolation risk level measures the overall risk level that arises when a task is executed in an isolation sandbox. Total number of risk types; This is a risk type index, representing a specific risk type; For the task In the Risk probability in class of risks represents the likelihood of occurrence of various basic risks; For the first The weighting coefficient of each risk category represents the weight of each risk category's impact on the overall risk level; The penalty coefficient for tool signature mismatch is the multiplier for the overall risk level when tool signature verification fails. This is the penalty coefficient for unauthorized access, representing the multiplier effect on the overall risk level when unauthorized access occurs. This is a tool signature verification indicator function. If the tool signature does not match the registration information, the value is 1; otherwise, the value is 0. This is an unauthorized access indicator function. It takes the value 1 if the task attempts to access the system without authorization (such as writing to a non-task directory), and takes the value 0 otherwise. These represent risks such as sample execution, parser, file writing, network access, and resource exhaustion. If the risk exceeds the threshold, the task is terminated immediately, the log before termination is saved, and a static replacement task or a rollback task with a higher isolation level is triggered.
[0070] Each execution generates an evidence package, including a sample summary, input evidence number, tool and mirror summary, parameters, resource quotas, start and end times, complete logs, raw output, structured evidence, exit status, and integrity check value. The isolated execution and evidence encapsulation process is as follows: Figure 4 As shown, any reuse conclusion must satisfy the condition that the input fragment, tool version, parameters, and upstream evidence have not entered the failure domain.
[0071] Isolated execution, evidence encapsulation, and incremental reuse after software version changes: Step 7: Update the status and rearrange based on operational feedback: Once the task is completed, add the new evidence. If new evidence conflicts with existing evidence, the confirmation status of the relevant evidence is reduced and a task that can resolve the conflict is activated; if the task fails, the estimated resources and failure probability are updated according to the failure type, and a rollback task is selected; if the actual consumption of the task deviates significantly from the prediction, the cost model of the same tool and architecture is corrected.
[0072] Orchestration should cease when evidence for high-priority objectives has been established, the marginal utility of remaining tasks falls below a threshold, the budget is exhausted, or the permitted analysis period has ended. Upon cessation, unexecuted tasks and their reasons should be retained, and "unexecuted due to environmental limitations" should not be mistakenly written as "no relevant evidence found."
[0073] Step 8: Propagation of evidence invalidation and incremental execution after software version changes: Once the new version sample arrives, its function fragments, read-only data, configurations, and dependencies are compared with those of the historical version to obtain a set of changed fragments. From direct quotations The evidence begins to spread and its failure effects propagate along the evidence source map.
[0074] evidence The failure strength is defined as:
[0075] in, As evidence Failure strength, measuring evidence The degree to which the program segment fails due to changes, with a value range of [0,1]. The evidence object is the specific evidence object whose failure strength is currently being assessed. It is a set of changed fragments, that is, a set of program fragments (functions, read-only data, configurations, dependencies, etc.) that have changed after the new version is compared with the historical version; This is a modified segment, belonging to A specific change within the set; For changing fragments Evidence The propagation path, that is, in the evidence source diagram, from the altered fragments... Departure and arrival evidence All possible paths; The edges on the propagation path represent the relationship between two adjacent nodes (program fragments or evidence objects) in the evidence source graph. This is the influence coefficient of changes in program segments or upstream evidence on downstream evidence; To maximize path impact, for all paths from arrive Choose the path that has the greatest impact on the product.
[0076] when When the threshold is exceeded, the evidence is marked as invalid; the remaining evidence is retained and associated with the new version.
[0077] Based on the tasks that directly source the expired evidence, the minimum set of tasks capable of regenerating this evidence is determined in reverse, while adding necessary prerequisite tasks. The incremental plan reuses unexpired evidence, reruns only the minimum set of tasks, and saves a comparison between the old and new versions of the evidence.
[0078] The embodiments of this application include: A software vulnerability discovery prototype was deployed at a power monitoring station. The analysis node has 16 processor cores and 64GB of memory, is prohibited from connecting to the internet, and is allowed 6 hours of analysis time per sample. The platform registers 12 types of task templates, including structure restoration, rule retrieval, third-party code tracing, model interpretation, and controlled dynamic execution.
[0079] An analysis was performed on a 64-bit service component. Initial evidence consisted only of file format, processor architecture, code segment, and sample digest. Task dependency assessment showed that the structure restoration task had an executability score of 0.96; the third-party code tracing task had an executability score of 0.31 due to the lack of stable function fragments; and the model interpretation task was unexecutable due to the absence of candidate paths. Therefore, the platform first selected two non-conflicting structure restoration tasks and allocated them to 6-core and 4-core processors respectively.
[0080] After the first batch of tasks is completed, evidence of function boundaries, call relationships, and data layout is formed. The platform calculates according to equation (3) that the marginal utility of rule retrieval, version lineage tracing, and alias recovery are 0.84, 0.72, and 0.63, respectively. Since rule retrieval and alias recovery read the same large intermediate file and there is a disk conflict, equation (4) includes rule retrieval and version lineage tracing in the second batch, and alias recovery enters the next batch.
[0081] The version lineage task runs in an isolated sandbox with network access prohibited and a maximum memory limit of 12GB. During execution, the tool attempts to write to a non-task directory; the isolation layer rejects this operation and logs it. Since this write is not necessary output, the task continues to run and successfully submits the evidence package. Another dynamic task is not allowed to execute due to sample sensitivity; the platform marks it as a policy block and selects a static alternative task instead of recording it as a risk-free result.
[0082] After four batches of orchestration, a total of 8 tasks were executed, skipping 3 low-marginal-utility tasks and using a rollback strategy for 1 task due to policy constraints. Compared to executing a fixed 12 tasks, processor time decreased from 41.6 cores to 27.3 cores, and peak memory usage decreased from 52GB to 38GB. These figures are for illustrative purposes only and do not constitute a fixed performance limit for all samples.
[0083] Two weeks later, the vendor released a new version, modifying only four functions and one configuration. The system marked nine pieces of evidence as invalid based on equation (6), while the other 76 pieces of evidence could be reused. Reverse tracing yielded three minimal rerun tasks: structural restoration local update, rule retrieval, and interpretation update, without needing to re-execute the source tracing of third-party components and the analysis of unaffected functions. The evidence packages of the old and new versions retained the same source chain, which could explain which conclusions were used and which conclusions were regenerated.
[0084] This embodiment illustrates that the core of the present invention does not lie in a specific vulnerability analysis algorithm, but rather in selecting analysis tasks based on evidence status and site constraints, combining untrusted execution with evidence archiving, and implementing evidence-based incremental reuse after version changes.
[0085] Key points and protections of this application: (1) A method to represent intermediate information in analysis as evidence items containing source task, input fragment, tool version, parameters, confidence level and state, and to construct an evidence state-task dependency graph accordingly.
[0086] (2) A method for calculating and analyzing the executability of tasks by combining the completeness of prior evidence, tool architecture adaptation, sample sensitivity level and site strategy.
[0087] (3) A method for calculating the marginal utility of a task based on uncertainty reduction, new evidence coverage, conflict reduction, resource cost and failure probability.
[0088] (4) A method for jointly selecting execution tasks and resource quotas under multiple resource budgets, task dependencies, concurrency conflicts and site time constraints.
[0089] (5) A method for performing analysis tasks in a one-time isolated sandbox and encapsulating input summaries, tool signatures, parameters, resource quotas, logs, outputs and integrity information into an immutable evidence package.
[0090] (6) Based on the failure intensity of the software version change fragments propagating along the evidence source map, the method of reusing non-failed evidence and determining the minimum set of rerun tasks is used.
[0091] (7) A vulnerability discovery task orchestration system, isolation execution device, computer-readable storage medium and computer program product that implement the above method.
[0092] Advantages of this invention: (1) The present invention determines whether a task has prerequisites by using the evidence state-task dependency graph, can skip tasks that cannot produce effective results, and automatically complete tasks corresponding to missing prerequisite evidence.
[0093] (2) This invention integrates task uncertainty reduction, new evidence coverage, conflict reduction, computational cost and failure risk estimation marginal utility, and generates execution batches under the constraints of site resources and analysis time period, reducing the repetitive calculation of fixed pipelines.
[0094] (3) The present invention creates a one-time isolated environment for each task and encapsulates the input, tools, parameters, resource limits, logs and outputs into an immutable evidence package, so that the platform can both process untrusted samples and trace back the formation process of the analysis conclusion.
[0095] (4) This invention distinguishes between three states: task failure, policy blocking, and analysis not found, to avoid interpreting the empty result generated by the non-executed task as having no risk evidence.
[0096] (5) Based on the propagation failure of program fragment changes and evidence source relationships, this invention only reuses evidence that has not entered the failure domain and determines the minimum set of rerun tasks, which is suitable for scenarios with frequent minor version updates of power monitoring software.
[0097] This application also provides an adaptive orchestration and isolated execution system for software analysis tasks in power monitoring stations, used to implement the aforementioned method. The system includes: The environmental constraint acquisition module is used to acquire the available resources and site policies of the current analysis node and form environmental constraint conditions. The evidence management module is used to uniformly represent various types of information generated during the analysis process as evidence objects with status markers, thus obtaining an evidence set; The task orchestration module is used to define each analysis task according to the preset task template, determine the execution readiness of each analysis task based on the state of the evidence objects in the evidence set and the environmental constraints, and construct a directed dependency graph between the evidence objects and the analysis tasks. The utility evaluation module is used to calculate the marginal utility based on the state of the evidence set for analysis tasks in a directed dependency graph. The batch generation module is used to select the task composition of the current execution batch and determine the amount of resources allocated to each task based on environmental constraints and marginal utility. The isolated execution module is used to construct restricted execution environments for each selected analysis task based on the site strategy and resource availability in the environmental constraints. It connects the samples to be analyzed and the evidence objects in the evidence set to the restricted execution environment, and encapsulates the entire process record into an execution certificate after execution. The status update and incremental reuse module is used to refresh the status of evidence objects based on execution credentials. When a sample change is detected, it determines the set of tasks that need to be re-executed, reuses unaffected execution credentials, and obtains input for subsequent orchestration cycles.
[0098] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0099] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0100] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0101] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0102] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0103] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0104] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0105] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0106] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0107] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0108] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0109] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0110] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0111] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0112] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0113] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0114] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0115] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0116] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for adaptive orchestration and isolated execution of software analysis tasks for power monitoring stations, characterized in that, The method includes the following steps: Obtain the available resources and site policies of the current analysis node to form environmental constraints; All types of information generated during the analysis process are uniformly represented as evidence objects with status tags, thus obtaining an evidence set; Each analysis task is defined according to a preset task template. Based on the state of the evidence objects in the evidence set and the environmental constraints, the execution readiness of each analysis task is determined, and a directed dependency graph between the evidence objects and the analysis tasks is constructed. For the analysis task in the directed dependency graph, the marginal utility is calculated based on the state of the evidence set; Based on the environmental constraints and the marginal utility, select the task composition of the current execution batch and determine the amount of resources allocated to each task; Based on the site strategy and resource quantity in the environmental constraints, a restricted execution environment is constructed for each selected analysis task. The sample to be analyzed and the evidence objects in the evidence set are connected to the restricted execution environment. After execution, the entire process record is encapsulated as an execution certificate. The state of the evidence object is refreshed according to the execution credentials. When a sample change is detected, the set of tasks that need to be re-executed is determined, and the unaffected execution credentials are reused to obtain input for subsequent orchestration cycles.
2. The method according to claim 1, characterized in that, The process of obtaining the available resources and site policies of the current analysis node to form environmental constraints includes: The content summary of the sample to be analyzed is used as the sample summary; the sample summary records the software name, software version, file set, processor architecture, source site, sensitivity level and allowed analysis period of the sample; Collect available resource information for the current analysis node; the available resource information includes the number of processor cores, available memory size, storage space capacity, acceleration device type, and isolation capability level; Read the site policy; the site policy includes whether dynamic execution is allowed, whether network access is prohibited, the maximum execution time of a single task, and whether samples are allowed to be scheduled across nodes; The sample summary, the available resource information, and the site strategy are combined into environmental constraints.
3. The method according to claim 1, characterized in that, The process of uniformly representing various types of information generated during the analysis as evidence objects with status markers yields an evidence set, including: The samples and the output information generated after each analysis task is completed are all regarded as evidence objects; the evidence objects include evidence type, evidence value, source task identifier, input evidence number on which they are based, program segment identifier, evidence generation timestamp, evidence confidence level, and evidence status marker; the evidence status marker includes confirmed status, pending confirmation status, conflicting status, and invalid status. For evidence objects that originate from different tasks but have contradictory content, retain their complete evidence records and establish conflict relationship markers between the evidence objects; All the evidence objects are managed in a unified manner in the form of an evidence set, and the evidence set is retrieved and filtered according to the source task identifier, evidence type or evidence status mark.
4. The method according to claim 1, characterized in that, The process of defining each analysis task according to a preset task template, determining the execution readiness of each analysis task based on the state of the evidence objects in the evidence set and the environmental constraints, and constructing a directed dependency graph between the evidence objects and the analysis tasks includes: A task template is established for each type of analysis capability in the software platform. The task template includes the types of prerequisite evidence and default evidence types required for the analysis task, the confidence threshold that the prerequisite evidence must meet, the types of evidence that the analysis task can output, the range of processor architectures that the analysis task is adapted to, the minimum amount of resources required to execute the analysis task, the concurrency relationship between the analysis task and other analysis tasks, the fallback task identifier that can be called when the analysis task fails, and the security execution level required by the analysis task. Based on the evidence status marker and evidence confidence level of each evidence object in the current evidence set, and combined with the processor architecture and sample sensitivity level in the environmental constraints, it is determined one by one whether all the necessary preliminary evidence for each analysis task exists in the evidence set and the confidence level is not lower than the confidence level threshold. If so, the analysis task is marked as executable. Using the evidence objects in the current evidence set as the starting node, the analysis tasks marked as executable as the intermediate nodes, and the evidence objects expected to be output after the completion of each analysis task as the ending node, a directed dependency graph is constructed according to the causal relationship of evidence objects being supplied to analysis tasks for consumption after their generation and new evidence objects being generated after the completion of analysis tasks.
5. The method according to claim 1, characterized in that, The analytical task in the directed dependency graph, which calculates marginal utility based on the state of the evidence set, includes: Each analysis task marked as executable in the directed dependency graph is selected as a candidate task. For each candidate task, based on the similarity of the same processor architecture, the same sample file type, and the evidence state used when entering the executable state in the historical execution records, the expected execution time, the expected peak memory usage, and the failure probability of the candidate task are obtained. For each candidate task, based on the total number of existing evidence objects in the current evidence set, the confidence level of each evidence object, and the conflict relationship between each evidence object, the expected reduction in uncertainty in the current evidence set by the newly added evidence objects after the completion of the candidate task is calculated, which is taken as the uncertainty reduction benefit. Based on the expected execution time, the expected peak memory usage, and the failure probability of the candidate task, calculate the execution time cost, memory consumption cost, and failure risk cost of the candidate task. The marginal utility of the candidate task is calculated based on the uncertainty reduction benefit, the execution time cost, the memory consumption cost, and the failure risk cost.
6. The method according to claim 1, characterized in that, The step of selecting the task composition for the current execution batch and determining the resource allocation for each task based on the environmental constraints and marginal utility includes: The upper limit of processor cores, the upper limit of available memory, the upper limit of acceleration device resources, the upper limit of sample sensitivity level, and the end point of the allowed analysis period in the environmental constraints are used as resource constraint boundaries. The prior dependencies between the analysis tasks in the directed dependency graph are used as the temporal constraint boundaries. Using the concurrency relationships recorded in the task template as parallel constraint boundaries, multiple analysis tasks with concurrency relationships are allowed to be scheduled into the same execution batch for parallel execution. Concurrency conflict flags are set between analysis tasks that do not have concurrency relationships recorded in the task template and depend on the same large sample file, prohibiting them from being scheduled into the same execution batch. Using marginal utility as the basis for returns, and under the premise of satisfying the resource constraint boundary, the timing constraint boundary, and the parallel constraint boundary, with the goal of maximizing the sum of the marginal utility of all selected analysis tasks in the execution batch and the marginal returns of their respective allocated resource amounts, and minimizing the concurrency conflict loss, the task composition of the current execution batch is selected from the candidate tasks, and resource amounts are allocated to each selected analysis task.
7. The method according to claim 1, characterized in that, Based on the site strategy and resource quantity in the environmental constraints, a restricted execution environment is constructed for each selected analysis task. The sample to be analyzed and the evidence objects in the evidence set are connected to the restricted execution environment. After execution, the entire process record is encapsulated as an execution credential, including: For each selected analysis task in the execution batch, a separate, one-time isolation sandbox is created as the restricted execution environment; Configure network access permissions for the restricted execution environment according to the site policy in the environmental constraints. When the site policy prohibits network access, all external network connections are prohibited in the restricted execution environment. Based on the resource quantity, configure the resource consumption limit for the restricted execution environment; the resource consumption limit includes the upper limit of the number of processor cores, the upper limit of available memory, the upper limit of the number of file handles, the upper limit of disk write volume, and the upper limit of execution time; The sample to be analyzed is mounted to the restricted execution environment in read-only mode; The prerequisite evidence objects required for the analysis task in the evidence set are mounted to the restricted execution environment in read-only mode. After verifying that the digital signature or hash digest of the analysis tool invoked by the analysis task is consistent with the information registered in the software platform, the analysis tool is loaded and executed in the restricted execution environment. Perform integrity verification on the output data in the temporary storage area, and submit the output data to the evidence set after the verification passes. The input summary of the analysis task, the number of the prior evidence object used, the digital signature or summary of the analysis tool invoked, the execution parameters of the analysis tool, the amount of resources, the execution start timestamp, the execution end timestamp, the complete log generated during execution, the original output of the analysis tool, the structured evidence extracted from the original output, the exit status of the analysis tool, and the integrity verification value are collectively encapsulated into an immutable evidence package, which serves as the execution credential for the analysis task.
8. The method according to claim 1, characterized in that, The process of refreshing the state of the evidence object based on the execution credentials, determining the set of tasks that need to be re-executed when a sample change is detected, reusing the unaffected execution credentials, and obtaining input for subsequent orchestration cycles includes: The structured evidence contained in the execution certificate is added to the evidence set as a new evidence object, and the status of the evidence object is refreshed according to the execution status in the execution certificate. When the execution status in the execution certificate is "execution successful", the evidence status of the newly added evidence object is marked as "confirmed". When the newly added evidence object contradicts the content of existing evidence objects in the evidence set, the evidence status of the existing evidence object is marked as conflicting, and the evidence confidence of the existing evidence object is reduced. The analysis task that can output new evidence that can resolve conflicts is found based on the directed dependency graph. The found analysis task is marked as pending execution and included in the execution batch. When the execution status in the execution certificate is execution failure, update the failure probability of the analysis task under the same processor architecture and the same sample file type according to the failure type. When the deviation between the actual resource consumption in the execution certificate and the preset expected resource consumption exceeds the preset deviation threshold, the expected execution time and expected memory peak of the analysis task under the same processor architecture and the same sample file type are corrected. When a local change is detected in the sample to be analyzed, the changed sample is compared with the sample before the change to obtain a set of changed fragments; Starting from the evidence object that references any change fragment in the set of change fragments in the directed dependency graph, trace backward along the directed dependency graph to the upstream analysis task that generated the evidence object, and then propagate the failure effect forward along the directed dependency graph to calculate the failure intensity of each evidence object in the directed dependency graph. Evidence objects whose failure intensity exceeds a preset failure threshold are marked as failed, and the remaining evidence objects are marked as reusable. Based on the direct source analysis task of the evidence objects marked as invalid, the minimum set of tasks that can regenerate all the invalid evidence objects is determined in reverse along the directed dependency graph, and all the preceding analysis tasks required by each analysis task in the minimum set of tasks are added. Execute the analysis tasks in the minimum task set, and reuse all evidence objects marked as reusable and the execution credentials; Preserve the comparison relationship between the evidence objects in the evidence set before the change and the evidence set after the change; The updated evidence set, the execution results of the minimum task set, and the evidence object comparison relationship are used as inputs for subsequent orchestration cycles.
9. A software analysis task adaptive orchestration and isolated execution system for power monitoring stations, used to implement the method as described in any one of claims 1 to 8, characterized in that, The system includes: The environmental constraint acquisition module is used to acquire the available resources and site policies of the current analysis node and form environmental constraint conditions. The evidence management module is used to uniformly represent various types of information generated during the analysis process as evidence objects with status markers, thus obtaining an evidence set; The task orchestration module is used to define each analysis task according to a preset task template, determine the execution readiness of each analysis task based on the state of the evidence objects in the evidence set and the environmental constraints, and construct a directed dependency graph between the evidence objects and the analysis tasks. The utility evaluation module is used to calculate the marginal utility for the analysis task in the directed dependency graph based on the state of the evidence set. The batch generation module is used to select the task composition of the current execution batch and determine the amount of resources allocated to each task based on the environmental constraints and the marginal utility. The isolated execution module is used to construct restricted execution environments for each selected analysis task according to the site strategy and resource quantity in the environmental constraints, connect the sample to be analyzed and the evidence objects in the evidence set to the restricted execution environment, and encapsulate the entire process record into an execution certificate after execution. The state update and incremental reuse module is used to refresh the state of the evidence object based on the execution credential. When a sample change is detected, the module determines the set of tasks that need to be re-executed, reuses the unaffected execution credential, and obtains the input for subsequent orchestration cycles.
10. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 8.
