Data interaction method and device, computer equipment and storage medium
By storing and managing forward physical layer frame data in the memory module of the terminal device, the problems of inefficiency and message blocking in traditional data interaction methods are solved, and more efficient data interaction between the physical layer and the protocol stack is achieved.
Patent Information
- Application Number
- CN202411776219.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-15
AI Technical Summary
The data interaction between the traditional terminal physical layer and the protocol stack has problems of inefficiency and message blocking in DVB satellite terminals, especially when processing disordered forward physical layer frame data in a multi-core environment.
By storing forward physical layer frame data in the memory module of the terminal device and managing it using preset memory addresses and storage identifiers, the physical layer stores and updates the identifiers for multiple forward physical layer frame data received during the frame interrupt period, and the protocol stack reads and integrates these data after receiving the frame interrupt message.
This method significantly reduces the number of messages between the physical layer and the protocol stack, avoids message channel blocking, and reorganizes data through array matching, reducing the processing delay of the protocol stack and improving the efficiency of data interaction.
Smart Images

Figure CN119835240A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular, to a data interaction method, apparatus, computer equipment and storage medium. Background Art
[0002] The frame interruption data and uplink data of the physical layer of the traditional terminal are divided into two messages, which are reported to the protocol stack through two message channels respectively. Due to the air interface characteristics of the DVB protocol, if the physical layer frame data is reported through the message channel every time it is detected, then the satellite terminal physical layer may have multiple (up to 56) forward physical layer frame data (i.e. uplink data) reported to the protocol stack in one frame interruption cycle; the existing terminal physical layer will report a frame interruption to the protocol stack through the message channel in one frame interruption cycle; if there is uplink data to be sent, the uplink data will also occupy a message to be reported through the message channel. In addition, since the physical layer usually receives forward data on multiple cores, this will cause the 56 forward physical layer frame data sent to the protocol stack to be in a disordered state. If the traditional message channel method is used, it is easy to form a message storm and cause message blocking. At the same time, because the physical layer generally receives forward physical layer frame data on multiple processing cores, such as receiving physical layer frame 0, 8, 16, 24, 32 data on core 0, and receiving physical layer frame 1, 2, 3, 12, 13 data on core 1, the physical layer needs to fill the corresponding memory of each core and send it to the protocol stack after detecting this data. Therefore, the protocol stack also needs to sort and reorganize the forward data collected in an interrupt cycle, which will cause a lot of performance overhead to the message channel and protocol stack. This message interaction method is a very big challenge for the protocol stack. The uplink data message interaction method between the physical layer and the protocol stack of the traditional terminal is not suitable for DVB satellite terminals.
[0003] Therefore, there is an urgent need for a more efficient method for data interaction between the physical layer and the protocol stack. Summary of the invention
[0004] The embodiments of the present application provide a data interaction method, apparatus, computer device and storage medium.
[0005] In a first aspect of an embodiment of the present application, a data interaction method is provided, which is applied to a terminal device, wherein the terminal device includes at least a physical layer and a protocol stack, and the terminal device is configured with a memory module for storing forward physical layer frame data of the terminal; the method is used to interact data between the physical layer and the protocol stack, and the method at least includes:
[0006] The physical layer stores, within the current frame interruption period, a plurality of the forward physical layer frame data received within the current frame period into a corresponding preset memory address in the memory module, and updates a storage identifier of the preset memory address to a first occupation identifier;
[0007] After receiving the frame interrupt message, the protocol stack reads the corresponding forward physical layer frame data from the memory module based on each of the preset memory addresses, and changes the storage identifier of the preset memory address to a first vacant identifier;
[0008] The protocol stack integrates the plurality of forward physical layer frame data into a target forward data message based on the physical layer frame index of each forward physical layer frame data and then processes the message.
[0009] In an optional embodiment of the present application, before the physical layer stores the plurality of forward physical layer frame data received in the current frame period in the corresponding preset memory address in the memory module within the current frame interruption period, and updates the storage identifier of the preset memory address to the first occupied identifier, the method further includes:
[0010] During the current frame interruption period of the physical layer, the physical layer receives each of the forward physical layer frame data from multiple processing cores respectively; wherein the forward physical layer frame data includes a corresponding physical layer frame index; wherein the physical layer frame index is used to characterize the order of each of the forward physical layer frame data.
[0011] In an optional embodiment of the present application, the processing core corresponds one-to-one to the preset memory address; and / or at least the first 4 bytes of the memory module are occupied bytes of the storage identifier.
[0012] In an optional embodiment of the present application, after receiving the frame interrupt message, the protocol stack reads the corresponding forward physical layer frame data from the memory module based on each preset memory address, and before changing the storage identifier of the preset memory address to the first vacant identifier, the method further includes:
[0013] The preset memory address of each of the forward physical layer frame data filled in by each processing core of the physical layer to the memory module;
[0014] After the current frame interruption period ends, the physical layer sends the frame interruption message carrying the preset memory address to the protocol stack.
[0015] In an optional embodiment of the present application, the protocol stack is configured with a structure memory including multiple array pointers, and the structure memory is used to integrate the multiple forward data into the target forward data message according to the physical layer frame index.
[0016] In an optional embodiment of the present application, the identifier corresponding to the physical layer frame index is updated to a second occupancy identifier.
[0017] In an optional embodiment of the present application, the forward physical layer frame data is 1 to 56 groups, and correspondingly, the index range of the physical layer frame index is 0 to 55.
[0018] According to a second aspect of an embodiment of the present application, a data interaction device is provided, which is applied to a terminal device, wherein the terminal device includes at least a physical layer and a protocol stack, and the terminal device is configured with a memory module for storing forward physical layer frame data of the terminal; the device is used to interact data between the physical layer and the protocol stack, and the device includes at least:
[0019] A storage module, used for the physical layer to store the plurality of forward physical layer frame data received in the current frame period to the corresponding preset memory address in the memory module during the current frame interruption period, and to update the storage identifier of the preset memory address to a first occupied identifier;
[0020] A reading module, used for the protocol stack to read the corresponding forward physical layer frame data from the memory module based on each of the preset memory addresses after receiving the frame interrupt message, and to change the storage identifier of the preset memory address to a first vacant identifier;
[0021] A processing module is used for the protocol stack to integrate multiple pieces of the forward physical layer frame data into a target forward data message based on the physical layer frame index of each piece of the forward physical layer frame data and then process it.
[0022] According to a third aspect of an embodiment of the present application, a computer device is provided, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0023] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0024] The data interaction method provided by the embodiment of the present application is as follows: the physical layer stores the multiple forward physical layer frame data received in the current frame period to the corresponding preset memory address in the memory module within the current frame interruption period, and updates the storage identifier of the preset memory address to a first occupied identifier; after receiving the frame interruption message, the protocol stack reads the corresponding forward physical layer frame data from the memory module based on each preset memory address, and updates the storage identifier of the preset memory address to a first vacant identifier; the protocol stack integrates the multiple forward physical layer frame data into a target forward physical layer frame data message based on the physical layer frame index of each forward physical layer frame data, and then processes it.
[0025] The physical layer may receive up to 56 unordered forward physical layer frame data on multiple cores during a DVB frame interruption cycle; the physical layer carries the memory address of the forward physical layer frame data to be reported during the current frame interruption cycle while reporting the frame interruption message; after receiving the frame interruption message, the protocol stack extracts and reassembles the forward physical layer frame data during the current frame interruption cycle, which can greatly reduce the number of messages between the physical layer and the protocol stack (for example, it can be reduced from the original 1 frame interruption message + 56 forward physical layer frame data messages to only 1 frame interruption message), preventing the message channel from being blocked due to the excessive number of inter-layer messages; at the same time, the forward physical layer frame data messages received by the physical layer on each core do not need to go through a sorting algorithm in the protocol stack, but instead use an array matching method to reassemble the forward physical layer frame data, thereby reducing the processing delay of the protocol stack and improving the efficiency of data interaction between the physical layer and the protocol stack. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0027] Figure 1 A schematic diagram of an application scenario of a data interaction method provided by an embodiment of the present application;
[0028] Figure 2 A flowchart of a data interaction method provided by an embodiment of the present application;
[0029] Figure 3 A flowchart of a data interaction method provided by an embodiment of the present application;
[0030] Figure 4 A schematic diagram of the structure of a data interaction device provided in one embodiment of the present application;
[0031] Figure 5 A schematic diagram of the computer device structure provided for one embodiment of the present application. DETAILED DESCRIPTION
[0032] In the process of implementing the present application, the inventors found that there is an urgent need for a more efficient method for data interaction between the physical layer and the protocol stack.
[0033] In response to the above problems, embodiments of the present application provide a data interaction method, apparatus, computer device and storage medium.
[0034] The solutions in the embodiments of the present application can be implemented using various computer languages, for example, the process-oriented C language.
[0035] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0036] See also Figure 1 The following is a brief description of the application environment of a data interaction method provided in an embodiment of the present application:
[0037] A data interaction method provided in an embodiment of the present application is applied to a terminal device, wherein the terminal device includes at least a physical layer and a protocol stack, and the physical layer and the protocol stack are located in the same terminal device, for example, both are located on the same board. Generally, the protocol stack is located on the ARM (Advanced RISC Machines, a processor) side of the board, and the physical layer is located on the DSP (Digital Signal Processor, i.e., digital signal processor) side of the board. The processing core involved in the embodiment of the present application refers to the processing core on the DSP side of the physical layer. The terminal device is configured with a memory module for storing the forward physical layer frame data of the terminal; the memory module and the byte contents in the memory module are jointly maintained by the physical layer and the protocol stack.
[0038] The data interaction method provided in the embodiment of the present application is used to interact with the data between the physical layer and the protocol stack. The direct interaction data between the physical layer and the protocol stack includes but is not limited to frame interrupt messages and forward physical layer frame data. The data in the frame interrupt message is relatively small, generally only including an msCnt (millisecond variable) information of the update time information. The physical layer frame data refers to the data detected by the physical layer from the air interface. The frame interrupt message is independent of the air interface and is a message for aligning the time information between the physical layer and the protocol stack. Among them, the format of each forward physical layer frame data can be, for example, as follows:
[0039] typedef struct fwdRxData
[0040] {
[0041] U16 msCnt; / / millisecond count, value 0-65536
[0042] U16 plfIdx; / / Physical layer frame index
[0043] U16 crc; / / CRC result
[0044] U16 dataFieldLenth;
[0045] char data[]; / / data field code stream, not filled when CRC is wrong
[0046] }FwdRxData;
[0047] See also Figure 2 The following embodiments take the above-mentioned terminal device as the execution subject, and apply the method provided in the embodiment of the present application to the above-mentioned terminal device for data interaction between the physical layer and the protocol stack as an example for specific description. The data interaction method provided in the embodiment of the present application includes the following steps 201-203:
[0048] Step 201: the physical layer stores the plurality of forward physical layer frame data received in the current frame interruption period to the corresponding preset memory address in the memory module, and updates the storage identifier of the preset memory address to a first occupation identifier;
[0049] Step 202: After receiving the frame interrupt message, the protocol stack reads the corresponding forward physical layer frame data from the memory module based on each preset memory address, and changes the storage identifier of the preset memory address to a first vacant identifier;
[0050] After the protocol stack receives the frame interrupt message, it reads the corresponding forward physical layer frame data from the memory module based on each preset memory address: if its memory flag is an occupied flag (for example, the flag byte is 1), the forward data is taken out for processing, and then the flag position is modified to the first empty flag (for example, the flag byte is 0); if the internal storage flag is the first empty flag when reading, it means that there is no forward physical layer frame data in the current memory and no processing is required.
[0051] The physical layer frame interrupt structure is as follows:
[0052] typedef struct rxMsIndication
[0053] {
[0054] U16 msCnt; / / millisecond count, value 0-65536
[0055] U16 rsv1;
[0056] U32 coreAddr[8]; / / There are up to 8 cores to receive forward data
[0057] }RxMsIndication;
[0058] Step 203, the protocol stack integrates the multiple forward physical layer frame data into a target forward data message based on the physical layer frame index of each forward physical layer frame data and then processes it, for example, performing data unpacking and data reassembly on the physical layer frame data according to the DVB protocol.
[0059] The forward data detected by the physical layer on each core is arranged in time sequence, and the forward data between different cores is out of order. In one interrupt cycle, the physical layer may detect 56 forward physical layer frame data, which are usually not continuous in the time domain, and their order is indicated by the physical layer frame index (Phy Layer Frame Index, hereinafter referred to as plfIdx); the physical layer does not need to sort the data, and directly stores the data in the memory addresses planned by each processing core (up to 8 processing cores) (the memory address corresponding to the processing core on which the forward physical layer frame data is detected is filled), and the storage identifier of the corresponding memory is modified to 1. The storage identifier can be one byte or multiple bytes, and the embodiment of the present application is not specifically limited. The physical layer frame index in the embodiment of the present application can be represented by the above-mentioned physical layer frame interrupt structure FwdRxData. The physical layer will report up to 56 forward physical layer frame data within 1ms, and each forward physical layer frame data corresponds to a physical layer frame index, as well as the corresponding crc (Cell Resource Center, Cell Resource Center) result, data length, and data code stream. After receiving the data, the protocol stack integrates the 56 physical layer frame data into a normal order and then processes them.
[0060] The data interaction method provided by the embodiment of the present application is as follows: the physical layer stores the multiple forward physical layer frame data received in the current frame period to the corresponding preset memory address in the memory module within the current frame interruption period, and updates the storage identifier of the preset memory address to a first occupied identifier; after receiving the frame interruption message, the protocol stack reads the corresponding forward physical layer frame data from the memory module based on each preset memory address, and updates the storage identifier of the preset memory address to a first vacant identifier; the protocol stack integrates the multiple forward physical layer frame data into a target forward physical layer frame data message based on the physical layer frame index of each forward physical layer frame data, and then processes it.
[0061] The physical layer may receive up to 56 unordered forward physical layer frame data on multiple cores during a DVB frame interruption cycle; the physical layer carries the memory address of the forward physical layer frame data to be reported during the current frame interruption cycle while reporting the frame interruption message; after receiving the frame interruption message, the protocol stack extracts and reassembles the forward physical layer frame data during the current frame interruption cycle, which can greatly reduce the number of messages between the physical layer and the protocol stack (for example, it can be reduced from the original 1 frame interruption message + 56 forward physical layer frame data messages to only 1 frame interruption message), preventing the message channel from being blocked due to the excessive number of inter-layer messages; at the same time, the forward physical layer frame data messages received by the physical layer on each core do not need to go through a sorting algorithm in the protocol stack, but instead use an array matching method to reassemble the forward physical layer frame data, thereby reducing the processing delay of the protocol stack and improving the efficiency of data interaction between the physical layer and the protocol stack.
[0062] In an optional embodiment of the present application, in the above step 201, before the physical layer stores the multiple forward physical layer frame data received in the current frame period in the current frame interruption period to the corresponding preset memory address in the memory module, and updates the storage identifier of the preset memory address to the first occupied identifier, the method further includes the following steps:
[0063] In the current frame interruption period of the physical layer, the physical layer receives the forward physical layer frame data from the multiple processing cores respectively;
[0064] Wherein, the forward physical layer frame data includes a corresponding physical layer frame index; wherein, the physical layer frame index is used to characterize the order of each forward physical layer frame data. The physical layer may detect multiple physical layer frame data on multiple cores in the current frame interruption cycle, but the embodiment of the present application carries the forward physical layer frame data in the frame interruption message and stores it in the corresponding preset memory address in the memory module, and the protocol stack can directly sort it based on the physical layer frame index, which can avoid the problem of large processing overhead caused by confusion of forward physical layer frame data in multiple processing cores, thereby greatly improving the data processing efficiency of the protocol stack, and further improving the efficiency of data interaction between the physical layer and the protocol stack.
[0065] In an optional embodiment of the present application, the processing core corresponds one-to-one to the preset memory address; and / or at least the first 4 bytes of the memory module are occupied bytes of the storage identifier.
[0066] When the physical layer has forward data to receive and send, it needs to take out the required memory from the planned memory; confirm the flag bits of the first four bytes of the preset storage address, if they are all 0 (the first vacant flag), the forward physical layer frame data can be written; if they are all 1 (the first occupied flag), it cannot be used temporarily, and it is necessary to wait for the protocol stack to complete the processing and set the flag bit to 0 before it can be used. At least the first 4 bytes of the memory module described in the embodiment of the present application are the occupied bytes of the storage flag, which can keep the bytes between the protocol stack and the physical layer consistent, facilitate data processing, and improve data processing efficiency.
[0067] See also Figure 3 In an optional embodiment of the present application, in the above step 202, after the protocol stack receives the frame interrupt message, before reading the corresponding forward physical layer frame data from the memory module based on each preset memory address and changing the storage identifier of the preset memory address to the first vacant identifier, the method further includes:
[0068] Step 301, each processing core of the physical layer fills the preset memory address of each forward physical layer frame data into the memory module;
[0069] Step 302: After the current frame interruption period ends, the physical layer sends the frame interruption message carrying the preset memory address to the protocol stack.
[0070] When the frame interruption period arrives, the physical layer sends a frame interruption message to the protocol stack. The frame interruption message needs to carry the memory address of the forward physical layer frame data filled in after processing on each core of the physical layer. Each core will receive multiple sets of forward data, and each core corresponds to a memory address. Therefore, each memory address corresponds to multiple sets of forward messages, and the physical layer frame index of each forward message is different.
[0071] The protocol stack changes from processing 56 messages to processing 1 message. At the same time, the physical layer and message channel also change, which greatly improves the overall efficiency.
[0072] In an optional embodiment of the present application, the protocol stack is configured with a structure memory including multiple array pointers, and the structure memory is used to integrate the multiple forward data into the target forward data message according to the physical layer frame index.
[0073] In an optional embodiment of the present application, the identifier corresponding to the physical layer frame index is updated to a second occupancy identifier.
[0074] In an optional embodiment of the present application, the forward physical layer frame data is 1 to 56 groups, and correspondingly, the index range of the physical layer frame index is 0 to 55.
[0075] Since the forward physical layer frame data sent by the physical layer is out of order, the protocol stack needs to rely on the physical layer frame index plfIdx in the forward data to integrate multiple forward data messages reported by the current frame interrupt into a complete forward data message for processing. The protocol stack adopts a processing strategy of exchanging memory for performance and applies for a structure memory containing 56 array pointers. The structure is shown below.
[0076] typedef struct fwdPduAddr
[0077] {
[0078] Bool isHaveFwdRxData
[56] ; / / Whether there is a flag for forward data
[0079] FwdRxData*fwdRxData
[56] ; / / Store the forward data address corresponding to the physical layer frame index
[0080] }FwdPduAddr;
[0081] Each fwdRxData corresponds to a physical layer frame data address, and each fwdRxData has a corresponding flag isHaveFwdRxData to indicate whether there is data. The protocol stack stores the addresses of 56 packets of forward data into the corresponding fwdRxData in sequence according to the physical layer frame index plfIdx (the index range is 0 to 55) carried in each packet of forward physical layer frame data. After all the forward data of the current frame interruption is stored, the protocol stack integrates all the data into a complete forward data according to the flag isHaveFwdRxData, so as to save the performance overhead caused by relying on the physical layer frame index for sorting.
[0082] As mentioned above, structure memory: the interrupt message sent by the physical layer to the protocol stack contains a memory address, each memory address contains multiple groups of forward physical layer frame data received on multiple cores; the protocol stack takes out the forward physical layer frame data from each memory address in turn, each packet of forward physical layer frame data contains a physical layer frame index, and the protocol stack fills the forward physical layer frame data into the corresponding fwdRxData (preset memory address) according to the physical layer frame index;
[0083] At the same time, the isHaveFwdRxData of the corresponding index (the flag of whether there is forward data, that is, the judgment flag of whether there is forward data on the corresponding physical layer frame) is set to TRUE (the second occupied flag). Once the physical layer may not detect data or detect errors on the corresponding physical layer frame index, the corresponding physical layer frame data will not be reported, thereby avoiding the occurrence of useless overhead; after all the physical layer frame data of the current interrupt are filled into FwdPduAddr (the forward data address of the corresponding physical layer frame index is stored, that is, the forward data corresponding to the corresponding physical layer frame index. This field should be used in conjunction with isHaveFwdRxData. When isHaveFwdRxData is TRUE, it means that there is forward data on the corresponding physical layer frame index, otherwise there is no forward data on the corresponding physical layer frame index), the protocol stack has obtained all the data in the current interrupt cycle, and these data are sorted according to the physical layer frame index (that is, the real air interface time), and the next step of processing can be started.
[0084] Under normal circumstances, after the protocol stack receives 56 unordered data, it needs to process them by sorting algorithm according to the physical layer frame index. No matter which sorting algorithm is used, sorting 56 data in one interrupt cycle will bring about a large performance overhead. However, in the embodiment of the present application, a strategy of exchanging memory for performance is adopted. It is only necessary to fill the data into the corresponding array according to the physical layer frame index, and rely on isHaveFwdRxData to determine whether there is physical layer frame data on the corresponding physical layer frame index, thereby eliminating the sorting process and reducing performance overhead.
[0085] The DVB (a digital satellite broadcasting standard) satellite terminal interacts the data between the physical layer and the protocol stack based on the above data interaction method. During the interaction, the LDPC code (Low Density Parity Check Code) is used to transmit, receive and correct data. In an optional embodiment of the present application, the LDPC code for realizing data interaction between the physical layer and the protocol stack can be generated more efficiently based on the following method:
[0086] Dividing the to-be-processed check matrix of the LDPC code into an information bit matrix and a check bit matrix; wherein the check bit matrix is a dual diagonal matrix;
[0087] Performing row transformation on the information bit matrix and the check bit matrix based on a preset row index to form a rearranged first information bit matrix and a first check bit matrix; wherein each matrix unit in the first information bit matrix is a 0 matrix or an accumulation of 1 to 3 unit circulant matrices;
[0088] Performing a column transformation on the first check bit matrix based on a preset column index to form a rearranged second check bit matrix; wherein, except for a sub-diagonal all-1 matrix in the second check bit matrix, all other matrix units are 0 matrices or unit matrices;
[0089] Constructing a matrix equation for the check matrix based on the first information bit matrix and the second check bit matrix, and solving the matrix equation to obtain each target check bit value in the second check bit matrix;
[0090] A target codeword of an LDPC code is generated based on each information bit in the first information bit matrix and the target check bit value.
[0091] In an optional embodiment of the present application, the performing row transformation on the information bit matrix and the check bit matrix based on a preset row index to form a rearranged first information bit matrix and a first check bit matrix includes:
[0092] According to the preset row index
[0093] The information bit matrix and the check bit matrix are row transformed in the manner of [0,q,2q,…(L-1)q,1,q+1,2q+1,…,(L-1)q+1,…,q-1,2q-1,3q-1,…,Lq-1] to form the rearranged first information bit matrix and the first check bit matrix; wherein L represents the number of units of the unit matrix, and q represents a matrix parameter related to the code rate and code length of the check code encoding.
[0094] In an optional embodiment of the present application, the performing column transformation on the first check bit matrix based on a preset column index to form a rearranged second check bit matrix includes:
[0095] According to the preset column index according to the column index
[0096] [0,q,2q,…(L-1)q,1,q+1,2q+1,…,(L-1)q+1,…,q-1,2q-1,3q-1,…,Lq-1] performs column transformation on the first check bit matrix to form a rearranged second check bit matrix; wherein q represents a matrix parameter related to the code rate and code length of the check code encoding.
[0097] In an optional embodiment of the present application, constructing a matrix equation for the check matrix based on the first information bit matrix and the second check bit matrix includes:
[0098]
[0099] Wherein, s represents each information bit in the first information bit matrix, p represents each check bit in the second check bit matrix, j represents the information bit index, n represents the number of rows of the check matrix to be processed, q represents a matrix parameter related to the code rate and code length, and different code rates in the coding protocol correspond to specific q values; Q h(n,j) (0≤n≤q-1) means that the unit matrix is cyclically shifted right by h(n,j) positions. If h(n,j)=-1, then Qh(n,j) represents an all-0 matrix.
[0100] In an optional embodiment of the present application, if the current unit matrix includes multiple cyclic shifts, the current unit matrix is cyclically processed multiple times and then superimposed.
[0101] In an optional embodiment of the present application, solving the matrix equation to obtain each target check bit value in the second check bit matrix includes:
[0102] Calculate a final check bit value of a final matrix cell in the second check bit matrix based on the matrix equation;
[0103] Calculate the first check bit value of the first matrix unit in the second check bit matrix based on the last check bit value;
[0104] Based on the bidirectional recursive method and the last check bit value and the first check bit value, other bit values in the second check bit matrix are calculated to obtain the target check bit value including the first check bit value, the last check bit value and each of the other bit values.
[0105] In an optional embodiment of the present application, the generating a target codeword of the LDPC code based on each information bit in the first information bit matrix and the target check bit value includes:
[0106] Transforming each of the target check bit values based on the preset column index to obtain a third check bit after column restoration;
[0107] Each information bit in the first information bit matrix and the third check bit are concatenated to obtain the encoded bits of the LDPC code, thereby obtaining the target codeword.
[0108] It should be understood that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0109] See also Figure 4 An embodiment of the present application provides a data interaction device 400, which is applied to a terminal device, wherein the terminal device at least includes a physical layer and a protocol stack, and the terminal device is configured with a memory module for storing forward physical layer frame data of the terminal; the method is used to interact data between the physical layer and the protocol stack, and the device 400 at least includes: a storage module 410, a reading module 420 and a processing module 430, wherein:
[0110] The storage module 410 is used for the physical layer to store the multiple forward physical layer frame data received in the current frame period to the corresponding preset memory address in the memory module during the current frame interruption period, and update the storage identifier of the preset memory address to the first occupation identifier;
[0111] The reading module 420 is used for the protocol stack to read the corresponding forward physical layer frame data from the memory module based on each preset memory address after receiving the frame interrupt message, and change the storage identifier of the preset memory address to the first vacant identifier;
[0112] The processing module 430 is used for the protocol stack to integrate multiple pieces of the forward physical layer frame data into a target forward data message based on the physical layer frame index of each piece of the forward physical layer frame data and then process it.
[0113] In an optional embodiment of the present application, the above-mentioned storage module 410 is also used for, during the current frame interruption period of the physical layer, the physical layer receives each of the forward physical layer frame data from multiple processing cores respectively; wherein the forward physical layer frame data includes a corresponding physical layer frame index; wherein the physical layer frame index is used to characterize the order of each of the forward physical layer frame data.
[0114] In an optional embodiment of the present application, the processing core corresponds one-to-one to the preset memory address; and / or at least the first 4 bytes of the memory module are occupied bytes of the storage identifier.
[0115] In an optional embodiment of the present application, the reading module 420 is further used for the preset memory address of each forward physical layer frame data filled in by each processing core of the physical layer to the memory module;
[0116] After the current frame interruption period ends, the physical layer sends the frame interruption message carrying the preset memory address to the protocol stack.
[0117] In an optional embodiment of the present application, the protocol stack is configured with a structure memory including multiple array pointers, and the structure memory is used to integrate the multiple forward data into the target forward data message according to the physical layer frame index.
[0118] In an optional embodiment of the present application, the identifier corresponding to the physical layer frame index is updated to a second occupancy identifier.
[0119] In an optional embodiment of the present application, the forward physical layer frame data is 1 to 56 groups, and correspondingly, the index range of the physical layer frame index is 0 to 55.
[0120] For the specific definition of the above-mentioned data interaction device 400, please refer to the definition of the data interaction method above, which will not be repeated here. Each module in the above-mentioned data interaction device 400 can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0121] In one embodiment, a computer device is provided, the internal structure diagram of which can be as follows: Figure 5As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a data interaction method as described above is implemented. It includes: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, any step in the data interaction method as described above is implemented.
[0122] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any step in the above data interaction method can be implemented.
[0123] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0124] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0125] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0127] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0128] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data interaction method, characterized in that: Applied to a terminal device, the terminal device at least comprises a physical layer and a protocol stack, and the terminal device is configured with a memory module for storing forward physical layer frame data of the terminal; The method is used to interact data between the physical layer and the protocol stack, and the method at least comprises: The physical layer stores, within the current frame interruption period, a plurality of the forward physical layer frame data received within the current frame period into a corresponding preset memory address in the memory module, and updates a storage identifier of the preset memory address to a first occupation identifier; After receiving the frame interrupt message, the protocol stack reads the corresponding forward physical layer frame data from the memory module based on each of the preset memory addresses, and changes the storage identifier of the preset memory address to a first vacant identifier; The protocol stack integrates the plurality of forward physical layer frame data into a target forward data message based on the physical layer frame index of each forward physical layer frame data and then processes the message.
2. The data interaction method according to claim 1, characterized in that: Before the physical layer stores the plurality of forward physical layer frame data received in the current frame period in the corresponding preset memory address in the memory module within the current frame interruption period, and updates the storage identifier of the preset memory address to the first occupancy identifier, the method further includes: During the current frame interruption period of the physical layer, the physical layer receives each of the forward physical layer frame data from multiple processing cores respectively; wherein the forward physical layer frame data includes a corresponding physical layer frame index; wherein the physical layer frame index is used to characterize the order of each of the forward physical layer frame data.
3. The data interaction method according to claim 1, characterized in that: The processing core corresponds one-to-one to the preset memory address; and / or at least the first 4 bytes of the memory module are occupied bytes of the storage identifier.
4. The data interaction method according to claim 1, characterized in that: After the protocol stack receives the frame interrupt message, based on each of the preset memory addresses, reads the corresponding forward physical layer frame data from the memory module, and before changing the storage identifier of the preset memory address to the first vacant identifier, the method further includes: The preset memory address of each of the forward physical layer frame data filled in by each processing core of the physical layer to the memory module; After the current frame interruption period ends, the physical layer sends the frame interruption message carrying the preset memory address to the protocol stack.
5. The data interaction method according to claim 1, characterized in that: The protocol stack is configured with a structure memory including a plurality of array pointers, and the structure memory is used to integrate the plurality of forward data into the target forward data message according to the physical layer frame index.
6. The data interaction method according to claim 1, characterized in that: The identifier corresponding to the physical layer frame index is updated to a second occupancy identifier.
7. The data interaction method according to claim 1, characterized in that: The forward physical layer frame data is 1 to 56 groups, and correspondingly, the index range of the physical layer frame index is 0 to 55.
8. A data interaction device, characterized in that: Applied to a terminal device, the terminal device at least comprises a physical layer and a protocol stack, and the terminal device is configured with a memory module for storing forward physical layer frame data of the terminal; The device is used to interact data between the physical layer and the protocol stack, and the device at least includes: A storage module, used for the physical layer to store the plurality of forward physical layer frame data received in the current frame period to the corresponding preset memory address in the memory module during the current frame interruption period, and to update the storage identifier of the preset memory address to a first occupied identifier; A reading module, used for the protocol stack to read the corresponding forward physical layer frame data from the memory module based on each of the preset memory addresses after receiving the frame interrupt message, and to change the storage identifier of the preset memory address to a first vacant identifier; A processing module is used for the protocol stack to integrate multiple pieces of the forward physical layer frame data into a target forward data message based on the physical layer frame index of each piece of the forward physical layer frame data and then process it.
9. A computer device comprising: The method comprises a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable 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.