CN112015397B - Loop detection method and system - Google Patents

Loop detection method and system Download PDF

Info

Publication number
CN112015397B
CN112015397B CN202010927284.4A CN202010927284A CN112015397B CN 112015397 B CN112015397 B CN 112015397B CN 202010927284 A CN202010927284 A CN 202010927284A CN 112015397 B CN112015397 B CN 112015397B
Authority
CN
China
Prior art keywords
node
precursor
total
successor
subsequent
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
CN202010927284.4A
Other languages
Chinese (zh)
Other versions
CN112015397A (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.)
Shenzhen Polytechnic
Original Assignee
Shenzhen Polytechnic
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 Shenzhen Polytechnic filed Critical Shenzhen Polytechnic
Priority to CN202010927284.4A priority Critical patent/CN112015397B/en
Publication of CN112015397A publication Critical patent/CN112015397A/en
Application granted granted Critical
Publication of CN112015397B publication Critical patent/CN112015397B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Abstract

The application provides a loop detection method, a loop detection system and an electronic terminal, wherein the method comprises the following steps: detecting a first node, and confirming that a first input and/or a first output parameter is newly added in the first node; scanning a second node, and confirming that data dependence exists between the first node and parameters in the second node; and if the parameters in the first node and the second node are confirmed, detecting whether a loop exists or not according to the information of the precursor node and the successor node of the second node. When the loop detection method of the application is applied, when the input/output parameters are newly added in the first node, the first node and the second node form a data dependency relationship, and the specific parameters are consistent, two data transmission paths are formed between the first node and the second node. Whereas in the dataflow graph the data of the two data transmission paths form a loop.

Description

