CN113098854B - Task arranging method, system, storage medium and electronic equipment - Google Patents

Task arranging method, system, storage medium and electronic equipment Download PDF

Info

Publication number
CN113098854B
CN113098854B CN202110327093.9A CN202110327093A CN113098854B CN 113098854 B CN113098854 B CN 113098854B CN 202110327093 A CN202110327093 A CN 202110327093A CN 113098854 B CN113098854 B CN 113098854B
Authority
CN
China
Prior art keywords
task
node
script
execution
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110327093.9A
Other languages
Chinese (zh)
Other versions
CN113098854A (en
Inventor
刘炳亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202110327093.9A priority Critical patent/CN113098854B/en
Publication of CN113098854A publication Critical patent/CN113098854A/en
Application granted granted Critical
Publication of CN113098854B publication Critical patent/CN113098854B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • H04L63/205Network architectures or network communication protocols for network security for managing network security; network security policies in general involving negotiation or determination of the one or more network security mechanisms to be used, e.g. by negotiation between the client and the server or between peers or by selection according to the capabilities of the entities involved
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a task arranging method, which comprises the following steps: receiving a task script; dividing the task script according to the node marks to obtain a plurality of node tasks; each node task comprises a task action; distributing the node task to a corresponding action node for execution to obtain task data; the task data are integrated and used as the task execution result of the task script, so that the cost of network security operation and maintenance personnel for executing network security operation and maintenance can be reduced, the network security task can be processed in time, and the processing efficiency and the processing precision of the network security task are improved. The application also provides a task arranging system, a computer readable storage medium and an electronic device, which have the beneficial effects.

Description

Task arranging method, system, storage medium and electronic equipment
Technical Field
The present application relates to the field of network security, and in particular, to a task scheduling method, system, storage medium, and electronic device.
Background
In the current network security operation and maintenance process, the network security problem can only be found by means of security equipment, but the security operation and maintenance task still needs to be processed in time, once the processing is not timely, the security problem is easy to expand, and serious adverse consequences are caused. And the operation and maintenance process depends on the personnel ability seriously, and the personnel ability is uneven, so that the traditional safety protection effect is uneven.
Therefore, how to implement effective and timely network security operation and maintenance is a technical problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
The application aims to provide a task arranging method, a task arranging system, a computer readable storage medium and electronic equipment, which can improve the network security operation and maintenance efficiency.
In order to solve the technical problem, the application provides a task arrangement method, which has the following specific technical scheme:
receiving a task script;
dividing the task script according to the node marks to obtain a plurality of node tasks; each node task comprises a task action;
distributing the node task to a corresponding action node for execution to obtain task data;
and integrating the task data and taking the task data as a task execution result of the task script.
Optionally, after receiving the task scenario, the method further includes:
storing the task script into a task queue;
calculating the priority of each task script in the task queue;
correspondingly, the task division is carried out on the task scenario according to the node marks, and the obtaining of a plurality of node tasks comprises the following steps:
and dividing the task script with the highest priority in the task queue according to the node marks to obtain a plurality of node tasks.
Optionally, after the task scenario is divided into tasks according to the node marks and a plurality of node tasks are obtained, the method further includes:
when the target node task belongs to the unexecuted path of the task scenario, deleting the target node task and the upper dependency and the lower dependency of the target node task, and deleting the other node tasks of which the upper dependency number is less than or equal to 1 along the unexecuted path direction to obtain a simplified task scenario;
distributing the node task to a corresponding action node for execution, and obtaining task data comprises:
and distributing the node tasks contained in the simplified task script to corresponding action nodes for execution to obtain task data.
Optionally, distributing the node task to a corresponding action node for execution, and obtaining task data includes:
determining the task type of each node task containing task action;
and distributing the task type to the corresponding action node for execution according to the task type to obtain task data corresponding to an execution result.
Optionally, the task scenario further includes:
caching the real-time task execution state of the task script as intermediate state data to a preset message queue; the real-time task execution state comprises a task division state and a node task execution state.
Optionally, if the task scenario is updated, the method further includes:
confirming the script updating request;
updating the task script according to the script updating request;
judging whether the script updating request is configured with a tracing time or not;
if not, responding to the updating result of the script updating request, and receiving the updated task script;
if yes, setting the node tasks executed by the action nodes in the tracing time to be in a cancel state, and setting all the node tasks corresponding to the updated task scenario to be in a to-be-run state.
Optionally, after receiving the task scenario, the method further includes:
performing format check and logic check on the task script;
if the format check and the logic detection both pass, analyzing script data of the task script;
and if the script data is successfully analyzed, storing the task script to a database.
Optionally, the executing the node task by the action node includes:
analyzing the node task to obtain task parameters; the task parameters comprise at least one of field parameters, port parameters and address parameters;
judging whether the task parameters are successfully analyzed;
if yes, executing the node task according to the task parameter;
and if not, marking the node task execution failure.
Optionally, the receiving the task scenario includes:
and after the user arranges tasks based on the user operation interface, receiving a task script returned by the user operation interface.
The present application further provides a task orchestration system, comprising:
the task receiving module is used for receiving the task script;
the task segmentation module is used for carrying out task division on the task script according to the node marks to obtain a plurality of node tasks; each node task comprises a task action;
the task execution module is used for distributing the node tasks to corresponding action nodes for execution to obtain task data;
and the data integration module is used for integrating the task data and taking the task data as a task execution result of the task script.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method as set forth above.
The present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described above when calling the computer program in the memory.
The application provides a task arranging method, which comprises the following steps: receiving a task script; dividing the task script according to the node marks to obtain a plurality of node tasks; each node task comprises a task action; distributing the node task to a corresponding action node for execution to obtain task data; and integrating the task data and taking the task data as a task execution result of the task script.
According to the method, when the task scenario is received, the task scenario is divided into the node tasks according to the node marks through the configuration task arranging method, corresponding action nodes are called to execute one by one aiming at each node task, the complex safety task is divided into a plurality of simple actions, the automatic processing of the safety task can be realized, the cost of network safety operation and maintenance personnel for executing network safety operation and maintenance is reduced, the network safety task can be processed in time, and the processing efficiency and the processing precision of the network safety task are improved.
The application further provides a task orchestration system, a computer readable storage medium, and an electronic device, which have the above beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a task orchestration method according to an embodiment of the present application;
FIG. 2 is a simplified pre-script task scenario diagram provided in an embodiment of the present application;
fig. 3 is a simplified schematic diagram of a task scenario provided in an embodiment of the present application;
fig. 4 is a schematic diagram illustrating a task scenario update process according to an embodiment of the present application;
fig. 5 is a schematic view illustrating a task scenario checking process provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a task orchestration system according to an embodiment of the present application:
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of a task orchestration method according to an embodiment of the present application, where the method includes:
s101: receiving a task script;
this step is intended to receive a task script, which is a script corresponding to the security orchestration task. The system can be used for configuration, control, management and automation actions, and a series of tasks can be executed or flow control can be carried out through detailed description of the task script or action configuration, so that the work order system data can achieve an expected display result. In this step, after the user arranges the task based on the user operation interface, the task scenario returned by the user operation interface may be received. In other words, the user may directly edit the task script to configure the secure task processing flow therein.
In addition, the task scenario can be configured by an external system or a terminal according to a safety event occurring in real time.
S102: dividing the task script according to the node marks to obtain a plurality of node tasks;
the step aims to perform task division on the task script to obtain node tasks, and each node task comprises a task action. Specifically, when a task is divided, the division is performed according to node marks, and the task scenario includes a plurality of node marks, which may be fixed identifiers, for indicating different node tasks. The node marks can be used for distinguishing different task actions, such as approval actions, and are used for supporting information input or content auditing; the decision-making action is used for judging the condition of the input content and guiding the input content to enter the content output meeting the condition; a filtering action for performing conditional filtering of the input content and outputting output content meeting the conditions; a texting action for implementing the texting of the data content, which may also support rich text and multiple text types; and the third-party equipment docking action is used for carrying out data transmission with the third-party equipment, and comprises protocol interaction, data interaction and the like. Of course, other task actions may be included to implement the task division according to the node labels.
S103: distributing the node task to a corresponding action node for execution to obtain task data;
after the node tasks are obtained in the previous step, the step aims to distribute the node tasks to the corresponding action nodes, so that each action node executes the corresponding node task and obtains task data.
As a preferred execution mode of this step, a task type that each node task includes a task action may be determined, and then distributed to a corresponding action node according to the task type to be executed, so as to obtain task data corresponding to an execution result. Action nodes may include the approval action node, decision action node, filter action node, text session action node, phase action node, intelligence query action node, third party device docking action node, and the like described above.
In this embodiment, how each action node executes the node task is not specifically limited, and for example, the method may include the following steps:
s1031: analyzing the node task to obtain task parameters;
s1032: judging whether the task parameters are successfully analyzed; if yes, go to S1033; if not, entering S1034;
s1033: executing the node task according to the task parameter;
s1034: and marking the node task execution failure.
In step S1031, the task parameters may include at least one of field parameters, port parameters, and address parameters, such as important information of the original IP, port number, and the like of the security event. In other words, the node task executed by the action node mainly converts the price task parameter into task data and executes the task data,
s104: and integrating the task data and taking the task data as a task execution result of the task script.
The step aims to integrate task data corresponding to each node task and use the task data as a task execution result corresponding to the task scenario. It is easy to understand that, when integrating task data, the task data can be integrated according to the sequence of each node task when dividing the node tasks, so as to obtain a complete task execution result.
According to the task scenario configuration method, when the task scenario is received, task segmentation is carried out on the task scenario according to the node marks to obtain the node tasks, corresponding action nodes are called to execute one by one aiming at each node task, the complex safety task is segmented into a plurality of simple actions, automatic processing of the safety task can be achieved, the cost of network safety operation and maintenance personnel for executing network safety operation and maintenance is reduced, the network safety task can be processed in time, and the processing efficiency and the processing precision of the network safety task are improved.
Based on the above embodiment, as a preferred embodiment, in order to process a plurality of task scenarios simultaneously and meet the emergency treatment requirement of the task scenarios, after receiving the task scenarios in step S101, the priority of the task scenarios may also be configured, and the specific process may be as follows:
firstly, storing a task script into a task queue;
and secondly, calculating the priority of each task script in the task queue.
After receiving the task scenario, the embodiment stores the task scenario into a task queue, and calculates the priority of each task scenario in the task queue. There is no limitation on what kind of task queue is used, and it may be a redis queue or the like. Redis is stored as a data structure in memory, often used as a database, cache, and message broker. Of course, other task queues may be used, and are not limited herein. In the task queue, the priority of each task scenario should be attribute information carried by the task scenario itself, and attributes attached to the task scenario when a user configures the task scenario or when the task scenario is generated can be used, and then the priorities of the task scenarios can be compared in the task queue, and when step S102 is executed, the task scenario with the highest priority in the task queue can be subjected to task division according to the node marks, so that a plurality of node tasks are obtained.
The present embodiment is directed to priority configuration of task scenarios to meet the processing requirements of emergency security tasks in practical applications, i.e. task scenarios may be preferentially executed by configuring a higher priority to the task scenarios. The present embodiment does not specifically limit the configuration method and the configuration process of the priority corresponding to the task scenario.
On the basis of the embodiment, the real-time task execution state of the task scenario can be buffered to a preset message queue as intermediate state data. The real-time task execution state comprises a task division state and a node task execution state.
In order to record the execution state of the task scenario in time, the real-time task execution state may be cached at the same time, and what kind of message queue the task queue is cached to is not specifically limited, and for example, the message queue may be cached to a redis cache.
It should be noted that although there is priority to the task scenarios, it does not mean that the task scenarios cannot be processed in parallel. For example, if a task scenario a and a task scenario B exist and the priority of the task scenario a is higher than that of the task scenario B, the task scenario a should be executed first according to this embodiment, but if a node task that needs to be confirmed by the user exists in the task scenario a and the user cannot execute a subsequent node task when the user does not confirm, the real-time task execution state of the task scenario a may be cached in a redis cache, and the task scenario B may be executed until the user confirms the node task scenario B, and since the real-time task execution state of the task scenario a is cached, the real-time task execution state may be directly read from the cache and executed continuously.
Based on the foregoing embodiment, as a preferred embodiment, after the node task is obtained in step S102, task reduction may be performed on the node task, and the specific process is as follows:
and when the target node task belongs to the unexecuted path of the task scenario, deleting the target node task and the upper dependency and the lower dependency of the target node task, and deleting the other node tasks of which the upper dependency number is less than or equal to 1 along the unexecuted path direction to obtain the simplified task scenario. It is easy to understand that although the task scenario includes a plurality of node tasks, if the execution path includes the execution judgment process, the actual execution path only includes the node task corresponding to the judgment result, and another node task belongs to the unexecuted path, which belongs to the node task that is not actually needed to be executed. The upper dependency of a node task refers to a node path which can reach the current node task, and each upper level node task which can reach the current node task generally corresponds to one upper dependency. Correspondingly, the lower dependency of a node task refers to a node path through which the current node task can reach the next node task. Whether it is up-dependent or down-dependent, is used to indicate the task direction between node tasks. For example, node task m has 2 upper dependencies and 1 lower dependency, which indicate that two execution paths to node task m can be executed, and node task m simultaneously includes one downward execution path. When the upper dependency of the next node task on the unexecuted path is reduced, if the next node has only one upper dependency, the node task cannot be triggered, and obviously the next node does not conform to the execution logic of the task scenario, so that the next node needs to be reduced at the same time until the number of the upper dependencies of the last node task on the unexecuted path is greater than 0 after the last node task on the unexecuted path is reduced, which indicates that the node task has other execution paths and can be executed in the actual execution path.
If the task of the node is reduced, the node task included in the simplified task scenario may be directly distributed to the corresponding action node to be executed according to the node task in step S103, so as to obtain task data.
The embodiment aims to reduce the node tasks after the node tasks are obtained, delete the node tasks on the unexecuted path and reduce the number of the node tasks which do not need to be executed, thereby improving the execution efficiency of the task script. Referring to fig. 2, fig. 2 is a schematic diagram of a simplified task scenario provided in an embodiment of the present application, where each numeral in fig. 2 represents a node task, for example, node task 0 and node task 1, and each numeral represents a corresponding node task name hereinafter. The task scenario is executed from 0 to 1,1 includes three execution paths, namely 2, 3 and 4, but 2, 3 and 4 are parallel execution relations, and all belong to the execution paths in the execution process, but 3 later includes a decision action, namely 5 is passed when the judgment result is Y, and 6 is passed when the judgment result is N, namely 5 and 6 can only be selected to be executed in the actual execution process of the task scenario. If the execution path contains 5, then 6 belongs to the target node task and is located on the non-execution path, then 6 can be deleted, and the upper dependency and the lower dependency of 6, i.e. the connection of 3 and 6, and the connection of 6 and 8, then it is found that 8 still has the upper dependency with 7 after deletion, i.e. the upper dependency of 8 has two upper dependencies before deletion, so that 8 does not need to be deleted. Fig. 3 shows a simplified task scenario obtained at this time, and fig. 3 is a schematic diagram of a simplified task scenario provided in an embodiment of the present application.
Referring to fig. 4, fig. 4 is a schematic diagram of a task scenario update process provided in an embodiment of the present application, and on the basis of the foregoing embodiments, if a task scenario needs to be updated, the method may further include the following steps:
s201: confirming the script updating request;
s202: updating the task script according to the script updating request;
s203: judging whether the script updating request is configured with the tracing time or not; if not, entering S204; if yes, go to S205;
s204: responding to an update result of the script update request;
s205: and determining a safety task corresponding to the task scenario in the tracing time, setting the node task in the execution state as a cancel state, and setting all node tasks corresponding to the updated task scenario as a to-be-run state.
The traceback time is typically a time range that may include an expiration of a certain time period, an upcoming time period, or a certain time period from the past to the future. The tracing time refers to the time range of the corresponding update of the task scenario needing to be updated. When the script updating request is not configured with the tracing time, the updating request can be directly responded, and the task script updating is executed. And if the tracing time is configured, the node task in the execution state in the tracing time needs to be cancelled and updated, and the node task in the tracing time is set to be in the state to be run until the execution of the task is started after the task execution instruction is received. It is easily understood that the update content corresponding to the scenario update request does not necessarily contain all the content of the task scenario, but may trace back the corresponding partial content in time.
The present embodiment describes relevant steps for updating a task scenario, that is, when the above embodiments are executed, the task scenario can be updated according to the steps provided in the present embodiment. Of course, this embodiment is only a preferred embodiment for performing updating on the task scenario, and those skilled in the art may also adopt other updating measures based on this embodiment, and the scope of this application should also be protected.
On the basis of the above embodiments, as a more preferred embodiment, referring to fig. 5, fig. 5 is a schematic diagram of a task scenario checking process provided in an embodiment of the present application, and after receiving a task scenario, the following steps may be further included:
s301: carrying out format check and logic check on the task script;
s302: if the format check and the logic check both pass, analyzing script data of the task script;
s303: and if the script data is successfully analyzed, saving the task script to the database.
The embodiment is a scenario checking process after receiving a task scenario, where the task scenario may be a task scenario received for the first time or a task scenario during updating. After receiving the task script, performing format check and logic detection on the task script, wherein the format check mainly comprises a script format and a script structure of the task script, and the logic check mainly refers to performing logic check on information such as version content of the task script.
And when the format check and the logic detection are passed, analyzing the script data of the task script, and when the analysis is successful, storing the script data into a corresponding database. The database used here is not limited, and may be, for example, a mongodb database.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a task orchestration system according to an embodiment of the present application, and the present application further provides a task orchestration system, including:
a task receiving module 100, configured to receive a task scenario;
the task segmentation module 200 is used for performing task division on the task script according to the node marks to obtain a plurality of node tasks; each node task comprises a task action;
the task execution module 300 is configured to distribute the node task to a corresponding action node for execution, so as to obtain task data;
and the data integration module 400 is used for integrating the task data and taking the task data as a task execution result of the task scenario.
Based on the above embodiment, as a preferred embodiment, the task orchestration system may further include:
the priority division module is used for storing the task script into a task queue; calculating the priority of each task script in the task queue;
correspondingly, the task dividing module 200 is a module for dividing the task scenario with the highest priority in the task queue according to the node marks to obtain a plurality of node tasks.
Based on the above embodiment, as a preferred embodiment, the method further includes:
the task reduction module is used for deleting the target node task and the upper dependency and the lower dependency of the target node task when the target node task belongs to an unexecuted path of the task scenario, and deleting other node tasks which do not contain the upper dependency along the unexecuted path until the number of the upper dependencies of the reduced node tasks is more than 0, so that a simplified task scenario is obtained;
the task execution module 300 is a module for distributing the node tasks included in the simplified task scenario to corresponding action nodes for execution to obtain task data.
Based on the above embodiments, as a preferred embodiment, the task execution module 300 includes:
the action type determining unit is used for determining the task type of each node task including task actions;
the distribution unit is used for distributing the task type to the corresponding action node to be executed to obtain task data corresponding to the execution result; the action nodes comprise an approval action node, a decision action node, a filtering action node, a text session action node, a stage action node, an intelligence inquiry action node and a third-party equipment butt joint action node.
Based on the above embodiment, as a preferred embodiment, the task orchestration system may further include:
the cache module is used for caching the real-time task execution state of the task script as intermediate state data to a preset message queue; the real-time task execution state comprises a task division state and a node task execution state.
Based on the foregoing embodiment, as a preferred embodiment, if the task scenario is updated, the method further includes:
an update module for performing the steps of:
confirmation script an update request; updating the task script according to the script updating request;
judging whether the script updating request is configured with a tracing time or not;
if not, responding to the updating result of the script updating request, and receiving the updated task script;
if yes, determining a safety task corresponding to the task scenario in the tracing time, setting the node task in the execution state to be in a cancel state, and setting all node tasks corresponding to the updated task scenario to be in a to-be-run state.
Based on the above embodiment, as a preferred embodiment, the method further includes:
the checking module is used for carrying out format checking and logic checking on the task script; if the format check and the logic detection both pass, analyzing script data of the task script; and if the script data is successfully analyzed, storing the task script to a database.
The present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program can implement the steps of the malicious encrypted traffic detection method provided in the foregoing embodiments when executed. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The application further provides an electronic device, which may include a memory and a processor, where the memory stores a computer program, and when the processor calls the computer program in the memory, the steps of the task orchestration method provided in the foregoing embodiments may be implemented. Of course, the electronic device may also include various network interfaces, power supplies, and the like. Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, where the electronic device according to the embodiment may include: a processor 2101 and a memory 2102.
Optionally, the electronic device may further comprise a communication interface 2103, an input unit 2104 and a display 2105 and a communication bus 2106.
The processor 2101, the memory 2102, the communication interface 2103, the input unit 2104, the display 2105, and the like communicate with each other via the communication bus 2106.
In the embodiment of the present application, the processor 2101 may be a Central Processing Unit (CPU), an application specific integrated circuit (asic), a digital signal processor, an off-the-shelf programmable gate array (fpga) or other programmable logic device.
The processor may call a program stored in the memory 2102. In particular, the processor may perform the operations performed by the electronic device in the above embodiments.
The memory 2102 stores one or more programs, which may include program code including computer operating instructions, and in this embodiment, at least one program for implementing the following functions is stored in the memory:
receiving a task script;
dividing the task script according to the node marks to obtain a plurality of node tasks; each node task comprises a task action;
distributing the node task to a corresponding action node for execution to obtain task data;
and integrating the task data and taking the task data as a task execution result of the task script.
In one possible implementation, the memory 2102 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a topic detection function, etc.), and the like; the storage data area may store data created according to the use of the computer.
Further, the memory 2102 may include high speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid state storage device.
The communication interface 2103 may be an interface of a communication module, such as an interface of a GSM module.
In addition, the electronic device in this embodiment may further include a display 2105, an input unit 2104, and the like.
The structure of the electronic device shown in fig. 7 does not constitute a limitation of the electronic device in the embodiment of the present application, and in practical applications, the electronic device may include more or less components than those shown in fig. 7, or some components may be combined.
The embodiments are described in a progressive mode in the specification, the emphasis of each embodiment is on the difference from the other embodiments, and the same and similar parts among the embodiments can be referred to each other. For the system provided by the embodiment, the description is relatively simple because the system corresponds to the method provided by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method of task orchestration, comprising:
receiving a task script;
dividing the task script according to the node marks to obtain a plurality of node tasks; each node task comprises a task action;
distributing the node task to a corresponding action node for execution to obtain task data;
integrating the task data and using the task data as a task execution result of the task script;
the task scenario is divided according to the node marks, and after a plurality of node tasks are obtained, the method further comprises the following steps:
when the target node task belongs to the unexecuted path of the task scenario, deleting the target node task and the upper dependency and the lower dependency of the target node task, and deleting the other node tasks of which the upper dependency number is less than or equal to 1 along the unexecuted path direction to obtain a simplified task scenario;
distributing the node task to a corresponding action node for execution, and obtaining task data comprises:
distributing the node tasks contained in the simplified task script to corresponding action nodes for execution to obtain task data;
wherein, if the task script is updated, the method further comprises:
confirming the script updating request;
updating the task script according to the script updating request;
judging whether the script updating request is configured with a tracing time or not;
if not, responding to the updating result of the script updating request, and receiving the updated task script;
if yes, setting the node tasks executed by the action nodes in the tracing time to be in a cancel state, and setting all the node tasks corresponding to the updated task scenario to be in a to-be-run state.
2. The task orchestration method according to claim 1, wherein after receiving the task script, further comprising:
storing the task script into a task queue;
calculating the priority of each task script in the task queue;
correspondingly, the task division is carried out on the task scenario according to the node marks, and the obtaining of a plurality of node tasks comprises the following steps:
and dividing the task script with the highest priority in the task queue according to the node marks to obtain a plurality of node tasks.
3. The task orchestration method according to claim 1, wherein distributing the node task to a corresponding action node for execution, and obtaining task data comprises:
determining the task type of each node task containing task action;
and distributing the task type to the corresponding action node for execution according to the task type to obtain task data corresponding to an execution result.
4. The task orchestration method according to any one of claims 1-3, further comprising:
caching the real-time task execution state of the task script as intermediate state data to a preset message queue; the real-time task execution state comprises a task division state and a node task execution state.
5. The task orchestration method according to claim 1, wherein after receiving the task script, further comprising:
carrying out format check and logic check on the task script;
if the format check and the logic detection both pass, analyzing script data of the task script;
and if the script data is successfully analyzed, storing the task script to a database.
6. The task orchestration method according to claim 1 or 3, wherein the action node performing the node task comprises:
analyzing the node task to obtain task parameters; the task parameters comprise at least one of field parameters, port parameters and address parameters;
judging whether the task parameters are successfully analyzed;
if yes, executing the node task according to the task parameter;
and if not, marking the node task execution failure.
7. The task orchestration method according to claim 1, wherein receiving a task scenario comprises:
and after the user arranges tasks based on the user operation interface, receiving a task script returned by the user operation interface.
8. A task orchestration system, comprising:
the task receiving module is used for receiving the task script;
the task segmentation module is used for carrying out task division on the task script according to the node marks to obtain a plurality of node tasks; each node task comprises a task action;
the task execution module is used for distributing the node tasks to corresponding action nodes for execution to obtain task data;
the data integration module is used for integrating the task data and taking the task data as a task execution result of the task script;
the task reduction module is used for deleting the target node task and the upper dependency and the lower dependency of the target node task when the target node task belongs to the unexecuted path of the task scenario, and deleting other node tasks which do not contain the upper dependency along the unexecuted path until the number of the upper dependencies of the reduced node tasks is greater than 0, so that the simplified task scenario is obtained;
correspondingly, the task execution module is a module for distributing the node tasks contained in the simplified task script to corresponding action nodes for execution to obtain task data;
an update module for performing the steps of:
confirming the script updating request; updating the task script according to the script updating request;
judging whether the script updating request is configured with a tracing time or not;
if not, responding to the updating result of the script updating request, and receiving the updated task script;
if yes, determining a safety task corresponding to the task scenario in the tracing time, setting the node task in the execution state to be in a cancel state, and setting all node tasks corresponding to the updated task scenario to be in a to-be-run state.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the task orchestration method according to any one of claims 1-7.
10. An electronic device, comprising:
a memory having a computer program stored therein and a processor implementing the steps of the task orchestration method according to any one of claims 1-7 when called by the computer program in the memory.
CN202110327093.9A 2021-03-26 2021-03-26 Task arranging method, system, storage medium and electronic equipment Active CN113098854B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110327093.9A CN113098854B (en) 2021-03-26 2021-03-26 Task arranging method, system, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110327093.9A CN113098854B (en) 2021-03-26 2021-03-26 Task arranging method, system, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113098854A CN113098854A (en) 2021-07-09
CN113098854B true CN113098854B (en) 2023-04-07

Family

ID=76670179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110327093.9A Active CN113098854B (en) 2021-03-26 2021-03-26 Task arranging method, system, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113098854B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157495B (en) * 2021-12-06 2024-04-19 杭州安恒信息安全技术有限公司 Secure network scenario arrangement method, apparatus, device and readable storage medium
CN114385278A (en) * 2021-12-30 2022-04-22 北京安博通科技股份有限公司 SOAR script running method, device, readable medium and server

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328361A (en) * 2020-11-02 2021-02-05 杭州当虹科技股份有限公司 Method for rapidly deploying kubenetes cluster

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101963908B (en) * 2010-09-30 2013-04-24 山东中创软件工程股份有限公司 Method and device for realizing dynamic merging of branches in unstructured process
CN102193826B (en) * 2011-05-24 2012-12-19 哈尔滨工程大学 Method for high-efficiency task scheduling of heterogeneous multi-core processor
CN104580381B (en) * 2014-12-17 2018-02-06 上海彩亿信息技术有限公司 A kind of method that job task is performed in multinode network
CN105007200B (en) * 2015-07-31 2019-08-20 上海携程商务有限公司 The analysis method and system of network packet
CN106790693A (en) * 2017-02-20 2017-05-31 北京孚耐尔科技有限公司 The analysis method and system of a kind of network packet
CN109656699A (en) * 2018-12-14 2019-04-19 平安医疗健康管理股份有限公司 Distributed computing method, device, system, equipment and readable storage medium storing program for executing
CN111949394A (en) * 2020-07-16 2020-11-17 广州玖的数码科技有限公司 Method, system and storage medium for sharing computing power resource

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328361A (en) * 2020-11-02 2021-02-05 杭州当虹科技股份有限公司 Method for rapidly deploying kubenetes cluster

Also Published As

Publication number Publication date
CN113098854A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN110191063B (en) Service request processing method, device, equipment and storage medium
CN113098854B (en) Task arranging method, system, storage medium and electronic equipment
CN102542382A (en) Method and device for managing business rule
CN110489310B (en) Method and device for recording user operation, storage medium and computer equipment
CN113361838A (en) Business wind control method and device, electronic equipment and storage medium
CN110764894A (en) Timed task management method, device, equipment and storage medium
CN113760677A (en) Abnormal link analysis method, device, equipment and storage medium
CN109657485B (en) Authority processing method and device, terminal equipment and storage medium
CN107577527B (en) Task generation and scheduling method and device
CN110457132B (en) Method and device for creating functional object and terminal equipment
CN115329170A (en) Webpage crawling method, device, equipment and storage medium
CN110908642B (en) Policy generation execution method and device
CN110893616B (en) Remote control method and device, computer equipment and storage medium
CN116028479A (en) Data reconciliation system, method, equipment and storage medium
US10346626B1 (en) Versioned access controls
CN110928630A (en) Activation control method, device and equipment for application program window and storage medium
CN114090268B (en) Container management method and container management system
CN111080250B (en) Flow backspacing compensation method and device, storage medium and electronic equipment
CN114924937A (en) Batch task processing method and device, electronic equipment and computer readable medium
US10771586B1 (en) Custom access controls
CN111400060A (en) Equipment linkage method, device, server and medium
CN112148803A (en) Method, device and equipment for calling tasks in block chain and readable storage medium
CN106557359B (en) Task scheduling method and system
JP7470769B1 (en) How to analyze cloud API changes
CN109063199B (en) Resource filtering method and device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant