Communication processing system and method

Abstract: The invention relates to communication processing system and communication processing method which can process data at a high speed by efficiently and smoothly executing data processings for transmission and reception. The system has small scale memory areas (501-3,502-3,503-3) which are independent in layers and a large scale memory area (500) which is common to the layers. Data of a small size is transferred to the small scale memory areas and the large scale memory area is released.

Description: BACKGROUND OF THE INVENTION Field of the Invention The invention relates to communication processing system and communication processing method which are applied to data that is transmitted to a computer, a peripheral device, or the like via a wire or radio. Related Background Art In recent years, as one of the communication processing systems, there has been known a communication processing system such that an infrared transmitting and receiving apparatus transmits print data from a host computer which is built therein or is externally attached to a peripheral device such as a printer or the like similarly having the infrared transmitting and receiving apparatus and prints. Data can be also transmitted from the peripheral device such as a printer or the like and, contrarily, data can be also transmitted from the peripheral device to the host computer. As a result the amount of data which is transmitted from the host computer or the like also increases. On the other hand, although the overall function of the peripheral device such as a printer or the like is improved, their resources as well as hardware are not so changed. Therefore, data communicating apparatus and data processing in which a high speed processing can be performed are necessary. Actually, in a sequence of a communication data processing via a wire or radio, a layer structure which is specified by the OSI is constructed in a form of a combination of software and hardware. Upon transmission, by repeating operations of adding information peculiar to a layer to transmission data at each layer and transferring the data to the lowest layer, final transmission data is generated and the data transmission between the apparatuses occurs. Upon reception, by performing the opposite operations to the received data, namely, by repeating the operations of executing the operations for removing the added information and transferring the data to the upper layer, reception data that is equivalent to the transmission data can be derived. Therefore, since the increase in transmission data is seen as an increase in time which is required for printing in an output apparatus such as a printer or the like, a high speed processing of the reception data or transmission data is necessary. An example of a protocol processing from an infrared port in the conventional system will now be described with reference to Fig. 5. Fig. 5 shows an example in which a portion of a data processing which is executed in a layer on the reception side in Fig. 4, which will be explained hereinlater, is extracted. Reference numeral 401 denotes an area where the data received by a physical layer 400 has been written unchanged. Areas 402 and 403 indicate layers. Hatched portions 401a, 402a, and 403a are portions which are processed in the layers, respectively. Portions 401b, 402b, and 403b denote data which is transferred to the upper layers. Actual processings in Fig. 5 will now be described. Only the area 401 is assured as a memory area. As for the areas 402 and 403, a head address and an access right for the memory area are transferred between tasks, thereby sequentially processing in each layer (task). When the processing of the last layer 403 is finished, the access right is transferred to the first layer 401 and the accumulation of the next data is again started. By repeating those processings, data is continuously transferred from the infrared port to a reception buffer. In the case where the host computer and the printer execute an infrared communication between two apparatuses by using a standardized protocol such as an infrared communication, since each layer sequentially executes the data processing as mentioned above, there is a restriction such that so long as the processing of the data which was previously received is not completely finished in the upper layer, the next data cannot be received. Therefore, since the system is subjected to such a restriction, a problem such that the high speed processing of the reception data or transmission data cannot be executed occurs. It is, therefore, a concern of the invention to provide a communication processing system and communication processing method in which data can be processed at a high speed by efficiently and smoothly executing data processing for transmission and reception. An article entitled "The Effect of Buffering Strategies on Protocol Execution Performance" IEEE Transactions on Communications, US, IEEE Inc. New York, vol. 37, no. 6, by Woodside C M et al discusses bufferings strategies which affect the workloads of,data communications in local and wide area networks. According to aspects of the present invention, there is provided a communication processing system as set out in claim 1 and a communication processing method as set out in claim 9. Further embodiments of the present invention are set out in dependent claims 2-8 and 10-15. In order that the present invention may be more readily understood an embodiment thereof will now be described bv way of example and with reference to the accompanying drawings, in which: Fig. 1 is a block diagram showing a layer communication data processing according to an embodiment of the invention; Fig. 2 is a block diagram of an ink jet printer having an infrared port; Fig. 3 is a block diagram showing a data flow from each port to a reception buffer; Fig. 4 is a block diagram showing a layer processing of a protocol processor in an infrared communication; Fig. 5 is a block diagram showing a conventional processing of data passing through each layer; Fig. 6 is a flowchart for explaining a data transfer processing; and Fig. 7 is a flowchart for allocating a memory area in accordance with a situation of a system. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT An embodiment of the invention will now be described in detail hereinbelow with reference to the drawings. Prior to describing a main construction according to the invention, a printer (ink jet printer or the like) which is suitable for applying the invention will be explained as an example with reference to Fig. 2. A communication data processing system will be also described with reference to Figs. 3, 4, and 5. The printer to which the embodiment is applied is not limited to the ink jet printer but can be also applied to other various apparatuses. Fig. 2 is a constructional diagram showing an ink jet printer with an ordinary construction to which the invention can be applied in a form such that the printer has an infrared communicating apparatus. In Fig. 2, an area 100 surrounded by a frame shows an apparatus built in the printer main body. However, a port unit 30 such as infrared port 10, serial/parallel port 20, and the like constructing a part of the invention can be also connected from the outside. As a data flow from the port unit 30 to a print unit 60, data received from each port such as serial/parallel port 20, infrared port 10, or the like is accumulated into a memory area called a reception buffer 40 (processing 1). The accumulated data is recognized in a recognizer 50 and converted into print data (processing 2). The converted print data is actually printed by the print unit 60 (processing 3). The processings are executed in accordance with such a flow. The print unit 60 has a construction such that an ink jet head and a scanner head can be exchanged. Fig. 3 shows the data processing from each port to the reception buffer 40 further in details more than Fig. 2. As shown in Fig. 3, as compared with a communication using the serial/parallel port 20, it is necessary to perform a predetermined protocol processing for a communication using a protocol processor 15 such as an infrared communication or the like. It is an object of the invention to efficiently transmit the received data to the reception buffer 40 by the protocol processor 15. Fig. 4 shows a data flow of the protocol processor 15 (an arrow in the diagram shows the data flow). Generally, although there are various communication protocols according to a communicating format, they are mainly based on the layer structure defined by the OSI. In Fig. 4, the layers on the left side are set to the transmission side such as a host computer or the like and the layers on the right side are set to the reception side such as a printer or the like used in the present embodiment. The embodiment will be described on the assumption that the print data is sent from the computer side to the printer. Reference numeral 300 denotes digital data which is actually transmitted. When the data passes through layers 301, 302, and 303, information is added every layer. Finally, the digital data is converted into a pulse of light in a physical layer 310. The pulse of light is converted into digital data by a physical layer 320 on the right side (printer side). The converted data is accumulated in a memory area of a data link layer 304. The accumulated data is sequentially processed from each of layers 304, 305, and 306. Finally, data 307 is transferred from the top layer on the printer side to the reception buffer 40. An embodiment of a communication processor (protocol processor) according to the invention will now be described with reference to Fig. 1. Reference numerals 501, 502, 503, and 504 denote layers in the same protocol processor as that shown in Fig. 4 mentioned above. The layers 501, 502, and 503 have a similar construction. A memory area 500 (RAM) serving as a large scale memory area of the reception data is commonly provided for the layers 501 to 503. As a memory area for reception, two memory areas (2 kbytes x 2) are prepared and two memory areas are also similarly provided for transmission. In addition to the memory area 500, the layer 501 has a processor (CPU and ROM to store the program) 501-2 for executing processings in the layer and a small memory area 501-3 (RAM) which is managed every layer. As a small memory area for reception, 14 small memory areas (64 kbytes x 14) are prepared and 14 small memory areas are also similarly prepared for transmission. The layers 502 and 503 also have a structure similar to that of the layer 501. In the invention, there is only one memory area 500 (4 kbytes) for reception. For convenience of explanation, it is assumed that the memory area 500 corresponds to the memory areas 501-1 to 501-3 shown in the layers 501 to 503. Since the memory area 500 for reception has a capacity of 4 kbytes, the number of memory areas can be set to one memory area (4 kbytes x 1), two memory areas (2 kbytes x 2), and four memory areas (1 kbytes x 4) on the basis of the communication between the printer and the host computer. The same shall also similarly apply to the small memory areas. Fig. 1 shows the operation to transfer the access right from each of the layers 501 to 503 to the memory areas and indicates that the access right can be controlled from each of the layers 501 to 503. Small areas 501-3, 502-3, and 503-3 are set in the layers 501 to 503. The small areas 501-3, 502-3, and 503-3 can be also mutually controlled by every layer 501 to 503. Reference numerals 501-2, 502-2, and 503-2 denote processors for performing operation processings of every layers 501 to 503 and executing the getting, recognition, and transfer of the data in the memory areas and small memory areas 501-3, 502-3, and 503-3 in the layers 501 to 503, respectively. A data transfer processing will now be described with reference to Fig. 6. The program regarding the flowchart of Fig. 6 has been stored in the ROM of the processor. In the processing apparatus constructed as mentioned above, the data is received from another apparatus through the physical layer 504. When the reception data is accumulated in the memory area 501-1 (S601), the processor 501-2 examines a transfer size to the upper layer (the kind of data can be further examined) and discriminates whether the data is transferred to a memory area 502-1 (substantially, memory area 501-1) (address copy) or the data is transferred to the small memory area (peculiar area of every layer) 501-3 (block copy) and is subsequently transferred to the small memory area 502-3 (S602). By performing such a processing method, when the data is transferred to the upper layer, low volume data which does not require use of the whole memory area (501-1) is handled by the successive small area memories. Such low volume data can be data in which a command (usually, 64 bytes or less) such that the host computer inquires the state of the printer at a proper interval in order to confirm the connecting state of the infrared communication with the printer, or the like. Thus, the data of a predetermined size (data of 64 kbytes or less) which can be stored in each of the small memory areas 501-3, 502-3, and 503-3 is not merely transferred to the upper layer (address copy) (S603) as in the conventional method but is transferred to the small memory areas 501-3, 502-3, and 503-3 which are individual to the layers (S604) and, at the same time, the large scale memory area 501-1 is released (S605). Thus, the next data can be received into the released large scale memory area 500 and the next reception data can be accumulated at a higher speed than previously possible. To realize the conditions which enable the above processings, namely, to realize the parallel processings independently by the layers 501 to 503, a multitask OS can be used in the apparatus such as a printer or the like as a construction of software. In recent years, since the processings by the multitask OS are realized even in a peripheral apparatus such as a printer or the like, it is considered that there is no problem when installing the system of the invention to a printer or the like. Although the above embodiment has been described with respect to one large scale memory area 500 (namely, 501-1 to 503-1) in order to easily understand the invention, similar processings can be performed even by using one or more memory areas commonly associated with all the layers. Since the sizes and the numbers of memory area 500 and small memory areas 501-3, 502-3, and 503-3 can be set by software, the invention can cope with various types of peripheral apparatuses. In the processing system for actually performing a data communication between two apparatuses, there is a deviation in amount of data to be transferred and it is a rare case where both of the apparatuses deal with the transmission and reception of the same data amount. The above embodiment, therefore, has been described with respect to the example in which the memory area 500 (4 kbytes) is assured for reception and the memory area 500 (4 kbytes) is assured for transmission. However, an example of properly allocating the memory areas in accordance with a situation of the apparatus will now be described with reference to Fig. 7. The recognizer 50 discriminates whether the print head has been attached to the print unit or not (S701). When it is determined that the print head has been attached to the print unit, since an amount of reception data is large, the memory area of 6 kbytes is assured for reception and the memory area of 2 kbytes is assured for transmission (S703). When it is decided that the scanner head has been attached to the print unit, since an amount of transmission data is large, the memory area of 2 kbytes is assured for reception and the memory area of 6 kbytes is assured for transmission (S702). A program regarding the flowchart of Fig. 7 has been stored in the ROM of the processor. Further, for example, in a case such that the data reception is mainly performed (printer in the foregoing example or the like), a using method such that the large scale memory area 500 as described in the above example is used as a memory area for reception and the small memory areas 501-3 to 503-3 of the small scale of every layers are selectively used in accordance with a size of data can be also used. In a case such that the data transmission is mainly performed (host computer or the like), a using method such that the small memory areas 501-3 to 503-3 of the layers are used for reception and the memory area 500 is switched and used as a memory area for transmission can be also used. Although the embodiment has been explained with respect to the case of processing the reception data as an example, similar processings can be also executed even in case of processing the transmission data. Although the embodiment has been described with respect to the infrared communication as an example, the invention is not limited to it but can be also applied to, for instance, a general wire or radio communication. According to the embodiment as described above, the small scale memory areas which are independent every layer and a large scale memory area which is common to each layer are provided and each layer independently and simultaneously executes processing of each layer in parallel. Therefore, the upper layer does not need to wait for the end of the processing in the lower layer, so that a high speed processing can be realized for the data for transmission and reception. Since arbitrary numbers of small scale memory areas of an arbitrary size can be provided for each layer and an arbitrary number of large scale memory areas of an arbitrary size which are common to all layers can also be provided, the memory areas can be installed in a range of apparatuses. Further, the data transfer method to the upper layer can be switched to either one of the address copy transfer and the area transfer in accordance with the result of the data recognition in each layer and the processor of each layer can control all of the memory areas, so that the data transfer can be efficiently performed. Naturally any data added during processing necessary for the progress of the data through the layers is extracted by the processor at the final layer.

