CN112579045B - Pseudo-random sequence generation method, pseudo-random sequence generation device and storage medium - Google Patents

Pseudo-random sequence generation method, pseudo-random sequence generation device and storage medium Download PDF

Info

Publication number
CN112579045B
CN112579045B CN202011531712.8A CN202011531712A CN112579045B CN 112579045 B CN112579045 B CN 112579045B CN 202011531712 A CN202011531712 A CN 202011531712A CN 112579045 B CN112579045 B CN 112579045B
Authority
CN
China
Prior art keywords
pseudo
random sequence
sequence
phase shift
state transition
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.)
Active
Application number
CN202011531712.8A
Other languages
Chinese (zh)
Other versions
CN112579045A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011531712.8A priority Critical patent/CN112579045B/en
Publication of CN112579045A publication Critical patent/CN112579045A/en
Application granted granted Critical
Publication of CN112579045B publication Critical patent/CN112579045B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/582Pseudo-random number generators

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Digital Transmission Methods That Use Modulated Carrier Waves (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application discloses a method and a device for generating a pseudo-random sequence and a storage medium, and belongs to the technical field of computers. The method for generating the pseudo-random sequence can realize the effect of automatically generating the target pseudo-random sequences corresponding to different first phase shift values. In the generation process, performing K 1 rounds of iteration on the initial mask to obtain a mask corresponding to the first phase shift value, and obtaining the target pseudo-random sequence through logic operation between the mask and a state column vector of the source pseudo-random sequence. The phase shift value may be derived by parameter configuration and thus may support pseudo-random sequence generation for arbitrary phase shifts. In the generation process, the useful pseudo-random sequence value after any phase shift can be directly calculated, the generation of the previous useless sequence value is not needed, the delay generated by the target pseudo-random sequence is reduced, the efficiency of generating the target pseudo-random sequence in real time under different phase shifts is improved, and the communication efficiency of the communication device is further improved.

Description

Pseudo-random sequence generation method, pseudo-random sequence generation device and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for generating a pseudo-random sequence and a storage medium.
Background
In the field of communications, pseudo-random codes can be used for communications performance testing or secure communications. Among them, gold sequences having good auto-correlation and cross-correlation are most widely used.
In the related art, the communication device calculates two m sequences, and the two m sequences obtain corresponding Gold sequences after modulo-2 sum operation. Since the actually required Gold sequence itself has a phase shift and the m sequence also has a phase shift, according to the method for normally obtaining the Gold sequence, the device needs to wait for the duration after the total phase shift to obtain the actually required Gold sequence. To reduce the latency of this portion, the device typically pre-holds a number of masks, which correspond to the total phase. When the known total phase corresponds to a pre-saved mask, the device will process the m-sequence according to the mask, resulting in the required Gold sequence.
Disclosure of Invention
The embodiment of the application provides a method and a device for generating a pseudo-random sequence and a storage medium. The technical scheme is as follows:
according to an aspect of the present application, there is provided a method for generating a pseudo random sequence, the method comprising:
acquiring a first phase shift value Q 1,Q1 configured for a source pseudo-random sequence as a positive integer;
The number of bits that convert the first phase shift value Q 1 to the binary value Q 2,Q2 is K 1,K1 a positive integer;
performing K 1 rounds of iteration on the initial mask corresponding to the source pseudo-random sequence to obtain a mask corresponding to the first phase shift value Q 1, wherein the iteration is to obtain a mask corresponding to the next round according to the mask corresponding to the current round and a state transition matrix;
And generating a target pseudo-random sequence through logic operation between a mask corresponding to the first phase shift value Q 1 and a state column vector of the source pseudo-random sequence.
According to another aspect of the present application, there is provided an apparatus for generating a pseudo random sequence, the apparatus comprising:
the parameter acquisition module is used for acquiring a first phase shift value Q1 configured for a source pseudo-random sequence, wherein Q 1 is a positive integer;
The digital system conversion module is used for converting the first phase shift value Q 1 into a binary number value Q 2,Q2, wherein the number of bits of the first phase shift value Q 1 is K 1,K1 which is a positive integer;
The mask iteration module is used for carrying out K 1 rounds of iteration on the initial mask corresponding to the source pseudo-random sequence to obtain a mask corresponding to the first phase shift value Q 1, wherein the iteration is carried out on the mask corresponding to the current round and the state transition matrix to obtain a mask corresponding to the next round;
And the sequence generation module is used for generating a target pseudo-random sequence through logic operation between a mask corresponding to the first phase shift value Q 1 and a state column vector of the source pseudo-random sequence.
According to another aspect of the present application, there is provided a communication device comprising a processor and a memory having stored therein at least one instruction loaded and executed by the processor to implement a method of generating a pseudo-random sequence as provided by the various aspects of the present application.
According to another aspect of the present application, there is provided a computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement a method of generating a pseudo random sequence as provided by the various aspects of the present application.
According to one aspect of the present application, a computer program product is provided that includes computer instructions stored in a computer readable storage medium. The computer instructions are read from the computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in various alternative implementations of the pseudo-random sequence generation method described above.
According to the embodiment of the application, under the condition that the current software architecture and hardware structure are not changed, when the communication device needs the target pseudo-random sequences corresponding to different phase shift values, the effect of automatically generating the target pseudo-random sequences corresponding to different first phase shift values can be realized. In the generation process, performing K 1 rounds of iteration on the initial mask to obtain a mask corresponding to the first phase shift value, wherein K 1 is the number of bits of the binary number value equal to the first phase shift value, and finally obtaining the target pseudo-random sequence through logic operation between the mask and the state column vector of the source pseudo-random sequence. According to the method for generating the pseudo-random sequence, the phase shift value can be obtained through parameter configuration, so that the generation of the pseudo-random sequence with any phase shift can be supported. In the generation process, the useful pseudo-random sequence value after any phase shift can be directly calculated, the generation of the previous useless sequence value is not needed, the delay generated by the target pseudo-random sequence is reduced, the efficiency of generating the target pseudo-random sequence in real time under different phase shifts is improved, and the communication efficiency of the communication device is further improved.
Drawings
In order to more clearly describe the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments of the present application will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 is a schematic diagram of a communication system according to an embodiment of the present application;
FIG. 2 is a block diagram of a transmitter provided in accordance with the embodiment of FIG. 1;
fig. 3 is a block diagram of a receiver provided in accordance with the embodiment of fig. 1;
FIG. 4 is a logic diagram for generating Gold sequences;
Fig. 5 is a schematic diagram of a pseudo random sequence corresponding to a frequency domain resource occupied by a PDSCH (Physical Downlink SHARED CHANNEL) and a DMRS (Demodulation reference signal) of the PDSCH;
FIG. 6 is a flowchart of a method for generating a pseudo-random sequence according to an exemplary embodiment of the present application;
FIG. 7 is a flowchart of a method for generating a pseudo-random sequence according to another exemplary embodiment of the present application;
fig. 8 is a schematic diagram of a pseudo random sequence generation flow provided in an embodiment of the present application;
fig. 9 is a block diagram of a pseudo random sequence generating apparatus according to an exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it should be noted that, unless explicitly specified and limited otherwise, the terms "connected," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Referring to fig. 1, fig. 1 is a schematic diagram of a communication system according to an embodiment of the application. In fig. 1, a transmitter 1A and a receiver 1B are included. Wherein the transmitter 1A is configured to transmit a target signal to the receiver 1B. Accordingly, the receiver 1B is configured to receive the target signal transmitted by the transmitter 1A.
For the transmitter 1A, the transmitter 1A needs to encode the original signal before generating the target signal. In the encoding process, a target pseudo-random sequence with good autocorrelation and cross correlation is needed to participate, so that the anti-interference performance of the encoded target signal is good, and meanwhile, the security is high. The target pseudo-random sequence needs to be generated at the local end of the transmitter 1A.
For the receiver 1B, the receiver 1B needs to decode the target signal after receiving the target signal. In the decoding process, a corresponding target pseudo-random sequence needs to be used with the transmitter 1A in the encoding process. The target pseudo-random sequence needs to be generated at the local end of the receiver 1B.
Based on the communication system shown in fig. 1, the method for generating the target pseudo-random sequence provided by the application can be applied to a communication device. The communication device may be either a transmitter in a communication system or a receiver in a communication system. In the practical application, a device is a transmitter when transmitting a signal and a receiver when receiving a signal.
Alternatively, the communication means may be one of a base station, a terminal, or a chip according to the setting of the size and the shape of the apparatus.
The following describes the procedure of processing the target signal by the transmitter 1A and the receiver 1B, respectively.
Referring to fig. 2, fig. 2 is a block diagram of a transmitter provided based on the embodiment shown in fig. 1. In fig. 2, the transmitter 1A includes a reference signal generation module 211, a coding module 212, a modulation module 213, a resource mapping module 214, an OFDM baseband signal generation module 215, and a transmitter radio frequency module 216 (english: TRANSMITTER RADIO FREQUENCY, abbreviated: tx-RF).
In fig. 2, an original signal to be transmitted in a transmitter is input to an encoding module 212, and a reference signal generating module 211 is used to generate a reference signal based on a target pseudo random sequence. On the one hand, the original signal is encoded by the encoding module 212 and then input to the modulating module 213, where the modulating module 213 is configured to modulate the original signal encoded by the encoding module. The modulation module 213 transmits the signal to the resource mapping module 214 after completing the signal processing. On the other hand, the reference signal is transmitted from the reference signal generation module 211 to the resource mapping module 214 after being generated. After the signals are processed by the resource mapping module 214, baseband signal generation will be performed in the OFDM baseband signal generation module 215. Eventually, the processed signal will be transmitted through the antenna under the arrangement of the transmitter radio module 216.
Referring to fig. 3, fig. 3 is a block diagram of a receiver according to the embodiment shown in fig. 1. In fig. 3, the receiver includes a reference signal generating module 311, a receiver radio frequency module 312 (english: receiver Radio Frequency, abbreviated: rx-RF), a timing and frequency synchronization module 313, a channel estimation and equalization module 314, a demodulation module 315, and a decoding module 316.
In fig. 3, the receiver processes the target signal transmitted from the transmitter through the receiver rf module 312. The received signal is then processed by a timing and frequency synchronization module 313 and input to a channel estimation and equalization module 314. Meanwhile, the channel estimation and equalization module 314 acquires a reference signal from the reference signal generation module 311, where the reference signal is generated by the reference signal generation module 311 based on the target pseudo random sequence. The demodulation module 315 demodulates the signal passing through the channel estimation and equalization module 314. The demodulated signal is transmitted to the decoding module 316. After the decoding module 316 decodes the signal, the receiver will obtain the information contained in the target signal.
In the field of communications, pseudorandom sequences are commonly used for testing communication performance or encrypting communication content because they have good randomness and correlation functions close to white noise. Since the pseudo-random sequence needs to be generated in real time by the pseudo-random sequence generator. Thus, the speed and efficiency with which the pseudo-random sequence generator generates the pseudo-random sequence will directly affect the speed and efficiency of the communication performance test, which will keep the efficiency of the communication secret.
In practice, the portion of the pseudo-random sequence that is typically used is the portion after the specified phase shift. In one application, a pseudo-random sequence with good auto-correlation and cross-correlation will be used to generate communication functions such as scrambling codes and DMRS.
In particular, m-sequences have the best autocorrelation characteristics as the most studied pseudo-random sequences, but the number of family sequences with better cross-correlation characteristics is small, which limits the application of m-sequences. Based on this, researchers find that Gold sequences have good auto-correlation and cross-correlation properties, and the number of family sequences is large. Therefore, gold sequences are widely used as pseudo-random sequences for practical applications in LTE (Long Term Evolution ) and NR (New Radio) systems in general.
The Gold sequence is a pseudo-random sequence generated by adding two m sequences with equal code length through modulo 2.
Next, a method for generating Gold sequences is described.
c(n)=(x1(n+Nc)+x2(n+Nc))mod2 (1)
x1(n+31)=(x1(n+3)+x1(n))mod2 (2)
x2(n+31)=(x2(n+3)+x2(n+2)+x2(n+1)+x2(n))mod2 (3)
In the above formulas (1), (2) and (3), N c=1600,x1 (N) and x 2 (N) are two m-sequences. The initial state of the first m-sequence x 1 (n), i.e. the first 31 values x 1(0)=1.x1 (n) =0, n=1, 2, 3..30 the initial state of the second m-sequence x 2 (n) can be according to the expressionBy solving, c init can be configured to different values through parameters so as to achieve the effect of obtaining different Gold sequences.
Accordingly, referring to fig. 4, fig. 4 is a logic diagram for generating Gold sequences. In the logic circuit diagram shown in fig. 4, the first m-sequence x 1 (n) and the second m-sequence x 2 (n) are processed by the logic circuit to complete the operation procedures shown in the above-mentioned expression (1), expression (2) and expression (3).
In FIG. 4, the multiplication coefficient of the first m-sequence is
f=[f0,f1,...,f30]
=[1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
The multiplication coefficient of the second m sequence is
g=[g0,g1,...,g30]
=[1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
The Gold sequence c (N) shown in this example is a sequence of modulo-2 sums of two m sequences that are phase-shifted by N c with respect to the initial state by the multiplication coefficient of the m sequences and the logic circuit diagram shown in fig. 4. That is, in order to calculate the value c (0) of the 1 st bit of the pseudo random sequence, two m-sequence state registers need to be shifted N c times from the initial state. Based on this scenario, if the gold sequence c (N) is obtained in this conventional manner, the system needs to wait for N c cycles before it can start to obtain the first bit of the gold sequence c (N). If the length of the gold sequence c (N) includes L bits, the device needs to go through N c +l cycles to obtain the actually required gold sequence c (N).
An application scenario for actually generating gold sequences is described below. Taking a demodulation reference signal DMRS of a physical downlink shared channel PDSCH as an example, the generated gold sequence is modulated into a DMRS symbol and then mapped to a time-frequency resource. Wherein the reference point of the frequency domain resource sequence number k may be the first resource block CRB0 in the common resource block. Whereas the DMRS is not necessarily located on the frequency domain resource starting from CRB0 according to the location of BWP (Bandwidth Part) and the resource allocation of PDSCH, so the corresponding sequence is not necessarily starting from the first value c (0) of the pseudo random sequence, but there may be different phase shifts. The pseudo-random sequence corresponding to the frequency domain resource and the DMRS thereof is shown in fig. 5. Fig. 5 is a schematic diagram of a pseudo random sequence corresponding to the frequency domain resource occupied by PDSCH and DMRS of PDSCH.
In fig. 5, PDSCH and DMRS symbols of PDSCH may be located at the starting positionLength ofIs a frequency domain resource grid.The value of (c) is provided by the high-level parameter offsetToCarrier,The range of the value of (a) is 0-2199, and the corresponding range of the initial RB (Resourcc Block, resource block) of the PDSCH and the DMRS is CRB 0-2199.
Illustratively, the number of DMRS symbols corresponding to each RB is K. The corresponding pseudorandom sequence length is 2K. In the DMRS configuration type 1 and type 2, the value of K is 6 and 4, respectively. Accordingly, the maximum range of possible phase shifts of the useful pseudorandom sequence required to generate the DMRS symbol is
The value range is 0 to 26399. That is, when the device calculates the pseudo random sequence using this method, since the m sequence itself also needs the phase shift 1600, the phase shift range corresponding to the m sequence is 1600 to 27999.
The pseudo-random sequence may be started from an initial state by a shift register, outputting a new sequence value every clock cycle. As shown in the foregoing, the former part generated in the pseudo random sequence is a sequence that is not used, i.e., a useless sequence. The corresponding useful sequence may start from the nth value, i.e. corresponds to a phase shift N. When the value of the phase shift N is large, the terminal needs a long period to obtain the first value of the useful sequence, which causes waste of computing resources and huge delay, and is difficult to meet the requirement of processing time. Based on this, a method of calculating a pseudo-random sequence based on a mask, which can support arbitrary phase shifts, of the present application will now be described.
The phase shift relationship of the two m-sequences x 1 (n) and x 2 (n) is expressed as a matrix multiplication under the following galois field GF (2) according to the generation formula of the pseudo random sequence. In the present application, the operations are all operations in the galois field GF (2), unless otherwise specified.
X1(n)=[x1(n),x1(n+1),...,x1(n+30)]T
X2(n)=[x2(n),x2(n+1),...,x2(n+30)]T
Wherein,
In this case, in the case of the solution,Is the first row of (2)I.e. the mask at the first m-sequence phase shift N c, the sequence value after the first m-sequence phase shift N c can be directly calculated by the initial state and the mask. Please see the following formula:
In this equation, the parameter x 1(n+Nc to the left of the equation) represents the sequence after the first m-sequence shift N c. The first term on the right of the equation Representing the corresponding mask for the first m-sequence shift N c, the second term x 1(n),x1(n+1),…,x1(n+30)]T is the state column vector for the first m-sequence.
The 31 elements included in the state column vector are the number of linear shift registers for generating the first m-sequence. In the embodiment of the application, after the communication device reads the respective elements in the 31 linear shift registers, the row vectors formed by the 31 elements are transposed to obtain the state column vector corresponding to the first m sequence. In other embodiments, when the number of the linear shift registers used for generating the first m-sequence is other values, for example, the number of the linear shift registers is b, and b is a positive integer, after the communication device reads the respective elements in the b linear shift registers, the communication device transposes the row vector formed by the b elements to obtain the state column vector corresponding to the first m-sequence, that is, the number of the state column vectors is b.
Similarly, the sequence value after the second m-sequence shift N c can also be obtained by the same method. Wherein the second m-sequence is denoted by x 2 (n).
Is the first row of (2)I.e. the mask at the second m-sequence x 2 (N) phase shift N c, byCorresponding state column vector sumThe second m-sequence phase shift N c may be directly calculated.
Thus, the first m-sequence x 1 (n) and the second m-sequence x 2 (n) are modulo-2 summed, and the Gold sequence is obtained directly.
c(n)=(x1(n+Nc)+x2(n+Nc))mod 2
Therefore, the mask-based scheme can directly obtain the useful Gold sequence, and the linear shift register for generating the m sequence does not need to output a plurality of useless values bit by bit, and then outputs the useful Gold sequence. Thereby saving clock cycles for generating useless sequence values.
However, in communication performance testing or secure communication using pseudo-random sequences, the phase shift of the useful pseudo-random sequences is not fixed in different application scenarios. The phase shift may have different values according to the frequency domain resource positions occupied by the BWP and the PDSCH. Meanwhile, the range of the phase shift is large, and masks corresponding to different phase shifts are different. Therefore, the above scheme can only calculate the corresponding mask for a certain fixed phase shift in advance, and cannot dynamically support any phase shift by parameter configuration when generating a sequence. In other words, if the above scheme is used to pre-calculate and store the mask corresponding to each phase shift, because the range of values of the phase shift is very large, pre-storing all possible masks consumes huge memory resources, and the cost of quickly obtaining the pseudo-random sequence is too high under the condition that the memory space of the communication device is limited.
Based on the method, the mask corresponding to the useful pseudo-random sequence can be calculated in real time, so that the useful pseudo-random sequence can be obtained rapidly and efficiently.
Referring to fig. 6, fig. 6 is a flowchart of a method for generating a pseudo random sequence according to an exemplary embodiment of the present application. The method of generating a pseudo-random sequence may be applied to the communication apparatus shown above. In fig. 6, the method for generating the pseudo random sequence includes:
In step 610, a first phase shift value Q 1,Q1 configured for the source pseudorandom sequence is obtained as a positive integer.
In the embodiment of the present application, when the communication device needs to use the target pseudo-random sequence, the communication device generally obtains the corresponding phase shift value from the higher layer parameters. The communication device then combines the phase shift values that the source pseudo-random sequence itself needs to be shifted. The communication device may determine the total phase shift value as the first phase shift value Q 1.
In this example, the source pseudo-random sequence may be a sequence actively generated by a pseudo-random sequence automatic generator. In one possible manner, the number of source pseudo-random sequences may be one or more than one.
If the number of the source pseudo-random sequences is more than one, the source pseudo-random sequences can be a group, and the terminal generates a group of source pseudo-random sequences according to a preset generation mode.
For example, if the number of source pseudorandom sequences is two in one set, and the number of bits of the two source pseudorandom sequences is required to be equal. In this case the terminal will control the automatic generator to generate a source pseudo-random sequence of equal two digits.
It should be noted that, the number of the source pseudo-random sequences generated in the embodiment of the present application and the number of bits of the source pseudo-random sequences will all be performed according to preset conditions, the present application is not limited to a specific source pseudo-random sequence generation manner, and the manner of generating 2 source pseudo-random sequences is only illustrative.
In one possible way, the first phase shift value may be a given value. In another possible manner, the first phase shift value can be calculated by simple numerical accumulation, which is not limited by the embodiment of the present application.
In step 620, the number of bits for converting the first phase shift value Q 1 to the binary value Q 2,Q2 is K 1,K1, which is a positive integer.
In the present application, the communication device can perform the numerical adjustment on the first phase shift value Q 1. In one case, the first phase shift value Q 1 may be a non-binary number such as a decimal number, octal number, or hexadecimal number prior to adjustment. In another case, if the first phase shift value Q 1 is itself a binary number, then this step is substantially identical for Q 1 and Q 2. In the case where Q 1 and Q 2 are identical, the subsequent step processing is directly performed.
This step is illustrated by taking the first phase shift value Q 1 as an example of the decimal 2100. Wherein the decimal number 2100 is 1000 0011 0100 converted to a binary number due to 2100=1*211+0*210+0*29+0*28+0*27+0*26+1*25+1*24+0*23+1*22+0*21+0*20,. Thus, this step yields a binary number 1000 0011 0100 from the decimal number 2100, and the number of bits of the binary number is 12 bits.
In step 630, iterating the initial mask corresponding to the source pseudo-random sequence for K 1 rounds to obtain a mask corresponding to the first phase shift value Q 1, where iterating is to obtain a mask corresponding to the next round according to the mask corresponding to the current round and the state transition matrix.
In an embodiment of the application, the source pseudo-random sequence corresponds to an initial mask. The number of bits of the initial mask is equal to the number of bits of the source pseudorandom sequence, and the first bit of the initial mask is 1 and the remaining bits are 0.
The application can start iteration from the initial mask, and the result of each iteration is the input of the next iteration. And performing K 1 rounds of iteration to obtain a mask corresponding to the first phase shift value Q 1.
In step 640, a target pseudorandom sequence is generated by a logical operation between the mask corresponding to the first phase shift value Q 1 and the state column vector of the source pseudorandom sequence.
In this example, the communication device may multiply the mask corresponding to the first phase shift value Q 1 with the state column vector of the source pseudo-random sequence to obtain the corresponding target pseudo-random sequence. Wherein the algorithm represented by step 640 may be a general term algorithm. The communication device can calculate each bit of the target pseudo-random sequence according to the method provided by the step. For example, the communication device multiplies the mask corresponding to the first phase shift value Q 1 by the state column vector to generate the target bits of the target pseudo-random sequence.
After the target pseudo-random sequence is obtained, the embodiment of the application can use the target pseudo-random sequence as a communication performance test. The embodiment of the application can also use the target pseudo-random sequence as secret communication.
In summary, the embodiment of the present application can achieve the effect of automatically generating the target pseudo-random sequences corresponding to different first phase shift values when the communication device needs the target pseudo-random sequences corresponding to different phase shift values without changing the current software architecture and hardware structure. In the generation process, performing K 1 rounds of iteration on the initial mask to obtain a mask corresponding to the first phase shift value, wherein K 1 is the number of bits of the binary number value equal to the first phase shift value, and finally obtaining the target pseudo-random sequence through logic operation between the mask and the state column vector of the source pseudo-random sequence. According to the method for generating the pseudo-random sequence, the phase shift value can be obtained through parameter configuration, so that the generation of the pseudo-random sequence with any phase shift can be supported. In the generation process, the useful pseudo-random sequence value after any phase shift can be directly calculated, the generation of the previous useless sequence value is not needed, the delay generated by the target pseudo-random sequence is reduced, the efficiency of generating the target pseudo-random sequence in real time under different phase shifts is improved, and the communication efficiency of the communication device is further improved.
Optionally, the phase shift value in the application can be obtained through parameter configuration, and the mask corresponding to each phase shift is not required to be calculated and stored in advance, and huge memory resources are not required to be added and consumed, so that the current software architecture and hardware structure are not required to be changed.
Based on the scheme disclosed in the previous embodiment, the terminal can further improve the efficiency of calculating the obtained mask through setting a specific iterative mode and introducing a parallel processing means. Thus, the efficiency of the present application in calculating the target pseudo-random sequence is improved comprehensively, please refer to the following examples.
Referring to fig. 7, fig. 7 is a flowchart of a method for generating a pseudo random sequence according to another exemplary embodiment of the present application. The method for generating the pseudo random sequence can be applied to the terminal shown above. In fig. 7, the method for generating the pseudo random sequence includes:
In step 710, a first phase shift value Q 1 configured for a source pseudorandom sequence is obtained.
In the embodiment of the present application, the execution of step 710 is the same as the execution of step 410, and will not be described here again.
In addition, in the embodiment of the application, the terminal can acquire the first numerical value input by the user through the input component and determine the first numerical value as the first phase shift value. For example, the input component may be a hardware device such as a touch screen, mouse, keyboard, or microphone. The user can input a first value into the terminal through the above hardware device, and the terminal determines the first value as the first phase shift value.
In step 720, the first phase shift value Q 1 is converted to a binary value Q 2.
In the embodiment of the present application, the execution process of step 720 is the same as the execution process of step 420, and will not be described here again.
In step 731, when the number of bits of the binary value Q 2 corresponding to the ith round is 1, in the ith round iteration, multiplying the mask corresponding to the ith round by the state transition matrix corresponding to the ith round to obtain the mask corresponding to the (i+1) th round, where i is a natural number and i is less than or equal to K 1 -1.
In the embodiment of the application, the communication device performs different processing according to the number of bits of the binary number Q 2 in each round. When the number of bits of the binary value Q 2 is 1, the present application performs step 731; when the number of bits of binary value Q 2 is 0, the application proceeds to step 732.
In step 732, when the number of bits of the binary number Q 2 corresponding to the ith round is 0, in the ith round iteration, the mask corresponding to the ith round is determined as the mask corresponding to the (i+1) th round.
In the iteration process provided by the application, K 1 rounds of iteration are performed in total. In the present application, i=0 in the first iteration; on iteration K 1, i=k 1 -1.
When i is equal to 0, the mask corresponding to the ith round is an initial mask, the state transition matrix corresponding to the ith round is an initial state transition matrix, the initial state transition matrix is a square matrix with the order of D, and D is a positive integer.
The source pseudo-random sequence is a sequence generated by the D linear feedback shift registers, and the element value of the D line of the initial state transition matrix is a multiplication coefficient corresponding to the linear feedback shift registers.
When i is equal to K 1 -1, the mask corresponding to round K 1 -1 is the mask corresponding to the first phase shift value Q 1.
In step 741, a first state transition matrix is obtained according to the mask corresponding to the initial state transition matrix and the first phase shift value Q 1, where the number of rows of the first state transition matrix is the parallelism P of the target pseudo-random sequence.
In this example, the first state transition matrix is described by taking Fp as an example.
The communication device can use a mask corresponding to the phase shift value Q 1 +j as a j-th row of the first state transition matrix, wherein j is a natural number and is smaller than or equal to P-1. Since the number of rows of the first state transition matrix Fp is P, the first state transition matrix Fp can be obtained by this method by a row-by-row method.
Step 742, obtaining a second state transition matrix according to the parallelism P and the initial state transition matrix, where the second state transition matrix is the power P of the initial state transition matrix.
In this example, the second state transition matrix is described by taking Fs as an example.
And step 743, processing the source pseudo-random sequence to obtain a target pseudo-random sequence according to the first state transition matrix and the second state transition matrix.
In actual processing, the first state transition matrix and the second state transition matrix can participate in multiple iterations, and specified data processing is performed in the iteration process, so that the source pseudo-random sequence is processed, and the target pseudo-random sequence is obtained.
In an embodiment of the present application, step 743 may be implemented by replacing step (1) and step (2).
Step (1), performing X-1 times of iterative processing on the source pseudo-random sequence according to the second state transition matrix to generate an intermediate state sequence; wherein, if L/P is an integer, X is equal to L/P; if L/P is a non-integer, then X is equal to A,0<A-L/P <1, A is a positive integer.
And (2) multiplying the first state transition matrix with the intermediate state sequence to generate a target pseudo-random sequence.
In the present application, if the source pseudo-random sequence includes at least the first source pseudo-random sequence and the second source pseudo-random sequence, the communication device may achieve the effect of generating the target pseudo-random sequence through step (3), step (4) and step (5).
And (3) taking the first source pseudo-random sequence processed by the mask corresponding to the first phase shift value of the first source pseudo-random sequence as a first target pseudo-random sequence.
And (4) taking the second source pseudo-random sequence subjected to mask processing corresponding to the first phase shift value of the second source pseudo-random sequence as a second target pseudo-random sequence.
And (5) performing modulo-2 sum operation on the first target pseudo-random sequence and the second target pseudo-random sequence to generate a target pseudo-random sequence.
In the present application, as a possible implementation manner, the first source pseudo-random sequence and the second source pseudo-random sequence are m sequences, respectively, and the target pseudo-random sequence is a Gold sequence. Further, the target pseudo-random sequence is a useful sequence in Gold sequences. The embodiment of the application can enable the terminal to directly obtain the part of the sequence which is needed in the Gold sequence. For example, if the part of the Gold sequence required by the terminal is the sequence starting at 1700 th bit, the target pseudo-random sequence shown in the present application refers to the part of the sequence.
In another possible calculation mode, in the process of iteratively obtaining the mask corresponding to the source pseudo-random sequence, the state transition matrix corresponding to the ith round has two acquisition modes. The first mode is pre-calculated and stored locally, the second mode is that the state transition matrix corresponding to the ith round is calculated in real time, and the state transition matrix corresponding to the ith round is the multiplication result of the state transition matrices corresponding to the 2 (i-1) th round.
In summary, the present embodiment can obtain the mask corresponding to the first phase shift value required by the present application step by step from the initial mask in an iterative manner, and then generate the target pseudo-random sequence under the processing of the logic operation of the mask and the source pseudo-random sequence, thereby avoiding that the terminal obtains too many useless values in advance for obtaining the target pseudo-random sequence, reducing the occupation amount of resources during the operation of the terminal, improving the capability of the terminal to cope with different phase shift values, and rapidly obtaining the useful pseudo-random sequence.
The generation method of the pseudo-random sequence can also obtain the numerical values of a plurality of bits in the target pseudo-random sequence in parallel, so that the speed of finally obtaining the pseudo-random sequence is improved.
Based on the method shown in the foregoing embodiment, the embodiment of the present application further provides a method for generating a pseudo random sequence, please refer to the following embodiment.
Referring to fig. 8, fig. 8 is a schematic diagram of a pseudo random sequence generation flow according to an embodiment of the present application.
In the generation process of a pseudo-random sequence in practical application, the application provides a pseudo-random sequence parallel generation method supporting arbitrary phase shift, and phase shift values can be configured through parameters in different application scenes without changing software or hardware implementation architecture.
Illustratively, assuming that the phase shift range of the pseudo-random sequence is 0-N max, the corresponding m-sequence phase shift range is N c~Nc+Nmax, and a certain phase shift value N t in the m-sequence phase shift range is expressed as a binary form (N 0,n1,...,nK-1) of K= [ log 2(Nc+Nmax +1) ] bits, so that the following conditions are satisfied
First, two m-sequence corresponding masks for phase shift N t are calculatedAndWherein the method comprises the steps ofBy calculationAnd acquiring a first row of the first row; by calculation And the first row thereof is acquired. Thus, it can be seen that the two m-sequence phase shifts 0 correspond to a mask of:
f(0)=g(0)=[1,0,...,0]
taking the first m sequence as an example, the calculation formula of the state transition matrix can be obtained:
The above equation may be calculated iteratively with an initial mask of f (0), each iteration being phase shifted based on the previous mask, i.e. multiplied The mask of the phase shift N t can be obtained after K iterations at most
Specifically, an initial mask is set toMask after the ith iteration isThen
When n i = 1, the number of times,Has the following componentsAt this point the mask needs to be updated by computation.
When n i = 0, the reference number,Has the following componentsThe mask does not need to be updated at this point.
N i can be calculated by the following method:
setting the initial value of phase shift Direct fetching at the ith iterationThe lowest bit can be obtained as ni, which is then shifted to the right by one bit to obtain a new value
Since the mask does not need to be updated when n i = 0, the phase will shift if the i-th iterationI.e. after iteration, all n i are 0, the mask is not updated any more, at this time, the iteration can be stopped in advance, and the final result is directly obtainedAlternatively, the embodiment of the application can also continue the iterative process without performing any calculation to ensure a fixed output delay. Through the processing described herein, the mask obtained after at most K iterations of the present embodiment of the applicationI.e. the mask of phase shift N t
State transition matrixThe initial value of the state transition matrix can be set through iterative method calculationUpdate to after the ith iterationAnother method, state transition matrixOr can be pre-calculated and stored and directly read for use in the iterative process.
Assuming that the phase shift of the pseudo-random sequence to be calculated is N, the length is L, and the calculated parallelism is P, the phase shift of the corresponding m sequence is n+n c.
First, a mask of phase shift N+N c is obtained according to Fang Faling N t=N+Nc described above
Then sequentially and iteratively solving a mask
The P flax components are used for generating a state transition matrix F P of m sequences in parallel as
In addition, the state transition matrix F S for m-sequence state update is
F S can be pre-calculated and stored according to the parallelism, and can be directly read for use in iteration.
The output m-sequence vector and the updated m-sequence state may be iteratively calculated based on the two state matrices F P and F S, respectively.
Setting an initial state of m sequenceThe state after the jth iteration isThe j-th iteration outputs an m-sequence vector:
Then
It can be seen that the calculated output sequence vector and the updated sequence state are each multiplied by the current sequence state value by the respective corresponding state transition matrix.
For the second m-sequence, the present application may use the same method to calculate, which is not described herein.
The j-th iteration obtains the first m-sequence vectorAnd a second m-sequence vectorThen, the two vectors are added by the module 2 to obtain the parallel output pseudo-random sequence vector.
Through the process ofAfter a number of iterations, all pseudo-random sequence values can be obtained. It should be noted that if L/P is not an integer, the pseudo random sequence values generated in the last iteration have some garbage values and need to be removed or ignored in subsequent processing.
To sum up, the generation steps of the pseudo-random sequence of phase shift N can be summarized as follows:
(1) Initializing a mask of two m-sequences to
Initializing initial values of phase shift
Initializing state transition matrices
Initializing an iteration count value i=0.
(2) If i is greater than or equal to K orJumping to the step (5); otherwise, obtainLeast significant bit of (2)And update
If n i =0, jumping to the step (4); if n i =1, step (3) is performed.
(3) Updating masks corresponding to two m-sequencesAnd
(4) Updating state transition matrix
Updating the iteration count value i=i+1
Jump to step (2).
(5) The masks for obtaining two m-sequence phase shifts N+N c are respectively
Initializing an iteration count k=0.
(6) Iterative computation mask
The iteration count k=k+1 is updated.
(7) If k is more than or equal to P-1, jumping to the step (8); otherwise, repeating the step (6).
(8) The P masks are respectively formed into state transition matrixes F P and G for generating m sequences in parallel P
Reading pre-stored state transition matrices F S and G for m-sequence state updating S
Initializing m-sequence statesAnd
Initializing an iteration count j=0.
(9) Updating two m-sequence states separatelyAnd
Respectively calculating two m-sequence output vectorsAnd
The two m-sequence output vectors are added in a modulo 2 mode to obtain a pseudo-random sequence vector
The iteration count j=j+1 is updated.
(10) If it isEnding the calculation; otherwise, repeating the step (9).
It should be noted that if the phase shift value N of the useful pseudo-random sequence remains unchanged in a certain application scenario, but only the second m-sequence initial state value c init changes, it is only necessary to calculate and store the mask matrices F P and G P once in the initial configuration of the application scenario, that is, only perform steps (1) to (7) once. The mask calculation step may be skipped when generating a pseudo-random sequence of different initial state values, directly starting from step (8).
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Referring to fig. 9, fig. 9 is a block diagram illustrating a pseudo random sequence generating apparatus according to an exemplary embodiment of the present application. The means for generating the pseudo-random sequence may be implemented as all or part of the terminal by software, hardware or a combination of both. The device comprises:
A parameter obtaining module 910, configured to obtain a first phase shift value Q 1,Q1 configured for the source pseudo-random sequence as a positive integer;
The number conversion module 920 is configured to convert the first phase shift value Q 1 to a binary value Q 2,Q2, where the number of bits of the binary value Q 2,Q2 is K 1,K1, which is a positive integer;
a mask iteration module 930, configured to perform K 1 rounds of iteration on the initial mask corresponding to the source pseudo-random sequence to obtain a mask corresponding to the first phase shift value Q 1, where the iteration is a mask corresponding to a current round and a state transition matrix to obtain a mask corresponding to a next round;
A sequence generating module 940, configured to generate a target pseudo-random sequence by performing a logical operation between a mask corresponding to the first phase shift value Q 1 and a state column vector of the source pseudo-random sequence.
In an alternative embodiment, the mask iteration module 930 is configured to multiply, in the ith iteration, the mask corresponding to the ith round and the state transition matrix corresponding to the ith round to obtain the mask corresponding to the (i+1) th round when the number of bits of the binary number Q 2 corresponding to the ith round is 1, where i is a natural number and i is less than or equal to K 1 -1; when the number of bits of the binary number value Q 2 corresponding to the ith round is 0, determining the mask corresponding to the ith round as the mask corresponding to the (i+1) th round in the ith round of iteration; when i is equal to 0, the mask corresponding to the ith round is the initial mask, the state transition matrix corresponding to the ith round is an initial state transition matrix, the initial state transition matrix is a square matrix with the order of D, and D is a positive integer; when i is equal to K 1 -1, the mask corresponding to round K 1 -1 is the mask corresponding to the first phase shift value Q 1.
In an alternative embodiment, the apparatus involves: the source pseudo-random sequence is a sequence generated by D linear feedback shift registers, and element values of the D-th row of the initial state transition matrix are multiplication coefficients corresponding to the linear feedback shift registers.
In an alternative embodiment, the sequence generating module 940 is configured to multiply the mask corresponding to the first phase shift value Q 1 with the state column vector to generate the target bit of the target pseudo-random sequence.
In an optional embodiment, a first matrix obtaining module is configured to obtain a first state transition matrix according to the initial state transition matrix and a mask corresponding to the first phase shift value Q1, where a number of rows of the first state transition matrix is a parallelism P of the target pseudo-random sequence; the second matrix acquisition module is used for acquiring a second state transition matrix according to the parallelism P and the initial state transition matrix, wherein the second state transition matrix is the power P of the initial state transition matrix; and the processing module is used for processing the source pseudo-random sequence according to the first state transition matrix and the second state transition matrix to obtain the target pseudo-random sequence.
In an optional embodiment, the first matrix obtaining module is configured to use a mask corresponding to the phase shift value Q 1 +j as a j-th row of the first state transition matrix, where j is a natural number and j is less than or equal to P-1.
In an alternative embodiment, the processing module is configured to perform X-1 iteration processing on the source pseudo-random sequence according to the second state transition matrix, to generate an intermediate state sequence; wherein, if L/P is an integer, X is equal to L/P; if L/P is a non-integer, X is equal to A,0<A-L/P <1, A is a positive integer; multiplying the first state transition matrix with the intermediate state sequence to generate the target pseudo-random sequence.
In an optional embodiment, the sequence generating module 940 is configured to use the first source pseudorandom sequence processed by the mask corresponding to the first phase shift value of the first source pseudorandom sequence as a first target pseudorandom sequence; the second source pseudo-random sequence processed by the mask corresponding to the first phase shift value of the second source pseudo-random sequence is used as a second target pseudo-random sequence; and performing modulo-2 sum operation on the first target pseudo-random sequence and the second target pseudo-random sequence to generate the target pseudo-random sequence.
In an alternative embodiment, the first source pseudo-random sequence and the second source pseudo-random sequence in the apparatus are m-sequences, and the target pseudo-random sequence is a Gold sequence.
In an alternative embodiment, the state transition matrix corresponding to the ith round in the device is pre-calculated and stored locally, or the state transition matrix corresponding to the ith round is calculated in real time.
In summary, the embodiment of the present application can achieve the effect of automatically generating the target pseudo-random sequences corresponding to different first phase shift values when the communication device needs the target pseudo-random sequences corresponding to different phase shift values without changing the current software architecture and hardware structure. In the generation process, K1 rounds of iteration are carried out on the initial mask to obtain a mask corresponding to the first phase shift value, wherein K1 is the number of bits of the binary number value equal to the first phase shift value, and finally the target pseudo-random sequence is obtained through logic operation between the mask and the state column vector of the source pseudo-random sequence. According to the method for generating the pseudo-random sequence, the phase shift value can be obtained through parameter configuration, so that the generation of the pseudo-random sequence with any phase shift can be supported. In the generation process, the useful pseudo-random sequence value after any phase shift can be directly calculated, the generation of the previous useless sequence value is not needed, the delay generated by the target pseudo-random sequence is reduced, the efficiency of generating the target pseudo-random sequence in real time under different phase shifts is improved, and the communication efficiency of the communication device is further improved.
Optionally, the phase shift value in the application can be obtained through parameter configuration, and the mask corresponding to each phase shift is not required to be calculated and stored in advance, and huge memory resources are not required to be added and consumed, so that the current software architecture and hardware structure are not required to be changed.
Embodiments of the present application also provide a computer readable medium storing at least one instruction that is loaded and executed by a processor to implement the method of generating a pseudo-random sequence according to the above embodiments.
It should be noted that: the pseudo-random sequence generating apparatus provided in the above embodiment only illustrates the division of the above functional modules when executing the pseudo-random sequence generating method, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for generating a pseudo random sequence provided in the foregoing embodiment and the method embodiment for generating a pseudo random sequence belong to the same concept, and detailed implementation processes of the apparatus and the method embodiment are detailed and are not repeated herein.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above embodiments are merely exemplary embodiments of the present application and are not intended to limit the present application, and any modifications, equivalent substitutions, improvements, etc. that fall within the spirit and principles of the present application should be included in the scope of the present application.

Claims (13)

1. A method of generating a pseudo-random sequence, the method comprising:
acquiring a first phase shift value Q 1,Q1 configured for a source pseudo-random sequence as a positive integer;
The number of bits that convert the first phase shift value Q 1 to the binary value Q 2,Q2 is K 1,K1 a positive integer;
performing K 1 rounds of iteration on the initial mask corresponding to the source pseudo-random sequence to obtain a mask corresponding to the first phase shift value Q 1, wherein the iteration is to obtain a mask corresponding to the next round according to the mask corresponding to the current round and a state transition matrix;
And generating a target pseudo-random sequence through logic operation between a mask corresponding to the first phase shift value Q 1 and a state column vector of the source pseudo-random sequence.
2. The method according to claim 1, wherein performing K 1 iterations on the initial mask corresponding to the source pseudo-random sequence to obtain a mask corresponding to the first phase shift value Q 1 includes:
When the number of the digits of the binary number value Q 2 corresponding to the ith round is1, multiplying the mask corresponding to the ith round and the state transition matrix corresponding to the ith round in the ith round iteration to obtain the mask corresponding to the (i+1) th round, wherein i is a natural number and is smaller than or equal to K 1 -1;
When the number of bits of the binary number value Q 2 corresponding to the ith round is 0, determining the mask corresponding to the ith round as the mask corresponding to the (i+1) th round in the ith round of iteration;
When i is equal to 0, the mask corresponding to the ith round is the initial mask, the state transition matrix corresponding to the ith round is an initial state transition matrix, the initial state transition matrix is a square matrix with the order of D, and D is a positive integer;
When i is equal to K 1 -1, the mask corresponding to round K 1 -1 is the mask corresponding to the first phase shift value Q 1.
3. The method according to claim 2, wherein the method further comprises: the source pseudo-random sequence is a sequence generated by D linear feedback shift registers, and element values of the D-th row of the initial state transition matrix are multiplication coefficients corresponding to the linear feedback shift registers.
4. The method of claim 2, wherein generating the target pseudo-random sequence by a logical operation between a mask corresponding to the first phase shift value Q 1 and a state column vector of the source pseudo-random sequence comprises:
and multiplying a mask corresponding to the first phase shift value Q 1 by a state column vector to generate target bits of the target pseudo-random sequence.
5. The method according to claim 2, wherein the method further comprises:
Obtaining a first state transition matrix according to the mask corresponding to the initial state transition matrix and the first phase shift value Q 1, wherein the number of lines of the first state transition matrix is the parallelism P of the target pseudo-random sequence;
obtaining a second state transition matrix according to the parallelism P and the initial state transition matrix, wherein the second state transition matrix is the power P of the initial state transition matrix;
And processing the source pseudo-random sequence according to the first state transition matrix and the second state transition matrix to obtain the target pseudo-random sequence.
6. The method of claim 5, wherein the obtaining a first state transition matrix according to the mask corresponding to the initial state transition matrix and the first phase shift value Q 1 comprises:
And taking a mask corresponding to the phase shift value Q 1 +j as the j-th row of the first state transition matrix, wherein j is a natural number and is smaller than or equal to P-1.
7. The method of claim 5, wherein said processing said source pseudorandom sequence to obtain said target pseudorandom sequence in accordance with said first state transition matrix and said second state transition matrix comprises:
Performing X-1 times of iterative processing on the source pseudo-random sequence according to the second state transition matrix to generate an intermediate state sequence; wherein, if L/P is an integer, X is equal to L/P; if L/P is a non-integer, X is equal to A,0<A-L/P <1, A is a positive integer;
multiplying the first state transition matrix with the intermediate state sequence to generate the target pseudo-random sequence.
8. The method according to any one of claims 1 to 7, wherein the source pseudo-random sequence includes at least a first source pseudo-random sequence and a second source pseudo-random sequence, and the generating the target pseudo-random sequence by a logical operation between a mask corresponding to the first phase shift value Q 1 and a state column vector of the source pseudo-random sequence includes:
multiplying a mask corresponding to the first phase shift value of the first source pseudorandom sequence by a state column vector corresponding to the first source pseudorandom sequence to obtain a first target pseudorandom sequence;
multiplying a mask corresponding to the first phase shift value of the second source pseudorandom sequence by a state column vector corresponding to the second source pseudorandom sequence to obtain a second target pseudorandom sequence;
and performing modulo-2 sum operation on the first target pseudo-random sequence and the second target pseudo-random sequence to generate the target pseudo-random sequence.
9. The method of claim 8, wherein the first source pseudorandom sequence and the second source pseudorandom sequence are m-sequences and the target pseudorandom sequence is a Gold sequence.
10. The method according to any one of claims 2 to 7, wherein the state transition matrix corresponding to the ith round is pre-calculated and stored locally, or the state transition matrix corresponding to the ith round is calculated in real time.
11. An apparatus for generating a pseudo-random sequence, the apparatus comprising:
The parameter acquisition module is used for acquiring a first phase shift value Q 1,Q1 configured for the source pseudo-random sequence as a positive integer;
The digital system conversion module is used for converting the first phase shift value Q 1 into a binary number value Q 2,Q2, wherein the number of bits of the first phase shift value Q 1 is K 1,K1 which is a positive integer;
The mask iteration module is used for carrying out K 1 rounds of iteration on the initial mask corresponding to the source pseudo-random sequence to obtain a mask corresponding to the first phase shift value Q 1, wherein the iteration is carried out on the mask corresponding to the current round and the state transition matrix to obtain a mask corresponding to the next round;
And the sequence generation module is used for generating a target pseudo-random sequence through logic operation between a mask corresponding to the first phase shift value Q 1 and a state column vector of the source pseudo-random sequence.
12. A communication device comprising a processor, a memory coupled to the processor, and program instructions stored on the memory, the processor implementing the method of generating a pseudo-random sequence according to any one of claims 1 to 10 when executing the program instructions.
13. A computer readable storage medium having stored therein program instructions, which when executed by a processor, implement a method of generating a pseudo random sequence according to any one of claims 1 to 10.
CN202011531712.8A 2020-12-22 2020-12-22 Pseudo-random sequence generation method, pseudo-random sequence generation device and storage medium Active CN112579045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011531712.8A CN112579045B (en) 2020-12-22 2020-12-22 Pseudo-random sequence generation method, pseudo-random sequence generation device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011531712.8A CN112579045B (en) 2020-12-22 2020-12-22 Pseudo-random sequence generation method, pseudo-random sequence generation device and storage medium

Publications (2)

Publication Number Publication Date
CN112579045A CN112579045A (en) 2021-03-30
CN112579045B true CN112579045B (en) 2024-08-06

Family

ID=75139432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011531712.8A Active CN112579045B (en) 2020-12-22 2020-12-22 Pseudo-random sequence generation method, pseudo-random sequence generation device and storage medium

Country Status (1)

Country Link
CN (1) CN112579045B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114553386B (en) * 2022-04-24 2023-03-10 哲库科技(北京)有限公司 Sequence generation method and device and computer readable storage medium
CN115567183B (en) * 2022-09-29 2023-07-28 上海星思半导体有限责任公司 M sequence generation method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104113497A (en) * 2014-07-16 2014-10-22 西安交通大学 DAB (digital audio broadcasting) signal generating method and device
CN105262557A (en) * 2015-09-07 2016-01-20 东南大学 Method for generating pseudo-random sequences in LTE (Long Term Evolution) system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR970002951B1 (en) * 1994-04-13 1997-03-13 양승택 Power-of-two length pseudorandom noise sequence generator
KR20010012192A (en) * 1998-03-05 2001-02-15 요트.게.아. 롤페즈 Mask generating polynomials for pseudo-random noise generators
CN100435500C (en) * 2001-03-29 2008-11-19 深圳市中兴集成电路设计有限责任公司 Method for quickly generating pseudo-random code sequence synchronous with phase of base station
US7194496B2 (en) * 2003-05-02 2007-03-20 Spirent Communications Of Rockville, Inc. System and method for producing functions for generating pseudo-random bit sequences
FR2865870B1 (en) * 2004-01-30 2006-05-26 Centre Nat Rech Scient GENERATING A HIGH-RANDOM RANDOM BIT FLOW
CN105391545B (en) * 2015-11-27 2018-11-16 东南大学 The generation method of pseudo-random sequence in a kind of LTE system
CN112019473B (en) * 2019-05-31 2022-02-25 华为技术有限公司 Method and device for generating sequence
CN111694546B (en) * 2020-06-12 2021-07-06 成都海光集成电路设计有限公司 Method and device for generating pseudo-random binary sequence code

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104113497A (en) * 2014-07-16 2014-10-22 西安交通大学 DAB (digital audio broadcasting) signal generating method and device
CN105262557A (en) * 2015-09-07 2016-01-20 东南大学 Method for generating pseudo-random sequences in LTE (Long Term Evolution) system

Also Published As

Publication number Publication date
CN112579045A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
JP6881859B2 (en) Methods and Devices for Coding Data Using Polar Codes
CN112579045B (en) Pseudo-random sequence generation method, pseudo-random sequence generation device and storage medium
EP3639376B1 (en) Polar decoder with llr-domain computation of f-function and g-function
US10892850B2 (en) Method and apparatus for carrying identification information
KR102386191B1 (en) Block-wise parallel freeze bit generation for polar codes
CN108809332B (en) Polar code transmission method and device
CN111385059B (en) Method and apparatus for polar coded modulation
CN109375897B (en) Method for generating pseudo-random sequence
RU2577588C1 (en) Method and device for generating scrambling code
WO2019149180A1 (en) Interleaving method and interleaving device
KR20100008849A (en) Apparatus and method for cyclic redundancy check in communication system
KR20040085545A (en) Apparatus for decoding error correction doe in communication system and method thereof
CN109150199B (en) Interleaving processing method and device for polarized Polar codes
WO1998044670A2 (en) A code synchronization unit and method
CN110661591B (en) Data processing method, apparatus and computer readable storage medium
CN114553386B (en) Sequence generation method and device and computer readable storage medium
CN112306458B (en) Sequence generation method and device, signal receiving/transmitting device and storage medium
US6813625B2 (en) Method and device for self-clock controlled pseudo random noise (PN) sequence generation
CN111525980B (en) Decoding method and device
CN109245852A (en) The speed matching method and device of Polar code
CN111654349B (en) Frame synchronization method and system
CN115833847B (en) Polar code decoding method, polar code decoding device, communication equipment and storage medium
US11374553B2 (en) Signal processing device and signal processing method
JP3684559B2 (en) Data receiving apparatus and method
CN115801055A (en) Hybrid frequency hopping pattern generation method, medium and device based on RS (Reed-Solomon) codes and m sequences

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant