CN116192705A - Object-oriented protocol consistency problem positioning test method and system - Google Patents
Object-oriented protocol consistency problem positioning test method and system Download PDFInfo
- Publication number
- CN116192705A CN116192705A CN202211170332.5A CN202211170332A CN116192705A CN 116192705 A CN116192705 A CN 116192705A CN 202211170332 A CN202211170332 A CN 202211170332A CN 116192705 A CN116192705 A CN 116192705A
- Authority
- CN
- China
- Prior art keywords
- data
- sample
- message
- parameter unit
- standard data
- 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
Links
- 238000010998 test method Methods 0.000 title claims description 6
- 238000001514 detection method Methods 0.000 claims abstract description 40
- 238000000034 method Methods 0.000 claims abstract description 40
- 238000012549 training Methods 0.000 claims abstract description 32
- 238000012545 processing Methods 0.000 claims abstract description 21
- 238000012360 testing method Methods 0.000 claims abstract description 20
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 13
- 230000005856 abnormality Effects 0.000 claims abstract description 12
- 230000005611 electricity Effects 0.000 claims abstract description 11
- 230000002452 interceptive effect Effects 0.000 claims abstract description 11
- 238000004891 communication Methods 0.000 claims abstract description 10
- 238000010801 machine learning Methods 0.000 claims abstract description 8
- 238000009826 distribution Methods 0.000 claims description 25
- 230000002159 abnormal effect Effects 0.000 claims description 19
- 238000003066 decision tree Methods 0.000 claims description 16
- 238000010606 normalization Methods 0.000 claims description 9
- 238000000638 solvent extraction Methods 0.000 claims description 6
- 238000001310 location test Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 238000007637 random forest analysis Methods 0.000 description 7
- 230000002354 daily effect Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000004807 localization Effects 0.000 description 4
- 230000003993 interaction Effects 0.000 description 3
- 238000005070 sampling Methods 0.000 description 3
- 238000003860 storage Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000005065 mining Methods 0.000 description 2
- 241000282414 Homo sapiens Species 0.000 description 1
- 241000677647 Proba Species 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000007418 data mining Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000033772 system development Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/18—Protocol analysers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2465—Query processing support for facilitating data mining operations in structured databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Mathematical Physics (AREA)
- General Engineering & Computer Science (AREA)
- Fuzzy Systems (AREA)
- Computational Linguistics (AREA)
- Probability & Statistics with Applications (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Computing Systems (AREA)
- Computer And Data Communications (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a method and a system for positioning and testing consistency problems of an object-oriented protocol, wherein the method comprises the following steps: collecting an interactive communication message generated by an electricity consumption information acquisition system as original sample data to form an original sample library; reading original sample data from the original sample library, and performing data standardization processing on the original sample data to form standard data; forming a standard sample library taking standard data containing all characteristic factors of a message as training samples based on massive historical standard data records, carrying out model training on the training samples according to a machine learning algorithm, and determining a prediction model; and inputting the sample to be detected into the prediction model for abnormality detection, and outputting a detection result.
Description
Technical Field
The invention relates to the technical field of data mining, in particular to a method and a system for positioning and testing consistency problems of an object-oriented protocol.
Background
Along with the release and wide application of the object-oriented electricity consumption data exchange protocol of DL\T-698.45, the system development and maintenance cost of the electricity consumption information acquisition system and equipment is greatly reduced due to the higher development flexibility and expansibility. However, the drawbacks caused by the high flexibility are obvious, and in the situation that the protocol is widely used, the attribute or the method of some specific objects are uniquely understood by a plurality of manufacturers, so that the consistency of communication messages used by devices running in the same mining system is deviated, the devices of different manufacturers cannot be compatible, the communication efficiency of the mining system is reduced, and the development cost of the manufacturers is increased. Thus, there is an urgent need for a protocol consistency evaluation rule conforming to the mainstream.
The current method for detecting the protocol consistency of the electricity consumption information acquisition equipment is to assign specific test contents, and strictly compare the data type and the numerical value of returned data to judge whether the equipment accords with the protocol consistency specification. The limitations of this test format are very large, first, the test cases solidify, are inconvenient to expand, and are easily optimized specifically by the equipment manufacturer to pass the test. Secondly, the coverage rate of detection is insufficient, the appointed test content cannot contain various scenes in actual use, and the requirement of mass data cannot be met. Third, the detection rules do not necessarily conform to the prevailing understanding, and the limitations of business awareness limited to the developers of the detection software can lead to misalignment of the detection rules.
Disclosure of Invention
According to the invention, a method and a system are provided to solve the problem that the current method for detecting the protocol consistency of the power consumption information acquisition equipment is to assign specific test contents, and the method is used for judging whether the equipment accords with the protocol consistency specification or not by strictly comparing the data type and the numerical value of returned data. The limitations of this form of testing are very great technical problems.
According to a first aspect of the present invention, there is provided an object-oriented protocol consistency problem localization test method, comprising:
collecting an interactive communication message generated by an electricity consumption information acquisition system as original sample data to form an original sample library;
reading original sample data from the original sample library, and performing data standardization processing on the original sample data to form standard data;
forming a standard sample library taking standard data containing all characteristic factors of a message as training samples based on massive historical standard data records, carrying out model training on the training samples according to a machine learning algorithm, and determining a prediction model;
and inputting the sample to be detected into the prediction model for abnormality detection, and outputting a detection result.
Optionally, performing data normalization processing on the original sample data to form standard data, including:
carrying out data standardization processing on the original sample data, and dividing the frame structure of the message into attribute of a certain object or parameter units of a method according to a preset rule;
and generating characteristic factors of the parameter unit according to the data type of the parameter unit, and serializing all the characteristic factors to form standard data.
Optionally, partitioning the frame structure of the message into attribute of a certain object or parameter units of the method according to a predetermined rule includes:
the message is divided into a start symbol, a length field, a control field, an address field, a frame header check, link user data, a frame check and an end symbol according to a preset rule, and the attribute of an object or a parameter unit of a method is determined.
Optionally, generating the feature factors of the parameter unit according to the data type of the parameter unit, and serializing all the feature factors to form standard data, including:
judging whether the parameter unit accords with a preset specification, if the parameter unit accords with the preset specification, generating a characteristic factor of the parameter unit, and if the parameter unit does not accord with the preset specification, judging that the message is abnormal sample data and discarding the message;
after the feature factors are extracted from the original data, a standard data stream is formed in a decision tree mode according to the analysis structure sequence of the message.
Optionally, inputting the sample to be detected into the prediction model for abnormality detection, and outputting a detection result, including:
inputting a sample to be detected into the prediction model for abnormality detection, and determining probability distribution of the sample to be detected belonging to each category;
when the probability distribution of any classification category is not greater than a specified threshold, judging that the sample data to be detected is abnormal and does not accord with the protocol consistency rule;
if the probability distribution of a certain class is larger than a specified threshold, the sample data to be detected can be judged to accord with one sub-class in the protocol consistency rule.
According to another aspect of the present invention, there is also provided an object-oriented protocol consistency problem localization test system, including:
the original sample library forming module is used for collecting the interactive communication message generated by the electricity consumption information acquisition system as original sample data to form an original sample library;
the standard data forming module is used for reading original sample data from the original sample library, and carrying out data standardization processing on the original sample data to form standard data;
the prediction model determining module is used for forming a standard sample library taking standard data containing all characteristic factors of the message as training samples based on massive historical standard data records, performing model training on the training samples according to a machine learning algorithm, and determining a prediction model;
and the output detection result module is used for inputting the sample to be detected into the prediction model for abnormality detection and outputting a detection result.
Optionally, forming the standard data module includes:
the sub-module is divided into parameter units, which is used for carrying out data standardization processing on the original sample data and dividing the frame structure of the message into parameter units of an attribute or a method of a certain object according to a preset rule;
and forming a standard data sub-module, which is used for generating characteristic factors of the parameter unit according to the data type of the parameter unit, and serializing all the characteristic factors to form standard data.
Optionally, the partitioning into parameter unit sub-modules includes:
and the parameter determining unit is used for dividing the message into a start symbol, a length domain, a control domain, an address domain, a frame header check, link user data, a frame check and an end symbol according to a preset rule, and determining the attribute of an object or the parameter unit of a method.
Optionally, forming the standard data sub-module includes:
the judging parameter unit is used for judging whether the parameter unit accords with a preset specification, generating a characteristic factor of the parameter unit if the parameter unit accords with the preset specification, and judging that the message is abnormal sample data and discarding the message if the parameter unit does not accord with the preset specification;
and forming a standard data stream unit, wherein the standard data stream unit is used for forming a standard data stream in a decision tree mode according to the analysis structure sequence of the message after the feature factors are extracted from the original data.
Optionally, the output detection result module includes:
the probability distribution determining sub-module is used for inputting a sample to be detected into the prediction model for abnormal detection and determining probability distribution of the sample to be detected belonging to each category;
the judging non-conforming sub-module is used for judging that the sample data to be detected is abnormal and does not conform to the protocol conforming rule when the probability distribution of any classification category is larger than a specified threshold value;
and the consistency judging sub-module is used for judging that the sample data to be detected accords with one sub-category in the protocol consistency rule if the probability distribution of one category is larger than a specified threshold value.
Thus, the basic period learning is carried out through the existing sample database, and an optimized prediction model is obtained through training, and can predict any sample with a similar structure as that in the sample database to judge whether the sample meets the rule. If the model is required to be expanded, only the sample library under the corresponding classification is required to be added for retraining, and software is not required to be changed, so that the model has high expandability. The detected data is derived from interactive messages of the daily operation of the equipment, greatly comprises the application working conditions of the equipment in various scenes, improves the coverage rate of the test, and meets the requirement of massive message data in the daily use process. The message sample library of the detection method comes from the actual interaction scene in the sampling system, and comprises a plurality of terminal manufacturers, so that the richness and the randomness of the samples are enough ensured. The analysis prediction model obtained through the sample library training has enough representativeness and can represent the mainstream understanding modes of a plurality of manufacturers.
Drawings
Exemplary embodiments of the present invention may be more completely understood in consideration of the following drawings:
fig. 1 is a flow chart of an object-oriented protocol consistency problem positioning test method according to the present embodiment;
fig. 2 is a schematic diagram of a data normalization model according to the present embodiment;
FIG. 3 is a schematic diagram of data serialization according to the present embodiment;
fig. 4 is a schematic diagram of an object-oriented protocol consistency problem positioning test system according to the present embodiment.
Detailed Description
The exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, however, the present invention may be embodied in many different forms and is not limited to the examples described herein, which are provided to fully and completely disclose the present invention and fully convey the scope of the invention to those skilled in the art. The terminology used in the exemplary embodiments illustrated in the accompanying drawings is not intended to be limiting of the invention. In the drawings, like elements/components are referred to by like reference numerals.
Unless otherwise indicated, terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. In addition, it will be understood that terms defined in commonly used dictionaries should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense.
According to a first aspect of the present invention, there is provided an object-oriented protocol consistency problem localization test method 100, as shown with reference to fig. 1, the method 100 comprising:
s101, collecting an interactive communication message generated by an electricity consumption information acquisition system as original sample data to form an original sample library;
s102, original sample data are read from the original sample library, and data normalization processing is carried out on the original sample data to form standard data;
s103, forming a standard sample library taking standard data containing all characteristic factors of the message as training samples based on massive historical standard data records, carrying out model training on the training samples according to a machine learning algorithm, and determining a prediction model;
s104, inputting the sample to be detected into the prediction model for abnormality detection, and outputting a detection result.
Specifically, the method comprises the following steps:
s1: data preparation. And collecting interactive communication messages generated by the electricity consumption information acquisition system every day to form a message material library.
S2: data normalization. Analyzing and processing an original message material library, dividing a frame structure of a message into attribute of a certain object or parameter units of a method according to a convention rule of protocol, generating characteristic factors of the parameter units according to data types of each parameter unit, avoiding characteristic loss caused by difference of specific data contents, and finally serializing all the characteristic factors to form standard data.
S3: an analytical model is trained. Based on massive historical data records, a training sample library taking standard data containing all characteristic factors of the message as a sample is formed, and model training is carried out by using a machine learning algorithm of a computer.
S4: and detecting abnormal data. When a message to be detected exists, the test sample library taking standard data as a sample is obtained after the data normalization operation in the step S2. After the abnormal detection analysis model is input, a detection conclusion and corresponding probability distribution are given.
Further, the frame structure parsing model of S2 in the step, as shown in table 1,
TABLE 1
The method can be divided into a start character, a length domain, a control domain, an address domain, a frame header check, link user data and a frame check and an end character in detail according to the specification of protocol. The link user data can be further divided into different application service types according to protocol conventions.
Further, the training model of the step S3 is defined as a random forest algorithm in the integrated learning, which is a supervised learning algorithm based on if-then-else rules, and has strong interpretation and accords with the visual thinking of human beings.
The basis of the random forest is a decision tree algorithm, and the decision tree is an algorithm for solving the classification problem. The method adopts a tree structure, and realizes final classification by using layer-by-layer reasoning. The decision tree is made up of several elements:
root node: containing a complete set of samples
Internal node: corresponding feature attribute testing
Leaf node: representing the outcome of the decision
When predicting, judging at the internal node of the tree by using a certain attribute value, and deciding which branch node to enter according to the judging result until reaching the leaf node to obtain the classification result. Random forests are made up of many decision trees, with no correlation between different decision trees. The last predicted result of the random forest is the mode of the predicted results of a plurality of decision trees.
The specific embodiment is as follows:
the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. Examples:
s1: as shown in fig. 2, the software reads the original sample data DA1 from the original sample database, after the data normalization function module, the original sample DA1 is parsed into a plurality of parameter units PA1 … PAn according to the frame structure, and the marking rules of the parameter units follow the abstract syntax of asn.1, see GB/T16262.1-2006 for details. Following the abstract grammar rule of ASN.1, extracting the characteristic factor Tm of the current parameter unit PAm, namely the specific data type of the current parameter unit, wherein the detailed definition is shown in the data type definition part of protocol.
S2: after the extraction of the feature factors from the raw data, the data serialization is required. The serialization principle is defined according to a theoretical decision tree of a random forest algorithm, as shown in fig. 3, and a standard data stream is formed in a decision tree mode according to the analysis structure sequence of the message, as shown in table 2:
TABLE 2
Parameter unit 1 | Parameter unit 2 | Parameter unit … | … | Parameter unit N |
Characteristic factor 1 | Feature factor 2 | Characteristic factor … | … | Characteristic factor N |
If any parameter unit is detected to be not in accordance with the protocol, judging the message as abnormal sample data and discarding the abnormal sample data.
S3: the training model process may be performed using the sklearn. Ensable. Random fortrregsor () library in python. Main performance parameters of the RandomForestoregsor function:
max_features: random forests allow a single decision tree to use the maximum number of features.
n_evastiators: number of decision trees in random forest.
min_sample_leaf: the leaf node has the least number of samples.
The function returns a predictive model that is trained using the training samples.
S4: and carrying out anomaly detection on sample data to be detected by using a prediction model, wherein the prediction model provides an external interface function prediction_ proba (testdata), the function returns a one-dimensional vector which is probability distribution of testdata belonging to each class, and when the probability distribution of any classification class is not greater than a specified threshold value, the test sample data is judged to have anomalies and does not accord with protocol consistency rules. If the probability distribution of a class is greater than a specified threshold, it may be determined that the test sample data meets a sub-class in the protocol consistency rule.
Thus, the basic period learning is carried out through the existing sample database, and an optimized prediction model is obtained through training, and can predict any sample with a similar structure as that in the sample database to judge whether the sample meets the rule. If the model is required to be expanded, only the sample library under the corresponding classification is required to be added for retraining, and software is not required to be changed, so that the model has high expandability. The detected data is derived from interactive messages of the daily operation of the equipment, greatly comprises the application working conditions of the equipment in various scenes, improves the coverage rate of the test, and meets the requirement of massive message data in the daily use process. The message sample library of the detection method comes from the actual interaction scene in the sampling system, and comprises a plurality of terminal manufacturers, so that the richness and the randomness of the samples are enough ensured. The analysis prediction model obtained through the sample library training has enough representativeness and can represent the mainstream understanding modes of a plurality of manufacturers.
Optionally, performing data normalization processing on the original sample data to form standard data, including:
carrying out data standardization processing on the original sample data, and dividing the frame structure of the message into attribute of a certain object or parameter units of a method according to a preset rule;
and generating characteristic factors of the parameter unit according to the data type of the parameter unit, and serializing all the characteristic factors to form standard data.
Optionally, partitioning the frame structure of the message into attribute of a certain object or parameter units of the method according to a predetermined rule includes:
the message is divided into a start symbol, a length field, a control field, an address field, a frame header check, link user data, a frame check and an end symbol according to a preset rule, and the attribute of an object or a parameter unit of a method is determined.
Optionally, generating the feature factors of the parameter unit according to the data type of the parameter unit, and serializing all the feature factors to form standard data, including:
judging whether the parameter unit accords with a preset specification, if the parameter unit accords with the preset specification, generating a characteristic factor of the parameter unit, and if the parameter unit does not accord with the preset specification, judging that the message is abnormal sample data and discarding the message;
after the feature factors are extracted from the original data, a standard data stream is formed in a decision tree mode according to the analysis structure sequence of the message.
Optionally, inputting the sample to be detected into the prediction model for abnormality detection, and outputting a detection result, including:
inputting a sample to be detected into the prediction model for abnormality detection, and determining probability distribution of the sample to be detected belonging to each category;
when the probability distribution of any classification category is not greater than a specified threshold, judging that the sample data to be detected is abnormal and does not accord with the protocol consistency rule;
if the probability distribution of a certain class is larger than a specified threshold, the sample data to be detected can be judged to accord with one sub-class in the protocol consistency rule.
Thus, the basic period learning is carried out through the existing sample database, and an optimized prediction model is obtained through training, and can predict any sample with a similar structure as that in the sample database to judge whether the sample meets the rule. If the model is required to be expanded, only the sample library under the corresponding classification is required to be added for retraining, and software is not required to be changed, so that the model has high expandability. The detected data is derived from interactive messages of the daily operation of the equipment, greatly comprises the application working conditions of the equipment in various scenes, improves the coverage rate of the test, and meets the requirement of massive message data in the daily use process. The message sample library of the detection method comes from the actual interaction scene in the sampling system, and comprises a plurality of terminal manufacturers, so that the richness and the randomness of the samples are enough ensured. The analysis prediction model obtained through the sample library training has enough representativeness and can represent the mainstream understanding modes of a plurality of manufacturers.
In accordance with another aspect of the present invention, there is also provided an object-oriented protocol consistency problem localization test system 400, as illustrated with reference to FIG. 4, the system 400 comprising:
the original sample library forming module 410 is configured to collect an interactive communication message generated by the electricity consumption information acquisition system as original sample data to form an original sample library;
a standard data forming module 420, configured to read original sample data from the original sample library, and perform data normalization processing on the original sample data to form standard data;
the prediction model determining module 430 is configured to form a standard sample library using standard data including all feature factors of a message as training samples based on massive historical standard data records, perform model training on the training samples according to a machine learning algorithm, and determine a prediction model;
and the output detection result module 440 is configured to input the sample to be detected into the prediction model for anomaly detection, and output a detection result.
Optionally, forming the standard data module includes:
the sub-module is divided into parameter units, which is used for carrying out data standardization processing on the original sample data and dividing the frame structure of the message into parameter units of an attribute or a method of a certain object according to a preset rule;
and forming a standard data sub-module, which is used for generating characteristic factors of the parameter unit according to the data type of the parameter unit, and serializing all the characteristic factors to form standard data.
Optionally, the partitioning into parameter unit sub-modules includes:
and the parameter determining unit is used for dividing the message into a start symbol, a length domain, a control domain, an address domain, a frame header check, link user data, a frame check and an end symbol according to a preset rule, and determining the attribute of an object or the parameter unit of a method.
Optionally, forming the standard data sub-module includes:
the judging parameter unit is used for judging whether the parameter unit accords with a preset specification, generating a characteristic factor of the parameter unit if the parameter unit accords with the preset specification, and judging that the message is abnormal sample data and discarding the message if the parameter unit does not accord with the preset specification;
and forming a standard data stream unit, wherein the standard data stream unit is used for forming a standard data stream in a decision tree mode according to the analysis structure sequence of the message after the feature factors are extracted from the original data.
Optionally, the output detection result module includes:
the probability distribution determining sub-module is used for inputting a sample to be detected into the prediction model for abnormal detection and determining probability distribution of the sample to be detected belonging to each category;
the judging non-conforming sub-module is used for judging that the sample data to be detected is abnormal and does not conform to the protocol conforming rule when the probability distribution of any classification category is larger than a specified threshold value;
and the consistency judging sub-module is used for judging that the sample data to be detected accords with one sub-category in the protocol consistency rule if the probability distribution of one category is larger than a specified threshold value.
An object-oriented protocol consistency problem location test system 400 according to an embodiment of the present invention corresponds to an object-oriented protocol consistency problem location test method 100 according to another embodiment of the present invention, and is not described herein.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The solutions in the embodiments of the present application may be implemented in various computer languages, for example, object-oriented programming language Java, and an transliterated scripting language JavaScript, etc.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.
Claims (10)
1. The object-oriented protocol consistency problem positioning test method is characterized by comprising the following steps:
collecting an interactive communication message generated by an electricity consumption information acquisition system as original sample data to form an original sample library;
reading original sample data from the original sample library, and performing data standardization processing on the original sample data to form standard data;
forming a standard sample library taking standard data containing all characteristic factors of a message as training samples based on massive historical standard data records, carrying out model training on the training samples according to a machine learning algorithm, and determining a prediction model;
and inputting the sample to be detected into the prediction model for abnormality detection, and outputting a detection result.
2. The method of claim 1, wherein performing data normalization processing on the raw sample data to form standard data comprises:
carrying out data standardization processing on the original sample data, and dividing the frame structure of the message into attribute of a certain object or parameter units of a method according to a preset rule;
and generating characteristic factors of the parameter unit according to the data type of the parameter unit, and serializing all the characteristic factors to form standard data.
3. The method according to claim 2, wherein the partitioning of the frame structure of the message into the attributes of an object or the parameter elements of the method according to a predetermined rule comprises:
the message is divided into a start symbol, a length field, a control field, an address field, a frame header check, link user data, a frame check and an end symbol according to a preset rule, and the attribute of an object or a parameter unit of a method is determined.
4. The method of claim 2, wherein generating the feature factors of the parameter unit according to the data type of the parameter unit, and serializing all feature factors to form the standard data comprises:
judging whether the parameter unit accords with a preset specification, if the parameter unit accords with the preset specification, generating a characteristic factor of the parameter unit, and if the parameter unit does not accord with the preset specification, judging that the message is abnormal sample data and discarding the message;
after the feature factors are extracted from the original data, a standard data stream is formed in a decision tree mode according to the analysis structure sequence of the message.
5. The method according to claim 1, wherein inputting the sample to be detected into the predictive model for abnormality detection and outputting the detection result comprises:
inputting a sample to be detected into the prediction model for abnormality detection, and determining probability distribution of the sample to be detected belonging to each category;
when the probability distribution of any classification category is not greater than a specified threshold, judging that the sample data to be detected is abnormal and does not accord with the protocol consistency rule;
if the probability distribution of a certain class is larger than a specified threshold, the sample data to be detected can be judged to accord with one sub-class in the protocol consistency rule.
6. An object-oriented protocol consistency problem location test system, comprising:
the original sample library forming module is used for collecting the interactive communication message generated by the electricity consumption information acquisition system as original sample data to form an original sample library;
the standard data forming module is used for reading original sample data from the original sample library, and carrying out data standardization processing on the original sample data to form standard data;
the prediction model determining module is used for forming a standard sample library taking standard data containing all characteristic factors of the message as training samples based on massive historical standard data records, performing model training on the training samples according to a machine learning algorithm, and determining a prediction model;
and the output detection result module is used for inputting the sample to be detected into the prediction model for abnormality detection and outputting a detection result.
7. The system of claim 6, wherein forming the standard data module comprises:
the sub-module is divided into parameter units, which is used for carrying out data standardization processing on the original sample data and dividing the frame structure of the message into parameter units of an attribute or a method of a certain object according to a preset rule;
and forming a standard data sub-module, which is used for generating characteristic factors of the parameter unit according to the data type of the parameter unit, and serializing all the characteristic factors to form standard data.
8. The system of claim 7, wherein the partitioning into parameter unit sub-modules comprises:
and the parameter determining unit is used for dividing the message into a start symbol, a length domain, a control domain, an address domain, a frame header check, link user data, a frame check and an end symbol according to a preset rule, and determining the attribute of an object or the parameter unit of a method.
9. The system of claim 7, wherein forming the standard data sub-module comprises:
the judging parameter unit is used for judging whether the parameter unit accords with a preset specification, generating a characteristic factor of the parameter unit if the parameter unit accords with the preset specification, and judging that the message is abnormal sample data and discarding the message if the parameter unit does not accord with the preset specification;
and forming a standard data stream unit, wherein the standard data stream unit is used for forming a standard data stream in a decision tree mode according to the analysis structure sequence of the message after the feature factors are extracted from the original data.
10. The system of claim 6, wherein the output test result module comprises:
the probability distribution determining sub-module is used for inputting a sample to be detected into the prediction model for abnormal detection and determining probability distribution of the sample to be detected belonging to each category;
the judging non-conforming sub-module is used for judging that the sample data to be detected is abnormal and does not conform to the protocol conforming rule when the probability distribution of any classification category is larger than a specified threshold value;
and the consistency judging sub-module is used for judging that the sample data to be detected accords with one sub-category in the protocol consistency rule if the probability distribution of one category is larger than a specified threshold value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211170332.5A CN116192705A (en) | 2022-09-22 | 2022-09-22 | Object-oriented protocol consistency problem positioning test method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211170332.5A CN116192705A (en) | 2022-09-22 | 2022-09-22 | Object-oriented protocol consistency problem positioning test method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116192705A true CN116192705A (en) | 2023-05-30 |
Family
ID=86431338
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211170332.5A Pending CN116192705A (en) | 2022-09-22 | 2022-09-22 | Object-oriented protocol consistency problem positioning test method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116192705A (en) |
-
2022
- 2022-09-22 CN CN202211170332.5A patent/CN116192705A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111798312B (en) | Financial transaction system anomaly identification method based on isolated forest algorithm | |
Maiti et al. | Capturing, eliciting, predicting and prioritizing (CEPP) non-functional requirements metadata during the early stages of agile software development | |
CN109684374B (en) | Method and device for extracting key value pairs of time series data | |
CN112348519A (en) | Method and device for identifying fraudulent user and electronic equipment | |
CN116383742B (en) | Rule chain setting processing method, system and medium based on feature classification | |
CN112434178B (en) | Image classification method, device, electronic equipment and storage medium | |
CN111931809A (en) | Data processing method and device, storage medium and electronic equipment | |
CN109918296A (en) | Automatic software test method and device | |
CN115426265B (en) | Exchange resource allocation optimization method, device and medium in multi-mode network | |
US20190266281A1 (en) | Natural Language Processing and Classification | |
CN114911800A (en) | Fault prediction method and device for power system and electronic equipment | |
CN113297044B (en) | Operation and maintenance risk early warning method and device | |
CN117492703A (en) | Software development method, device and medium based on artificial intelligence | |
CN115859191A (en) | Fault diagnosis method and device, computer readable storage medium and computer equipment | |
CN114490413A (en) | Test data preparation method and device, storage medium and electronic equipment | |
CN112464237B (en) | Static code security diagnosis method and device | |
CN111797995B (en) | Method and device for generating interpretation report of model prediction sample | |
CN117544482A (en) | Operation and maintenance fault determining method, device, equipment and storage medium based on AI | |
CN113238937A (en) | Compiler fuzzy test method based on code compaction and false alarm filtering | |
CN111385273B (en) | Internet of things business process identification method and device, electronic equipment and medium | |
CN116192705A (en) | Object-oriented protocol consistency problem positioning test method and system | |
CN116956853A (en) | Method and device for acquiring configuration template and electronic equipment | |
CN111027296A (en) | Report generation method and system based on knowledge base | |
CN113469235B (en) | Water fluctuation abnormality recognition method and device, computer device and storage medium | |
CN115499234A (en) | Community security early warning method and system based on artificial intelligence |
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 |