Correlation operation method and device, storage medium and computer equipment
By dynamically adjusting the quantization bit width in related operations, the problem that related operations in the prior art cannot ensure operation accuracy on the basis of saving computing resources and power consumption, and efficient computing performance and power consumption optimization are achieved.
Patent Information
- Application Number
- CN202410897316.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2044-07-05
AI Technical Summary
In the prior art, related operations cannot ensure operational accuracy on the basis of saving computing resources and power consumption.
By determining the sequence to be quantized and quantizing it based on the quantized bit width, the quantized noise sequence and quantization error are calculated. If the error is greater than the noise threshold, the bit width is gradually incremented until the error is less than the threshold.
On the basis of ensuring computing accuracy, it saves computing resources and power consumption, and dynamically adjusts the quantization bit width to optimize the balance of computing performance and power consumption.
Smart Images

Figure CN120045824A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of correlation operations, and in particular, to a correlation operation method, device, storage medium, and computer device. Background Art
[0002] Correlation operation is a mathematical operation for obtaining the similarity between two sequences, and is widely used in various communication modules such as downlink synchronization, channel estimation, delay estimation, frequency offset estimation, and sequence detection in wireless communication.
[0003] In the prior art, the following two methods are usually used for correlation operations. One is to directly use a complex multiplier to perform dot multiplication on corresponding samples between sequences. Although this method does not lose the operation accuracy, it consumes a relatively large amount of resources and power. The other is to pre-quantize the sequences to be correlated with a power of 2. The quantized data can use shift operations instead of multipliers to perform power-of-2 operations. Although this method can save resources and power, the introduced quantization noise will result in poor accuracy of the operation result. Therefore, the existing calculation methods for correlation operations cannot guarantee the operation accuracy on the basis of saving calculation resources and power. Summary of the Invention
[0004] In view of this, the present application provides a correlation operation method, device, storage medium, and computer device, mainly aiming to solve the technical problem that the correlation operation in the prior art cannot guarantee the operation accuracy on the basis of saving calculation resources and power.
[0005] According to a first aspect of the present invention, a correlation operation method is provided, and the method includes:
[0006] Determine a sequence to be quantized in two correlated sequences according to a quantization indication, quantize the sequence to be quantized based on a quantization bit width to obtain a quantized output sequence, and then calculate a quantization noise sequence of the sequence to be quantized from the sequence to be quantized and the quantized output sequence;
[0007] Calculate a quantization error of the two correlated sequences based on the quantization noise sequence of the sequence to be quantized, compare the quantization error with a preset noise threshold to obtain a comparison result;
[0008] When the comparison result indicates that the quantization error is greater than or equal to the noise threshold, gradually increase the quantization bit width to repeatedly quantize the sequence to be quantized until the quantization error is less than the noise threshold;
[0009] When the comparison result indicates that the quantization error is less than the noise threshold, perform a correlation operation on the two correlated sequences to obtain a correlation operation result.
[0010] According to a second aspect of the present invention, a correlation operation device is provided. The device includes:
[0011] A quantization noise calculation module, configured to determine a sequence to be quantized in two correlation sequences according to a quantization indication, quantize the sequence to be quantized based on a quantization bit width to obtain a quantized output sequence, and then calculate a quantization noise sequence of the sequence to be quantized from the sequence to be quantized and the quantized output sequence;
[0012] A quantization error comparison module, configured to calculate quantization errors of the two correlation sequences based on the quantization noise sequence of the sequence to be quantized, and compare the quantization errors with a preset noise threshold to obtain a comparison result;
[0013] A first comparison result output module, when the comparison result indicates that the quantization error is greater than or equal to the noise threshold, gradually increase the quantization bit width to repeatedly quantize the sequence to be quantized until the quantization error is less than the noise threshold;
[0014] A second comparison result output module, when the comparison result indicates that the quantization error is less than the noise threshold, perform a correlation operation on the two correlation sequences to obtain a correlation operation result.
[0015] According to a third aspect of the present invention, a storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the above-mentioned correlation operation method is implemented.
[0016] According to a fourth aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the above-mentioned correlation operation method is implemented.
[0017] A correlation operation method, device, storage medium, and computer device provided by the present invention first determine a sequence to be quantized in a correlation sequence, then quantize the sequence to be quantized based on a quantization bit width, and finally calculate quantization errors of two correlation sequences according to the calculated quantization noise sequence; compare the obtained quantization errors with a preset noise threshold, and directly perform a correlation operation on the two correlation sequences when the quantization error is less than the noise threshold, which can effectively save computing resources and power consumption; when the quantization error is greater than or equal to the noise threshold, gradually increase the quantization bit width for dynamic adjustment until the quantization error is less than the noise threshold, maximizing the precision of the sequence to be quantized, thereby reducing the quantization error and improving the accuracy of the correlation operation. The above method can adaptively adjust the quantization bit width based on the comparison result between the quantization error and the preset noise threshold, achieving an optimal balance between computing performance and power consumption on the basis of ensuring the computing accuracy of the correlation operation.
[0018] The above description is only an overview of the technical solution of the present application. In order to better understand the technical means of the present application, it can be implemented according to the content of the specification. In addition, in order to make the above and other purposes, features, and advantages of the present application more obvious and understandable, the specific embodiments of the present application are specifically exemplified below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present invention and form a part of the present application. The schematic embodiments and descriptions of the present invention are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0020] Figure 1 FIG. shows a schematic flow chart of a correlation operation method provided by an embodiment of the present invention;
[0021] Figure 2 FIG. shows a schematic flow chart of another correlation operation method provided by an embodiment of the present invention;
[0022] Figure 3 FIG. shows an example diagram of calculating a quantization noise sequence of a correlation sequence in another correlation operation method provided by an embodiment of the present invention;
[0023] Figure 4 FIG. shows a schematic diagram of the splitting process of a correlation operation process in another correlation operation method provided by an embodiment of the present invention;
[0024] Figure 5 FIG. shows a schematic principle flow chart of another correlation operation method provided by an embodiment of the present invention;
[0025] Figure 6 FIG. shows a schematic structural diagram of a correlation operation device provided by an embodiment of the present invention;
[0026] Figure 7 FIG. shows a schematic structural diagram of a device of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] The exemplary embodiments of the present application will be described in more detail below with reference to the drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0028] An embodiment of the present application provides a correlation operation method, as Figure 1 shown, the method includes the following steps:
[0029] 101. Determine the sequence to be quantized in two related sequences according to the quantization indication, quantize the sequence to be quantized based on the quantization bit width to obtain a quantized output sequence, and then calculate the quantization noise sequence of the sequence to be quantized by calculating the sequence to be quantized and the quantized output sequence.
[0030] Specifically, the application scenario of this application is to perform a correlation operation on two related sequences to perform a correlation analysis on the two related sequences, and further measure the similarity or correlation degree between the two related sequences; by obtaining the quantization indication, it is possible to determine in the two related sequences to perform the quantization process on a certain related sequence or both related sequences; this application does not limit the type of related sequences, and the related sequences may specifically include complex sequences and real number sequences; in this application, the quantization bit width specifically refers to the effective quantization bit width, and the effective quantization bit width affects the quantization accuracy, and further affects the operation accuracy of the correlation operation.
[0031] In the embodiment of this application, first determine the sequence to be quantized in the two related sequences and determine the quantization bit width. This process is to initialize the algorithm and prepare for the subsequent quantization process. Specifically in the quantization process, quantize the sequence to be quantized based on the quantization bit width, and the accuracy of the obtained quantized output sequence is within a controllable range. Then, calculate the quantization noise sequence of the sequence to be quantized by calculating the sequence to be quantized and the quantized output sequence. Among them, quantization noise refers to the error caused by discretization during the quantization process, specifically the difference between the original signal and the quantized signal.
[0032] 102. Calculate the quantization error of the two related sequences based on the quantization noise sequence of the sequence to be quantized, and compare the quantization error with a preset noise threshold to obtain a comparison result.
[0033] Specifically, the noise threshold refers to a threshold used to determine whether a signal can be reliably transmitted or processed in a communication or signal processing system. In this application, the noise threshold is specifically used to determine the preset condition for whether two related sequences can perform a correlation operation.
[0034] In the embodiment of this application, after quantizing the sequence to be quantized in the two related sequences, the quantization noise sequence of the sequence to be quantized is obtained. Whether there are unquantized sequences in the two related sequences or not, the quantization error between the two related sequences can be further calculated, and then the calculated quantization error is compared with the noise threshold to determine whether the two related sequences can perform a correlation operation.
[0035] 103. When the comparison result indicates that the quantization error is greater than or equal to the noise threshold, gradually increase the quantization bit width to repeat the quantization of the sequence to be quantized until the quantization error is less than the noise threshold.
[0036] In this embodiment, there are two cases for the comparison result. In one case, the quantization error is greater than or equal to the noise threshold. The quantization error is too large and does not meet the preset conditions for performing relevant operations, which means that the quantization accuracy of the sequence to be quantized in the previous steps is too high. The quantization accuracy is specifically determined by the quantization bit width. Therefore, when it is determined that the quantization error is greater than or equal to the noise threshold, the quantization bit width is gradually increased, that is, a preset value is added, to reduce the number of quantization bits in the sequence to be quantized, thereby reducing the quantization error. Then, the reduced quantization error is compared with the noise threshold. If the quantization error is always greater than or equal to the noise threshold, the quantization bit width needs to be continuously increased to reduce the quantization accuracy so that the quantization error meets the preset conditions for relevant operations.
[0037] 104. When the comparison result indicates that the quantization error is less than the noise threshold, perform a correlation operation on the two correlation sequences to obtain a correlation operation result.
[0038] In this embodiment, there is another comparison result, that is, the quantization error is less than the noise threshold. At this time, it is proved that the two correlation sequences meet the correlation operation conditions, and the two correlation sequences can be directly operated to finally obtain a correlation operation result.
[0039] A correlation operation method, device, storage medium, and computer device provided by the present invention first determine a sequence to be quantized in the correlation sequences, then quantize the sequence to be quantized based on the quantization bit width, and finally calculate the quantization error of the two correlation sequences according to the calculated quantization noise sequence; compare the obtained quantization error with a preset noise threshold, and directly perform a correlation operation on the two correlation sequences when the quantization error is less than the noise threshold, which can effectively save computing resources and power consumption; when the quantization error is greater than or equal to the noise threshold, gradually increase the quantization bit width for dynamic adjustment until the quantization error is less than the noise threshold, maximizing the accuracy of the sequence to be quantized, thereby reducing the quantization error and improving the accuracy of the correlation operation. The above method can adaptively adjust the quantization bit width based on the comparison result between the quantization error and the preset noise threshold, achieving an optimal balance between computing performance and power consumption on the basis of ensuring the computing accuracy of the correlation operation.
[0040] Another correlation operation method is provided in an embodiment of the present application, as Figure 2 shown. The method includes the following steps:
[0041] 201. Determine a sequence to be quantized in the two correlation sequences according to the quantization indication.
[0042] In an embodiment of the present application, assume that two related sequences are respectively related sequence A and related sequence B. Each related sequence includes M sample points, and each sample point is N bits; and the quantization bit can be specifically represented by a single bit, that is, 1-bit quantization indication. When the quantization indication is "0", it represents quantizing related sequence A, and when the quantization indication is "1", it represents quantizing related sequence B. In the present application, the number of quantized sequences is not limited. It is possible to quantize related sequence A or related sequence B, or to quantize both related sequences.
[0043] 202. Quantize the sequence to be quantized based on the quantization bit width to obtain a quantized output sequence, and then calculate the quantization noise sequence by calculating the sequence to be quantized and the quantized output sequence.
[0044] Specifically, first, among all the data bits with a preset value in the sequence to be quantized except the sign bit, select the data bits corresponding to the quantization bit width in descending order of the number of bits as the first holding bits; then perform quantization processing on all the remaining data bits in the sequence to be quantized except the sign bit and the first holding bits, so that the values of the quantized data bits are all converted to the target value to obtain the quantized output sequence; finally, perform a subtraction operation on the sequence to be quantized and the quantized output sequence to obtain the quantization residual sequence, and perform quantization processing on the quantization residual sequence to obtain the quantization noise sequence of the sequence to be quantized.
[0045] In an embodiment of the present application, taking Figure 3 as an example, denote the sequence to be quantized as Seq, then the quantized sequence Seq is "1101011010110101", and the sequence to be quantized Seq can be specifically expressed by the formula:
[0046] Seq = [S 0 , S 1 , …, S M-1
[0047] where Seq contains a total of 16 bits, the first bit is the sign bit, and the remaining 15 bits are all data bits. Each data bit corresponds to a value. Then obtain the quantization bit width QtBit. Based on Figure 3 , the number corresponding to the quantization bit width is 4. After that, it is necessary to perform quantization processing on the sequence to be quantized. The preset value in the sequence to be quantized is 1, and the target value is 0. First, keep the sign bit unchanged, and select the data bits with a value of 1 corresponding to the quantization bit width QtBit in descending order of the number of bits after the sign bit. The above-selected data bits corresponding to the quantization bit width QtBit are used as the first holding bits, and their values do not change, while all the remaining data bits after the first holding bits are set to 0 to form the quantized output sequence SeqQt. Then the quantized output sequence SeqQt is "1101011000000000", and the quantized output sequence SeqQt can be specifically expressed by the formula:
[0048]
[0049] After that, perform a subtraction operation on the sequence to be quantified and the quantified output sequence to obtain a quantified residual sequence SeqDiff. The quantified residual sequence SeqDiff is "1000000010110101", and the quantified residual sequence SeqDiff can be specifically expressed by the formula:
[0050]
[0051] Processing the quantified residual sequence can obtain a quantified noise sequence.
[0052] 203. Perform quantization processing on the quantified residual sequence to obtain the quantified noise sequence of the sequence to be quantified.
[0053] Specifically, among all the data bits in the quantified residual sequence except the sign bit, select the data bit with the highest number of bits and a numerical value of a preset value as the second retention bit; perform quantization processing on all the data bits with a number of bits less than the second retention bit so that the numerical values of the quantized data bits are all converted to the target value to obtain the quantified noise sequence of the sequence to be quantified.
[0054] In the embodiment of the present application, the process of processing the quantified residual sequence is also a quantization process, that is, the sign bit remains unchanged in the quantified residual sequence, select the data bit with a numerical value of 1 among the highest bits after the sign bit, use this data bit as the second retention bit, keep the numerical value unchanged, and then set all other data bits after the second retention bit to 0 to form a quantified noise output sequence SeqNi. The quantified noise output sequence SeqNi is "1000000010000000", and the quantified noise output sequence SeqNi can be specifically expressed by the formula:
[0055]
[0056] Then the subsequent comparison process can be performed on the obtained quantified output sequence.
[0057] 204. Calculate the quantization error of two correlation sequences based on the quantified noise sequence of the sequence to be quantified.
[0058] Specifically, when only one of the two correlation sequences is the sequence to be quantified, obtain the quantified noise sequence of the sequence to be quantified, transpose the unquantified sequence in the correlation sequence to obtain a transposed sequence, and perform a multiplication operation on the quantified noise sequence and the transposed sequence to obtain the quantization error of the two correlation sequences; when both of the two correlation sequences are the sequences to be quantified, obtain the quantified noise sequences of the two sequences to be quantified, and perform a multiplication operation on the quantified noise sequences of the two sequences to be quantified to obtain the quantization error of the two correlation sequences.
[0059] In the embodiments of the present application, considering that there may be two cases where only one of the two related sequences is quantized and both of the two related sequences are quantized, calculations should be performed separately. When both of the two related sequences are quantized, the quantized noise output sequences of the two related sequences are obtained respectively. For example, the quantized noise output sequence of one of the related sequences is SeqNi, and the quantized noise output sequence of one of the related sequences is SeqNj. Then, the quantization errors of the two related sequences are obtained. The calculation formula for the quantization errors of the two related sequences is:
[0060] QtNoise = SeqNi * SeqNj
[0061] According to the quantization indication, when only one of the two related sequences is the sequence to be quantized and the other related sequence is the unquantized sequence, the other unquantized sequence is denoted as X. The unquantized sequence X is specifically represented by the formula:
[0062] X = [X 0 , X 1 , …, X M-1
[0063] By obtaining the transposed sequence of the unquantized sequence and calculating using the quantized noise output sequence SeqNi of the sequence to be quantized, the quantization errors of the two related sequences are obtained. The calculation formula for the quantization errors of the two related sequences is:
[0064]
[0065] where, X H is the transpose of the quantization sequence X, and M is the number of samples in each sequence; Shift operations can be used. This is a conventional algorithm in the prior art, and the present application does not make any limitations.
[0066] 205. When the comparison result indicates that the quantization error is greater than or equal to the noise threshold, the quantization bit width is gradually increased to repeat the quantization of the sequence to be quantized until the quantization error is less than the noise threshold.
[0067] Specifically, the initial value of the quantization bit width is 1, and the sequence to be quantized is provided with a preset number of effective bit widths; when the comparison result indicates that the quantization error is greater than or equal to the noise threshold, an increment operation is performed on the quantization bit width to obtain a new quantization bit width; the new quantization bit width is compared with the effective bit width. When the new quantization bit width is less than the effective bit width, the sequence to be quantized is quantized based on the new quantization bit width, and the new quantized noise sequence of the sequence to be quantized is calculated, and then the new quantization errors of the two related sequences are calculated; if the new quantization error is less than the noise threshold, a correlation operation is performed on the two related sequences to obtain a correlation operation result;
[0068] In an embodiment of the present application, after obtaining the quantization error, the quantization error QtNoise is compared with the noise threshold NoiseThrd. In one case, if the quantization error QtNoise is greater than the noise threshold NoiseThrd, it indicates that the quantization accuracy is too high. Therefore, an increment operation needs to be performed on the quantization bit width to obtain a new quantization bit width. At this time, the new quantization bit width needs to be compared with the effective bit width in the sequence to be quantized. The effective bit width represents the number of data bits in the sequence to be quantized that can be effectively quantized. Only when the new quantization bit width is less than the effective bit width can the above steps be repeated, that is, based on the new quantization bit width, the quantization process of the sequence to be quantized is re-executed, and then the calculation process in the previous text is repeated. Finally, a new quantization noise sequence is obtained, and based on the new quantization noise sequence, the new quantization errors of two correlation sequences are calculated and compared with the noise threshold again. If the new quantization error is less than the noise threshold at this time, the correlation operation can be performed on the two correlation sequences to obtain the correlation operation result.
[0069] 206. When the new quantization bit width is greater than or equal to the effective bit width, the correlation operation is performed on the two correlation sequences to obtain the correlation operation result.
[0070] In an implementation manner of the present application, after performing the increment operation on the quantization bit width, when the obtained new quantization bit width is greater than or equal to the effective bit width, it means that the quantization of the sequence to be quantized cannot be continued by increasing the quantization bit width, and the quantization process has reached the limit. At this time, only the correlation operation can be directly performed on the two correlation sequences to obtain the correlation operation result.
[0071] 207. When the comparison result indicates that the quantization error is less than the noise threshold, the correlation operation is performed on the two correlation sequences to obtain the correlation operation result.
[0072] Specifically, when only one of the two correlation sequences is the sequence to be quantized, the quantization output sequence of the sequence to be quantized is obtained, the unquantized sequence in the correlation sequence is transposed to obtain the transposed sequence, and the correlation operation is performed on the quantization output sequence and the transposed sequence to obtain the correlation operation result of the two correlation sequences; when both of the two correlation sequences are sequences to be quantized, the quantization output sequences of the two sequences to be quantized are obtained, and the correlation operation is performed on the quantization output sequences of the two sequences to be quantized to obtain the correlation operation result of the two correlation sequences.
[0073] In the embodiments of the present application, the process of performing correlation operations on two related sequences is also divided into two cases based on the number of sequences to be quantified in the related sequences. In one case, both of the two related sequences are sequences to be quantified, and then correlation operations are performed on the quantified output sequences SeqQt of the two related sequences. In the other case, only one of the two related sequences is a sequence to be quantified, and the other related sequence is an unquantified sequence X. Then, the transpose of the unquantified sequence X also needs to be obtained. The calculation formula for the correlation operation result Corr is as follows:
[0074]
[0075] Specifically, each item in the quantified output sequence Seq contains QtBit data bits with a value of 1. Then, is split into QtBit items. Taking QtBit as 4 as an example, that is, is split into Figure 4 St_hat(0), St_hat(1), St_hat(2), St_hat(3) in
[0076]
[0077] wherein, is the sequence after splitting.
[0078] A correlation operation method, device, storage medium, and computer device provided by the present invention have the principle as Figure 5 shown. Based on the quantization indication, the sequences to be quantified are selected, and the quantization noise sequences of the sequences to be quantified are calculated through the process of algorithm initialization and quantization of the sequences. Then, the quantization error is calculated according to the number of sequences to be quantified. Based on the comparison between the quantization error and the noise threshold, it is judged whether correlation operations can be performed on the two related sequences. When the quantization error is less than the noise threshold, a step-by-step increment operation is performed on the quantization bit width to judge the size relationship between the quantization bit width and the effective bit width. When the quantization bit width is always less than the effective bit width, the quantization bit width is gradually increased to reduce the quantization accuracy for performing correlation operations. When the quantization bit width is greater than or equal to the effective bit width, correlation operations are directly performed on the two related sequences. The above method can adaptively adjust the quantization bit width based on the comparison result between the quantization error and the preset noise threshold, and the size relationship between the quantization bit width and the effective bit width, achieving an optimized balance between computing performance and power consumption while ensuring the computing accuracy of the correlation operation.
[0079] Furthermore, as Figure 1For the specific implementation of the method, an embodiment of the present application provides a related operation device, such as Figure 6 As shown, the device includes: a quantization noise calculation module 301, a quantization error comparison module 302, a first comparison result output module 303, and a second comparison result output module 304.
[0080] The quantization noise calculation module 301 is configured to determine a sequence to be quantized in two related sequences according to a quantization indication, perform quantization on the sequence to be quantized based on a quantization bit width to obtain a quantized output sequence, and then calculate a quantization noise sequence of the sequence to be quantized by calculating the sequence to be quantized and the quantized output sequence;
[0081] The quantization error comparison module 302 is configured to calculate quantization errors of two related sequences based on the quantization noise sequence of the sequence to be quantized, compare the quantization errors with a preset noise threshold, and obtain a comparison result;
[0082] The first comparison result output module 303 is configured to gradually increase the quantization bit width when the comparison result indicates that the quantization error is greater than or equal to the noise threshold, and repeat quantization on the sequence to be quantized until the quantization error is less than the noise threshold;
[0083] The second comparison result output module 304 is configured to perform a correlation operation on two related sequences to obtain a correlation operation result when the comparison result indicates that the quantization error is less than the noise threshold.
[0084] In a specific application scenario, the sequence to be quantized includes a sign bit and a plurality of data bits, and the sign bit is the highest bit; specifically, the quantization noise calculation module 301 may be configured to, among the plurality of data bits with preset values in the sequence to be quantized except the sign bit, select data bits corresponding to the quantization bit width in descending order of bit numbers as the first holding bits; perform quantization processing on all the remaining data bits in the sequence to be quantized except the sign bit and the first holding bits, so that the values of the quantized data bits are all converted to target values to obtain a quantized output sequence; perform a subtraction operation on the sequence to be quantized and the quantized output sequence to obtain a quantization residual sequence, and perform quantization processing on the quantization residual sequence to obtain a quantization noise sequence of the sequence to be quantized.
[0085] In a specific application scenario, the quantization noise calculation module 301 may also be configured to, among all the data bits in the quantization residual sequence except the sign bit, select the data bit with the highest bit number and a preset value as the second holding bit; perform quantization processing on all the data bits with bit numbers less than the second holding bit, so that the values of the quantized data bits are all converted to target values to obtain a quantization noise sequence of the sequence to be quantized.
[0086] In a specific application scenario, the quantization error comparison module 302 can be specifically used to obtain the quantization noise sequence of the sequence to be quantized when only one of the two correlated sequences is the sequence to be quantized, transpose the unquantized sequence in the correlated sequences to obtain a transposed sequence, perform a multiplication operation on the quantization noise sequence and the transposed sequence to obtain the quantization error between the two correlated sequences; when both of the two correlated sequences are sequences to be quantized, obtain the quantization noise sequences of the two sequences to be quantized, perform a multiplication operation on the quantization noise sequences of the two sequences to be quantized, and obtain the quantization error between the two correlated sequences.
[0087] In a specific application scenario, the initial value of the quantization bit width is 1, and the sequence to be quantized has a preset number of effective bit widths; the first comparison result output module 303 can be specifically used to perform an increment operation on the quantization bit width to obtain a new quantization bit width when the comparison result indicates that the quantization error is greater than or equal to the noise threshold; compare the new quantization bit width with the effective bit width, when the new quantization bit width is less than the effective bit width, quantize the sequence to be quantized based on the new quantization bit width, calculate the new quantization noise sequence of the sequence to be quantized, and then calculate the new quantization error between the two correlated sequences; if the new quantization error is less than the noise threshold, perform a correlation operation on the two correlated sequences to obtain a correlation operation result; if the new quantization error is still greater than or equal to the noise threshold, repeat the operation of incrementing the new quantization bit width until the quantization error calculated based on the incremented quantization bit width is less than the noise threshold.
[0088] In a specific application scenario, the first comparison result output module 303 can also be used to perform a correlation operation on the two correlated sequences to obtain a correlation operation result when the new quantization bit width is greater than or equal to the effective bit width.
[0089] In a specific application scenario, the second comparison result output module 304 can be specifically used to obtain the quantization output sequence of the sequence to be quantized when only one of the two correlated sequences is the sequence to be quantized, transpose the unquantized sequence in the correlated sequences to obtain a transposed sequence, perform a correlation operation on the quantization output sequence and the transposed sequence, and obtain the correlation operation result between the two correlated sequences; when both of the two correlated sequences are sequences to be quantized, obtain the quantization output sequences of the two sequences to be quantized, perform a correlation operation on the quantization output sequences of the two sequences to be quantized, and obtain the correlation operation result between the two correlated sequences.
[0090] It should be noted that for other corresponding descriptions of each functional unit involved in a correlation operation device provided in this embodiment, reference can be made to Figure 1 and Figure 2 for the corresponding descriptions therein, which will not be elaborated here.
[0091] Based on the above as Figure 1For the method described above, correspondingly, this embodiment also provides a storage medium with a computer program stored thereon. When the program is executed by a processor, it implements the above-mentioned related arithmetic methods.
[0092] Based on such an understanding, the technical solution of this application can be embodied in the form of a software product. This software product to be recognized can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the related arithmetic methods in various implementation scenarios of this application.
[0093] Based on the above as Figure 1 and Figure 2 the method shown, and Figure 6 the related arithmetic device embodiments shown, to achieve the above object, as Figure 7 shown, this embodiment also provides an entity device for related arithmetic. The device includes a communication bus, a processor, a memory, and a communication interface, and may also include an input / output interface and a display device. Among them, each functional unit can complete mutual communication through the bus. The memory stores a computer program, and the processor is used to execute the program stored on the memory to execute the related arithmetic methods in the above embodiments.
[0094] Optionally, the entity device may further include a user interface, a network interface, a camera, a Radio Frequency (RF) circuit, sensors, an audio circuit, a WI-FI module, etc. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc. Optionally, the user interface may further include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0095] Those skilled in the art can understand that the structure of an entity device for related arithmetic provided in this embodiment does not constitute a limitation on the entity device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0096] The storage medium may also include an operating system and a network communication module. The operating system is a program for managing the hardware and software resources of the above entity device, and supports the operation of information processing programs and other software and / or programs to be recognized. The network communication module is used to implement communication between components within the storage medium, as well as communication with other hardware and software in the information processing entity device.
[0097] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or can also be implemented by hardware. By applying the technical solution of the present application, first determine the sequence to be quantized in the relevant sequences, then quantize the sequence to be quantized based on the quantization bit width, and finally calculate the quantization error of the two relevant sequences according to the calculated quantization noise sequence; compare the obtained quantization error with a preset noise threshold, and directly perform a correlation operation on the two relevant sequences when the quantization error is less than the noise threshold, which can effectively save computing resources and power consumption; when the quantization error is greater than or equal to the noise threshold, gradually increase the quantization bit width for dynamic adjustment until the quantization error is less than the noise threshold, maximizing the accuracy of the sequence to be quantized, thereby reducing the quantization error and improving the accuracy of the correlation operation. The above method can adaptively adjust the quantization bit width based on the comparison result between the quantization error and the preset noise threshold, achieving an optimized balance between computing performance and power consumption on the basis of ensuring the computing accuracy of the correlation operation.
[0098] Those skilled in the art can understand that the drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the drawings are not necessarily essential for implementing the present application. Those skilled in the art can understand that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the description of the implementation scenario, or can be correspondingly changed and located in one or more devices different from the present implementation scenario. The modules in the above implementation scenario can be combined into one module, or further split into multiple sub-modules.
[0099] The above serial numbers of the present application are only for description and do not represent the advantages or disadvantages of the implementation scenarios. The above disclosure only shows several specific implementation scenarios of the present application. However, the present application is not limited thereto, and any changes that can be thought of by those skilled in the art should fall within the protection scope of the present application.
Claims
1. A correlation operation method, characterized in that: The method comprises: Determine a sequence to be quantized in two related sequences according to the quantization indication, quantize the sequence to be quantized based on the quantization bit width to obtain a quantized output sequence, and then calculate the sequence to be quantized and the quantized output sequence to obtain a quantization noise sequence of the sequence to be quantized; Based on the quantization noise sequence of the sequence to be quantized, a quantization error of the two related sequences is calculated, and the quantization error is compared with a preset noise threshold to obtain a comparison result; When the comparison result indicates that the quantization error is greater than or equal to the noise threshold, the quantization bit width is gradually increased to repeatedly quantize the sequence to be quantized until the quantization error is less than the noise threshold; When the comparison result indicates that the quantization error is less than the noise threshold, a correlation operation is performed on the two correlation sequences to obtain a correlation operation result.
2. The method according to claim 1, characterized in that The sequence to be quantized includes a sign bit and a plurality of data bits, and the sign bit is the highest bit; the step of quantizing the sequence to be quantized based on the quantization bit width to obtain a quantized output sequence, and then calculating the sequence to be quantized and the quantized output sequence to obtain the quantization noise sequence includes: Among the plurality of data bits whose values are preset values except the sign bit in the sequence to be quantized, based on the number of bits from high to low, selecting the data bits corresponding to the quantization bit width as the first holding bits; Quantizing all data bits in the sequence to be quantized except the sign bit and the first retaining bit, so that the values of the quantized data bits are converted to target values to obtain a quantized output sequence; A subtraction operation is performed on the sequence to be quantized and the quantized output sequence to obtain a quantized residual sequence, and a quantization process is performed on the quantized residual sequence to obtain a quantization noise sequence of the sequence to be quantized.
3. The method according to claim 2, characterized in that The step of quantizing the quantized residual sequence to obtain a quantization noise sequence of the sequence to be quantized includes: Among all data bits in the quantized residual sequence except the sign bit, a data bit with the highest bit number and a value of a preset value is selected as a second holding bit; All data bits whose bit number is smaller than the second retaining bit are quantized so that the values of the quantized data bits are converted into target values to obtain a quantization noise sequence of the sequence to be quantized.
4. The method according to claim 1, characterized in that: The step of calculating the quantization errors of the two related sequences based on the quantization noise sequence of the sequence to be quantized includes: When only one of the two related sequences is a sequence to be quantized, a quantization noise sequence of the sequence to be quantized is obtained, and an unquantized sequence in the related sequence is transposed to obtain a transposed sequence, and a multiplication operation is performed on the quantization noise sequence and the transposed sequence to obtain quantization errors of the two related sequences; When the two related sequences are both sequences to be quantized, the quantization noise sequences of the two sequences to be quantized are obtained, and the quantization noise sequences of the two sequences to be quantized are multiplied to obtain quantization errors of the two related sequences.
5. The method according to claim 1, characterized in that The initial value of the quantization bit width is 1, and the sequence to be quantized is provided with a preset number of effective bit widths; when the comparison result indicates that the quantization error is greater than or equal to the noise threshold, the quantization bit width is gradually increased to repeatedly quantize the sequence to be quantized until the quantization error is less than the noise threshold, including: When the comparison result indicates that the quantization error is greater than or equal to the noise threshold, performing an addition operation on the quantization bit width to obtain a new quantization bit width; Comparing the new quantization bit width with the effective bit width, and when the new quantization bit width is smaller than the effective bit width, quantizing the sequence to be quantized based on the new quantization bit width, and calculating a new quantization noise sequence of the sequence to be quantized, and further calculating a new quantization error of the two related sequences; If the new quantization error is less than the noise threshold, performing a correlation operation on the two correlation sequences to obtain a correlation operation result; If the new quantization error is still greater than or equal to the noise threshold, the operation of adding one to the new quantization bit width is repeated until the quantization error calculated based on the quantization bit width after the incremental operation is less than the noise threshold.
6. The method according to claim 5, characterized in that After comparing the new quantization bit width with the effective bit width, the method further includes: When the new quantization bit width is greater than or equal to the effective bit width, a correlation operation is performed on the two correlation sequences to obtain a correlation operation result.
7. The method according to claim 1, characterized in that When the comparison result indicates that the quantization error is less than the noise threshold, performing a correlation operation on the two correlation sequences to obtain a correlation operation result includes: When only one of the two related sequences is a sequence to be quantized, a quantized output sequence of the sequence to be quantized is obtained, an unquantized sequence in the related sequence is transposed to obtain a transposed sequence, and a correlation operation is performed on the quantized output sequence and the transposed sequence to obtain correlation operation results of the two related sequences; When the two correlation sequences are both sequences to be quantized, the quantized output sequences of the two sequences to be quantized are obtained, and correlation operations are performed on the quantized output sequences of the two sequences to be quantized to obtain correlation operation results of the two correlation sequences.
8. A correlation computing device, characterized in that: The device comprises: A quantization noise calculation module, used to determine a sequence to be quantized in two related sequences according to a quantization indication, quantize the sequence to be quantized based on a quantization bit width to obtain a quantized output sequence, and then calculate the sequence to be quantized and the quantized output sequence to obtain a quantization noise sequence of the sequence to be quantized; A quantization error comparison module, used to calculate the quantization error of the two related sequences based on the quantization noise sequence of the sequence to be quantized, and compare the quantization error with a preset noise threshold to obtain a comparison result; A first comparison result output module, configured to, when the comparison result indicates that the quantization error is greater than or equal to the noise threshold, gradually increase the quantization bit width to repeatedly quantize the sequence to be quantized until the quantization error is less than the noise threshold; The second comparison result output module is used to perform a correlation operation on the two correlation sequences to obtain a correlation operation result when the comparison result indicates that the quantization error is less than the noise threshold.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Precursor detection using correlation in time-domain in an OFDM communications system
CN101237248A
Orthogonal frequency division multiplexing symbol synchronization method and system
CN118101409A
Fast initial acquisition & search device for a spread spectrum communication system
US20010048713A1