Diagnostic mechanism construction method adaptive to diversified acquisition of multi-source heterogeneous parameters
By adapting to the diagnostic mechanism construction method of multi-source heterogeneous parameters, the problem of poor adaptability of the sampling monitoring system in the existing technology is solved, the hierarchical and correlation reflection of the equipment fault status is achieved, the knowledge association between multiple subsystems is realized, and the adaptability and intelligence of the system are improved.
Patent Information
- Application Number
- CN202310940575.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-07-28
AI Technical Summary
In the existing technology, the sampling monitoring system cannot adapt to the frequent updating and modification of equipment, cannot reflect the hierarchy and correlation of equipment failure status, cannot realize the knowledge association between multiple subsystems, and cannot effectively accumulate empirical knowledge when equipment is abnormal.
A diagnostic machine construction method that adapts to the diversified acquisition of multi-source heterogeneous parameters is adopted. Through state parameter acquisition and parsing coding, parameter fusion processing, diagnostic knowledge acquisition and representation model and diagnostic reasoning, reflection and recursion technology are used to realize universal parameter analysis, and the Rete algorithm is applied to optimize the inference engine to build a diagnostic system that adapts to real-time state monitoring.
It realizes real-time status monitoring of multi-source heterogeneous parameters, can adapt to dynamic changes in equipment status, improves the adaptability and intelligence of the system, realizes the standardization and normalization of knowledge, and enhances the reliability and flexibility of management.
Smart Images

Figure CN116909798B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of computer real-time monitoring, and particularly relates to a diagnosis mechanism construction method suitable for diversified collection of multi-source heterogeneous parameters. BACKGROUND
[0002] In the system running process, judging the system state by collecting state parameters is the most basic task. The requirement of state monitoring is fast and accurate. The sampling monitoring system has a long running time and much repetitive work, and the real-time requirement of fault detection and elimination is high. The manual management mode consumes a large amount of manpower and is difficult to meet the needs, and the dispersed personnel knowledge is difficult to inherit and transfer.
[0003] At present, in the system, the management computer system collects the running state of each subsystem in real time to realize the centralized management of the whole sampling system. This method improves the automation level of the sampling system equipment management, but there are some deficiencies in the actual operation, which are as follows, first, the system is not suitable for frequent updating, transformation and addition of equipment, and cannot adapt to the fast and low-cost updating of the combination mode of equipment state parameters with complex constraint relationship and frequent change of criterion, second, the system cannot accumulate the experience knowledge of personnel in solving problems when the equipment is abnormal, and cannot verify and accumulate the application of some knowledge of personnel on equipment in the form of application, third, it is impossible to introduce external factors affecting the state change of equipment, to reflect the hierarchy and correlation of the fault state of equipment, and to realize the knowledge association between multiple subsystems. SUMMARY
[0004] The purpose of the application is to provide a diagnosis mechanism construction method suitable for diversified collection of multi-source heterogeneous parameters, which solves the problems of poor adaptability of the sampling monitoring system, inability to reflect the hierarchy and correlation of the fault state of equipment, and inability to realize the knowledge association between multiple subsystems in the prior art.
[0005] The technical solution adopted by the application is a diagnosis mechanism construction method suitable for diversified collection of multi-source heterogeneous parameters, which is implemented according to the following steps:
[0006] Step 1, collecting and analyzing the code of the state parameters in the sampling system;
[0007] Step 2, fusion processing of the coded parameters;
[0008] Step 3, diagnosis knowledge acquisition and representation model;
[0009] Step 4, diagnosis reasoning;
[0010] Step 5, diagnosis result representation.
[0011] The application has the characteristics that,
[0012] Step 1 is implemented as follows:
[0013] Step 1.1: Collect all status parameters of devices in different network systems at the gateway location;
[0014] Step 1.2: Define the sampling system parameter types using basic data types and their combinations. Basic types include byte, integer, floating-point, and arrays of various types. Composite data types include structures with basic data types as elements, nested structures, or data classes that include methods.
[0015] Step 1.3: Define the sampling system status parameters using nested structures layer by layer. A single parameter is defined as a basic data type or structure. All parameters within a subsystem are defined as a subsystem structure. Similar device status parameters, including primary and backup devices, can reuse subsystem structures. Multiple subsystem structures constitute the structure of the entire system. The relationship between single parameters, subsystems, and the entire system is similar to the leaves, trunk, and roots of a tree, forming a parameter tree.
[0016] Step 1.4, applying reflection and recursion, according to the parameter tree obtained in step 1.3, traverse to obtain the length of the parameter and its position in the real-time data frame, realize universal parameter parsing, adapt to the dynamic addition, deletion and editing of state parameters, and dynamically generate a large parameter table at runtime.
[0017] The parameter table dynamically generated in step 1.4 includes parameter serial number, parameter name, and parameter type. The specific generation process is as follows:
[0018] Step 1.4.1: Read the parameter tree into the cache and receive a frame of real-time parameter packet;
[0019] Step 1.4.2: Apply recursion to traverse and access the leaves of the parameter tree, that is, the specific state parameters, and apply the reflection mechanism to obtain the data type and name of the parameter;
[0020] Step 1.4.3: Get the byte length of the parameter according to the parameter data type, and recursively traverse the order of the parameters.
[0021] Step 1.4.4: Get the parameter content in the real-time parameter package based on the parameter length and order, and then parse the parameter value based on the parameter data type;
[0022] Step 1.4.5: The parameter order, parameter name and data type obtained during the traversal process are used to generate the parameter table. Changes in the parameter tree and parameter frame do not affect the parameter parsing process.
[0023] In step 1, the state parameters of the sampling system are collected, parsed and encoded. By using fixed byte lengths to represent different parameters and using fewer types to cover all types, a standard state parameter format is designed. The parameter encoding process is as follows:
[0024] Design a unified device state data format {sequence number, data type, parameter result code}, each state parameter is represented by 12 bytes, wherein,
[0025] Sequence number: 3 bytes, unique number of parameters, taking value 0~2 24-1 , to cover the number of all state parameters in the network;
[0026] Data type: 1 byte, define 3 data types, 0 indicates floating point type, 1 indicates integer type, and 2 indicates unsigned integer type;
[0027] Parameter result code: 8 bytes, fill in the processing result of the original code of the parameter.
[0028] Step 2 is implemented according to the following steps:
[0029] Define the state parameter P as a four-tuple, the sequence number is represented by the letter I, that is, P = <I, parameter value, sampling time, current time>, define the two-tuple <key, value> as S = <sequence number, <sequence number, parameter value, sampling time, current time>> that is, S = <I, P>, which can realize the index of the sequence number to the parameter P, define the elements in the set as sequence numbers, the set C = (I1, I2, …, In), wherein In represents the sequence number of the nth parameter. n n
[0030] According to the properties of the set, the elements I in C are not repeated and are unique, define the constant △T to represent the three times of the sampling period of a certain type of data, and the specific steps are as follows:
[0031] Step 2.1, real-time receive formatted data frame, take the parameter sequence number in the data frame and store it in the set C;
[0032] Step 2.2, if the sequence number is not in the set C, add the sequence number to the set, cache the element P, and establish the index S, wherein P. 当前时刻 = P. 采样时刻 = current data frame sampling time; go to step 2.4;
[0033] Step 2.3, if the sequence number is already in the set C, update the element P using the index S, that is, overwrite the original parameter;
[0034] Step 2.4, update the element P in the set C using the index S. 当前时刻 = current data frame sampling time;
[0035] Step 2.5, for all elements in the set, calculate the element P using the index S. 当前时刻 -P. 采样时刻 , if the time difference is greater than △T, delete the element P, the index S and the sequence number I in the set;
[0036] Step 2.6, repeat steps 2.1-2.5 to obtain real-time state data of all devices in the system.
[0037] Step 3 is implemented according to the following steps:
[0038] Step 3.1, single-parameter criterion fixed diagnostic knowledge representation: in this type of knowledge, the variable value is fixed or the upper and lower limits are unchanged or the value is a limited discrete value, the rule description includes a state fact object in the rule antecedent, the logical judgment can be completed in the antecedent, and the rule consequent includes one or more diagnostic result fact objects. Parameters with multiple analog value ranges can also be considered as limited discrete values, but the criterion is not a value, but an interval;
[0039] Step 3.2, multi-parameter criterion fixed diagnostic knowledge representation: in this type of knowledge, the value range of a certain parameter variable is related to one or more other parameters, the rule description includes multiple parameter fact objects in the rule antecedent, some logical judgments can be completed in the antecedent, and the rule consequent includes multiple logical branches, each branch includes one or more diagnostic result fact objects;
[0040] Step 3.3, diagnostic knowledge representation with criterion related to historical values of parameters: in this type of knowledge, the variable value range is related to the historical value or historical change value of itself or one or more other parameters, the rule description requires the definition of global variables and the introduction of historical values of variables to participate in logical judgment;
[0041] Step 3.4, diagnostic knowledge representation with criterion requiring analysis and determination: in this type of knowledge, the variable value range is related to time or other parameters, the rule description requires the definition of a function to describe the change curve of the threshold, and the introduction of the threshold curve function to participate in logical judgment. For the case where the threshold function curve is unknown, the least squares method is used to estimate and infer the optimal regression model of the curve based on the statistical characteristics of a large number of historical values of the parameter.
[0042] The specific steps of applying the least squares method to estimate and infer the optimal regression model of the curve in step 3.4 are as follows:
[0043] Step 3.4.1, import related parameter historical data;
[0044] Step 3.4.2, calculate the correlation coefficient;
[0045] Step 3.4.3, draw a scatter plot;
[0046] Step 3.4.4, establish a linear regression model;
[0047] Step 3.4.5: Define a threshold function based on the linear regression model's plus or minus three times the standard deviation as the parameter criterion;
[0048] Step 3.4.6: Update the threshold function based on the real-time acquisition parameter values.
[0049] Step 4 is implemented as follows:
[0050] Step 4.1: Apply the object fact template to define the state parameter class and the diagnosis result class. The instantiated state parameter class object set is used as the input of the Rete algorithm inference engine. After matching with the loaded diagnosis knowledge in the Rete algorithm inference engine, the instantiated diagnosis result object set is output.
[0051] Step 4.2: Set the inference strategy to do-forward-chaining to prevent the inference engine from working backwards from the goal to find evidence supporting the hypothesis.
[0052] Step 4.3: The parameter set sampled by the diagnostic system will not be repeated. Set the "unique" condition element to reduce the search of all state object fact sets by the rule pattern;
[0053] Step 4.4: Load the diagnostic library consisting of the diagnostic knowledge in step 3.
[0054] Step 5 is implemented as follows:
[0055] Define a common diagnostic result class, and the output results of multiple different diagnostic machines are different objects of the class. The diagnostic results of multiple different diagnostic machines are displayed in the same table on the interface, and are distinguished by the name of the diagnostic machine.
[0056] The beneficial effect of the present invention is that it is a method for constructing a diagnostic machine that is adapted to the diversified acquisition of multi-source heterogeneous parameters. It is oriented to the real-time status monitoring needs of the sampling system and provides a general method for constructing a diagnostic machine for a real-time sampling system through state parameter acquisition encoding and rule knowledge writing. The present invention proposes a method for real-time acquisition of status data of devices with different frame rates. Within a sampling system, after the above-mentioned algorithm processing, at any time, the latest status data is stored in the collection. Although some parameters are not collected at the current moment, the parameters are stored in the collection memory before the next acquisition moment and can be used by the user program at any time. For the user program, the required latest parameter values can be obtained at any time, shielding the problems of inconsistent sampling methods and inaccurate sampling moments. In order to solve the problems of standardized editing of knowledge and knowledge inheritance, the present invention proposes an object-oriented diagnostic knowledge representation and description method that is adapted to real-time sampling systems. The method defines a state parameter and diagnostic result object fact class template and abstracts a diagnostic knowledge representation model. The method can be applied to the knowledge representation of real-time status acquisition expert systems to achieve standardization, normalization and generalization of knowledge representation. In the field of aerospace measurement and control, such as the management of satellites, ground equipment, power supply and distribution systems, communication systems, dispatching and command, mission planning, and measurement and control plans, there are complex and frequently changing business rules, the professional knowledge, experience, and methods and ideas for handling faults of experts and general technical personnel are difficult to inherit, and emergency plans and fault compilations are not programmed. Applying the method provided by the present invention to construct a field diagnosis system can improve the reliability, flexibility, and intelligence of management. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a network topology diagram of the sampling system of the method of the present invention;
[0058] Figure 2 It is a schematic diagram of the state data of the method of the present invention being replaced and changed in the memory;
[0059] Figure 3 It is a system block diagram of the method of the present invention;
[0060] Figure 4 This is a flow chart of the state data fusion processing process in the diagnostic machine construction method adapted to the diversified acquisition of multi-source heterogeneous parameters of the present invention;
[0061] Figure 5 It is a diagnostic knowledge representation model diagram in the diagnostic mechanism construction method adapted to the diversified collection of multi-source heterogeneous parameters of the present invention. DETAILED DESCRIPTION
[0062] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0063] The present invention is suitable for the construction method of diagnostic mechanism for diversified acquisition of multi-source heterogeneous parameters, combined with Figure 1and Figure 3 , and is implemented according to the following steps:
[0064] Step 1, collecting and analyzing the state parameters in the sampling system;
[0065] Step 1 is implemented according to the following steps:
[0066] Step 1.1, collecting all state parameters of the devices in different networks at the gateway position;
[0067] Step 1.2, defining the parameter types of the sampling system by using the basic data types and their combinations, the basic types are byte type, integer type, floating point type, and arrays of each type, the combined data types are structures with the basic data types as elements and the nesting of the structures, or data classes including methods;
[0068] Step 1.3, defining the state parameters of the sampling system by using the nested structures layer by layer, a single parameter is defined as a basic data type or a structure, all parameters in a subsystem are defined as a subsystem structure, the state parameters of similar devices including the primary and backup devices can reuse the subsystem structure, and multiple subsystem structures form a structure of the entire system, the relationship between a single parameter, a subsystem, and the entire system is similar to that between a leaf, a trunk, and a root, forming a parameter tree;
[0069] Step 1.4, using reflection and recursion to traverse the parameter tree obtained in step 1.3 to obtain the length of the parameters and their positions in the real-time data frame, and to realize the universal analysis of the parameters, which can adapt to the dynamic addition, deletion, and editing of the state parameters, and dynamically generate a large parameter table at runtime.
[0070] The large parameter table dynamically generated in step 1.4 includes the parameter serial number, the parameter name, and the parameter type, and the specific generation process is as follows:
[0071] Step 1.4.1, reading the parameter tree into the cache, and receiving a frame of real-time parameter packet;
[0072] Step 1.4.2, using recursion to access the leaves of the parameter tree, i.e., the specific state parameters, and using the reflection mechanism to obtain the data type and name of the parameters;
[0073] Step 1.4.3, obtaining the byte length of the parameter according to the parameter data type, and recursively traversing to give the order of the parameters;
[0074] Step 1.4.4, obtaining the parameter content in the real-time parameter packet according to the parameter length and order, and parsing the parameter value according to the parameter data type;
[0075] Step 1.4.5, the parameter order, parameter name, and data type obtained in the traversal process are used to generate the large parameter table, and the changes of the parameter tree and the parameter frame do not affect the parameter analysis process.
[0076] In step 1, the state parameters are collected, parsed and encoded. By using fixed byte lengths to represent different parameters, fewer types are used to cover all types, and a standard state parameter format is designed. The parameter encoding process is as follows:
[0077] Design a unified device status data format {serial number, data type, parameter result code}, each status parameter is represented by 12 bytes, where
[0078] Sequence number: 3 bytes, unique number of the parameter, ranging from 0 to 2 24-1 , to cover the total number of state parameters in the network;
[0079] Data type: 1 byte, defines 3 data types, 0 represents floating point type, 1 represents integer type, and 2 represents unsigned integer type;
[0080] Parameter result code: 8 bytes, filled in with the processing result of the parameter original code.
[0081] Step 2: Parameter fusion processing after encoding;
[0082] Step 2 is implemented as follows:
[0083] After encoding, parameter fusion processing is performed. Considering the characteristics of various status data sampling time, frequency, time division multiplexing, and different networks, a collection and timestamp method is designed to shield the differences caused by the diversified sampling of device status data.
[0084] Define the state parameter P as a four-tuple, the serial number is represented by the letter I, that is, P =<I,参数值,采样时刻,当前时刻> , apply <key, value> to define a tuple: S = <serial number, <serial number, parameter value, sampling time, current time>> that is, S =<I,P> , the tuple can realize the index from the serial number to the parameter P, and the elements in the set are defined as serial numbers. The set C=(I1,I2,…,I n ,…), where I n Indicates the sequence number of the nth parameter;
[0085] According to the properties of the set, the element I in C is unique and does not repeat. The constant △T is defined to represent 3 times the sampling period of a certain type of data. Figure 4 , the specific steps are as follows:
[0086] Step 2.1: Receive the formatted data frame in real time, and take the parameter sequence number in the data frame and store it in set C;
[0087] Step 2.2: If the sequence number does not exist in the set C, add the sequence number to the set, cache the element P, and create an index S, where P. 当前时刻 =P. 采样时刻= current data frame sampling time; go to step 2.4;
[0088] Step 2.3: If the sequence number already exists in the set C, use the index S to update the element P, that is, overwrite the original parameter;
[0089] Step 2.4: Update element P using index S for other elements in set C. 当前时刻 = current data frame sampling time;
[0090] Step 2.5. For all elements in the set, use index S to calculate element P. 当前时刻 -P. 采样时刻 , if the time difference is greater than △T, then delete the element P, index S and sequence number I in the set;
[0091] Step 2.6: Repeat steps 2.1 to 2.5 in a loop to obtain the real-time status data of all devices in the entire system.
[0092] Step 3: diagnostic knowledge acquisition and representation model;
[0093] Step 3 is implemented as follows:
[0094] By analyzing the state parameters, fault representation and various operation relationships, four basic diagnostic knowledge representation modes are abstracted. The combination of basic modes can cover all describable knowledge. Figure 5 ,
[0095] Step 3.1. Representation of diagnostic knowledge with a fixed single parameter criterion: In this type of knowledge, variables are fixed, have fixed upper and lower limits, or are finite discrete values. When describing a rule, the rule antecedent includes a state fact object, and logical judgment can be completed in the antecedent. The rule consequent includes one or more diagnostic result fact objects. Parameter values represented by multiple analog ranges can also be considered finite discrete values, except that the criterion is not a value, but an interval.
[0096] Step 3.2: Representation of diagnostic knowledge with fixed multi-parameter criteria: In this type of knowledge, the value range of a parameter variable is related to one or more other parameters. When describing a rule, the rule antecedent includes multiple parameter fact objects. Some logical judgments can be completed in the antecedent. The rule consequent includes multiple logical branches, each of which includes one or more diagnostic result fact objects.
[0097] Step 3.3: Represent diagnostic knowledge related to historical parameter values: In this type of knowledge, the value range of a variable is related to the historical value or historical change value of itself or one or more other parameters. When describing rules, since the historical records of parameters are required, global variables need to be defined and the historical values of the variables need to be included in the logical judgment.
[0098] Step 3.4, the criterion needs to analyze the determined diagnostic knowledge representation: in this kind of knowledge, the variable value range is related to time or other parameters, and the rule description is that the parameter threshold changes with time or other factors, so a function needs to be defined to describe the change curve of the threshold, and the threshold curve function is introduced to participate in logical judgment. For the case where the threshold function curve is unknown, the least square method is used to estimate and infer the optimal regression model of the curve according to the statistical characteristics of a large number of historical values of the parameter.
[0099] The specific steps of applying the least square method to estimate and infer the optimal regression model of the curve in step 3.4 are as follows:
[0100] Step 3.4.1, import the historical data of the related parameters;
[0101] Step 3.4.2, calculate the correlation coefficient;
[0102] Step 3.4.3, draw a scatter plot;
[0103] Step 3.4.4, establish a linear regression model;
[0104] Step 3.4.5, define the threshold function as the parameter criterion according to the positive and negative 3 times standard deviation of the linear regression model;
[0105] Step 3.4.6, update the threshold function according to the real-time acquisition parameter value.
[0106] Step 4, diagnostic reasoning;
[0107] Apply the reasoning machine based on the Rete algorithm, optimize the specific field according to the characteristics of the sampling system diagnostic machine, and implement the following steps:
[0108] Step 4.1, define the state parameter class and the diagnostic result class by applying the object fact template, and the instantiated state parameter class object set is used as the input of the Rete algorithm reasoning machine. After matching in the Rete algorithm reasoning machine and loading the diagnostic knowledge, the instantiated diagnostic result object set is output;
[0109] Step 4.2, the diagnostic process of the sampling system is a forward reasoning process driven by real-time data collection. Set the reasoning strategy to forward reasoning do-forward-chaining to prevent the reasoning machine from starting from the target and finding supporting evidence for the hypothesis;
[0110] Step 4.3, the parameter set of the diagnostic system sampling is not repeated, and the "unique" condition element is set to reduce the search of the rule mode for all state object fact sets;
[0111] Step 4.4, load the diagnostic library composed of the diagnostic knowledge of step 3.
[0112] Step 5, diagnosis result representation.
[0113] Step 5 is implemented according to the following steps:
[0114] A general diagnosis result class is defined, and the output results of multiple different diagnosis machines are different objects of the class. The diagnosis results of multiple different diagnosis machines are displayed in the same table on the interface, and are distinguished by machine names.
[0115] The application provides a general state diagnosis mechanism construction method for a real-time sampling system. The state acquisition and analysis coding module of the application realizes universal analysis of device parameters by reflection and recursion, formulates a unified parameter representation and identification method, realizes fusion of state data streams under different transmission frame frequencies of multiple subsystems by a set algorithm, and provides standardized input signals for diagnosis machines. The diagnosis knowledge representation and description method summarized by the application can represent various diagnosis knowledge required in various sampling fields, can compile various technical regulations, operation procedures, industry experience, emergency plans and fault compilations into rule items, can fully describe the knowledge content of fault diagnosis decision processing, realizes multi-level and multi-factor real-time diagnosis, and realizes standardization, normalization and generalization of knowledge representation. The application provides an inference machine optimization setting method suitable for state monitoring of a real-time sampling system. According to the application, a diagnosis result display module suitable for multiple diagnosis machines can be constructed.
[0116] Embodiment 1
[0117] The diagnosis mechanism construction method of the application is suitable for diversified acquisition of multi-source heterogeneous parameters, and is implemented according to the following steps:
[0118] Step 1, state parameter acquisition and analysis coding in a sampling system;
[0119] Step 2, fusion processing of coded parameters;
[0120] Step 3, diagnosis knowledge acquisition and representation model;
[0121] Step 4, diagnosis reasoning;
[0122] Step 5, diagnosis result representation.
[0123] Embodiment 2
[0124] The diagnosis mechanism construction method of the application is suitable for diversified acquisition of multi-source heterogeneous parameters, and is implemented according to the following steps in combination with Figure 3
[0125] Step 1, state parameter acquisition and analysis coding in a sampling system;
[0126] Step 1 is implemented according to the following steps:
[0127] Step 1.1, Collect all state parameters of devices in different networks at gateway position;
[0128] Step 1.2, Define sampling system parameter types by using basic data types and their combinations, the basic types are byte type, integer type, float type, and array of each type, the combination data types are structure with basic data types as elements and nesting of structures, or data class including methods;
[0129] Step 1.3, Define sampling system state parameters by using layer-by-layer nested structures, a single parameter is defined as a basic data type or a structure, all parameters in a subsystem are defined as a subsystem structure, state parameters of similar devices including master and standby devices can reuse the subsystem structure, and multiple subsystem structures form a structure of the entire system, the relationship between a single parameter, a subsystem, and the entire system is similar to that between a leaf, a trunk, and a root, forming a parameter tree;
[0130] Step 1.4, Use reflection and recursion to traverse the parameter tree obtained in step 1.3 to obtain the length of the parameters and their positions in real-time data frames, realize universal analysis of parameters, adapt to dynamic addition, deletion, and editing of state parameters, and dynamically generate a large parameter table at runtime.
[0131] The large parameter table dynamically generated in step 1.4 includes parameter serial number, parameter name, and parameter type, and the specific generation process is as follows:
[0132] Step 1.4.1, read the parameter tree into the cache, and receive a frame of real-time parameter packet;
[0133] Step 1.4.2, use recursion to access the leaves of the parameter tree, i.e., specific state parameters, and use the reflection mechanism to obtain the data type and name of the parameters;
[0134] Step 1.4.3, according to the parameter data type, obtain the byte length of the parameter, and recursively traverse to give the order of the parameter;
[0135] Step 1.4.4, according to the parameter length and order, obtain the parameter content in the real-time parameter packet, and parse the parameter value according to the parameter data type;
[0136] Step 1.4.5, the parameter order, parameter name, and data type obtained in the traversal process are used to generate a large parameter table, and changes in the parameter tree and parameter frame do not affect the parameter parsing process.
[0137] In step 1, the state parameter collection and parsing code is designed by using fixed byte length to represent different parameters, using fewer types to cover all types, and designing a standard state parameter format, and the parameter encoding process is as follows:
[0138] Design a unified device state data format {sequence number, data type, parameter result code}, each state parameter is represented by 12 bytes, wherein,
[0139] Sequence number: 3 bytes, unique number of parameters, value 0~2 24-1 To cover the number of all state parameters in the network;
[0140] Data type: 1 byte, define 3 data types, 0 for floating point type, 1 for integer type, 2 for unsigned integer type;
[0141] Parameter result code: 8 bytes, fill in the processing result of the original code of the parameter.
[0142] Step 2, fusion processing of coded parameters;
[0143] Step 2 is implemented according to the following steps:
[0144] After coding, the fusion processing of parameters is considered, considering the characteristics of various state data sampling time, frequency, time division multiplexing and being in different networks, the method of designing set and time stamp is designed to shield the difference caused by the diversification of device state data sampling,
[0145] Define the state parameter P as a four-tuple, the sequence number is represented by the letter I, that is, P = <I, parameter value, sampling time, current time>, define the two-tuple <key, value> as S = <sequence number, <sequence number, parameter value, sampling time, current time>> that is, S = <I, P>, the two-tuple can realize the index of sequence number to parameter P, define the elements in the set as sequence numbers, the set C = (I1, I2, …, In), wherein In represents the sequence number of the nth parameter. n n
[0146] According to the properties of the set, the elements I in C are not repeated and are unique, define the constant △T to represent the three times of the sampling period of a certain type of data, combined with Figure 4 , the specific steps are as follows:
[0147] Step 2.1, real-time receive formatted data frame, store each parameter sequence number in the data frame into the set C;
[0148] Step 2.2, if the set C does not have the sequence number, add the sequence number to the set, cache the element P, and establish the index S, wherein P. 当前时刻 = P. 采样时刻 = current data frame sampling time; go to step 2.4;
[0149] Step 2.3, if the set C already has the sequence number, use the index S to update the element P, that is, overwrite the original parameter;
[0150] Step 2.4, update element P with index S for other elements in set C. 当前时刻 = current data frame sampling time;
[0151] Step 2.5, calculate element P with index S for all elements in set. 当前时刻 -P. 采样时刻 If time difference > ΔT, delete element P, index S and serial number I in set.
[0152] Step 2.6, repeat steps 2.1-2.5 to obtain real-time state data of all devices in the system.
[0153] Step 3, diagnosis knowledge acquisition and representation model.
[0154] Step 4, diagnosis reasoning.
[0155] The inference engine based on Rete algorithm is applied to the specific field optimization according to the characteristics of the sampling system diagnosis machine, and is implemented according to the following steps:
[0156] Step 4.1, define state parameter class and diagnosis result class by applying object fact template, and the instantiated state parameter class object set is used as the input of the Rete algorithm inference engine. After matching with the loaded diagnosis knowledge in the Rete algorithm inference engine, the instantiated diagnosis result object set is output.
[0157] Step 4.2, the diagnosis process of the sampling system is a forward reasoning process driven by real-time collected data. The reasoning strategy is set to forward reasoning do-forward-chaining to prevent the inference engine from searching for supporting evidence from the target in reverse.
[0158] Step 4.3, the parameter set of the diagnosis system sampling is not repeated, and the "unique" condition element is set to reduce the search of rule patterns for all state object fact sets.
[0159] Step 4.4, load the diagnosis library composed of the diagnosis knowledge of step 3.
[0160] Step 5, diagnosis result representation.
[0161] Step 5 is implemented according to the following steps:
[0162] Define a general diagnosis result class, then the output results of multiple different diagnosis machines are different objects of the class, and the diagnosis results of multiple different diagnosis machines are displayed in the same table in the interface, which are distinguished by the diagnosis machine name.
[0163] Example 3
[0164] The scenario in this embodiment is as follows: in a certain sampling system, the hardware devices include five computers, four industrial computers, more than fifty sensors of various types, more than forty special-purpose devices of various types, each hardware unit is connected to three different computer subnets of the device system through indirect or direct ways, and the monitoring computer is connected to the three subnets as a gateway. The device state acquisition modes include timed reporting, query reporting, response reporting after control, state change reporting, etc., the frame length of the device state data of the five hardware units is variable, each hardware device transmits the device state according to the self-defined format, and there are nearly two thousand state parameters in total.
[0165] The diagnostic knowledge is derived from the programmed description of various technical regulations, operation procedures, industry experience, emergency plans and fault compilations. The first type of knowledge has a large quantity, about five thousand items, each upper and lower limit criterion knowledge can correspond to two rules, and each finite discrete value criterion corresponds to multiple rules. The total number of the second, third and fourth types of knowledge is less than one thousand.
[0166] The steps of constructing the state diagnosis system are as follows:
[0167] Step 1, state acquisition and analysis coding module in the sampling system.
[0168] Define the state data representation and identification method:
[0169] Table 1 State parameter representation
[0170]
[0171] Deploy the device state acquisition and analysis coding module on the monitoring computer (gateway), which can receive state data from the three subnets, and the network topology is shown in Figure 1 .
[0172] The data frame obtained from the network is applied to reflection and recursion, the length of the parameter and its position in the real-time data frame are obtained according to the known device parameter tree, the device parameter universal analysis is realized, and the analyzed parameters are coded according to the format defined in Table 1.
[0173] Step 2, construct a different frame frequency data real-time acquisition model based on set algorithm, and fuse the coded formatted state parameter frame.
[0174] After the above algorithm processing, at any time, the latest device state data is stored in the set, although some parameters are not collected at the current time, but the parameter is saved in the set memory before the next collection time, for the user program to use at any time. For the user program, the latest parameter value can be obtained at any time, which shields the problem of inconsistent sampling methods and inaccurate sampling time.
[0175] Figure 2A simple case is given: there are three subsystems, and each subsystem's data packet contains all the parameters of the subsystem, and the subsystems report data in turn.
[0176] The reporting frequency of each subsystem parameter can be fixed or variable. The number of parameters reported by the subsystem can be fixed or variable. In Figure 2 , at T2, the subsystem has been collected once, and all parameter values have been obtained, which can be defined as the pipeline being full at this time. At T2, only the parameter value of subsystem 3 is obtained at this time, and the new values of subsystems 1 and 2 are not updated, but for the current time, all parameter values of subsystems 1, 2 and 3 can be considered as the latest values. At T3, the new value of subsystem 1 replaces the old value, at T4, the new value of subsystem 2 replaces the old value, at T5, the new value of subsystem 3 replaces the old value, and so on. At each time, the system can obtain the latest parameter value set.
[0177] Step 3, diagnosis knowledge acquisition and representation.
[0178] Different requirements can define derived classes, which contain attributes and methods common to the system knowledge, and also have special attributes and methods for the representation mode requirements of the four types of knowledge, such as copying and comparing objects.
[0179] Step 301, description of the first type of diagnosis knowledge, for example: the temperature parameter P1 of the sampling system, the normal value range is {20, 50},
[0180] According to the technical documents, when the parameter value is not in the range of {20, 50}, personnel should be notified;
[0181] "Handling suggestion: when the temperature is lower than the lower limit, please increase the temperature;
[0182] when the temperature is higher than the upper limit, please reduce the temperature"
[0183] Step 302, description of the second type of diagnosis knowledge, for example: the pressure parameters P1 and P2 of the sampling system, the difference between them should be within 0.5, according to experience knowledge, when the difference is greater than 0.5, personnel should be notified;
[0184] Handling suggestion: when the pressure difference exceeds the threshold value, please contact the responsible person for handling.
[0185] Step 303, description of the third type of diagnosis knowledge, for example: the sampling system speed parameter P1, the change should not exceed 30%,
[0186] According to experience knowledge, when the amplitude of change exceeds 30%, personnel should be notified;
[0187] Handling suggestion: when the speed amplitude exceeds the threshold value, please contact the responsible person for handling
[0188] Step 304, the 4th type of diagnostic knowledge description, for example: statistical analysis, the sampling system parameters P1, P2 value is consistent with P1 = 3 * P2 + 1,
[0189] According to the experience knowledge, P1, P2 value deviation is larger, should inform the personnel;
[0190] Processing opinion: parameter P1, P2 change rule has the exception, please contact the person in charge to handle
[0191] Step 4, diagnostic reasoning. Application based on Rete algorithm inference engine, for the characteristics of state monitoring in sampling system, build diagnostic reasoning machine.
[0192] Step 401, define the sampling system state parameter object fact template and diagnostic result object fact template;
[0193] Step 402, set the reasoning strategy to forward reasoning do-forward-chaining;
[0194] Step 403, set the "unique" condition element;
[0195] Step 404, load the diagnostic knowledge base.
[0196] Step 5, build diagnostic result display module.
Claims
1. A method for constructing a diagnostic mechanism that adapts to the diversified acquisition of multi-source heterogeneous parameters, characterized in that: Please follow the steps below to implement it: Step 1: state parameter collection, analysis and coding in the sampling system; The step 1 is specifically implemented according to the following steps: Step 1.1: Collect all status parameters of devices in different network systems at the gateway location; Step 1.2: Define the sampling system parameter types using basic data types and their combinations. Basic types include byte, integer, floating-point, and arrays of various types. Composite data types include structures with basic data types as elements, nested structures, or data classes that include methods. Step 1.3: Define the sampling system status parameters using nested structures layer by layer. A single parameter is defined as a basic data type or structure. All parameters within a subsystem are defined as a subsystem structure. Similar device status parameters, including primary and backup devices, can reuse subsystem structures. Multiple subsystem structures constitute the structure of the entire system. The relationship between single parameters, subsystems, and the entire system is similar to the leaves, trunk, and roots of a tree, forming a parameter tree. Step 1.4: Apply reflection and recursion to traverse the parameter tree obtained in step 1.3 to obtain the length of the parameter and its position in the real-time data frame, thereby achieving universal parameter parsing, adapting to the dynamic addition, deletion, and editing of state parameters, and dynamically generating a large parameter table at runtime; Step 2: Parameter fusion processing after encoding; Step 3: diagnostic knowledge acquisition and representation model; Step 4: Diagnostic reasoning; Step 5: Display the diagnosis results.
2. The diagnostic mechanism construction method adapted to the diversified acquisition of multi-source heterogeneous parameters according to claim 1 is characterized in that: The parameter table dynamically generated in step 1.4 includes parameter serial number, parameter name, and parameter type. The specific generation process is as follows: Step 1.4.1: Read the parameter tree into the cache and receive a frame of real-time parameter packet; Step 1.4.2: Apply recursion to traverse and access the leaves of the parameter tree, that is, the specific state parameters, and apply the reflection mechanism to obtain the data type and name of the parameter; Step 1.4.3: Get the byte length of the parameter according to the parameter data type, and recursively traverse the order of the parameters. Step 1.4.4: Get the parameter content in the real-time parameter package based on the parameter length and order, and then parse the parameter value based on the parameter data type; Step 1.4.5: The parameter order, parameter name and data type obtained during the traversal process are used to generate the parameter table. Changes in the parameter tree and parameter frame do not affect the parameter parsing process.
3. The method for constructing a diagnostic mechanism adapted to diversified acquisition of multi-source heterogeneous parameters according to claim 2, characterized in that: In step 1, the state parameter collection and parsing coding in the sampling system is performed by using fixed byte lengths to represent different parameters and using fewer types to cover all types. A standard state parameter format is designed, and the parameter coding process is as follows: Design a unified device status data format {serial number, data type, parameter result code}, each status parameter is represented by 12 bytes, in, Serial number: 3 bytes, unique number of the parameter, value 0~2 24-1 , to cover the total number of state parameters in the network; Data type: 1 byte, defines 3 data types, 0 represents floating point type, 1 represents integer type, and 2 represents unsigned integer type; Parameter result code: 8 bytes, filled in with the processing result of the parameter original code.
4. The method for constructing a diagnostic mechanism adapted to diversified acquisition of multi-source heterogeneous parameters according to claim 3, characterized in that: The step 2 is specifically implemented according to the following steps: Define the state parameter P as a quadruple, with the serial number represented by the letter I, that is, P = <I, parameter value, sampling time, current time>. Define the binary tuple using <key, value>: S = <serial number, <serial number, parameter value, sampling time, current time>>, that is, S = <I, P>. This binary tuple can achieve the indexing from the serial number to the parameter P. Define the elements in the set as serial numbers, and this set C = (I1, I2,..., I n ,…), where I n represents the serial number of the nth parameter; According to the properties of the set, the element I in C is unique and not repeated. Define a constant △T to represent three times the sampling period of a certain type of data. The specific steps are as follows: Step 2.1: Receive the formatted data frame in real time, and take the parameter sequence number in the data frame and store it in set C; Step 2.2: If the sequence number does not exist in the set C, add the sequence number to the set, cache the element P, and create an index S, where P. 当前时刻 = P. 采样时刻 = current data frame sampling time; go to step 2.4; Step 2.3: If the sequence number already exists in the set C, use the index S to update the element P, that is, overwrite the original parameter; Step 2.4: Update element P using index S for other elements in set C. 当前时刻 = current data frame sampling time; Step 2.
5. For all elements in the set, use index S to calculate element P. 当前时刻 - P. 采样时刻 , if the time difference > △T, then delete the element P, index S and sequence number I in the set; Step 2.6: Repeat steps 2.1 to 2.5 to obtain the real-time status data of all devices in the entire system.
5. The method for constructing a diagnostic mechanism adapted to diversified acquisition of multi-source heterogeneous parameters according to claim 4, characterized in that: The step 3 is specifically implemented according to the following steps: Step 3.
1. Representation of diagnostic knowledge with a fixed single parameter criterion: In this type of knowledge, variables are fixed, have fixed upper and lower limits, or are finite discrete values. When describing a rule, the rule antecedent includes a state fact object, and logical judgment can be completed in the antecedent. The rule consequent includes one or more diagnostic result fact objects. Parameter values represented by multiple analog ranges can also be considered finite discrete values, except that the criterion is not a value, but an interval. Step 3.2: Representation of diagnostic knowledge with fixed multi-parameter criteria: In this type of knowledge, the value range of a parameter variable is related to one or more other parameters. When describing a rule, the rule antecedent includes multiple parameter fact objects. Some logical judgments can be completed in the antecedent. The rule consequent includes multiple logical branches, each of which includes one or more diagnostic result fact objects. Step 3.3: Represent diagnostic knowledge related to historical parameter values: In this type of knowledge, the value range of a variable is related to the historical value or historical change value of itself or one or more other parameters. When describing rules, since the historical records of parameters are required, global variables need to be defined and the historical values of the variables need to be included in the logical judgment. Step 3.4, the diagnostic knowledge representation that needs to be analyzed and determined by the judgment criteria: In this type of knowledge, the range of variable values is related to time or other parameters. When describing the rules, since the parameter threshold changes with time or other factors, it is necessary to define a function to describe the threshold change curve, and introduce the threshold curve function to participate in logical judgment. For the case where the threshold function curve is unknown, the least squares method is used to estimate and infer the optimal regression model of the curve based on the statistical characteristics of a large number of historical values of the parameter.
6. The method for constructing a diagnostic mechanism adapted to diversified acquisition of multi-source heterogeneous parameters according to claim 5, characterized in that: The specific steps of applying the least squares method to estimate and infer the optimal regression model of the curve in step 3.4 are as follows: Step 3.4.1, import relevant parameter historical data; Step 3.4.2, calculate the correlation coefficient; Step 3.4.3, draw a scatter plot; Step 3.4.4, establish a linear regression model; Step 3.4.5: Define a threshold function based on the linear regression model's plus or minus three times the standard deviation as the parameter criterion; Step 3.4.6: Update the threshold function based on the real-time acquisition parameter values.
7. The method for constructing a diagnostic mechanism adapted to diversified acquisition of multi-source heterogeneous parameters according to claim 6, characterized in that: The step 4 is specifically implemented according to the following steps: Step 4.1: Apply the object fact template to define the state parameter class and the diagnosis result class. The instantiated state parameter class object set is used as the input of the Rete algorithm inference engine. After matching with the loaded diagnosis knowledge in the Rete algorithm inference engine, the instantiated diagnosis result object set is output. Step 4.2: Set the inference strategy to do-forward-chaining to prevent the inference engine from working backwards from the goal to find evidence supporting the hypothesis. Step 4.3: The parameter set sampled by the diagnostic system will not be repeated. Set the "unique" condition element to reduce the search of all state object fact sets by the rule pattern; Step 4.4: Load the diagnostic library consisting of the diagnostic knowledge in step 3.
8. The method for constructing a diagnostic mechanism adapted to diversified acquisition of multi-source heterogeneous parameters according to claim 7, characterized in that: The step 5 is specifically implemented according to the following steps: Define a common diagnostic result class, and the output results of multiple different diagnostic machines are different objects of the class. The diagnostic results of multiple different diagnostic machines are displayed in the same table on the interface, and are distinguished by the name of the diagnostic machine.
Citation Information
Patent Citations
Multi-sensor multi-parameter information intelligent integration system
CN105372534A