Memory configuration method, device, equipment and storage medium
By introducing memory configuration factors, flexibly adjusting the memory configuration method, and optimizing the memory allocation of RB and PDU queues, the problem of memory resource waste in the existing technology is solved, and efficient memory utilization and service performance improvement are achieved.
Patent Information
- Application Number
- CN202010646503.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-07
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2040-07-07
AI Technical Summary
Existing memory configuration schemes cannot adapt to various sequence number length requirements, resulting in a waste of memory resources, especially when users and bearer resources are idle, and cannot effectively save memory.
By introducing memory configuration factors, the memory configuration method can be flexibly adjusted. The memory allocation of RB and PDU queues is optimized according to the sequence number length and business needs. The target position is calculated using a formula to insert or delete PDU nodes, thereby optimizing memory usage.
It achieves memory optimization that automatically adapts to various sequence number lengths while ensuring processing efficiency, reduces memory resource waste, and increases the number of connected users and business KPI indicators.
Smart Images

Figure CN113918312B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a memory configuration method, device, equipment and storage medium. Background Art
[0002] With the increasing number of users, the need for multiple services, and the expansion of the base sequence number (SN) reordering length, the static memory demand for the receive and transmit queues of the PDCP (Packet Data Convergence Protocol) and RLC (Radio Link Control Protocol) has increased exponentially. However, some user and bearer resources remain idle for a period of time after registration and activation, resulting in significant memory waste. Therefore, proper memory allocation is necessary.
[0003] Existing memory configuration solutions involve manual intervention to adjust the use of transmit and receive queue memory, but this approach lacks intelligence and cannot adapt to various sequence number length requirements. Alternatively, the transmit and receive queue lengths can be reduced by an exponential factor of 2, allowing queue memory nodes to be reused within a certain range. However, this approach is not suitable for situations with large reordering windows.
[0004] Therefore, how to propose an effective memory configuration method that saves memory has become an urgent problem to be solved. Summary of the Invention
[0005] In response to existing problems, embodiments of the present invention provide a memory configuration method, apparatus, device, and storage medium.
[0006] In a first aspect, an embodiment of the present invention provides a memory configuration method, comprising:
[0007] Obtaining a preset memory configuration factor and the serial number of the target PDU (Protocol Data Unit) node to be configured;
[0008] Determining a first target position in a target RB queue based on the memory configuration factor and the sequence number and in accordance with a preset RB (Radio Bearers) position algorithm, where the first target position is used to store a target PDU queue;
[0009] Based on the memory configuration factor and the serial number, according to a preset PDU position algorithm, it is determined that the target PDU node is located at a second target position in the target PDU queue, and memory configuration is performed on the target PDU node at the second target position.
[0010] Optionally, the performing memory configuration on the target PDU node at the second target location specifically includes:
[0011] If the target PDU node is a node to be inserted, the target PDU node is inserted at the second target position, and the counter corresponding to the target PDU queue is incremented by one;
[0012] If the target PDU node is a node to be deleted, the target PDU node is deleted at the second target position, and the counter corresponding to the target PDU queue is reduced by one.
[0013] Optionally, the preset PDU location algorithm specifically includes:
[0014] First formula: Second target position = SN&(2 F –1);
[0015] Where SN is the serial number of the target PDU node;
[0016] F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0017] Optionally, the preset RB position algorithm specifically includes:
[0018] Second formula: First target position = SN>>F;
[0019] Where SN is the serial number of the target PDU node;
[0020] F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0021] Optionally, before obtaining the preset memory configuration factor and the serial number of the target PDU node to be configured, the method further includes:
[0022] When a new user bearer is established, the RB configuration parameters sent by the RRC (Radio Resource Control) layer are received, the memory size of the target RB queue is determined based on the RB configuration parameters and the memory configuration factor, and a memory application is performed.
[0023] Optionally, determining the memory size of the target RB queue based on the RB configuration parameter and the memory configuration factor specifically includes:
[0024] According to the third formula: the memory size of the target RB queue = 2 SnLength-F+2 , calculate and obtain the memory size of the target RB queue;
[0025] Wherein, SnLength is the RB configuration parameter;
[0026] F is the memory configuration factor, 0<F<SnLength.
[0027] Optionally, if the target PDU node is a node to be inserted, after determining the first target position in the target RB queue based on the memory configuration factor and the sequence number according to a preset RB position algorithm, and before determining that the target PDU node is located at a second target position in the target PDU queue based on the memory configuration factor and the sequence number according to a preset PDU position algorithm, the method further includes:
[0028] After determining that the target PDU queue does not exist at the first target position in the target RB queue, apply for a target PDU queue at the first target position, obtain the memory size of the target PDU queue based on the memory configuration factor, and perform memory application.
[0029] Optionally, obtaining the memory size of the target PDU queue based on the memory configuration factor specifically includes:
[0030] According to the fourth formula: the memory size of the target PDU queue = 2 F+2 +2 2 , calculate and obtain the memory size of the target PDU queue;
[0031] Wherein, F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0032] Optionally, if the target PDU node is a node to be deleted, after deleting the target PDU node at the second target position, the method further includes:
[0033] Determine that a counter corresponding to the target PDU queue is zero, and delete the target PDU queue at the first target position.
[0034] In a second aspect, an embodiment of the present invention provides a memory configuration device, comprising:
[0035] An acquisition module, used to obtain a preset memory configuration factor and a serial number of a target protocol data unit (PDU) node to be configured;
[0036] a determination module, configured to determine, based on the memory configuration factor and the sequence number and in accordance with a preset radio bearer RB position algorithm, a first target position in the target RB queue, wherein the first target position is used to store a target PDU queue;
[0037] A configuration module is used to determine that the target PDU node is located at a second target position in the target PDU queue based on the memory configuration factor and the serial number and in accordance with a preset PDU position algorithm, and to perform memory configuration on the target PDU node at the second target position.
[0038] Optionally, the configuration module is specifically configured to:
[0039] If the target PDU node is a node to be inserted, the target PDU node is inserted at the second target position, and the counter corresponding to the target PDU queue is incremented by one;
[0040] If the target PDU node is a node to be deleted, the target PDU node is deleted at the second target position, and the counter corresponding to the target PDU queue is reduced by one.
[0041] Optionally, the preset PDU location algorithm specifically includes:
[0042] First formula: Second target position = SN&(2 F –1);
[0043] Where SN is the serial number of the target PDU node;
[0044] F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0045] Optionally, the preset RB position algorithm specifically includes:
[0046] Second formula: First target position = SN>>F;
[0047] Where SN is the serial number of the target PDU node;
[0048] F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0049] Optionally, the device further comprises:
[0050] The RB initialization module is used to receive the RB configuration parameters sent by the RRC layer when a new user bearer is established, determine the memory size of the target RB queue based on the RB configuration parameters and the memory configuration factor, and make a memory application.
[0051] Optionally, the RB initialization module is specifically configured to:
[0052] According to the third formula: the memory size of the target RB queue = 2 SnLength-F+2 , calculate the memory size of the target RB queue RB;
[0053] Wherein, SnLength is the RB configuration parameter;
[0054] F is the memory configuration factor, 0<F<SnLength.
[0055] Optionally, the device further comprises:
[0056] The PDU initialization module is used to determine that the target PDU queue does not exist at the first target position in the target RB queue, apply for a target PDU queue at the first target position, obtain the memory size of the target PDU queue based on the memory configuration factor, and perform memory application.
[0057] Optionally, the PDU initialization module is specifically configured to:
[0058] According to the fourth formula: the memory size of the target PDU queue = 2 F+2 +2 2 , calculate the memory size of the target PDU queue Memory PDU ;
[0059] Wherein, F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0060] Optionally, the device further comprises:
[0061] The deleting module is configured to determine that the counter corresponding to the target PDU queue is zero, and delete the target PDU queue at the first target position.
[0062] In a third aspect, an embodiment of the present invention 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 steps of the method described in the first aspect when executing the program.
[0063] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processor.
[0064] The memory configuration method, apparatus, device, and storage medium provided by embodiments of the present invention enable deep memory optimization by flexibly pre-configuring memory configuration factors for memory optimization based on memory needs. Memory allocation for RB queues and PDU queues is performed using these memory configuration factors, ensuring processing efficiency while automatically adapting to transceiver queue configurations for all SnLength values. This significantly saves memory, thereby increasing the number of connected users and improving service KPIs. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. 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.
[0066] Figure 1 A schematic diagram of a memory configuration method flow chart provided in one embodiment of the present invention;
[0067] Figure 2 A schematic flow chart of a memory configuration method provided in another embodiment of the present invention;
[0068] Figure 3 A schematic flow chart of a memory configuration method according to another embodiment of the present invention;
[0069] Figure 4 A schematic structural diagram of a memory configuration device provided in one embodiment of the present invention;
[0070] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0071] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0072] In order to facilitate a clear description of the technical solutions of the embodiments of the present invention, in each embodiment of the present invention, if the words "first", "second", etc. are used to distinguish the same items or similar items with basically the same functions and effects, those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order.
[0073] Memory resources have always been a scarce resource in software engineering. However, memory usage and software operating efficiency are, to a certain extent, in a trade-off relationship. Existing memory optimization configuration methods have a low level of intelligence and are unable to adapt to the needs of various sequence number lengths or are not suitable for situations with large reordering windows. The main concept of each embodiment of the present invention is: introducing a memory configuration factor to flexibly adjust the memory, which can achieve the goal of not only not reusing nodes but also adapting to various sequence number lengths and effectively optimizing memory; each embodiment of the present invention proposes a method for optimizing the transceiver queue, which can effectively reduce the waste of memory resources while ensuring processing efficiency when the number of users, service load and sequence numbers increase.
[0074] The following describes the details through multiple embodiments.
[0075] Figure 1 A flow chart of a memory configuration method according to an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method comprises at least the following steps:
[0076] Step 100: Obtain a preset memory configuration factor and a serial number of a target PDU node to be configured;
[0077] Specifically, this embodiment can optimize the memory of the transceiver queue by using the memory configuration factor F. When the number of users, service bearers and RB sequence numbers increase, the memory consumption of the transceiver queue generated when the RB instances of PDCP and RLC are initialized can be greatly reduced while ensuring processing efficiency.
[0078] It is understandable that before performing memory configuration, a memory configuration factor for memory optimization may be first obtained, and a serial number of a target PDU node to be configured may also be obtained;
[0079] It is understandable that, in this embodiment, when the serial number of the target PDU node to be configured is known, the memory of the target PDU node can be flexibly configured based on the serial number and the memory configuration factor.
[0080] It is understandable that in order to achieve deep memory optimization, the value of the memory configuration factor can be flexibly selected according to memory needs when presetting the memory configuration factor;
[0081] Step 101: determining a first target position in a target RB queue based on the memory configuration factor and the sequence number and in accordance with a preset RB position algorithm, where the first target position is used to store a target PDU queue;
[0082] Specifically, the RB queue is used to store the address of the PDU queue. Therefore, after obtaining the preset memory configuration factor and the sequence number of the target PDU node to be configured, this embodiment can calculate and determine the first target position of the target PDU queue in the target RB queue based on the memory configuration factor and the sequence number using a preset RB position algorithm.
[0083] Step 102: Based on the memory configuration factor and the serial number, according to a preset PDU position algorithm, determine that the target PDU node is located at a second target position in the target PDU queue, and perform memory configuration on the target PDU node at the second target position.
[0084] Specifically, the PDU queue is used to store the address of the PDU node. Therefore, after obtaining the preset memory configuration factor and the serial number of the target PDU node to be configured, and determining the target PDU queue located at the first target position in the target RB queue, the target PDU node can be calculated and determined to be located at the second target position in the target PDU queue using a preset PDU position algorithm.
[0085] Specifically, in this embodiment, after the specific position of the target PDU node in the target PDU queue is determined, the memory of the target PDU node can be configured, for example, the target PDU node can be inserted or deleted.
[0086] Specifically, in this embodiment, when configuring the target PDU node on the receiving or sending side, a two-step calculation can be performed when inserting the target PDU node into the target PDU queue or deleting it from the target PDU queue according to the SN corresponding to the PDU data:
[0087] Determine the first target position of the target PDU queue in the target RB queue according to a preset RB position algorithm;
[0088] It can be understood that, in this embodiment, a target RB queue can be uniquely determined based on the PDU data and the corresponding SN;
[0089] After obtaining the target PDU queue of the first target position, the second target position of the target PDU node in the corresponding target PDU queue may be calculated;
[0090] The storage position of the target PDU node obtained through calculation is at the second target position of the target PDU queue at the first target position of the target RB transceiver queue.
[0091] The memory configuration method provided by the present invention implements deep memory optimization by pre-configuring memory configuration factors based on memory requirements. This method allocates memory to RB and PDU queues using these memory configuration factors, ensuring processing efficiency while automatically adapting to the transmit and receive queue configuration for all SnLength values. This significantly reduces memory usage, thereby increasing the number of connected users and improving service KPIs.
[0092] Optionally, based on the above embodiments, the performing memory configuration on the target PDU node at the second target location specifically includes:
[0093] If the target PDU node is a node to be inserted, the target PDU node is inserted at the second target position, and the counter corresponding to the target PDU queue is incremented by one;
[0094] Specifically, the target PDU node can be a newly added node, that is, a node to be inserted. Therefore, after determining that the target PDU node is located at the second target position in the target PDU queue, the target PDU node can be inserted at the second target position to complete the memory configuration of the target PDU node.
[0095] It can be understood that in this embodiment, in order to determine how many target PDU nodes are stored in the target PDU queue, and thus determine whether the target PDU queue will overflow after inserting a new target PDU node, for example, 4 bytes can be configured as the PDU counter of the node in the PDU queue; it can be understood that when the memory of the target PDU queue is known, the number of PDU nodes that can be stored in the target PDU queue is also known.
[0096] If the target PDU node is a node to be deleted, the target PDU node is deleted at the second target position, and the counter corresponding to the target PDU queue is reduced by one.
[0097] Specifically, the target PDU node may be a node to be deleted. Therefore, after determining that the target PDU node is located at the second target position in the target PDU queue, the target PDU node may be deleted at the second target position to complete the memory configuration of the target PDU node.
[0098] It can be understood that in this embodiment, in order to determine whether the target PDU queue is empty after deleting the target PDU node, 4 bytes are configured as the PDU counter corresponding to the PDU queue, which is used to record the number of PDU nodes stored in the target PDU queue; it can be understood that when the counter is 0, the target PDU queue is an empty queue. It can be understood that in order to avoid occupying memory, when the target PDU queue is an empty queue, it can be deleted.
[0099] Optionally, based on the above embodiments, the preset PDU location algorithm specifically includes:
[0100] First formula: Second target position = SN&(2 F –1);
[0101] Where SN is the serial number of the target PDU node;
[0102] F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0103] Specifically, when determining that the target PDU node is located at the second target position in the target PDU queue based on the memory configuration factor and the sequence number according to the preset PDU position algorithm, the formula pduPos=SN&(2 F –1) Calculation is performed to obtain the second target position pduPos of the target PDU node in the target PDU queue corresponding to the target RB queue;
[0104] Where SN is the serial number of the target PDU node;
[0105] F is the memory configuration factor, 0<F<SnLength, SnLength is the RB configuration parameter, SnLength is equal to 12 or 18. It can be understood that when F is 6 or 8, the memory saving rate can reach a larger percentage.
[0106] Optionally, based on the above embodiments, the preset RB position algorithm specifically includes:
[0107] Second formula: First target position = SN>>F;
[0108] Where SN is the serial number of the target PDU node;
[0109] F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0110] Specifically, when determining the first target position in the target RB queue based on the memory configuration factor and the sequence number according to the preset RB position algorithm, the formula quePos=SN>>F can be applied for calculation. After the calculation, the first target position quePos of the target PDU queue in the target RB queue can be obtained.
[0111] Where SN is the serial number of the target PDU node;
[0112] F is the memory configuration factor, 0<F<SnLength, SnLength is the RB configuration parameter, and SnLength is equal to 12 or 18.
[0113] Optionally, based on the above embodiments, before obtaining the preset memory configuration factor and the serial number of the target PDU node to be configured, the method further includes:
[0114] When a new user bearer is established, the RB configuration parameters sent by the RRC layer are received, the memory size of the target RB queue is determined based on the RB configuration parameters and the memory configuration factor, and a memory application is performed.
[0115] Specifically, when a higher layer activates a user, when a PDCP or RLC module creates a new user bearer, it is necessary to initialize the RB sending and receiving queues.
[0116] Specifically, when initializing the target RB queue, the high-level RRC can carry SnLength when configuring the L2 RB instance. The target RB queue applies for the transceiver queue memory based on the received RB parameter SnLenth. The memory size applied is Memory RB ;
[0117] It is understandable that since the target RB queue stores PDU queue addresses, each PDU queue address occupies 4 bytes, the number of PDU queue addresses stored in the target RB queue is Memory RB / 4, each PDU queue stores the corresponding PDU queue node.
[0118] It can be understood that, in this embodiment, after the RB transceiver queue is initialized and allocated memory, the memory size remains fixed during the entire life of the UE, which can be considered as static memory allocation.
[0119] Optionally, based on the above embodiments, determining the memory size of the target RB queue based on the RB configuration parameter and the memory configuration factor specifically includes:
[0120] According to the third formula: the memory size of the target RB queue = 2 SnLength-F+2 , calculate the memory size of the target RB queue RB ;
[0121] Wherein, SnLength is the RB configuration parameter;
[0122] F is the memory configuration factor, 0<F<SnLength.
[0123] Specifically, when applying for RB queue memory, it is necessary to specify the memory size to be applied for. In this embodiment, the memory size of the target RB queue can be determined according to the RB configuration parameters and the memory configuration factor.
[0124] In this embodiment, when determining the memory size of the target RB queue, the formula Memory can be applied. RB =2 SnLength -F+2 Calculate and obtain the memory size of the target RB queue RB .
[0125] It is understandable that this embodiment uses the memory configuration factor F as the memory size of the target RB queue. RB The index part can be Memory in the existing technology RB =2 SnLength+2 On this basis, the memory of the target RB queue is appropriately reduced according to memory requirements to match the actual needs and save a lot of memory.
[0126] Optionally, based on the above embodiments, if the target PDU node is a node to be inserted, after determining the first target position in the target RB queue based on the memory configuration factor and the sequence number according to a preset RB position algorithm, and before determining that the target PDU node is located at a second target position in the target PDU queue based on the memory configuration factor and the sequence number according to a preset PDU position algorithm, the method further includes:
[0127] After determining that the target PDU queue does not exist at the first target position in the target RB queue, apply for a target PDU queue at the first target position, obtain the memory size of the target PDU queue based on the memory configuration factor, and perform memory application.
[0128] Specifically, after determining the first target position in the target RB queue, the target PDU queue can be obtained. However, if the target PDU queue does not exist in the first target position in the target RB queue, that is, the sending and receiving services have just started, a new PDU queue needs to be applied for and initialized to prepare for the maintenance of the PDU node; a target PDU queue can be applied for at the first target position, and the memory size of the target PDU queue can be obtained based on the memory configuration factor, and the memory application for the target PDU queue can be performed.
[0129] It can be understood that in this embodiment, if there is a target PDU queue in the first target position in the target RB queue and it can store one PDU node, that is, the PDU queue will not overflow after storing the target PDU node, a new PDU queue will not be requested.
[0130] It can be understood that in this embodiment, it is possible to judge and determine that the PDU queue will not overflow after storing the target PDU node based on the PDU counter corresponding to the PDU queue; it can be understood that if it is judged and determined that the PDU queue will overflow after storing the target PDU node, a new PDU queue is applied for and initialized.
[0131] Specifically, when applying for memory for the target PDU queue, you can first determine the memory size of the target PDU queue. PDU , the target PDU queue is used to store the PDU node address. The address of each PDU node occupies 4 bytes, so a PDU queue can store Memory PDU / 4 PDU nodes.
[0132] Optionally, based on the above embodiments, obtaining the memory size of the target PDU queue based on the memory configuration factor specifically includes:
[0133] According to the fourth formula: the memory size of the target PDU queue = 2 F+2 +2 2 , calculate the memory size of the target PDU queue Memory PDU ;
[0134] Wherein, F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0135] Specifically, when applying for memory for a PDU queue, the memory size to be applied for needs to be clearly specified. In this embodiment, the memory size of the target PDU queue can be determined according to the memory configuration factor F.
[0136] In this embodiment, when determining the memory size of the target PDU queue, the formula Memory can be applied. PDU =2 F+2 +2 2 Calculate and obtain the memory size of the target PDU queue PDU .
[0137] It is understandable that this embodiment uses the memory configuration factor F as the memory size of the target PDU queue. RB The exponential part of the PDU queue can be dynamically allocated and released according to the needs of the SN, which can be considered as dynamic memory allocation.
[0138] Specifically, the size of each PDU queue is Memory PDU =2 F+2 +2 2 (bytes), where 2 F+2(bytes) used to store PDU nodes, 2 2 (bytes) as the PDU counter in the PDU queue node.
[0139] Optionally, based on the above embodiments, if the target PDU node is a node to be deleted, after deleting the target PDU node at the second target position, the method further includes:
[0140] Determine that a counter corresponding to the target PDU queue is zero, and delete the target PDU queue at the first target position.
[0141] Specifically, in this embodiment, if the target PDU node is a node to be deleted, after the target PDU node is deleted at the second target position, it is also necessary to determine whether the target PDU queue is empty after deleting the target PDU node, that is, determine whether the counter corresponding to the target PDU queue is zero. If it is determined that the counter corresponding to the target PDU queue is zero, the target PDU queue should be deleted at the first target position for storing the target PDU queue in the target RB queue where the target PDU queue is located.
[0142] It can be understood that, in this embodiment, as long as the storage address of the target RB queue where the target PDU queue is located is deleted, the PDU queue in the PDU queue memory block is also deleted.
[0143] It can be understood that, in this embodiment, as long as the address stored in the target PDU queue where the target PDU node is located is deleted, the PDU node in the PDU node memory block is also deleted.
[0144] The memory configuration method provided by the present invention implements deep memory optimization by pre-configuring memory configuration factors based on memory requirements. This method allocates memory to RB and PDU queues using these memory configuration factors, ensuring processing efficiency while automatically adapting to the transmit and receive queue configuration for all SnLength values. This significantly reduces memory usage, thereby increasing the number of connected users and improving service KPIs.
[0145] Figure 2 A flow chart of a memory configuration method according to another embodiment of the present invention is shown as follows: Figure 2 As shown, the method comprises at least the following steps:
[0146] Step 200, obtaining a serial number SN and a preset memory configuration factor F;
[0147] Specifically, first obtain the preset memory configuration factor F and the serial number SN of the target PDU node to be inserted;
[0148] Specifically, taking a 32-bit system as an example, in this embodiment, the high-level RRC configures the SnLength of the MR RB instance to be 18, the preset memory configuration factor F is 6, and the target PDU node to be inserted is the node with the PDU SN of 100.
[0149] Step 201, calculating a first target position;
[0150] Specifically, in this embodiment, the first target position in the target RB queue may be determined based on the memory configuration factor F and the sequence number SN according to a preset RB position algorithm. It can be understood that the first target position is used to store the target PDU queue.
[0151] Specifically, it is understood that before step 300, the target RB queue has been initialized when the new bearer is created, and the memory is Memory RB =2 SnLength-F+2 =16384 (bytes), then the number of queues that can be stored in the target RB queue is 2 SnLength-F =4096.
[0152] Specifically, when determining the first target position in the target RB queue according to the preset RB position algorithm based on the memory configuration factor and the sequence number, the first target position quePos of the target PDU queue in the target RB queue can be calculated by applying the formula quePos=SN>>F;
[0153] Specifically, in this embodiment, the first target position can be calculated:
[0154] quePos=SN>>F=100>>6=1, used to store the target PDU queue.
[0155] Step 202, determining whether there is a target PDU queue at the first target location;
[0156] Specifically, after determining the first target location for storing the target PDU queue, it may be first determined whether the target PDU queue exists at the first target location;
[0157] If the target PDU queue exists at the first target location, jump to step 204 to calculate the second target location;
[0158] If the target PDU queue does not exist at the first target position, the process jumps to step 203, where a target PDU queue is requested at the first target position in the target RB queue and initialized;
[0159] Step 203: Apply for a target PDU queue;
[0160] Specifically, if the target PDU queue does not exist at the first target location, it means that there is a new PDU node that needs to be processed, so the PDU queue can be initialized as needed. When applying for memory for the target PDU queue, the memory size of the target PDU queue can be determined first. PDU , the target PDU queue is used to store the PDU node address. The address of each PDU node occupies 4 bytes, so a PDU queue can store Memory PDU / 4 PDU nodes.
[0161] Specifically, in this embodiment, when determining the memory size of the target PDU queue, the formula Memory can be applied to obtain the memory size of the target PDU queue. PDU =2 F+2 +2 2 =260 (bytes), where the number of PDU nodes that can be stored in the target PDU queue is 2 F =64, which means that the initialization of the target PDU queue is completed.
[0162] Step 204, calculating the second target position;
[0163] Specifically, based on the memory configuration factor F and the sequence number SN, according to a preset PDU position algorithm, it can be determined that the target PDU node is located at the second target position in the target PDU queue;
[0164] Specifically, in this embodiment, when determining that the target PDU node is located at the second target position in the target PDU queue according to the preset PDU position algorithm based on the memory configuration factor and the sequence number, the formula can be applied to obtain the second target position of the target PDU node in the target PDU queue corresponding to the target RB queue:
[0165] pduPos=SN&(2 F –1)=100&63=36.
[0166] Step 205, insert the target PDU node;
[0167] Specifically, after determining that the second target position pduPos=36 of the target PDU node in the target PDU queue corresponding to the target RB queue, and the target PDU node is a node to be inserted, the target PDU node can be inserted at the second target position pduPos.
[0168] Step 206: The target PDU queue counter is incremented by one.
[0169] Specifically, after the target PDU node is inserted into the target PDU queue, the target PDU queue counter is incremented by one, and the number of addresses of the PDU nodes stored in the target PDU queue may be recorded.
[0170] Figure 3 A flowchart of a memory configuration method according to another embodiment of the present invention is shown in FIG. Figure 1 As shown, the method comprises at least the following steps:
[0171] Step 300, obtaining a serial number SN and a preset memory configuration factor F;
[0172] Specifically, first obtain the preset memory configuration factor F and the serial number SN of the target PDU node to be deleted;
[0173] Specifically, taking a 32-bit system as an example, in this embodiment, the high-level RRC configures the SnLength of the MR RB instance to be 18, the preset memory configuration factor F is 6, and the target PDU node to be deleted is the node with a PDU SN of 100.
[0174] Step 301, calculating a first target position;
[0175] Specifically, in this embodiment, the first target position in the target RB queue may be determined based on the memory configuration factor F and the sequence number SN according to a preset RB position algorithm. It can be understood that the first target position is used to store the target PDU queue.
[0176] Specifically, it is understood that before step 300, the target RB queue has been initialized when the new bearer is created, and the memory is Memory RB =2 SnLength-F+2 =16384 (bytes), then the number of queues that can be stored in the target RB queue is 2 SnLength-F =4096;
[0177] Specifically, when determining the first target position in the target RB queue according to the preset RB position algorithm based on the memory configuration factor and the sequence number, the first target position quePos of the target PDU queue in the target RB queue can be calculated by applying the formula quePos=SN>>F;
[0178] Specifically, in this embodiment, the first target position can be calculated:
[0179] quePos=SN>>F=100>>6=1, used to store the target PDU queue.
[0180] Step 302, calculating the second target position;
[0181] Specifically, based on the memory configuration factor F and the sequence number SN, according to a preset PDU position algorithm, it can be determined that the target PDU node is located at the second target position in the target PDU queue;
[0182] Specifically, when determining that the target PDU node is located at the second target position in the target PDU queue based on the memory configuration factor and the sequence number according to the preset PDU position algorithm, the formula pduPos=SN&(2 F –1) is calculated, and after the calculation, the second target position pduPos of the target PDU node in the target PDU queue corresponding to the target RB queue can be obtained.
[0183] Specifically, in this embodiment, based on the memory configuration factor and the sequence number, according to the preset PDU position algorithm, when determining that the target PDU node is located at the second target position in the target PDU queue, the formula can be applied to obtain the second target position of the target PDU node in the target PDU queue corresponding to the target RB queue:
[0184] pduPos=SN&(2 F –1)=100&63=36.
[0185] Step 303, delete the target PDU node;
[0186] Specifically, after determining that the second target position pduPos=36 of the target PDU node in the target PDU queue corresponding to the target RB queue, and the target PDU node is a node to be deleted, the target PDU node can be deleted at the second target position pduPos.
[0187] Step 304: the target PDU queue counter is decremented by one;
[0188] Specifically, after the target PDU node is deleted from the target PDU queue, the target PDU queue counter is reduced by one, and the number of addresses of the remaining PDU nodes in the target PDU queue may be recorded.
[0189] Step 305, determine whether the target PDU queue is empty;
[0190] Specifically, whether the target PDU queue is empty can be determined based on whether the target PDU queue counter is 0;
[0191] Specifically, if the target PDU queue counter is 0, the target PDU queue is empty;
[0192] Step 306: Delete the empty target PDU queue.
[0193] Specifically, if the target PDU queue counter is 0, that is, the target PDU queue is empty, the address of this empty target PDU queue can be deleted at the first target position in the target RB queue corresponding to the target PDU queue. It can be understood that after the address of the target PDU queue in the target RB queue is deleted, the memory occupied by the target PDU queue in the PDU queue memory block is also deleted, thereby further saving memory.
[0194] It can be understood that this embodiment avoids the defects of the existing solutions that require manual intervention and adjustment, cannot adapt to various serial number length requirements, or cause waste of memory usage due to registered online users without business. The memory configuration factor F is preset as needed to perform memory depth optimization. While ensuring processing efficiency, it automatically adapts to the configuration of receiving and sending queues of all SnLength lengths, saving a large amount of memory, thereby significantly increasing the number of access users and business KPI indicators.
[0195] Figure 4 A schematic diagram of the memory configuration device structure provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the apparatus includes an acquisition module 401, a determination module 402, and a configuration module 403, wherein:
[0196] The acquisition module 401 is used to obtain a preset memory configuration factor and a serial number of a target PDU node to be configured;
[0197] The determination module 402 is configured to determine a first target position in the target RB queue based on the memory configuration factor and the sequence number and according to a preset RB position algorithm, where the first target position is used to store the target PDU queue;
[0198] The configuration module 403 is used to determine that the target PDU node is located at a second target position in the target PDU queue based on the memory configuration factor and the sequence number and according to a preset PDU position algorithm.
[0199] Specifically, after the memory configuration device obtains the preset memory configuration factor and the serial number of the target PDU node to be configured through the acquisition module 401, the determination module 402 determines the first target position in the target RB queue based on the memory configuration factor and the serial number and according to the preset RB position algorithm, and obtains the target PDU queue stored at the first target position; then, the configuration module 403 determines that the target PDU node is located at the second target position in the target PDU queue based on the memory configuration factor and the serial number and according to the preset PDU position algorithm, and finally realizes the memory configuration of the target PDU node.
[0200] The memory configuration device provided in this embodiment of the present invention can perform deep memory optimization by flexibly pre-configuring memory configuration factors for memory optimization based on memory needs. This memory configuration factor is used to allocate memory for RB queues and PDU queues, ensuring processing efficiency while automatically adapting to the transmit and receive queue configuration for all SnLength values. This saves significant memory, thereby increasing the number of connected users and service KPIs.
[0201] Optionally, based on the above embodiments, the configuration module is specifically configured to:
[0202] If the target PDU node is a node to be inserted, the target PDU node is inserted at the second target position, and the counter corresponding to the target PDU queue is incremented by one;
[0203] If the target PDU node is a node to be deleted, the target PDU node is deleted at the second target position, and the counter corresponding to the target PDU queue is reduced by one.
[0204] Optionally, based on the above embodiments, the preset PDU location algorithm specifically includes:
[0205] First formula: Second target position = SN&(2 F –1);
[0206] Where SN is the serial number of the target PDU node;
[0207] F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0208] Optionally, based on the above embodiments, the preset RB position algorithm specifically includes:
[0209] Second formula: First target position = SN>>F;
[0210] Where SN is the serial number of the target PDU node;
[0211] F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0212] Optionally, based on the above embodiments, the device further includes:
[0213] The RB initialization module is used to receive the RB configuration parameters sent by the RRC layer when a new user bearer is established, determine the memory size of the target RB queue based on the RB configuration parameters and the memory configuration factor, and make a memory application.
[0214] Optionally, based on the above embodiments, the RB initialization module is specifically configured to:
[0215] According to the third formula: the memory size of the target RB queue = 2 SnLength-F+2 , calculate the memory size of the target RB queue RB ;
[0216] Wherein, SnLength is the RB configuration parameter;
[0217] F is the memory configuration factor, 0<F<SnLength.
[0218] Optionally, based on the above embodiments, the device further includes:
[0219] The PDU initialization module is used to determine that the target PDU queue does not exist at the first target position in the target RB queue, apply for a target PDU queue at the first target position, obtain the memory size of the target PDU queue based on the memory configuration factor, and perform memory application.
[0220] Optionally, based on the above embodiments, the PDU initialization module is specifically configured to:
[0221] According to the fourth formula: the memory size of the target PDU queue = 2 F+2 +2 2 , calculate the memory size of the target PDU queue Memory PDU ;
[0222] Wherein, F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
[0223] Optionally, based on the above embodiments, the device further includes:
[0224] The deleting module is configured to determine that the counter corresponding to the target PDU queue is zero, and delete the target PDU queue at the first target position.
[0225] Figure 5 A schematic diagram of the electronic device provided in one embodiment of the present invention is shown in FIG. Figure 5 As shown, the electronic device includes a memory 501, a processor 502, and a program stored in the memory 501 and executable on the processor 502. The memory 501 and the processor 502 communicate with each other via a communication bus 503. When the processor 502 executes the program, the following steps are implemented:
[0226] Obtain the preset memory configuration factor and the serial number of the target PDU node to be configured;
[0227] Based on the memory configuration factor and the sequence number, determining a first target position in the target RB queue according to a preset RB position algorithm, where the first target position is used to store a target PDU queue;
[0228] Based on the memory configuration factor and the serial number, according to a preset PDU position algorithm, it is determined that the target PDU node is located at a second target position in the target PDU queue, and memory configuration is performed on the target PDU node at the second target position.
[0229] In addition, the computer program in the above-mentioned memory 501 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0230] The method flow involved in the processor 502 executing the program can be specifically referred to the above method embodiment, which will not be repeated here.
[0231] An embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the data transmission processing method provided in each of the above embodiments is implemented, for example, including:
[0232] Obtain the preset memory configuration factor and the serial number of the target PDU node to be configured;
[0233] Based on the memory configuration factor and the sequence number, determining a first target position in the target RB queue according to a preset RB position algorithm, where the first target position is used to store a target PDU queue;
[0234] Based on the memory configuration factor and the serial number, according to a preset PDU position algorithm, it is determined that the target PDU node is located at a second target position in the target PDU queue, and memory configuration is performed on the target PDU node at the second target position.
[0235] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0236] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0237] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A memory configuration method, characterized in that: include: Obtaining a preset memory configuration factor and a serial number of a target protocol data unit (PDU) node to be configured; Based on the memory configuration factor and the sequence number, determining a first target position in the target RB queue according to a preset radio bearer RB position algorithm, where the first target position is used to store a target PDU queue; Based on the memory configuration factor and the serial number, according to a preset PDU position algorithm, it is determined that the target PDU node is located at a second target position in the target PDU queue, and memory configuration is performed on the target PDU node at the second target position.
2. The memory configuration method according to claim 1, wherein: The performing memory configuration on the target PDU node at the second target location specifically includes: If the target PDU node is a node to be inserted, the target PDU node is inserted at the second target position, and the counter corresponding to the target PDU queue is incremented by one; If the target PDU node is a node to be deleted, the target PDU node is deleted at the second target position, and the counter corresponding to the target PDU queue is reduced by one.
3. The memory configuration method according to claim 1, wherein: The preset PDU location algorithm specifically includes: First formula: Second target position = SN & (2 F –1); Where SN is the serial number of the target PDU node; F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
4. The memory configuration method according to claim 1, wherein: The preset radio bearer RB location algorithm specifically includes: Second formula: First target position = SN>>F; Where SN is the serial number of the target PDU node; F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
5. The memory configuration method according to claim 1, wherein: Before obtaining the preset memory configuration factor and the serial number of the target protocol data unit (PDU) node to be configured, the method further includes: When a new user bearer is established, the RB configuration parameters sent by the RRC layer are received, the memory size of the target RB queue is determined based on the RB configuration parameters and the memory configuration factor, and a memory application is performed.
6. The memory configuration method according to claim 5, wherein: The determining the memory size of the target RB queue based on the RB configuration parameter and the memory configuration factor specifically includes: According to the third formula: the memory size of the target RB queue = 2 SnLength-F+2 , calculate and obtain the memory size of the target RB queue; Wherein, SnLength is the RB configuration parameter; F is the memory configuration factor, 0<F<SnLength.
7. The memory configuration method according to claim 1, wherein: If the target PDU node is a node to be inserted, after determining the first target position in the target RB queue based on the memory configuration factor and the sequence number according to a preset radio bearer RB position algorithm, and before determining that the target PDU node is located at a second target position in the target PDU queue based on the memory configuration factor and the sequence number according to a preset PDU position algorithm, the method further includes: After determining that the target PDU queue does not exist at the first target position in the target RB queue, apply for a target PDU queue at the first target position, obtain the memory size of the target PDU queue based on the memory configuration factor, and perform memory application.
8. The memory configuration method according to claim 7, wherein: The obtaining the memory size of the target PDU queue based on the memory configuration factor specifically includes: According to the fourth formula: the memory size of the target PDU queue = 2 F+2 +2 2 , calculate and obtain the memory size of the target PDU queue; Wherein, F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
9. The memory configuration method according to claim 2, wherein: If the target PDU node is a node to be deleted, after deleting the target PDU node at the second target position, the method further includes: Determine that a counter corresponding to the target PDU queue is zero, and delete the target PDU queue at the first target position.
10. A memory configuration device, characterized in that: include: An acquisition module, used to obtain a preset memory configuration factor and a serial number of a target protocol data unit (PDU) node to be configured; a determination module, configured to determine, based on the memory configuration factor and the sequence number and in accordance with a preset radio bearer RB position algorithm, a first target position in the target RB queue, wherein the first target position is used to store a target PDU queue; A configuration module is used to determine, based on the memory configuration factor and the serial number, according to a preset PDU position algorithm, that the target PDU node is located at a second target position in the target PDU queue, and perform memory configuration on the target PDU node at the second target position.
11. The memory configuration device according to claim 10, wherein: The configuration module is specifically used to: If the target PDU node is a node to be inserted, the target PDU node is inserted at the second target position, and the counter corresponding to the target PDU queue is incremented by one; If the target PDU node is a node to be deleted, the target PDU node is deleted at the second target position, and the counter corresponding to the target PDU queue is reduced by one.
12. The memory configuration device according to claim 10, wherein: The preset PDU location algorithm specifically includes: First formula: Second target position = SN & (2 F –1); Where SN is the serial number of the target PDU node; F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
13. The memory configuration device according to claim 10, wherein: The preset radio bearer RB location algorithm specifically includes: Second formula: First target position = SN>>F; Where SN is the serial number of the target PDU node; F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
14. The memory configuration device according to claim 10, wherein: The device further comprises: The RB initialization module is used to receive the RB configuration parameters sent by the RRC layer when a new user bearer is established, determine the memory size of the target RB queue based on the RB configuration parameters and the memory configuration factor, and make a memory application.
15. The memory configuration device according to claim 14, wherein: The RB initialization module is specifically used to: According to the third formula: the memory size of the target RB queue = 2 SnLength-F+2 , calculate and obtain the memory size of the target RB queue; Wherein, SnLength is the RB configuration parameter; F is the memory configuration factor, 0<F<SnLength.
16. The memory configuration device according to claim 10, wherein: The device further comprises: The PDU initialization module is used to determine that the target PDU queue does not exist at the first target position in the target RB queue, apply for a target PDU queue at the first target position, obtain the memory size of the target PDU queue based on the memory configuration factor, and perform memory application.
17. The memory configuration device according to claim 16, wherein: The PDU initialization module is specifically used to: According to the fourth formula: the memory size of the target PDU queue = 2 F+2 +2 2 , calculate and obtain the memory size of the target PDU queue; Wherein, F is the memory configuration factor, 0<F<SnLength, and SnLength is the RB configuration parameter.
18. The memory configuration device according to claim 11, wherein: The device further comprises: The deleting module is configured to determine that the counter corresponding to the target PDU queue is zero, and delete the target PDU queue at the first target position.
19. 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 program, the steps of the memory configuration method according to any one of claims 1 to 9 are implemented.
20. 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 steps of the memory configuration method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Data transmission method in unacknowledged mode of wireless link control layer
CN101867972A
Resource allocation size dependent transport block size signaling
US20110085508A1