Intelligent scheduling method based on dynamic sceneTechnical Field
The invention relates to the technical field of natural robots, in particular to an intelligent scheduling method based on a dynamic scene.
Background
The current instructions are divided into two broad categories of cloud instructions and local instructions, the cloud instructions can be executed in a remote server environment, and the local instructions need to operate some application programs of a local computer depending on the environment of the local computer. In order to provide richer ability and freedom for users, when the flow arrangement is carried out, the users can freely select instructions to build own flows so as to achieve the purposes of themselves. In order to meet the requirement of user diversity, algorithm analysis needs to be performed on the overall arrangement flow, and the operating environment of the current instruction can be intelligently determined when the application is executed.
Most rpa manufacturers and ipaas manufacturers currently provide single-capability process planning and execution, which limits the realization of many user requirements.
Disclosure of Invention
The invention aims to solve the defects in the background technology by providing an intelligent scheduling method based on a dynamic scene, fusing the rpa and the ipaas at a starting point, analyzing each instruction in a user flow under the fused scene, analyzing the operating environment and the form of the instruction, and determining a scheduling scheme by combining the condition of the whole flow.
The technical scheme adopted by the invention is as follows:
the intelligent scheduling method based on the dynamic scene comprises the following steps:
according to standard convention, in the process of trial operation of a user; reading all execution instructions in the whole canvas area to construct a complete instruction tree;
performing recursive traversal on the instruction tree, analyzing each node in the traversal process, judging the environment in which the current node can run, and marking the node correspondingly;
determining the prior execution environment of the whole process as a server or a local place;
and performing intelligent scheduling according to the determined priority execution environment.
As a preferred technical scheme of the invention: the intelligently scheduling according to the determined priority execution environment specifically includes:
when the prior execution environment is a server, the schema data of all the nodes are sent to the server to be analyzed by the server during execution, and the schema data is sent back to the in-process message through the websocket;
when the preferential execution environment is local, the optimal execution environment of the current instruction can be dynamically adjusted according to the marked mark in the specific execution process.
As a preferred technical scheme of the invention: the standard convention comprises the type of the instruction, the api routing of the service end corresponding to the instruction, the output model of the instruction and the schema structure of the instruction.
As a preferred technical scheme of the invention: and in the traversing process, each node is converted into a singly linked list structure during analysis.
As a preferred technical scheme of the invention: each node is provided with 3 pointers, namely child pointers pointing to the first child nodes of the node; the sitting pointer points to the next brother node of the child node; until the last node there is a return pointer to the parent.
As a preferred technical scheme of the invention: and analyzing the capability model for each node when analyzing each node.
As a preferred technical scheme of the invention: the preferential execution environment for determining the whole process is subjected to combined analysis by the capability model of a single node.
Compared with the prior art, the intelligent scheduling method based on the dynamic scene has the following beneficial effects:
the invention adopts the dynamic programming idea, can analyze the most suitable execution environment of each real execution instruction, adopts the mode of searching the optimal solution, dynamically adjusts in the process, and well solves the difference caused by the fusion of rpa and ipaas; and the method assists in the convention of some standards, so that the diversity of flow arrangement is fundamentally solved.
Drawings
FIG. 1 is a system block diagram of a preferred embodiment of the present invention;
FIG. 2 is a diagram illustrating a transformation of a node tree structure according to a preferred embodiment of the present invention.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and the features in the embodiments may be combined with each other, and the technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. 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 invention.
Referring to fig. 1-2, a preferred embodiment of the present invention provides an intelligent scheduling method based on dynamic scenarios, which includes the following steps:
according to standard convention, in the process of trial operation of a user; reading all execution instructions in the whole canvas area to construct a complete instruction tree;
performing recursive traversal on the instruction tree, analyzing each node in the traversal process, judging the environment in which the current node can run, and marking the node with a corresponding mark;
determining the prior execution environment of the whole process as a server or a local;
and carrying out intelligent scheduling according to the determined priority execution environment.
Specifically, the main concept of the invention is that a set of relatively standard conventions must be provided on the premise, such conventions can distinguish the cloud instruction from the local instruction, and can better serve the execution of the instruction and the dynamic environment judgment of the instruction;
in this embodiment, on the basis of the above premise, when a user performs trial operation, a complete instruction tree is constructed by reading all execution instructions in the whole canvas area; performing recursive traversal on the instruction tree, analyzing each node in the traversal process, judging an environment in which the current node can run, marking the nodes with corresponding marks, and finally comprehensively determining a priority execution environment of the whole process; if the preferential execution environment is local, the optimal execution environment of the current instruction is dynamically adjusted according to the marked mark in the specific execution process; and finally, intelligent scheduling after instruction fusion is achieved.
Specifically, the implementation method comprises the following steps:
1) Standard conventions
In the scene, the cloud instruction has a corresponding account system, the output of the cloud instruction is dynamically generated according to the actual application scene, and in order to be different from the local instruction, some standard conventions must be carried out on the cloud instruction, including but not limited to the type of the instruction, the api routing of the service end corresponding to the instruction, the output model of the instruction, the schema structure of the instruction and the like; after the set of convention, when the instruction is analyzed, the operation environment and the matched data required by operation can be determined.
2) Node tree structure conversion
The nodes in the canvas area are displayed according to a tree structure, but in order to analyze the optimal operation environment of the whole process more accurately and efficiently, the tree structure is converted into a single linked list structure when being analyzed, and each node is provided with 3 pointers which are respectively the first child nodes of child pointers pointing to the nodes; the sitting pointer points to the next brother node of the child node; until the last node, there will be a return pointer pointing to its parent; therefore, a single linked list structure is formed, and the analysis of the node tree is satisfied.
3) Node capability analysis
In the process of analyzing the node tree, the capability model needs to be analyzed for each node, whether the current node can run at the cloud or at the local or only at the local is determined through analysis, and finally, the capability model of a single node is used for combined analysis, so that the running mode and environment of the current whole process are determined, and efficient execution of the process is further performed.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.