CN103164359A - Method and device of pipeline communication - Google Patents

Method and device of pipeline communication Download PDF

Info

Publication number
CN103164359A
CN103164359A CN2013100346166A CN201310034616A CN103164359A CN 103164359 A CN103164359 A CN 103164359A CN 2013100346166 A CN2013100346166 A CN 2013100346166A CN 201310034616 A CN201310034616 A CN 201310034616A CN 103164359 A CN103164359 A CN 103164359A
Authority
CN
China
Prior art keywords
data
space
unit
storage
storing
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.)
Granted
Application number
CN2013100346166A
Other languages
Chinese (zh)
Other versions
CN103164359B (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 SDL Technology Co Ltd
Original Assignee
Beijing SDL Technology Co Ltd
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 SDL Technology Co Ltd filed Critical Beijing SDL Technology Co Ltd
Priority to CN201310034616.6A priority Critical patent/CN103164359B/en
Publication of CN103164359A publication Critical patent/CN103164359A/en
Application granted granted Critical
Publication of CN103164359B publication Critical patent/CN103164359B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Communication Control (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device of pipeline communication. The method comprise steps of building data-storing space used for storing data, endowing the data stored in the data-storing space with corresponding characteristic parameters and reading the corresponding data from the data-storing space according to the characteristic parameters, by connecting a public space with an input pipe and an output pipe, data size in the output pipe and the input pipe is stored and managed in a unified mode. The output pipe of a course located in any system can read the needed data size from the public space, and therefore scale and complexity of a pipeline communication system can be lowered greatly and reliability of the system can be improved.

Description

A kind of pipeline communication method and apparatus
Technical field
The present invention relates to the pipeline communication field, particularly relate to a kind of pipeline communication method and apparatus.
Background technology
The data acquisition transmission instrument mainly refer to for gather, the data of storage all kinds measuring instrument and have industrial computer, embedded computer or Programmable Logic Controller etc. to the host computer transmit data functionality.
Existing data acquisition transmission instrument uses linux system more, during data in processing, being connected collection, calculating and each module of access, communication mode commonly used between process is mainly the pipeline communication mode of Linux, described pipeline communication mode refers to a kind of semiduplex communication mode between two interior processes of linux system, and data can only uniflux.During concrete the use, when the data type of data source is different, when application scenarios is not equal, all need to pre-set targetedly corresponding processing pipeline.Although this communication mode is simple and clear, but, along with the development of science and technology, the input mode of data volume is more and more, and the data type of data source is also varied, so, cause thus whole pipeline communication system to become increasingly complex, reliability reduces, and especially in the time need to realizing the calculating between input variable or have input variable to calculate the acquisition output variable, the control of pipeline enclosure interleaving access and sequential makes whole pipeline communication system become too complicated, is difficult to safeguard.
Summary of the invention
The embodiment of the present invention provides a kind of pipeline communication method and apparatus, the system complex that has solved and used that the pipeline communication mode gathers, produced during the data in calculating and access each module, the technical matters that reliability is low.
The embodiment of the invention discloses following technical scheme:
A kind of pipeline communication method comprises step:
Set up data space;
Store data in data space;
Give and be stored in data characteristic of correspondence parameter in data space;
Read corresponding data from data space according to characteristic parameter.
Preferably, described characteristic parameter is specially the address information of data and/or the name information of data.
Preferably, before the storage data, also comprise in data space:
According to default rule, described data are carried out pre-service, described pre-service is specially format conversion corresponding to described data to be carried out and/or uses corresponding computing formula to carry out computing to described data;
Accordingly, the data after the storage format transformation and/or the data after computing in data space.
Preferably, the described data of storing in data space comprise:
Store according to the classification of type of data.
Preferably, the described data of storing in data space comprise:
Whether can write classification according to data stores.
Preferably, the described data of storing in data space comprise:
The data type of save data, data cell, data length, data name, data value, data default value, measurement type and show label.
Preferably, also comprise:
Use configuration file to put down in writing and upgrade the corresponding data implication of the data that are kept at storage space, data length, data initial value, data type, data unit, data name and computing formula.
A kind of pipeline communication device comprises:
Set up the storage space unit, be used for setting up data space;
Storage unit is used for storing data at data space;
The characteristic parameter unit is used for giving being stored in data space data characteristic of correspondence parameter;
Reading unit is used for reading corresponding data according to characteristic parameter from data space.
Preferably, also comprise:
Pretreatment unit is used for according to default rule, described data being carried out pre-service, and described pre-service is specially format conversion corresponding to described data to be carried out and/or use corresponding computing formula to carry out computing to described data;
Accordingly, storage unit is also for the data after data space storage format transformation and/or the data after computing.
Preferably, also comprise:
The configuration file unit be used for to use configuration file to put down in writing and upgrades the corresponding data implication of the data that are kept at storage space, data length, data initial value, data type, data unit, data name and computing formula.
As can be seen from the above-described embodiment, the present invention is by using a public space to be connected with input, output channel, unified management is also stored the data volume that input channel is inputted, the output channel of any intrasystem process can read required data volume from this public space, thereby greatly reduce pipeline communication system scale and complexity, improved the reliability of system.
Description of drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or description of the Prior Art, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram of a kind of pipeline communication method of the present invention;
Fig. 2 is system construction drawing of the present invention;
Fig. 3 is that system module of the present invention calls signaling diagram;
Fig. 4 is another method flow diagram of a kind of pipeline communication method of the present invention;
Fig. 5 is a structure drawing of device of a kind of pipeline communication device of the present invention.
Embodiment
The embodiment of the present invention provides a kind of pipeline communication method and apparatus.The data unification that gathers is stored in the data space of setting up in advance, and needs is carried out pretreated data carry out corresponding format conversion and/or calculate by computing formula, and provide unified interface for each output unit.
By using a public space to be connected with input, output channel, unified management is also stored the data volume that input channel is inputted, the output channel of any intrasystem process can read required data volume from this public space, thereby greatly reduce pipeline communication system scale and complexity, improved the reliability of system.
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, below in conjunction with accompanying drawing, the embodiment of the present invention is described in detail.
Embodiment one
See also Fig. 1, it comprises the following steps for the method flow diagram of a kind of pipeline communication method of the present invention, the method:
S101: set up data space;
Here need to prove, the certain storage space of disposable distribution is used for setting up data space in internal memory, certainly, do not limit is in internal memory, described data space also can be based upon in external memory unit or in the storage unit of other types, the present invention does not limit this.
Preferably, before the storage data, also comprise in data space:
According to default rule, described data are carried out pre-service, described pre-service is specially format conversion corresponding to described data to be carried out and/or uses corresponding computing formula to carry out computing to described data;
Accordingly, the data after the storage format transformation and/or the data after computing in data space.
Here see also Fig. 2, it is system construction drawing of the present invention.Need to prove, the data of obtaining by outside harvester or outside load module, some has specific communications protocol, need to convert specific data layout to just can export or could be identified by data outputting module, and some data that gathered can not be directly used in data output, and the data of these types need to be together with other data or parameters or be independent, the computing formula corresponding according to it calculated, and the data that calculate are only effective output data.According to the above situation that these may occur, job requirement that just need to be current according to the data acquisition transmission instrument, preset the rule between the data of collection and output data that hope obtains, determine which data can directly export, which data need to be carried out the conversion of form, after which data need to further be calculated, the result of calculating is exported, and these pretreated data are stored in the data space of foundation.
S102: store data in data space;
Preferably, store according to the classification of type of data.
Preferably, whether can write classification according to data stores.
For step S102, can lift a preferred embodiment according to actual scene here and be described in detail:
Will be stored into the data based data type in data storing space and data and whether can write and classify, be divided into respectively the readable analog data of writing, the readable analog data that can not write, the readable switching value data of writing and the readable switching value data that can not write.
According to above-mentioned mode classification, the data space of setting up is divided into four zones, be respectively holding register zone, input register zone, input status register is regional and coil state register area, switching value, analog quantity, input quantity and the output quantity of corresponding types accepted in these four zones as required separately:
The holding register zone is used for storing 8bit, 16bit, 32bit and/or 64bit type simulation amount data, and access program is read-write should the zone;
The input register zone is used for storing 8bit, 16bit, 32bit and/or 64bit type simulation amount data, and access program is readable can not write this zone;
Coil state register area is used for storing the switching value data of 1bit type, and access program is read-write should the zone;
The input status register zone is used for storing the switching value data of 1bit type, and access program is readable can not write this zone.
Preferably, the data type of save data, data cell, data length, data name, data value, data default value, measurement type and show label.
Need to illustrate, the data of the same type of preserving of regional, except these above-mentioned characteristic quantities, size to storage also has certain regulation, such as, the memory headroom of general same use 4 byte-sized in input register zone comes store data, and the storage size of other each data of zone is decided according to the regulation in this zone.Certainly, the present invention does not limit the size of the storage space of each data of regional.
Also need to illustrate the process of data storage, still be illustrated, see also Fig. 3, it calls signaling diagram for system module of the present invention, when the storage analog data, holding register zone and input register zone are all that the storage space with 4 bytes stores analog data, and when the analog data that transmission gathers, generally adopt the bandwidth of 2 bytes, so an analog quantity variable need to transmit 2 times, this first transmits high 2 byte datas with regard to having related to, still the problem of 2 byte datas is hanged down in first transmission.Because also do not produce on this problem a unified standard at present, for compatible this equipment of two types, when storage data, can select high/low position conversion processor to adapt to different situations.
S103: give and be stored in data characteristic of correspondence parameter in data space;
Preferably, described characteristic parameter is specially the address information of data and/or the name information of data.
Can find out, the data in the zone of each storage data are endowed address information and name information, and system's output module can be by the address information of data and/or the name information visit data of data.
S104: read corresponding data according to characteristic parameter from data space.
Data space provides unified output interface, carries out the access of data for other output modules in Modbus agreement and system.
Embodiment two
See also Fig. 4, it is for another method flow diagram of a kind of pipeline communication method of the present invention.
S401: use configuration file to put down in writing and upgrade the corresponding data implication of the data that are kept at storage space, data length, data initial value, data type, data unit, data name and computing formula.
Here need to prove, described configuration file similarly is more a kind of description to the data space set up, put down in writing each on described configuration file and be stored in data characteristic of correspondence amount in data space, and can be according to this table of the working condition of each data acquisition transmission instrument, at any time this configuration file is upgraded accordingly, this function that can customize has improved the adaptability of whole data storage, calling system greatly.
As can be seen from the above-described embodiment, the present invention is by using a public space to be connected with input, output channel, unified management is also stored the data volume that input channel is inputted, the output channel of any intrasystem process can read required data volume from this public space, thereby greatly reduce pipeline communication system scale and complexity, improved the reliability of system.
Embodiment three
See also Fig. 5, it is for a structure drawing of device of a kind of pipeline communication device of the present invention, comprising:
Set up storage space unit 501, be used for setting up data space;
Preferably, also comprise:
Pretreatment unit 502 is used for according to default rule, described data being carried out pre-service, and described pre-service is specially format conversion corresponding to described data to be carried out and/or use corresponding computing formula to carry out computing to described data;
Accordingly, storage unit 503 is also for the data after data space storage format transformation and/or the data after computing.
Storage unit 503 is used for storing data at data space;
Characteristic parameter unit 504 is used for giving being stored in data space data characteristic of correspondence parameter;
Reading unit 505 is used for reading corresponding data according to characteristic parameter from data space.
Preferably, also comprise:
The configuration file unit be used for to use configuration file to put down in writing and upgrades the corresponding data implication of the data that are kept at storage space, data length, data initial value, data type, data unit, data name and computing formula.
As can be seen from the above-described embodiment, the present invention is by using a public space to be connected with input, output channel, unified management is also stored the data volume that input channel is inputted, the output channel of any intrasystem process can read required data volume from this public space, thereby greatly reduce pipeline communication system scale and complexity, improved the reliability of system.
Need to prove, one of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, to come the relevant hardware of instruction to complete by computer program, described program can be stored in a computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above a kind of pipeline communication method and apparatus provided by the present invention is described in detail, used specific embodiment herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. a pipeline communication method, is characterized in that, comprises step:
Set up data space;
Store data in data space;
Give and be stored in data characteristic of correspondence parameter in data space;
Read corresponding data from data space according to characteristic parameter.
2. method according to claim 1, is characterized in that, described characteristic parameter is specially the address information of data and/or the name information of data.
3. method according to claim 1, is characterized in that, before the storage data, also comprises in data space:
According to default rule, described data are carried out pre-service, described pre-service is specially format conversion corresponding to described data to be carried out and/or uses corresponding computing formula to carry out computing to described data;
Accordingly, the data after the storage format transformation and/or the data after computing in data space.
4. method according to claim 1, is characterized in that, the described data of storing in data space comprise:
Store according to the classification of type of data.
5. method according to claim 1, is characterized in that, the described data of storing in data space comprise:
Whether can write classification according to data stores.
6. method according to claim 1, is characterized in that, the described data of storing in data space comprise:
The data type of save data, data cell, data length, data name, data value, data default value, measurement type and show label.
7. method according to claim 1, is characterized in that, also comprises:
Use configuration file to put down in writing and upgrade the corresponding data implication of the data that are kept at storage space, data length, data initial value, data type, data unit, data name and computing formula.
8. a pipeline communication device, is characterized in that, comprising:
Set up the storage space unit, be used for setting up data space;
Storage unit is used for storing data at data space;
The characteristic parameter unit is used for giving being stored in data space data characteristic of correspondence parameter;
Reading unit is used for reading corresponding data according to characteristic parameter from data space.
9. device according to claim 8, is characterized in that, also comprises:
Pretreatment unit is used for according to default rule, described data being carried out pre-service, and described pre-service is specially format conversion corresponding to described data to be carried out and/or use corresponding computing formula to carry out computing to described data;
Accordingly, storage unit is also for the data after data space storage format transformation and/or the data after computing.
10. device according to claim 8, is characterized in that, also comprises:
The configuration file unit be used for to use configuration file to put down in writing and upgrades the corresponding data implication of the data that are kept at storage space, data length, data initial value, data type, data unit, data name and computing formula.
CN201310034616.6A 2013-01-29 2013-01-29 A kind of pipeline communication method and apparatus Active CN103164359B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310034616.6A CN103164359B (en) 2013-01-29 2013-01-29 A kind of pipeline communication method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310034616.6A CN103164359B (en) 2013-01-29 2013-01-29 A kind of pipeline communication method and apparatus

Publications (2)

Publication Number Publication Date
CN103164359A true CN103164359A (en) 2013-06-19
CN103164359B CN103164359B (en) 2017-04-05

Family

ID=48587458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310034616.6A Active CN103164359B (en) 2013-01-29 2013-01-29 A kind of pipeline communication method and apparatus

Country Status (1)

Country Link
CN (1) CN103164359B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1289962A (en) * 1999-09-23 2001-04-04 国际商业机器公司 Establishment of multiple process spanned communication programme in multiple linear equation running environment
US20030115245A1 (en) * 2001-12-17 2003-06-19 Kunimasa Fujisawa Multi-application execution system and method thereof
CN1859327A (en) * 2006-02-09 2006-11-08 华为技术有限公司 Method, device and system for transfer news
CN101127685A (en) * 2007-09-20 2008-02-20 中兴通讯股份有限公司 An inter-process communication device and inter-process communication method
CN101620723A (en) * 2009-08-03 2010-01-06 东莞市三姆森光电科技有限公司 Offline intelligent image information processing method and intelligent image information processing system
CN102129443A (en) * 2010-12-30 2011-07-20 中国民航信息网络股份有限公司 Real-time data transmission channel and method based on USAS (Univac Standard Airline Systems) host
CN102508765A (en) * 2011-11-17 2012-06-20 深圳市中兴移动通信有限公司 Method for monitoring software log in real time by inter-process communication

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1289962A (en) * 1999-09-23 2001-04-04 国际商业机器公司 Establishment of multiple process spanned communication programme in multiple linear equation running environment
US20030115245A1 (en) * 2001-12-17 2003-06-19 Kunimasa Fujisawa Multi-application execution system and method thereof
CN1859327A (en) * 2006-02-09 2006-11-08 华为技术有限公司 Method, device and system for transfer news
CN101127685A (en) * 2007-09-20 2008-02-20 中兴通讯股份有限公司 An inter-process communication device and inter-process communication method
CN101620723A (en) * 2009-08-03 2010-01-06 东莞市三姆森光电科技有限公司 Offline intelligent image information processing method and intelligent image information processing system
CN102129443A (en) * 2010-12-30 2011-07-20 中国民航信息网络股份有限公司 Real-time data transmission channel and method based on USAS (Univac Standard Airline Systems) host
CN102508765A (en) * 2011-11-17 2012-06-20 深圳市中兴移动通信有限公司 Method for monitoring software log in real time by inter-process communication

Also Published As

Publication number Publication date
CN103164359B (en) 2017-04-05

Similar Documents

Publication Publication Date Title
CN102609286B (en) A kind of FPGA configurator remote update system based on processor control and method thereof
CN102609287B (en) A kind of devices and methods therefor by CPU remote update FPGA
CN202306262U (en) Site equipment with self description
CN105159731B (en) A kind of device of FPGA configuration file remote upgrade
CN106707848A (en) Control program organization structure of control system and download method
CN102685134A (en) Communication managing machine capable of being comprehensively realized based on extensible markup language and dynamic library
CN102750249B (en) The method that host computer communicates with slave computer, Apparatus and system
CN103176417B (en) The automation control method able to programme of a kind of compatible EPICS and device
CN102622257B (en) The online self refresh method of ammeter and device thereof
CN103559910B (en) The realization intelligence that is applied to cd-rom recorder is switched the system and method for burning/recording chip sequential
CN105790830A (en) Optical module in-situ detection method and device
CN104965808A (en) Device for implementing serial port multiplexing and serial port multiplexing method
CN103123470A (en) Method for controlling a field device
CN104050113A (en) Accessing non-volatile memory through a volatile shadow memory
CN103678187A (en) Micro-control unit and control method thereof
CN104714914A (en) Initial configuration method of mobile industry processor interface (MIPI) liquid crystal module
CN102591836B (en) Configuration method and configuration device for communication connector personal identification number (PIN) foot
CN101136246A (en) Apparatus and method for realizing data rate converting based on double mouths RAM
CN107622027A (en) A kind of All-in-One Flash controllers and fabrication method
CN105788636A (en) EMMC controller based on parallel multichannel structure
CN103164359A (en) Method and device of pipeline communication
CN102546630A (en) Io communication method
CN203689503U (en) Single-board system achieved based on field-programmable gate array
AU2015371556A1 (en) Method for accessing a number of slave devices with registers by a master device over a network
CN105488009A (en) FRU read/write method and read/write system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant