CN102624685B - Encodable protocol processing method for intelligent equipment - Google Patents

Encodable protocol processing method for intelligent equipment Download PDF

Info

Publication number
CN102624685B
CN102624685B CN201110379430.5A CN201110379430A CN102624685B CN 102624685 B CN102624685 B CN 102624685B CN 201110379430 A CN201110379430 A CN 201110379430A CN 102624685 B CN102624685 B CN 102624685B
Authority
CN
China
Prior art keywords
circulation
protocol
intelligent equipment
data
enter
Prior art date
Application number
CN201110379430.5A
Other languages
Chinese (zh)
Other versions
CN102624685A (en
Inventor
张永涛
陈兴海
Original Assignee
高新兴科技集团股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 高新兴科技集团股份有限公司 filed Critical 高新兴科技集团股份有限公司
Priority to CN201110379430.5A priority Critical patent/CN102624685B/en
Publication of CN102624685A publication Critical patent/CN102624685A/en
Application granted granted Critical
Publication of CN102624685B publication Critical patent/CN102624685B/en

Links

Abstract

The invention relates to the technical field of protocol analysis of intelligent equipment, in particular to an encodable protocol processing method for the intelligent equipment. Firstly, a protocol analysis configuration file corresponding to the intelligent equipment is read, and various involved analytical methods for collected data packets and data packet assembly manners for reading the intelligent equipment are stored in a program register; afterwards, a collection unit of the intelligent equipment issues a collection order according to the encodable protocol configuration rule of the intelligent equipment, which is read at the beginning, and sends the collected data packets to a protocol processing module, and the protocol processing module analyzes the data protocol packets according to a corresponding encodable protocol processing rule of the intelligent equipment; and finally, analyzed data are stored, transmitted to a center or subsequently processed. The encodable protocol processing method is suitable for the field of industrial control, and is particularly suitable for a dynamic environment monitoring system of a base station.

Description

A kind of intelligent equipment protocol processing method of codified
Technical field
The present invention relates to intelligent equipment protocol analytic technique field, particularly a kind of intelligent equipment protocol processing method of codified.
Background technology
In industrial control field, various management system all can access some Switching Power Supplies usually, ammeter, intelligent air condition, generating set, UPS, the smart machine such as energy-conservation carry out image data, and the data collected often all just can will be identified through some parsings and process, analyze data and also do corresponding control; And then present or preserve in a database, and the communications protocol that different smart machines adopts is also different with corresponding parameter information.Solving the method that this problem generally commonly uses is write different parsing modules according to different smart machines and different agreement, and the smart machine that namely each class is different is all corresponding with a section protocol analysis program; This way realizes simple, but shortage flexibility, such as in the dynamic environment monitoring system of base station, may access tens kinds even smart machine of hundreds of protocol type in a system, this system will develop this hundreds of protocol analysis in advance like this, and source code also has cover up to a hundred, if increased or an amendment function in the future, will revise the code of cover up to a hundred, workload is larger, and task is burdensome also.
Summary of the invention
The problem to be solved in the present invention is the intelligent equipment protocol processing method overcoming the deficiencies in the prior art and provide a kind of codified, the method only need edit parsing configuration file corresponding with it for different smart machines, flexibility is large, alleviates the workload of the code of maintenance cover up to a hundred in the future simultaneously.
For achieving the above object, technical scheme of the present invention is: a kind of intelligent equipment protocol processing method of codified, comprises the steps:
Step 1: the protocol analysis coding profile reading corresponding smart machine, deposits in the internal memory analytic structure body of program;
Step 2: circulation issues acquisition, waits return data bag to be subjected; If time-out does not also receive, just circulation issues an other acquisition and jumps to step 2; If there is data receiver to enter step 3;
Step 3: single Parameter analysis of electrochemical: the parameter information one by one according to the protocol analysis coding profile of codified is resolved one by one to the packet received, if running into is that entrance is resolved in a circulation, enters step 4;
Step 4: enter recursion cycle analytical function; This function resolves the return data bag collected according to the resolution rules of codified; This function entrance is the initial address of the packet returned, and first according to reading the parameter information of protocol analysis coding profile, to fetch data parsings, if run into a circulation parsing entrance to enter step 4 to packet; Otherwise continue to resolve;
Step 5: according to the resolution rules of codified, determines this code parsing information at resolution rules such as the absolute address of packet and parsing length, data transformations rule, corresponding codings, parses the concrete data message of this project thus; Whether the rule judgment according to correspondence is the entrance that next circulation is resolved, if resolve entrance for circulation to jump to step 4; If last resolution data of this circulation, then preserve data, Shang Song Surveillance center or post-treatment operations, exit this circulation;
Step 6: last resolution data determining whether this protocol package, if not, enter step 4 at this, enter circulation and resolve, otherwise exit recursion cycle analytical function, enter step 2.
In the intelligent equipment protocol processing method of above-mentioned codified, it is have n parameter or User Defined number to be m in agreement that entrance is resolved in described circulation.
Compared with prior art, the present invention has following beneficial effect:
In the intelligent equipment protocol processing method of codified of the present invention, the code of various types of smart machine only has a set of, and the protocol analysis of various types of smart machine is abstracted into a kind of smart machine tupe of codified, parsing configuration file corresponding with it only need be edited like this for different smart machines, resolving code is this abstract interpretive model out of compatible processing, parsing or the control of individual parameters is increased as needed later, only need edit corresponding configuration file just passable, adopt the inventive method except not only alleviating the code of maintenance cover up to a hundred in the future, and user can obtain maximum flexibility.
Accompanying drawing explanation
Fig. 1 is that processing method of the present invention realizes schematic diagram;
Fig. 2 is process flow figure of the present invention.
Embodiment
Below in conjunction with embodiment and accompanying drawing, the present invention is described in detail.
The present invention is the intelligent equipment protocol tupe by a kind of codified, improve adaptability and the autgmentability of management system, in the process of deployment management system, the intelligent equipment protocol only needing exploitation one fixing resolves template (application program), and then affix needs the configuration file of the smart machine of resolving; The smart machine accessing various protocols type can be needed according to user, parsing configuration file that only need be corresponding according to the communication protocol configuration of this smart machine, the parsing that can complete this smart machine is combined with fixing parsing template, do not need again to develop new application program parsing module (programming language C, C++), convenient and simple, also save development and maintenance cost, Fig. 1 is for realizing schematic diagram.
As shown in Figure 1, first fixing intelligent equipment protocol is resolved template (application program) and is read protocol analysis configuration file corresponding to smart machine, is kept in program cache by the data packet group packet mode of the analytic method of the various image data bags related to and reading smart machine; Then fixing intelligent equipment protocol is resolved template (application program) and is issued acquisition according to the intelligent equipment protocol configuration rule starting the codified read, fixing intelligent equipment protocol resolves the internal agreement process function that the packet collected is given fixing intelligent equipment protocol parsing template (application program) by template (application program), the data that parse, according to the intelligent equipment protocol processing rule resolution data protocol package of the codified of correspondence, finally to store, Shang Song center or subsequent treatment by this function; Subsequent treatment refers to that fixing intelligent equipment protocol resolves other modules that the data parsed are given base station watch-dog by template (application program), carries out simple data analysis:
Such as: by phase voltage AB/A, phase voltage BC/B, phase voltage CA/C tri-parameter informations of Switching Power Supply, intelligent equipment protocol is resolved template and three Parameter analysis of electrochemicals is out given afterwards other modules (other module-comprehensive management module of base station watch-dog) if find that phase voltage AB/A is lower than 120, will produce a phase voltage AB/A low pressure warning to Surveillance center; Or find three be all less than 120 will on send a warning information had a power failure to center; Certainly these rules are configurable, are the functions of other modules (other module-comprehensive management module of base station watch-dog).
Smart machine resolves the protocol analysis coding profile that configuration file is exactly each smart machine; Comprise many configuration informations; The each parameter information of smart machine is a configuration information, comprises the absolute address of this parameter inside protocol package, takies byte number, analysis mode (floating point values or integer byte; Low byte in front or high byte front), circulation mark (whether being the mark that a circulation is resolved), normal value interval (calculate collection value normal range (NR), such as: collection value not in this interval, the alarm status of this parameter information will be set to alarm with collection value together on give center), change threshold (collection value excursion exceed this threshold value just on give center) etc. information;
Fig. 2, handling process comprises the steps:
Step 1: the protocol analysis coding profile reading corresponding smart machine, deposits in the internal memory analytic structure body of program;
Step 2: circulation issues acquisition (acquisition is also configured by the configuration file of codified, and what often kind of acquisition had oneself issues the cycle), waits return data bag to be subjected; If time-out does not also receive, just circulation issues an other acquisition and jumps to step 2; If there is data receiver to enter step 3;
Step 3: single Parameter analysis of electrochemical: the parameter information one by one according to the protocol analysis coding profile of codified is resolved one by one to the packet received, if run into is that a circulation resolves entrance (such as: have n parameter or User Defined number to be m) in agreement, enter step 4;
Step 4: enter recursion cycle analytical function; This function resolves the return data bag collected according to the resolution rules of codified; This function entrance is the initial address of the packet returned, and first according to reading the parameter information of protocol analysis coding profile, to fetch data parsings, if run into a circulation parsing entrance to enter step 4 to packet; Otherwise continue to resolve;
Step 5: according to the resolution rules of codified, determines this code parsing information at resolution rules such as the absolute address of packet and parsing length, data transformations rule, corresponding codings, parses the concrete data message of this project thus; Whether the rule judgment according to correspondence is the entrance that next circulation is resolved, if resolve entrance for circulation to jump to step 4; If last resolution data of this circulation, then preserve data, Shang Song Surveillance center or post-treatment operations, exit this circulation;
Step 6: last resolution data determining whether this protocol package, if not, enter step 4 at this, enter circulation and resolve, otherwise exit recursion cycle analytical function, enter step 2.

Claims (1)

1. an intelligent equipment protocol processing method for codified, is characterized in that, comprise the steps:
Step 1: the protocol analysis coding profile reading corresponding smart machine, deposits in the internal memory analytic structure body of program;
Step 2: circulation issues acquisition, wait-receiving mode return data bag; If time-out does not also receive, just circulation issues an other acquisition and jumps to step 2; If there is data receiver to enter step 3;
Step 3: single Parameter analysis of electrochemical: the parameter information one by one according to the protocol analysis coding profile of codified is resolved one by one to the packet received, if running into is that entrance is resolved in a circulation, enters step 4;
Step 4: enter recursion cycle analytical function; This function resolves the return data bag collected according to the resolution rules of codified; This function entrance is the initial address of the packet returned, and first according to reading the parameter information of protocol analysis coding profile, to fetch data parsings, if run into a circulation parsing entrance to enter step 4 to packet; Otherwise continue to resolve;
Step 5: according to the resolution rules of codified, determines absolute address, parsing length, data transformations rule, the corresponding code parsing rule of the resolving information after step 4 parsing at packet, parses the concrete data message of return data bag thus; Whether the rule judgment according to correspondence is the entrance that next circulation is resolved, if resolve entrance for circulation to jump to step 4; If last resolution data of this circulation, then preserve data, Shang Song Surveillance center or post-treatment operations, exit this circulation;
Step 6: last resolution data determining whether this protocol package, if not, enter step 4 at this, enter circulation and resolve, otherwise exit recursion cycle analytical function, enter step 2.
CN201110379430.5A 2011-11-24 2011-11-24 Encodable protocol processing method for intelligent equipment CN102624685B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110379430.5A CN102624685B (en) 2011-11-24 2011-11-24 Encodable protocol processing method for intelligent equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110379430.5A CN102624685B (en) 2011-11-24 2011-11-24 Encodable protocol processing method for intelligent equipment

Publications (2)

Publication Number Publication Date
CN102624685A CN102624685A (en) 2012-08-01
CN102624685B true CN102624685B (en) 2015-05-20

Family

ID=46564371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110379430.5A CN102624685B (en) 2011-11-24 2011-11-24 Encodable protocol processing method for intelligent equipment

Country Status (1)

Country Link
CN (1) CN102624685B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880168B (en) * 2012-09-21 2014-12-24 青岛海信日立空调系统有限公司 Method and device for testing line controller
CN103888443B (en) * 2014-02-20 2017-10-24 下一代互联网关键技术和评测北京市工程研究中心有限公司 The method and multi-protocol analysis system of a kind of multi-protocol analysis
CN103914540A (en) * 2014-04-03 2014-07-09 云南电力试验研究院(集团)有限公司电力研究院 Processing method for flexibly configuring ammeter specifications for ammeter reading
CN108933770A (en) * 2017-08-11 2018-12-04 杭州义益钛迪信息技术有限公司 A kind of communications office site's device protocol analytic method of any configuration mode
CN108040040A (en) * 2017-11-30 2018-05-15 北京锐安科技有限公司 A kind of automation analysis method and device of application protocol message
CN108076058A (en) * 2017-12-14 2018-05-25 北京博大光通物联科技股份有限公司 Heterogeneous network communications protocol method for amalgamation processing based on self-adapting changeable long codes
CN108169723B (en) * 2017-12-27 2020-11-17 成都锐芯盛通电子科技有限公司 Communication instruction analysis method for active phased array radar antenna beam control circuit detection
CN108933771A (en) * 2018-01-03 2018-12-04 杭州义益钛迪信息技术有限公司 A kind of communications office site's device protocol analytic method of module level upgrading mode
CN108494752B (en) * 2018-03-09 2021-03-16 万帮星星充电科技有限公司 Protocol analysis method and device
CN108804685A (en) * 2018-06-13 2018-11-13 中国建设银行股份有限公司 A kind of processing method and processing device of assets trustship monitor task
CN108954686B (en) * 2018-07-27 2020-07-03 宁波奥克斯电气股份有限公司 Air conditioner control device and method and air conditioner
CN109218417A (en) * 2018-09-04 2019-01-15 浙江中控技术股份有限公司 A kind of data capture method and device
CN109510759A (en) * 2018-10-22 2019-03-22 智强通达科技(北京)有限公司 A kind of Universal-purpose quick multi-protocol gateway realization system and method
CN109462622A (en) * 2019-01-15 2019-03-12 中电工业互联网有限公司 A kind of inter-trade protocol analysis system and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399710A (en) * 2007-09-29 2009-04-01 北京启明星辰信息技术有限公司 Detection method and system for protocol format exception
CN101820361A (en) * 2010-03-26 2010-09-01 中兴通讯股份有限公司 Method and device for managing multi-protocol communication components
CN101826997A (en) * 2010-04-16 2010-09-08 深圳市共济科技有限公司 Communication method of newly accessed intelligent equipment, device and monitoring system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7774486B2 (en) * 2003-08-11 2010-08-10 Teamon Systems, Inc. Communications system providing multi-layered extensible protocol interface and related methods

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399710A (en) * 2007-09-29 2009-04-01 北京启明星辰信息技术有限公司 Detection method and system for protocol format exception
CN101820361A (en) * 2010-03-26 2010-09-01 中兴通讯股份有限公司 Method and device for managing multi-protocol communication components
CN101826997A (en) * 2010-04-16 2010-09-08 深圳市共济科技有限公司 Communication method of newly accessed intelligent equipment, device and monitoring system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于编译技术的协议解析方法;董立等;《计算机工程》;20071115(第21期);全文 *

Also Published As

Publication number Publication date
CN102624685A (en) 2012-08-01

Similar Documents

Publication Publication Date Title
Jia et al. An efficient anti-collision protocol for RFID tag identification
CN103532776B (en) Service traffics detection method and system
AU2012253078B2 (en) Data acquisition concentrator and data acquisition method
He et al. From surveillance to digital twin: Challenges and recent advances of signal processing for industrial internet of things
CN104916048B (en) One kind is based on internet thinking, cloud platform, charge control system and method that APP pays
CN103139059B (en) Gateway is resolved in Coal Mine Electromechanical Equipment data acquisition
CN101996271B (en) Software interface for automatically generating simulation calculation model of PSCAD power system
CN103532940B (en) network security detection method and device
CN102750406B (en) Multi-version management method for model set and difference model-based power grid model
CN102902537B (en) Based on the embedded type WEB MVC Development Framework of FastCGI and html template
CN101841515B (en) Target variable protocol data unit codec code automatic generation implementation method
CN101399710B (en) Detection method and system for protocol format exception
CN102736565B (en) Communication method of automatic control equipment based on upper and lower computer structures
CN103488147A (en) Platform and system of Internet of things
CN102662993A (en) A method for providing page data
CN103873498A (en) Cloud platform resource self-adaptive early warning method and system
CN101035099A (en) General gateway design method for realizing the IEC61850 standard
CN1304909C (en) Monitoring instrument of vehicle control system CAN/LIN network and its test method
CN103020176B (en) Data block dividing method in XML parsing and XML parsing method
CN101329665A (en) Method for analyzing marking language document and analyzer
CN102750350B (en) Monitoring system and method
CN101893662B (en) Nuclear phase method for digital transformer substation
CN103838875A (en) Information collecting system based on two-dimensional bar code and method of information collecting system
CN101694952A (en) Method for generating embedded telecontrol system definitions by IEC61850 SCD files
CN103424733B (en) The modification method that a kind of digital quantity input energy information sampled data is lost

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: GUANGDONG GOSUN TELECOMMUNICATIONS CO., LTD. TO: GOSUNCN TECHNOLOGY GROUPCO., LTD.

C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 510530 Luogang District Science City, Guangdong Province Road, No. 2819, No.

Applicant after: GOSUNCN TECHNOLOGY GROUP CO., LTD.

Address before: 510530 Luogang District Science City, Guangdong Province Road, No. 2819, No.

Applicant before: Guangdong Gosun Telecommunications Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant