CN104866404B - A kind of general data monitoring method - Google Patents

A kind of general data monitoring method Download PDF

Info

Publication number
CN104866404B
CN104866404B CN201510257449.0A CN201510257449A CN104866404B CN 104866404 B CN104866404 B CN 104866404B CN 201510257449 A CN201510257449 A CN 201510257449A CN 104866404 B CN104866404 B CN 104866404B
Authority
CN
China
Prior art keywords
data
storage
layer
configuration file
display
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
Application number
CN201510257449.0A
Other languages
Chinese (zh)
Other versions
CN104866404A (en
Inventor
涂俊峰
徐希悦
汤亮
张聪
管乐鑫
贾永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Control Engineering
Original Assignee
Beijing Institute of Control Engineering
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 Beijing Institute of Control Engineering filed Critical Beijing Institute of Control Engineering
Priority to CN201510257449.0A priority Critical patent/CN104866404B/en
Publication of CN104866404A publication Critical patent/CN104866404A/en
Application granted granted Critical
Publication of CN104866404B publication Critical patent/CN104866404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a kind of general data monitoring method, this method realizes that external data is received, decodes, stores and shown by the generic processing system of four-layer structure;Object is created according to configuration file content and object properties are set first against in the configuration file of specific data system generation XML format, every layer of generic processing system, passes sequentially through object implementatio8 data receiver, decoding, storage and the display of each layer.The present invention describes the data monitoring task of specific environment using the configuration file of XML format, every layer of object can accurately be created according to the content of the configuration file and object properties are set, wherein, object corresponds to XML tag, and the attribute of object corresponds to the attribute of XML tag, therefore, object implementatio8 is easier to using the configuration file of this form.When display task changes, it is only necessary to configuration file is changed, without recompiling, it is easy to accomplish, extension, there is very strong applicability.

Description

A kind of general data monitoring method
Technical field
The present invention relates in kind, semi-true object emulation technology field, more particularly to a kind of general data monitoring method.
Background technology
In in kind, semi-matter simulating system, it usually needs data of the monitoring from distinct device in real time, various equipment Communication modes, data structure, generally can not be for the data surveillance software of particular system customized development there is very big difference It is multiplexed in other system, causes software cost too high.When data protocol changes, customization software needs to change therewith, generation Code needs to change, retested, and again increases software cost, and code is difficult to safeguard.
The content of the invention
The purpose of the present invention with overcome the deficiencies in the prior art, there is provided a kind of general data monitoring method, the party Method realizes that external data is received, decodes, stores and shown by the generic processing system of four-layer structure;First against in specific Data system, generates the configuration file of XML format, and every layer of generic processing system creates object according to configuration file content and set Object properties are put, pass sequentially through object implementatio8 data receiver, decoding, storage and the display of each layer, this is with using universal architecture Method is easily achieved, applied widely.
The above-mentioned purpose of the present invention is realized by following technical scheme:
A kind of general data monitoring method based on generic processing system realize, the system include Communication Layer, decoding layer, Expression layer and display layer;It is as follows to implement step:
(1), shown according to the data of setting and require generation configuration file, wherein, set data in the configuration file Communication protocol type and content, data type or decoder DLL addresses, data storage method, Stored Data Type, data are shown Mode and display content;
(2) generic processing system, and the configuration file of load step (1) generation, are run, the system is according to configuration Receiver object, decoder object, storage object is respectively created in Communication Layer, decoding layer, expression layer and display layer in file content With display object, data receiver, decoding, storage and display processing are realized, it is as follows to implement step:
(2a), in Communication Layer, receiver object is created according to the data communication protocol type set in configuration file, and According to the attribute of the communication protocol curriculum offering receiver object set in configuration file, then connect in Communication Layer by described Device object is received to receive external data and form byte stream;
(2b), in decoding layer, if setting data type in configuration file, general decoding object is created, and press The attribute of general decoding object is set according to the data type, then obtained step (2a) by the general decoding object Byte stream is variable according to data type recovery;If decoder DLL addresses are set in configuration file, according to the address Defined decoder is called, the byte stream that step (2a) obtains is reverted to by variable by the decoder;
(2c), in expression layer, storage object is created according to the data storage method set in configuration file, and according to setting Storage class the attribute of the storage object is set, then the variable recovered in step (2b) is deposited by the storage object It is placed in internal memory or file;
(2d), in display layer, according to the data display mode set in configuration file, create and show object, and according to setting Fixed display content sets the attribute of the display object, and variable is then read from internal memory by the display object and is shown Show.
Above-mentioned general data monitoring method, in step (1), data communication protocol type includes udp protocol, TCP Agreement and serial port protocol;In step (2a), it is respectively according to the receiver object that three kinds of described communication protocol types create UDP receivers object, TCP receivers object and serial ports receiver object.
Above-mentioned general data monitoring method, in step (1), data storage method includes memory storage and file is deposited Storage, Stored Data Type include the storage of binary system source code, text storage, structure storage, data sequence storage;Wherein, if Data storage method is set as memory storage, then step (2c) creates memory storage object in expression layer, then according to data Storage class sets memory object attribute, and by memory storage object by the variable save recovered in step (2b) in internal memory In;If setting data storage method to store as file, step (2c) establishment file storage object in expression layer, and pass through File storage object by the variable save recovered in step (2b) hereof.
Above-mentioned general data monitoring method, in step (1), data display mode is shown including form, curve shows Show, text is shown and binary system source code is shown, according to four kinds of display modes, the display pair that step (2d) creates in display layer As being respectively grid control object, Curve Controls object, text control object and binary system source code control object.
Above-mentioned general data monitoring method, in step (1), configuration file is based on XML format.
The present invention compared with prior art, has advantages below:
(1), data monitoring method of the invention can be realized in a general software frame, be set in the framework Communication Layer, decoding layer, expression layer and display layer, the present invention create object according to configuration file content at every layer and set object Attribute, data ultimately form common variable and carried out on display interface by successively object handles, successive elimination data difference It has been shown that, is realized simple and versatile;
(2), four layers of universal architecture of the invention, each layer are only next layer of offer service, and layer coupling is small, and interface is easy In maintenance, and different types of object is created in each layer, every kind of object only handles specific data, and function is well defined;
(3), the present invention describes the data monitoring task of specific environment using the configuration file of XML format, according to the configuration The content of file can accurately create every layer of object and set object properties, wherein, object corresponds to XML tag, and object Attribute correspond to XML tag attribute, therefore, object implementatio8 is easier to using the configuration file of this form;
(4), specific data are shown that task is described with configuration file completely by the present invention, therefore in display task hair During changing, it is only necessary to configuration file is changed, without recompiling, it is easy to accomplish, extension, there is very strong applicability.
Brief description of the drawings
Fig. 1 be the general data monitoring method of the present invention based on system framework schematic diagram;
Fig. 2 is the handling process of the general data monitoring method of the present invention.
Embodiment
The present invention is described in further detail with specific embodiment below in conjunction with the accompanying drawings:
The invention provides a kind of general data monitoring method, is monitored available for the data to distinct device.Should Method based on a kind of generic processing system realize, system framework schematic diagram as shown in Figure 1, the generic processing system Communication Layer, Decoding layer, expression layer and display layer, wherein, data are from Communication Layer to display laminar flow, in each layer after respective handling, by Step eliminates the difference of data, finally gives general variable, and be shown on display interface.
Method flow diagram as shown in Figure 2, conventional data of the invention monitoring method the step of it is as follows:
(1) configuration file for requiring generation XML format, is shown according to the data of setting, wherein, in the configuration file Set data communication protocol type and content, data type or decoder DLL addresses, data storage method, Stored Data Type, Data display mode and display content.The XML format that the present invention uses is highly suitable for description object, wherein, object is corresponding In XML tag, and the attribute of object corresponds to the attribute of XML tag.
(2) generic processing system, and the configuration file of load step (1) generation, are run, the system is according to configuration Receiver object, decoder object, storage object is respectively created in Communication Layer, decoding layer, expression layer and display layer in file content With display object, data receiver, decoding, storage and display processing are realized, it is as follows to implement step:
(2a), in Communication Layer, receiver object is created according to the data communication protocol type set in configuration file, and According to the attribute of the communication protocol curriculum offering receiver object set in configuration file, then connect in Communication Layer by described Device object is received to receive external data and form byte stream.
Wherein, the data communication protocol type typically used includes udp protocol, Transmission Control Protocol and serial port protocol;In Communication Layer In can create UDP receivers objects, TCP receivers object and serial ports receiver object according to these three communication protocol types. The attribute of the receiver object can be configured according to communication protocol content, for example, UDP receivers object needs the category set Property include receiving address, port etc..
(2b), in decoding layer, if setting data type in configuration file, general decoding object is created, and press The attribute of general decoding object is set according to the data type, then obtained step (2a) by the general decoding object Byte stream is variable according to data type recovery;If decoder DLL addresses are set in configuration file, according to the address Defined decoder is called, the byte stream that step (2a) obtains is reverted to by variable by the decoder.
Wherein, the function of decoding layer is that byte stream is decoded, and all kinds such as shaping, floating-point are distinguished from byte stream Variable, carry out the work such as height syllable sequence conversion.Decoder object can be divided into two classes:Universal decoder and self-defined decoding Device.Wherein, self-defined decoder is for complicated data format, and such as specific coding, compressed data form, self-defined decoder leads to The independently developed DLL of user is crossed to realize.
(2c), in expression layer, storage object is created according to the data storage method set in configuration file, and according to setting Storage class the attribute of the storage object is set, then the variable recovered in step (2b) is deposited by the storage object It is placed in internal memory or file.
Wherein, data storage method includes memory storage and file stores, and Stored Data Type is deposited including binary system source code Storage, text storage, structure storage, data sequence storage.If setting data storage method as memory storage, step (2c) Memory storage object is created in expression layer, memory object attribute then is set according to Stored Data Type, and deposit by internal memory Storage object is by the variable save recovered in step (2b) in internal memory.If setting data storage method to store as file, walk Suddenly (2c) the establishment file storage object in expression layer, and the variable save that will be recovered by file storage object in step (2b) Hereof.In file storage is carried out, if setting storage address in configuration file, file is stored in the address, If file is stored in default address without setting file address in configuration file.
(2d), in display layer, according to the data display mode set in configuration file, create and show object, and according to setting Fixed display content sets the attribute of the display object, and variable is then read from internal memory by the display object and is shown Show.
Wherein, data display mode is shown including form, curve is shown, text is shown and binary system source code is shown, according to Four kinds of display modes, step (2d) are respectively grid control object, Curve Controls pair in the display object that display layer creates As, text control object and binary system source code control object.
Specific data are shown that task is described with configuration file completely by the present invention, therefore are become in display task During change, it is only necessary to configuration file is changed, without recompiling, it is easy to accomplish, extension, there is very strong applicability.
It is described above, it is only an embodiment of the invention, but protection scope of the present invention is not limited thereto, and is appointed What those familiar with the art the invention discloses technical scope in, the change or replacement that can readily occur in, all It should be included within the scope of the present invention.
The content not being described in detail in description of the invention belongs to the known technology of professional and technical personnel in the field.

Claims (5)

  1. A kind of 1. general data monitoring method, it is characterised in that:Realized based on generic processing system, the system includes communication Layer, decoding layer, expression layer and display layer, specific implementation step are as follows:
    (1), shown according to the data of setting and require generation configuration file, wherein, data communication is set in the configuration file Protocol type and content, data type or decoder DLL addresses, data storage method, Stored Data Type, data display mode And display content;
    (2) generic processing system, and the configuration file of load step (1) generation, are run, the system is according to configuration file Content is respectively created receiver object, decoder object, storage object in Communication Layer, decoding layer, expression layer and display layer and shown Show object, realize data receiver, decoding, storage and display processing, it is as follows to implement step:
    (2a), in Communication Layer, according to the data communication protocol type establishment receiver object set in configuration file, and according to The attribute of the communication protocol curriculum offering receiver object set in configuration file, then passes through the receiver in Communication Layer Object receives external data and forms byte stream;
    (2b), in decoding layer, if setting data type in configuration file, general decoding object is created, and according to institute State the attribute that data type sets general decoding object, the byte for then step (2a) being obtained by the general decoding object Stream is variable according to data type recovery;If decoder DLL addresses are set in configuration file, according to the call by location Defined decoder, the byte stream that step (2a) obtains is reverted to by variable by the decoder;
    (2c), in expression layer, storage object, and depositing according to setting are created according to the data storage method set in configuration file The attribute that type sets the storage object is stored up, is then stored in the variable recovered in step (2b) by the storage object In internal memory or file;
    (2d), in display layer, according to the data display mode set in configuration file, create and show object, and according to setting Display content sets the attribute of the display object, and variable is then read from internal memory by the display object and is shown.
  2. A kind of 2. general data monitoring method according to claim 1, it is characterised in that:In step (1), data are led to Letter protocol type includes udp protocol, Transmission Control Protocol and serial port protocol;In step (2a), according to three kinds of described communication protocol classes The receiver object that type creates is respectively UDP receivers object, TCP receivers object and serial ports receiver object.
  3. A kind of 3. general data monitoring method according to claim 1, it is characterised in that:In step (1), data are deposited Storage mode includes memory storage and file stores, and Stored Data Type includes the storage of binary system source code, text stores, structure is deposited Storage, data sequence storage;Wherein, if setting data storage method as memory storage, step (2c) creates in expression layer Memory storage object, memory object attribute then is set according to Stored Data Type, and by memory storage object by step The variable save recovered in (2b) is in internal memory;If setting data storage method to store as file, step (2c) is representing Establishment file storage object in layer, and by file storage object by the variable save recovered in step (2b) hereof.
  4. A kind of 4. general data monitoring method according to claim 1, it is characterised in that:In step (1), data show Show that mode is shown including form, curve is shown, text is shown and binary system source code is shown, according to four kinds of display modes, step Suddenly (2d) is respectively grid control object, Curve Controls object, text control object and two in the display object that display layer creates System source code control object.
  5. A kind of 5. general data monitoring method according to claim 1, it is characterised in that:In step (1), configuration text Part is based on XML format.
CN201510257449.0A 2015-05-19 2015-05-19 A kind of general data monitoring method Active CN104866404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510257449.0A CN104866404B (en) 2015-05-19 2015-05-19 A kind of general data monitoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510257449.0A CN104866404B (en) 2015-05-19 2015-05-19 A kind of general data monitoring method

Publications (2)

Publication Number Publication Date
CN104866404A CN104866404A (en) 2015-08-26
CN104866404B true CN104866404B (en) 2017-12-22

Family

ID=53912250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510257449.0A Active CN104866404B (en) 2015-05-19 2015-05-19 A kind of general data monitoring method

Country Status (1)

Country Link
CN (1) CN104866404B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377655A (en) * 2019-06-10 2019-10-25 厦门科灿信息技术有限公司 The method and terminal device that front equipment end data are shown
CN111464565B (en) * 2020-05-13 2021-09-28 中国科学院自动化研究所 Intelligent decoding method and decoder following general information exchange protocol specification
CN112287177B (en) * 2020-11-25 2021-07-13 城云科技(中国)有限公司 Method and device for creating, changing, displaying and inquiring object label

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202353704U (en) * 2011-12-08 2012-07-25 人民网股份有限公司 Wireless network video system
CN104123364A (en) * 2014-07-21 2014-10-29 上海迈循信息科技有限公司 Method and device for transmitting and receiving data through mobile terminal
CN104281678A (en) * 2014-09-29 2015-01-14 航天东方红卫星有限公司 Intelligent moonlet state monitoring system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050198006A1 (en) * 2004-02-24 2005-09-08 Dna13 Inc. System and method for real-time media searching and alerting
KR101364831B1 (en) * 2010-11-08 2014-02-20 한국전자통신연구원 Apparatus of monitoring status satellite repeater by using statistical analysis of telemetry data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202353704U (en) * 2011-12-08 2012-07-25 人民网股份有限公司 Wireless network video system
CN104123364A (en) * 2014-07-21 2014-10-29 上海迈循信息科技有限公司 Method and device for transmitting and receiving data through mobile terminal
CN104281678A (en) * 2014-09-29 2015-01-14 航天东方红卫星有限公司 Intelligent moonlet state monitoring system

Also Published As

Publication number Publication date
CN104866404A (en) 2015-08-26

Similar Documents

Publication Publication Date Title
CN104866404B (en) A kind of general data monitoring method
CN102185901B (en) Client message conversion method
CN106254437B (en) Internet of Things communication means
CN107135276A (en) A kind of full link monitoring methods, devices and systems under micro services framework
CN103838375B (en) Terminal input method and terminal
CN107666483A (en) A kind of conversion equipment for the multi-protocols for supporting multiple interfaces
CN104954501A (en) Cross-domain information interactive method, device thereof and system thereof
CN108769165A (en) Data processing method, Internet of Things access system in a kind of Internet of Things
CN103763325B (en) Method for building IP security product development environment
CN104066203A (en) Method and system for generating identifier of mobile device, method for remotely controlling mobile device, and communication terminal
CN103036980B (en) Data transmission set and method for remote service
CN103731344B (en) 6LOWPAN things-internet gateway based on linux application layer and implementation method
CN107621987A (en) A kind of message based unmanned plane common ground station software architecture
CN107870752A (en) Wall method, terminal, video wall and system on terminal window
CN106488269A (en) System and method to television equipment control is realized based on third-party application platform
CN106446267A (en) Platform and method of application of visualization of human resources information based on big data.
CN106708505A (en) WEB page-based batch operation interface application method and system
CN105515965B (en) A kind of method and transmission device for transmitting data
CN104267609B (en) A kind of method of simulation hardware control amount access transport
CN111143631A (en) Data processing method and device, storage medium and electronic equipment
CN103067449B (en) Data transmission set in remote service and method
CN103019641B (en) Remote control process transmits the Apparatus and method for of data
CN106412138A (en) Tag-free precise pushing method and equipment
Iglesias et al. Enabling powerful GUIs in ISOBUS networks by transparent data compression
Nykolaychuk et al. Perspective Components of Cyber-Physical Systems implementing Conversion, Coding Data Exchange, and User Communication Processes

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
EXSB Decision made by sipo to initiate substantive examination
GR01 Patent grant
GR01 Patent grant