Background technology
Current GSM (Global System for Mobile Communications; Global system for mobile communications) in the system; When TRAU (Transcoder/Rate Adaptation Unit, code conversion and Rate Adapter Unit) unit is to hold away from BTS (Base Transceiver Station, base station transceiver); The CCU of BTS (Channel Coding Unit; When Channel Codec Unit) the Abis mouth between unit and the TRAU unit adopted TDM (Time Division Multiplexing, time division multiplexing) to carry, the control information of voice, data and TRAU unit was transmitted with the trau frame mode.Can also see that by Fig. 1 the TRAU unit is positioned in the BSC (Base Station Controller, base station controller); BTS is through Um mouth and MS (Mobile station; Travelling carriage) link to each other, BSC links to each other through A mouth and MSC (MobileSwitching Center, mobile switching centre).The transmission of trau frame both can be carried out on the transmission channel of 16kbit/s; Also can on the transmission channel of 8kbit/s, carry out; Agreement 3GPP (3rdGeneration Partnership Project, third generation partner program) TS 48.060 and 3GPP TS48.061 have stipulated the concrete trau frame form of transfer of data in the band.Trau frame has the fixed frame length of 20ms:
160bit (20ms)----8kbit/s (half rate);
320bit (20ms)----16kbit/s (full rate).
What agreement 3GPP TS 48.061 described is the frame format definition of the half rate transmission channel (Traffic Channel-Half-rate is abbreviated as TCH/H) of the voice-and-data of CCU unit and TRAU unit.AMR (Adaptive Multi Rate; AMR) algorithm can transmit the encoding/decoding mode of following several kinds of speed on the channel of 8kBit/s: 4.75kBit/s, 5.15kBit/s, 5.9kBit/s, 6.7kBit/s, 7.4kBit/s; Wherein 4.75kBit/s, 5.15kBit/s and 5.9kBit/s are called low code check; Adopt identical trau frame form, as shown in table 1; 6.7kBit/s the trau frame form slightly different, as shown in table 2 in control bit definition; 7.4kBit/s the trau frame form in front of two kinds of frame gaps bigger, as shown in table 3.
Trau frame form when table 1 hangs down code check
Trau frame form during table 26.7kBit/s
Trau frame form during table 37.4kBit/s
Among the table 1-3, the position that identifies with letter C is a control bit, and the position that identifies with alphabetical D is a data bit, and all the other are flag of frame position 0 or 1.1-3 is visible by table, and the trau frame form of the half rate except 7.4kBit/s all has a common ground, and promptly a frame head flag bit (or claim to differentiate) all is that to be 0 the 9th be 1 in the 1-8 position.This structure the search trau frame original position the time, as long as find continuous 8 be 0 then one be 1, so just can assert said continuous 8 be 0 the 1st be the original position of a trau frame.Even because in normal data bit, have 0 to occur, because per 8 bit just have a sync bit 1, can occur continuous 70 at most like this, can not cause and obscure the search of flag bit.
But the half-rate TRAU frame of 7.4kBit/s is because the valid data bit comparison is many; Can not put down enough flag bits in the trau frame; Be reduced to the trau frame structure of table 3, from table 3, can find out, the flag bit of the trau frame of 7.4kBit/s has only 6; That is: the 1st is 0, the 2nd and is 0, the 3rd and is 1, the 9th and is 0, the 17th to be 1, the 25th be 0 that all the other all are data bit and control bit.Suppose that in the transmission course of half rate the probability of each data bit appearance 0 and 1 all is 1/2, then in data bit, find the probability of the mistake search that meets this 6 bit flag position to be:
(1/2)×(1/2)×(1/2)×(1/2)×(1/2)×(1/2)=1/64=1.5625%
Like this, will occur a mistake search in per 64 frames, this probability is very high, therefore, needs a kind of searching method that can reduce the mistake search rate.But also there is not to reduce the searching method of this mistake searching probability at present in the prior art.
Summary of the invention
The technical problem that the present invention will solve provides the searching method of half-rate TRAU frame under a kind of self-adaption multi-speed encoding/decoding pattern, can reduce the mistake searching probability of 7.4kBit/s half-rate TRAU frame.
In order to address the above problem, the invention provides the searching method of half-rate TRAU frame under a kind of self-adaption multi-speed encoding/decoding pattern, be applicable to code conversion and the Rate Adapter Unit trau frame of search 7.4kBit/s, comprising:
The buffer memory trau frame, search wherein meets the data of 7.4kBit/s half-rate TRAU frame flag bit;
For the data that meet 7.4kBit/s half-rate TRAU frame flag bit; Judge its whether satisfy below in two conditions any one; If satisfy; The start bit of the data that then search is the start bit of 7.4kBit/s half-rate TRAU frame data, otherwise repeats above-mentioned steps till finding the 7.4kBit/s half-rate TRAU frame:
Condition one: in the data that meet 7.4kBit/s half-rate TRAU frame flag bit that search out, also meet the requirement of 7.4kBit/s half-rate TRAU frame flag bit be separated by those data of half-rate TRAU frame length of each flag bit data;
Condition two: in the data that meet 7.4kBit/s half-rate TRAU frame flag bit that search out; With with the be separated by data of half-rate TRAU frame length of the first data be start bit, the requirement of the half-rate TRAU frame flag bit of other speed of data fit afterwards except that 7.4kBit/s.
Further, the buffer memory trau frame of 345bit at least.
Further, the trau frame of buffer memory 480bit.
Further, the requirement of the said 7.4kBit/s of meeting half-rate TRAU frame flag bit is meant: a certain position is 0, thereafter the 2nd be 0, the 3rd and be 1, the 9th and be 0, the 17th to be 1, the 25th be 0.
Further, the said requirement that meets the half-rate TRAU frame flag bit of other speed except that 7.4kBit/s is meant: the 8bit data are 0 continuously, and 1bit is 1 afterwards.
Further, said half-rate TRAU frame length is 160bit.
Further, after the original position of the half-rate TRAU frame that searches 7.4kBit/s, write down this position, when searching for, begin search next time from this record position of buffered data.
The mistake search problem of big probability can appear in the half-rate TRAU frame that the present invention is directed to the 7.4kBit/s of AMR encoding/decoding mode when search, provided a kind of searching method, can effectively reduce the probability of mistake search.
Embodiment
Main design of the present invention is that at first the buffer memory trau frame is searched for the data that wherein meet 7.4kBit/s half-rate TRAU frame flag bit; For the data that meet 7.4kBit/s half-rate TRAU frame flag bit; Judge its whether satisfy below in two conditions any one; If satisfy; The start bit of the data that then search is the start bit of 7.4kBit/s half-rate TRAU frame data, otherwise repeats above-mentioned steps till finding the 7.4kBit/s half-rate TRAU frame:
Condition one: in the data that meet 7.4kBit/s half-rate TRAU frame flag bit that search out, also meet the requirement of 7.4kBit/s half-rate TRAU frame flag bit with the be separated by data of half-rate TRAU frame length of each flag bit data;
Condition two: in the data that meet 7.4kBit/s half-rate TRAU frame flag bit that search out; With with the be separated by data of half-rate TRAU frame length of the first data be start bit, the requirement of the half-rate TRAU frame flag bit of other speed of data fit afterwards except that 7.4kBit/s.
Below in conjunction with accompanying drawing and embodiment scheme of the present invention is done further explain.
When the Abis mouth adopted TDM to carry, the half-rate channel transmission rate of the 8kbit/s between CCU unit and TRAU unit was 160bit/20ms (being 1bit/125us).In order to search for the half-rate TRAU frame of 7.4kBit/s, at first on the half rate transmission channel of trau frame, cushion 60ms (480 s', 3 half-rate TRAU frame length) data, first frame shown in Fig. 2 (a), second frame and the 3rd frame.
Fig. 2 (b) has provided when a new frame arrives behind the 20ms processing method to buffered data shown in Fig. 2 (a): first frame that will cushion abandons, and second frame is put into the position of first frame, and the 3rd frame is put into the position of second frame, and a up-to-date frame is put into the position of the 3rd frame.
In the present embodiment, comprise the steps: to the searching method of the half-rate TRAU frame of the 7.4kBit/s of AMR encoding/decoding mode
Step 1 begins search from the 1st of buffered data, when searching 6 bit data that the half-rate TRAU frame flag bit that meets 7.4kBit/s requires, with the 1st the possible original position as the 7.4kBit/s half-rate TRAU frame of said 6 bit data;
Said 7.4kBit/s half-rate TRAU frame flag bit requires: the 1st of frame, promptly the original position of frame is 0, the 2nd and is 0, the 3rd and is 1, the 9th and is 0, the 17th to be 1, the 25th be 0.
Step 2; Suppose that said 6 bit data of step 1 are respectively A, B, C, D, E, the F position of buffered data; Whether in order to confirm said possibly original position be the real original position of 7.4kBit/s half-rate TRAU frame, judges further whether one of following two conditions are set up:
Condition 1: the A+160 of buffered data, B+160, C+160, D+160, E+160, F+160 position also meet the requirement of 7.4kBit/s half-rate TRAU frame flag bit, promptly all meet the requirement of 7.4kBit/s half-rate TRAU frame flag bit with the be separated by corresponding 6 bit buffering data of a half-rate TRAU frame of said 6 bit data of step 1 respectively;
Condition 2: 9 bit data that begin from the A+160 position of buffered data all meet the requirement of the half-rate TRAU frame flag bit of other speed except that 7.4kBit/s, and promptly preceding 8 (A+160 to A+167bit) are that 0, the 9 (A+168bit) is 1;
Step 3; An if establishment in said two conditions of step 2; Just needn't judge another, the possible original position of judging before just thinking is exactly the real original position of 7.4kBit/s half-rate TRAU frame, and 160 bit data that begin from this original position are a 7.4kBit/s half-rate TRAU frame; Once search finishes, shown in Fig. 3 (a);
The principle of judging like this is: in E1 transmission (being circuit transmission); Trau frame is not having under the situation of slip; Transmission is unremitting, then transmission; Be that per 160 bit intervals will inevitably be trau frames, so whether what can adopt that this method confirms to search is the half-rate TRAU frame of 7.4kBit/s.Because also may the intermittent transmission non-speech frame under the 7.4kBit/s encoding/decoding mode; And the flag bit of non-speech frame be continuous 80 as frame head; The 9th is 1; So can current find the 7.4kBit/s half-rate TRAU frame after, what the relevant position after 160 maybe be for these two kinds of trau frames is a kind of.
Step 4; If said two conditions of step 2 all are false, just thinking said possibly original position not be the real original position of the half-rate TRAU frame of 7.4kBit/s, continues search and goes down; Search the 160th (comprising the 160th) of buffered data always; If in this scope, found the original position of the half-rate TRAU frame of 7.4kBit/s, just think the half-rate TRAU frame that in current 20ms frame, has found 7.4kBit/s, shown in Fig. 3 (b); Otherwise, in first 160 of buffered data, (comprise the 160th) and do not find the original position of 7.4kBit/s half-rate TRAU frame, just think and in current 20ms frame, do not find the 7.4kBit/s half-rate TRAU frame.
After first 20ms frame search finished, because the 60ms data of buffering have been carried out the renewal shown in Fig. 2 (b), the search of then said next 20ms frame also was that the 1st beginning from buffered data is up to the 160th.
Can find out from Fig. 3 (b); When the possible original position of 7.4kBit/s half-rate TRAU frame appears near the 160th bit position; In order to continue determining step two said conditions; Will have access to the data after surpassing 320, adopt the reason of buffering 60ms (480) data in Here it is the present embodiment.In fact; In the extreme case shown in Fig. 3 (b), needing buffered data at most is 320bit+25bit (the 7.4k sync bit is at preceding 25bit)=345, therefore in other embodiments; The figure place of buffered data is just passable more than 345, not necessarily must be 60ms (promptly 480).
In addition, in order to reduce each search expense, after the original position of the half-rate TRAU frame that searches a correct 7.4kBit/s; Write down this position, when searching for, only need to begin search next time from this record position of buffered data; Get final product up to the 160th; When searching for not then, from the 1st search again of buffered data, adopt this mode and can save a lot of expenses again.
Roughly calculate the mistake searching probability of the said searching method of present embodiment below, suppose that still the probability of each data bit appearance 0 and 1 is 1/2, divide two kinds of situation to calculate below:
(a) when in buffered data, searching 6 bit data that meet the requirement of 7.4kBit/s half-rate TRAU frame flag bit; All meet the requirement of 7.4kBit/s half-rate TRAU frame flag bit with the be separated by corresponding 6 bit buffering data of a half-rate TRAU frame of this 6 bit data respectively, the probability that the mistake search at this moment occurs is:
(1/64)×(1/64)=1/4096=0.024%;
(b) when in buffered data, searching 6 bit data that meet the requirement of 7.4kBit/s half-rate TRAU frame flag bit; The 1st that supposes this 6 bit data is the A position of buffered data; Continuous 9 bit data that begin from the A+160 position of buffered data all meet the requirement of the half-rate TRAU frame flag bit of other speed except that 7.4kBit/s, and the probability that the mistake search at this moment occurs is:
(1/64)×(1/2)×(1/2)×(1/2)×(1/2)×(1/2)×(1/2)×(1/2)×(1/2)×(1/2)=1/32768=0.00305%。
Below in conjunction with an application example method of the present invention is done further explain.
At first cushion the up reception data of 60ms (promptly 480), as shown in Figure 4, should use in the instance, the search procedure of the half-rate TRAU frame of the 7.4kBit/s of AMR encoding/decoding mode comprises:
The first step: the 1st from buffered data begins search, if the location finding that begins in the A position, thinks then that the A position is the possible original position of the half-rate TRAU frame of 7.4kBit/s to meeting 6 bit data that 7.4kBit/s half-rate TRAU frame flag bit requires;
Second step: in order to confirm further whether the A position is the real original position of the half-rate TRAU frame of 7.4kBit/s; Judge further whether initial position, A+160 position also searches 6 bit data that the half-rate TRAU frame that meets 7.4kBit/s requires flag bit; If search; Think that then since 160 bit data of A position be a 7.4kBit/s half-rate TRAU frame, the search of current 20ms frame finishes, and has found the 7.4kBit/s half-rate TRAU frame;
The 3rd step: if do not have the location finding initial to meeting 6 bit data that 7.4kBit/s half-rate TRAU frame flag bit requires in second step in the A+160 position; Then further judge the initial position of A+160bit whether be continuous 8 be 0 thereafter one be 1; If; Think that then 160 bit data that the A position begins are 7.4kBit/s half-rate TRAU frame, the search of current 20ms frame finishes, and has found the 7.4kBit/s half-rate TRAU frame;
The 4th step: if also do not find the 7.4kBit/s half-rate TRAU frame in the 3rd step; Think that then the A position is not the real original position of 7.4kBit/s half-rate TRAU frame; Continue search up to the 160th (comprising the 160th); If 6 bit data that found the half-rate TRAU frame flag bit that meets 7.4kBit/s to require; Then repeated for second step and the 3rd step, if to the 160th original position that does not yet search out the half-rate TRAU frame of 7.4kBit/s, then thinking does not have the 7.4kBit/s half-rate TRAU frame in the current 20ms frame.
In other application example, the order in second step and the 3rd step can be changed.
Searching method according to the invention can effectively reduce the probability of mistake search; The probability that in practical application, occurs is lower; Because behind the frame head of the once correct half-rate TRAU frame that searches 7.4kBit/s; All will be the frame head of a correct half-rate TRAU frame in same position later on, only if slip appears in the centre or the transmission of CCU unit has occurred discontinuous unusual.This method has obtained good effect in practical application.
Certainly; The present invention also can have other various embodiments; Under the situation that does not deviate from spirit of the present invention and essence thereof; Those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.