CN104199625B - Method, device and system for converting and outputting print data - Google Patents

Method, device and system for converting and outputting print data Download PDF

Info

Publication number
CN104199625B
CN104199625B CN201410474538.6A CN201410474538A CN104199625B CN 104199625 B CN104199625 B CN 104199625B CN 201410474538 A CN201410474538 A CN 201410474538A CN 104199625 B CN104199625 B CN 104199625B
Authority
CN
China
Prior art keywords
data
print
print data
buffer area
control
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.)
Expired - Fee Related
Application number
CN201410474538.6A
Other languages
Chinese (zh)
Other versions
CN104199625A (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 CONTNET COMPUTING (GUIZHOU)
Original Assignee
BEIJING CONTNET COMPUTING (GUIZHOU)
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 CONTNET COMPUTING (GUIZHOU) filed Critical BEIJING CONTNET COMPUTING (GUIZHOU)
Priority to CN201410474538.6A priority Critical patent/CN104199625B/en
Publication of CN104199625A publication Critical patent/CN104199625A/en
Application granted granted Critical
Publication of CN104199625B publication Critical patent/CN104199625B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

The invention discloses a method, a device and a system for converting and outputting print data and aims to convert print data which a control device outputs, into electronic documents convenient to remotely check and view. The method includes the steps: print data which a data acquisition device acquires and which the control device transmits to a printer is received and is written into a data cache area; whether the print data is completely received or not is judged, if not, the print data is continuously received, if yes, the print data in the data cache area is stored, and the data cache area is emptied; the stored print data is divided into control data, character data and image data according to a printing protocol; the character data or the image data is converted into intermediate-formatted data according to the control data, the intermediate-formatted data is output and displayed in an image output area, and display data corresponding to the print data is generated.

Description

A kind of method, apparatus and system that print data is changed output
Technical field
The present invention relates to control system technical field, and in particular to a kind of method, device that print data is changed output And system.
Background technology
At present, in electric power, road, bridge construction, railway, Digit Control Machine Tool processing and other fields, there are many control devices, These equipment itself have very high precision, reliability and feature.In the prior art, these control device running statuses An impact printer is generally with the information output of service data, i.e. control device is connected with printer, running status and fortune The information of row data is directly printed out by printer.But, this mode needs manually to arrive device context reader-printer The information of output is gone to judge control device state, needs to spend substantial amounts of cost of labor, and these control devices are carried out remotely Management and information reform are also relatively difficult, and there is presently no a kind of technology can realize that the output result to control device is carried out Efficiently remotely consult.
The content of the invention
In view of this, the present invention provides a kind of method, apparatus and system that print data is changed output, existing to solve Need to device context to consult the output result of control device in technology, the skill of the substantial amounts of human cost of meeting ancillary cost Art problem.
To solve the above problems, the technical scheme that the present invention is provided is as follows:
A kind of method that print data is changed into output, methods described includes:
The control device that receiving data collecting device is collected is sent to the print data of printing device, by the printing number According to write data buffer area;
Judge whether the print data finishes receiving, if print data is not finished receiving, continue to data acquisition The control device that equipment is collected is sent to the print data of printing device, if print data is finished receiving, preserves the number The print data according to buffer area, and empty the data buffer area;
The print data for preserving is divided into by control data, character data and view data according to print protocol;
The character data or described image data are converted to by intermediate format data according to the control data, will be described Intermediate format data carries out output display in picture output region, generates the corresponding display data of the print data.
Accordingly, it is described to judge whether print data finishes receiving, including:
Judge whether not continuing to receive the print data more than threshold time;
Judge whether the data buffer area is full;
Judge whether to receive default print command;
If it exceeds threshold time not continue to receive the print data, the data buffer area full or receive pre- If print command, it is determined that the print data is finished receiving;If continue to receive in threshold time the print data, The data buffer area less than and do not receive default print command, it is determined that the print data is not finished receiving.
Accordingly, it is described that the character data or described image data are converted to by intermediate form according to the control data Data, including:
According to the control data order read the corresponding character data or described image data, be added to it is described in Between it is in initial data attribute in formatted data and the data type addition of the character data or described image data is described In data type attribute in intermediate format data;
Print command in the control data determines the outgoing position of the character data or described image data Information and display mode information, the positional information attribute being respectively added in the intermediate format data and display type belong to In property.
Accordingly, methods described also includes:
If print data is finished receiving, judge whether include default Data Identification in the print data, if it is, The print data in the data buffer area is preserved, and empties the data buffer area, if not, outputting alarm information;
And/or the display data is carried out certainly according to data integrity strategy, hough transformation strategy, data verification strategy Dynamic examination & verification, to the display data that examination & verification passes through Macro or mass analysis are carried out.
A kind of device that print data is changed output, described device includes:
Receiving unit, the control device collected for receiving data collecting device is sent to the printing number of printing device According to by print data write data buffer area;
First judging unit, for judging whether the print data finishes receiving, if first judging unit Judged result is not finished receiving for print data, is returned the receiving unit and is continued to the control that data acquisition equipment is collected Equipment is sent to the print data of printing device;
Storage unit, if the judged result for first judging unit is finished receiving for print data, preserves institute The print data in data buffer area is stated, and empties the data buffer area;
Division unit, for the print data for preserving to be divided into into control data, character data according to print protocol And view data;
Converting unit, for the character data or described image data to be converted to into middle layout according to the control data Formula data;
Output unit, for the intermediate format data to be carried out into output display in picture output region, generate described in beat Printing is according to corresponding display data.
Accordingly, first judging unit includes:
First judgment sub-unit, for judging whether not continuing to receive the print data more than threshold time;
Second judgment sub-unit, for judging whether the data buffer area is full;
3rd judgment sub-unit, for judging whether to receive default print command;
As a result determination subelement, for if it exceeds threshold time does not continue to receive the print data, the data and delays Deposit area has expired or has received default print command, it is determined that the print data is finished receiving;If in threshold time Continue to receive the print data, the data buffer area less than and do not receive default print command, it is determined that it is described Print data is not finished receiving.
Accordingly, the converting unit includes:
First adding device, for reading the corresponding character data or described image according to control data order Data, are added in the initial data attribute in the intermediate format data, and by the character data or described image data Data type add in the data type attribute in the intermediate format data;
Second adding device, for the print command in the control data character data or the figure are determined As the output position information and display mode information of data, the positional information category being respectively added in the intermediate format data In property and display type attribute.
Accordingly, described device also includes:
Second judging unit, if finished receiving for print data, judges whether include presetting in the print data Data Identification, if the judged result of second judging unit is yes, preserves the data into the storage unit and delay The print data in area is deposited, and empties the data buffer area;
Alarm Unit, if the judged result for second judging unit is no, outputting alarm information;
And/or examination & verification unit, for according to data integrity strategy, hough transformation strategy, data verification strategy to described Display data is audited automatically, and to the display data that examination & verification passes through Macro or mass analysis are carried out.
A kind of system that print data is changed into output, the system includes:
Change server and data acquisition equipment;
The data acquisition equipment, bypass is connected on the path between control device and printing device, for gathering State control device to send to the print data of the printing device, and the print data is sent to into the change server;
The change server is the above-mentioned device that print data is changed output.
Accordingly, the system also includes isolation circuit, for reducing the data acquisition equipment to the control device With the interference of the path between the printing device;
The isolation circuit includes photoisolator, and one end of the photoisolator is beaten with the control device with described Path between printing apparatus is connected, and the other end of the photoisolator is connected with the data acquisition equipment;
Or, the isolation circuit includes a RS232/RS485 converters and the 2nd RS232/RS485 converters, One end of the first RS232/RS485 converters is connected with the control device, a RS232/RS485 converters The other end is connected with one end of the 2nd RS232/RS485 converters and is connected with the data acquisition equipment, and described The other end of two RS232/RS485 converters is connected with the printing device.
As can be seen here, the embodiment of the present invention has the advantages that:
The embodiment of the present invention is sent to the print data of printing device by acquisition control equipment, by the printing number for collecting According to being converted to character information and image information, and output display is carried out in picture output region by these information, generate described in beat Printing can remotely be consulted, i.e., no longer needed to scene to control device according to corresponding display data, the display data for being generated Output result consulted, can save substantial amounts of human cost, and the file after conversion shows that result and printing set Standby mimeograph documents are compared, and character and picture material show that correctly, file layout structure can be consistent, and definition is better than printing The result of equipment, conversion speed is significantly larger than the print speed of printing device.
Description of the drawings
Fig. 1 is system equipment attachment structure schematic diagram in the embodiment of the present invention;
Fig. 2 is the flow chart of the embodiment of the method by print data conversion output provided in the embodiment of the present invention;
Fig. 3 is the schematic diagram of data conversion process in the embodiment of the present invention;
Fig. 4 is that print data is changed into the result schematic diagram of output in the embodiment of the present invention;
Fig. 5 is the schematic diagram of the device embodiment by print data conversion output provided in the embodiment of the present invention;
Fig. 6 is the schematic diagram of the system embodiment one by print data conversion output provided in the embodiment of the present invention;
Fig. 7 is the schematic diagram of the system embodiment two by print data conversion output provided in the embodiment of the present invention;
Fig. 8 is the schematic diagram of the system embodiment three by print data conversion output provided in the embodiment of the present invention;
Fig. 9 is the schematic diagram of the system embodiment four by print data conversion output provided in the embodiment of the present invention.
Specific embodiment
It is understandable to enable the above objects, features and advantages of the present invention to become apparent from, it is below in conjunction with the accompanying drawings and concrete real Apply mode to be described in further detail the embodiment of the present invention.
What is provided in the embodiment of the present invention print data is changed method, the apparatus and system of output, is for existing skill The information output of control device running status and service data is generally an impact printer in art, needs manually existing to equipment The information of reader-printer output goes to judge control device state, understands the technical problem of the substantial amounts of human cost of ancillary cost, Print data of the collection from control device to printing device is proposed, print data is changed using particular algorithm, generation can In the long-range display data consulted, the human cost that result is consulted at scene is saved, so as to realize not affecting equipment to transport The function of information reform and electronic remote printing is carried out in the case of row safety to control device.
The embodiment of the present invention is described the design factors that output is changed from print data, the print data conversion output Device specifically can be integrated in change server.It is shown in Figure 1, the connection of embodiment of the present invention system equipment is tied first Structure is illustrated.The embodiment of the present invention is transformed original control device way of output, on the basis of original output mode On increased data acquisition equipment and change server, i.e., between control device and printing device add a data acquisition Equipment, data acquisition equipment is connected to data intercept on the circuit of printer from control device, and cuts to change server forwarding The print data got, change server is used to realize the functions such as receiving data, analyze data, change data, data storage. In practical application, data acquisition equipment can be connected with control device by printing connection to the path between printing device, Data acquisition equipment can be connected by ethernet line with change server.
The function of realizing to change server below, i.e., what is provided in the embodiment of the present invention changes output by print data Method is specifically described.Shown in Figure 2, the method that print data is changed output provided in the embodiment of the present invention is implemented Example may comprise steps of:
Step 201:The control device that receiving data collecting device is collected is sent to the print data of printing device, will be beaten Printing is according to write data buffer area.
First data acquisition equipment can be being sent to stylus printing by the way of gathering using bypass data to control device Information is captured, the normal work due to ensure to be affected while gathered data printing device, so needing During control device transmission prints data to printing device, a branch node is set up, from control device transmission number is printed According to data flow in replicate a print data, by buffering, strengthen the circuits such as driving, Phototube Coupling and be transferred to print data Data acquisition equipment, to ensure that the print data for intercepting is correct and ensure that the data for being sent to printer do not change, from And reach correct data intercept and do not affect the requirement of legacy data transmission.
Change server can be transmitted to after data acquisition equipment collection print data, change server is opened PORT COM and entered Row is monitored, and judges whether to receive valid data in snoop procedure, if do not receive data to continue to monitor, if receiving number According to the control that just data write data buffer zone, the i.e. change server that receive can be collected with receiving data collecting device Equipment is sent to the print data of printing device, and print data write into data buffer area, and the size of data buffer area can be with It is configured according to practical situations.
Step 202:Judge whether print data finishes receiving, if print data is not finished receiving, return to step 201 after The control device that continued access receipts data acquisition equipment is collected is sent to the print data of printing device.
Step 203:If print data is finished receiving, the print data in data buffer area is preserved, and empties data and delayed Deposit area.
Change server judges whether print data finishes receiving during write data buffer zone, if do not connect Harvest achievement to continue to, if finished receiving, just the print data in data buffer zone is preserved, while clearing data Data in buffering area.
Above step is change server receiving data link, and key is reality of the requirement to each data acquisition in this link When property and accuracy, are uncertain because control device sends the factors such as print data size, the delivery time of printing device to , the problems such as considering frequency acquisition, acquisition time, data integrity is needed, for how judging whether print data has received Into will describe in detail in subsequent embodiment.
Step 204:The print data of preservation is divided into by control data, character data and picture number according to print protocol According to.
It is shown in Figure 3, data conversion link is entered after data receiver link, data conversion link is first initialized Work, imports the print data for preserving, and then print data is analyzed, and print data is divided into control data, number of characters According to this and view data, then these data conversions into intermediate format data, then intermediate format data output conversion is generated Display data carries out classification preservation.
Data conversion link is first directed to the print data of data receiver link preservation, then according to stylus printing agreement handle The print data of importing is divided into control data, character data and view data.For example:1B is run into when gathered data is imported Mean that print data enters image model during 2A orders, then according to this command format parsing obtains print data for 1B 2A M n1 n2 d1 d2 ... di, wherein m represent output image density, and n1 n2 represent how many view data, total row of image Number N=n1+n2*256, di represents the view data of input, and for 24 dot patterns, each column needs the data of 3 bytes, because 3 times of this columns are required view data byte numbers, then according to view data byte number extracts corresponding data being divided into View data, and the control command such as 1B 2A is then divided into control data.In the same manner, character data is also to carry out according to print protocol Separate.
Step 205:Character data or view data are converted to by intermediate format data according to control data, by intermediate form Data carry out output display in picture output region, generate the corresponding display data of print data.
In view of printing device print when be to be printed line by line, therefore be converted to electronic document show when can also It is to be shown line by line, so before display data output is converted to, it is convenient in image output Various types of data can be converted into Region carries out the intermediate data format of output display, then progressively carries out conversion according still further to serial manner and shows.
In some embodiments of the invention, character data or view data are converted to by intermediate form according to control data Implementing for data can include:
Corresponding character data or view data, the original being added in intermediate format data are read according to control data order In beginning data attribute, and the data type of character data or view data is added into the data type attribute in intermediate format data In;
Print command in control data determines output position information and the display of character data or view data Mode information, in the positional information attribute being respectively added in intermediate format data and display type attribute.
Namely intermediate format data includes the attributes such as positional information, data type, initial data, display type, number of characters According to or view data itself as intermediate format data initial data, it is character data that data type then represents the initial data Or view data, print command that then can be in control data for example amplifies the determination correspondences such as printing, line feed printing Initial data print position, the print command in control data for example dual density print, single density print etc. determine Display type.
In actual applications, the realization of data conversion link can be:Import the print data for preserving;Distribution control data Area aray variable space, character data area aray variable space, image data area aray variable space;Lead according to print protocol handle The print data for entering is separated, and then detached data is stored in respectively control data area aray variable, character data area number Group variable, image data area aray variable;Distribution intermediate format data area aray variable space, intermediate format data has as follows Some attributes:Positional information, data type, initial data, display type;By control data aray variable order, corresponding Character data or view data are stored in intermediate format data area aray variable initial data attribute, while being ordered according to control data Order is also stored in corresponding positional information, data type, display type in intermediate format data area aray variable attribute.Due to beating There is view data and character data in printing, so can not can only be passed through with the mode of text in display data simultaneously according in The mode of picture shown, display data can be changed in painting canvas according to intermediate format data area data order.
It is shown in Figure 4, it is the result schematic diagram of the corresponding display data of embodiment of the present invention generation print data.Pass through File after conversion shows that result is compared with printing device mimeograph documents, and character and picture material show correctly, file space of a whole page knot Structure can be consistent, and definition is better than the result of printing device, and conversion speed is significantly larger than the print speed of printing device.
So, display data can be used for long-range access, and user can be visited by united portal or client-side program Ask, i.e., user can consult display data by browser mode or client.The embodiment of the present invention is sent out by acquisition control equipment The print data of printing device is delivered to, the print data for collecting is converted to into character information and image information, and by these letters Breath carries out output display in picture output region, generates the corresponding display data of the print data, the display data for being generated Can remotely consult, i.e., no longer need to scene to consult the output result of control device, substantial amounts of manpower can be saved Cost.
Above embodiments illustrate needs to ensure the real-time and accuracy that receive print data in receiving data link, and How to judge whether print data receives in DRP data reception process is completely a difficult point, and this is because control device is sent to The print data of printing device does not have obvious opening flag and end mark, it is difficult to judge whether to have been received by one it is complete Packet;Meanwhile, it is serial data that control device is sent to the print data of printing device, i.e., data are a transmissions , if wherein having a data to make a mistake will cause whole data parsing failure.
For this in some embodiments of the invention, it is proposed that judge that what whether print data finished receiving implements, Can include:
Judge whether not continuing to receive print data more than threshold time;
Judge whether data buffer area is full;
Judge whether to receive default print command;
If it exceeds threshold time not continue to receive print data, data buffer area full or receive default printing Order, it is determined that print data is finished receiving;If continuing to receive print data, data buffer area in threshold time less than simultaneously And not receiving default print command, it is determined that print data is not finished receiving.
Namely judge the tactful following points whether print data finishes receiving:
First, time parameter method.Because the complete print data that control device is sent to printing device can be relatively short Time in continuously transmit, this threshold time, in actual test find be usually within 10 seconds, so, if wait Also do not continue to receive print data more than threshold time (such as 10 seconds), be considered as having received a complete print data.
Second, buffering area strategy.Data buffer zone size can be pre-set, when data buffer zone data expire, just It is considered a complete print data, then one print data of many receptions, the whole before just preserving in data buffer zone Content, then empties data buffer zone.For example, data buffer zone is dimensioned to print the print data size of one page of content, Data buffer area is full to be then considered that a complete print data is preserved.
3rd, print command strategy.If receiving OA, during the print command such as OB, OC, OD, 4A, then next printing is represented Data start, and can be preserved the data of data buffer zone, then empty data buffer zone.
In order to reach the effect for being properly received print data, can be tackled according to above-mentioned strategy, while in reality Can also constantly be adjusted during use.
In some embodiments of the invention, the method that print data is changed into output for providing in the embodiment of the present invention is also Can include:
If print data is finished receiving, judge whether include default Data Identification in print data, if it is, preserving Print data in data buffer area, and data buffer area is emptied, if not, outputting alarm information.
Namely need the data to receiving to verify, judge whether the data for receiving are correct, because print data exists Can be affected by various factors during transmission and be caused loss of data or mistake, and because control device is sent to printing The print data of equipment does not have an effect position, therefore the correctness of data can not be verified by effect position, in the embodiment of the present invention Employed in mode be the Data Labels that can be fixed according to some of print data after print data is received verifying number According to whether correctly, for example, it may be judged whether including default control word etc., if the data that the data for receiving are fixed without these Mark, what just explanation was received is wrong data, needs to carry out alarm prompt.
In addition, in some embodiments of the invention, can be with according to data integrity strategy, hough transformation strategy, number Display data is audited automatically according to authentication policy, Macro or mass analysis are carried out to the display data that examination & verification passes through.
So, the embodiment of the present invention is sent to the print data of printing device by acquisition control equipment, by what is collected Print data is converted to character information and image information, and carries out output display in picture output region by these information, generates The corresponding display data of the print data, the display data for being generated can be consulted remotely, i.e., no longer need to scene to control The output result of control equipment is consulted, and can save substantial amounts of human cost.
Accordingly, it is shown in Figure 5, it is a kind of dress that print data is changed output provided in the embodiment of the present invention Put, can include:
Receiving unit 501, the control device collected for receiving data collecting device is sent to the printing of printing device Data, by print data data buffer area is write.
First judging unit 502, for judging whether print data finishes receiving, if the judgement knot of the first judging unit Fruit does not finish receiving for print data, return receiving unit continue to the control device that data acquisition equipment collects send to The print data of printing device.
Storage unit 503, if the judged result for the first judging unit is finished receiving for print data, preserves data Print data in buffer area, and empty data buffer area.
Division unit 504, for according to print protocol by the print data of preservation be divided into control data, character data with And view data.
Converting unit 505, for character data or view data to be converted to into intermediate format data according to control data.
Output unit 506, for intermediate format data to be carried out into output display in picture output region, generates print data Corresponding display data.
In some embodiments of the invention, the first judging unit can include:
First judgment sub-unit, for judging whether not continuing to receive print data more than threshold time;
Second judgment sub-unit, for judging whether data buffer area is full;
3rd judgment sub-unit, for judging whether to receive default print command;
As a result determination subelement, for if it exceeds threshold time do not continue to have received print data, data buffer area it is full Or receiving default print command, it is determined that print data is finished receiving;If continuing to receive printing in threshold time Data, data buffer area less than and do not receive default print command, it is determined that print data is not finished receiving.
In some embodiments of the invention, converting unit can include:
First adding device, for reading corresponding character data or view data according to control data order, is added to In initial data attribute in intermediate format data, and the data type of character data or view data is added into intermediate form number In data type attribute according in;
Second adding device, for the output that the print command in control data determines character data or view data Positional information and display mode information, the positional information attribute being respectively added in intermediate format data and display type belong to In property.
In some embodiments of the invention, the device that print data is changed into output for providing in the embodiment of the present invention is also Can include:
Second judging unit, if finished receiving for print data, judges whether include default number in print data According to mark, if the judged result of the second judging unit is yes, the print data in data buffer area is preserved into storage unit, And empty data buffer area.
Alarm Unit, if the judged result for the second judging unit is no, outputting alarm information.
And/or examination & verification unit, for according to data integrity strategy, hough transformation strategy, data verification strategy to show Data are audited automatically, and to the display data that examination & verification passes through Macro or mass analysis are carried out.
A kind of system that print data is changed into output shown in Figure 6, also providing in the embodiment of the present invention, can wrap Include:
Change server 601 and data acquisition equipment 602.
Wherein, data acquisition equipment, bypass is connected on the path between control device and printing device, for gathering control Control equipment is sent to the print data of printing device, and print data is sent to into change server.
Change server can be the device that print data is changed output in above-described embodiment.
When control device is to printing device transmission print data, RS-232C serial communication buses, RS-232C are used Interface is EIA EIA (Electronic Industries Association) and combine Bell System, adjust The standard for serial communication that modulator-demodulator producer and terminal manufacturer formulate jointly.Because RS232 is single-ended Input and output, at least need digital ground wire, send line and receive three lines (asynchronous transmission) of line during diplex operation, can also add it Its control line completes the function such as synchronous.There is transmission cable length needs to be less than 50 feet, altogether Earth noise and is unable to suppression common mode The problems such as interference, so when by the way of bypass collection, transmission line easily causes receiving data mistake when being more than 50 feet Problem.
In order to solve this problem, in some embodiments of the invention, what is provided in the embodiment of the present invention will print number Can also include isolation circuit according to the system of conversion output, for reduce data acquisition equipment to control device and printing device it Between path interference.The connected mode of isolation circuit has at least following two:
It is shown in Figure 7, it is the first line interface mode, isolation circuit can include photoisolator, Phototube Coupling One end of device is connected with the path between control device and printing device, the other end and the data acquisition equipment phase of photoisolator Even.In the case that this mode is generally used for short range transmission circuit, when bypass collection is carried out in data acquisition equipment (for example Collection adapter) front end adds Phototube Coupling equipment, solves impact of the bypass collection to original circuit.
It is shown in Figure 8, it is second line interface mode, isolation circuit can be changed including a RS232/RS485 Device and the 2nd RS232/RS485 converters, one end of a RS232/RS485 converters is connected with control device, and first The other end of RS232/RS485 converters is connected and and data acquisition equipment with one end of the 2nd RS232/RS485 converters It is connected, the other end of the 2nd RS232/RS485 converters is connected with printing device.
When long-distance transmissions are carried out, modes of the RS-232C with reference to RS-485 is employed, strengthen the flexible of communication bus And reliability.The maximum transmission distance standard value of RS-485 interfaces is 4000 feet, actually up to 3000 meters, RS- in addition 232C interfaces only allow 1 transceiver of connection in bus, i.e., single station ability.And RS-485 interfaces are to allow connection in bus Up to 128 transceivers, i.e., with multistation ability, so can easily set up facility network using single RS-485 interfaces Network.Because RS-485 interfaces have a good noise immunity, the above-mentioned advantage such as long transmission range and multistation ability.
RS-485 signals are converted to RS-232C signals by special converter, then RS-485 signals are converted into RS- 232C signals are sent to printing device, are also required to change RS-485 signals when gathered data equipment does not support RS-485 signals Gathered data equipment is sent to into RS-232C signals, the reliability and accuracy of data transmission procedure is thus substantially increased.
The embodiment of the present invention not only can realize the conversion output of the print data to separate unit control device, it is also possible to while The print data of many motors control equipment is carried out concentrating reception and carrying out conversion output in real time.It is shown in Figure 9, it is of the invention real The system embodiment of another kind of print data conversion output provided in example is provided.
Data acquisition equipment (for example gathering adapter) can be while extract the print data of many motors control equipment, if control Control equipment quantity is more, it is also possible to configures multiple stage data acquisition equipment and is acquired, then these data acquisition equipments can pass through Configuration is pushed to the print data for collecting by Ethernet the change server specified and is analyzed, changes and stores.And Management, configuration, data message can be stored in database server, then by the client-side program and web program of exploitation to this A little information carry out unified management and application, and user can consult the display data after conversion by client remote.
Data acquisition equipment (for example gathering adapter) has a function of multi pass acquisition, general collection adapter have 8 tunnels, 16 Road, several models in 32 tunnels, you can to gather 8 tunnels, 16 tunnels, 32 circuit-switched datas simultaneously;Each collection can be given in collection adapter Interface assignment a port, i.e., different acquisition interface possesses different port numbers, so gathers adapter to change server This port information can be sended over when sending data, such change server is known which control device receive is Initial data.
The concrete function of the system embodiment is summarized as follows:
(1) data acquisition
Data acquisition equipment accesses the interface concentration of control device to printing device (such as impact printer), Ran Houtong General serial port protocol is crossed, the print data of these equipment is gathered, then automatically these print datas is sent to Transformation Service In device, change server is automatically saved in database or file the print data for receiving is pre-processed automatically after.For The efficiency of data acquisition is ensured, metadata is not parsed data acquisition equipment gather when, but by changing Server is parsed again to data.
(2) data conversion
Data converting function is that pretreated print data is analyzed, and these print datas are divided into control number According to, character data, view data, these data conversions into intermediate format data, then intermediate format data is converted into refer to Determine to carry out classification preservation after formatted data.The explanation of data conversion part may refer to above-described embodiment, will not be described here.
(3) acquisition management
Acquisition tasks can be configured by UI interfaces.The serial ports of each data acquisition equipment can configure by this function The information such as parameter, IP address, communication pattern, alert mode, simultaneity factor can be monitored to all kinds of acquisition tasks, all kinds of collections Task can record the task daily record of oneself, and for the alarm or exception that occur in gatherer process, system can be by modes such as notes The message of alarm is sent to the administrative staff of correlation.
(4) data checking and editing
Examination & verification to translated data, is according to the set strategy of system, the such as integrity policy of data, hough transformation plan Data after conversion are audited by summary, data verification strategy etc. automatically, and the data only audited by data just can be entered Row statistical analysis.By data audit data, can according to data type, data use range, statistical indicator classification etc. Mode is collected, and the data after collecting are generally required to be processed after arrangement and just can be used for statistical analysis.
Data after data summarization, can according to statistical analysis need these data are processed with arrangement, with Just the efficiency of data statistics is improved.
(5) data management
Data Classification Management can be divided into again:System carries out Classification Management to the data for gathering, and the classification of data can be by list The modes such as position, equipment, the data type of collection are carried out.Data file management:Due to being according to structural data after data receiver Store with the mode of unstructured data, for unstructured data, i.e. data file, position can be stored according to data file Put, time, the mode such as data file class carry out Classification Management, and mapped by way of data pointer in systems, So as to rapidly and efficiently find data file.Initial data is inquired about:In order to meet the demand of different types of user, it is System provides initial data query function, and user can be according to the condition query initial data such as unit, equipment, data type, time. Data file query:In order to meet the demand of different types of user, system provides data file query function, user Ke Gen According to the condition query data file such as unit, equipment, data type, time.
(6) statistical report form
Statistical report form provides Classification Management, maintenance, the function of inquiry of all kinds of forms in system.For all kinds of statistics reports Table, can be customized by the demand of user.
(7) system administration
System administration is mainly configuration and management to system organization mechanism, role-security, user and each parameter of any subsystem. Information department management:System is encoded to use departments at different levels and personnel by unified standard.Keeper can to these coding and Institutional hierarchical relationship such as is increased, is changed, being deleted at the function.Account management:System provides the maintenance management work(of account Can, only the keeper with corresponding authority just can carry out the operations such as newly-built, modification, deletion to account, to each of account Step operating system all can be recorded, and provide query function;The username and password of account is according to the requirement of security strategy System can automatically be verified and be reminded that such as Password Length requires to have to be larger than 8, and requires the group of at least numeral and letter Close etc.;User forgets Password, and can pass through keeper's initialized cryptographic.Rights management:System can be according to the difference of user of service Role, the different system administration of distribution and access right, realize the function of rights management;System right management adopts differentiated control Mode, upper level can arrange the administration authority of next stage;Support rights parameters flexible configuration, there is provided to system, function, The management function of the classification configurations access right parameter such as option or even data;The rights management function of based role is supported, it is at different levels System manager such as can be increased, be changed, be deleted at the operation to affiliated role;Can be by all kinds of authority setting new roles of combination. System maintenance:The modification and configuration of all kinds of parameters that offer system is normally run, mainly there is the maintenance of equipment dictionary, parameter of any subsystem Configuring maintenance, system journal are safeguarded, help safeguard.
So, the embodiment of the present invention is sent to the print data of printing device by acquisition control equipment, by what is collected Print data is converted to character information and image information, and carries out output display in picture output region by these information, generates The corresponding display data of the print data, the display data for being generated can be consulted remotely, i.e., no longer need to scene to control The output result of control equipment is consulted, and can save substantial amounts of human cost.And file after conversion show result and Printing device mimeograph documents are compared, and character and picture material show that correctly, file layout structure can be consistent, and definition is excellent In the result of printing device, conversion speed is significantly larger than the print speed of printing device.
In addition, user can quickly view desired information by system, the trackability of device data is realized.System The Real-time Collection and rapid translating of print data are not only realized, and the configuration through network is capable of achieving field data to data The real-time Transmission at center, to the print data of control device unified management and storage is realized, and reduces original human and material resources Waste, improve using the production efficiency and the efficiency of management of unit.
It should be noted that each embodiment is described by the way of progressive in this specification, each embodiment emphasis is said Bright is all the difference with other embodiment, between each embodiment identical similar portion mutually referring to.For reality For applying system disclosed in example or device, because it is corresponded to the method disclosed in Example, so fairly simple, the phase of description Part is closed referring to method part illustration.
Also, it should be noted that herein, such as first and second or the like relational terms are used merely to one Entity or operation make a distinction with another entity or operation, and not necessarily require or imply between these entities or operation There is any this actual relation or order.And, term " including ", "comprising" or its any other variant are intended to contain Lid nonexcludability is included, so that a series of process, method, article or equipment including key elements not only will including those Element, but also including other key elements being not expressly set out, or also include for this process, method, article or equipment Intrinsic key element.In the absence of more restrictions, the key element for being limited by sentence "including a ...", it is not excluded that Also there is other identical element in process, method, article or equipment including the key element.
The step of method described with reference to the embodiments described herein or algorithm, directly can be held with hardware, processor Capable software module, or the combination of the two is implementing.Software module can be placed in random access memory (RAM), internal memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In field in known any other form of storage medium.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention. Various modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, the present invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The most wide scope for causing.

Claims (8)

1. it is a kind of that print data is changed the method for exporting, it is characterised in that methods described includes:
The control device that receiving data collecting device is collected is sent to the print data of printing device, and the print data is write Enter data buffer area;
Judge whether the print data finishes receiving, if print data is not finished receiving, continue to data acquisition equipment The control device for collecting is sent to the print data of printing device, if print data is finished receiving, is preserved the data and is delayed The print data in area is deposited, and empties the data buffer area;
The print data for preserving is divided into by control data, character data and view data according to print protocol;
The character data or described image data are converted to by intermediate format data according to the control data, by the centre Formatted data carries out output display in picture output region, generates the corresponding display data of the print data;It is described according to institute Stating control data the character data or described image data are converted to into intermediate format data includes:According to the control data Order reads the corresponding character data or described image data, the initial data category being added in the intermediate format data Property in, and the data type of the character data or described image data is added into the data type in the intermediate format data In attribute;Print command in the control data determines the carry-out bit confidence of the character data or described image data Breath and display mode information, the positional information attribute and display type attribute being respectively added in the intermediate format data In.
2. method according to claim 1, it is characterised in that described to judge whether print data finishes receiving, including:
Judge whether not continuing to receive the print data more than threshold time;
Judge whether the data buffer area is full;
Judge whether to receive default print command;
If it exceeds threshold time not continue to receive the print data, the data buffer area full or receive default Print command, it is determined that the print data is finished receiving;If continuing to receive the print data, described in threshold time Data buffer area less than and do not receive default print command, it is determined that the print data is not finished receiving.
3. method according to claim 1, it is characterised in that methods described also includes:
If print data is finished receiving, judge whether include default Data Identification in the print data, if it is, preserving The print data in the data buffer area, and the data buffer area is emptied, if not, outputting alarm information;
And/or the display data is examined automatically according to data integrity strategy, hough transformation strategy, data verification strategy Core, to the display data that examination & verification passes through Macro or mass analysis are carried out.
4. it is a kind of that print data is changed the device for exporting, it is characterised in that described device includes:
Receiving unit, the control device collected for receiving data collecting device is sent to the print data of printing device, will The print data writes data buffer area;
First judging unit, for judging whether the print data finishes receiving, if the judgement of first judging unit As a result do not finish receiving for print data, return the receiving unit and continue to the control device that data acquisition equipment is collected Send to the print data of printing device;
Storage unit, if the judged result for first judging unit is finished receiving for print data, preserves the number The print data according to buffer area, and empty the data buffer area;
Division unit, for according to print protocol by preserve the print data be divided into control data, character data and View data;
Converting unit, for the character data or described image data to be converted to into intermediate form number according to the control data According to;The converting unit includes:First adding device, for reading the corresponding number of characters according to control data order According to or described image data, be added in the initial data attribute in the intermediate format data, and by the character data or The data type of described image data is added in the data type attribute in the intermediate format data;Second adding device, uses In the print command in the control data determine the output position information of the character data or described image data with And display mode information, in the positional information attribute being respectively added in the intermediate format data and display type attribute;
Output unit, for the intermediate format data to be carried out into output display in picture output region, generates the printing number According to corresponding display data.
5. device according to claim 4, it is characterised in that first judging unit includes:
First judgment sub-unit, for judging whether not continuing to receive the print data more than threshold time;
Second judgment sub-unit, for judging whether the data buffer area is full;
3rd judgment sub-unit, for judging whether to receive default print command;
As a result determination subelement, for if it exceeds threshold time does not continue to receive the print data, the data buffer area Default print command is expired or has received, it is determined that the print data is finished receiving;If continued in threshold time Receive the print data, the data buffer area less than and do not receive default print command, it is determined that the printing Data are not finished receiving.
6. device according to claim 4, it is characterised in that described device also includes:
Second judging unit, if finished receiving for print data, judges whether include default number in the print data According to mark, if the judged result of second judging unit is yes, into the storage unit data buffer area is preserved In the print data, and empty the data buffer area;
Alarm Unit, if the judged result for second judging unit is no, outputting alarm information;
And/or examination & verification unit, for according to data integrity strategy, hough transformation strategy, data verification strategy to the display Data are audited automatically, and to the display data that examination & verification passes through Macro or mass analysis are carried out.
7. it is a kind of that print data is changed the system for exporting, it is characterised in that the system includes:
Change server and data acquisition equipment;
The data acquisition equipment, bypass is connected on the path between control device and printing device, for gathering the control Control equipment is sent to the print data of the printing device, and the print data is sent to into the change server;
The change server is the device that print data is changed output described in any one 4-6 of claim.
8. system according to claim 7, it is characterised in that the system also includes isolation circuit, described for reducing Interference of the data acquisition equipment to the path between the control device and the printing device;
The isolation circuit includes photoisolator, and one end of the photoisolator sets with the control device with the printing Path between standby is connected, and the other end of the photoisolator is connected with the data acquisition equipment;
Or, the isolation circuit includes a RS232/RS485 converters and the 2nd RS232/RS485 converters, described One end of first RS232/RS485 converters is connected with the control device, a RS232/RS485 converters it is another End is connected with one end of the 2nd RS232/RS485 converters and is connected with the data acquisition equipment, and described second The other end of RS232/RS485 converters is connected with the printing device.
CN201410474538.6A 2014-09-17 2014-09-17 Method, device and system for converting and outputting print data Expired - Fee Related CN104199625B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410474538.6A CN104199625B (en) 2014-09-17 2014-09-17 Method, device and system for converting and outputting print data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410474538.6A CN104199625B (en) 2014-09-17 2014-09-17 Method, device and system for converting and outputting print data

Publications (2)

Publication Number Publication Date
CN104199625A CN104199625A (en) 2014-12-10
CN104199625B true CN104199625B (en) 2017-04-26

Family

ID=52084923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410474538.6A Expired - Fee Related CN104199625B (en) 2014-09-17 2014-09-17 Method, device and system for converting and outputting print data

Country Status (1)

Country Link
CN (1) CN104199625B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104932848B (en) * 2015-06-16 2018-08-10 深圳供电局有限公司 A kind of relay protection of power system equipment printing transmission data harvester and method
CN105048419B (en) * 2015-07-31 2017-11-10 南京荣桓电力自动化有限公司 The Digital Display method of protective relaying device type information
CN104993915B (en) * 2015-08-07 2018-02-13 上海斐讯数据通信技术有限公司 Transmit the method and system of optical network unit managing control information
CN107402728A (en) * 2016-05-19 2017-11-28 北大方正集团有限公司 A kind of file printing method and system
CN107863140A (en) * 2017-11-06 2018-03-30 贵阳朗玛信息技术股份有限公司 The processing method and processing device of DICOM file
WO2021102821A1 (en) * 2019-11-28 2021-06-03 Orange Method for generating electronic document and corresponding device
CN112486910A (en) * 2020-11-23 2021-03-12 天津津航计算技术研究所 Method for rapidly analyzing mass data files

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6611347B1 (en) * 1996-12-20 2003-08-26 Canon Kabushiki Kaisha Print control apparatus, print control method, storage medium, and computer readable program performing a form overlay process
CN1932794A (en) * 2006-09-30 2007-03-21 符伟 Electronic reading device
CN102555547A (en) * 2010-11-02 2012-07-11 兄弟工业株式会社 Printing apparatus
CN103507448A (en) * 2012-06-29 2014-01-15 山东新北洋信息技术股份有限公司 Printing control method and printer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6611347B1 (en) * 1996-12-20 2003-08-26 Canon Kabushiki Kaisha Print control apparatus, print control method, storage medium, and computer readable program performing a form overlay process
CN1932794A (en) * 2006-09-30 2007-03-21 符伟 Electronic reading device
CN102555547A (en) * 2010-11-02 2012-07-11 兄弟工业株式会社 Printing apparatus
CN103507448A (en) * 2012-06-29 2014-01-15 山东新北洋信息技术股份有限公司 Printing control method and printer

Also Published As

Publication number Publication date
CN104199625A (en) 2014-12-10

Similar Documents

Publication Publication Date Title
CN104199625B (en) Method, device and system for converting and outputting print data
US10304133B2 (en) Distribution of market data
CA2544856C (en) Trade engine processing of mass quote messages with market data message format
CN107038258B (en) Groundwater monitoring data acquisition release management system
CN108259371A (en) A kind of network flow data analysis method and device based on stream process
CN108667725A (en) A kind of industrial AnyRouter and implementation method based on a variety of accesses and edge calculations
EP2244418A1 (en) Database security monitoring method, device and system
CN104468609A (en) Data collection gateway of internet of things and data encryption method
CN106230806A (en) Blended data custom protocol communication system under tertiary-structure network environment and method
CN106600105A (en) System and method for lean management of dosage data of nuclear power plant
CN107911466A (en) A kind of association method under multi-layer framework
CN104751282A (en) Energy supervision information sharing system and method
CN113242265A (en) Gateway data processing system and method and electronic equipment
CN107291675A (en) A kind of trade information sorting code number management system and method
CN100518080C (en) Method and system for the transfer of communication network administration information
CN107784097A (en) A kind of database table data transmission method, system and client, service end
CN104202328B (en) A kind of method, configuration module and the subscription end of subscription GOOSE/SMV messages
CN101426008B (en) Audit method and system based on back display
CN108460896A (en) RMB information collection conversion equipment, system and method based on prefix information
CN109783330B (en) Log processing method, log display method, and related device and system
CN104104568B (en) For the method, apparatus and system from communication bus gathered data
CN106856596A (en) A kind of electronic voting method
CN104283942B (en) Telemetry is collected and dissemination system
CN204288199U (en) Printing device LPT data virtual system
CN107958345A (en) A kind of SCD file collocation method and device based on database and file fragment

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170426

Termination date: 20210917