Background technology
At present, medium access control (MAC) module is carried out in the encryption and decryption process transparent mode (TM) data of Radio Link control (RLC), encryption/decryption parameter COUNT-C is made up of first's (representing with CFN) and second portion (representing with MAC-d HFN (abbreviating HFN as)) two parts, the length of COUNT-C is 32 bits (bit), wherein high 24bit is MAC-d HFN, and low 8bit is CFN.Third generation partner program (3GPP) introducing in the process to Radio Resource control, following description has been done in maintenance to HFN under the TM pattern: all the signaling RB (RadioBearer under the TM pattern, radio bearer) and professional RB, a cover COUNT-C is all used in its uplink and downlink; When the value of CFN circulated (value that is CFN jumps to 0 from 255), the value of MAC-d HFN increased by 1.Fig. 1 is that CFN and access control layer (MAC layer) the encryption and decryption CFN constantly that COUNT-C uses in the prior art exists the schematic diagram that is offset, as shown in Figure 1, if the CFN of wave point (Uu mouth) delivery time of the data of certain transmission channel between mobile subscriber terminal and system's fixed network is CFNTx, the moment that the Uu mouth receives the data start frame is CFNRx, be CFNnow1 in the moment that the MAC layer carries out encryption before sending, be CFNnow2 in the moment that the MAC layer is decrypted processing after receiving, then the relation of the relation of CFNTx and CFNnow1 and CFNRx and CFNnow2 is as follows:
CFNTx=CFNnow1+n1 (1)
CFNRx=CFNnow2-(TTI+n2) (2)
Wherein n1 is the in advance frame number of the encryption moment with respect to delivery time, and n2 is the delay frame number of the deciphering moment with respect to decoded frame, and TTI is a Transmission Time Interval.
By formula (1), formula (2) and Fig. 1 as can be seen, the MAC infill layer constantly or the CFN that uses in constantly with respect to COUNT-C of deciphering have vertical shift.The data that synchronization sends and receives at the Uu mouth, the CFN that uses during its encryption and decryption is unequal, and difference is TTI+n1+n2, and is same, and the moment of the HFN increase by 1 that up encryption and descending deciphering are used also differs TTI+n1+n2.The MAC layer is at uplink and downlink flow process maintenance one cover HFN in the prior art, if increase by 1 time adjustment HFN at up HFN, the HFN that uses during then at this moment descending the deciphering is just incorrect, and vice versa.Cause the user like this when making a phone call, can hear once clickly sound every 2.56 seconds, seriously may cause the HFN of encryption and decryption inconsistent all the time, anomalies such as singing of the stream appear in terminal AMR voice.
With an example existing defective in the prior art is described below:
The metadata cache that receives from the Uu mouth is at the MAC layer, the frame data that the MAC layer receives every 10 milliseconds of processing.Upgrade CFN when the MAC layer receives the interrupt requests of DSP, and judge whether HFN needs to increase by 1.When the CFN circulation time, the HFN that uplink and downlink are shared increases by 1.In the scheme of prior art, the data that the Uu mouth sends the n1 frame data occur and encrypt mistake before the CFN circulation; The data that the Uu mouth receives TTI+n2 frame data decryption error occurs after the CFN circulation.
Fig. 2 is the schematic diagram of prior art up-downgoing data encrypting and deciphering.As shown in Figure 2, suppose from the MAC infill layer the time be carved into the moment that the Uu mouth begins to send data, 2 frames (being n1=2) at interval; From the Uu mouth begin to receive data the time be carved into moment of MAC layer deciphering, 3 frames (being TTI+n2=3) at interval.If current C FN=0 illustrates the CFN circulation primary, then HFN becomes 4 by 3, but the data that this moment, the Uu mouth sent have been carried out the encryption of MAC layer when CFN=254, and the HFN=3 that uses, and mistake occurs so encrypt; Equally, the MAC ciphered data also mistake can occur when CFN=255; When CFN=0, the HFN=4 that MAC deciphering is used, but this moment, decrypted data received from the Uu mouth when CFN=253, should use HFN=3 to be decrypted is so the MAC layer is that mistake all appears in 0,1,2 o'clock deciphering at CFN.Inventor's discovery prior art in the process that realizes the embodiment of the invention removes to safeguard HFN by MAC layered data processing CFN constantly, so that HFN changes constantly inaccurate.
Embodiment
Below by drawings and Examples, the technical scheme of the embodiment of the invention is described in further detail.
The main cause that defective appears in inventor's discovery prior art in the process that realizes the embodiment of the invention is to safeguard HFN according to MAC layered data processing CFN constantly, in order to overcome the defective of prior art, the embodiment of the invention proposes to send or receive data CFN constantly with the Uu mouth and safeguards HFN, specifies as follows.
Fig. 3 is the flow chart of the embodiment of the invention one parameter maintaining method, and as shown in Figure 3, present embodiment specifically comprises:
Step 101, send the moment CFNnow of processing,, then upgrade encryption parameter if wave point (Uu mouth) is gone up the radio frames numbering circulation of data delivery time CFNTx (CFNTx=CFNnow+n1) at the MAC layer;
Step 102, receive the moment CFNnow of processing at the MAC layer, if deciphering parameter is then upgraded in the Data Receiving radio frames numbering circulation of CFNRx (CFNRx=CFNnow-(TTI+n2)) constantly on the Uu mouth.
The radio frames numbering of present embodiment can be CFN, encryption parameter can be for sending HFN, deciphering parameter can be for receiving HFN, present embodiment is safeguarded two cover HFN, wherein step 101 is for sending the processing procedure of HFN, step 102 is for receiving the processing procedure of HFN, and the execution sequence between step 101 and the step 102 can exchange.
Present embodiment adopts the different HFN of two covers in the uplink and downlink processing procedure, solved the problem that causes owing to the up-downgoing data encrypting and deciphering parameter update time difference, has avoided the user anomaly of clickly sound or singing of the stream to occur when making a phone call.
Fig. 4 is the flow chart of the embodiment of the invention two parameter maintaining methods.Present embodiment adopts maintaining uplink and descending two modes of overlapping HFN respectively, as shown in Figure 4, specifically comprises:
Step 201, send moment of processing,, then upgrade encryption parameter if send the radio frames numbering of handling constantly and frame number sum circulation in advance at the MAC layer;
The transmission of this step handle constantly can for logarithm according to the moment of encrypting owing to want earlier data to be encrypted before sending data, therefore encrypting constantly will be early than delivery time.If encrypting constantly, employed transmission HFN is HFNTx (being the encryption parameter in the step 201), encrypting CFN constantly is CFNnow1 (being the radio frames numbering in the step 201), if HFNTx is then upgraded in the circulation of the value of CFNnow1+n1, being about to the HFNTx value increases by 1, and wherein n1 is for shifting to an earlier date frame number.
Fig. 5 is the schematic diagram of the embodiment of the invention two parameter maintaining method steps 201, as shown in Figure 5, and n1=2, CFNnow1=254, the then value of CFNnow1+n1 circulation, promptly circulation will appear in the CFN of delivery time, and then present embodiment is being encrypted (CFNnow1) advancing updating HFNTx constantly.
Step 203, receive moment of processing at the MAC layer, if deciphering parameter is then upgraded in Data Receiving radio frames numbering circulation constantly on the Uu mouth;
Because sending data, the Uu mouth has strict sequential, there is not strict sequential and receive data, there is delay phenomenon, i.e. data that receive constantly for difference, the value of parameter n2 in the formula (2) is unfixing, safeguard deciphering parameter so can not simply utilize MAC to handle CFN constantly, present embodiment is safeguarded deciphering parameter in conjunction with CFN and the MAC processing CFN constantly of the Uu mouth time of reception.
Before step 203, also comprise in the present embodiment: obtain Data Receiving radio frames numbering constantly on the transmission channel.Carry out this step and be divided into following two kinds of situations:
First kind of situation: if when the MAC layer detects the data of reception, then above-mentioned reception is handled and is deciphering constantly constantly, obtains that Data Receiving radio frames numbering constantly is specially on the transmission channel: step 202A, by parsing Data Receiving radio frames numbering constantly the data head that receives from arbitrary transmission channel.
Specifically, establishing employed HFN of the deciphering moment is HFNRx (being the deciphering parameter in the step 202), and deciphering CFN constantly is CFNnow2, and the CFN of the time of reception is CFNRx.For different transmission channels, its CFNnow2 is identical, but different transmission channels has different TTI, follow following conclusion in the process that system realizes: no matter how many TTI of transmission channel quantity and each transmission channel is, the radio frames of CFN=0 is the border of public TTI, and promptly the CFN one of each transmission channel fixes on the border cocycle of public TTI.
According to above-mentioned conclusion as can be known, the different transport channel data that synchronization is decrypted, the HFN that deciphering is used constantly is identical.When CFNnow2=x, the MAC layer is decrypted the data that receive, can obtain this moment and receive the CFN that the data head comprises on arbitrary the transmission channel, with the CFNRx of this CFN as the Data Receiving moment on the transmission channel, upgrade with this CFNRx and to use FNRx, even CFNRx circulation, then the value with HFNRx increases by 1.
Second kind of situation: if when the MAC layer does not detect the data of reception, the radio frames numbering of obtaining the Data Receiving moment on the transmission channel comprises:
Step 202B, obtain the radio frames numbering of receive handling constantly;
The difference of step 202C, the minimum TTI of obtaining reception the radio frames numbering of handling the moment and the transmission channel with minimum TTI and delay frame number sum is numbered described difference as the radio frames constantly of Data Receiving on the transmission channel.
Specifically, when CFNnow2=y, the MAC layer does not detect the data that the Uu mouth receives, and does not promptly need decrypted data this moment, then obtains the radio frames that receives the processing moment and is numbered y.The conclusion of following in the process according to the said system realization, circulation does not appear in Data Receiving CFN constantly on the transmission channel of minimum TTI if having, at Data Receiving CFN constantly circulation can not appear yet on other transmission channels then, so present embodiment upgrades deciphering parameter according to the radio frames numbering (representing with CFNRx3) constantly of Data Receiving on the transmission channel with minimum TTI, can obtain according to formula (2):
CFNRx3=y-(TTImin+n2) (4)
Wherein TTImin is the minimum transfer time interval, and n2 is the delay frame number of the deciphering moment with respect to decoded frame.Therefore, when the CFNRx3 circulation time, with the value increase by 1 of HFNRx.
Present embodiment adopts the different HFN of two covers in the uplink and downlink processing procedure, be respectively HFNTx and HFNRx, shielded the time difference of upgrading between uplink and downlink data encrypting and deciphering parameter, solved the user when making a phone call, occurs clickly or the problem of singing of the stream; Further, present embodiment considers that receiving data from the Uu mouth has discontinuity and lag characteristic, safeguard deciphering parameter in conjunction with CFN that utilizes the time of reception and deciphering CFN constantly, solved owing to each transmission channel receives noise appears in data the unfixing AMR voice that cause to the time of delay the deciphering of MAC layer problem from the Uu mouth.
Fig. 6 is an embodiment of the invention parameter maintenance schematic representation of apparatus, as shown in Figure 6, present embodiment comprises: first update module 11 is used for sending at the MAC layer moment of processing, if encryption parameter is then upgraded in the circulation of the radio frames of data delivery time numbering on the Uu mouth; Second update module 12 is used for receiving at the MAC layer moment of processing, if deciphering parameter is then upgraded in Data Receiving radio frames numbering circulation constantly on the Uu mouth.
Wherein first update module 11 can comprise first computing unit 111, is used to obtain send handle unlimited frame number constantly and shift to an earlier date the frame number sum; Updating block 112 is used for then upgrading encryption parameter if unlimited frame number constantly and frame number sum circulation are in advance handled in the transmission that gets access to.
Present embodiment can also comprise: acquisition module 13 is used to obtain Data Receiving radio frames numbering constantly on the transmission channel.
Further, above-mentioned acquisition module 13 can comprise: resolution unit 131 is used for when the MAC layer detects the data of reception, by parsing Data Receiving radio frames numbering constantly on the transmission channel the data head that receives from arbitrary transmission channel; Can also comprise: acquiring unit 132, be used for when the MAC layer does not detect the data of reception, obtain and receive the radio frames numbering of handling constantly; Second computing unit 133, be used to obtain the minimum transfer time interval that receives the radio frames numbering of handling the moment and transmission channel and the difference that postpones the frame number sum, with the radio frames numbering of this difference as the Data Receiving moment on the transmission channel with minimum transfer time interval.
Present embodiment adopts the different HFN of two covers in the uplink and downlink processing procedure, be encryption parameter and deciphering parameter, solve the problem that causes owing to the up-downgoing data encrypting and deciphering parameter update time difference, avoided the user anomaly of clickly sound or singing of the stream when making a phone call, to occur.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is when carrying out, execution comprises the step of said method embodiment, and aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to the technical scheme of the explanation embodiment of the invention, is not intended to limit; Although the embodiment of the invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of each embodiment technical scheme of the embodiment of the invention.