Loop detection method and system
Technical Field
The present application relates to the field of data flow detection technologies, and in particular, to a loop detection method and system.
Background
The data flow programming emphasizes the connection operations with data as driving power, defining the inputs and outputs explicitly. Instead of commands, related operations are performed immediately whenever data is ready and input is valid, and the data flow programming is parallel in nature and can run well on multi-core processors as well as large distributed systems. In data stream programming, a static instance of a data stream program is described in terms of its structure as a directed graph comprising nodes representing computing units and edges connecting the nodes, the edges representing data transmission paths. Data are transmitted between adjacent nodes through edges, the nodes consume the data to calculate, and the generated data are output to an input-output sequence to serve as input of a next calculating unit. When we actually use this dataflow language for dataflow programming, we have found that loops may occur in the dataflow graph due to user inattention or writing errors, possibly leading to erroneous computation results or affecting the operation of the overall dataflow graph computation. The user may need to expend a significant amount of later work to find the loop and override the previous work.
Disclosure of Invention
The technical problems to be solved by the application are as follows: a loop detection method and system are provided for detecting loops in a data stream program, reducing the writing workload.
In order to solve the technical problems, the embodiment adopted by the application is as follows: detecting a first node, and if a first input and/or a first output parameter is newly added in the first node;
scanning a second node, and judging whether data dependence exists between parameters in the first node and the second node;
if the parameters in the first node and the second node are confirmed to have data dependence, detecting whether a loop exists or not according to the information of the precursor node and the subsequent node of the second node.
Specifically, the step of confirming that the parameters in the first node and the second node exist to form data dependence includes:
acquiring a second input parameter and a second output parameter in a second node;
matching the first input parameter with the second output parameter, and if the matching is successful, forming data dependence by the first input parameter and the second output parameter; or alternatively, the process may be performed,
and matching the first output parameter with the second input parameter, and if the matching is successful, forming data dependence by the first output parameter and the second input parameter.
Optionally, before the step of detecting the first node and confirming the newly added first input and/or output parameters in the first node, the method further includes:
and obtaining a first function to form the first node.
Further, the second node further includes a second precursor and/or successor node total set, and after the step of confirming that the parameters in the first node and the second node have data dependency, the method further includes the following steps:
if the second output parameters are consistent with the first input parameters to form data dependence, detecting whether a first node exists in the second precursor node total set, if so, detecting a loop;
and if the second input parameters are consistent with the first output parameters to form data dependence, detecting whether a first node exists in the second subsequent node total set, and if the first node exists in the second subsequent node total set, detecting a loop.
Further, the first node includes a first direct successor node information set and/or a first direct predecessor node information set, and the second node includes a second direct successor node information set and/or a second direct predecessor node information set, and if no loop is detected, the method further includes the following steps:
recording the second node in the first direct successor and/or direct predecessor node information set;
and recording the first node in the second direct predecessor and/or direct successor node information set.
Further, the first node further includes a first precursor node and/or a subsequent node total set, and after the step of recording the second node in the first directly subsequent node and/or the directly precursor node information set, the method further includes the following steps:
recording the second node and the second successor node total set in the first successor node total set and the second predecessor node total set; or alternatively, the process may be performed,
and recording the second node and the second precursor node total set in the first precursor node total set and the second subsequent node total set.
In an embodiment, if the first input and/or output parameters are deleted from the first node and the second node lose the data dependency relationship, the method includes the following steps:
deleting the first node in the second direct successor and/or direct predecessor node information set;
deleting the second node in the first direct predecessor and/or direct successor node information set.
Optionally, if the second node is deleted from the first direct precursor and/or successor node information set, the method further includes the following steps:
the precursor or subsequent total node set of the first node is cleared to be an empty set,
acquiring an N node in a direct precursor or subsequent set of the first node;
adding the precursor total node set of the N nodes to the precursor total node set of the first node; or alternatively, the process may be performed,
adding the successor total node set of the N nodes to the successor total node set of the first node;
wherein N is a natural number. Optionally, if the first node is deleted from the second set of directly successor and/or predecessor node information, further comprising the steps of;
clearing the subsequent or predecessor total node set of the second node as an empty set;
obtaining M nodes of a direct successor or predecessor set of the second node; wherein the total number of nodes in the direct successor or predecessor set of the second node is M;
adding the subsequent node total sets of the M nodes into the precursor node total set of the second node respectively; or alternatively, the process may be performed,
respectively adding the precursor node total sets of the M nodes into the precursor node total set of the second node;
wherein M is a natural number.
A second aspect of the present application provides a loop detection system, the system comprising:
the change module is used for detecting a first node, and if a first input and/or a first output parameter is newly added in the first node;
the data dependence judging module is used for scanning a second node and confirming that the parameters in the first node and the second node have data dependence;
and the loop detection module is used for detecting whether a loop exists according to the precursor and the subsequent information of the second node after confirming that the data dependence exists.
When the loop detection method is applied, in the process of actually writing a program, when input/output parameters are newly added in a first node, and the first node and a second node form a data dependency relationship, a first data transmission path is formed between the first node and the second node, and a first edge is formed in a data flow diagram. The second data transmission path is a reverse path, and the reverse path is determined by whether a pair node is already present in the precursor total node and/or the subsequent total node. Whereas in the dataflow graph the first data transmission path forms a loop with the data of the second data transmission path.
Drawings
The following details the specific construction of the present application with reference to the accompanying drawings
FIG. 1 is a flow chart of a loop detection method according to an embodiment of the present application;
FIG. 2 is a data flow diagram in another embodiment of the present application;
FIG. 3 is a flow chart of a method of deleting a first node in a dataflow graph according to yet another embodiment of the application;
fig. 4 is a flow chart of an embodiment of the loop detection system of the present application.
Detailed Description
In order to describe the technical content, the constructional features, the achieved objects and effects of the present application in detail, the following description is made in connection with the embodiments and the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart of a loop detection method according to an embodiment of the present application; in order to solve the technical problems, the embodiment adopted by the application is as follows: a loop detection method and system, the method includes the following steps:
step S100, detecting a first node, if a first input and/or a first output parameter is newly added in the first node;
step 200, scanning a second node, and judging whether data dependence exists between parameters in the first node and the second node;
and step S300, if the parameters in the first node and the second node are confirmed, detecting whether a loop exists or not according to the information of the precursor node and the successor node of the second node.
When the loop detection method is applied, in the process of actually writing a program, when input/output parameters are newly added in a first node, and the first node and a second node form a data dependency relationship, a first data transmission path is formed between the first node and the second node, and a first edge is formed in a data flow diagram. The second data transmission path is a reverse path, and the reverse path is determined by whether a pair node is already present in the precursor total node and/or the subsequent total node. Whereas in the dataflow graph the first data transmission path forms a loop with the data of the second data transmission path.
The first node and the second node are essentially only virtual products on logic, and in order to form the first node, in a specific embodiment, the step S100 of detecting the first node and before the step of confirming the first input and/or output parameter newly added in the first node further includes:
step S010, obtaining a first function to form a first node.
The first node of the present embodiment is essentially a logical unit running a first function, which may be a functional module. Based on this, the first node is in fact representative of a data operation structure or a data storage structure. The content of the function includes the computation performed by the task node. Therefore, the newly added parameters can be detected in real time, and the detection loop can be dynamically judged.
The above data dependence, essentially the data transmission relationship between two points of a data chain, is described using specific embodiments for the sake of more clear explanation of the present solution. Step S200, the step of confirming that parameters in the first node and the second node exist to form data dependency includes:
step S210, obtaining a second input parameter and a second output parameter in a second node;
step S220, the first input parameter and the second output parameter are matched, and if the matching is successful, the first input parameter and the second output parameter form data dependence.
In a specific embodiment, step S310 includes the following steps:
step S221, extracting at least one first specific input parameter from the first input parameters;
step S212, extracting at least one or more second specific output parameters from the second output parameters;
in step S213, if any one of the first specific input parameters is the same as any one of the second specific output parameters, the matching is successful, and the first input parameters and the second output parameters form a data dependency.
Step S220, the first output parameter and the second input parameter are matched, and if the matching is successful, the first output parameter and the second input parameter form data dependence. Step S210 is substantially the same as step S220, and is divided into two steps, except that the data flow directions of the two steps are opposite, so that the description of step S220 is omitted here.
It should be understood that in the data flow programming, there are generally a plurality of nodes in a data flow graph, in this embodiment, the node A, B, C, D represents a specific relationship between nodes in the data flow graph, and it should be understood that, in this embodiment, node a, node B, node C, and node D represent data flows, which are the same as nodes in other embodiments, and may be different from nodes in some embodiments, where node a has only a first output parameter, and node D has no node.
If the node a directly transmits data to the node B, the node B transmits data to the node C, and the node C transmits data to the node D, then the four node relationships are shown in table 1:
node name Direct precursor node Direct successor node Precursor node Relay node
A Without any means for B Without any means for B、C、D
B A C A C、D
C B D A、B D
D C Without any means for A、B、C Without any means for
TABLE 1
In an embodiment, a first set of direct successor and/or first direct predecessor node information is included within the first node. The first direct successor node information set contains records of all direct successor nodes of the first node, and the first direct predecessor node information set contains records of all direct predecessor nodes of the first node. The second node includes a second direct successor and/or a second direct predecessor node information set. The second direct successor node information set contains records of all direct successor nodes of the second node, and the second direct predecessor node information set contains records of all direct predecessor nodes of the second node. It is to be appreciated that each node may have a corresponding set of direct predecessor node information and/or a corresponding set of direct successor node information. In a particular embodiment, this type of information may be recorded in an array. In a further embodiment, the direct precursor node information set is recorded with Pre [ ], the direct successor node information set is recorded with Suc [ ], and the total set of all precursor node information for that node is recorded with Anc [ ].
It will be appreciated that the direct predecessor and successor nodes of each node are readily discovered. However, only the data obtained by recording the direct predecessor nodes and the direct successor nodes can only process local data. Based on the above, the node may further include a respective precursor node total set and/or a subsequent node total set, where the precursor node total set and/or the subsequent node total set contains node data in the same data path as the node.
It should be appreciated that after the data dependencies are formed, a transitive relationship may be formed between nodes. At this time, a second set of directly successor and/or predecessor node information is applied, and a second set of total successor and/or predecessor node information is applied to record the relationships between the nodes.
The loop determination described above includes only loop determination between the adjacent first node and second node, and in the same data path, another loop may exist, please refer to fig. 2, fig. 2 is a data flow chart in another embodiment of the present application, wherein the node a has just added an input ai1. Wherein A-C-D-E is a data path and B-C-D-E is a data path. For loop detection under the same data path, the judging steps are as follows:
step S300, after the step of confirming that the parameters in the first node and the second node have data dependency, further includes the following steps:
step S311, if the second output parameter is consistent with the first input parameter to form data dependence, detecting whether a first node exists in the second precursor node total set, and if the first node exists in the second precursor node total set, detecting a loop;
step S312, if the second output parameter is consistent with the first input parameter, and a data dependency is formed, detecting whether the second precursor node total set has a first node, and if the second precursor node total set has a first node, detecting a loop.
According to step S311, the second input parameter is consistent with the first output parameter, and it is known that the first node is located in the first transmission path in the embodiment, at this time, if the second precursor node is always the first node, it is known that the first node is the precursor node of the second node, and the first output parameter reaches the second node to form the second data transmission path; and the second output parameter in the second node is transmitted to a subsequent node of the second node via the second transmission path. At this time, it is known that the first data transmission path and the second data transmission path form a loop. Thus, a loop is formed between the first node and the second node.
In the embodiment of step S311, the loop is found by using the node total set, so that any node in the whole data path participates in the loop checking, the loop can be found more comprehensively, and the accuracy is ensured.
In a specific embodiment of step S311, in the data paths a-C-D-E, the first node is considered to be a, and the second node may be node C, node D, or node E.
In a more specific embodiment of step S311, in the data paths a-C-D-E, the first node is a, and the second node is D; at this time, the first input parameter is ai1, the first output parameter is ci1, the second input parameter is di1, and the second output parameter is ei1. Step S411 is as follows:
step S4111, obtaining ei1 and ai1;
in step S4112, if ei1 matches ai1, a loop is detected.
It can be understood that, when there is a data dependency between the parameters in the first node and the second node, the first node may be a precursor node of the second node, and step S311 is executed at this time; the first node may also be a node subsequent to the second node, at which point step S312 is performed. Step S311 and step S312 are essentially two-sided.
In this embodiment, only step S311 will be described. It should be understood that the steps S311 and S312 may belong to two technical schemes. The steps S101 to 401, 102 to 402 and S103 to 404 belong to three technical schemes, and the different schemes can be used for detecting loops independently or simultaneously.
Based on this, in step S300, if no loop is detected, step S400 of recording the first node/the second node further includes the steps of:
step S410, recording a second node in the first direct successor node information set and/or the direct predecessor node information set;
step S420, recording the first node in the second direct predecessor and/or direct successor node information set.
When a loop occurs, data needs to be processed, and because the data processed by the file of the application is a chain node, the same data can occur in a plurality of nodes at the same time, and therefore, the information of a direct predecessor node and a direct successor node is recorded, thereby avoiding the occurrence of redundant data, avoiding the formation of data dependence between old redundant data and new data, and ensuring the reliability of the whole data.
In step S420, after the step of recording the second node in the first directly subsequent and/or directly precursor node information set, the method further includes the following steps:
step S430, recording the second node and the second subsequent node total set in the first subsequent node total set; recording the first node and the first precursor node total set in the second precursor node total set, or,
step S440, recording the second node and the second precursor node total set in the first precursor node total set; and recording the first node and the first subsequent node total set in the second subsequent node total set.
It should be understood that in this embodiment, there is no unique data link between the first node and the second node, and the transmission directions between the first node and the second node are different. Based on this, step S430 and step S440 are generated, and in step S430, the first node is a precursor node of the second node; in step S440, the first node is a successor node to the second node.
It will be appreciated that the relationship between the first node and the second node described above is transitive.
In this embodiment, all relevant information in the data stream where the driving node total set is located is recorded, so that correction of the whole data can be pre-determined, task arrangement and task planning are facilitated, loop detection of other new nodes can be achieved, and dynamic detection can be performed on loops generated by programming.
In some cases, the entire data needs to be deleted, and some of the deletion data may be after the loop occurs or in other data stream programming. Based on this, if the first input and/or output parameters are deleted from the first node, and the first node and the second node lose the data dependency relationship, the method further includes the following steps: and S500, deleting the first node in the second direct subsequent and/or direct predecessor node information set when deleting the first input and/or output parameters in the first node.
Specifically, step S500 includes:
and step S510, deleting the first node in the second direct successor node information set when deleting the first input parameter in the first node.
And step S520, deleting the first node in the second direct precursor node information set when deleting the first output parameter in the first node.
It is understood that step S510 and step S520 are performed for different data transmission directions, and the two steps can coexist in the same data path.
It should be appreciated that, since other parameters may exist between the first node and the second node, such that the first node and the second node form a data link, the corresponding node may be deleted within the total precursor node information or the total successor node information only if no other data link exists between the first node and the second node.
It should be understood that when a node is deleted, the relevant parameters also need to be modified, in the above scheme, only the data of two nodes, in practical application, generally a plurality of nodes, and these nodes may form a data chain or may form a plurality of data chains with common intersection points. To better illustrate this feature, please refer to fig. 2 alone, fig. 2 is a data flow diagram in another embodiment of the present application. A. B, C, D, E the four nodes represent different computing tasks, respectively. Data is transferred between task nodes in the direction of the arrow. When one task node acquires all input data, the computing task starts to be executed.
In a further specific embodiment, the parameter list of the data flow function is modified, and is divided into three parts by using two semicolons, which respectively represent the input item list of the data flow function, the output item list of the data flow function and the common function parameter list.
Let us take the description of nodes a and C of fig. 2 as an example, the data structure in node a includes only specific data, and the annotation of the code is included in node C.
void A(int ai1;int ci1;)
{ci1=ai1 2 };
void C (int C1, int C2, int C3/input; int di 4/output;/list of common function parameters;)
The {/(C node specific computation content }.
It can be understood that the input parameters in the above are referred to as an input term list in the present embodiment, and the output parameters in the above are referred to as an output term list in the present embodiment, and the relevance of the general function in the present application and the embodiment of the present application is low, so that the description is omitted.
To remove redundant data after deleting the data, to facilitate data maintenance and storage, a preferred embodiment is created, see FIG. 3. Fig. 3 is a flow chart of a method of deleting a first node in a dataflow graph according to a further embodiment of the application.
In an alternative embodiment, it should be appreciated that after deleting the first node in the second set of directly successor or predecessor node information, the first node may establish a data path with the second node through other nodes, and in order to ensure the data path, after deleting the second node in the first set of directly successor and/or successor node information in step S510, the method further includes:
step S511, clearing the precursor or subsequent total node set of the first node as an empty set;
step S512, obtaining an N node in a direct precursor or subsequent set of the first node;
step S513, adding the precursor total node set of the N nodes to the precursor total node set of the first node; or alternatively, the process may be performed,
adding the successor total node set of the N nodes to the successor total node set of the first node;
wherein N is a natural number.
In an alternative embodiment, the deleting the first node in the second directly subsequent or predecessor node information set in step S520 includes the following steps:
step S521, clearing the total node set of the successor or predecessor of the second node as an empty set;
step S522, obtaining M nodes in a direct successor or predecessor set of the second node; wherein M nodes are contained in a direct successor or predecessor set of the second node;
step S523, adding the subsequent total node sets of the M nodes to the subsequent total node set of the second node respectively; or alternatively, the process may be performed,
respectively adding the precursor total node sets of the M nodes into the precursor total node set of the second node;
wherein M is a natural number.
In this embodiment, step S521 is applied to remove interference; step S522 is applied to obtain a direct successor or predecessor node; step S523 is applied to derive a set of successor or predecessor total nodes by directly successor or predecessor nodes.
In a specific embodiment, after the subsequent total node set of the second node is cleared to be an empty set, all nodes in the direct subsequent set of the second node are obtained; and adding the subsequent total node set of each node in the direct subsequent set of the second node to the subsequent total node set of the second node. Thereby, a set of successor nodes of the second node is formed.
It is to be understood that, the steps S511 to S513 and the steps S521 to S523 may be respectively in different data flows, or may be simultaneously applied in one data chain. The redundant data can be reduced by using steps S511 to S513 or steps S521 to S523, and the influence of the redundant data on the newly added data can be avoided. The first node and the second node may be any nodes. The relation between the first node and the second node is transmitted in the data chain, and after the original first node deletes the parameters, the original second node becomes a new first node, so that recursion is performed.
Referring to fig. 4, fig. 4 is a flowchart of an embodiment of a loop detection system according to the present application. The second aspect of the present application provides a loop detection system, comprising the steps of:
the change module 101 is configured to detect a first node, and confirm a new first input and/or first output parameter in the first node;
the data dependency judging module 102 is configured to scan the second node, and confirm that the parameters in the first node and the second node have data dependency;
and the detection module 103 is configured to detect whether a loop exists according to information of a precursor node and a successor node of the second node if parameters in the first node and the second node are confirmed.
The modules described above are virtual in nature, carrying the methods of the embodiments described above. The modules can be combined by any practical product. Those skilled in the art will appreciate that implementing all or part of the above described embodiments may be accomplished by computer programs stored on a computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a random access memory (RandomAccessMemory, RAM), or the like.
The application also provides an electronic terminal, which comprises: the loop detection method of any of the embodiments described above is implemented by a memory, a processor, and a computer program stored on the memory and executable on the processor, when the processor executes the computer program. The above method is implemented when the processor executes a software program. It should be noted that, the electronic terminal in the embodiment of the present application includes, but is not limited to, a mobile phone, a mobile computer, a tablet personal computer, a personal digital assistant, a media player, a smart television, a smart watch, a smart glasses, a smart bracelet, and other user devices.
It should be noted that, the functions of each functional module of the electronic terminal in the embodiment of the present application may be specifically implemented according to the method in the embodiment of the method, and the specific implementation process may refer to the related description of the embodiment of the method, which is not repeated herein.
The foregoing description is only illustrative of the present application and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present application.

Claims (8)

1. A loop detection method, the method comprising the steps of:
detecting a first node, and if a first input and/or a first output parameter is newly added in the first node;
scanning a second node to obtain a second input parameter and a second output parameter in the second node; the second node comprises second precursor and/or subsequent node total set information, and the second precursor and/or subsequent node total set information comprises node information which is positioned on the same data path as the second node;
matching the first input parameter with the second output parameter, and if the matching is successful, forming data dependence by the first input parameter and the second output parameter;
or, matching the first output parameter with the second input parameter, and if the matching is successful, forming a data dependence by the first output parameter and the second input parameter;
if the second output parameters are consistent with the first input parameters to form data dependence, detecting whether a first node exists in the second precursor node total set, and if the first node exists in the second precursor node total set, detecting a loop;
and if the second input parameters are consistent with the first output parameters to form data dependence, detecting whether a first node exists in the second subsequent node total set, and if the first node exists in the second subsequent node total set, detecting a loop.
2. The loop detection method of claim 1, wherein the step of detecting a first node and confirming a new first input and/or output parameter in the first node further comprises, prior to:
and obtaining a first function to form the first node.
3. The loop detection method according to claim 1, wherein the first node includes a first set of directly successor and/or directly predecessor node information, the second node further includes a second set of directly successor and/or directly predecessor node information, and if no loop is detected, the method further includes the steps of:
recording the second node in the first direct successor and/or direct predecessor node information set;
and recording the first node in the second direct predecessor and/or direct successor node information set.
4. The loop detection method of claim 3, wherein the first node further comprises a first precursor and/or successor node total set, and wherein after the step of recording the second node in the first directly successor and/or directly precursor node information set, further comprising the steps of:
recording the second node and the second successor node total set in the first successor node total set; recording the first node and the first precursor node total set in the second precursor node total set, or,
recording the second node and the second precursor node total set in the first precursor node total set; and recording the first node and the first subsequent node total set in the second subsequent node total set.
5. The loop detection method of claim 4, wherein if the first input and/or output parameters are deleted from the first node and the second node lose data dependency, the method comprises the steps of:
deleting the first node in the second direct successor and/or direct predecessor node information set;
and deleting the second node in the first direct predecessor and/or direct successor node information set.
6. The loop detection method of claim 5, wherein if the second node is deleted from the first set of direct predecessor and/or successor node information, further comprising the steps of:
clearing a precursor or subsequent total node set of the first node as an empty set, and obtaining N nodes in a direct precursor or subsequent set of the first node;
adding the precursor total node set of the N nodes to the precursor total node set of the first node; or alternatively, the process may be performed,
adding the successor total node set of the N nodes to the successor total node set of the first node;
wherein N is a natural number.
7. The loop detection method of claim 5, further comprising the step of, if said first node is deleted from said second set of directly successor and/or predecessor node information;
clearing the subsequent or predecessor total node set of the second node as an empty set;
obtaining M nodes of a direct successor or predecessor set of the second node; wherein the total number of nodes in the direct successor or predecessor set of the second node is M;
adding the subsequent node total sets of the M nodes into the precursor node total set of the second node respectively; or alternatively, the process may be performed,
respectively adding the precursor node total sets of the M nodes into the precursor node total set of the second node;
wherein M is a natural number.
8. A loop detection system, the system comprising:
the change module is used for detecting a first node, and if a first input and/or a first output parameter is newly added in the first node;
the data dependence judging module is used for scanning a second node and acquiring a second input parameter and a second output parameter in the second node; the second node comprises second precursor and/or subsequent node total set information, and the second precursor and/or subsequent node total set information comprises node information which is positioned on the same data path as the second node; matching the first input parameter with the second output parameter, and if the matching is successful, forming data dependence by the first input parameter and the second output parameter; or, matching the first output parameter with the second input parameter, and if the matching is successful, forming a data dependence by the first output parameter and the second input parameter;
the loop detection module is used for detecting whether a first node exists in the second precursor node total set or not if the second output parameter is consistent with the first input parameter to form data dependence, and detecting a loop if the first node exists in the second precursor node total set; and if the second input parameters are consistent with the first output parameters to form data dependence, detecting whether a first node exists in the second subsequent node total set, and if the first node exists in the second subsequent node total set, detecting a loop.
CN202010927284.4A 2020-09-07 2020-09-07 Loop detection method and system Active CN112015397B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010927284.4A CN112015397B (en) 2020-09-07 2020-09-07 Loop detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010927284.4A CN112015397B (en) 2020-09-07 2020-09-07 Loop detection method and system

Publications (2)

Publication Number Publication Date
CN112015397A CN112015397A (en) 2020-12-01
CN112015397B true CN112015397B (en) 2023-09-26

Family

ID=73515996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010927284.4A Active CN112015397B (en) 2020-09-07 2020-09-07 Loop detection method and system

Country Status (1)

Country Link
CN (1) CN112015397B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087665A (en) * 2011-01-27 2011-06-08 中国科学院计算技术研究所 Automatic service combination method for supporting continuous query and system thereof
WO2012105593A1 (en) * 2011-02-01 2012-08-09 日本電気株式会社 Data flow graph processing device, data flow graph processing method, and data flow graph processing program
CN103473400A (en) * 2013-08-27 2013-12-25 北京航空航天大学 Software FMEA (failure mode and effects analysis) method based on level dependency modeling
CN106557371A (en) * 2016-10-26 2017-04-05 北京交通大学 A kind of Distributed System Deadlock detection method followed the trail of based on side
CN106919368A (en) * 2017-01-12 2017-07-04 北京中科睿芯科技有限公司 A kind of accelerated method in streamed data stream graph key path, acceleration system, device and chip
CN107025169A (en) * 2017-01-20 2017-08-08 武汉大学 A kind of software error layering diagnostic method based on Bayesian Network Inference
WO2017167062A1 (en) * 2016-03-30 2017-10-05 阿里巴巴集团控股有限公司 Application program interface deadlock monitoring method and device
CN109426723A (en) * 2017-09-01 2019-03-05 深圳市源伞新科技有限公司 Use the detection method, system, equipment and storage medium of memory after release

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090106772A1 (en) * 2007-10-18 2009-04-23 Omx Technology Ab Loop checking mechanism in a data processing system
JP5452803B2 (en) * 2010-11-17 2014-03-26 グローブライド株式会社 Fishing reel
US10802945B2 (en) * 2016-12-07 2020-10-13 Ab Initio Technology Llc Differencing of executable dataflow graphs

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087665A (en) * 2011-01-27 2011-06-08 中国科学院计算技术研究所 Automatic service combination method for supporting continuous query and system thereof
WO2012105593A1 (en) * 2011-02-01 2012-08-09 日本電気株式会社 Data flow graph processing device, data flow graph processing method, and data flow graph processing program
JPWO2012105593A1 (en) * 2011-02-01 2014-07-03 日本電気株式会社 Data flow graph processing apparatus, data flow graph processing method, and data flow graph processing program
CN103473400A (en) * 2013-08-27 2013-12-25 北京航空航天大学 Software FMEA (failure mode and effects analysis) method based on level dependency modeling
WO2017167062A1 (en) * 2016-03-30 2017-10-05 阿里巴巴集团控股有限公司 Application program interface deadlock monitoring method and device
CN106557371A (en) * 2016-10-26 2017-04-05 北京交通大学 A kind of Distributed System Deadlock detection method followed the trail of based on side
CN106919368A (en) * 2017-01-12 2017-07-04 北京中科睿芯科技有限公司 A kind of accelerated method in streamed data stream graph key path, acceleration system, device and chip
CN107025169A (en) * 2017-01-20 2017-08-08 武汉大学 A kind of software error layering diagnostic method based on Bayesian Network Inference
CN109426723A (en) * 2017-09-01 2019-03-05 深圳市源伞新科技有限公司 Use the detection method, system, equipment and storage medium of memory after release

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
Automatic Loop Summarization via Path Dependency Analysis;Xiaofei Xie等;IEEE Transactions on Software Engineering;第537-557页 *
Fast Loop-level Data Dependence Profiling;Hongtao Yu等;Proceedings of the 26th ACM international conference on Supercomputing;第37-46页 *
基于 LLVM 的 C 程序的动态数据依赖分析工具的设计与实现;吴忧;中国优秀硕士学位论文全文数据库 信息科技辑;I138-124 *
基于数据依赖特征的软件识别;罗养霞等;吉林大学学报(工学版)(第06期);第1894-1902页 *
基于构件的软件包度量方法研究;陈滨;中国优秀硕士学位论文全文数据库 信息科技辑;I138-193 *
面向并发程序的重构一致性检测方法;张杨等;河北师范大学学报(自然科学版)(第03期);第200-208页 *

Also Published As

Publication number Publication date
CN112015397A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
US9009708B2 (en) Method and system to effectuate recovery for dynamic workflows
Li et al. On measuring process model similarity based on high-level change operations
CN107391628B (en) Data synchronization method and device
US20050171930A1 (en) Dynamic Determination of Transaction Boundaries in Workflow Systems
Rinderle et al. On representing, purging, and utilizing change logs in process management systems
US20110270838A1 (en) Updating groups of items
Idowu et al. Asset management in machine learning: A survey
US8954924B2 (en) Dynamic update of modularized programs in a continuation-based runtime
Leno et al. Discovering data transfer routines from user interaction logs
Mohd-Shafie et al. Model-based test case prioritization using selective and even-spread count-based methods with scrutinized ordering criterion
CN112015397B (en) Loop detection method and system
Cheng et al. Optimal alignments between large event logs and process models over distributed systems: An approach based on Petri nets
Koning et al. Digital experimentation and startup performance: Evidence from a/b testing
WO2023154893A1 (en) Schema-driven distributed data processing
JP3992947B2 (en) Logic circuit delay optimization system, logic circuit delay optimization method, and program
JP2023553220A (en) Process mining for multi-instance processes
WO2021133448A1 (en) Edge table representation of processes
CN114791865A (en) Method, system and medium for detecting self-consistency of configuration items based on relational graph
US20210312365A1 (en) Analysis of resources utilized during execution of a process
JP4131871B2 (en) Logic circuit delay optimization system, logic circuit delay optimization method, and program
Tosta et al. Improving workflow design by mining reusable tasks
CN112364071A (en) Goods value data analysis method and system
US20230054774A1 (en) User constrained process mining
Vu et al. FTKHUIM: A Fast and Efficient Method for Mining Top-K High-Utility Itemsets
CN115098228B (en) Transaction processing method and device, computer equipment and storage 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