SOAR-based script arrangement method and device, equipment and medium

By automating the filtering and encapsulation of XML script components in the SOAR system, generating sub-scripts and determining their placement, the problem of low script arrangement efficiency is solved, and an efficient and executable script arrangement process is achieved.

CN115422401BActive Publication Date: 2026-01-23HANGZHOU DBAPPSECURITY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211136352.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-19
Publication Date
2026-01-23
Estimated Expiration
2042-09-19

AI Technical Summary

Technical Problem

Existing technologies in SOAR systems have low script arrangement efficiency, large and chaotic script components, and require manual adjustment of components and logic lines, which cannot guarantee the executability and maintainability of the script.

Method used

By selecting components that meet preset conditions from the original XML script, encapsulating and extracting them to generate sub-scripts, and using mapping relationships, position coordinates, node relationships, and connector types to determine the arrangement position, the script view is automatically parsed and rendered.

Benefits of technology

It enables automated script arrangement without requiring knowledge of related business processes, improving arrangement efficiency, ensuring script executability and maintainability, and reducing manpower and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115422401B_ABST
    Figure CN115422401B_ABST
Patent Text Reader

Abstract

The application discloses a SOAR-based script arrangement method and device, equipment and medium, relates to the technical field of computers, and is applied to a preset software development tool, which comprises the following steps: screening out a to-be-separated component meeting a preset separation condition from all original components of an original XML script, encapsulating and separating the to-be-separated component to obtain a corresponding sub-script, and then using the mapping relationship of the sub-script and the original script to obtain a to-be-arranged XML script; parsing the to-be-arranged XML script to obtain to-be-arranged JSON data containing to-be-arranged components, acquiring the position coordinates, node relationship, connection line type and connection line quantity of a to-be-arranged node of the to-be-arranged components; determining an arrangement starting node from the to-be-arranged node so as to determine the arrangement position of the to-be-arranged node; parsing the to-be-arranged JSON data based on the arrangement position of the to-be-arranged node to obtain a target XML script, and rendering the target XML script to obtain a target script view. The efficiency of script arrangement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and in particular to a script arrangement method and device based on SOAR, equipment and medium. BACKGROUND

[0002] In order to solve the security problem, a large amount of manpower, material resources and time need to be invested, and the controllability of the security problem cannot be guaranteed. At present, SOAR (Software Development Kit, software development kit) as a security arrangement, automation and response system greatly saves manpower and time and improves work efficiency. However, with the complexity of business, the construction of the script is becoming more and more complex, the readability and maintainability are sharply reduced, the script cannot be executed, and the trend of the script flow cannot be predicted. In the field of security automation, with the help of the ability of SOAR automatic arrangement and response, when arranging the script, it is often difficult to arrange the script when the business is complex, the script component is large, the script arrangement is chaotic, the components overlap, and the lines are disordered. And the prior art requires analysts to manually adjust the position of the component and the logic line very well, and the efficiency is very low.

[0003] From the above, it can be seen that how to improve the efficiency of script arrangement is a problem to be solved in the art. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a script arrangement method and device based on SOAR, equipment and medium, which improves the efficiency of script arrangement. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a script arrangement method based on SOAR, applied to a preset software development tool, comprising:

[0006] Filtering out a to-be-separated component satisfying a preset separation condition from all original components of an original XML script, and performing encapsulation and separation on the to-be-separated component to obtain a corresponding sub-script, and then using the mapping relationship of the sub-script and the original script to obtain a to-be-arranged XML script;

[0007] Parsing the to-be-arranged XML script to obtain to-be-arranged JSON data containing to-be-arranged components, and obtaining position coordinates, node relationships, connection line types and connection line quantities of to-be-arranged nodes of the to-be-arranged components;

[0008] Determining an arrangement starting node from the to-be-arranged nodes, so as to determine the arrangement position of the to-be-arranged nodes based on the arrangement starting node and using the position coordinates, the node relationships, the connection line types and the connection line quantities;

[0009] The JSON data to be arranged is parsed based on the arrangement position of the node to be arranged to obtain the target XML script, and the target XML script is rendered to obtain the target script view.

[0010] Optionally, the step of filtering out components that meet preset extraction conditions from all original components of the original XML script includes:

[0011] Filter out the components to be extracted from all the original components of the original XML script, which contain start and end nodes;

[0012] Accordingly, before selecting components to be extracted from all original components of the original XML script that meet the preset extraction conditions, the process further includes:

[0013] By having the user mark the nodes corresponding to the component to be extracted, a start node containing a preset start mark and an end node containing a preset end mark are obtained.

[0014] Optionally, determining the arrangement position of the node to be arranged using the location coordinates, the node relationship, the connection type, and the number of connection lines includes:

[0015] If the connection type of the current orchestration node meets the first preset condition, then the orchestration position of the current orchestration node is determined to be the first preset display area;

[0016] If the type and number of connecting lines of the current arrangement node meet the second preset condition, then the first arrangement position of the current arrangement node is determined as the second preset display area, and the second arrangement position of the current arrangement node in the second preset display area is determined by using the position coordinates and the node relationship;

[0017] If the connection type of the current arrangement node meets the third preset condition, then the arrangement position of the current arrangement node is determined to be the third preset display area.

[0018] Optionally, after determining the arrangement position of the node to be arranged using the location coordinates, the node relationship, the connection type, and the number of connection lines, the method further includes:

[0019] The arrangement positions of the nodes to be arranged and the component content of the components to be arranged are verified to obtain the verification results;

[0020] Generate a preset prompt message corresponding to the verification result, and display the preset prompt message at a preset position of the component to be arranged.

[0021] Optionally, the step of verifying the arrangement position of the node to be arranged and the component content of the component to be arranged to obtain the verification result includes:

[0022] Obtain the component type, component content, and component inputs and outputs of the component to be orchestrated;

[0023] Based on preset view rules, and using the component type, component content, component input and output, the arrangement position of the node to be arranged and the component content of the component to be arranged are verified to obtain the verification result.

[0024] Optionally, after rendering the target XML script to obtain the target script view, the method further includes:

[0025] The target script view is parsed to obtain the target JSON data;

[0026] The view flow rules of the target script view are obtained based on the target JSON data, and the corresponding view animation is determined based on the view flow rules. Then, the view animation is added and rendered into the target script view so that when a preset animation demonstration instruction is received, the view animation is demonstrated through the demonstration position corresponding to the target script view.

[0027] Optionally, obtaining the view flow rules of the target script view based on the target JSON data, and determining the corresponding view animation based on the view flow rules, includes:

[0028] Based on the node relationships, component types, and component content expressions of the target JSON data, obtain the view flow rules of the target script view;

[0029] Based on the view navigation rules, the demonstration path, demonstration time, and prompt content of the corresponding view animation are determined.

[0030] Secondly, this application discloses a SOAR-based script arrangement device, applied to a pre-defined software development tool, comprising:

[0031] The script acquisition module is used to filter out components that meet preset extraction conditions from all original components of the original XML script, and to encapsulate and extract the components to be extracted to obtain the corresponding sub-scripts. Then, the mapping relationship of the sub-scripts and the original script are used to obtain the XML script to be arranged.

[0032] The information acquisition module is used to parse the XML script to be arranged to obtain the JSON data to be arranged containing the components to be arranged, and to obtain the position coordinates, node relationships, connection types and number of connections of the nodes to be arranged of the components to be arranged.

[0033] The arrangement position determination module is used to determine the arrangement start node from the nodes to be arranged, so as to determine the arrangement position of the nodes to be arranged based on the arrangement start node and using the position coordinates, the node relationship, the connection type and the number of connection lines;

[0034] The script view acquisition module is used to parse the JSON data to be arranged based on the arrangement position of the node to be arranged to obtain the target XML script, and to render the target XML script to obtain the target script view.

[0035] Thirdly, this application discloses an electronic device, including:

[0036] Memory, used to store computer programs;

[0037] A processor is used to execute the computer program to implement the steps of the aforementioned disclosed SOAR-based script arrangement method.

[0038] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed SOAR-based script arrangement method.

[0039] As can be seen, this application selects components that meet preset extraction conditions from all original components of the original XML script, and encapsulates and extracts these components to obtain corresponding sub-scripts. Then, using the mapping relationship of the sub-scripts and the original script, an XML script to be arranged is obtained. The XML script to be arranged is parsed to obtain JSON data to be arranged containing the components to be arranged, and the position coordinates, node relationships, connector types, and number of connectors of the nodes to be arranged are obtained. An arrangement start node is determined from the nodes to be arranged, so that the arrangement position of the nodes to be arranged is determined based on the arrangement start node and using the position coordinates, node relationships, connector types, and number of connectors. The JSON data to be arranged is parsed based on the arrangement position of the nodes to be arranged to obtain the target XML script, and the target XML script is rendered to obtain the target script view. Therefore, this application first automatically filters out components that meet the preset extraction conditions and encapsulates and extracts them to obtain the corresponding sub-scripts. Then, based on the arrangement start node, it automatically determines the arrangement position of the node to be arranged using position coordinates, node relationships, connection type, and number of connection lines, so that arrangement parsing can be performed based on the arrangement position to obtain the target XML script. Automated script arrangement can be completed without staff being familiar with the relevant business, greatly improving script arrangement efficiency. Attached Figure Description

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

[0041] Figure 1 This application discloses a flowchart of a SOAR-based script arrangement method.

[0042] Figure 2 This is a schematic diagram illustrating a specific preset prompt message display disclosed in this application;

[0043] Figure 3 This is a schematic diagram of a target script view disclosed in this application;

[0044] Figure 4 This application discloses a specific SOAR-based script arrangement method flowchart.

[0045] Figure 5 This is a schematic diagram illustrating a specific sub-script generation method disclosed in this application;

[0046] Figure 6 This application discloses a specific SOAR-based script arrangement method flowchart.

[0047] Figure 7 This is a specific view animation demonstration diagram disclosed in this application;

[0048] Figure 8 This is a specific view animation demonstration diagram disclosed in this application;

[0049] Figure 9 This is a specific view animation demonstration diagram disclosed in this application;

[0050] Figure 10 This is a schematic diagram of a SOAR-based script arrangement device disclosed in this application;

[0051] Figure 11 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0052] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0053] Solving security issues requires significant investment of manpower, resources, and time, and cannot guarantee the controllability of security problems. Currently, SOAR, as a security orchestration, automation, and response system, greatly saves manpower and time and improves work efficiency. However, with the increasing complexity of business operations, script construction also becomes increasingly complex, drastically reducing readability and maintainability, making it impossible to guarantee script execution and predict the direction of script flow. In the field of security automation, while SOAR's automatic orchestration and response capabilities are used, script orchestration often becomes extremely difficult when business operations are complex. Script components are large, script arrangement is chaotic, components overlap, and lines are misaligned. Furthermore, current technologies require analysts to have a very deep understanding of the relevant business and manually adjust the positions of components and logic lines, which is highly inefficient.

[0054] Therefore, this application provides a SOAR-based script arrangement scheme to improve the efficiency of script arrangement.

[0055] See Figure 1 As shown in the figure, this application discloses a SOAR-based script arrangement method, applied to a preset software development tool, including:

[0056] Step S11: Select components that meet the preset extraction conditions from all original components of the original XML script, and encapsulate and extract the components to be extracted to obtain the corresponding sub-scripts. Then, use the mapping relationship of the sub-scripts and the original script to obtain the XML script to be arranged.

[0057] In this embodiment, existing technology, during the orchestration process, discovers that a certain component logic can be extracted into a sub-script. In this case, the user needs to return and recreate the sub-script before proceeding to the next step, leading to prolonged orchestration time, increased error rates, and a lack of intuitive understanding of the sub-script's business logic, causing the orchestration process to stall. In this embodiment, the user only needs to mark the components as detached, eliminating the need for returning to previous steps. This automatically filters out components that meet preset extraction conditions, obtaining the corresponding sub-scripts, ensuring a smooth orchestration process and saving time spent on re-arranging.

[0058] Step S12: Parse the XML script to be arranged to obtain the JSON data to be arranged containing the components to be arranged, and obtain the position coordinates, node relationships, connection types and number of connections of the nodes to be arranged of the components to be arranged.

[0059] In this embodiment, the XML (eXtensible Markup Language) script to be arranged is parsed into JSON (JavaScript Object Notation) data to be arranged. The parsing method can be a sorting algorithm, a recursive algorithm, or a rule-based algorithm. The JSON data to be arranged is analyzed to obtain the position coordinates (x, y) and width and height (w, h) of each node to be arranged; the node relationship of each node to be arranged is obtained, namely the parent node, child node, incoming and outgoing connection types, and the number of connections.

[0060] Step S13: Determine the start node for arrangement from the nodes to be arranged, so as to determine the arrangement position of the nodes to be arranged based on the start node and using the position coordinates, the node relationships, the connection type and the number of connection lines.

[0061] In this embodiment, determining the arrangement position of the node to be arranged using the position coordinates, the node relationship, the connection type, and the number of connection lines specifically includes: if the connection type of the current arrangement node meets a first preset condition, then the arrangement position of the current arrangement node is determined to be a first preset display area; if the connection type and the number of connection lines of the current arrangement node meet a second preset condition, then the first arrangement position of the current arrangement node is determined to be a second preset display area, and the second arrangement position of the current arrangement node in the second preset display area is determined using the position coordinates and the node relationship; if the connection type of the current arrangement node meets a third preset condition, then the arrangement position of the current arrangement node is determined to be a third preset display area. It is important to note that the first preset condition, "connector type," indicates that the current orchestration node has no input line type, and the first preset display area is a preset separate display area, meaning that the current orchestration node is displayed as a free node. The second preset condition, "connector type and number of connectors," indicates that the current orchestration node has multiple output line types simultaneously, and the second orchestration position in the second preset display area is calculated by averaging the horizontal distances of the current orchestration nodes and arranging them equally. The third preset condition, "connector type," indicates that the current orchestration node has a loop, and the third preset display area is the leftmost or rightmost node in the display area, that is, the current orchestration node is marked as the leftmost or rightmost node.

[0062] In this embodiment, after determining the arrangement position of the node to be arranged using the location coordinates, the node relationship, the connection type, and the number of connection lines, the method further includes: verifying the arrangement position of the node to be arranged and the component content of the component to be arranged to obtain a verification result; generating preset prompt information corresponding to the verification result, and displaying the preset prompt information through the preset position of the component to be arranged. For example... Figure 2 The diagram illustrates a specific example of a preset prompt message display. The preset prompt messages, such as "The process lacks an end event" or "The process has multiple blank start events," are displayed at preset positions on the components to be arranged.

[0063] In this embodiment, the verification of the arrangement position of the node to be arranged and the component content of the component to be arranged to obtain the verification result specifically includes: obtaining the component type, component content, and component input and output of the component to be arranged; based on preset view rules, and using the component type, component content, and component input and output, verifying the arrangement position of the node to be arranged and the component content of the component to be arranged to obtain the verification result. For example, the preset view rules are standard view rules or custom rules, automatically analyzing the legality of the position of each node to be arranged, and analyzing the completeness and rationality of the content. This embodiment implements the logic of automated script detection, thereby ensuring the rationality and completeness of the script during script arrangement, reducing the error rate of script execution, and ensuring the executability and reproducibility of the arranged script.

[0064] Step S14: Based on the arrangement position of the node to be arranged, parse the JSON data to be arranged to obtain the target XML script, and render the target XML script to obtain the target script view.

[0065] In this embodiment, for example Figure 3 The diagram shows a target script view. After arranging a messy script, a target script view that is easier for users to understand is obtained. The script layout function is automated, reducing the layout time.

[0066] As can be seen, this application selects components that meet preset extraction conditions from all original components of the original XML script, and encapsulates and extracts these components to obtain corresponding sub-scripts. Then, using the mapping relationship of the sub-scripts and the original script, an XML script to be arranged is obtained. The XML script to be arranged is parsed to obtain JSON data to be arranged containing the components to be arranged, and the position coordinates, node relationships, connector types, and number of connectors of the nodes to be arranged are obtained. An arrangement start node is determined from the nodes to be arranged, so that the arrangement position of the nodes to be arranged is determined based on the arrangement start node and using the position coordinates, node relationships, connector types, and number of connectors. The JSON data to be arranged is parsed based on the arrangement position of the nodes to be arranged to obtain the target XML script, and the target XML script is rendered to obtain the target script view. Therefore, this application first automatically filters out components that meet the preset extraction conditions and encapsulates and extracts them to obtain the corresponding sub-scripts. Then, based on the arrangement start node, it automatically determines the arrangement position of the node to be arranged using position coordinates, node relationships, connection type, and number of connection lines, so that arrangement parsing can be performed based on the arrangement position to obtain the target XML script. Automated script arrangement can be completed without staff being familiar with the relevant business, greatly improving script arrangement efficiency.

[0067] See Figure 4 As shown, this application discloses a specific SOAR-based script arrangement method, applied to a pre-defined software development tool, including:

[0068] Step S21: Select components containing start and end nodes from all original components of the original XML script, and encapsulate and extract the components to be extracted to obtain the corresponding sub-scripts. Then, use the mapping relationship of the sub-scripts and the original script to obtain the XML script to be arranged.

[0069] In this embodiment, before selecting components that meet preset extraction conditions from all original components of the original XML script, the method further includes: having the user mark the nodes corresponding to the components to be extracted as free marks, to obtain the start node containing a preset start free mark and the end node containing a preset end free mark. It can be understood that during the arrangement process, the user only needs to mark the corresponding nodes with preset start free marks and the corresponding nodes with preset end free marks. Then, the components to be extracted that contain both the start node with the preset start free mark and the end node with the preset end free mark are the ones that need to be selected to generate sub-scripts.

[0070] In this embodiment, for example Figure 5The diagram shown illustrates a specific sub-script generation method. Figure 5 The components to be extracted are automatically extracted and encapsulated to generate sub-script 1, i.e. Figure 6 The diagram illustrates a specific sub-script generation process. When sub-script 1 is clicked, the complete sub-script is displayed based on the mapping relationship, for example... Figure 7 The diagram illustrates a specific sub-script generation method. Therefore, this embodiment achieves automated sub-script generation, thereby simplifying the complexity of script arrangement, eliminating the tedious process of repeatedly exiting and individually editing sub-scripts during script arrangement, improving script arrangement efficiency, and saving time and manpower costs. The automated sub-script generation is handled by the SDK (Software Development Kit).

[0071] Step S22: Parse the XML script to be arranged to obtain the JSON data to be arranged containing the components to be arranged, and obtain the position coordinates, node relationships, connection types and number of connections of the nodes to be arranged of the components to be arranged.

[0072] Step S23: Determine the start node for arrangement from the nodes to be arranged, so as to determine the arrangement position of the nodes to be arranged based on the start node and using the position coordinates, the node relationships, the connection type and the number of connection lines.

[0073] Step S24: Based on the arrangement position of the node to be arranged, parse the JSON data to be arranged to obtain the target XML script, and render the target XML script to obtain the target script view.

[0074] Therefore, in this application, users do not need to return to the previously arranged process during the entire process. They only need to follow the process to arrange it, which ensures the smoothness of the process, improves the user experience, and reduces the arrangement time. Furthermore, because this application can automatically filter out the components to be extracted to generate sub-scripts, the efficiency is significantly improved.

[0075] See Figure 8 As shown, this application discloses a specific SOAR-based script arrangement method, applied to a pre-defined software development tool, including:

[0076] Step S31: Select components that meet the preset extraction conditions from all original components of the original XML script, and encapsulate and extract the components to be extracted to obtain the corresponding sub-scripts. Then, use the mapping relationship of the sub-scripts and the original script to obtain the XML script to be arranged.

[0077] Step S32: Parse the XML script to be arranged to obtain the JSON data to be arranged containing the components to be arranged, and obtain the position coordinates, node relationships, connection types and number of connections of the nodes to be arranged of the components to be arranged.

[0078] Step S33: Determine the start node for arrangement from the nodes to be arranged, so as to determine the arrangement position of the nodes to be arranged based on the start node and using the position coordinates, the node relationships, the connection type and the number of connection lines.

[0079] Step S34: Based on the arrangement position of the node to be arranged, parse the JSON data to be arranged to obtain the target XML script, and render the target XML script to obtain the target script view.

[0080] Step S35: Parse the target script view to obtain target JSON data.

[0081] Step S36: Obtain the view flow rules of the target script view based on the target JSON data, determine the corresponding view animation based on the view flow rules, and then add the view animation to the target script view so that when a preset animation demonstration instruction is received, the view animation is demonstrated through the demonstration position corresponding to the target script view.

[0082] In this embodiment, obtaining the view flow rules of the target script view based on the target JSON data, and determining the corresponding view animation based on the view flow rules, specifically includes: obtaining the view flow rules of the target script view based on the node relationships, component types, and component content expressions of the target JSON data; and determining the demonstration path, demonstration time, and prompt content of the corresponding view animation based on the view flow rules. For example... Figure 9 The diagram shown is a specific view animation demonstration, which demonstrates the script's progression and basic business logic in corresponding positions.

[0083] Therefore, this application achieves automated addition of animation effects, enabling complex scripts to understand their trajectory and basic business logic through process animation, thereby maximizing the value of the script and providing a direct demonstration of the script view to clients.

[0084] See Figure 10 As shown in the figure, this application discloses a SOAR-based script arrangement device, applied to a preset software development tool, including:

[0085] The script acquisition module 11 is used to filter out components that meet preset extraction conditions from all original components of the original XML script, and to encapsulate and extract the components to be extracted to obtain the corresponding sub-scripts. Then, the mapping relationship of the sub-scripts and the original script are used to obtain the XML script to be arranged.

[0086] The information acquisition module 12 is used to parse the XML script to be arranged to obtain the JSON data to be arranged containing the components to be arranged, and to obtain the position coordinates, node relationships, connection types and number of connection lines of the nodes to be arranged of the components to be arranged.

[0087] The arrangement position determination module 13 is used to determine the arrangement start node from the nodes to be arranged, so as to determine the arrangement position of the nodes to be arranged based on the arrangement start node and using the position coordinates, the node relationship, the connection line type and the number of connection lines;

[0088] The script view acquisition module 14 is used to parse the JSON data to be arranged based on the arrangement position of the node to be arranged to obtain the target XML script, and to render the target XML script to obtain the target script view.

[0089] As can be seen, this application selects components that meet preset extraction conditions from all original components of the original XML script, and encapsulates and extracts these components to obtain corresponding sub-scripts. Then, using the mapping relationship of the sub-scripts and the original script, an XML script to be arranged is obtained. The XML script to be arranged is parsed to obtain JSON data to be arranged containing the components to be arranged, and the position coordinates, node relationships, connector types, and number of connectors of the nodes to be arranged are obtained. An arrangement start node is determined from the nodes to be arranged, so that the arrangement position of the nodes to be arranged is determined based on the arrangement start node and using the position coordinates, node relationships, connector types, and number of connectors. The JSON data to be arranged is parsed based on the arrangement position of the nodes to be arranged to obtain the target XML script, and the target XML script is rendered to obtain the target script view. Therefore, this application first automatically filters out components that meet the preset extraction conditions and encapsulates and extracts them to obtain the corresponding sub-scripts. Then, based on the arrangement start node, it automatically determines the arrangement position of the node to be arranged using position coordinates, node relationships, connection type, and number of connection lines, so that arrangement parsing can be performed based on the arrangement position to obtain the target XML script. Automated script arrangement can be completed without staff being familiar with the relevant business, greatly improving script arrangement efficiency.

[0090] In some specific embodiments, the script acquisition module 11 includes:

[0091] The filtering unit is used to filter out components that contain start and end nodes from all the original components of the original XML playbook.

[0092] In some specific embodiments, the SOAR-based script arrangement device includes:

[0093] The marking unit is used to mark the nodes corresponding to the component to be extracted by the user to obtain the start node containing a preset start mark and the end node containing a preset end mark.

[0094] In some specific embodiments, the arrangement position determination module 13 includes:

[0095] The first determining unit is configured to determine the arrangement position of the current arrangement node as the first preset display area if the connection line type of the current arrangement node meets the first preset condition.

[0096] The second determining unit is configured to determine the first arrangement position of the current arrangement node as the second preset display area if the connection type and the number of connection lines of the current arrangement node meet the second preset condition, and to determine the second arrangement position of the current arrangement node in the second preset display area using the position coordinates and the node relationship.

[0097] The third determining unit is used to determine the arrangement position of the current arrangement node as the third preset display area if the connection line type of the current arrangement node meets the third preset condition.

[0098] In some specific embodiments, the SOAR-based script arrangement device includes:

[0099] The prompt information display unit is used to verify the arrangement position of the node to be arranged and the component content of the component to be arranged in order to obtain the verification result; generate the preset prompt information corresponding to the verification result, and display the preset prompt information through the preset position of the component to be arranged.

[0100] In some specific embodiments, the prompt information display unit includes:

[0101] The verification unit is used to obtain the component type, component content, and component input and output of the component to be arranged; based on preset view rules, and using the component type, component content, and component input and output, to verify the arrangement position of the node to be arranged and the component content of the component to be arranged, so as to obtain the verification result.

[0102] In some specific embodiments, the SOAR-based script arrangement device includes:

[0103] An animation demonstration unit is used to parse the target script view to obtain target JSON data; obtain the view flow rules of the target script view based on the target JSON data, determine the corresponding view animation based on the view flow rules, and then add the view animation to the target script view for rendering, so that when a preset animation demonstration instruction is received, the view animation is demonstrated through the demonstration position corresponding to the target script view.

[0104] In some specific embodiments, the animation demonstration unit includes:

[0105] The view animation determination unit is used to obtain the view flow rules of the target script view based on the node relationships, component types, and component content expressions of the target JSON data; and to determine the demonstration path, demonstration time, and prompt content of the corresponding view animation based on the view flow rules.