Claims: A communication processing system for performing transmission and/or reception of data by using a communication protocol standardized by a layer structure, the system comprising: first storage means commonly provided for all layers in the layer structure and characterised by individual second storage means (501-3,502-3,503-3) each having a memory capacity smaller than that of said first storage means and being associated with an individual one of said layers; and data processing means adapted to accumulate data in said first storage means, to determine that the volume of said accumulated data is large or small, to process said data for the next layer by using said first storage means when the determined volume of the data is large, and to transfer said data to said second storage means of the same layer for data processing when the determined data amount is small. A system according to claim 1, wherein a plurality of said first storage means are provided, and said data processing means further has means for sequentially storing received data into said first storage means. A system according to any preceding claim, wherein said data processing means further has means for varying the sizes of memory capacities of and the numbers of said first storage means and said second storage means. A system according to any preceding claim, wherein after data has been transferred to a second storage means from the first storage means, said data processing means is adapted to release the first storage means from which the data was transferred. A system according to any preceding claim and further comprising printing means for printing received data. A system according to any preceding claim and further comprising scanning means for scanning information recorded on a recording medium in order to generate data to be processed by the system. A system according to claim 6 when dependent on claim 5, wherein the data processing means is adapted to ensure that an area for reception of print data in said first storage means is larger than the area for transmission at the time of the printing by said printing means and to ensure that the area for reception in said first storage means is smaller than the area for transmission at the time of the scanning by said scanning means. A system according to claim 7, wherein the print head of said printing means and the scanner head of said scanning means are exchangeable, and said data processing means is adapted to ensure an area for reception and an area for transmission of said first storage means in accordance with the kind of head respectively attached. A communication processing method for performing transmission and/or reception of data by using a communication protocol characterised by a layer structure, the method comprising: utilising first storage means commonly provided for all layers in the layer structure and characterised by utilising individual second storage means (501-3,502-3,503-3) each having a memory capacity smaller than that of said first storage means and being associated with an individual one of said layers; and utilising data processing means adapted to accumulate data in said first storage means, to determine that the volume of said accumulated data is large or small, to process said data for the next layer by using said first storage means when the determined volume of the data is large, and to transfer said data to said second storage means of the same layer for data processing when the determined data amount is small. A method according to claim 9, wherein a plurality of said first storage means are provided, and received data is sequentially stored in said first storage means. A method according to any of claims 9 to 10, wherein said data processing means further has means for varying the sizes of memory capacities of and the numbers of said first storage means and said second storage means. A method according to any one of claims 9 to 11, wherein after data has been transferred to a second storage means from the first storage means, said data processing means is adapted to release the first storage means from which the data was transferred. A method according to any one of claims 11 to 12 and further printing received data. A method according to any one of claims 9 to 13 and further scanning information recorded on a recording medium in order to generate the data processed by the system. A method according to claim 14 when dependent on claim 13, wherein the data processing means ensures that an area for reception of print data in said first storage means is larger than the area for transmission at the time of the printing by a printing means and to ensure that the area for reception in said first storage means is smaller than the area for transmission at the time of the scanning by a scanning means.

Inventors: KURIHARA MASASHI, KURIHARA, MASASHI
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1998
Main classification: H04L29
IPC codes: H04L12, H04L13, G06F13, B41J5, G06F3, H04L29