CN102624685B - Encodable protocol processing method for intelligent equipment - Google Patents
Encodable protocol processing method for intelligent equipment Download PDFInfo
- 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
- entrance
- 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.)
- Active
Links
Landscapes
- Communication Control (AREA)
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
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.
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 Active 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 (18)
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 |
CN108804685B (en) * | 2018-06-13 | 2021-06-15 | 中国建设银行股份有限公司 | Asset hosting and monitoring task processing method and device |
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 |
CN109347203A (en) * | 2018-09-27 | 2019-02-15 | 西安西拓电气股份有限公司 | A kind of power equipment intelligence operational system |
CN109510759B (en) * | 2018-10-22 | 2021-08-06 | 智强通达科技(北京)有限公司 | System and method for realizing rapid universal multi-protocol gateway |
CN109462622B (en) * | 2019-01-15 | 2021-05-28 | 中电工业互联网有限公司 | Cross-industry protocol analysis system and method |
CN111813622B (en) * | 2020-06-28 | 2022-09-09 | 厦门科灿信息技术有限公司 | Equipment monitoring method and device |
CN114327237A (en) * | 2021-12-15 | 2022-04-12 | 中国地质大学(武汉) | Method, device and equipment for decoding real-time data by using upper computer |
CN117636521B (en) * | 2024-01-25 | 2024-04-05 | 苏州琨山通用锁具有限公司 | AI-based intelligent lockset and data center interaction method and intelligent lockset production method |
Citations (3)
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)
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 |
-
2011
- 2011-11-24 CN CN201110379430.5A patent/CN102624685B/en active Active
Patent Citations (3)
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)
Title |
---|
基于编译技术的协议解析方法;董立等;《计算机工程》;20071115(第21期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN102624685A (en) | 2012-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102624685B (en) | Encodable protocol processing method for intelligent equipment | |
CN102722971B (en) | Intelligent data acquisition device with solidified protocol | |
CN101262682A (en) | A configuration management for monitoring batch management of base station devices | |
CN111585344B (en) | Substation intelligent checking method and device based on total station IED simulation | |
CN103197948A (en) | Communication protocol script analyzing method of electricity intelligent equipment | |
CN104281520A (en) | Tracking and debugging method, device and system | |
CN104572975A (en) | Real-time data processing and analyzing system | |
CN107315774B (en) | Mobile internet-based marketing, distribution and dispatching integrated data general survey system and general survey method | |
CN101408924B (en) | Radio frequency identification label chip data receiving synchronous method | |
CN105718359A (en) | energy consumption information processing device, system and terminal | |
CN103780624A (en) | General application layer network communication protocol application method for complicated system | |
CN101441629A (en) | Automatic acquiring method of non-structured web page information | |
CN107832247A (en) | The data concentrator of adaptive communications | |
CN104104560A (en) | Monitoring method and device for application flow and mobile terminal | |
CN103777934A (en) | Method and system for generating controller CAN interaction layer based on MATLAB | |
CN103151840A (en) | Communication method and device of IEC (international electrotechnical commission) 61850 system and non-IEC 61850 system | |
CN103914501A (en) | Power industry real-time reporting method based on massive real-time database | |
CN102063470B (en) | Node real-time data analyzing method suitable for wireless sensor network | |
CN115271407A (en) | Industrial Internet data processing method and system based on artificial intelligence | |
CN104978695A (en) | Electricity charge data processing method and apparatus | |
CN102289445A (en) | Method and device for analyzing XML (Extensible Markup Language) file and terminal | |
US20230070173A1 (en) | Cloud-end collaborative system and method for load identification | |
CN102737207B (en) | Communication method based on radio frequency identification system, apparatus and system thereof | |
CN104346474B (en) | A kind of fast resolving method of intelligent substation SCD file | |
CN203883089U (en) | Lead accumulator with intelligent chip |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
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. |
|
COR | Change of bibliographic data |
Free format text: CORRECT: APPLICANT; FROM: GUANGDONG GOSUN TELECOMMUNICATIONS CO., LTD. TO: GOSUNCN TECHNOLOGY GROUPCO., LTD. |
|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |