Method and device for surveying transition influencing deadlock in time Petri network

By constructing a time Petri net model and a global reachability graph, the transition of deadlock in the time Petri net is identified, solving the problem of complexity and high cost of deadlock analysis, and providing an efficient deadlock prevention solution.

CN118734619APending Publication Date: 2024-10-01XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410901352.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

When existing technologies analyze deadlock problems in timed Petri nets, the complexity increases and it is difficult to adapt to the time factor, making deadlock analysis difficult, and existing prevention methods are costly and inefficient.

Method used

By constructing a time Petri net model, a global reachability graph and a local reachability graph, two types of path searches are performed to determine the enabled transition sets and inclusion relationships under the danger mark, identify the transition sets that affect deadlock, and avoid the introduction of new places. controller.

Benefits of technology

An efficient and practical deadlock prevention method is implemented, which reduces costs and improves the accuracy and efficiency of deadlock analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734619A_ABST
    Figure CN118734619A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for surveying deadlock-influencing transition in a time Petri network. The method comprises the following steps of: constructing a global reachable graph through a time Petri network model of a resource allocation system; determining a plurality of danger marks in the global reachable graph and an enabling transition set under each danger mark; aiming at each danger mark, searching two types of paths in the global reachability graph to obtain a plurality of first types of paths and a plurality of second types of paths corresponding to the danger mark, and further constructing a local reachability graph corresponding to the danger mark; and based on each type of paths in each local reachable graph, determining a group of inclusion relationships among the paths in the type of paths. And finally, determining a transition set influencing the deadlock of the resource allocation system based on the determined inclusion relation of each group. The invention provides an efficient and practical method for deadlock prevention by surveying the transition influencing deadlock in the time Petri network of the resource allocation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer technology, and in particular relates to a method and a device for surveying changes that affect deadlock in a time Petri net. Background Art

[0002] Deadlock has always been an important research topic in the design and analysis of resource allocation systems. Deadlock refers to the phenomenon that in a multi-tasking environment, a group of processes are waiting for other processes to release resources and cannot continue to execute due to improper resource allocation or unreasonable process running order. As a powerful graphical and mathematical modeling tool, traditional Petri nets are widely used in the behavioral analysis of concurrent systems, including the detection and prevention of deadlock. However, traditional Petri net models usually ignore the time factor. In fact, in many application scenarios, such as computer networks, distributed systems, and industrial automation, the impact of time characteristics on system behavior is crucial.

[0003] As an extension of the traditional Petri net, the time Petri net can more accurately describe and analyze the dynamic behavior of the system by introducing the concept of time. In the time Petri net, the triggering of transitions depends not only on the current state of the system, but also on the time constraint. This enables the time Petri net to capture the timing characteristics of the system state changes more carefully, thus providing a new perspective for deadlock analysis. Although the time Petri net can theoretically provide richer analysis capabilities, its complexity is also significantly increased. In particular, when the system scale increases or there are a large number of concurrent operations, the application of traditional time Petri net analysis methods may lead to an explosion of the system state space, making deadlock analysis very difficult. In addition, the introduction of time factors increases the complexity of model analysis, and traditional analysis methods are difficult to adapt to the needs of the time Petri net model.

[0004] At present, the deadlock analysis in timed Petri nets mainly adopts the analysis method based on symbolic state class diagram and modified state class diagram. However, even for bounded timed Petri nets, the symbolic state class diagram and modified state class diagram of the corresponding timed Petri may be unbounded. For unbounded state class diagrams and modified state class diagrams, it is impossible to survey the impact of the time factor on the state space in their transition.

[0005] In addition, the existing deadlock prevention for time Petri nets adopts the prevention method of structural deadlock, such as adding controllers such as places and transitions, without investigating the impact of time factors on deadlock. And adding a place controller is equivalent to adding a manipulator or machine tool equipment to the entire system, which is very costly.

[0006] Therefore, how to provide an efficient and practical method for detecting the transitions that affect deadlock in timed Petri nets has become an urgent problem to be solved. Summary of the invention

[0007] In order to solve the above problems existing in the prior art, the present invention provides a method and device for surveying transitions that affect deadlock in a time Petri net.

[0008] The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0009] In a first aspect, the present invention provides a method for detecting transitions that affect deadlock in a time Petri net, the method comprising:

[0010] Construct a time Petri net model of resource allocation system;

[0011] A global reachable graph is constructed based on the temporal Petri net model; nodes in the global reachable graph represent tags; the tags are used to represent the state of the resource allocation system; edges in the global reachable graph represent enabling transitions emitted between states;

[0012] Determine a plurality of danger marks in the global reachable graph and an enabled transition set under each danger mark; the danger mark is used to indicate that the resource allocation system is in a dangerous state;

[0013] For each hazard mark, two types of path searches are performed in the global reachable graph to obtain multiple first-type paths and multiple second-type paths corresponding to the hazard mark; the first-type path satisfies: there is at least one enabling transition under the hazard mark corresponding to the path that remains continuously enabled in the complete path; the complete path is the path from the starting mark in the path to the hazard mark corresponding to the path; the second-type path satisfies: the transitions represented by all edges from the starting mark in the path to the hazard mark corresponding to the path are continuously enabled transitions;

[0014] For each danger mark, construct a local reachable graph corresponding to the danger mark according to multiple first-category paths and multiple second-category paths corresponding to the danger mark;

[0015] Based on each class of paths in each local reachable graph, determine a set of inclusion relations between paths in the class of paths;

[0016] A transition set that affects the deadlock of the resource allocation system is determined based on the determined groups of inclusion relationships.

[0017] Optionally, for each hazard mark, a local reachable graph corresponding to the hazard mark is constructed according to multiple first-category paths and multiple second-category paths corresponding to the hazard mark, including:

[0018] Mark the danger mark M FBM As the initial mark M cur , the danger mark M FBM The set of enabled transitions under cur The enabled transition set and the initial marker M cur and the initial mark M cur The enabled transition set is added to the danger mark M FBM In the corresponding local reachable graph;

[0019] Search the global reachable graph to find the marker M that can be reached cur Mark M i ; Mark M i Meet M i [t>M cur ;M i [t>M cur Indicates that the M i The next transmission enable transition t reaches the marker M cur ;

[0020] If the mark M i To mark M cur The path is a danger mark M FBM The corresponding first-class path or part of the second-class path is marked with M i As the updated mark M cur , mark M i The enabled transition set is used as the updated mark M cur The enabled transition set and the updated mark M cur and the updated mark M cur The enabled transition set is added to the danger mark M FBM In the corresponding local reachable graph, continue to search for the mark M that can be reached from the global reachable graph. cur Mark M i Steps are performed until the global reachable graph is traversed to obtain the danger mark M FBM The corresponding local reachability graph.

[0021] Optionally, determining a set of transitions that affect the deadlock of the resource allocation system based on the determined groups of inclusion relationships includes:

[0022] Determine a first transition set that affects the deadlock of the resource allocation system based on the inclusion relationship between the first-type paths in each local reachable graph;

[0023] Determine a second set of transitions that affect the deadlock of the resource allocation system based on the inclusion relationship between the second-type paths in each local reachable graph;

[0024] The union of the first transition set and the second transition set is used as the transition set that affects the deadlock of the resource allocation system.

[0025] Optionally, determining a first transition set that affects the deadlock of the resource allocation system based on the inclusion relationship between the first-type paths in each local reachable graph includes:

[0026] For every two first-category paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the dead zone mark are both continuous enabling transitions, then the enabling transition in S2 is added to the first transition set; the dead zone mark is a node whose state of the resource allocation system is an illegal state;

[0027] For every two first-class paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the live zone mark are both continuous enabling transitions, then the enabling transition in S1 is added to the first transition set; the live zone mark is a node whose status of the resource allocation system is a legal state.

[0028] Optionally, determining a second set of transitions that may affect the deadlock of the resource allocation system based on the inclusion relationship between the second-type paths in each local reachable graph includes:

[0029] For every two second-category paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is a common sub-path in S3 and S4, and the transitions of the sub-path from the dangerous node in the local reachable graph to the dead zone mark are all continuous enabling transitions, then the enabling transitions in S3 are added to the second transition set; the dead zone mark is a node whose state of the resource allocation system is an illegal state;

[0030] For every two second-class paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is an identical subpath in S3 and S4, and the transitions of the subpath from the dangerous node in the local reachable graph to the live zone mark are all continuous enabling transitions, then the enabling transitions in S4 are added to the second transition set; the live zone mark is a node where the state of the resource allocation system is a legal state.

[0031] Optionally, when performing two types of path searches in the global reachable graph for each hazard mark, the method further includes:

[0032] For each hazard mark, a search for a third type of path is performed in the global reachable graph; the third type of path is a path that meets the requirements of both the first type of path and the second type of path.

[0033] In a second aspect, the present invention provides a device for detecting transitions that affect deadlock in a time Petri net, the device comprising:

[0034] Time Petri net model construction module, used to construct the time Petri net model of resource allocation system;

[0035] A global reachable graph construction module is used to construct a global reachable graph based on the temporal Petri net model; nodes in the global reachable graph represent tags; the tags are used to represent the state of the resource allocation system; edges in the global reachable graph represent enabling transitions emitted between states;

[0036] A first determination module is used to determine a plurality of danger marks in the global reachable graph and an enabled transition set under each danger mark; the danger mark is used to indicate that the resource allocation system is in a dangerous state;

[0037] A search module is used to perform two types of path searches in the global reachable graph for each hazard mark, and obtain multiple first-type paths and multiple second-type paths corresponding to the hazard mark; the first-type path satisfies: there is at least one enabling transition under the hazard mark corresponding to the path that remains continuously enabled in the complete path; the complete path is the path from the starting mark in the path to the hazard mark corresponding to the path; the second-type path satisfies: the transitions represented by all edges from the starting mark in the path to the hazard mark corresponding to the path are continuously enabled transitions;

[0038] A local reachable graph construction module, used for constructing, for each hazard mark, a local reachable graph corresponding to the hazard mark according to a plurality of first-category paths and a plurality of second-category paths corresponding to the hazard mark;

[0039] A second determination module is used to determine a set of inclusion relationships between paths in each class of paths based on each class of paths in each local reachable graph;

[0040] The third determination module is used to determine a set of transitions that affect the deadlock of the resource allocation system based on the determined groups of inclusion relationships.

[0041] Optionally, the local reachable graph construction module is specifically used to:

[0042] Mark the danger mark M FBM As the initial mark M cur , the danger mark M FBM The set of enabled transitions under cur The enabled transition set and the initial marker M cur and the initial mark M curThe enabled transition set is added to the danger mark M FBM In the corresponding local reachable graph;

[0043] Search the global reachable graph to find the marker M that can be reached cur Mark M i ; Mark M i Meet M i [t>M cur ;M i [t>M cur Indicates that the M i The next transmission enable transition t reaches the marker M cur ;

[0044] If the mark M i To mark M cur The path is a danger mark M FBM The corresponding first-class path or part of the second-class path is marked with M i As the updated mark M cur , mark M i The enabled transition set is used as the updated mark M cur The enabled transition set and the updated mark M cur and the updated mark M cur The enabled transition set is added to the danger mark M FBM In the corresponding local reachable graph, continue to search for the mark M that can be reached from the global reachable graph. cur Mark M i Steps are performed until the global reachable graph is traversed to obtain the danger mark M FBM The corresponding local reachability graph.

[0045] Optionally, the third determining module includes:

[0046] A first transition set determination submodule, configured to determine a first transition set that affects the deadlock of the resource allocation system based on the inclusion relationship between the first type of paths in each local reachable graph;

[0047] A second transition set determination submodule, configured to determine a second transition set that affects the deadlock of the resource allocation system based on the inclusion relationship between the second type of paths in each local reachable graph;

[0048] The union submodule is used to take the union of the first transition set and the second transition set as the transition set that affects the deadlock of the resource allocation system.

[0049] Optionally, the first transition set determination submodule is specifically configured to:

[0050] For every two first-class paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the dead zone mark are all continuous enabling transitions, then the enabling transition in S2 is added to the first transition set; the dead zone mark is a node where the state of the resource allocation system is an illegal state; for every two first-class paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the live zone mark are all continuous enabling transitions, then the enabling transition in S1 is added to the first transition set; the live zone mark is a node where the state of the resource allocation system is a legal state.

[0051] Optionally, the second transition set determination submodule is specifically used to:

[0052] For every two second-category paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is a common sub-path in S3 and S4, and the transitions of the sub-path from the dangerous node in the local reachable graph to the dead zone mark are all continuous enabling transitions, then the enabling transitions in S3 are added to the second transition set; the dead zone mark is a node whose state of the resource allocation system is an illegal state;

[0053] For every two second-class paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is an identical subpath in S3 and S4, and the transitions of the subpath from the dangerous node in the local reachable graph to the live zone mark are all continuous enabling transitions, then the enabling transitions in S4 are added to the second transition set; the live zone mark is a node where the state of the resource allocation system is a legal state.

[0054] Optionally, the device also includes a third type of path search module, which is used to search for a third type of path in the global reachable graph for each hazard mark when two types of path searches are performed in the global reachable graph; the third type of path is a path that meets the requirements of both the first type of path and the second type of path.

[0055] The present invention provides a method for surveying transitions that affect deadlock in a time Petri net. For each hazard mark, two types of path searches are performed in a global reachable graph, and multiple first-type paths and multiple second-type paths corresponding to the hazard mark can be obtained, that is, all two types of paths that can reach each hazard mark can be obtained. For each hazard mark, a local reachable graph corresponding to the hazard mark is constructed according to the multiple first-type paths and multiple second-type paths corresponding to the hazard mark, and a local reachable graph of all hazard marks of the resource allocation system can be obtained. Finally, a set of inclusion relationships between each path in each local reachable graph is determined through each type of path in the type of path, and then the minimum set of transitions that affect the deadlock of the resource allocation system can be determined through each group of inclusion relationships. Compared with the existing deadlock prevention method, the present invention does not need to introduce a new library controller, and provides an efficient and practical method for deadlock prevention by surveying the transitions that affect deadlock in the time Petri net of the resource allocation system.

[0056] The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is a flow chart of a method for detecting transitions that affect deadlock in a time Petri net provided by an embodiment of the present invention;

[0058] Figure 2 is a schematic diagram of a first type of path and a second type of path in an embodiment of the present invention;

[0059] Figure 3 It is a schematic diagram of a process of constructing a local reachable graph based on two types of paths provided by an embodiment of the present invention;

[0060] Figure 4 Schematic diagram of the first type of path, the second type of path and the third type of path in an embodiment of the present invention. DETAILED DESCRIPTION

[0061] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.

[0062] In order to solve the problems of low efficiency and high cost in existing deadlock prevention methods, the embodiment of the present invention provides a method for detecting the changes that affect deadlock in a time Petri net, see Figure 1 , Figure 1 1 is a flow chart of a method for detecting transitions that affect deadlock in a time Petri net provided by an embodiment of the present invention, which specifically includes the following steps:

[0063] Step S101, constructing a time Petri net model of a resource allocation system.

[0064] In the embodiment of the present invention, the resource allocation system is a multi-task parallel processing system, which may specifically be a computer network system, a distributed system or an industrial automation system, etc.

[0065] Compared with the traditional Petri net model, the time Petri net model integrates the time characteristics and the structure of the traditional Petri net model. Each transition is assigned a time interval, which is more conducive to describing the dynamic state of the resource allocation system.

[0066] Step S102, constructing a global reachable graph based on the time Petri net model; the nodes in the global reachable graph represent tags; the tags are used to represent the state of the resource allocation system; the edges in the global reachable graph represent enabling transitions emitted between states.

[0067] In the embodiment of the present invention, the global reachability graph is a graphical representation of the time Petri net model, which can be used to describe the changing relationship of the resource allocation system under different states. The nodes in the global reachability graph represent tags, which are used to represent the current state of the resource allocation system.

[0068] In the embodiment of the present invention, the edge in the global reachable graph represents an enabling transition, wherein the enabling transition can be understood as when a tag transmits a transition to another tag, the state of the resource allocation system changes, and the transition is an enabling transition.

[0069] Step S103, determining a plurality of danger marks in the global reachable graph and an enabled transition set under each danger mark; the danger mark is used to indicate that the resource allocation system is in a dangerous state.

[0070] In the embodiment of the present invention, the danger mark is used to indicate that the resource allocation system is in a dangerous state, and the enable transition set under the danger mark includes enable transitions that may be emitted after the resource allocation system is in a dangerous state.

[0071] In the embodiment of the present invention, the resource allocation system is in a dangerous state, which means that although the system may not immediately enter a deadlock after an enabling transition occurs, the probability of this happening is quite high, which greatly increases the risk of the resource allocation system falling into a deadlock. Deadlock refers to the phenomenon in a multi-tasking environment where a group of processes are waiting for other processes to release resources and cannot continue to execute due to improper resource allocation or unreasonable process running order.

[0072] Step S104, for each hazard mark, two types of path searches are performed in the global reachable graph to obtain multiple first-type paths and multiple second-type paths corresponding to the hazard mark; the first-type path satisfies: there is at least one enabling transition under the hazard mark corresponding to the path that remains continuously enabled in the complete path; the complete path is the path from the starting mark in the path to the hazard mark corresponding to the path; the second-type path satisfies: the transitions represented by all the edges from the starting mark in the path to the hazard mark corresponding to the path are all continuously enabling transitions.

[0073] In the embodiment of the present invention, the global reachability graph shows all paths of the resource allocation system from the initial state to all possible final states. For each danger mark, there are multiple paths that can reach the danger mark.

[0074] In the time Petri net, the time interval on the enabling transition under the danger mark is the direct factor affecting the deadlock. If there is no mark that makes the enabling transition under the danger mark a continuous enabling transition, there is no transition that can affect the emission time domain of the enabling transition under the danger mark, that is, except for the enabling transition under the danger mark, there are no other transitions that make the time factor on the transition affect the deadlock. The necessary and sufficient condition for at least one transition to affect the emission time domain of the enabling transition under the danger mark is that there is at least one mark that can reach the danger mark, so that at least one enabling transition under the danger mark is a continuous enabling transition. Based on this, in order to investigate whether there are other transitions other than the enabling transition under the danger mark that can affect the deadlock, in an embodiment of the present invention, it is proposed to perform two types of path searches in the global reachable graph for each danger mark, where the first type of path and the second type of path must meet the following conditions.

[0075] The first type of path satisfies: there is at least one enabling transition under the danger mark corresponding to the path that remains continuously enabled in the complete path; the complete path is the path from the starting mark in the path to the danger mark corresponding to the path.

[0076] The second type of path satisfies: the transitions represented by all the edges from the start mark in the path to the corresponding danger mark in the path are continuously enabled transitions. That is to say, in the second type of path, from the start mark to the danger mark, the transition must remain enabled at every step.

[0077] See also Figure 2 , Figure 2 Schematic diagram of the first and second types of paths in the embodiment of the present invention. M1, M2, M3, M4, and M6 are all nodes in the global reachable graph, i.e., labels. In this example, these labels are all legal labels, where legal labels include good labels and dangerous labels. T1, t2, t3, t4, and t5 are all edges in the reachable graph, i.e., they can be changed.

[0078] In the path M1->t1->M2->t2->M3->t3->M4, there is an enabling transition t4 under the danger mark M4, which remains continuously enabled in the path from the start mark M1 to the danger mark M4. Therefore, the path M1->t1->M2->t2->M3->t3->M4 is a first-type path.

[0079] In the path M6->t2->M1->t3->M4, all edges from the start marker M6 to the danger marker M4, that is, all enabling transitions are continuous enabling transitions, so the path M6->t2->M1->t3->M4 is a second type path.

[0080] Step S105 : for each danger mark, construct a local reachable graph corresponding to the danger mark according to the multiple first-category paths and the multiple second-category paths corresponding to the danger mark.

[0081] In an embodiment of the present invention, for a danger mark, since both the first-category path and the second-category path are paths starting from a mark that can reach the danger mark and ending at the danger mark, a local reachable graph corresponding to the danger mark can be constructed based on multiple first-category paths and multiple second-category paths ending at the danger mark. The local reachable graph includes the danger mark, the mark that can reach the danger mark, and the enabling transitions between these marks. The relevant paths that can reach the danger mark can be obtained through the local reachable graph.

[0082] Step S106: Based on each type of path in each local reachable graph, a set of inclusion relationships between paths in the type of path is determined.

[0083] In an embodiment of the present invention, each class of paths includes multiple paths. Based on each class of paths in each local reachable graph, an inclusion relationship can be determined through two paths a and b in the class of paths. Therefore, a set of inclusion relationships can be determined through the inclusion relationships between the paths in the class of paths.

[0084] Specifically, the first type path a is a path from the starting mark n to the dangerous mark m, and the first type path b is a path from a middle mark k of the first type path a to the dangerous mark m, then the first type path a includes the first type path b.

[0085] For example, if the first-category path 1 is M1->t1->M2->t2->M3->t3->M4, and the first-category path 2 is M2->t2->M3->t3->M4, then the first-category path 1 contains the first-category path 2.

[0086] Step S107: determining a set of transitions that may affect deadlock of the resource allocation system based on the determined groups of inclusion relationships.

[0087] In an embodiment of the present invention, for a hazard mark, a set of inclusion relationships between each path in the first type of path and a set of inclusion relationships between each path in the second type of path in the local reachable graph corresponding to the hazard mark can be determined. Then, for the inclusion relationships between the first type of paths in the local reachable graph corresponding to multiple hazard marks in the global reachable graph, a set of transitions related to the first type of paths that affect the deadlock of the resource allocation system can be determined. For the inclusion relationships between the second type of paths in the local reachable graph corresponding to multiple hazard marks in the global reachable graph, a set of transitions related to the second type of paths that affect the deadlock of the resource allocation system can be determined. Based on the set of transitions related to the first type of paths that affect the deadlock of the resource allocation system and the set of transitions related to the second type of paths that affect the deadlock of the resource allocation system, the set of transitions that affect the deadlock of the resource allocation system can be determined.

[0088] In an embodiment of the present invention, for each hazard mark, two types of path searches are performed in the global reachable graph, and multiple first-type paths and multiple second-type paths corresponding to the hazard mark can be obtained, that is, all two types of paths that can reach each hazard mark can be obtained. For each hazard mark, a local reachable graph corresponding to the hazard mark is constructed based on the multiple first-type paths and multiple second-type paths corresponding to the hazard mark, and a local reachable graph of all hazard marks in the resource allocation system can be obtained. Finally, through each type of path in each local reachable graph, a set of inclusion relationships between the paths in the type of path is determined, and then the minimum set of transitions that affect the deadlock of the resource allocation system can be determined through each set of inclusion relationships. Compared with the existing deadlock prevention method, the embodiment of the present invention does not need to introduce a new library controller, and by surveying the transitions that affect the deadlock in the time Petri net of the resource allocation system, an efficient and practical method for deadlock prevention is provided.

[0089] In an embodiment of the present invention, for each hazard mark, a local reachable graph corresponding to the hazard mark is constructed according to a plurality of first-category paths and a plurality of second-category paths corresponding to the hazard mark, including:

[0090] Mark the danger mark M FBM As the initial mark M cur , mark the danger mark M FBM The set of enabled transitions under cur The enabled transition set and the initial marker M cur and the initial mark M cur Add the enabled transition set of FBM In the corresponding local reachable graph;

[0091] Search the global reachable graph to reach the marker M. cur Mark M i; Mark M i Meet M i [t>M cur ;M i [t>M cur Indicates that the M i The next transmission enable transition t reaches the marker M cur ;

[0092] If the mark M i To mark M cur The path is a danger mark M FBM The corresponding first-class path or part of the second-class path is marked with M i As the updated mark M cur , mark M i The enabled transition set is used as the updated mark M cur The enabled transition set and the updated mark M cur and the updated mark M cur Add the enabled transition set of FBM In the corresponding local reachable graph, continue to search for the mark M that can be reached from the global reachable graph. cur Mark M i Steps until the entire local reachable graph is traversed and the danger mark M is obtained FBM The corresponding local reachability graph.

[0093] See also Figure 3 , Figure 3 : is a schematic diagram of a process of constructing a local reachable graph based on two types of paths provided by an embodiment of the present invention, which specifically includes the following steps:

[0094] Step S301: mark the danger mark M FBM and danger sign M FBM The following enable transition set is added to the queue and the danger mark M FBM The corresponding local reachable graph.

[0095] In the embodiment of the present invention, when constructing the risk marker M FBM When the corresponding local reachable graph is constructed, the danger mark M is first FBM and danger sign M FBM Add the enabled transition set under to the local reachable graph. And mark the danger mark M FBM and danger sign M FBM The enabled transition set under is added to the queue as the subsequent initial marker M cur and mark M cur The following enabling transition set.

[0096] Step S302, checking whether the queue is empty.

[0097] In the embodiment of the present invention, if the result is no, it means that the queue is not empty, and there are still untraversed marks in the global reachable graph. If the result is yes, it means that the queue is empty, and the marks in the global reachable graph have been traversed.

[0098] Step S303, take out the marker M from the queue cur and mark M cur The following enabling transition set.

[0099] In the embodiment of the present invention, the mark M cur and mark M cur The enabled transition set below is the tag taken out of the queue and the enabled transition set of the tag.

[0100] For example, at the initial moment, the mark in the queue is a dangerous mark M FBM and danger sign M FBM The set of enabled transitions under . Therefore, we mark M cur and mark M cur The enabled transition set under is the danger mark M FBM and danger sign M FBM The following enabling transition set.

[0101] Step S304, traverse the global reachable graph to determine whether there is a marker M i Meet M i [t>M cur .

[0102] In the embodiment of the present invention, the mark M i Meet M i [t>M cur Indicates that the M i Next, an enabling transition t can be sent to reach the marker M cur If the result is yes, it means there are still untraversed marks. If the result is no, it means there is no way to reach the current mark M. cur Other marks, namely the current mark M cur The initial marker in a path.

[0103] Step S305, from the mark M i To mark M cur Is the path marked as dangerous? FBM A corresponding first-category path or a partial path in a second-category path.

[0104] In the embodiment of the present invention, according to performing two-type path search in the global reachable graph for each danger mark, a plurality of first-type paths and a plurality of second-type paths corresponding to the danger mark are obtained, and it can be determined that the path from the mark M i To mark M cur Is the path marked as dangerous?FBM A corresponding first-category path or a partial path in a second-category path.

[0105] For example, the first type of path is M1->t1->M2->t2->M3->t3->M4, and the second type of path is M6->t2->M1->t3->M4. i For M3, M cur When it is M4, the path from M3 to M4 is marked as dangerous M FBM The corresponding part of a first-class path. i For M5, M cur When it is M4, the path from M5 to M4 is not a danger mark M d The corresponding first-category path or part of the second-category path.

[0106] In the embodiment of the present invention, if the judgment result is yes, step S306 is executed, and if the judgment result is no, the process returns to step S304 to judge the next mark.

[0107] Step S306: mark M i and mark M i The following set of enabled transitions is added to the queue and the local reachability graph.

[0108] Mark M i and mark M i Add the enabled transition set under to the local reachability graph and mark M i and mark M i The set of enabled transitions under the cur and mark M cur The following set of enabled transitions are added to the queue.

[0109] Step S307, remove the marker M from the queue cur and mark M cur The following enabling transition set.

[0110] In the mark M i and mark M i After the enabled transition set under is added to the queue and the local reachable graph, the original marker M is deleted from the queue. cur and mark M cur The enable transition set under and returns to execute S302.

[0111] Step S308: output the local reachable graph.

[0112] In the embodiment of the present invention, when the queue is empty, that is, after the entire global reachable graph has been traversed, the local reachable graph is output and the danger mark M is obtained. FBM The corresponding local reachability graph.

[0113] In addition, in the process of constructing a local reachable graph, different graph theory algorithms can be used to construct and analyze the local reachable graph. For example, in addition to using the above-mentioned queue method for path search, data structures such as stacks can also be used to optimize the search process. The search efficiency of different search algorithms is also different. When analyzing the temporal characteristics of transitions, the interactions between transitions, such as synchronization or mutual exclusion relationships, can be considered to further refine the identification of transitions that affect deadlocks. In the process of constructing a Petri net reachable graph, multi-threading or distributed computing technology can be used to parallelize the construction and analysis of the reachable graph to cope with large-scale temporal Petri net models.

[0114] In the embodiment of the present invention, a set of transitions affecting the deadlock of the resource allocation system is determined based on the determined groups of inclusion relationships, including:

[0115] Determine the first transition set that affects the system deadlock based on the inclusion relationship between the first-type paths in each local reachable graph;

[0116] Determine a second transition set that affects system deadlock based on the inclusion relationship between the second type of paths in each local reachable graph;

[0117] The union of the first transition set and the second transition set is used as the transition set that affects the deadlock of the resource allocation system.

[0118] In the embodiment of the present invention, a first transition set and a second transition set may be determined respectively according to the first type of path and the second type of path.

[0119] In an embodiment of the present invention, a first transition set that affects the deadlock of the resource allocation system is determined based on the inclusion relationship between the first-type paths in each local reachable graph, including:

[0120] For every two first-class paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the dead zone mark are both continuous enabling transitions, then the enabling transition in S2 is added to the first transition set; the dead zone mark is a node whose state of the resource allocation system is illegal.

[0121] In an embodiment of the present invention, for every two first-class paths S1 and S2 in the first-class paths, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the dead zone mark are both continuous enabling transitions, then it indicates that the continuous enablement of S2 entering the dead zone mark from the danger mark of the local reachable graph is higher than the continuous enablement of S1 entering the dead zone mark from the danger mark of the local reachable graph, and the sending time domain of the enabling transition from the danger mark of the local reachable graph to the dead zone mark through S2 is closer to the time origin, so the possibility of the resource allocation system entering deadlock through S2 is greater, so at this time, the enabling transition in S2 is added to the first transition set.

[0122] In the embodiment of the present invention, the dead zone mark is a node in the resource allocation system whose status is illegal, and may include a bad mark or a deadlock mark.

[0123] In an embodiment of the present invention, for every two first-category paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the live zone mark are both continuous enabling transitions, then the enabling transition in S1 is added to the first transition set; the live zone mark is a node whose state of the resource allocation system is a legal state.

[0124] In an embodiment of the present invention, for every two first-class paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the live zone mark are both continuous enabling transitions, then the continuous enabling property of S2 from the danger mark corresponding to the local reachable graph to the live zone mark is higher than the continuous enabling property of S1 from the danger mark corresponding to the local reachable graph to the live zone mark. The closer the emission time domain of the enabling transition from the danger mark corresponding to the local reachable graph to the live zone mark through S2 is to the time origin, the smaller the possibility of the resource allocation system entering deadlock through S2. Therefore, the enabling transition in S1 is added to the first transition set at this time.

[0125] In the embodiment of the present invention, the active zone is marked as a node in a resource allocation system whose status is legal, and may include a good mark and a dangerous mark.

[0126] In an embodiment of the present invention, a second set of transitions that affect system deadlock is determined based on the inclusion relationship between the second-type paths in each local reachable graph, including:

[0127] For every two second-class paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is an identical subpath in S3 and S4, and the transitions of the subpath from the dangerous node in the local reachable graph to the dead zone mark are all continuous enabling transitions, then the enabling transitions in S3 are added to the second transition set; the dead zone mark is a node whose state of the resource allocation system is an illegal state.

[0128] In an embodiment of the present invention, for every two second-class paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is an identical sub-path in S3 and S4, and the transitions of the sub-path from the dangerous node to the dead zone mark in the local reachable graph are all continuous enabling transitions, then the continuous enablement of the enabling transition of S3 from the dangerous mark of the local reachable graph to the dead zone mark is higher than the continuous enablement of S4 from the dangerous mark of the local reachable graph to the dead zone mark. The closer the sending time domain of the enabling transition from the dangerous mark of the local reachable graph to the dead zone mark through S3 is to the time origin, the greater the possibility of the resource allocation system entering deadlock through S3. Therefore, the enabling transition in S3 is added to the second transition set at this time.

[0129] In an embodiment of the present invention, for every two second-category paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is an identical sub-path in S3 and S4, and the transitions of the sub-path from the dangerous node in the local reachable graph to the live zone mark are all continuous enabling transitions, then the enabling transitions in S4 are added to the second transition set; the live zone is marked as a node whose status of the resource allocation system is a legal state.

[0130] In an embodiment of the present invention, for every two second-category paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is an identical subpath in S3 and S4, and the transitions of the subpath from the dangerous node in the local reachable graph to the live zone mark are all continuous enabling transitions, then the continuous enabling property of the continuous enabling transition of S4 from the dangerous mark corresponding to the local reachable graph to the live zone mark is higher than the continuous enabling property of the continuous enabling transition of S3 from the dangerous mark corresponding to the local reachable graph to the live zone mark. The closer the emission time domain of the enabling transition from the dangerous mark corresponding to the local reachable graph to the live zone mark through S4 is to the time origin, the smaller the possibility of the resource allocation system entering a deadlock through S4 is. Therefore, the enabling transition in S3 is added to the second transition set at this time.

[0131] In an embodiment of the present invention, the union of the minimum first transition set determined according to the first type of path and the minimum second transition set determined according to the second type of path is used as the minimum transition set that affects the deadlock of the resource allocation system, thereby providing a clear control target for deadlock prevention of the resource allocation system.

[0132] In the embodiment of the present invention, when performing two types of path searches in the global reachable graph for each hazard mark, the method further includes:

[0133] For each hazard mark, a third-category path is searched in the global reachable graph; the third-category path is a path that meets the requirements of both the first-category path and the second-category path.

[0134] See also Figure 4 , Figure 4 It is a schematic diagram of the first type of path, the second type of path and the third type of path in the embodiment of the present invention, wherein M1, M2...M6 are all nodes in the global reachable graph, i.e., labels. In this example, these labels are all legal labels, and legal labels include good labels and dangerous labels. t1, t2, t3, t4, t5, t6 are all edges in the reachable graph, i.e., they can be changed. The path M1->t1->M2->t2->M3->t3->M4 is the first type of path, the path M6->t2->M1->t3->M4 is the second type of path, and the path M5->t6->M3->t3->M4 is the third type of path.

[0135] In the embodiment of the present invention, since the third type of path is a path that meets the requirements of both the first type of path and the second type of path, by first searching the third type of path, it is possible to quickly screen out from all paths a path that meets the requirements of both the first type of path and the second type of path, and then screen the first type of path and the second type of path separately based on the third type of path, thereby improving the efficiency of path search.

[0136] It should be noted that when analyzing and simulating the time Petri net in the embodiments of the present invention, the established models are all bounded nets, that is, the number of calculated labels is upper bounded, so the feasibility of the method can be verified by comparing the local reachability graph with the reachability graph of the ordinary Petri net.

[0137] Based on the same inventive concept, an embodiment of the present invention further provides a device for detecting transitions that affect deadlock in a time Petri net, the device comprising:

[0138] Time Petri net model construction module, used to construct the time Petri net model of resource allocation system;

[0139] The global reachability graph construction module is used to construct a global reachability graph based on the time Petri net model; the nodes in the global reachability graph represent tags; the tags are used to represent the state of the resource allocation system; the edges in the global reachability graph represent the enabling transitions emitted between states;

[0140] The first determination module is used to determine multiple danger marks in the global reachable graph and the enabled transition set under each danger mark; the danger mark is used to indicate that the resource allocation system is in a dangerous state;

[0141] The search module is used to perform two types of path searches in the global reachable graph for each hazard mark, and obtain multiple first-type paths and multiple second-type paths corresponding to the hazard mark; the first-type path satisfies: there is at least one enabling transition under the hazard mark corresponding to the path that remains continuously enabled in the complete path; the complete path is the path from the starting mark in the path to the hazard mark corresponding to the path; the second-type path satisfies: the transitions represented by all the edges from the starting mark in the path to the hazard mark corresponding to the path are all continuously enabling transitions;

[0142] A local reachable graph construction module, used for constructing, for each hazard mark, a local reachable graph corresponding to the hazard mark according to a plurality of first-category paths and a plurality of second-category paths corresponding to the hazard mark;

[0143] A second determination module is used to determine a set of inclusion relationships between paths in each class of paths based on each class of paths in each local reachable graph;

[0144] The third determination module is used to determine a set of transitions that affect the deadlock of the resource allocation system based on the determined groups of inclusion relationships.

[0145] In an embodiment of the present invention, for each hazard mark, two types of path searches are performed in the global reachable graph, and multiple first-type paths and multiple second-type paths corresponding to the hazard mark can be obtained, that is, all two types of paths that can reach each hazard mark can be obtained. For each hazard mark, a local reachable graph corresponding to the hazard mark is constructed based on the multiple first-type paths and multiple second-type paths corresponding to the hazard mark, and a local reachable graph of all hazard marks in the resource allocation system can be obtained. Finally, through each type of path in each local reachable graph, a set of inclusion relationships between the paths in the type of path is determined, and then the minimum set of transitions that affect the deadlock of the resource allocation system can be determined through each set of inclusion relationships. Compared with the existing deadlock prevention method, the embodiment of the present invention does not need to introduce a new library controller, and by surveying the transitions that affect the deadlock in the time Petri net of the resource allocation system, an efficient and practical method for deadlock prevention is provided.

[0146] Optionally, the local reachable graph construction module is specifically used to:

[0147] Mark the danger mark M FBM As the initial mark M cur , the danger mark M FBM The set of enabled transitions under curThe enabled transition set and the initial marker M cur and the initial mark M cur The enabled transition set is added to the danger mark M FBM In the corresponding local reachable graph;

[0148] Search the global reachable graph to find the marker M that can be reached cur Mark M i ; Mark M i Meet M i [t>M cur ;M i [t>M cur Indicates that the M i The next transmission enable transition t reaches the marker M cur ;

[0149] If the mark M i To mark M cur The path is a danger mark M FBM The corresponding first-class path or part of the second-class path is marked with M i As the updated mark M cur , mark M i The enabled transition set is used as the updated mark M cur The enabled transition set and the updated mark M cur and the updated mark M cur The enabled transition set is added to the danger mark M FBM In the corresponding local reachable graph, continue to search for the mark M that can be reached from the global reachable graph. cur Mark M i Steps are performed until the global reachable graph is traversed to obtain the danger mark M FBM The corresponding local reachability graph.

[0150] Optionally, the third determining module includes:

[0151] A first transition set determination submodule, configured to determine a first transition set that affects the deadlock of the resource allocation system based on the inclusion relationship between the first type of paths in each local reachable graph;

[0152] A second transition set determination submodule, configured to determine a second transition set that affects the deadlock of the resource allocation system based on the inclusion relationship between the second type of paths in each local reachable graph;

[0153] The union submodule is used to take the union of the first transition set and the second transition set as the transition set that affects the deadlock of the resource allocation system.

[0154] Optionally, the first transition set determination submodule is specifically configured to:

[0155] For every two first-class paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the dead zone mark are all continuous enabling transitions, then the enabling transition in S2 is added to the first transition set; the dead zone mark is a node where the state of the resource allocation system is an illegal state; for every two first-class paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the live zone mark are all continuous enabling transitions, then the enabling transition in S1 is added to the first transition set; the live zone mark is a node where the state of the resource allocation system is a legal state.

[0156] Optionally, the second transition set determination submodule is specifically used to:

[0157] For every two second-category paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is a common sub-path in S3 and S4, and the transitions of the sub-path from the dangerous node in the local reachable graph to the dead zone mark are all continuous enabling transitions, then the enabling transitions in S3 are added to the second transition set; the dead zone mark is a node whose state of the resource allocation system is an illegal state;

[0158] For every two second-class paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is an identical subpath in S3 and S4, and the transitions of the subpath from the dangerous node in the local reachable graph to the live zone mark are all continuous enabling transitions, then the enabling transitions in S4 are added to the second transition set; the live zone mark is the node where the resource allocation system status is a legal state.

[0159] Optionally, the device also includes a third type of path search module, which is used to search for a third type of path in the global reachable graph for each hazard mark when two types of path searches are performed in the global reachable graph; the third type of path is a path that meets the requirements of both the first type of path and the second type of path.

[0160] It should be noted that the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention.

[0161] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.

[0162] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art can understand and implement other changes to the disclosed embodiments by viewing the drawings and the disclosed content. In the description of the present invention, the term "comprising" does not exclude other components or steps, "one" or "an" does not exclude multiple situations, and "multiple" means two or more, unless otherwise clearly and specifically limited. In addition, certain measures are recorded in different embodiments, but this does not mean that these measures cannot be combined to produce good results.

[0163] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0164] It should be noted that the device of the embodiment of the present invention is a device that applies the above-mentioned method for surveying the changes that affect deadlock in the time Petri net. All embodiments of the above-mentioned method for surveying the changes that affect deadlock in the time Petri net are applicable to the device and can achieve the same or similar beneficial effects.

[0165] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A method for detecting transitions that affect deadlock in a timed Petri net, characterized in that: The method comprises: Construct a time Petri net model of resource allocation system; A global reachable graph is constructed based on the temporal Petri net model; nodes in the global reachable graph represent tags; the tags are used to represent the state of the resource allocation system; edges in the global reachable graph represent enabling transitions emitted between states; Determine a plurality of danger marks in the global reachable graph and an enabled transition set under each danger mark; the danger mark is used to indicate that the resource allocation system is in a dangerous state; For each hazard mark, two types of path searches are performed in the global reachable graph to obtain multiple first-type paths and multiple second-type paths corresponding to the hazard mark; the first-type path satisfies: there is at least one enabling transition under the hazard mark corresponding to the path that remains continuously enabled in the complete path; the complete path is the path from the starting mark in the path to the hazard mark corresponding to the path; the second-type path satisfies: the transitions represented by all edges from the starting mark in the path to the hazard mark corresponding to the path are continuously enabled transitions; For each danger mark, construct a local reachable graph corresponding to the danger mark according to multiple first-category paths and multiple second-category paths corresponding to the danger mark; Based on each class of paths in each local reachable graph, determine a set of inclusion relations between paths in the class of paths; A transition set that affects the deadlock of the resource allocation system is determined based on the determined groups of inclusion relationships.

2. The method according to claim 1, characterized in that For each danger mark, a local reachable graph corresponding to the danger mark is constructed according to multiple first-category paths and multiple second-category paths corresponding to the danger mark, including: Mark the danger mark M FBM As the initial mark M cur , the danger mark M FBM The set of enabled transitions under cur The enabled transition set and the initial marker M cur and the initial mark M cur The enabled transition set is added to the danger mark M FBM In the corresponding local reachable graph; Search the global reachable graph to find the marker M that can be reached cur Mark M i ; Mark M i Meet M i [t>M cur ;M i [t>M cur Indicates that the M i The next transmission enable transition t reaches the marker M cur ; If the mark M i To mark M cur The path is a danger mark M FBM The corresponding first-class path or part of the second-class path is marked with M i As the updated mark M cur , mark M i The enabled transition set is used as the updated mark M cur The enabled transition set and the updated mark M cur and the updated mark M cur The enabled transition set is added to the danger mark M FBM In the corresponding local reachable graph, continue to search for the mark M that can be reached from the global reachable graph. cur Mark M i Steps are performed until the global reachable graph is traversed to obtain the danger mark M FBM The corresponding local reachability graph.

3. The method according to claim 1, characterized in that: Based on the determined groups of inclusion relationships, a set of transitions that affect the deadlock of the resource allocation system is determined, including: Determine a first transition set that affects the deadlock of the resource allocation system based on the inclusion relationship between the first-type paths in each local reachable graph; Determine a second set of transitions that affect the deadlock of the resource allocation system based on the inclusion relationship between the second-type paths in each local reachable graph; The union of the first transition set and the second transition set is used as the transition set that affects the deadlock of the resource allocation system.

4. The method according to claim 3, characterized in that Determining a first transition set that affects the deadlock of the resource allocation system based on the inclusion relationship between the first-type paths in each local reachable graph includes: For every two first-category paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the dead zone mark are both continuous enabling transitions, then the enabling transition in S2 is added to the first transition set; the dead zone mark is a node whose state of the resource allocation system is an illegal state; For every two first-class paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the live zone mark are both continuous enabling transitions, then the enabling transition in S1 is added to the first transition set; the live zone mark is a node whose status of the resource allocation system is a legal state.

5. The method according to claim 3, characterized in that: Determining a second set of transitions that affect the deadlock of the resource allocation system based on the inclusion relationship between the second-type paths in each local reachable graph includes: For every two second-category paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is a common sub-path in S3 and S4, and the transitions of the sub-path from the dangerous node in the local reachable graph to the dead zone mark are all continuous enabling transitions, then the enabling transitions in S3 are added to the second transition set; the dead zone mark is a node whose state of the resource allocation system is an illegal state; For every two second-class paths S3 and S4 in each local reachable graph, if S3 is a subset of S4, and there is an identical subpath in S3 and S4, and the transitions of the subpath from the dangerous node in the local reachable graph to the live zone mark are all continuous enabling transitions, then the enabling transitions in S4 are added to the second transition set; the live zone mark is a node where the state of the resource allocation system is a legal state.

6. The method according to claim 1, characterized in that When performing two types of path searches in the global reachable graph for each hazard mark, the method further includes: For each hazard mark, a search for a third type of path is performed in the global reachable graph; the third type of path is a path that meets the requirements of both the first type of path and the second type of path.

7. A device for detecting transitions affecting deadlock in a timed Petri net, characterized in that: The device comprises: Time Petri net model construction module, used to construct the time Petri net model of resource allocation system; A global reachable graph construction module is used to construct a global reachable graph based on the temporal Petri net model; nodes in the global reachable graph represent tags; the tags are used to represent the state of the resource allocation system; edges in the global reachable graph represent enabling transitions emitted between states; A first determination module is used to determine a plurality of danger marks in the global reachable graph and an enabled transition set under each danger mark; the danger mark is used to indicate that the resource allocation system is in a dangerous state; A search module is used to perform two types of path searches in the global reachable graph for each hazard mark, and obtain multiple first-type paths and multiple second-type paths corresponding to the hazard mark; the first-type path satisfies: there is at least one enabling transition under the hazard mark corresponding to the path that remains continuously enabled in the complete path; the complete path is the path from the starting mark in the path to the hazard mark corresponding to the path; the second-type path satisfies: the transitions represented by all edges from the starting mark in the path to the hazard mark corresponding to the path are continuously enabled transitions; A local reachable graph construction module, used for constructing, for each hazard mark, a local reachable graph corresponding to the hazard mark according to a plurality of first-category paths and a plurality of second-category paths corresponding to the hazard mark; A second determination module is used to determine a set of inclusion relationships between paths in each class of paths based on each class of paths in each local reachable graph; The third determination module is used to determine a set of transitions that affect the deadlock of the resource allocation system based on the determined groups of inclusion relationships.

8. The device according to claim 7, characterized in that The local reachable graph construction module is specifically used for: Mark the danger mark M FBM As the initial mark M cur , the danger mark M FBM The set of enabled transitions under cur The enabled transition set and the initial marker M cur and the initial mark M cur The enabled transition set is added to the danger mark M FBM In the corresponding local reachable graph; Search the global reachable graph to find the marker M that can be reached cur Mark M i ; Mark M i Meet M i [t>M cur ;M i [t>M cur Indicates that the M i The next transmission enable transition t reaches the marker M cur ; If the mark M i To mark M cur The path is a danger mark M FBM The corresponding first-class path or part of the second-class path is marked with M i As the updated mark M cur , mark M i The enabled transition set is used as the updated mark M cur The enabled transition set and the updated mark M cur and the updated mark M cur The enabled transition set is added to the danger mark M FBM In the corresponding local reachable graph, continue to search for the mark M that can be reached from the global reachable graph. cur Mark M i Steps are performed until the global reachable graph is traversed to obtain the danger mark M FBM The corresponding local reachability graph.

9. The device according to claim 7, characterized in that The third determination module comprises: A first transition set determination submodule, configured to determine a first transition set that affects the deadlock of the resource allocation system based on the inclusion relationship between the first type of paths in each local reachable graph; A second transition set determination submodule, configured to determine a second transition set that affects the deadlock of the resource allocation system based on the inclusion relationship between the second type of paths in each local reachable graph; The union submodule is used to take the union of the first transition set and the second transition set as the transition set that affects the deadlock of the resource allocation system.

10. The device according to claim 9, characterized in that The first transition set determination submodule is specifically used to: For every two first-class paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the dead zone mark are all continuous enabling transitions, then the enabling transition in S2 is added to the first transition set; the dead zone mark is a node where the state of the resource allocation system is an illegal state; for every two first-class paths S1 and S2 in each local reachable graph, if S1 is a subset of S2, and the transitions of S1 and S2 from the danger mark corresponding to the local reachable graph to the live zone mark are all continuous enabling transitions, then the enabling transition in S1 is added to the first transition set; the live zone mark is a node where the state of the resource allocation system is a legal state.