Abstract:
A method of coding data and a circuit for coding said data in a data package which is included in a data stream, the data package containing information on a source of origin and a destination for the data package, wherein the coding takes place in a coding system ( 3 ) containing a plurality of coding algorithms, where an identification system ( 2, 4 ) attaches information ( 7, 10 ) to the data package, the information being provided from said information on the source of origin of the data package and its destination, and the coding system ( 3 ) utilizes said attached information ( 7, 10 ) to select one of said plurality of coding algorithms, and the coding system ( 3 ) codes said data according to the selected coding algorithm. An object of the invention is to provide an effective utilization of processor resources during coding of data.

Description:
TECHNICAL FIELD OF THE INVENTION  
       [0001]     This invention relates to a method of coding data in a data package which is included in a data stream, the data package containing information on a source of origin and a destination for the data package, wherein the coding takes place in a coding system containing a plurality of coding algorithms, and further relates to a circuit for coding said data as mentioned.  
       DESCRIPTION OF RELATED ART  
       [0002]     The encoding/decoding of data in a data stream, for example voice data in an Internet Protocol package (VoIP), takes place by use of an encoder/decoder (CODEC) device in form of a Digital Signal Processor. A voice CODEC device generally requires significant processing power as well as storage of substantial amounts of state information associated with the voice data stream.  
         [0003]     Telephone communication via Internet or Local Area Networks (LAN) is an increasingly common phenomenon, which requires that analogue data, such as speech, can be transmitted reliably and efficiently across network boundaries. An example of an Internet Protocol is User Diagram Protocol (UDP), which is primarily used for broadcasting of messages over a network. UDP provides no guarantee of delivery, does nothing to avoid congestion, and makes no guarantees about the rate or order in which packages will arrive.  
         [0004]     Typically, a Media Gateway resides on the edge of a Public Switched Telephone Network (PSTN) and an Internet Protocol (IP) network. The Media Gateway has two endpoints each adapted to a network. If the Media Gateway resides between a PSTN and an IP network, one endpoint would comprise an E1 Interface for the PSTN and the other endpoint would comprise an IP Interface for the IP network.  
         [0005]     In the Internet telephony architecture, the Media Gateway device performs the translation between networks, using a number of encoder/decoder devices to translate analogue voice data into a package-based digital representation of the data. The Media Gateway terminates encoded media streams, e.g. voice encoded according to the standardized G.711 coding algorithm. A prominent feature of a Media Gateway is its ability to support a range of CODEC&#39;s and to allow media transcoding between these.  
         [0006]     Each CODEC device is uniquely adapted to the type of signal it processes and the characteristics of the network, thus many different CODEC&#39;s may be required to implement a Media Gateway. Functions as echo cancellation, gain control, silence detection, fax tone detection, etc., are also likely to be part of the capability set of a Media Gateway. Additionally, CODEC devices may be implemented as Software Modules, Dedicated Hardware or any combination thereof.  
         [0007]     A Media Gateway is typically processing a plurality of data streams multiplexed in time. This requires the ability of shifting between CODEC&#39;s appropriate for coding the incoming data. Presently, if the CODEC implementation is operating in the context of a Realtime Operating System, the Operating System will force the rescheduling of multiple processes at regular intervals. When shifting from one process to another, the scheduling process forces the microprocessor to flush the fast and efficient cache memory, after which the processor has to preload new data into the cache memory space for use by the forthcoming task.  
         [0008]     This flushing of data is very ineffective due to waste of processing time, which calls for an amount of processing overhead by the processor. This method makes the processor exceedingly dependent on the access time and latency time of the usual slower external memory, as this will dramatically decrease the performance of the real-time processor. At heavy data load, the processor possibly may not be able to keep up a steady rhythm of processing, which introduces data under run or loss of information or even worse, lead into processor stalling (e.g. no data will be processed at all).  
         [0009]     An object of the present invention is to provide an efficient utilization of processor resources during coding of a packetized data stream by handling the data stream in a more efficient way and to optimize the scheduling of processing between several data streams and the access to a CODEC state information in order to improve overall throughput of a Media Gateway device.  
       SUMMARY OF THE INVENTION  
       [0010]     In accordance with the present invention there is provided a method in which an identification system attaches information to the data package, the information being provided from the information on the source of origin of the data package and its destination, and the coding system utilizes said attached information to select one of a plurality of coding algorithms, and the coding system codes data derived from said data package according to the selected coding algorithm. This reduces the time needed for the coding system to retrieve said selected coding algorithm and with that release more processing time for the coding system to perform the actual data coding.  
         [0011]     A method as described above where said data stream is included in a network where the data is packetized in a finite size prior to information attachment.  
         [0012]     By use of Internet Protocol packetized data, the data package is marked with a source of origin and destination that eliminates the need for generating said source of origin and destination.  
         [0013]     If the sources of origin and destination comprise Internet protocol addresses, the coding system does not have to evaluate if the internal address look-up is in vain.  
         [0014]     If one of said coding algorithms contained in the coding system is of a type that can be coded in a Global System for Mobile Communications (GSM) system, the coding system will be able to code respective data without the need of acquiring the said algorithm.  
         [0015]     If one of said coding algorithms contained in the coding system is of a type that can be coded in a Universal Mobile Telecommunication Standard (UMTS) system, the coding system will be able to code respective data without the need for acquiring said algorithm.  
         [0016]     If one of said coding algorithms contained in the coding system is of a type that can be coded in a PSTN system, the coding system will be able to code respective data without the need for acquiring said algorithm.  
         [0017]     Further, if said information is provided in an Interface Agent, the coding system has fewer tasks and therefore a higher processing limit.  
         [0018]     As mentioned, the invention further relates to a circuit in which the circuit comprises means for providing an identification mark being provided from the information on the source of origin of the data package and its destination, and for attaching said mark to said data package; and means for subsequently selecting one of said plurality of coding algorithms from said attached identification mark; and means coding said data according to said selected coding algorithm. This reduces the time needed for the circuit to retrieve said selected coding algorithm and with that provide more processing time for the circuit to perform the actual data coding.  
         [0019]     A circuit as described above where said data stream is included in a network where the data is packetized in a finite size prior to the information mark attachment.  
         [0020]     By use of Internet Protocol packetized data, the data package is marked with a source of origin and destination that eliminates the need for generating said source of origin and destination.  
         [0021]     If the source of origin and destination comprise Internet protocol addresses the coding system does not have to evaluate if the internal address look-up is in vain.  
         [0022]     If one of said coding algorithms contained in the coding system is of a type that can be coded in a GSM system, the coding system will be able to code respective data without the need for acquiring said algorithm.  
         [0023]     If one of said coding algorithms contained in the coding system is of a type that can be coded in a UMTS system, the coding system will be able to code respective data without the need for acquiring said algorithm.  
         [0024]     If one of said coding algorithms contained in the coding system is of a type that can be coded in a PSTN system, the coding system will be able to code respective data without the need for acquiring said algorithm.  
         [0025]     Further, if said identification mark is provided in an Interface Agent, the coding system has fewer tasks and therefore a higher processing limit. 
     
    
     BRIEF DESRCIPTION OF THE DRAWINGS  
       [0026]     The accompanying drawings illustrate the present invention by way of the embodiments in which:  
         [0027]      FIG. 1  is a schematic block diagram illustrating the relationship between major elements of the invention;  
         [0028]      FIG. 2  is a schematic block diagram showing the basic data handling in the embodiment of the present invention where the data flow direction is from unpacketized streaming data to packetized data;  
         [0029]      FIG. 3  is a detailed block diagram of a data stream during processing according to the present invention where the stream destination is a packetized medium;  
         [0030]      FIG. 4  is a schematic block diagram showing the basic data handling in a embodiment of the present invention where the data flow direction goes from packetized data to unpacketized streaming data; and  
         [0031]      FIG. 5  is a detailed block diagram of a data stream during processing according to the present invention wherein the stream destination is a unpacketized medium. 
     
    
     DETAILED DESCRIPTION OF EMBODIMENTS  
       [0032]     By use of a Digital Signal Processor, DSP, which may not have support for a Real-time Operation System, this flushing of data at regular and improper intervals will be eliminated by a Package-Driven Architecture for data stream processing being defined. This architecture schedules data stream processing by attaching instructions to each data stream package describing the processing required by the given data package.  
         [0033]     As dedicated Digital Signal Processors are simple and optimized for performance and not task switching, it is an alternative to use a DSP as Central Processing Unit in said coding system.  
         [0034]     In a preferred embodiment, a Stream Manager makes the decision what GODEC the DSP will use for coding. The Stream Manager has access to a permanent digital data medium comprising a plurality of available CODEC interfaces. On system start-up the CODEC algorithms available to the Stream Manager will be uploaded into the memory of the DSP, either partially or fully. The algorithms will be sorted in banks, wherein each bank only one CODEC is available. The banks are selectable by the Stream Manager and the DSP does not have the ability to choose which bank to select, but can only access the CODEC data of the bank currently selected by the Stream Manager. When a data stream processed by the Stream Manager requires a CODEC for coding, the Stream Manager has knowledge about the specific CODEC required. This knowledge is typically based on the source of origin (PSTN/GSM/IP address etc.) and/or the destination address of the data, but can also be based on for example common used communication standards. When the appropriate coding for a given data stream is known, the Stream Manager indexes the memory area of the DSP where the CODEC is stored. The Stream Manager will enable that particular bank so that the DSP will load the chosen CODEC upon coding the data comprised in said data stream.  
         [0035]     The coding system may comprise means to receive new types of CODEC&#39;s. This property of the coding system is beneficial if a data package arrives that may require a CODEC that is not available to the Stream Manager. The coding system may store the new CODEC permanently on the storage medium available to the Stream Manager, which after the Stream Manager may upload the said CODEC in the memory available to the DSP. Additionally it is preferred that the coding system comprises means to delete a CODEC from the storage medium to free storage space.  
         [0036]     The figures illustrate the invention, viz. a system for improving processor performance in a data stream processing system, for example voice data in a media stream.  
         [0037]      FIG. 1  illustrates the data flow from one endpoint E1 Interface  1  to a second endpoint IP/UDP Interface  5  through a system architecture and vice versa, which will be described in details in the following.  
         [0038]     The E1 Interface  1  is adapted to an encoded media stream, e.g. G.711 encoded voice data from a PSTN telephone switch-signalling gateway. An E1 Interface Agent  2  creates a fixed-size package within an assigned time slot and transmits the current processed time slot information  6  regarding the package to a Stream Manager  12 . On request the Stream Manager  12  is able to upload CODEC&#39;s from the CODEC storage device  13  to the Media Mapper  3 . The Stream Manager  12  generates a Stream ID  7  based upon the time slot information  6  and sends the Stream ID- 7  back to the E1 Interface Agent  2 , which tags the current fixed-size package with the processing code, Stream ID  7 .  
         [0039]     The tagged package is sent to the Media Mapper  3 , which upon receiving the data package sends the Stream ID  8 , which is identical with above-mentioned Stream ID  7 , to the Stream Manager  12 . The Stream Manager  12  enables the CODEC information  9  appropriate for coding the media data stream package in the Media Mapper  3 . When the Media Mapper  3  has coded the media stream as prescribed, the data package is sent to the IP Interface Agent  4 . The IP Interface Agent will now generate the information required to form an IP package. The data package will be wrapped into an IP package with the corresponding destination address required by the network protocol. The data package is sent to its destination via the IP/UDP Interface  5 .  
         [0040]     By receiving a coded media package from the IP/UDP Interface  105  to make the way to a E1 network the method is nearly identical to the first description but in opposite direction. An IP package arrives at the IP/UDP Interface where upon the IP Interface Agent  4  recognizes the source and destination address contained in the data package. The destination address  11  is sent to the Stream Manager  12 , which uses the source address information to index the processing code belonging to that given connection. The Stream Manager  12  generates a Stream ID  10  and sends this ID to the IP Interface Agent  4  where the protocol information of the data package may be stripped, and the data package is tagged with the Stream ID  10  assigned by the Stream Manager  12 , and sent to the Media Mapper  3 . Media Mapper  3  indexes the CODEC by way of the Stream ID  8 , the Stream Manager  12 , and the CODEC Information  9 . The data derived from the stripped package is coded in accordance with the chosen CODEC and the package is sent to the E1 Interface Agent  2 . The Stream Manager  12  indexes the transmit buffer for the E1 time slot used by the connection, and the data is finally placed in the transmit buffer of the E1 Interface  1  with respect to the found time slot.  
         [0041]      FIG. 2  shows a detailed excerpt of the data stream  14  as it arrives the E1 Interface agent  2 . The data stream  14 , which can be a continuous stream of any digital signal, is sliced and packed in a predetermined fixed-size package  15  and tagged with a Stream ID  16  in the E1 Interface Agent  2  given by a Stream Manager  12  for subsequent recognition. The Stream Manager  12  maintains the media stream by managing the data defining the stream.  
         [0042]      FIG. 3  shows the architecture of the present invention subsequent to the E1 Interface Agent  2  management. The data package  21  containing data  15  and an ID tag  16 , is now stripped in the Media Mapper  3  where the ID tag  16  is utilized in a Indexing Mechanism  17  contained in the Stream Manager  12  to point out the memory space  26  used for the requested CODEC. The memory space can be organized in smaller fragments each with its own CODEC. The Digital Signal Processor  18  loads the chosen CODEC into the internal processing memory and codes the data  15  derived from the package  21  on the basis of the loaded CODEC contained in memory space  26 . The processed data  24  is tagged with a source of origin and destination contained in the Stream Manager  12  by way of the IP Interface Agent  4  to form a valid IP package  22  after which the IP package  22  is sent to its destination through a common network interface (not shown).  
         [0043]      FIG. 4  illustrates an incoming media stream in form of an Internet Protocol package  23  comprising voice data  15  and source of origin  19  and destination  20 . The Interface Agent  2  recognizes and sends the information regarding the source of origin and destination from the data package  23  to the Stream Manager  12 . Note, that the package information also can be stripped apart from the data. If the source and destination address reside on the data, a look-up in the Stream Manager  12  can subsequently be avoided and internal processing bandwidth in the Media Gateway can be reduced. The Stream Manager  12  generates a Stream ID tag, which will be sent to the Interface Agent  2  and tagged thereby to the data package  23  to form a package  27  prepared to be processed in the Media Mapper  3 .  
         [0044]     The interplay between the Media Mapper  3 , the Interface Agent  4  and the Stream Manager  12  is illustrated in  FIG. 5 . The pre-processed data package  27 , comprising voice data  15 , source of origin  19 , destination  20  and Stream ID  16 , is categorized by the Stream Manager  12  by means of the Stream ID  16  and the E1 Interface Agent  4 . The Stream Manager  12  has means to index the appropriate CODEC in the memory  26  accessible by the DSP  18 , by use of the Indexing Mechanism  17 . The DSP  18  utilizes the CODEC algorithm designated by the Indexing Mechanism  17  on coding the data  15 . The DSP  18  sends the processed data to the E1 Interface Agent  4  to let the Stream Manager  12  be provided with the topical destination information  20 . The Stream Manager  12  indexes the transmit buffer for the E1 time slot used by the connection by way of the destination information  20 . The data  28  is finally placed in transmit buffer  29  of the E1 Interface  5  with respect to the appropriate time slot.