CN103164359B - A kind of pipeline communication method and apparatus - Google Patents

A kind of pipeline communication method and apparatus Download PDF

Info

Publication number
CN103164359B
CN103164359B CN201310034616.6A CN201310034616A CN103164359B CN 103164359 B CN103164359 B CN 103164359B CN 201310034616 A CN201310034616 A CN 201310034616A CN 103164359 B CN103164359 B CN 103164359B
Authority
CN
China
Prior art keywords
data
space
stored
characteristic parameter
input
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
CN201310034616.6A
Other languages
Chinese (zh)
Other versions
CN103164359A (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

Landscapes

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

Abstract

The embodiment of the invention discloses a kind of pipeline communication method and apparatus, including, set up data space, the data storage in data space, imparting is stored in the corresponding characteristic parameter of data in data space, corresponding data are read from data space according to characteristic parameter, by the present invention in that with a public space and being input into, output channel is connected, it is managed collectively and stores the data volume of input channel input, the output channel of the process in any system can read required data volume from the public space, so as to greatly reduce pipeline communication system scale and complexity, improve the reliability of system.

Description

A kind of pipeline communication method and apparatus
Technical field
The present invention relates to pipeline communication field, more particularly to a kind of pipeline communication method and apparatus.
Background technology
Data acquisition transmission instrument is primarily referred to as gathering, storing the data of all kinds measuring instrument and have upwards The position industrial computer of machine transmission data function, embedded computer or Programmable Logic Controller etc..
Linux system is used existing data acquisition transmission instrument more, processing, be connected collection, calculate and access each module In data when, the communication mode commonly used between process is mainly the pipeline communication mode of Linux, and the pipeline communication mode refers to A kind of semiduplex communication mode between two processes in linux system, data can only one-way flow.When specifically used, work as number Data type according to source is different, when application scenarios are not equal, is required for targetedly pre-setting corresponding process pipeline.This Plant communication mode although simple and clear, but, with the development of science and technology, the input mode of data volume is more and more, data source Data type is also varied, so, thus cause whole pipeline communication system to become increasingly complex, reliability is reduced, Er Qieyou It is when the calculating for needing to realize between input variable or have input variable calculate obtain output variable when, pipeline enclosure interleaving access Whole pipeline communication system is caused to become excessively complicated with the control of sequential, it is difficult to safeguard.
The content of the invention
Embodiments provide a kind of pipeline communication method and apparatus, solve gathered using pipeline communication mode, Calculate and access the system complex produced during the data in each module, the low technical problem of reliability.
The embodiment of the invention discloses following technical scheme:
A kind of pipeline communication method, including step:
Set up data space;
The data storage in data space;
Imparting is stored in the corresponding characteristic parameter of data in data space;
Corresponding data are read from data space according to characteristic parameter.
Preferably, the characteristic parameter is specially the name information of the address information and/or data of data.
Preferably, also include before data storage in data space:
The data are pre-processed according to default rule, the pretreatment is specially and for the data to carry out correspondence Form conversion and/or calculating process is carried out using corresponding computing formula to the data;
Accordingly, in data space store format transformation after data and/or calculating process after data.
Preferably, the data storage in data space includes:
Stored according to the classification of type of data.
Preferably, the data storage in data space includes:
Stored according to the whether writeable classification of data.
Preferably, the data storage in data space includes:
The data type of preservation data, data cell, data length, data name, data value, data default value, statistics Type and display mark.
Preferably, also include:
Recorded using configuration file and updated data implication corresponding to the data for being stored in memory space, data length, Data initial value, data type, data unit, data name and computing formula.
A kind of pipeline communication device, including:
Memory space unit is set up, for setting up data space;
Memory cell, for the data storage in data space;
Characteristic parameter unit, is stored in the corresponding characteristic parameter of data in data space for giving;
Reading unit, for corresponding data are read from data space according to characteristic parameter.
Preferably, also include:
Pretreatment unit, for being pre-processed to the data according to default rule, the pretreatment specially will The data carry out corresponding form conversion and/or carry out calculating process using corresponding computing formula to the data;
Accordingly, at the data and/or calculating after memory cell is additionally operable to format transformation is stored in data space Data after reason.
Preferably, also include:
Configuration file unit, for being recorded using configuration file and updating the number corresponding to the data for being stored in memory space According to implication, data length, data initial value, data type, data unit, data name and computing formula.
As can be seen from the above-described embodiment, by the present invention in that being connected with input, output channel with a public space, unite One data volume for managing and storing input channel input, the output channel of the process in any system can be read from the public space Required data volume, so as to greatly reduce pipeline communication system scale and complexity, improves the reliability of system.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing Accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, may be used also To obtain other accompanying drawings according to these accompanying drawings.
Fig. 1 is a kind of method flow diagram of pipeline communication method of the invention;
Fig. 2 is the system construction drawing of the present invention;
Fig. 3 is that the system module of the present invention calls signaling diagram;
Fig. 4 is a kind of another method flow diagram of pipeline communication method of the invention;
Fig. 5 is an a kind of structure drawing of device of pipeline communication device of the invention.
Specific embodiment
Embodiments provide a kind of pipeline communication method and apparatus.The data unification of collection is stored in and is built in advance In vertical data space, and the data pre-processed by needs are carried out with corresponding form conversion and/or by calculating public affairs Formula is calculated, and provides unified interface for each output unit.
It is connected with input, output channel by using a public space, is managed collectively and stores input channel input Data volume, the output channel of the process in any system can read required data volume from the public space, so as to substantially reduce Pipeline communication system scale and complexity, improve the reliability of system.
It is understandable to enable the above objects, features and advantages of the present invention to become apparent from, below in conjunction with the accompanying drawings to the present invention Embodiment is described in detail.
Embodiment one
Fig. 1 is referred to, which is a kind of method flow diagram of pipeline communication method of the invention, the method is comprised the following steps:
S101:Set up data space;
Explanation is needed exist for, disposably distributes certain memory space in internal memory for setting up data space, Certainly, it is that, in internal memory, the data space can also be set up in external memory unit or other types not limit Memory cell in, the present invention this is not defined.
Preferably, also include before data storage in data space:
The data are pre-processed according to default rule, the pretreatment is specially and for the data to carry out correspondence Form conversion and/or calculating process is carried out using corresponding computing formula to the data;
Accordingly, in data space store format transformation after data and/or calculating process after data.
Here Fig. 2 is referred to, which is the system construction drawing of the present invention.It should be noted that pass through outer harvesting portion or The data that person's outside input module is obtained, some have specific communications protocol, need to be converted into specific data form ability Exported or could be recognized by data outputting module, and some collected data, it is impossible to data output is directly used in, The data needs of these types are counted according to its corresponding computing formula together with other data or parameter or individually Calculate, the data for calculating are only effective output data.According to the situation that the above is likely to occur, it is necessary to adopted according to data The current job requirement of collection transmission instrument, the rule between the data for presetting collection and the output data for intentionally getting, it is determined that Which data directly can be exported, and which data needs the conversion into row format, and which data needs further to be calculated Afterwards, the result of calculating is exported, and in the data space that these pretreated data Cun Chudao are set up.
S102:The data storage in data space;
Preferably, stored according to the classification of type of data.
Preferably, stored according to the whether writeable classification of data.
For step S102, a preferred embodiment can be lifted according to actual scene here and be described in detail:
The data in data storage space will be stored in and classified according to whether data type and data are writeable, respectively Be divided into readable writeable analog data, readable not writeable analog data, readable writeable switching value data and it is readable not Writeable switching value data.
According to above-mentioned mode classification, the data space of foundation is divided into into four regions, respectively holding register Region, input register region, input status register region and coil state register area, this four regions are as required Each receive switching value, analog quantity, input quantity and the output quantity of corresponding types:
Holding register region is used for storing 8bit, 16bit, 32bit and/or 64bit type simulation amount data, accesses journey The read-write region of sequence;
Input register region is used for storing 8bit, 16bit, 32bit and/or 64bit type simulation amount data, accesses journey The readable not writeable region of sequence;
Coil state register area is used for the switching value data for storing 1bit types, accesses the read-write region of program;
Input status register region is used for the switching value data for storing 1bit types, accesses the readable not writeable area of program Domain.
Preferably, the data type of preservation data, data cell, data length, data name, data value, data acquiescence Value, measurement type and display mark.
Need explanation, the data of the same type for being preserved of regional, in addition to these above-mentioned characteristic quantities, to depositing The size of storage also has certain regulation, such as, input register region is typically without exception using the memory headroom of 4 byte-sizeds depositing Data are put, depending on the storage size of other each data of region is according to the regulation in the region.Certainly, the present invention is not to each The size of the memory space of each data in individual region is defined.
The process of illustratively data storage is also needed to, is still illustrated, refer to Fig. 3, which is the present invention's System module calls signaling diagram, and when analog data is stored, holding register region and input register region are all to use 4 The memory space of byte storing analog data, and in the analog data of transmission collection, generally using the band of 2 bytes Width, so an analog quantity variable needs transmission 2 times, this has related to first transmit high 2 byte data, has still first transmitted low 2 word The problem of joint number evidence.Because also not producing a unified standard on this problem at present, for compatible both types Equipment, when data are stored, can select high/low position conversion processor to adapt to different situations.
S103:Imparting is stored in the corresponding characteristic parameter of data in data space;
Preferably, the characteristic parameter is specially the name information of the address information and/or data of data.
As can be seen that the data in the region of each data storage are endowed address information and name information, system is defeated The name information for going out address information and/or data that module can pass through data accesses data.
S104:Corresponding data are read from data space according to characteristic parameter.
Data space provides unified output interface, so that other output modules in Modbus agreements and system enter The access of row data.
Embodiment two
Fig. 4 is referred to, which is a kind of another method flow diagram of pipeline communication method of the invention.
S401:Data implication corresponding to the data for being stored in memory space, data are recorded and are updated using configuration file Length, data initial value, data type, data unit, data name and computing formula.
Explanation is needed exist for, the configuration file is more like a kind of description of the data space to setting up, institute State, it is possible to according to every secondary data The table of the working condition of collection transmission instrument, is updated to the configuration file, this function that can customize at any time accordingly Greatly improve the adaptability of whole data storage, calling system.
As can be seen from the above-described embodiment, by the present invention in that being connected with input, output channel with a public space, unite One data volume for managing and storing input channel input, the output channel of the process in any system can be read from the public space Required data volume, so as to greatly reduce pipeline communication system scale and complexity, improves the reliability of system.
Embodiment three
Fig. 5 is referred to, which is an a kind of structure drawing of device of pipeline communication device of the invention, including:
Memory space unit 501 is set up, for setting up data space;
Preferably, also include:
Pretreatment unit 502, for being pre-processed to the data according to default rule, the pretreatment is specially The data are carried out into corresponding form conversion and/or calculating process is carried out using corresponding computing formula to the data;
Accordingly, the data and/or calculating after memory cell 503 is additionally operable to format transformation is stored in data space Data after process.
Memory cell 503, for the data storage in data space;
Characteristic parameter unit 504, is stored in the corresponding characteristic parameter of data in data space for giving;
Reading unit 505, for corresponding data are read from data space according to characteristic parameter.
Preferably, also include:
Configuration file unit, for being recorded using configuration file and updating the number corresponding to the data for being stored in memory space According to implication, data length, data initial value, data type, data unit, data name and computing formula.
As can be seen from the above-described embodiment, by the present invention in that being connected with input, output channel with a public space, unite One data volume for managing and storing input channel input, the output channel of the process in any system can be read from the public space Required data volume, so as to greatly reduce pipeline communication system scale and complexity, improves the reliability of system.
It should be noted that one of ordinary skill in the art will appreciate that whole or portion in realizing above-described embodiment method Split flow, can be by computer program to instruct the hardware of correlation to complete, and described program can be stored in a computer In read/write memory medium, the program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each method.Wherein, it is described Storage medium can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Above a kind of pipeline communication method and apparatus provided by the present invention is described in detail, it is used herein Specific embodiment is set forth to the principle and embodiment of the present invention, and the explanation of above example is only intended to help and understands The method of the present invention and its core concept;Simultaneously for one of ordinary skill in the art, according to the thought of the present invention, in tool Will change in body embodiment and range of application, in sum, this specification content is should not be construed as to the present invention Restriction.

Claims (7)

1. a kind of pipeline communication method, is applied to data acquisition transmission instrument, and the processing system of the data acquisition transmission instrument is adopted According to the pipeline communication mode communicated by one-way pipeline, it is characterised in that including step:
Data space is set up, the memory space is connected with input, output channel;
Data are pre-processed according to default rule, the pretreatment is specially and for the data to carry out corresponding form turn Change and/or calculating process is carried out using corresponding computing formula to the data, the data are to be passed by the data acquisition Defeated instrument collection or the data being input into;
The data after format transformation and/or the data after calculating process are stored in data space, the data are from institute State input channel acquisition;
Imparting is stored in the corresponding characteristic parameter of data in data space, and the characteristic parameter is specially the address letter of data The name information of breath and/or data;
Process in system from data space reads corresponding data according to characteristic parameter by corresponding output channel.
2. method according to claim 1, it is characterised in that the data storage in data space includes:
Stored according to the classification of type of data.
3. method according to claim 1, it is characterised in that the data storage in data space includes:
Stored according to the whether writeable classification of data.
4. method according to claim 1, it is characterised in that the data storage in data space includes:
The data type of preservation data, data cell, data length, data name, data value, data default value, measurement type Indicate with showing.
5. method according to claim 1, it is characterised in that also include:
Data implication corresponding to the data for being stored in memory space, data length, data are recorded and are updated using configuration file Initial value, data type, data unit, data name and computing formula.
6. a kind of pipeline communication device, is applied to data acquisition transmission instrument, and the processing system of the data acquisition transmission instrument is adopted According to the pipeline communication mode communicated by one-way pipeline, it is characterised in that include:
Memory space unit is set up, for setting up data space, the memory space is connected with input, output channel;
Pretreatment unit, for being pre-processed to data according to default rule, the pretreatment is specially the data Carry out corresponding form conversion and/or calculating process is carried out using corresponding computing formula to the data, the data are logical Cross the data acquisition transmission instrument collection or the data being input into;
Memory cell, for the data after the data after format transformation and/or calculating process are stored in data space, institute It is to obtain from the input channel to state data;
Characteristic parameter unit, is stored in the corresponding characteristic parameter of data in data space, the characteristic parameter for giving The specially name information of the address information and/or data of data;
Reading unit, for from data space reading corresponding number according to characteristic parameter by corresponding output channel According to.
7. device according to claim 6, it is characterised in that also include:
Configuration file unit, the data for being recorded and being updated corresponding to the data for being stored in memory space using configuration file contain Justice, 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 CN103164359A (en) 2013-06-19
CN103164359B true 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 (5)

* 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
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4054572B2 (en) * 2001-12-17 2008-02-27 キヤノン株式会社 Application execution system
CN102508765A (en) * 2011-11-17 2012-06-20 深圳市中兴移动通信有限公司 Method for monitoring software log in real time by inter-process communication

Patent Citations (5)

* 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
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

Also Published As

Publication number Publication date
CN103164359A (en) 2013-06-19

Similar Documents

Publication Publication Date Title
US10932154B2 (en) Buffer status reporting method, terminal, and computer storage medium
CN106707848A (en) Control program organization structure of control system and download method
US20050240359A1 (en) In-place dynamically re-sizeable persistent historical database
CN106547709A (en) The method and device of flexible configuration multi-channel DMA controller
CN103428051A (en) System and method for testing communication devices
CN109739770A (en) The adjustment method and device of small routine
CN101206614B (en) Simulator for simulating register with specific function
CN110442341A (en) Interface configuration method, device and the terminal device of application program
US9686131B2 (en) System, gateway, and method for automatic setting configuration by learning commands
CN107171897A (en) A kind of interface test method and data-interface test system
CN102750249B (en) The method that host computer communicates with slave computer, Apparatus and system
CN106407111A (en) Terminal test apparatus, terminal test device and variable maintenance method
CN104050113A (en) Accessing non-volatile memory through a volatile shadow memory
CN106325759A (en) DDR (Double Data Rate) method and device capable of dynamically configuring port bandwidths
CN103905233B (en) Realize method, system and the access network device of analog sensor plug and play
CN103164359B (en) A kind of pipeline communication method and apparatus
CN103226858B (en) The processing method and processing device of Bluetooth pairing information
CN107423272A (en) A kind of report form generation method and its device based on excel
CN104461796A (en) JTAG (joint test action group) debugging module and method for embedded 8051CPU (central processing unit)
CN112966478A (en) Format conversion method and device for table data and storage medium
CN102546630A (en) Io communication method
CN104536887B (en) communication data detection method and device
AU2014202571B2 (en) Utility meter with utility configurable sealed data
CN109656838A (en) Processor system and its memory control methods
CN103124309B (en) Method and terminal for read-write control of mobile phone files

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