CN117032961A - Data message storage method and device, nonvolatile storage medium and electronic equipment - Google Patents
Data message storage method and device, nonvolatile storage medium and electronic equipment Download PDFInfo
- Publication number
- CN117032961A CN117032961A CN202310976607.2A CN202310976607A CN117032961A CN 117032961 A CN117032961 A CN 117032961A CN 202310976607 A CN202310976607 A CN 202310976607A CN 117032961 A CN117032961 A CN 117032961A
- Authority
- CN
- China
- Prior art keywords
- storage units
- target session
- message
- session
- data message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 230000008030 elimination Effects 0.000 claims abstract description 58
- 238000003379 elimination reaction Methods 0.000 claims abstract description 58
- 238000001514 detection method Methods 0.000 claims description 12
- 230000006870 function Effects 0.000 claims description 12
- 239000000872 buffer Substances 0.000 abstract description 55
- 238000010586 diagram Methods 0.000 description 11
- 230000009471 action Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 4
- 230000003139 buffering effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 238000010295 mobile communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 230000005641 tunneling Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0652—Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5022—Mechanisms to release resources
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Computer And Data Communications (AREA)
Abstract
The application discloses a data message storage method and device, a nonvolatile storage medium and electronic equipment. Wherein the method comprises the following steps: the user plane functional entity receives the data message and determines a target session corresponding to the data message; a first number of storage units are allocated for the target session from a storage space resource pool, wherein the first number of storage units are used for storing data messages; in the event that the number of free memory locations in the pool of memory space resources is less than the first number, determining memory locations allocated to the target session from the pending elimination queue such that the number of memory locations allocated to the target session from the pool of memory space resources and the pending elimination queue is equal to the first number. The application solves the technical problem of low buffer space utilization rate caused by only carrying out average allocation according to the number of the sessions when the buffer space is allocated for the sessions to buffer the messages in the related art.
Description
Technical Field
The present application relates to the field of communications, and in particular, to a data packet storage method, apparatus, nonvolatile storage medium, and electronic device.
Background
In 3GPP protocols, a User Plane Function (UPF) provides a certain memory for sessions initiated by a terminal device in an IDLE state to buffer a message according to the number of sessions and the memory capacity. Although the method can ensure that a certain memory can be provided for each session to buffer the messages, the buffer space required by different sessions is different due to different numbers of the messages required by different sessions, and the situation that the buffer space allocated by part of the sessions is excessive and the buffer space allocated by part of the sessions is insufficient may occur.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the application provides a data message storage method, a data message storage device, a nonvolatile storage medium and electronic equipment, which at least solve the technical problem of low cache space utilization rate caused by only carrying out average allocation according to the number of sessions when the buffer space is allocated for the sessions to cache the messages in the related art.
According to an aspect of an embodiment of the present application, there is provided a data packet storage method, including: the user plane functional entity receives the data message and determines a target session corresponding to the data message; a first number of storage units are allocated for the target session from a storage space resource pool, wherein the first number of storage units of the data message are used for storing the data message; and under the condition that the number of the free storage units in the storage space resource pool is smaller than the first number, determining the storage units allocated to the target session from the pending elimination queue, so that the number of the storage units allocated to the target session from the storage space resource pool and the pending elimination queue is equal to the first number, wherein the storage units in the pending elimination queue are additional storage units allocated to each session, and the additional storage units are storage units which are additionally requested by each session when the corresponding number of the storage units reaches the second number.
Optionally, in the case that the number of free storage units in the storage space resource pool is less than the first number, the step of determining the storage units allocated to the target session from the pending elimination queue includes: determining the time sequence of adding each storage unit in the pending elimination queue into the pending elimination queue; and determining the storage units allocated to the target session in the pending elimination queue according to the time sequence from the storage unit added to the pending elimination queue at the earliest time until the number of the storage units allocated to the target session in the storage space resource pool and the pending elimination queue is equal to the first number.
Optionally, after the step of allocating the first number of storage units for the target session from the storage space resource pool, the data packet storage method further includes: establishing a first finger pair; the first number of storage units are linked into a session linked list corresponding to the target session through a first pair of fingers.
Optionally, after the step of allocating the first number of storage units for the target session from the storage space resource pool, the data packet storage method further includes: after receiving a request for applying for additional storage units sent by a target session, determining whether an idle storage unit exists in a storage space resource pool; in the case that the free storage unit exists in the storage space resource pool, determining an additional storage unit allocated to the target session from the free storage units; additional storage units allocated to the target session are added to the pending elimination queue.
Optionally, the step of adding additional storage units allocated to the target session to the pending elimination queue comprises: determining a second finger pair; additional memory locations allocated to the target session are added to the pending elimination queue by the second pointer pair.
Optionally, the step of receiving the data message and determining the target session corresponding to the data message according to the data message includes: inquiring a session data structure corresponding to the data message according to the data message, and discarding the data message of which the corresponding session data structure is not inquired; under the condition that a corresponding session data structure is inquired, acquiring an IP address, a protocol type and port metadata of an inner layer of a message from a data message; matching with message detection information in a message detection protocol stack according to the IP address, the protocol type and the port metadata of the inner layer of the message, and discarding the data message with failed matching; after the matching is successful, determining the target session corresponding to the data message.
Optionally, the step of querying a session data structure corresponding to the data packet according to the data packet includes: under the condition that the data message is the data message received from the N6 interface, searching a session data structure corresponding to the data message according to the IP of the message destination in the data message; and under the condition that the data message is the data message received from the N9 interface, searching a session data structure corresponding to the data message according to the total tunnel endpoint identification in the data message.
Optionally, after the step of determining the target session corresponding to the data packet, the data packet storage method further includes: determining the equipment state of terminal equipment corresponding to the target session, wherein the equipment state comprises an idle state and a connection state; under the condition that the equipment state is an idle state, storing the data message into a storage unit corresponding to the target session; and forwarding the data message and the message stored in the storage unit corresponding to the target session under the condition that the equipment state is the connection state.
Optionally, the step of forwarding the data packet and the packet stored in the storage unit corresponding to the target session includes: determining flow restriction information corresponding to the target session, wherein the flow restriction information comprises at least one of the following: flow quota information and flow rate information; under the condition that the message corresponding to the target session exceeds the limiting condition indicated by the flow limiting information, discarding all partial messages exceeding the limiting condition in the message corresponding to the target session, wherein the message corresponding to the target session comprises the data message and the message stored in the storage unit corresponding to the target session; and forwarding the message corresponding to the target session under the condition that the message corresponding to the target session does not exceed the limiting condition indicated by the flow limiting information.
Optionally, the storage unit includes a data field and a pointer field, and the data packet includes downstream data and metadata of a downstream record, where the data field is used to store the downstream data, and the pointer field is used to store the metadata of the downstream record.
According to another aspect of the embodiment of the present application, there is also provided a data packet storage device, adapted to be used in a user plane functional entity, including: the first processing module is used for receiving the data message and determining a target session data message corresponding to the data message; the second processing module is used for distributing a first number of storage units from the storage space resource pool for the target session, wherein the first number of storage units are used for storing data messages; and the third processing module is used for determining the storage units allocated to the target session from the pending elimination queue under the condition that the number of the free storage units in the storage space resource pool is less than the first number, so that the number of the storage units allocated to the target session from the storage space resource pool and the pending elimination queue is equal to the first number, wherein the storage units in the pending elimination queue are additional storage units allocated to each session, and the additional storage units are storage units which are additionally requested by each session when the corresponding number of the storage units reaches the second number.
According to another aspect of the embodiment of the present application, there is further provided a nonvolatile storage medium, in which a program is stored, where when the program runs, the device in which the nonvolatile storage medium is controlled to perform a data packet storage method.
According to another aspect of the embodiment of the present application, there is also provided an electronic device, including: the system comprises a memory and a processor, wherein the processor is used for running a program stored in the memory, and the data message storage method is executed when the program runs.
In the embodiment of the application, a user plane functional entity is adopted to receive the data message and determine a target session corresponding to the data message; a first number of storage units are allocated for the target session from a storage space resource pool, wherein the first number of storage units of the data message are used for storing the data message; under the condition that the number of free storage units in a storage space resource pool is smaller than the first number, determining storage units allocated to a target session from a to-be-eliminated queue, so that the number of storage units allocated to the target session from the storage space resource pool and the to-be-eliminated queue is equal to the first number, wherein the storage units in the to-be-eliminated queue are additional storage units allocated to each session, the additional storage units are storage units which are additionally requested when the number of the corresponding storage units reaches the second number, and the buffer memory problem of low average allocation of the storage space according to the number of the sessions in the related technology is solved by dividing the storage space into a plurality of storage units and allocating the corresponding storage units according to the needs of each session and reallocating the additional storage units allocated to each session to a newly accessed session when the storage units are insufficient.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow diagram of a message processing flow specified in a 3GPP (3 rd Generation Partnership Project, third Generation partnership project protocol) protocol;
fig. 2 is a flow diagram of an operation flow of FAR (Forwarding Action Rule ) application specified in the 3GPP protocol;
fig. 3 is a flow chart of a data message storage method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a scenario in which a user plane function entity) caches data packets according to a UPF provided by an embodiment of the present application;
fig. 5 is a schematic diagram of a scenario in which a data packet is forwarded by a UPF according to an embodiment of the present application;
fig. 6 is a flow chart of a downlink data processing flow according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a buffer memory pool in a UPF according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a buffer data message structure according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of a data packet storage device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As can be seen from fig. 1, the 3GPP (3 rd Generation Partnership Project, third generation partnership project protocol) protocol specifies that, when the terminal is in an IDLE state (IDLE), after the UPF (User Plane Function, user plane function entity) receives the first downlink data, it needs to inform the SMF (Session Management Function, session management function component) that the session has downlink data arrived, and start buffering a data packet until the terminal that initiates the session switches to a CONNECTED state (CONNECTED), and then starts forwarding the packet, and a specific forwarding operation flow is shown in fig. 2.
It can be seen that the message cache is a basic and important function in UPF, can be used for paging terminals such as mobile phones and the like, and can also be used for controlling message cache of frequently-dormant Internet of things equipment such as intelligent electric meters, gas meters and the like. In the related art, when the UPF is enabled to provide a storage space for a buffer message for each session, the UPF is generally enabled to apply for a memory, and then dynamically determine a buffer space currently allocated for each session according to a message buffer capacity in the memory and the number of sessions (terminal devices initiating the session are in IDLE state) for which the message needs to be buffered, that is, the buffer space allocated for each session is equal to the remaining buffer capacity/the number of sessions for which the message needs to be buffered. Although it can be guaranteed that a certain buffer space is allocated to each session to buffer the message in the related art, the buffer space required by each session is not the same, so that the situation that the memory allocated to part of the sessions is too large and the memory allocated to other sessions is too small occurs.
In order to solve this problem, related solutions are provided in the embodiments of the present application, and are described in detail below.
According to an embodiment of the present application, there is provided a method embodiment of a data packet storage method, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that illustrated herein.
It should be noted that the technical solution of the embodiment of the present application may be applied to various communication systems, for example: global system for mobile communications (Global System of Mobile communication, GSM), code division multiple access (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA) systems, general packet radio service (General Packet Radio Service, GPRS), long term evolution (Long Term Evolution, LTE) systems, LTE frequency division duplex (Frequency Division Duplex, FDD) systems, LTE time division duplex (Time Division Duplex, TDD), universal mobile telecommunications system (Universal Mobile Telecommunication System, UMTS), worldwide interoperability for microwave access (Worldwide Interoperability for Microwave Access, wiMAX) communication systems, or 5G systems, and the like.
In the above operating environment, the embodiment of the present application provides a data message storage method, as shown in fig. 3, including the following steps:
step S302, a user plane functional entity receives a data message and determines a target session corresponding to the data message;
in the technical solution provided in step S302, the step of receiving the data message and determining the target session corresponding to the data message according to the data message includes: inquiring a session data structure corresponding to the data message according to the data message, and discarding the data message of which the corresponding session data structure is not inquired; under the condition that a corresponding session data structure is inquired, acquiring an IP address, a protocol type and port metadata of an inner layer of a message from a data message; matching with message detection information in a message detection protocol stack according to the IP address, the protocol type and the port metadata of the inner layer of the message, and discarding the data message with failed matching; after the matching is successful, determining the target session corresponding to the data message.
As an optional implementation manner, the step of querying the session data structure corresponding to the data packet according to the data packet includes: under the condition that the data message is the data message received from the N6 interface, searching a session data structure corresponding to the data message according to the IP of the message destination in the data message; and under the condition that the data message is the data message received from the N9 interface, searching a session data structure corresponding to the data message according to the total tunnel endpoint identification in the data message.
Specifically, the data message includes a downlink data message of the session. After receiving the message, the UPF pre-processes the message and records the packet receiving port number of the message. For GTPU (GPRS Tunneling Protocol User Plane, GPRS tunneling protocol) messages received through the N9 interface, the offset and the message direction of the GTPU message are also recorded.
When determining the session data structure corresponding to the message, different modes can be adopted according to different message types. For example, for a GTPU message, the F-TEID (Fully Qualified TEID, full tunnel endpoint identification) of the message may be used to find the PFCP (Packet Forwarding Control Protocol, message forwarding control protocol) session structure corresponding to the message; for other types of messages received from the N6 interface, the destination ip of the message, that is, the terminal ip may be used to find the PFCP session structure. In order to avoid the waste of storage space and the consumption of resources, the message which can not find the corresponding session structure can be directly discarded.
For the message with the corresponding session structure, the IP address, the protocol type and the port number metadata in the inner layer of the message can be extracted to be matched with the PDI (Packet Detection Information, message detection protocol information) in the PDR (Packet Detection Rule, data message detection protocol stack) of the session, and the message of the PDR which is not matched is discarded, so that the buffer space is saved.
In some embodiments of the present application, after the step of determining the target session corresponding to the data packet, the data packet storage method further includes: determining the equipment state of terminal equipment corresponding to the target session, wherein the equipment state comprises an idle state and a connection state; in the case that the device state is the idle state, as shown in fig. 4, the data packet is stored in a storage unit corresponding to the target session; in the case that the device state is the connection state, as shown in fig. 5, the data packet and the packet stored in the storage unit corresponding to the target session are forwarded.
Specifically, after the message matching is successful, the operation may be performed according to an Apply Action (application operation) of the PDR associated FAR. Specifically, if the UE (User Equipment) is in the IDLE state, as shown in fig. 4, the bit values of the NOCP bit and the BUFF bit in the Apply Action are 1 at this time, which indicates that the message should be cached in the storage unit corresponding to the session; if the UE is in the CONNECTED state, as shown in fig. 5, at this time, the bit value of the FOWD bit of the Apply Action is 1, which indicates that the received message and all the messages cached in the cache space by the session corresponding to the message should be forwarded to the corresponding receiving end device.
In order to avoid excessive resources occupied by the session, the step of forwarding the data message and the message stored in the storage unit corresponding to the target session includes: determining flow restriction information corresponding to the target session, wherein the flow restriction information comprises at least one of the following: flow quota information and flow rate information; under the condition that the message corresponding to the target session exceeds the limiting condition indicated by the flow limiting information, discarding all partial messages exceeding the limiting condition in the message corresponding to the target session, wherein the message corresponding to the target session comprises the data message and the message stored in the storage unit corresponding to the target session; and forwarding the message corresponding to the target session under the condition that the message corresponding to the target session does not exceed the limiting condition indicated by the flow limiting information.
Specifically, before forwarding the message, the flow information related to the session can be counted according to the URR (User Rate Requirement ) associated with the PDR, and the message with the session exceeding the flow quota or the rate limit can be directly discarded according to the speed limiting process of the QER (Quality of Experience Report, user quality of experience assessment report). For the reserved message, the outer layer header can be encapsulated according to Outer Header Creation (outer layer header creation rule) of the FAR, then the IPV4 or IPV6 route is searched according to the IP type of the encapsulated outer layer header, and the message is sent out through the N3 interface after the two-layer header is rewritten.
It should be noted that, for the session packet received for the first time, PFCP information needs to be sent to notify the SMF.
To sum up, in order to reduce the occupation of the buffer space and the device resources as much as possible in the packet buffer and forwarding process, in some embodiments of the present application, a flow diagram of a data packet processing process shown in fig. 6 is further provided, which includes the following steps:
step S602, UPF receives downlink data from an N6 interface and/or an N9 interface;
step S604, preprocessing the received downlink data, and recording metadata such as a packet receiving port, a message offset and the like of the downlink data;
step S606, searching the PFCP session by using the F-TEID or the UE ip of the data message;
step S608, extracting key data such as F-TEID, inner IP address, protocol, port number and the like of the outer layer of the message, and performing PDR matching on the message;
step S610, after matching is successful, operating according to the applied Action of the PDR associated FAR;
step S612, determining the value of the corresponding zone bit in the Apply Action according to the state of the UE, and executing the corresponding operation;
step S614, when the bit value of the FOWD flag bit in the Apply Action is 1, forwarding the message and all the messages cached by the session corresponding to the message to the receiving terminal equipment;
Specifically, when forwarding a message, each bar_buffer (storage unit) corresponding to a session may be released to a memory resource pool according to the order of entering the session linked list by linking, and meanwhile, the bar_buffer corresponding to the session in the PEQ (pending elimination queue) is deleted.
Step S616, when the bit value of NOCP bit and BUFF bit in the Apply Action is 1, the message is stored in the storage unit corresponding to the session.
Specifically, in the embodiment of the present application, the flow of storing the data packet in the corresponding bar_buffer is as follows:
after the downlink data sent by the IDLE terminal reaches the UPF, the UPF will take out the IDLE bar_buffer from the memory pool to buffer the downlink data, and use the first finger to add the bar_buffer to the linked list in the corresponding session. If the memory pool has no free bar_buffer and the pending elimination queue is not empty, acquiring a corresponding bar_buffer from the pending elimination queue to buffer the message, and adding the bar_buffer into a linked list.
Step S304, a first number of storage units are allocated for the target session from a storage space resource pool, wherein the first number of storage units are used for storing data messages;
the storage unit provided by the embodiment of the application comprises a data field and a pointer field, wherein the data message comprises downlink data and metadata of a downlink flow record, the data field is used for storing the downlink data, and the pointer field is used for storing the metadata of the downlink flow record.
Specifically, the structure of the buffer message memory pool provided in the embodiment of the present application is shown in fig. 7, and fig. 7 shows how to allocate corresponding memory cells bar_buffer for three sessions Session0, session1, and Session 2. As can be seen from fig. 7, the buffer memory pool provided by the embodiment of the present application is further provided with a bitmap to show the buffer usage of each bar_buffer. Specifically, when the buffer area of a certain bar_buffer is used, the bit value of the corresponding flag bit of the bar_buffer in the bitmap is 1, and otherwise, is 0.
In addition, as can be seen from fig. 7, each bar_buffer further includes a Data field packet Data for storing downstream Data, a pointer field Meta for storing metadata of downstream flow records, a first pointer pair prev/next for accessing the bar_buffer to a corresponding session, and a second pointer pair q_prev/q_next for accessing the bar_buffer to a pending elimination queue.
In the technical solution provided in step S304, after the step of allocating the first number of storage units for the target session from the storage space resource pool, the data packet storage method further includes: establishing a first finger pair; the first number of storage units are linked into a session linked list corresponding to the target session through a first pair of fingers.
It should be noted that, the number of storage units corresponding to each session may be determined by using a GBC (guarantee buffer count, guaranteed buffer number) parameter, where the parameter indicates that the UPF may promise to reliably buffer GBC bar_buffers for the session. The storage units exceeding the GBC number requested by each session are the additional storage units designed in the embodiment of the application. The GBC number is the second number in the present application, and the first number is the number of storage units required for buffering the data packet received in step S302, where the first number is generally smaller than the second number. When the first number is greater than the second number, the UPF will allocate a number of storage units for the session first until the number of storage units corresponding to the session is equal to the second number, then start to determine whether there is a free storage unit, and allocate additional storage units for the session if it is determined that there is a free storage unit.
In addition, the UPF may also represent the ratio of the number of sessions initiated by the device in IDLE state to the total number of sessions in different application scenarios by BCR (buffer convergence ratio ) parameters. The BCR of devices such as smart meters may be near 1 and the BCR of terminals such as cell phones, AGV (Automated Guided Vehicle, auto guided vehicle) carts may be below 0.2.
After the BCR and GBC are determined, the size of the memory space allocated to the UPF for buffering the packet may be determined according to the BCR and GBC, and the specific expression is as follows: session_count GBC BCR SIZEOF (bar_buffer). Session_count is a fixed constant in the above expression. In order to avoid the shortage of the storage space in the extreme case, a certain proportion may be additionally increased based on the size of the memory space represented by the above expression, for example, 1.2 times the space corresponding to the expression. Meanwhile, the utilization rate of the memory space can be monitored, and UPF management personnel can be timely notified when the utilization rate exceeds a preset threshold value, such as 70%.
As an alternative embodiment, after the step of allocating the first number of storage units for the target session from the storage space resource pool, the data packet storage method further includes: after receiving a request for applying for additional storage units sent by a target session, determining whether an idle storage unit exists in a storage space resource pool; in the case that the free storage unit exists in the storage space resource pool, determining an additional storage unit allocated to the target session from the free storage units; additional storage units allocated to the target session are added to the pending elimination queue.
The step of adding the additional storage unit allocated to the target session to the pending elimination queue includes: determining a second finger pair; additional memory locations allocated to the target session are added to the pending elimination queue by the second pointer pair.
Specifically, in the data message storage method provided by the embodiment of the present application, the data storage structure in the cache space is shown in fig. 8, it can be seen from fig. 8 that the same session has a linked list of one session level to maintain all bar_buffers corresponding to the same session through the first finger pair, and at the same time, all extra bar_buffers in the pending elimination queue are managed through the second finger pair in the cache space, where the extra bar_buffers are bar_buffers exceeding GBC number corresponding to each session.
In step S306, in the case that the number of free storage units in the storage space resource pool is smaller than the first number, determining the storage units allocated to the target session from the pending elimination queue, so that the number of storage units allocated to the target session from the storage space resource pool and the pending elimination queue is equal to the first number, where the storage units in the pending elimination queue are additional storage units allocated to each session, and the additional storage units are storage units that are additionally requested by each session when the corresponding number of storage units reaches the second number.
In the solution provided in step S306, the step of determining, from the pending elimination queue, the storage unit allocated to the target session in the case where the number of free storage units in the storage space resource pool is less than the first number includes: determining the time sequence of adding each storage unit in the pending elimination queue into the pending elimination queue; and determining the storage units allocated to the target session in the pending elimination queue according to the time sequence from the storage unit added to the pending elimination queue at the earliest time until the number of the storage units allocated to the target session in the storage space resource pool and the pending elimination queue is equal to the first number.
Receiving the data message by adopting a user plane functional entity, and determining a target session corresponding to the data message; the target session allocates a first number of storage units for the target session from a storage space resource pool, wherein the first number of storage units of the data message are used for storing the data message; under the condition that the number of free storage units in a storage space resource pool is smaller than the first number, determining storage units allocated to a target session from a to-be-eliminated queue, so that the number of storage units allocated to the target session from the storage space resource pool and the to-be-eliminated queue is equal to the first number, wherein the storage units in the to-be-eliminated queue are additional storage units allocated to each session, the additional storage units are storage units which are additionally requested when the number of the corresponding storage units reaches the second number, and the buffer memory problem of low average allocation of the storage space according to the number of the sessions in the related technology is solved by dividing the storage space into a plurality of storage units and allocating the corresponding storage units according to the needs of each session and reallocating the additional storage units allocated to each session to a newly accessed session when the storage units are insufficient.
The embodiment of the application provides a data message storage device, and fig. 9 is a schematic structural diagram of the device. As shown in fig. 9, the apparatus includes: a first processing module 90, configured to receive the data packet and determine a target session corresponding to the data packet; a second processing module 92, configured to allocate a first number of storage units from the storage space resource pool for the target session, where the first number of storage units is used to store the data packet; and a third processing module 94, configured to determine, in a case where the number of free storage units in the storage space resource pool is less than the first number, the storage units allocated to the target session from the pending elimination queue, so that the number of storage units allocated to the target session from the storage space resource pool and the pending elimination queue is equal to the first number, where the storage units in the pending elimination queue are additional storage units allocated to each session, and the additional storage units are storage units that are additionally requested by each session when the corresponding number of storage units reaches the second number.
In some embodiments of the present application, the step of the first processing module 90 receiving the data message and determining the target session corresponding to the data message according to the data message includes: inquiring a session data structure corresponding to the data message according to the data message, and discarding the data message of which the corresponding session data structure is not inquired; under the condition that a corresponding session data structure is inquired, acquiring an IP address, a protocol type and port metadata of an inner layer of a message from a data message; matching with message detection information in a message detection protocol stack according to the IP address, the protocol type and the port metadata of the inner layer of the message, and discarding the data message with failed matching; after the matching is successful, determining the target session corresponding to the data message.
In some embodiments of the present application, the step of the first processing module 90 querying the session data structure corresponding to the data packet according to the data packet includes: under the condition that the data message is the data message received from the N6 interface, searching a session data structure corresponding to the data message according to the IP of the message destination in the data message; and under the condition that the data message is the data message received from the N9 interface, searching a session data structure corresponding to the data message according to the total tunnel endpoint identification in the data message.
In some embodiments of the present application, after the step of determining the target session corresponding to the data packet by the first processing module 90, the data packet storage method further includes: determining the equipment state of terminal equipment corresponding to the target session, wherein the equipment state comprises an idle state and a connection state; under the condition that the equipment state is an idle state, storing the data message into a storage unit corresponding to the target session; and forwarding the data message and the message stored in the storage unit corresponding to the target session under the condition that the equipment state is the connection state.
In some embodiments of the present application, the step of forwarding the data packet and the packet stored in the storage unit corresponding to the target session by the first processing module 90 includes: determining flow restriction information corresponding to the target session, wherein the flow restriction information comprises at least one of the following: flow quota information and flow rate information; under the condition that the message corresponding to the target session exceeds the limiting condition indicated by the flow limiting information, discarding all partial messages exceeding the limiting condition in the message corresponding to the target session, wherein the message corresponding to the target session comprises the data message and the message stored in the storage unit corresponding to the target session; and forwarding the message corresponding to the target session under the condition that the message corresponding to the target session does not exceed the limiting condition indicated by the flow limiting information.
In some embodiments of the present application, the storage unit includes a data field and a pointer field, where the data field is used to store downstream data and metadata of the downstream record, and the pointer field is used to store metadata of the downstream record.
In some embodiments of the present application, after the step of allocating a first number of storage units for the target session from the pool of storage space resources, the data message storage device is further configured to: establishing a first finger pair; the first number of storage units are linked into a session linked list corresponding to the target session through a first pair of fingers.
In some embodiments of the present application, after the step of allocating a first number of storage units for the target session from the pool of storage space resources, the data message storage device is further configured to: after receiving a request for applying for additional storage units sent by a target session, determining whether an idle storage unit exists in a storage space resource pool; in the case that the free storage unit exists in the storage space resource pool, determining an additional storage unit allocated to the target session from the free storage units; additional storage units allocated to the target session are added to the pending elimination queue.
In some embodiments of the present application, the step of the data message storage device adding additional storage units allocated to the target session to the pending elimination queue comprises: determining a second finger pair; additional memory locations allocated to the target session are added to the pending elimination queue by the second pointer pair.
Note that each module in the data packet storage device may be a program module (for example, a set of program instructions for implementing a specific function), or may be a hardware module, and for the latter, it may be represented by the following form, but is not limited thereto: the expression forms of the modules are all a processor, or the functions of the modules are realized by one processor.
Embodiments of a non-volatile storage medium are provided according to embodiments of the present application. The nonvolatile storage medium stores a program, wherein the device where the nonvolatile storage medium is controlled to execute the following data message storage method when the program runs: the user plane functional entity receives the data message and determines a target session corresponding to the data message; a first number of storage units are allocated for the target session from a storage space resource pool, wherein the first number of storage units of the data message are used for storing the data message; and under the condition that the number of the free storage units in the storage space resource pool is smaller than the first number, determining the storage units allocated to the target session from the pending elimination queue, so that the number of the storage units allocated to the target session from the storage space resource pool and the pending elimination queue is equal to the first number, wherein the storage units in the pending elimination queue are additional storage units allocated to each session, and the additional storage units are storage units which are additionally requested by each session when the corresponding number of the storage units reaches the second number.
The method embodiments provided by the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar electronic device. Fig. 10 shows a block diagram of the hardware architecture of an electronic device 10 for implementing the data message storage method. As shown in fig. 10, the electronic device 10 may include one or more processors 102 (shown as 102a, 102b, … …,102 n) 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, the method may further include: a display, an input/output interface (I/O interface), a Universal Serial BUS (USB) port (which may be included as one of the ports of the BUS), a network interface, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the electronic device 10 may also include more or fewer components than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
It should be noted that the one or more processors 102 and/or other data processing circuits described above may be referred to generally herein as "data processing circuits. The data processing circuit may be embodied in whole or in part in software, hardware, firmware, or any other combination. Further, the data processing circuitry may be a single stand-alone processing module, or incorporated in whole or in part into any of the other elements in the electronic device 10. As referred to in embodiments of the application, the data processing circuit acts as a processor control (e.g., selection of the path of the variable resistor termination connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the data packet storage method in the embodiment of the present application, and the processor 102 executes the software programs and modules stored in the memory 104, thereby executing various functional applications and data processing, that is, implementing the data packet storage method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to electronic device 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. The specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the electronic device 10.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the related art or all or part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.
Claims (13)
1. A method for storing data messages, comprising:
the user plane functional entity receives the data message and determines a target session corresponding to the data message;
a first number of storage units are allocated to the target session from a storage space resource pool, wherein the first number of storage units are used for storing the data message;
and under the condition that the number of the free storage units in the storage space resource pool is smaller than the first number, determining the storage units allocated to the target session from a pending elimination queue, so that the number of the storage units allocated to the target session from the storage space resource pool and the pending elimination queue is equal to the first number, wherein the storage units in the pending elimination queue are additional storage units allocated to each session, and the additional storage units are storage units additionally requested by each session when the corresponding number of the storage units reaches a second number.
2. The method according to claim 1, wherein the step of determining the storage unit allocated to the target session from the pending elimination queue in the case that the number of free storage units in the storage space resource pool is smaller than the first number comprises:
determining the time sequence of adding each storage unit in the pending elimination queue to the pending elimination queue;
and determining the storage units allocated to the target session in the pending elimination queue according to time sequence from the storage units added to the pending elimination queue at earliest until the number of the storage units allocated to the target session in the storage space resource pool and the pending elimination queue is equal to the first number.
3. The method according to claim 1, wherein after the step of allocating a first number of storage units for the target session from the pool of storage space resources, the method further comprises:
establishing a first finger pair;
and linking the first number of storage units to a target session linked list corresponding to the target session through the first finger pair.
4. The method according to claim 1, wherein after the step of allocating a first number of storage units for the target session from the pool of storage space resources, the method further comprises:
after receiving a request for applying for additional storage units sent by the target session, determining whether the idle storage units exist in the storage space resource pool;
determining the additional storage unit allocated to the target session from the free storage units in the case that the free storage units exist in the storage space resource pool;
adding additional memory locations allocated to the target session to the pending elimination queue.
5. The method of claim 4, wherein the step of adding additional storage units allocated to the target session to the pending elimination queue comprises:
determining a second finger pair;
adding the additional storage units allocated to the target session to the pending elimination queue through the second pointer pair.
6. The method for storing data messages according to claim 1, wherein said step of receiving data messages and determining a target session corresponding to said data messages according to said data messages comprises:
Inquiring a session data structure corresponding to the data message according to the data message, and discarding the data message of which the corresponding session data structure is not inquired;
under the condition that the corresponding session data structure is inquired, acquiring an IP address, a protocol type and port metadata of an inner layer of a message from the data message;
matching with message detection information in a message detection protocol stack according to the IP address of the message inner layer, the protocol type and the port metadata, and discarding the data message with failed matching;
and after the matching is successful, determining the target session corresponding to the data message.
7. The method for storing data messages according to claim 6, wherein said step of querying a session data structure corresponding to said data message according to said data message comprises:
under the condition that the data message is the data message received from the N6 interface, searching the session data structure corresponding to the data message according to the IP of the message destination in the data message;
and under the condition that the data message is the data message received from the N9 interface, searching the session data structure corresponding to the data message according to the total tunnel endpoint identifiers in the data message.
8. The method for storing data messages according to claim 6, wherein after said step of determining said target session to which said data message corresponds, said method for storing data messages further comprises:
determining the equipment state of the terminal equipment corresponding to the target session, wherein the equipment state comprises an idle state and a connection state;
storing the data message into the storage unit corresponding to the target session under the condition that the equipment state is the idle state;
and forwarding the data message and the message stored in the storage unit corresponding to the target session under the condition that the equipment state is the connection state.
9. The method for storing data messages according to claim 8, wherein said step of forwarding said data messages and said messages stored in said storage unit corresponding to said target session includes:
determining flow restriction information corresponding to the target session, wherein the flow restriction information comprises at least one of the following: flow quota information and flow rate information;
under the condition that the message corresponding to the target session exceeds the limiting condition indicated by the flow limiting information, discarding all partial messages exceeding the limiting condition in the message corresponding to the target session, wherein the message corresponding to the target session comprises the data message and the message stored in the storage unit corresponding to the target session;
And forwarding the message corresponding to the target session under the condition that the message corresponding to the target session does not exceed the limiting condition indicated by the flow limiting information.
10. The method according to claim 1, wherein the storage unit includes a data field and a pointer field, the data field includes downstream data and metadata of a downstream record, the data field is used for storing the downstream data, and the pointer field is used for storing the metadata of the downstream record.
11. A data message storage device adapted for use in a user plane function entity, comprising:
the first processing module is used for receiving the data message and determining a target session corresponding to the data message;
the second processing module is used for distributing a first number of storage units for the target session from a storage space resource pool, wherein the first number of storage units are used for storing the data message;
and a third processing module, configured to determine, from a pending elimination queue, a storage unit allocated to the target session when the number of free storage units in the storage space resource pool is less than the first number, so that the number of storage units allocated to the target session from the storage space resource pool and the pending elimination queue is equal to the first number, where the storage units in the pending elimination queue are additional storage units allocated to each session, and the additional storage units are storage units that are additionally requested by each session when the corresponding number of storage units reaches a second number.
12. A non-volatile storage medium, wherein a program is stored in the non-volatile storage medium, and wherein the program, when executed, controls a device in which the non-volatile storage medium is located to perform the data message storage method of any one of claims 1 to 10.
13. An electronic device, comprising: a memory and a processor for executing a program stored in the memory, wherein the program is executed to perform the data message storage method of any one of claims 1 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310976607.2A CN117032961A (en) | 2023-08-03 | 2023-08-03 | Data message storage method and device, nonvolatile storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310976607.2A CN117032961A (en) | 2023-08-03 | 2023-08-03 | Data message storage method and device, nonvolatile storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117032961A true CN117032961A (en) | 2023-11-10 |
Family
ID=88631011
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310976607.2A Pending CN117032961A (en) | 2023-08-03 | 2023-08-03 | Data message storage method and device, nonvolatile storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117032961A (en) |
-
2023
- 2023-08-03 CN CN202310976607.2A patent/CN117032961A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110505653B (en) | Method, equipment and computer storage medium for controlling service quality | |
CN109076013B (en) | Packet switching service identification method and terminal | |
KR101032662B1 (en) | Idle mode notification | |
EP3739912A1 (en) | Default quality of service (qos) control method and device | |
CN107547745B (en) | Resource allocation method and related product | |
EP3614625A1 (en) | Convergent charging method and device | |
JP7046979B2 (en) | Data transmission methods, equipment, systems, and devices | |
CN110831061B (en) | Method and device for acquiring scheduling throughput, base station and storage medium | |
US11470202B2 (en) | Charging method, apparatus, and system | |
CN109891830B (en) | Function scheduling method, device and system | |
CN107135189B (en) | Message sending method and physical machine | |
EP3614729A1 (en) | Method for link aggregation and related devices | |
CN111585815A (en) | Port data acquisition method and device | |
CN112787828B (en) | Application flow statistical method and device and mobile electronic device | |
EP1989821A1 (en) | Context-based processing of data flows for differentiated charging | |
CN114675960A (en) | Computing resource allocation method and device and nonvolatile storage medium | |
CN117032961A (en) | Data message storage method and device, nonvolatile storage medium and electronic equipment | |
KR20120107948A (en) | Data packet priority level management | |
CN107371263B (en) | Method and device for scheduling uplink resources | |
CN112367708B (en) | Network resource allocation method and device | |
CN107534604B (en) | Data processing method and device | |
CN112689249A (en) | Short message sending method, device, system, storage medium and electronic equipment | |
KR20050059629A (en) | Method for providing service to users through modifying qos profile | |
CN106664610B (en) | Network controller, system and resource allocation method | |
CN111492681A (en) | Method and device for reporting information by terminal and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |