CN113434424A - Black box industrial control system modular code restoration method - Google Patents

Black box industrial control system modular code restoration method Download PDF

Info

Publication number
CN113434424A
CN113434424A CN202110760953.8A CN202110760953A CN113434424A CN 113434424 A CN113434424 A CN 113434424A CN 202110760953 A CN202110760953 A CN 202110760953A CN 113434424 A CN113434424 A CN 113434424A
Authority
CN
China
Prior art keywords
control system
industrial control
sequence
variable
black
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110760953.8A
Other languages
Chinese (zh)
Inventor
戴文斌
吴娴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Jiaotong University
Original Assignee
Shanghai Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jiaotong University filed Critical Shanghai Jiaotong University
Priority to CN202110760953.8A priority Critical patent/CN113434424A/en
Publication of CN113434424A publication Critical patent/CN113434424A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3628Software debugging of optimised code

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a black box industrial control system modular code reduction method, and relates to the technical field of reverse construction of industrial function block models. The method comprises the steps of data preprocessing, internal logic reduction and system structure reduction. The dependence on the experience of professional technicians can be reduced under the condition that the source code of the system is unknown, and a system behavior model is automatically generated through reduction; a data preprocessing frame is set up, analysis methods of various variables such as constants, Boolean quantities, time quantum and the like are provided, the time-shifted variables are matched, the redundancy of acquired data is reduced, and the subsequent analysis efficiency is improved; and introducing methods such as dynamic time warping, variable sequence clustering and the like to restore and generate the internal connection structure of the composite system.

Description

Black box industrial control system modular code restoration method
Technical Field
The invention relates to the technical field of reverse construction of industrial function block models, in particular to a black box industrial control system modular code reduction method.
Background
The existing industrial automation control system modeling is mainly based on empirical knowledge of engineers, an industrial software and hardware system is abstracted into a discrete model in stages, and then parameters required by operation data filling are analyzed. For a black box system with unknown internal logic and structure, a common method at present is to convert all acquired variables into Boolean quantities, to idealize the system into a single execution module with input and output being Boolean quantities, to analyze and test input and output data and to mine the association between system variables through one or more machine learning algorithms such as decision trees, Bayes, least square methods and the like, so as to generate state description and jump conditions of system objects, and to finally model the system behavior in the form of a finite state machine.
Under the condition of lacking source codes, the black box system behavior model cannot be automatically restored; the existing modeling method cannot effectively analyze non-Boolean system data; the existing method only generates logic inside a single module, and cannot restore the relation among a plurality of modules, namely cannot restore the internal structure of a complex system.
Therefore, those skilled in the art are devoted to developing a black box industrial control system modular code reduction method. The system behavior model can be automatically generated by reduction under the condition that the system source code is unknown; a data preprocessing frame is set up, analysis methods of various variables such as constants, Boolean quantities, time quantum and the like are provided, the time-shifted variables are matched, the redundancy of acquired data is reduced, and the subsequent analysis efficiency is improved; and introducing methods such as dynamic time warping, variable sequence clustering and the like to restore and generate the internal connection structure of the composite system.
Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, the technical problem to be solved by the present invention is to automatically generate a black box system behavior model based on input, output and operational data; analyzing and processing non-Boolean data, and restoring to generate the relationship among different types of data; and packaging the input and output data into modules in a grouping manner, and analyzing and restoring the relation among the modules.
In order to achieve the purpose, the invention provides a modular code recovery method for a black box industrial control system, which comprises the following steps:
step 1, preprocessing data;
step 2, restoring internal logic;
and 3, restoring the system structure.
Further, the data preprocessing comprises the steps of carrying out type division, similarity matching and pattern clustering on the collected data.
Further, in the type division, if the differential sequence of the acquisition sequence is close to a full zero sequence, the corresponding parameter of the sequence is a constant; otherwise, it is a variable.
Further, if the variable sequence only takes a value of 0 or 1, the sequence corresponding variable is a boolean quantity; otherwise, the value is a variable.
Further, if the change sequence of the numerical variable can be divided into a counting stage with a differential sequence value of 1 and discrete set and reset points, the sequence-corresponding variable is the amount of time.
Further, the similarity matching adopts dynamic time warping to calculate the similarity and time difference between the sequences of the same type, and an independent variable set is generated.
Further, the internal logic reduction regards an input variable as a condition variable and an output variable as a state variable, and generates a state machine element by matching the state variable and the condition variable.
Further, the state machine elements comprise initial states, state descriptions, state change sequences and jump conditions among jumpable states.
Further, the system architecture restores the model description system function blocks using data and time dual drive.
Further, the internal logical and physical relationships between the functional blocks of the system are modeled by means of event connection lines.
In a preferred embodiment of the present invention, the present invention provides a method for restoring a system behavior model based on data. As shown in fig. 1, the input quantities are input data, intermediate state and output data of the black box system, and the output quantities are function blocks connected by an event quantity and a data quantity. The model reduction comprises three steps of data preprocessing, internal logic reduction and system structure reduction.
Firstly, the collected data is subjected to type division, similarity matching and pattern clustering. The collected data is a time sequence of input and output and state variables which can be observed in the operation process of the system. Because the original system may contain a plurality of interconnected sub-modules, the same data variable may be collected many times, and needs to be preprocessed to remove redundancy. Referring to the IEC 61131 standard, common system data types include a constant, a boolean, an amount of time, and the like, and therefore according to the change rule of an acquisition sequence, data that does not change is defined as a constant, a variable with a value of 0 to 1 is defined as a boolean, and data with a fixed change pattern of counting, setting, and resetting is defined as an amount of time. After each variable type is determined, the similarity between the data of the same type and the time difference between the similar data are calculated by using an improved dynamic time warping algorithm, so that the similar data are merged or associated. And finally, representing the change condition of each non-repeatedly acquired independent variable by using a Boolean sequence, indicating the time of mode change by using 1, indicating the mode to be the same as the previous time by using 0, and dividing the independent variable into a specified number of clusters by time sequence series clustering, thereby realizing the division of the internal modules of the black box system.
After the data preprocessing is finished, the original data are divided into a plurality of relatively independent clusters according to the change synchronization rate of the original data. One cluster corresponds to one module inside the black box system, i.e., one behavior meta-model that can be described by function blocks. The logic inside the functional block is described by a finite state machine, containing state descriptions, jump conditions and execution algorithms, as shown in fig. 2. The state machine may be generated by matching the observed system state with the input variables. The input variables of the system are condition variables representing state jump, and the values of all the input variables at the jump moment are the conditions to be met by the current state jump. The output variables of the system can be viewed as state variables describing the state. The algorithm operates on the input variables and the output variables. Through the steps, the state machine of each cluster can be generated preliminarily. The feasibility verification of the state machine is mainly based on the principle of sequential non-parallel execution. If two groups of state jump conditions are met at the same time in the state machine, the priority is calibrated according to the observation result of the system state so as to ensure the principle of sequential non-parallel execution. After the feasibility is ensured, the variable conditions in each state jump are deleted in sequence in a greedy algorithm-like mode. If the validity and feasibility of the state machine are not influenced after deletion, deleting the state machine; otherwise, the procedure is reserved.
This step restores the internal logic that generated each set of variables and packages them into groups as functional blocks that only keep the input/output events and data interfaces to the outside, as shown in fig. 2. And thirdly, the system structure reduction needs to respectively connect the data and event interfaces among the scattered function blocks to generate a data event dual-drive system behavior model. The data connection rule may connect similar data within different functional blocks with reference to a similar data set analyzed in the first step of data preprocessing. The event connection rules are based primarily on the physical meaning and the order of change of the discrete function blocks.
The first step of data preprocessing is not limited to algorithms in the scheme, and various data mining algorithms can be adopted for analysis; the grouping and clustering of the variables are not necessary steps, and the original system can only comprise one functional block; the system behavior model may be described in terms of IEC61499 function blocks.
The invention provides a method for restoring the internal logic and structure of a composite black box system step by step through collected operation data under the condition that a system source code is unknown, namely, modules are clustered and divided firstly, then the internal logic of each module is restored, and finally each module is connected; the non-Boolean black box system is subjected to data pattern judgment and variable sequence clustering analysis, so that the Boolean quantity and the non-Boolean quantity are uniformly analyzed; on the basis of a dynamic time warping algorithm, dynamic time warping path analysis is introduced, and similar sequences with time differences are effectively identified; the system function blocks are described using a data and time driven model.
Compared with the prior art, the invention has the following obvious substantive characteristics and obvious advantages:
1. the invention provides a method for restoring a black box system behavior model, which can reduce the dependence on the experience of professional technicians and automatically restore and generate the system behavior model under the condition that a system source code is unknown;
2. a data preprocessing frame is set up, analysis methods of various variables such as constants, Boolean quantities, time quantum and the like are provided, the time-shifted variables are matched, the redundancy of acquired data is reduced, and the subsequent analysis efficiency is improved;
3. and introducing methods such as dynamic time warping, variable sequence clustering and the like to restore and generate the internal connection structure of the composite system.
The conception, the specific structure and the technical effects of the present invention will be further described with reference to the accompanying drawings to fully understand the objects, the features and the effects of the present invention.
Drawings
FIG. 1 is a diagram of a behavioral model reduction framework in accordance with a preferred embodiment of the present invention;
FIG. 2 is a diagram illustrating steps of behavior model restoration according to a preferred embodiment of the present invention.
Detailed Description
The technical contents of the preferred embodiments of the present invention will be more clearly and easily understood by referring to the drawings attached to the specification. The present invention may be embodied in many different forms of embodiments and the scope of the invention is not limited to the embodiments set forth herein.
In the drawings, structurally identical elements are represented by like reference numerals, and structurally or functionally similar elements are represented by like reference numerals throughout the several views. The size and thickness of each component shown in the drawings are arbitrarily illustrated, and the present invention is not limited to the size and thickness of each component. The thickness of the components may be exaggerated where appropriate in the figures to improve clarity.
The invention relates to a black box system behavior model reduction method, in particular to a reverse construction method of an industrial system behavior function block model based on operation data.
The analysis processing of the method comprises three steps of data preprocessing, internal logic reduction and system structure reduction.
The data preprocessing module inputs the acquired original data and divides the data into a specified number of modules through three steps of type division, similarity matching and mode clustering.
In the first step of type division, if a differential sequence of an acquisition sequence is close to an all-zero sequence, a corresponding parameter of the sequence is a constant; otherwise, it is a variable. If the variable sequence only takes the value of 0 or 1, the corresponding variable of the sequence is a Boolean quantity; otherwise, the value is a variable. If the sequence of changes of the numerical variable can be divided into a counting phase with a differential sequence value of 1 and discrete set and reset points, the sequence corresponds to the variable as the amount of time. Other separately defined variable types can analyze the first-order or high-order differential sequence identification according to the self change rule.
And in the second step of similarity matching, the similarity and possible time difference between the sequences of the same type are calculated by adopting dynamic time warping to generate an independent variable set. The discriminant rule is defined as follows:
1) and if the distance between the two input sequences DTW is close to 0, the corresponding variable is an input/output data pair corresponding to the data interface connected with different modules. Any one of the variables is deleted from the independent variable set.
2) If the DTW distance between the two input sequences is large and the matching path fitting curve is a straight line with the approximate slope of 1, the corresponding variable is an input/output data pair with time shift; otherwise, the two independent variables are not connected.
The dynamic time warping DTW is a typical optimization problem, and describes the time correspondence between a test template and a reference template by using a time warping function W (n) meeting a certain condition, and solves the warping function corresponding to the minimum accumulated distance when the two templates are matched.
Assuming that there are two time series Q and C with length n, the distance between corresponding values of time points in a specific time window in the two series is first calculated as the similarity. For example, if the time window is w, calculating Euclidean distances of corresponding values of all time points between q (t1) and c (t1-w) and c (t1+ w); c (t1) the same.
Based on the calculation structure, an n × n matrix network can be constructed, where the matrix element (i, j) represents the distance d (qi, cj) between q (i) and c (j), and the smaller the distance, the higher the similarity. The dynamic time warping programming algorithm searches a path which sequentially passes through all the points in the two sequences, and the sum of the distances of the path passing through the points is the minimum.
And thirdly, adopting a time sequence K-means clustering for mode clustering, if the cluster number is not preset, starting to increase 1 cluster each time from the cluster number of 2 to test until a certain variable is divided into one cluster, and taking the solution with the highest matching degree in the cluster as a clustering result.
In the second part of internal logic reduction, input variables in the same cluster are regarded as condition variables, output variables are regarded as state variables, and four elements of the state machine are generated by matching the state variables before and after change with the condition variables: initial state, state description, state change sequence and jump condition among jump-able states. The initial state can be defined according to the observation condition of the system, and the generation steps of the state machine are as follows:
1) if the initial state is undefined, taking the system state at the initial observation time as the system initial state;
2) taking the output variable in the cluster as a state variable, and generating a state description by combining an observed system state;
3) recording the change process of the system state variable to generate a state change sequence;
4) recording the value of a condition variable at the moment of system state change, taking the state before the system change as an original state and the state after the change as a target state, and generating a complete time sequence skip chain;
5) and a merging step 4 generates the same state in the state chain, and combines the jump conditions of the original state and the target state which are completely the same in an OR relationship. If a plurality of groups of jump conditions corresponding to different target states at the same time are met, marking the priority according to the sequence in the time sequence jump chain.
The greedy algorithm optimized for the generating state machine is as follows:
1) trying to delete each condition variable judgment formula in each jump condition;
2) if the state jump after deletion is not affected and is the same as the jump condition of the original state machine, the deletion is reserved; otherwise, canceling deletion;
3) and repeating the step 1 and the step 2 until all condition variables in all jump conditions are traversed.
The third part of the system structure reduction correlates the discrete modules generated by the second part with each other through driving events and data. Event connection between function blocks is system state transfer, namely, internal logic and physical relations between functions are modeled and represented by means of the event connection line. The data connection between the functional blocks, namely the data communication, can be restored by connecting the sequence pairs which are analyzed in the first part of data preprocessing and have time differences.
The foregoing detailed description of the preferred embodiments of the invention has been presented. It should be understood that numerous modifications and variations could be devised by those skilled in the art in light of the present teachings without departing from the inventive concepts. Therefore, the technical solutions available to those skilled in the art through logic analysis, reasoning and limited experiments based on the prior art according to the concept of the present invention should be within the scope of protection defined by the claims.