[0106] Furthermore, embodiments of this application also provide an electronic device. Figure 11 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0107] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the following steps:

[0108] Filter out components that meet the preset extraction conditions from all original components of the original XML script, and encapsulate and extract the components to be extracted to obtain the corresponding sub-scripts. Then, use the mapping relationship of the sub-scripts and the original script to obtain the XML script to be arranged.

[0109] The XML script to be arranged is parsed to obtain the JSON data to be arranged containing the components to be arranged, and the position coordinates, node relationships, connection types and number of connections of the nodes to be arranged of the components to be arranged are obtained.

[0110] A start node for arrangement is determined from the nodes to be arranged, so that the arrangement position of the nodes to be arranged is determined based on the start node for arrangement, using the position coordinates, the node relationships, the connection type, and the number of connection lines;

[0111] The JSON data to be arranged is parsed based on the arrangement position of the node to be arranged to obtain the target XML script, and the target XML script is rendered to obtain the target script view.

[0112] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:

[0113] Filter out the components to be extracted from all the original components of the original XML script, which contain start and end nodes;

[0114] Accordingly, before selecting components to be extracted from all original components of the original XML script that meet the preset extraction conditions, the process further includes:

[0115] By having the user mark the nodes corresponding to the component to be extracted, a start node containing a preset start mark and an end node containing a preset end mark are obtained.

[0116] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:

[0117] If the connection type of the current orchestration node meets the first preset condition, then the orchestration position of the current orchestration node is determined to be the first preset display area;

[0118] If the type and number of connecting lines of the current arrangement node meet the second preset condition, then the first arrangement position of the current arrangement node is determined as the second preset display area, and the second arrangement position of the current arrangement node in the second preset display area is determined by using the position coordinates and the node relationship;

[0119] If the connection type of the current arrangement node meets the third preset condition, then the arrangement position of the current arrangement node is determined to be the third preset display area.

[0120] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:

[0121] The arrangement positions of the nodes to be arranged and the component content of the components to be arranged are verified to obtain the verification results;

[0122] Generate a preset prompt message corresponding to the verification result, and display the preset prompt message at a preset position of the component to be arranged.

[0123] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:

[0124] Obtain the component type, component content, and component inputs and outputs of the component to be orchestrated;

[0125] Based on preset view rules, and using the component type, component content, component input and output, the arrangement position of the node to be arranged and the component content of the component to be arranged are verified to obtain the verification result.

[0126] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:

[0127] The target script view is parsed to obtain the target JSON data;

[0128] The view flow rules of the target script view are obtained based on the target JSON data, and the corresponding view animation is determined based on the view flow rules. Then, the view animation is added and rendered into the target script view so that when a preset animation demonstration instruction is received, the view animation is demonstrated through the demonstration position corresponding to the target script view.

[0129] In some specific embodiments, the processor, by executing a computer program stored in the memory, may further include the following steps:

[0130] Based on the node relationships, component types, and component content expressions of the target JSON data, obtain the view flow rules of the target script view;

[0131] Based on the view navigation rules, the demonstration path, demonstration time, and prompt content of the corresponding view animation are determined.

[0132] In this embodiment, the power supply 23 is used to provide operating voltage for various hardware devices on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0133] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0134] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.

[0135] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the SOAR-based script arrangement method executed by the electronic device as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.

[0136] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program, which, when loaded and executed by a processor, implements the method steps performed during the SOAR-based script arrangement process disclosed in any of the foregoing embodiments.

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

[0138] The above provides a detailed description of the SOAR-based script arrangement method, apparatus, device, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A SOAR-based script arrangement method, characterized in that, Applied to pre-built software development tools, including: Filter out components that meet the preset extraction conditions from all original components of the original XML script, and encapsulate and extract the components to be extracted to obtain the corresponding sub-scripts. Then, use the mapping relationship of the sub-scripts and the original script to obtain the XML script to be arranged. The XML script to be arranged is parsed to obtain the JSON data to be arranged containing the components to be arranged, and the position coordinates, node relationships, connection types and number of connections of the nodes to be arranged of the components to be arranged are obtained. A start node for arrangement is determined from the nodes to be arranged, so that the arrangement position of the nodes to be arranged is determined based on the start node for arrangement, using the position coordinates, the node relationships, the connection type, and the number of connection lines; Based on the arrangement position of the node to be arranged, the JSON data to be arranged is parsed to obtain the target XML script, and the target XML script is rendered to obtain the target script view; The step of filtering out components that meet preset extraction conditions from all original components of the original XML script includes: Filter out the components to be extracted from all the original components of the original XML script, which contain start and end nodes; Accordingly, before selecting components that meet preset extraction conditions from all original components of the original XML script, the process further includes: By having the user mark the nodes corresponding to the component to be extracted, a start node containing a preset start mark and an end node containing a preset end mark are obtained.

