Data splicing method and device, electronic equipment and storage medium
By performing data compaction, expansion, and OR operations on multiple groups of compressed data packets, the problem of high data splicing complexity in LTE and NR technologies is solved, data bit width alignment and efficient transmission are achieved, and data splicing efficiency is improved.
Patent Information
- Application Number
- CN202411761588.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-12-03
AI Technical Summary
In LTE and NR technologies, the high complexity of the data splicing process leads to low efficiency, especially in the fronthaul interface data transmission between the BBU and RRU. Variations in data bit width lead to misaligned data boundaries. Existing methods such as ASIC hardware and software implementations suffer from poor flexibility or slow speed.
By obtaining multiple groups of compressed data packets, data compaction, expansion and OR operations are performed in a preset order to ensure that the combined data width reaches the target width and achieve data width alignment, including data compaction, expansion, AND operations and the merging of data packet headers.
The efficiency of data splicing is improved, the problem of high complexity in the data splicing process is solved, and efficient transmission of data with aligned bit width is achieved.
Smart Images

Figure CN119946152B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a data splicing method and device, electronic equipment and storage medium. BACKGROUND
[0002] In the design and implementation of Long Term Evolution (LTE) and New Radio (NR), the baseband processing unit (BBU) and the remote radio unit (RRU) are usually split, and the two are connected by optical fiber. The interface between the RRU and the BBU is a fronthaul interface. In order to improve the data transmission efficiency of the fronthaul interface and reduce the system bandwidth, the service data of the fronthaul interface is compressed before being transmitted.
[0003] Data compression can cause the data bit width of the original data to change, so that the data boundary of the original data is no longer aligned with the transmission bit width. The transmission end needs to splice the original data to align the original data to the transmission bit width before transmission. The receiving end needs to unsplice the data before decompression to recover the original data. Since there is no explicit multiple relationship between the transmission bit width and the data bit width of the original data, the complexity of the original data in the data splicing process is high, and the efficiency of data splicing is low.
[0004] Therefore, the data splicing method in the related art has the technical problem of high complexity in the data splicing process, which leads to low efficiency of data splicing. SUMMARY
[0005] The present application provides a data splicing method, device, electronic equipment and storage medium to solve the technical problem of the related art that the data splicing method has high complexity in the data splicing process, which leads to low efficiency of data splicing.
[0006] The application provides a data splicing method, comprising the following steps: obtaining a data packet to be spliced, wherein the data packet to be spliced comprises a plurality of groups of data, each group of data in the plurality of groups of data has a data bit width of a target bit width, and each group of data in the plurality of groups of data is compressed data; sequentially taking each group of data in the plurality of groups of data as current group data in a preset order to perform the following steps to obtain current spliced data, and determining a spliced data packet according to a plurality of spliced data obtained based on the plurality of groups of data, wherein the data bit width of data in the spliced data packet is the target bit width: arranging valid data extracted from the current group data at a low bit end of the current group data; expanding the data bit width of the current group data to obtain expanded current group data, wherein the data bit width of the expanded current group data is greater than or equal to twice the target bit width; performing an or operation on the expanded current group data and a waiting group data to obtain merged current group data, wherein the waiting group data is data waiting to be spliced, and valid data in the merged current group data is located at a high bit end of the merged current group data; in the case that the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, outputting the valid data at the high bit end of the merged current group data as the current spliced data, wherein the data bit width of the current spliced data is the target bit width.
[0007] According to the data splicing method provided by the application, in the case that the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high bit end of the merged current group data is outputted as the current spliced data, and then the following steps are further included: moving the remaining valid data in the merged current group data to the high bit end of the merged current group data, and updating the merged current group data to the waiting group data.
[0008] According to the data splicing method provided by the application, the or operation is performed on the expanded current group data and the waiting group data to obtain the merged current group data, and then the following steps are further included: in the case that the data bit width of the valid data in the merged current group data is less than the target bit width, updating the merged current group data to the waiting group data.
[0009] According to the data splicing method provided by the application, each group of data in the multiple groups of data is sequentially taken as current group data to perform the following steps in a preset order, to obtain current splicing data, and to determine a spliced data packet according to multiple splicing data obtained based on the multiple groups of data, which comprises: after the multiple splicing data corresponding to the multiple groups of data are obtained, the data at the high bit end of the waiting group data is determined as target splicing data, and the target splicing data is added to the multiple splicing data, wherein the data bit width of the target splicing data is the target bit width.
[0010] According to the data splicing method provided by the application, each group of data in the multiple groups of data comprises at least one I / Q data pair after data compression.
[0011] According to the data splicing method provided by the application, the data packet to be spliced comprises packet header data, and the determination of the spliced data packet according to the multiple splicing data obtained based on the multiple groups of data comprises: the multiple splicing data are combined to obtain data packet payload data; and the packet header data is added to the head of the data packet payload data to obtain the spliced data packet.
[0012] The application further provides a data splicing device, comprising the following modules: an acquisition module, configured to acquire a data packet to be spliced, wherein the data packet to be spliced comprises multiple groups of data, the data bit width of each group of data in the multiple groups of data is a target bit width, and each group of data in the multiple groups of data is compressed data; and an execution module, configured to sequentially take each group of data in the multiple groups of data as current group data to perform the following steps in a preset order, to obtain current splicing data, and to determine a spliced data packet according to multiple splicing data obtained based on the multiple groups of data, wherein the data bit width of the data in the spliced data packet is the target bit width: valid data extracted from the current group data is placed at the low bit end of the current group data; the data bit width of the current group data is expanded to obtain expanded current group data, wherein the data bit width of the expanded current group data is greater than or equal to twice the target bit width; the expanded current group data is subjected to an OR operation with waiting group data to obtain merged current group data, wherein the waiting group data is data waiting to be spliced, and the valid data in the merged current group data is located at the high bit end of the merged current group data; in the case that the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high bit end of the merged current group data is output as the current splicing data, wherein the data bit width of the current splicing data is the target bit width.
[0013] The application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the data splicing method according to any one of the preceding embodiments when executing the program.
[0014] The application further provides a non-transitory computer-readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the data splicing method according to any one of the preceding embodiments.
[0015] The application further provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the data splicing method according to any one of the preceding embodiments.
[0016] The data splicing method, device, electronic device and storage medium provided by the application obtain a data packet to be spliced, wherein the data packet to be spliced comprises a plurality of groups of data, each group of data in the plurality of groups of data has a target bit width, and each group of data in the plurality of groups of data is compressed data; each group of data in the plurality of groups of data is sequentially taken as current group data in a preset order to perform the following steps to obtain current spliced data, and a spliced data packet is determined according to a plurality of spliced data obtained based on the plurality of groups of data, wherein the data in the spliced data packet has the target bit width: valid data extracted from the current group data is placed at a low bit end of the current group data; the data bit width of the current group data is expanded to obtain expanded current group data, wherein the data bit width of the expanded current group data is greater than or equal to twice the target bit width; the expanded current group data is subjected to an OR operation with a waiting group data to obtain merged current group data, wherein the waiting group data is data to be spliced, and valid data in the merged current group data is located at a high bit end of the merged current group data; in a case where the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high bit end of the merged current group data is output as the current spliced data, wherein the data bit width of the current spliced data is the target bit width; the valid data in the merged current group data is located at the high bit end of the merged current group data, and in a case where the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high bit end of the merged current group data is output as the current spliced data, and since the data bit width of the current spliced data is the target bit width, the data bit width of the spliced data packet obtained based on the plurality of spliced data is also the target bit width, and the spliced data packet can be output through a front transmission interface; when there is no explicit multiple relationship between a transmission bit width (i.e., the target bit width) and the data bit width of the original data, the present application can also splice the data packet to be spliced to obtain a spliced data packet, thereby solving the technical problem that the data splicing method in the related art has a high complexity in the data splicing process, resulting in low data splicing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 It is a flow chart of the data splicing method provided by the present invention.
[0019] Figure 2 This is one of the schematic diagrams of the data splicing method provided by the present invention.
[0020] Figure 3 This is the second schematic diagram of the data splicing method provided by the present invention.
[0021] Figure 4 This is the third schematic diagram of the data splicing method provided by the present invention.
[0022] Figure 5 It is a structural schematic diagram of the data splicing device provided by the present invention.
[0023] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0024] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0025] It should be noted that in the description of the present application, the terms "comprising", "containing" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but also other elements not explicitly listed, or other elements inherent to such process, method, article or apparatus. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element. The terms "upper", "lower", and the like indicate the orientation or positional relationship shown in the drawings, and are only used to facilitate the description of the present application and simplify the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. Unless otherwise specified and limited, the terms "mounting", "connecting", "connecting" should be broadly understood, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be connected inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0026] The terms "first", "second", and the like used in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of a kind and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" means at least one of the connected objects, and the character " / ", generally indicates that the front and rear associated objects are in a "or" relationship.
[0027] In the design and implementation of LTE and NR, the BBU and RRU are usually split and connected using optical fiber. The remote radio unit RRU brings a new type of distributed network coverage mode, which places large-capacity macro cell base stations in a central machine room that can be obtained, and the baseband part is concentrated for processing. The radio frequency module in the base station is pulled to the remote radio unit by using optical fiber, and is placed on the site determined by network planning, thereby saving a large number of machine rooms required by conventional solutions; at the same time, by using a large-capacity macro base station to support a large number of optical fiber pull-out, the conversion between capacity and coverage can be realized. The interface between RRU and BBU becomes the front interface.
[0028] In order to reduce the complexity of hardware design, improve the data transmission efficiency of the fronthaul interface, and reduce the system bandwidth, the service data of the fronthaul interface will be compressed and transmitted. There are two common protocols for the fronthaul interface, Common Public Radio Interface (CPRI) and evolved Common Public Radio Interface (eCPRI). In the Open Radio Access Network (ORAN) based on eCPRI and the CPRI protocol, the compression method of data is defined.
[0029] Data compression will cause the data bit width to change, so that the data boundary is no longer aligned with the transmission bit width. Therefore, the sending end needs to splice the data and align it to the transmission data bit width before transmission; and the receiving end needs to unsplice the data and then decompress the original data. Since there is no clear multiple relationship between the compression bit width and the source data bit width, this leads to the complexity of data splicing; and the compression bit width has multiple possibilities, which further increases the complexity of data splicing.
[0030] In the related art, there are two ways of traditional data splicing:
[0031] 1) Using Application Specific Integrated Circuit (ASIC) hardware. The advantage of using ASIC is fast splicing speed, but its disadvantage is also obvious. For each compression bit width and transmission bit width that needs to be supported, a set of hardware is needed to support it, which significantly increases the design complexity and brings huge silicon overhead; and this method has poor flexibility and can only support the coverage requirements, and cannot support new requirements outside the design.
[0032] 2) Another way is to use software implementation based on general-purpose processors. The advantage of this implementation method is high flexibility, which can support various new requirements. However, its disadvantage is slow speed and large processing delay. For each source data splicing, it needs to go through multiple processes such as masking, shifting, and combining, and the processing delay is increased by at least 30 times.
[0033] The above two data splicing methods have their limitations.
[0034] In order to at least solve part of the above problems, the following embodiments are described in combination with Figures 1-6 The data splicing method, device, electronic equipment and storage medium provided by the application are described.
[0035] The data splicing method provided in the embodiment can be applied to splicing compressed data, so that the data bit width of the spliced data packet is aligned with the sending bit width.
[0036] Figure 1 is a flowchart of the data splicing method provided by the application, as shown in Figure 1 , including but not limited to the following steps:
[0037] Step 101, obtaining a data packet to be spliced, wherein the data packet to be spliced includes a plurality of groups of data, each group of data in the plurality of groups of data has a target bit width, and each group of data in the plurality of groups of data is compressed data.
[0038] Figure 2 is one of the schematic diagrams of the data splicing method provided by the application, as shown in Figure 2 , the data splicing method of the embodiment can be executed by a real-time data splicing device, which includes a state machine module, a program storage module and a data splicing module.
[0039] The state machine module is used to make state judgment according to the configuration information and the state of data splicing, and generate a read address of program storage corresponding to the current configuration information and state, constantly read the program storage, and can perform error state recovery operation on data splicing.
[0040] The program storage module is used to store the required program for executing the data splicing method in the embodiment, and the program is configured in the program storage in advance by the upper system according to different configurations. The state machine reads the program storage according to the configuration information and the current state, and sends the read data to the data splicing module. The data splicing module is used to execute the data splicing method of the embodiment.
[0041] Optionally, the data packet to be spliced includes packet header data, and the spliced data packet is determined according to a plurality of spliced data obtained based on the plurality of groups of data, including:
[0042] The plurality of spliced data is merged to obtain data packet payload data;
[0043] The packet header data is added to the head of the data packet payload data to obtain the spliced data packet.
[0044] As shown in Figure 2 , the data splicing module outputs the spliced data packet after data splicing according to the input data and the packet header, where the data input refers to the plurality of groups of data in the embodiment, and the packet header input refers to the packet header data in the embodiment.
[0045] In the embodiment, the header data is located at the front part of the data packet, and contains control information of the data packet, used to indicate the sender, the receiver and the type and length of the data packet and other key information; the data splicing method in the embodiment needs to splice multiple groups of data in the data packet to be spliced.
[0046] Optionally, each group of data in the multiple groups of data comprises at least one I / Q data pair after data compression.
[0047] Preferably, each group of data in the multiple groups of data comprises two I / Q data pairs after data compression.
[0048] It should be noted that the I / Q data pair refers to an in-phase (I) and quadrature (Q) data pair.
[0049] The data bit width of each group of data in the multiple groups of data is a target bit width, the target bit width is a bit width of data sent by the front transmission interface, and each group of data in the multiple groups of data is compressed data, i.e., the I / Q data pair in each group of data in the multiple groups of data is a data pair after data compression; since the data is compressed, the data bit width is smaller, resulting in that the effective data in each group of data in the multiple groups of data occupies a data bit width smaller than the target bit width.
[0050] In the embodiment, each group of data in the data packet to be spliced is compressed data; for example, the target bit width is 64 bits, the data bit width of each group of data in the data packet to be spliced before data compression is 64 bits, each group of data in the data packet to be spliced comprises two I / Q data pairs, wherein the data bit width of each I and each Q is 16 bits, and the data bit width of the effective data in each I and each Q is compressed to 9 bits after data compression.
[0051] Step 102, in accordance with a preset order, each group of data in the multiple groups of data is sequentially taken as current group data to execute the following steps to obtain current spliced data, and the data packet after splicing is determined according to multiple spliced data obtained based on the multiple groups of data, wherein the data bit width of the data in the data packet after splicing is the target bit width:
[0052] Step 1021, the effective data extracted from the current group of data is placed in the low bit end of the current group of data;
[0053] Step 1022, the data bit width of the current group of data is expanded to obtain expanded current group of data, wherein the data bit width of the expanded current group of data is greater than or equal to twice the target bit width.
[0054] Step 1023, performing or operation between the expanded current group data and the waiting group data to obtain merged current group data, wherein the waiting group data is data waiting for splicing, and valid data in the merged current group data is located at a high bit end of the merged current group data;
[0055] Step 1024, in a case where a data bit width of the valid data in the merged current group data is greater than or equal to a target bit width, outputting the valid data at the high bit end of the merged current group data as current splicing data, wherein a data bit width of the current splicing data is the target bit width. Optionally, in a case where the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, outputting the valid data at the high bit end of the merged current group data as the current splicing data, and then further comprising:
[0056] Moving the remaining valid data in the merged current group data to the high bit end of the merged current group data, and updating the merged current group data as the waiting group data.
[0057] Optionally, performing or operation between the expanded current group data and the waiting group data to obtain the merged current group data, and then further comprising:
[0058] In a case where the data bit width of the valid data in the merged current group data is less than the target bit width, updating the merged current group data as the waiting group data.
[0059] Optionally, sequentially executing the following steps on each group of data in the plurality of groups of data as the current group data according to a preset order to obtain current splicing data, and determining a spliced data packet according to a plurality of splicing data obtained based on the plurality of groups of data, comprising:
[0060] After obtaining the plurality of splicing data corresponding to the plurality of groups of data, determining data at a high bit end of the waiting group data as target splicing data, and adding the target splicing data to the plurality of splicing data, wherein a data bit width of the target splicing data is the target bit width.
[0061] Figure 3 is a schematic diagram two of the data splicing method provided by the application, see Figure 3 , Figure 3 The data splicing process of the data splicing module is shown, and the data splicing module performs data splicing on the plurality of groups of data according to the packet header input (packet header data), the data input (the plurality of groups of data), and the program input (the corresponding program input by the program storage module), which includes the data compacting, the data shifting, the register storage, and the data intercepting, etc.
[0062] Specifically, the data compacting step corresponds to step 1021, that is, compacting and placing the valid data extracted from the current group data at a low bit end of the current group data.
[0063] Further, the data bit width of the current group data is expanded to obtain the expanded current group data, wherein the data bit width of the expanded current group data is greater than or equal to 2 times the target bit width; at this time, the valid data in the current group data is still located at the low end of the current group data.
[0064] It should be noted that the data splicing method of this embodiment is programmable. The implementation steps of the data splicing method of this embodiment are controlled by microcode, and the method can be adjusted by adjusting the microcode.
[0065] Furthermore, the expanded current group data is subjected to an OR operation with the waiting group data to obtain the merged current group data, wherein the waiting group data is the data waiting to be spliced, and the valid data in the merged current group data is located at the high end of the merged current group data; it should be noted that, during the OR operation, the valid data in the waiting group data is located at the high end, and at this time, the valid data in the current group data needs to be moved to the high end to be adjacent to the valid data in the waiting group data, that is, the valid data in the merged current group data is located at the high end of the merged current group data.
[0066] When the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high-order end of the merged current group data is output as the current splicing data, wherein the data bit width of the current splicing data is the target bit width.
[0067] Figure 4 This is the third schematic diagram of the data splicing method provided by the present invention, see Figure 4 For example, the original data bit width (target bit width) is Mbit, the data bit width after splicing the valid data in the current group data is Nbit, and A is the bit width that the valid data in the current group data needs to be shifted during the OR operation between the current group data and the waiting group data.
[0068] exist Figure 4 In the figure, the original data represents the current group data, which includes two I / Q data pairs. After data compression is performed on the two I / Q data pairs, the valid data in each I and Q data are represented by Q3, I3, Q2, and I2, and S is used to represent an empty position.
[0069] The valid data extracted from the current group data is placed tightly at the low end of the current group data, such as Figure 4 The right end shown; the current group data is ORed with the waiting group data. In this process, the valid data in the waiting group data is located at the high end. At this time, the valid data in the current group data needs to be shifted A bits to the left from the low end.
[0070] In a case where the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high bit end of the merged current group data is output as the current spliced data, that is, the valid data at the high bit end of the current group data is output as the current spliced data in a case where the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width. Figure 4 In a case where the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high bit end of the merged current group data is output as the current spliced data, that is, the valid data at the high bit end of the current group data is output as the current spliced data in a case where the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width.
[0071] By the embodiments provided in the present application, the data packet to be spliced is obtained, wherein the data packet to be spliced includes multiple groups of data, the data bit width of each group of data in the multiple groups of data is a target bit width, and each group of data in the multiple groups of data is compressed data; each group of data in the multiple groups of data is sequentially taken as current group data in a preset order to perform the following steps to obtain current spliced data, and the data packet spliced according to multiple spliced data obtained based on the multiple groups of data is determined, wherein the data bit width of data in the data packet spliced is the target bit width: valid data extracted from the current group data is placed at the low bit end of the current group data; the data bit width of the current group data is expanded to obtain expanded current group data, wherein the data bit width of the expanded current group data is greater than or equal to twice the target bit width; the expanded current group data is subjected to an OR operation with a waiting group data to obtain merged current group data, wherein the waiting group data is data waiting to be spliced, and the valid data in the merged current group data is located at the high bit end of the merged current group data; in a case where the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high bit end of the merged current group data is output as the current spliced data, wherein the data bit width of the current spliced data is the target bit width; the technical problem that the data splicing method in the related art has a high complexity in the data splicing process and leads to low data splicing efficiency is solved, and the data splicing efficiency is improved.
[0072] In the present embodiment, all the steps of the data splicing method are performed according to instructions; each time a group of data in the data packet to be spliced is read, a new instruction needs to be obtained, and the data is spliced, shifted and output according to the content of the instruction.
[0073] For example, the instruction structure can be as follows:
[0074]
[0075] In the data processing process corresponding to the present embodiment, the original data bit width is Mbit, the bit width of each sub-data after splicing is Nbit, S is a data bit width expansion bit, wherein the bit width of S is M / 4-N, the header bit width is Pbit, in the instruction, the bit width of A is , the bit width of the input instruction E of the header is 1bit, and the bit width of the output instruction W is 1bit.
[0076] The data splicing module is used to realize the data splicing function of the data splicing method in the embodiment. The data splicing module receives external data input, and performs splicing operation on the data according to the program input of the program storage module, and outputs the data. The data with the compressed bit width of N bit is spliced. N and M are configuration values, and A and E are from instructions. The following operations are included:
[0077] a) The original data bit width is M bit, the I / Q data bit width is M / 4 bit, and the spliced bit width is N bit. The data is input into the data splicing module, and the data is first subjected to data tight arrangement operation. The effective part of the I / Q data is extracted according to the compressed bit width. S is an extension bit. The effective data is tightly arranged into a group of M bit bit width data, wherein M = 4*(N+S). If E = 1, P bit header data is read from the index input port and placed in the highest bit of the compressed data.
[0078] b) The tightly arranged data is subjected to data shift operation. The tightly arranged data is expanded to 2M bit, and the data is subjected to left shift A bit according to the left shift parameter given by the program.
[0079] c) The left shifted tightly arranged data is subjected to and, or operation with the data in the register, and is written back to the register. The bit width of the register is 2M bit.
[0080] d) It is judged whether the output indication in the instruction is 1. If it is 1, the high M bit of the register is output, and the low M bit of the data is left shifted M bit and written back to the register.
[0081] e) If the bit width of the tightly arranged data in the register is less than M bit, the a, b and c three-step operations are repeated until the tightly arranged data in the register is greater than M bit, and then the d operation is performed.
[0082] It should be noted that the shift value required by the data shift operation is provided by the program stored in the program storage. The program is input into the program storage after the device is powered on and before the data arrives. The program in the program storage includes three fields, which include the shift value A required by the data shift operation, the E value indicating whether the current data includes a header, and the W value indicating whether the current data is output.
[0083] The following is described in combination with a specific example:
[0084] Step 1, the original data bit width (the data bit width of the current group of data) is 64 bit, the I / Q data bit width is 16 bit, and the compressed bit width is 9 bit. That is, the effective data in the original data is 36 bit, and the target bit width is 64 bit.
[0085] Step 2, take the first instruction E=0, A=92, W=0, read a 64bit data; extract the low 9bit (valid data) of each I and Q data, and arrange the extracted 36bit data tightly, and place it in the low 36bit of the 64bit data.
[0086] Step 3, then expand the tightly arranged data, expand the 64bit data into 128bit data, and according to the bit shift value 92 given by the program, left shift the valid data by 92bit, and place the tightly arranged data in the high 36bit of the 128bit data.
[0087] Step 4, perform or operation on the 128bit tightly arranged data and the 128bit register (used to store the waiting group data) data, and place the data into the 128bit register, at this time the valid data in the register is only 36bit, which does not meet the rule that the tightly arranged data is greater than 64bit and is output, so it is necessary to continue to extract the tightly arranged data from the input data, W=0 is not output.
[0088] Step 5, take the second instruction E=0, A=56, W=1, read a 64bit data; extract the low 9bit of each I and Q data of the data input, and arrange the extracted 36bit data tightly, and place it in the low 36bit of the 64bit data.
[0089] Step 6, then expand the tightly arranged data, expand the 64bit data into 128bit data, and according to the bit shift value 56 given by the program, left shift the data by 56bit, so that the valid data are all located at the high bit end.
[0090] Step 7, perform or operation on the 128bit tightly arranged data and the data stored in the 128bit register in the last cycle, and write back to the 128bit register.
[0091] Step 8, at this time the bit width of the tightly arranged data (valid data) in the register is 72bit, according to W=1, output the high 64bit data of the register data, and left shift the low 64bit data of the register data by 64bit. And write back to the register.
[0092] Step 9, repeat taking a new instruction for each read data, and according to the instruction, operate on the data, until the last data is input, and when the last data is input and step 8 is performed, if there is residual data in the register, the residual data in the register needs to be output.
[0093] Figure 5 The structure diagram of the data splicing device provided by the application is shown in Figure 5 The following modules are included but not limited to:
[0094] The acquisition module 501 is configured to acquire a data packet to be spliced, wherein the data packet to be spliced includes multiple groups of data, each group of data in the multiple groups of data has a target bit width, and each group of data in the multiple groups of data is compressed data;
[0095] The execution module 502 is configured to sequentially execute the following steps by taking each group of data in the multiple groups of data as current group data in a preset order to obtain current spliced data, and determine a spliced data packet according to multiple spliced data obtained based on the multiple groups of data, wherein the data packet has a target bit width.
[0096] The valid data extracted from the current group data is placed at a low bit end of the current group data in a tight manner.
[0097] The data bit width of the current group data is expanded to obtain expanded current group data, wherein the data bit width of the expanded current group data is greater than or equal to twice the target bit width.
[0098] The expanded current group data is subjected to an OR operation with a waiting group data to obtain merged current group data, wherein the waiting group data is data waiting to be spliced, and valid data in the merged current group data is located at a high bit end of the merged current group data.
[0099] In a case where the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high bit end of the merged current group data is output as current spliced data, wherein the data bit width of the current spliced data is the target bit width.
[0100] According to the embodiment of the present application, the data packet to be spliced is obtained, wherein the data packet to be spliced includes multiple groups of data, each group of data in the multiple groups of data has a data bit width of a target bit width, and each group of data in the multiple groups of data is compressed data; each group of data in the multiple groups of data is sequentially taken as current group data in a preset order to perform the following steps to obtain current spliced data, and a spliced data packet is determined according to multiple spliced data obtained based on the multiple groups of data, wherein the data bit width of data in the spliced data packet is the target bit width: valid data extracted from the current group data is placed at a low bit end of the current group data; the data bit width of the current group data is expanded to obtain expanded current group data, wherein the data bit width of the expanded current group data is greater than or equal to twice the target bit width; the expanded current group data is subjected to an or operation with a waiting group data to obtain merged current group data, wherein the waiting group data is data waiting to be spliced, and valid data in the merged current group data is located at a high bit end of the merged current group data; in the case that the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high bit end of the merged current group data is output as the current spliced data, wherein the data bit width of the current spliced data is the target bit width; the data splicing method in the related art is solved, the technical problem that the complexity in the data splicing process is high and the efficiency of data splicing is low is solved, and the efficiency of data splicing is improved.
[0101] It should be noted that the data splicing device provided by the present application can execute the data splicing method of any one of the above embodiments during specific operation, and the present embodiment will not be described here.
[0102] Figure 6 is a structural schematic diagram of an electronic device provided by the present application, as Figure 6As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communications interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute a data splicing method, which includes: obtaining a data packet to be spliced, wherein the data packet to be spliced includes multiple groups of data, the data bit width of each group of data in the multiple groups of data is a target bit width, and each group of data in the multiple groups of data is compressed data; performing the following steps in sequence with each group of data in the multiple groups of data as the current group of data in a preset order to obtain current spliced data, and determining a spliced data packet based on the multiple spliced data obtained based on the multiple groups of data, wherein the data bit width of the data in the spliced data packet is the target bit width: placing the valid data extracted from the current group of data tightly at the low-order end of the current group of data; ; Expand the data bit width of the current group data to obtain the expanded current group data, wherein the data bit width of the expanded current group data is greater than or equal to twice the target bit width; Perform an OR operation on the expanded current group data and the waiting group data to obtain the merged current group data, wherein the waiting group data is data waiting to be spliced, and the valid data in the merged current group data is located at the high-order end of the merged current group data; when the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, output the valid data at the high-order end of the merged current group data as the current splicing data, wherein the data bit width of the current splicing data is the target bit width.
[0103] Furthermore, the logic instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0104] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer-readable storage medium, and the computer program comprises program instructions, when the program instructions are executed by a computer, the computer can execute the data splicing method provided by each of the above embodiments, and the method comprises: obtaining a data packet to be spliced, wherein the data packet to be spliced comprises a plurality of groups of data, each group of data in the plurality of groups of data has a data bit width of a target bit width, and each group of data in the plurality of groups of data is compressed data; in a preset order, each group of data in the plurality of groups of data is sequentially taken as current group data to execute the following steps to obtain current spliced data, and a plurality of spliced data obtained based on the plurality of groups of data is used to determine a spliced data packet, wherein the data bit width of the data in the spliced data packet is the target bit width: valid data extracted from the current group data is placed in a low bit end of the current group data; the data bit width of the current group data is expanded to obtain expanded current group data, wherein the data bit width of the expanded current group data is greater than or equal to twice the target bit width; the expanded current group data is subjected to an or operation with a waiting group data to obtain merged current group data, wherein the waiting group data is data waiting to be spliced, and valid data in the merged current group data is located in a high bit end of the merged current group data; in a case where the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data in the high bit end of the merged current group data is output as the current spliced data, wherein the data bit width of the current spliced data is the target bit width.
[0105] In yet another aspect, the present application also provides a non-transitory computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, implements a data splicing method provided by any of the above embodiments, the method comprising: obtaining a data packet to be spliced, wherein the data packet to be spliced comprises a plurality of groups of data, each group of data in the plurality of groups of data has a data bit width of a target bit width, and each group of data in the plurality of groups of data is compressed data; sequentially taking each group of data in the plurality of groups of data as a current group of data in a predetermined order to perform the following steps to obtain a current spliced data, and determining a spliced data packet based on a plurality of spliced data obtained based on the plurality of groups of data, wherein the data in the spliced data packet has a data bit width of the target bit width: placing valid data extracted from the current group of data in a low bit end of the current group of data; expanding the data bit width of the current group of data to obtain an expanded current group of data, wherein the data bit width of the expanded current group of data is greater than or equal to twice the target bit width; performing an OR operation on the expanded current group of data and a waiting group of data to obtain a merged current group of data, wherein the waiting group of data is data waiting to be spliced, and valid data in the merged current group of data is located in a high bit end of the merged current group of data; and in a case where the data bit width of the valid data in the merged current group of data is greater than or equal to the target bit width, outputting the valid data in the high bit end of the merged current group of data as the current spliced data, wherein the data bit width of the current spliced data is the target bit width.
[0106] The device embodiments described above are merely illustrative, wherein the units shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0107] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus necessary general hardware platforms, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods of the embodiments or some parts of the embodiments.
[0108] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit the same; and although the present application has been described in detail with reference to the foregoing embodiments, it should be appreciated by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features thereof can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data splicing method, characterized in that: include: Acquire a data packet to be spliced, wherein the data packet to be spliced includes multiple groups of data, the data bit width of each group of data in the multiple groups of data is a target bit width, and each group of data in the multiple groups of data is compressed data; The following steps are performed in sequence using each group of data in the multiple groups of data as a current group of data in a preset order to obtain current spliced data, and a spliced data packet is determined based on a plurality of spliced data obtained based on the multiple groups of data, wherein the data bit width of the data in the spliced data packet is the target bit width: placing the valid data extracted from the current group of data in a compact manner at the low-order end of the current group of data; Expanding the data bit width of the current group of data to obtain expanded current group of data, wherein the data bit width of the expanded current group of data is greater than or equal to twice the target bit width; Performing an OR operation on the expanded current group data and the waiting group data to obtain a merged current group data, wherein the waiting group data is data waiting to be spliced, and the valid data in the merged current group data is located at the high end of the merged current group data; When the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high-order end of the merged current group data is output as the current splicing data, wherein the data bit width of the current splicing data is the target bit width.
2. The data splicing method according to claim 1, characterized in that: When the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high-order end of the merged current group data is output as the current spliced data, and then the method further includes: The remaining valid data in the merged current group data is moved to the high-order end of the merged current group data, and the merged current group data is updated as the waiting group data.
3. The data splicing method according to claim 1, characterized in that: The expanded current group data is subjected to an OR operation with the waiting group data to obtain the merged current group data, and then the following steps are further included: In a case where the data bit width of the valid data in the merged current group data is smaller than the target bit width, the merged current group data is updated to the waiting group data.
4. The data splicing method according to claim 1, characterized in that: The method of sequentially performing the following steps on each of the plurality of data sets as a current data set in a preset order to obtain current spliced data, and determining a spliced data packet based on a plurality of spliced data sets obtained based on the plurality of data sets includes: After obtaining the multiple splicing data corresponding to the multiple groups of data, the data at the high-order end of the waiting group data is determined as the target splicing data, and the target splicing data is added to the multiple splicing data, wherein the data bit width of the target splicing data is the target bit width.
5. The data splicing method according to claim 1, characterized in that: Each of the multiple data sets includes at least one I / Q data pair after data compression.
6. The data splicing method according to any one of claims 1 to 5, characterized in that: The data packet to be spliced includes header data, and determining the spliced data packet according to the plurality of spliced data obtained based on the plurality of groups of data includes: Merging the plurality of spliced data to obtain data packet payload data; The packet header data is added to the header of the data packet payload data to obtain the spliced data packet.
7. A data splicing device, characterized in that: include: an acquisition module, configured to acquire a data packet to be spliced, wherein the data packet to be spliced includes multiple groups of data, the data bit width of each group of data in the multiple groups of data is a target bit width, and each group of data in the multiple groups of data is compressed data; an execution module, configured to sequentially execute the following steps using each group of data in the plurality of groups of data as a current group of data in a preset order to obtain current spliced data, and determine a spliced data packet based on a plurality of spliced data obtained based on the plurality of groups of data, wherein the data bit width of the data in the spliced data packet is the target bit width: placing the valid data extracted from the current group of data in a compact manner at the low-order end of the current group of data; Expanding the data bit width of the current group of data to obtain expanded current group of data, wherein the data bit width of the expanded current group of data is greater than or equal to twice the target bit width; Performing an OR operation on the expanded current group data and the waiting group data to obtain a merged current group data, wherein the waiting group data is data waiting to be spliced, and the valid data in the merged current group data is located at the high end of the merged current group data; When the data bit width of the valid data in the merged current group data is greater than or equal to the target bit width, the valid data at the high-order end of the merged current group data is output as the current splicing data, wherein the data bit width of the current splicing data is the target bit width.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the data splicing method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data splicing method according to any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the data splicing method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Data compression method and device, computer equipment and readable storage medium
CN118264255A
Data element selection and consolidation processors, methods, systems, and instructions
US20160085547A1