Method and System for Detecting Data Loss Errors in Cyber-Physical Systems Based on Petri Nets
The method optimizes Petri-Net mapping and deletion rules to enhance data loss error detection in CPS, addressing high complexity and incomplete detection issues, ensuring efficient and accurate verification of CPS designs.
Patent Information
- Application Number
- JP2025044587
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2024-03-20
- Filing Date
- 2025-03-19
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-03-19
AI Technical Summary
Current methods for detecting data loss errors in cyber-physical systems (CPS) using Petri-Nets face high model complexity and low detection efficiency, particularly due to the state space explosion problem in reachability graphs and incomplete state spaces in data stream error detection.
A method and system for detecting data loss errors in CPS using Petri-Nets, involving mapping a CPS modeled by Business Process Modeling Notation (BPMN) to a Petri-Net, optimizing events and conditions through deletion rules, and performing synonymous data operations to identify data loss errors, ensuring behavioral consistency and reducing model complexity.
The method enhances detection efficiency and comprehensiveness of data loss errors in CPS by alleviating state space explosion and incomplete state spaces, ensuring accurate verification of CPS design accuracy.
Smart Images

Figure 0007716807000001_ABST
Abstract
Description
Technical Field
[0001] The field of Petri-Net data detection belonging to the present invention, particularly a method and system for detecting data loss errors in a cyber-physical system.
Background Art
[0002] A cyber-physical system (CPS) is a multi-dimensional complex system that integrates computing, networking, and the physical environment. Through the deep integration and cooperation of computing intelligence, communication, and control, it realizes real-time perception, dynamic control, and information services of large-scale engineering systems. CPS can improve industrial efficiency, quality, safety, and reliability, reduce costs and resource consumption, and create new values and services. Currently, CPS is widely applied in industrial fields such as smart power grids, intelligent transportation, and intelligent manufacturing. However, with the increase in distributed sensors and parallel business units, the business process of CPS has become complex. Therefore, how to ensure the accuracy of CPS design, that is, how CPS can execute according to its design goals and requirements without errors or abnormalities, has become a hot research topic in the industrial and academic fields.
[0003] Business Process Modeling Notation (BPMN) is a standardized notation for business processes and is widely used in the control stream and data stream modeling of CPS. However, due to the lack of a formal method, it is difficult to verify the design accuracy of CPS, especially the verification in its data stream. Currently, the research on detecting data errors in the CPS data stream mainly includes test-based methods and model-based methods. The method based on Petri-Net is a model-based method. This method usually detects data stream errors using a reachability graph (RG) or a state transition graph. For example, the system systematically traverses a given workflow to detect its data stream errors. However, the conventional method is prone to the problem of state space explosion, its analysis structure is also complex, and the detection efficiency is low.
Summary of the Invention
Problems to be Solved by the Invention
[0004] Object of the Invention: An object of the present invention is to provide a method and a system for detecting data loss errors in a cyber-physical system based on a Petri-Net with low model complexity and high detection efficiency.
Means for Solving the Problems
[0005] Technical Solution: A method for detecting data loss errors in a cyber-physical system based on the Petri-Net described in the present invention, comprising: Mapping a cyber-physical system modeled by a business process modeling notation to a first Petri-Net which is a Petri net with data; Generating a merging process μ=(B, E, G, D, Rd, Wr, De) of the first Petri-Net, where B is a set of conditions, E is a set of events, G is a set of arcs, D is a set of data elements, Rd is a read marking function, Wr is a write marking function, and De is a delete marking function; Optimizing events and conditions in the merging process μ based on deletion rules to obtain an optimized merging process μ′=(B′, E′, G′, D′, Rd′, Wr′, De′, λ′, M′); Determining whether each event in the optimized merging process μ′ is a lost event and outputting a set of events of data loss errors; Performing a synonymous data operation on the optimized merging process μ′ and further calculating data proximity events, where the synonymous data operation is to give a data write element d of an event e, and when there are two parallel events e1 and e2 belonging to [e] and d∈Wr(e1)∪Rd(e1), adding the same data operation label, i.e., (e1, Wr: d or e1, Rd: d), from e1 to e2, provided that [e] + and when there are two parallel events e1 and e2 belonging to [e] and d∈Wr(e1)∪Rd(e1), adding the same data operation label, i.e., (e1, Wr: d or e1, Rd: d), from e1 to e2, provided that [e] +={e′∈E|e′≦e}, and the data proximity event is to provide two events e1 and e2 that satisfy the data d∈Rd(e1)∪Wr(e1)∪De(e1). When e1<e2, there is obviously a path from e1 to e2, and the event e′ on this path is
Number
[0006] Furthermore, the step of mapping the cyber-physical system modeled by the above business process modeling notation to a first Petri net which is a Petri net with data is Based on the data objects and states in the cyber-physical system, map the cyber-physical system to the first Petri net and include the step of modeling the first Petri net. The first Petri net is a data net N with an initial marker m0 D Yes, Σ=(N D ,m0), N D =(P,T,F,D,Read,Write,Delete), satisfying that (P,T,F) is a net, P is a library, T is a transition, F is a stream relationship, and Read, Write, and Delete are the read marking function, write marking function, and delete marking function in the first Petri net respectively.
[0007] Furthermore, the step of mapping the cyber-physical system modeled in the business process modeling notation to a first Petri net which is a Petri net with data includes: including a merging process μ = Merge(β), and the method for generating the merging process μ is as follows: merging all β-conflict conditions having the same label and occurrence depth into one condition, merging all β-events having the same label, i.e., the pre-set and post-set, into one event, and it is necessary to redirect all relevant arcs of β based on the conditions and events of the merge.
[0008] Here, β is a branching process of the first Petri net.
[0009] Furthermore, the step of mapping the cyber-physical system modeled in the business process modeling notation to a first Petri net which is a Petri net with data includes: the step of mapping the exclusive gateway of the business process modeling notation to the conflict structure of the first Petri net, the step of mapping the parallel gateway of the business process modeling notation to the parallel structure of the first Petri net, the step of mapping activities to transitions and their pre-library or post-library, the step of mapping the input and output of data objects or data libraries to the marking function of data read / write elements during transitions, the step of mapping external inputs to the marking function of data writing elements during transitions, the step of mapping the message stream between activities to libraries and the transitions before or after them, and the step of mapping other connection targets to the arcs between related libraries and transitions.
[0010] Furthermore, the step of optimizing the events and conditions in the merging process μ based on the above-described deletion rules to obtain an optimized merging process μ′ = (B′, E′, G′, D′, Rd′, Wr′, De′, λ′, M′) is to convert the merging process μ into a target interactive merging process μ λ = (B, E, G, D, Rd, Wr, De, λ, M), where λ is a marking function used to mark the type of the current event, M: B → {0, 1, 2, 3,...} is the identification information of the net, the marking function λ: E → L ∪ {α}, L = {!,?, @} × D includes the non-marking α, write!, read?, and delete @, and in the target interactive merging process μ λ includes deleting the rule deletion events and conditions to obtain the optimized merging process μ′.
[0011] Furthermore, in the step of optimizing the events and conditions in the merging process μ based on the above-described deletion rules to obtain an optimized merging process μ′ = (B′, E′, G′, D′, Rd′, Wr′, De′, λ′, M′), the deletion rule is ∃e ∈ E ∧ λ(e) = α,
Number
Number
Number
[0012] Furthermore, based on the above-mentioned deletion rule, the step of optimizing the events and conditions in the merge process μ to obtain an optimized merge process μ′ = (B′, E′, G′, D′, Rd′, Wr′, De′, λ′, M′) is The method includes a step of performing an accuracy analysis on the deletion rule, adopting weak reciprocity as a criterion for detecting whether behaviors are consistent, and reducing the problem of detecting whether the source merge process and the target reciprocal merge process maintain behavior consistency to the problem of detecting whether the source merge process and the target reciprocal merge process satisfy weak reciprocity.
[0013] Furthermore, in the optimized merging process μ′, the step of determining whether each event is a loss event and outputting a set of events of data loss errors may include: In the optimized merging process μ′, before determining whether each event is a lost event, the optimized merging process μ′ is initialized, and the initialization includes: Adding a condition b′0 and an event e′0 before the start condition of the optimized merging process μ′ and adding a condition b′ and an event e′ after the end condition, where the b′ and e′ indices are the maximum indices i of the conditions and events in μ′ plus 1, respectively; In the optimized merge process μ′, the stream relations {b′0}×{e′0}, {e′0}×{b0}, {b′ i}×{e′} and {e′}×{b′}; Marking e'0 as a delete operation for all data, i.e., De(e'0)=D, and marking e' as an end operation, i.e., End(e')=D, where End is an end marking function.
[0014] A data loss error detection system in an information physics system based on Petri-Net according to the present invention, comprising: a Petri net mapping unit for mapping an information-physics system modeled in the business process modeling notation to a first Petri net which is a data-attached Petri net; A merge process generation unit for generating a merge process μ = (B, E, G, D, Rd, Wr, De) of the first Petri net, where B is a set of conditions, E is a set of events, G is a set of arcs, D is a set of data elements, Rd is a read marking function, Wr is a write marking function, and De is a delete marking function, and a merge process generation unit; A merge process optimization unit for optimizing events and conditions in the merge process μ based on deletion rules to obtain an optimized merge process μ′ = (B′, E′, G′, D′, Rd′, Wr′, De′, λ′, M′); In the optimized merge process μ′, a loss error detection unit for determining whether each event is a lost event and outputting a set of events of data loss error, and In the loss error detection unit, Performing a synonymous data operation on the optimized merge process μ′, further calculating data proximity events, where the synonymous data operation is to give a data write element d of event e, [e] + If there are two parallel events e1 and e2 belonging to [e] and d ∈ Wr(e1) ∪ Rd(e1), adding the same data operation label, that is, (e1, Wr: d or e1, Rd: d) from e1 to e2, provided that [e] + ={e′ ∈ E|e′ ≦ e}, and the data proximity events are to give two events e1 and e2 that satisfy data d ∈ Rd(e1) ∪ Wr(e1) ∪ De(e1). When e1 < e2, there is clearly a path from e1 to e2, and if the event e′ on this path is
Number
[0015] A computer-readable storage medium according to the present invention in which a computer program is stored, characterized in that when the computer program is executed by a processor, the method for detecting a data loss error in a cyber-physical system based on the Petri-Net is realized.
Advantages of the Invention
[0016] Beneficial effects: Compared with the prior art, the advantages of the present invention are as follows. (1) In the present invention, the unfolding technology of the Petri net is adopted. Through structural analysis, since the conventional reachability graph or state transition graph detection method is affected by state space explosion when processing large-scale systems, it becomes difficult to effectively detect data loss errors. This problem is alleviated. (2) In the present invention, through parallel relationship detection, after a data stream error occurs, the state space of the reachability graph is incomplete, and the problem that data loss errors cannot be comprehensively detected is compensated, ensuring the comprehensiveness of detection. (3) In the present invention, the α deletion rule is designed and combined with the merging process to reduce irrelevant control stream conditions and events while ensuring behavioral consistency, reduce the complexity of the model, and improve the efficiency of the data loss error detection algorithm. (4) In the present invention, a data loss error detection algorithm is designed. For the event e belonging to the marking function of the data element d, it is explored whether there is an event e' belonging to the marking function of the data element d in its data proximity set. Through the above steps, data loss errors in the CPS data stream can be detected, the design accuracy of the cyber-physical system can be verified, and the superiority and effectiveness of the present invention can be proved by experimental comparison.
Brief Description of the Drawings
[0017]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Embodiment for Carrying Out the Invention
[0018] Hereinafter, the technical solution will be further described with reference to the drawings.
[0019] Referring to FIGS. 1 and 2, in a cyber-physical system (CCPS) of a CPS modeling process modeled using BPMN, the steps of detecting a data loss error for this CCPS using the present invention include the following steps.
[0020] S1. Based on the mapping relationship, map the CCPS modeled using BPMN to a Petri-Net with data (PD-Net).
[0021] Considering the data object and its state, convert BPMN to PD-Net, and model the PD-Net generated by mapping on a computer using a modeling tool. Here, PD-Net is a data net (D-net) N with an initial marker m0 D where Σ = (N D , m0). D-net is a 7-tuple N D = (P, T, F, D, Read, Write, Delete), and (P, T, F) satisfies the condition of being a net. D is a finite set of data elements, and Read: T → 2 Dis the marking function for data reading, Write: T → 2 D is the marking function for data writing, Delete: T → 2 D is the marking function for data deletion.
[0022] As shown in Figure 3, the mapping from BPMN to PD-Net is as follows. Map the exclusive gateway of BPMN to the collision structure of PD-Net. Map the parallel gateway of BPMN to the parallel structure of PD-Net. Map activities to transitions and their pre / post libraries. Map the input and output of data objects / data libraries to the marking functions of data read / write elements during transitions. Map external inputs to the marking functions of data writing elements during transitions. Map the message stream between activities to libraries and their pre / post transitions. Map other connection targets to arcs between several related libraries and transitions.
[0023] S2. Generate the merge process of PD-Net according to the rules.
[0024] The formalization of the merge process (MP) μ = (B, E, G, D, Rd, Wr, De) maps the library P, transitions T, stream relationship F, set of data elements D, and marking functions Read, Write, Delete to the conditions B, events E, arcs G, set of data elements D, and marking functions Rd, Wr, De respectively. The specific rules are as follows. Let β be the branching process (Branching Process) of PD-Net (N, m0), and μ = Merge(β), which can be obtained through the following steps.
[0025] (1) Merge all β collision conditions with the same label and occurrence depth into one condition.
[0026] (2) Merge all β events with the same label, i.e., the pre-set and post-set, into one event.
[0027] (3) All relevant arcs of β need to be redirected based on the merge conditions and events.
[0028] The Branching Process is a finite or infinite marked acyclic net and can be obtained by continuously triggering transitions and unfolding the PD-Net under the following assumptions.
[0029] (1) From a set of libraries (referred to as conditions), mark the initial markers corresponding to each library.
[0030] (2) Generate a new transition (referred to as an event) every time a new one is triggered.
[0031] (3) Generate a new library (also referred to as a condition) for each newly generated token. Each event / condition is marked by the corresponding transition / condition.
[0032] If x is one of the nodes of β (a condition or an event), the occurrence depth of x is defined as the maximum number of marked nodes on any directed path starting from the initial condition and ending at x in the directed graph of β.
[0033] Finally, obtain the merge process μ = (B, E, G, D, Rd, Wr, De) of the PD-Net.
[0034] S3. Create α deletion rules to optimize the generated merge process and provide an accuracy analysis of the α deletion rules.
[0035] The α deletion rule is to convert the merge process into an interactive MP, and then optimize it to obtain the optimized merge process μ′, where μ λ=(B, E, G, D, Rd, Wr, De, λ, M), where the marking function λ: E → L ∪ {α}, L = {!,?, @} × D, marks the type of the current event including the non-marking α, write!, read?, and delete @, and M is the mapping M: P → {0, 1, 2, 3,...}, called the identification information of the net.
[0036] α deletion rule 1: ∃e ∈ E ∧ λ(e) = α,
Number
Number
[0037] The deletion α rule 1 is applicable to three cases as shown in Figure 4. Figures 4(a), 4(b), and 4(c) respectively correspond to the first case, the second case, and the third case where the α deletion rule 1 is applied. Figure 4(d) is the reachable graph corresponding to Figure 4(a), Figure 4(e) is the reachable graph corresponding to Figure 4(b), and Figure 4(f) is the reachable graph corresponding to Figure 4(c). To the left of the thick arrow is the source interactive MP μ λ and there is an α in this interactive MP μ λ and to the right of the thick arrow is the target optimized merge process (O-MP) μ′. The source interactive MP μ λIt is obtained by deleting α. As shown in Fig. 4(a), the α deletion rule 1 is applied to the interactive MP having a serial structure. As shown in Figs. 4(b) and 4(c), the α deletion rule 1 is applied to the interactive MP having a parallel structure. The difference between Fig. 4(a) and Fig. 4(c) is that the processing of M′ is different. In order to visually distinguish α from data operation events, α is indicated by a filled black block. Also, the area shown by the dashed block is the related element that needs to be deleted from the source interactive MP μ λ in the α deletion process.
[0038] α deletion rule 2: ∃e1,e2,...e n ∈E∧λ(e1)=α∧λ(e2)=α∧...∧λ(e n )=α, and
Number
Number
Number
[0039] The α - deletion rule 2 is applicable to two cases. As shown in Fig. 5, Fig. 5(a) and Fig. 5(b) correspond to the first case and the second case where the α - deletion rule 2 is applied respectively, Fig. 5(c) is the reachable graph corresponding to Fig. 5(a), and Fig. 5(d) is the reachable graph corresponding to Fig. 5(b). The difference between Fig. 5(a) and Fig. 5(b) is the different processing of M'. The same point is that the source interaction formula MP μ to the left of the thick arrow shown in Fig. 5(a) and Fig. 5(b) λ has n αs, and the inputs of these αs gather at condition b2, and the outputs gather at condition b3, and the α - deletion rule 2 is used to delete all these αs.
[0040] α - deletion rule 3: ∃e1,e2,...e n ∈E∧λ(e1)=α∧λ(e2)=α∧...∧λ(e n )=α∧λ(e)≠α, and
Number
Number
[0041] The α - deletion rule 3 is shown in Fig. 6. Fig. 6(a) corresponds to the first case where the α - deletion rule 3 is applied, and Fig. 6(b) is the reachable graph corresponding to Fig. 6(a). The source interaction formula MP μ shown in Fig. 6 λ graph has n αs and an operation?z of one data - reading element z, and the inputs of these events gather at condition b2 and the outputs gather at condition b3. If all these n αs are directly deleted, the source interaction formula MP μ λTherefore, by deleting these n αs, the source mutual formula MP μ λ Simplifying the source reciprocal MP μ λ In order to maintain the selection (collision) structure in μ′, one α-event needs to be added to the objective-optimized merging process (O-MP) μ′.
[0042] Correctness analysis of the alpha deletion rule: We perform a correctness analysis on the α-deletion rule and adopt weak co-simulation as the criterion for detecting whether actions are consistent. The problem of whether the detected source MP and the target MP maintain action consistency can be reduced to the problem of detecting whether the detected source MP and the target MP satisfy weak co-simulation.
[0043] Based on the above α deletion rules, reduction optimization can be performed on the MP, which can reduce the number of control stream conditions and events, and greatly improve the efficiency of the data loss error detection algorithm under the premise of ensuring behavioral consistency.
[0044] The certification process includes the following steps:
[0045] S301, Accuracy Analysis of Alpha Removal Rule 1: The key issue in performing correctness analysis on α-deletion rule 1 is to prove whether the reachable graph of the source mutual formula MP and the reachable graph of the target mutual formula MP satisfy weak mutual simulation. The proof is as follows.
[0046] That is, we prove that the reachable graphs shown in Figure 4(d) satisfy mutual simulation. In the first step, the reachability graph on the left contains
number
[0047] In the second step, in the left reachable graph, [Number] make it to
[0048] As can be seen from the above, it is M0SM0'. The relation S = {(M0, M0'), (M1, M0'), (M2, M1')}.
[0049] The inverse S of the relation S -1 = {(M0', M0), (M0', M1), (M1', M2)} is a weak simulation, that is, it is proved that the reachable graph on the right of the thick arrow in Figure 4 is weakly simulated by the reachable graph on the left.
[0050] In the first step, in the right reachable graph, M0' remains unchanged as it is, and in the left reachable graph, there is M0, [Number] make it to
[0051] In the second step, in the right reachable graph, [Number] make it to
[0052] As can be seen from the above, M0'S -1 M0. From this, it is proved that M0 ≒ M0'. Similarly, it can be proved that other reachable graphs satisfy weak mutual simulation.
[0053] S302, Accuracy Analysis of Alpha Deletion Rule 2: The important issue for performing accuracy analysis on the alpha deletion rule 2 is to prove whether the reachable graph of the source interactive MP and the reachable graph of the target interactive MP satisfy weak mutual simulation. The proof is as follows.
[0054] That is, it is proved that the weak mutual simulation is satisfied between the two reachable graphs shown in FIG. 5.
[0055] In the first step, for the left reachable graph,
Number
[0056] In the second step, for the left reachable graph,
Number
Number
[0057] In the third step, for the left reachable graph,
Number
[0058] In the fourth step, both M2 and M2′ are end identification information.
[0059] As can be seen from the above, M0SM0′. The relation S = {(M0, M0′), (M1, M1′), (M2, M1′)), (M3, M2′)}.
[0060] The inverse S of the relation S -1 = {(M0′, M0), (M1′, M1), (M1′, M2), (M2′, M3)} is a weak simulation, that is, it is proved that the reachable graph on the right of the thick arrow in FIG. 5 is weakly simulated by the reachable graph on the left of the black arrow.
[0061] In the first step, for the right reachable graph,
Number
[0062] In the second step, in the reachable graph on the right, M1' remains unchanged as it is, and in the reachable graph on the left, since there is M2,
Number
[0063] In the third step, in the reachable graph on the right,
Number
[0064] As can be seen from the above, M0'S -1 is M0. From this, it can be proved that M0≈M0'. Similarly, it can be proved that other reachable graphs satisfy weak bisimulation.
[0065] S303, Accuracy analysis of α deletion rule 3: The important issue for performing accuracy analysis on α deletion rule 3 is to prove whether the reachable graph of the source interactive MP and the reachable graph of the target interactive MP satisfy weak bisimulation. The proof is as follows.
[0066] That is, prove that the two reachable graphs shown in Figure 6 satisfy weak bisimulation.
[0067] In the first step, in the reachable graph on the left,
Number
[0068] In the second step, in the reachable graph on the left,
Number
[0069] In the third step, in the left reachable graph, [Number] make it
[0070] In the fourth step, both M3 and M3' are end identification information.
[0071] As can be seen from the above, it is M0SM0'. The relation S = {(M0, M0'), (M1, M1'), (M2, M2')), (M3, M3')}.
[0072] The inverse S of the relation S -1 = {(M0', M0), (M1', M1), (M2', M2), (M3', M3)} is a weak simulation, that is, it is proved that the reachable graph on the right of the thick arrow in Figure 6 is weakly simulated by the reachable graph on the left of the black arrow.
[0073] In the first step, in the right reachable graph, [Number] make it
[0074] In the second step, in the right reachable graph, or [Number] exists. Since there is M2 in the left reachable graph, [Number] make it
[0075] In the third step, in the right reachable graph, [Number] exists. Since there is M3 in the left reachable graph, [Number] Make it
[0076] As can be seen from the above, M0′S -1 is M0. From this, prove M0≒M0′.
[0077] In steps S301, S302, and S303, for the accuracy analysis of the α deletion rule, it is necessary to understand the concepts of experimental relationship, weak simulation, and weak mutual simulation, which are defined as follows.
[0078] Experimental relationship: Let Σ=(P,T,F,M0) be a Petri-Net, where M0 is the initial state. The reachable graph of Σ is RG(Σ)=(R(M0),E,Tran), M i , M j ∈R(M0), s∈Act*, where Act=T∪{α}, and the experimental relationship
Number
[0079] (1)
Number
Number
[0080] (2) When s=t1...t n in the case of,
Number
Number
[0081] Weak simulation: Given a Petri net Σ = (P, T, F, M0), its reachability graph is RG(Σ) = (R(M0), E, Tran). Given another Petri net Σ′ = (P′, T′, F′, M0′), its reachability graph is RG(Σ′) = (R(M0′), E′, Tran′). A relation S is a weak simulation on the reachability information set R(M0) ∪ R(M0′). The following conditions hold if and only if M0SM0′.
[0082] (1) [Number] and M k SM k ′ is satisfied.
[0083] (2) [Number] and M k SM k ′ is satisfied.
[0084] If M0SM0′, then Σ is called a weak simulation of Σ′.
[0085] Weak bisimulation: Given a Petri net Σ = (P, T, F, M0), its reachability graph is RG(Σ) = (R(M0), E, Tran). Given another Petri net Σ′ = (P′, T′, F′, M0′), its reachability graph is RG(Σ′) = (R(M0′), E′, Tran′). A relation B is a weak bisimulation on the reachability information set R(M0) ∪ R(M0′). A weak bisimulation B satisfies M0BM0′ if and only if both B and its inverse relation are weak simulations. In this case, M0 and M0′ are called weak bisimulations, denoted as M0 ≒ M0′.
[0086] If M0BM0′, then Σ and Σ′ satisfy weak bisimulation.
[0087] S4. Initialize the optimized merge process O-MPμ′ to μ′′=(B′,E′,G′,D′,Rd′,Wr′,De′,End′,λ′,M′), and initialize the set of events where data loss errors occurred.
Number
[0088] The initialization of the optimized merge process is to add condition b′0 and event e′0 before the start condition of μ′, and add condition b′ and event e′ after the end condition, where the subscripts of b′ and e′ are the maximum subscript i of the condition and event in μ′ plus 1, respectively. Also, in μ′′, add the stream relationships {b′0}×{e′0}, {e′0}×{b0}, {b′ i}×{e′} and {e′}×{b′}. At the same time, e′0 is marked as a deletion operation for all data, that is, De(e′0)=D, and e′ is marked as an end operation, that is, End(e′)=D.
[0089] S5. Analyze the initialized optimized merge process μ′′ and design a data loss error detection algorithm.
[0090] The data loss error detection algorithm is detection based on data proximity events. Before calculating the data proximity events, it is necessary to perform equivalent data operations on MP in order to accurately detect errors in the parallel structure. The equivalent data operation is to give the data write element d of event e. [e] + If there are two parallel events e1 and e2 belonging to [e] and d∈Wr(e1)∪Rd(e1), add the same data operation label, that is, (e1,Wr:d or e1,Rd:d), from e1 to e2, where [e] + ={e′∈E|e′≦e}.
[0091] The definition of a data proximity event is as follows. Given two events e1 and e2 such that they satisfy data d ∈ Rd(e1) ∪ Wr(e1) ∪ De(e1), and e1 < e2, if there is an obvious path from e1 to e2 and there is an event e′ on this path that [Number] satisfies or [Number] then e1 is called the data proximity event of e2. The data loss error detection algorithm is as follows.
[0092] [Table 0]
[0093] The algorithm process is as follows. Determine whether event e belongs to the marking function of data element d. If it belongs, in the weak local structure [e] of event e + calculate the data proximity set S(e, d) for data element d of event e, where [e] + = {e′ ∈ E | e′ ≤ e}. If there is an event e′ of the Wr marking function belonging to data element d in S(e, d), add event e to the event set E_los where a data loss error has occurred.
[0094] S6. Output the event set where data loss has occurred.
[0095] Finally, output the event set E_los where a data loss error has occurred using the data loss error detection algorithm based on O - MP.
[0096] Table 1 shows some of the comparison results. Currently, since the proposal of a data loss error detection method based on the merge process has not been considered for some time, data loss errors cannot be detected. Also, during the transition, if a data stream error occurs in the data stream error detection based on the reachable graph, subsequent conversions are not triggered, and related states and arcs may not be shown in the reachable graph. Therefore, in this case, the reachable graph does not have a complete state space that overwrites all execution information. For this reason, this method cannot detect all data loss errors. By comparison, the method of the present invention makes up for this deficiency. Furthermore, as a result of the analysis and comparison, the data loss error detection by the optimized merge process based on the α deletion rule used in the present invention is superior in terms of detection results and time to the data loss error detection based on the normal merge process, and is also superior in terms of state space, detection results, and time to the method based on the reachable graph.
[0097] Table 1 Comparison of the number of data loss errors detected using MP, O-MP, and reachable graph in CCPS
Table 1
[0098] The cyber-physical system data loss error detection system based on the Petri-Net of the present invention is a Petri net mapping unit for mapping a cyber-physical system modeled by a business process modeling notation to a first Petri net which is a Petri net with data, a merge process generation unit for generating a merge process μ=(B, E, G, D, Rd, Wr, De) of the first Petri net, where B is a set of conditions, E is a set of events, G is a set of arcs, D is a set of data elements, Rd is a read marking function, Wr is a write marking function, and De is a delete marking function A merge process optimization unit for optimizing events and conditions in the merge process μ based on deletion rules to obtain an optimized merge process μ′ = (B′, E′, G′, D′, Rd′, Wr′, De′, λ′, M′); In the optimized merge process μ′, it includes a loss error detection unit for determining whether each event is a loss event and outputting a set of events of data loss error; In the loss error detection unit, a synonymous data operation is performed on the optimized merge process μ′, and further data proximity events are calculated. The synonymous data operation is to give the data writing element d of the event e, [e] + If there are two parallel events e1 and e2 belonging to [e] and d ∈ Wr(e1) ∪ Rd(e1), add the same data operation label, that is, (e1, Wr: d or e1, Rd: d) from e1 to e2, provided that [e] + ={e′ ∈ E|e′ ≤ e}, and the data proximity events are to give two events e1 and e2 that satisfy the data d ∈ Rd(e1) ∪ Wr(e1) ∪ De(e1). When e1 < e2, there is obviously a path from e1 to e2, and the events e′ on this path
Number
[0099] The computer-readable storage medium of the present invention in which a computer program is stored, when the computer program is executed by a processor, realizes the method for detecting information physical system data loss errors based on the Petri-Net.
[0100] The computer-readable storage medium can include RAM, ROM, EEPROM, CD-ROM, or other optical disk storage devices, magnetic disk storage devices, or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and can be accessed by a computer.
[0101] The processor is used to execute a computer program stored in the memory to realize various steps of the method according to the above embodiments.
Claims
1. A method for detecting data loss errors in a cyber-physical system based on a Petri-Net, wherein a computer maps a cyber-physical system modeled in a business process modeling notation to a first Petri-Net which is a Petri net with data; generating a merging process μ=(B, E, G, D, Rd, Wr, De) of the first Petri-Net, where B is a set of conditions, E is a set of events, G is a set of arcs, D is a set of data elements, Rd is a read marking function, Wr is a write marking function, and De is a delete marking function; optimizing events and conditions in the merging process μ based on deletion rules to obtain an optimized merging process μ'=(B', E', G', D', Rd', Wr', De', λ', M'); judging whether each event in the optimized merging process μ' is a lost event, and outputting a set of events of data loss errors; Performing a synonymous data operation on the optimized merge process μ′ and further calculating data proximity events, where the synonymous data operation is to provide the data write element d of event e, [e] + There are two parallel events e 1 and e 2 belonging to + , and d ∈ Wr(e 1 ) ∪ Rd(e 1 ), in this case, from e 1 to e 2 , add the same data operation label, i.e., (e 1 , Wr: d or e 1 , Rd: d), provided that [e] + = {e′ ∈ E | e′ ≤ e}, and the data proximity events are to provide two events e 1 and e 1 satisfying d ∈ Rd(e 1 ) ∪ Wr(e 1 ) ∪ De(e 2 ), and when e 1 < e 2 , there is clearly a path from e 1 to e 2 , and the event e′ on this path is 【Number 48】 In the case of e 1 Execute the step of calling e 2 as a data proximity event, The method for judging whether each event e is a lost event is as follows: Determine whether event e belongs to the marking function of data element d. If it belongs, the weak local structure [e] of event e + In this case, calculate the data proximity set S(e, d) for the data element d of event e. If there is an event e' belonging to the marking function of data element d in S(e, d), add event e to the event set E_loss where a data loss error has occurred. Convert the merge process μ into a target interactive merge process μ λ = (B, E, G, D, Rd, Wr, De, λ, M), where λ is a marking function used to mark the type of the current event, and M: B → {0, 1, 2, 3,...} is the identification information of the net. The marking function is λ: E → L ∪ {α}, where L = {!,?, @} × D includes the non-marking α, write!, read?, and delete @. the target interactive merging process μ λ in which, rule deletion events and conditions are deleted to obtain an optimized merging process μ′ The deletion rules are: ∃e∈E∧λ(e)=α, 【Number 49】 in this case, this event e can be deleted, provided that [Number 50] D' = D, Rd' = Rd, Wr' = Wr, De' = De, λ' = λ - {(e, α)}, [0.51] and ∃e 1 ,e 2 ,..., e n ∈ E ∧ λ(e 1 ) = α ∧ λ(e 2 ) = α ∧... ∧ λ(e n ) = α, and 【Number 52】 In the case of these n e's 1 , e 2 ,..., e n can all be deleted to obtain a new MPμ′ = (B′, E′, G′, D′, Rd′, Wr′, De′, λ′, M′), provided that 【Number 53】 D' = D, Rd' = Rd, Wr' = Wr, De' = De, λ′ = λ - { (e 1 , α)} - { (e 2 , α)... - { (e n , α)}、 【Number 54】 where the i value is from 1 to n, ∃e 1 ,e 2 ,..., e n ∈ E ∧ λ(e 1 ) = α ∧ λ(e 2 ) = α ∧... ∧ λ(e n ) = α ∧ λ(e) ≠ α, 【Number 55】 all α in can be deleted, the e event cannot be deleted, and α is added to maintain the collision structure in the deletion rules, provided that B' = B, 【Number 56】 D' = D, Rd' = Rd, Wr' = Wr, De' = De, λ' = λ, M' = M, and a method for detecting data loss errors in a cyber-physical system based on a Petri-Net, characterized in that.
2. The step of mapping the cyber-physical system modeled in the business process modeling notation to a first Petri-Net which is a Petri net with data as described above includes mapping the cyber-physical system to a first Petri-Net and modeling the first Petri-Net based on data objects and states in the cyber-physical system; The first Petri net has an initial marker m 0 Net N with data D and Σ=(N D , m 0 ), N D = (P, T, F, D, Read, Write, Delete), where (P, T, F) is a net, P is a library, T is a transition, F is a stream relation, and Read, Write, and Delete are respectively a read marking function, a write marking function, and a delete marking function in the first Petri net.
3. The step of mapping the cyber-physical system modeled in the business process modeling notation to a first Petri-Net which is a Petri net with data as described above The merging process μ = Merge(β) is included, and the method for generating the merging process μ is as follows: Merge all β collision conditions having the same label and occurrence depth into one condition; Merge all β events having the same label, i.e., the pre-set and post-set, into one event; All relevant arcs of β need to be redirected based on the conditions and events of the merge; where β is a branching process of the first Petri net. A method for detecting data loss errors in a cyber-physical system based on the Petri-Net according to claim 2, characterized in that.
4. The step of mapping the cyber-physical system modeled by the business process modeling notation to a first Petri net which is a Petri net with data includes: Mapping the exclusive gateway of the business process modeling notation to the collision structure of the first Petri net; Mapping the parallel gateway of the business process modeling notation to the parallel structure of the first Petri net; Mapping activities to transitions and their pre-library or post-library; Mapping the input and output of the data object or data library to the marking function of the data read / write element during the transition; Mapping external input to the marking function of the data write element during the transition; Mapping the message stream between activities to the library and the transition before or after it; Mapping other connection targets to the arcs between the relevant library and the transition. A method for detecting data loss errors in a cyber-physical system based on the Petri-Net according to claim 1, characterized in that it includes the above steps.
5. The step of optimizing the events and conditions in the merging process μ based on the deletion rules to obtain an optimized merging process μ′ = (B′, E′, G′, D′, Rd′, Wr′, De′, λ′, M′) as described above is 2. The method for detecting data loss errors in an information physics system based on Petri-Net according to claim 1, further comprising the steps of: performing an accuracy analysis on the deletion rule; adopting weak reciprocity as a criterion for detecting whether behaviors are consistent; and reducing the problem of detecting whether the source merge process and the target reciprocal merge process maintain behavior consistency to the problem of detecting whether the source merge process and the target reciprocal merge process satisfy weak reciprocity.
6. In the optimized merging process μ′, the step of determining whether each event is a loss event and outputting a set of events of data loss errors includes: In the optimized merging process μ′, before determining whether each event is a lost event, the optimized merging process μ′ is initialized, and the initialization includes: Condition b' before the start condition of the optimized merge process μ' 0 and event e' 0 are added, and condition b' and event e' are added after the end condition, where the b' and e' subscripts are each the maximum subscript i of the condition and event in μ' plus 1, In the optimized merge process μ′, add the stream relationships {b′ 0} × {e′ 0}, {e′ 0} × {b 0}, {b′ i} × {e′} and {e′} × {b′}, and e' 0 is marked as a deletion operation for all data, i.e., De(e' 0 ) = D, and e' is marked as an end operation, i.e., End(e') = D, and End is an end marking function, characterized in that the method for detecting data loss errors in a cyber-physical system based on the Petri-Net according to claim 1 includes this.
7. A data loss error detection system in a Petri-Net-based information physics system, comprising: a Petri net mapping unit for mapping an information physics system modeled in the business process modeling notation to a first Petri net which is a Petri net with data; a merge process generation unit for generating a merge process μ=(B, E, G, D, Rd, Wr, De) of the first Petri net, where B is a condition set, E is an event set, G is an arc set, D is a data element set, Rd is a read marking function, Wr is a write marking function, and De is a delete marking function; a merge process optimization unit for optimizing events and conditions in the merge process μ based on a deletion rule to obtain an optimized merge process μ′=(B′, E′, G′, D′, Rd′, Wr′, De′, λ′, M′); In the optimized merging process μ′, a loss error detection unit is included for determining whether each event is a loss event and outputting a set of data loss error events; In the lost error detection unit, a synonym data operation is performed on the optimized merge process μ′, and a data proximity event is further calculated. The synonym data operation is to provide a data writing element d of event e, [e] + There are two parallel events e 1 and e 2 such that d ∈ Wr(e 1 ) ∪ Rd(e 1 ), then from e 1 to e 2 , the same data operation label, i.e., (e 1 , Wr: d or e 1 , Rd: d) is added, provided that [e + = {e′ ∈ E|e′ ≤ e}, The data proximity event gives two events e 1 ), ∪ Wr(e 1 ), ∪ De(e 1 ), satisfying d ∈ Rd(e 1 and e 2 ; and when e 1 < e 2 ), there is clearly a path from e 1 to e 2 ; and for the event e' on this path 【Number 57】 In the case of e 1 is called the data proximity event of e 2 and is referred to as the data proximity event of e The method for determining whether each event is a lost event is as follows: Determine whether event e belongs to the marking function of data element d. If it belongs, in the weak local structure [e] of event e + calculate the data proximity set S(e, d) for data element d of event e. If there is an event e' belonging to the marking function of data element d in S(e, d), add event e to the event set E_loss where a data loss error has occurred The merging process μ is a target mutual merging process μ λ = (B, E, G, D, Rd, Wr, De, λ, M), where λ is a marking function used to mark the type of the current event, M:B → {0, 1, 2, 3, ...} is the identity of the net, and the marking function λ:E → L ∪ {α}, where L = {!, ?, @} × D includes non-marking α, write !, read ?, delete @, The target mutual merging process μ λ In ,delete the rule deletion events and conditions to obtain the optimized merging process μ′, The deletion rule is: ∃e∈E∧λ(e)=α, 【Number 58】 This event e can be deleted if 【Number 59】 D′=D, Rd′=Rd, Wr′=Wr, De′=De, λ′=λ−{(e,α)}, 【Number 60】 And, ∃e 1 ,e 2 ,..., e n ∈ E ∧ λ(e 1 ) = α ∧ λ(e 2 ) = α ∧... ∧ λ(e n ) = α, 【Number 61】 In the case of these n e's 1 , e 2 ,... e n can be deleted, and we obtain a new MPμ′=(B′,E′,G′,D′,Rd′,Wr′,De′,λ′,M′), where [Number 62] D′=D, Rd′=Rd, Wr′=Wr, De′=De, λ′ = λ - { (e 1 , α)} - { (e 2 , α)... - { (e n , α)}、 【Number 63】 where the value of i is 1 to n; ∃e 1 ,e 2 ,..., e n ∈ E ∧ λ(e 1 ) = α ∧ λ(e 2 ) = α ∧... ∧ λ(e n ) = α ∧ λ(e) ≠ α, 【Number 64】 All α in can be deleted, and e events cannot be deleted. Add α to maintain the collision structure in the deletion rules, with the exception that B'=B, [Number 65] D′=D, Rd′=Rd, Wr′=Wr, De′=De, λ′=λ, and M'=M.
8. A computer-readable storage medium on which a computer program is stored, A computer-readable storage medium, characterized in that, when the computer program is executed by a processor, it realizes the method for detecting data loss errors in an information physics system based on Petri-Net according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for detecting and deleting structure redundancy in Petri net service process
CN108171396A
Concurrent system error detection method, system and apparatus based on PD-Net and medium
CN108647380A
Distributed database system data inconsistency detection method and system
CN116894042A