2. The SOAR-based script arrangement method according to claim 1, characterized in that, Determining the arrangement position of the nodes to be arranged using the location coordinates, the node relationships, the connection type, and the number of connection lines includes: If the connection type of the current orchestration node meets the first preset condition, then the orchestration position of the current orchestration node is determined to be the first preset display area; If the type and number of connecting lines of the current arrangement node meet the second preset condition, then the first arrangement position of the current arrangement node is determined as the second preset display area, and the second arrangement position of the current arrangement node in the second preset display area is determined by using the position coordinates and the node relationship; If the connection type of the current arrangement node meets the third preset condition, then the arrangement position of the current arrangement node is determined to be the third preset display area.

3. The SOAR-based script arrangement method according to claim 1 or 2, characterized in that, After determining the arrangement position of the nodes to be arranged using the location coordinates, the node relationships, the connection type, and the number of connection lines, the method further includes: The arrangement positions of the nodes to be arranged and the component content of the components to be arranged are verified to obtain the verification results; Generate a preset prompt message corresponding to the verification result, and display the preset prompt message at a preset position of the component to be arranged.

4. The SOAR-based script arrangement method according to claim 3, characterized in that, The process of verifying the arrangement position of the nodes to be arranged and the component content of the components to be arranged, in order to obtain the verification result, includes: Obtain the component type, component content, and component inputs and outputs of the component to be orchestrated; Based on preset view rules, and using the component type, component content, component input and output, the arrangement position of the node to be arranged and the component content of the component to be arranged are verified to obtain the verification result.

5. The SOAR-based script arrangement method according to claim 1, characterized in that, After rendering the target XML script to obtain the target script view, the process further includes: The target script view is parsed to obtain the target JSON data; The view flow rules of the target script view are obtained based on the target JSON data, and the corresponding view animation is determined based on the view flow rules. Then, the view animation is added and rendered into the target script view so that when a preset animation demonstration instruction is received, the view animation is demonstrated through the demonstration position corresponding to the target script view.

6. The SOAR-based script arrangement method according to claim 5, characterized in that, The step of obtaining the view flow rules of the target script view based on the target JSON data, and determining the corresponding view animation based on the view flow rules, includes: Based on the node relationships, component types, and component content expressions of the target JSON data, obtain the view flow rules of the target script view; Based on the view navigation rules, the demonstration path, demonstration time, and prompt content of the corresponding view animation are determined.

7. A SOAR-based script arrangement device, characterized in that, Applied to pre-built software development tools, including: The script acquisition module is used to filter out components that meet preset extraction conditions from all original components of the original XML script, and to encapsulate and extract the components to be extracted to obtain the corresponding sub-scripts. Then, the mapping relationship of the sub-scripts and the original script are used to obtain the XML script to be arranged. The information acquisition module is used to parse the XML script to be arranged to obtain the JSON data to be arranged containing the components to be arranged, and to obtain the position coordinates, node relationships, connection types and number of connections of the nodes to be arranged of the components to be arranged. The arrangement position determination module is used to determine the arrangement start node from the nodes to be arranged, so as to determine the arrangement position of the nodes to be arranged based on the arrangement start node and using the position coordinates, the node relationship, the connection type and the number of connection lines; The script view acquisition module is used to parse the JSON data to be arranged based on the arrangement position of the node to be arranged to obtain the target XML script, and to render the target XML script to obtain the target script view; The script acquisition module is specifically used for: Filter out the components to be extracted from all the original components of the original XML script, which contain start and end nodes; The SOAR-based script arrangement device is specifically used for: By having the user mark the nodes corresponding to the component to be extracted, a start node containing a preset start mark and an end node containing a preset end mark are obtained.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the SOAR-based script arrangement method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when executed by a processor, the computer programs implement the steps of the SOAR-based script arrangement method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Task arrangement method and system, storage medium and electronic equipment

    CN113098854A

  • Event execution method and device and electronic equipment

    CN113468212A