Claims (10)

1. A black box industrial control system modular code reduction method is characterized by comprising the following steps:
step 1, preprocessing data;
step 2, restoring internal logic;
and 3, restoring the system structure.
2. The black-box industrial control system modular code reduction method of claim 1, wherein the data preprocessing comprises type classification, affinity matching, and pattern clustering of the collected data.
3. The black-box industrial control system modular code recovery method of claim 2, wherein in the type division, if a differential sequence of an acquisition sequence is close to a full zero sequence, a sequence corresponding parameter is a constant; otherwise, it is a variable.
4. The black-box industrial control system modular code reduction method according to claim 3, wherein if the variable sequence only takes a value of 0 or 1, the sequence-corresponding variable is a boolean quantity; otherwise, the value is a variable.
5. The black-box industrial control system modular code recovery method of claim 4, wherein if the change sequence of the numerical variable can be divided into a counting stage with a differential sequence value of 1 and discrete set and reset points, the sequence corresponding variable is the amount of time.
6. The black-box industrial control system modular code recovery method of claim 2, wherein the similarity matching uses dynamic time warping to calculate similarity and time difference between the same type of sequences, and generate independent variable sets.
7. The black-box industrial control system modular code reduction method of claim 1, wherein the internal logic reduction regards input variables as condition variables and output variables as state variables, and generates state machine elements by matching the state variables with the condition variables.
8. The black-box industrial control system modular code recovery method of claim 7, wherein the state machine elements comprise initial states, state descriptions, state change sequences, jump conditions between jumpable states.
9. The black box industrial control system modular code reduction method of claim 1, wherein the system architecture reduction uses data and time driven models to describe system function blocks.
10. The black-box industrial control system modular code reduction method of claim 9, wherein the intrinsic logical and physical relationships between the system function blocks are modeled as event connection lines.
CN202110760953.8A 2021-07-06 2021-07-06 Black box industrial control system modular code restoration method Pending CN113434424A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110760953.8A CN113434424A (en) 2021-07-06 2021-07-06 Black box industrial control system modular code restoration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110760953.8A CN113434424A (en) 2021-07-06 2021-07-06 Black box industrial control system modular code restoration method

Publications (1)

Publication Number Publication Date
CN113434424A true CN113434424A (en) 2021-09-24

Family

ID=77759011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110760953.8A Pending CN113434424A (en) 2021-07-06 2021-07-06 Black box industrial control system modular code restoration method

Country Status (1)

Country Link
CN (1) CN113434424A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190050763A1 (en) * 2017-08-10 2019-02-14 Tata Consultancy Services Limited Method and system for model fitting to hierarchical time series cluster
CN110531963A (en) * 2019-08-28 2019-12-03 上海交通大学 A kind of industrial software system action model restoring method based on data
CN110673843A (en) * 2019-09-16 2020-01-10 上海交通大学 Software module behavior state machine restoration method based on data
AU2019101183A4 (en) * 2019-10-02 2020-01-16 Han, Yining MISS Feature Extraction and Fusion for Industrial Data
CN111401573A (en) * 2018-12-17 2020-07-10 中国科学院沈阳自动化研究所 Working condition state modeling and model correcting method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190050763A1 (en) * 2017-08-10 2019-02-14 Tata Consultancy Services Limited Method and system for model fitting to hierarchical time series cluster
CN111401573A (en) * 2018-12-17 2020-07-10 中国科学院沈阳自动化研究所 Working condition state modeling and model correcting method
CN110531963A (en) * 2019-08-28 2019-12-03 上海交通大学 A kind of industrial software system action model restoring method based on data
CN110673843A (en) * 2019-09-16 2020-01-10 上海交通大学 Software module behavior state machine restoration method based on data
AU2019101183A4 (en) * 2019-10-02 2020-01-16 Han, Yining MISS Feature Extraction and Fusion for Industrial Data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
X. WU;W. DAI: "Data-Driven Behaviour Model Recovery Method for Finite-State Transition Model", 《IECON 2020 THE 46TH ANNUAL CONFERENCE OF THE IEEE INDUSTRIAL ELECTRONICS SOCIETY》 *
秦天杰: "时序数据处理及其应用系统的开发", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Similar Documents

Publication Publication Date Title
Papadopoulos et al. Model-based synthesis of fault trees from matlab-simulink models
CN113159345A (en) Power grid fault identification method and system based on fusion neural network model
CN110851654A (en) Industrial equipment fault detection and classification method based on tensor data dimension reduction
CN110648055A (en) Electric power accident event and cause relation construction method based on convolutional neural network
Chivilikhin et al. Automatic state machine reconstruction from legacy programmable logic controller using data collection and sat solver
CN111045670A (en) Method and device for identifying multiplexing relationship between binary code and source code
CN113268370A (en) Root cause alarm analysis method, system, equipment and storage medium
CN115510950A (en) Aircraft telemetry data anomaly detection method and system based on time convolution network
Fokkink et al. Supervisor synthesis: Bridging theory and practice
CN112926269B (en) Method and system for grouping and cleaning power plant edge node data
Mol et al. A neural model for transient identification in dynamic processes with “don't know” response
CN110531963B (en) Industrial software system behavior model reduction method based on data
CN113434424A (en) Black box industrial control system modular code restoration method
CN117182910A (en) Intelligent assembly robot assembly control method and control system
CN115906927B (en) Data access analysis method and system based on artificial intelligence and cloud platform
CN115268994B (en) Code feature extraction method based on TBCNN and multi-head self-attention mechanism
CN114819925B (en) Industrial Internet of things system based on event sequence analysis and prediction and control method thereof
Dhillon et al. Advancing Vehicle Diagnostic: Exploring the Application of Large Language Models in the Automotive Industry
Banerjee et al. Faultex: explaining operational changes in terms of design variables in cps control code
CN110673843B (en) Software module behavior state machine restoration method based on data
CN116956994A (en) Service platform capacity expansion prediction method and device
CN115794078A (en) Codeless AI model development system and method
CN112784447B (en) Nuclear power plant accident modeling method for DET and RELAP5 program dynamic coupling framework
Grimmeisen et al. Case study on automated and continuous reliability assessment of software-defined manufacturing based on digital twins
Valls Canudas et al. Reconstruction of the LHCb Calorimeter using Machine Learning: lessons learned

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210924