Method and device for judging whether flow diagram exists in circulation loop

A loop and flow chart technology, applied in the computer field, can solve the problems of slow running speed of judgment algorithm and complicated judgment method, and achieve the effect of simple judgment method and improved running speed.

Active Publication Date: 2014-07-30
SHENZHEN KINGDEE MIDDLEWARE
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] When judging whether there is a loop in the flow chart, the method in the prior art needs to combine the execution state and the search state of the entry node to judge, that is, it needs to use multiple expressions to judge together, and the judgment method is complicated , the running speed of the judgment algorithm is slow

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for judging whether flow diagram exists in circulation loop
  • Method and device for judging whether flow diagram exists in circulation loop
  • Method and device for judging whether flow diagram exists in circulation loop

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] see figure 1, the embodiment of the present invention provides a method for judging whether there is a loop in the flowchart, including:

[0047] 101: Obtain the state value of each node in the flow chart according to the state of each node in the flow chart and the preset correspondence between the node state and the state value.

[0048] 102: Determine whether the adjacent egress node of the current node can be found.

[0049] 103: If the adjacent exit nodes of the current node can be found, use one of all the adjacent exit nodes of the searched current node as the first current adjacent exit node.

[0050] 104: Perform an OR operation on the original state value of the first current adjacent exit node and the searched state value to obtain an OR operation result value of the original state value and the searched state value of the first current adjacent exit node.

[0051] 105: Determine whether the OR operation result of the original state value of the first curre...

Embodiment 2

[0081] see Figure 2a and Figure 2b , the embodiment of the present invention provides a method for judging whether there is a loop in the flowchart, including:

[0082] 201: Obtain the state value of each node in the flow chart according to the state of each node in the flow chart and the preset correspondence between the node state and the state value.

[0083] In the embodiment of the present invention, it is assumed that the node status includes unexecuted, executed, skipped and searched. And the corresponding relationship between the preset node status and the status value is as follows: the corresponding status value of unexecuted is b000, the corresponding status value of executed is b111, the corresponding status value of skipping is b010, and the corresponding status value of searched is b110. And, for the convenience of description, the state value corresponding to unexecuted is called unexecuted state value, the state value corresponding to executed is called ex...

Embodiment 3

[0124] An embodiment of the present invention provides a device for judging whether there is a loop in the flowchart, see Figure 7 , the device consists of:

[0125] Annotation module 301, configured to annotate the state of each node in the flow chart as a corresponding state value according to the preset correspondence between the node state and the state value;

[0126] The first judging module 302 is used to judge whether the adjacent exit node of the current node can be searched after the marking module 301 marks the state of each node in the flowchart as a corresponding state value;

[0127] The first processing module 303 is configured to use one of all the adjacent exit nodes of the searched current node as the first current Adjacent exit nodes;

[0128] The first computing module 304 is used for, after the first processing module 303 uses one of the adjacent exit nodes of the searched current node as the first current adjacent exit node, the first current adjacent ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method and a device for judging whether a flow diagram exists in a circulation loop, and belongs to the technical field of a computer. The method comprises the following steps of: obtaining a state value of each node in the flow diagram according to a corresponding relation among the state of each node in the flow diagram, a pre-set node state and a state value; taking an adjacent outlet node in all the adjacent outlet nodes of the current node as a first current adjacent outlet node; carrying out OR operation on an original state value of the first current adjacent outlet node and a searched state value to obtain an OR operation result value; if the OR operation result value is not equal to the original state value, taking the OR operation result value as a current state value of the first current adjacent outlet node; if the adjacent outlet node of the first current adjacent outlet node cannot be searched and the state values of all inlet nodes of the current node are the nodes with the searched states, testifying that the circulation loop exists when the first current adjacent outlet node is used as a flow node of the current node.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for judging whether there is a loop in a flowchart. Background technique [0002] The data structure of the graph has a wide range of applications in the fields of games, workflow, image processing, and image processing. The traversal algorithm of the graph is one of the most important and common operations in the data structure operation of the graph. A flow chart is a special case of a graph, which describes a process in a graph. The execution of the flowchart is a special kind of traversal, which starts from the start node, passes through a series of nodes, and finally reaches the end node. However, due to various reasons, loops often appear in the flow chart, that is, the output of the node being executed will be fed back to the node that has been executed, and there will be a loop that cannot be jumped out. Therefore, in order to prevent loops that ca...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/00
Inventor 蒋建波
Owner SHENZHEN KINGDEE MIDDLEWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products