Implementation method for 5G signaling DPI session data persistence
By introducing persistent data context and cache units into the signaling DPI program, the problem of the decline in the backfill rate of session information after the signaling DPI program is restarted is solved, data persistence and consistency is achieved, and high availability and data integrity of the system are ensured.
Patent Information
- Application Number
- CN202411891408.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-20
AI Technical Summary
After the signaling DPI program is restarted, the backfill rate of session information in the XDR call sheets of each interface is greatly reduced, resulting in data loss and reduced filling efficiency.
By introducing a persistent data context into the signaling DPI program, initializing and maintaining the cache unit, serializing and writing session information to disk when the program exits, loading and verifying data from disk when the program starts to ensure persistence and consistency of the data.
After the signaling DPI program is restarted, the stability of the session information filling rate of the XDR call sheet is achieved, avoiding data loss and reduction of filling efficiency, and ensuring high availability and data integrity of the system.
Smart Images

Figure CN119767343A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology, and in particular to a method for implementing 5G signaling DPI session data persistence. Background Art
[0002] At present, the signaling plane DPI (Deep Packet Inspection) program needs to associate and backfill some session information (such as SUPI, IMSIEV, MSISDN, etc.) when outputting XDR call records. These session information needs to be saved in the memory for fast update and search.
[0003] In actual production, when a program or device is restarted, session information will be lost, causing the session information fill rate of the XDR call record to drop sharply after the restart. Summary of the invention
[0004] The purpose of the present invention is to solve the problem in the prior art that the backfill rate of session information in the XDR call records of each interface drops significantly after the signaling DPI program is restarted, and a method for implementing 5G signaling DPI session data persistence is proposed, which persists the session information of multiple interfaces in the signaling DPI program to a disk file, and loads it from the disk file to the signaling DPI program.
[0005] In order to achieve the above object, the present invention adopts the following technical scheme.
[0006] A method for implementing persistence of 5G signaling DPI session data, when the signaling DPI program exits, initializes the persistent data context in the signaling processing module, maintains a single cache unit in the persistence module through the persistent data context, and writes the description information of the persistent data into the cache unit;
[0007] Read the persistent data in the signaling processing module and write it into a single cache unit;
[0008] If the data written in a single cache unit reaches a set threshold, the cache data in the cache unit is written to the disk;
[0009] When the signaling DPI program starts, the description information of the persistent data is read from the signaling processing module, the cached data in the disk is read to the cache unit, and it is checked whether the description information of the persistent data is consistent with the description information in the cached data. If they are consistent, the persistence context is returned to the signaling processing module.
[0010] Furthermore, the description information of the persistent data includes the persistent data structure, length and verification information written into the cache unit.
[0011] Furthermore, if the amount of data written into a single cache unit reaches a set threshold, writing the cache data in the cache unit into the disk includes:
[0012] The cache space of a single cache unit is set according to the session service model in the signaling processing module.
[0013] Furthermore, the method further includes compressing the cache data in the cache unit and then writing the compressed data into a disk file. When reading, if the cache data in the disk is a compressed file, the compressed file is decompressed and then read into the cache unit.
[0014] Furthermore, writing the cache data in the cache unit to the disk includes: releasing the cache data in the cache unit and resetting the cache space of the cache unit.
[0015] Furthermore, the verifying whether the description information of the persistent data is consistent with the description information in the cached data includes: returning an error if the description information is inconsistent.
[0016] Further, returning the persistent context to the signaling processing module if they are consistent includes: reading persistent data from a cache unit, verifying verification information of the persistent data, and discarding current data if the verification is wrong.
[0017] Furthermore, the process of reading the cached data in the disk into the cache unit and verifying whether the description information of the persistent data is consistent with the description information in the cache data, and if they are consistent, returning the persistence context to the signaling processing module includes: if the cache unit is read, the next disk file is read into the cache unit; if all files in the disk are read, empty is returned.
[0018] In order to achieve the above-mentioned objectives, the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a program running on the processor, and when the processor runs the program, the steps of the implementation method of 5G signaling DPI session data persistence as described above are executed.
[0019] In order to achieve the above-mentioned objectives, the present invention also provides a computer-readable storage medium on which computer instructions are stored, and when the computer instructions are executed, the steps of the method for implementing the persistence of 5G signaling DPI session data as described above are executed.
[0020] The present invention proposes a method for implementing 5G signaling DPI session data persistence, which has the following beneficial effects:
[0021] The present invention implements a universal signaling DPI session information persistence module. When the signaling DPI program exits, the session information of different interfaces in the signaling DPI program is serialized and saved in the disk; when the signaling DPI program is started, the session information of each interface saved in the disk is deserialized and loaded into the signaling DPI to ensure that the session information filling rate of the XDR call record will not decrease after the signaling DPI is restarted.
[0022] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0024] Figure 1 It is a flowchart of a method for implementing 5G signaling DPI session data persistence of the present invention;
[0025] Figure 2 It is a schematic diagram of the deployment of the DPI product of the present invention and the actual communication network;
[0026] Figure 3 This is a schematic diagram of the structure of persisting the signaling DPI session information to a disk file according to the present invention;
[0027] Figure 4 This is a schematic diagram of the process of persisting the signaling DPI session information to a disk file according to the present invention;
[0028] Figure 5 A schematic diagram of a disk file loading session information structure of the present invention;
[0029] Figure 6 The figure is a flow chart of loading session information into a disk file of the present invention. DETAILED DESCRIPTION
[0030] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0031] Example 1
[0032] Figure 1 This is a flowchart of a method for implementing 5G signaling DPI session data persistence according to the present invention. Figure 1 , the implementation method of 5G signaling DPI session data persistence of the present invention is described in detail.
[0033] DPI: Deep packet analysis is a type of network monitoring technology that can deeply analyze data packets in network traffic to identify protocols, applications, and content;
[0034] Signaling DPI: DPI equipment used to analyze control plane signaling traffic in the mobile network core network;
[0035] S1mme interface: the interface between eNB and MME in 4G mobile network;
[0036] S11 interface: the interface between MME and SGW in the 4G core network;
[0037] S58 interface: the interface between SGW and PGW in the 4G core network;
[0038] 4G-GUTI (Globally Unique Temporary Identifier) is an identifier used to temporarily identify user equipment (UE) in LTE networks. It is mainly used to enhance user privacy and security while reducing the risk of user identity leakage.
[0039] Three-code information: IMSI (International Mobile Subscriber Identity), MSISDN, and IMEIVE.
[0040] N1N2 interface: interface between 5G mobile network gNB and AMF;
[0041] N4 interface: the interface between SMF and UPF in the 5G core network;
[0042] N7 interface: the interface between SMF and PCF in the 5G core network;
[0043] N11 interface: the interface between AMF and SMF in the 5G core network;
[0044] 5G-GUTI (Globally Unique Temporary Identifier) is used to identify the user equipment (UE). The design of 5G GUTI is similar to that in LTE.
[0045] In step 101, the persistence context is initialized and the description information of the persistent data is passed in. A buffer cache is maintained in the persistence context, and the description information Description of the persistent data is written in the buffer cache header.
[0046] In this embodiment, the persistent context includes: buffer, buffer_size (buffer size), buffer_length (length of content written in buffer). The process of initializing the context includes: passing in a parameter length, 1GB by default; applying for a 1GB buffer, setting buffer_size to 1GB, and setting buffer_length to 0.
[0047] Optionally, the description information in the buffer cache includes the structure, length and verification information of the persistent data.
[0048] In this embodiment, the data of 4G or 5G multiple service sessions accumulated during the program running is stored in the signaling processing module, and the data to be persisted is continuously transmitted to the persistence module. The description information is a specific service description, such as "N1N2 interface" and "N4 interface".
[0049] In this embodiment, Figure 2 As shown in the figure, DPI products are deployed in parallel with the actual communication network, accessing the communication traffic through optical splitting, aggregation and diversion equipment, deeply analyzing the message information in the communication traffic and outputting the communication details.
[0050] In step 102, the data length len, the check information magic, and the data data are written into the buffer cache of the persistence context.
[0051] In step 103, when the size of the content in the buffer cache of the persistence context reaches the set write-to-disk threshold, it is written to the disk file.
[0052] Optionally, the cache space of each cache unit is set according to the 4G or 5G business model. For example, when applying, the buffer cache space is set to 1G, multiple cache units are set, and the content size in the buffer cache of the persistent context has reached the set write disk threshold business-related setting, then it is written to the disk file.
[0053] In this embodiment, before writing to the disk, the data in the cache unit may be compressed and then written to the disk file to reduce the disk load.
[0054] Optionally, release the persistence context, write the currently maintained buffer cache to a disk file, and reset the buffer cache.
[0055] In step 104, the persistence module is initialized when the program starts, the description information Description of the persistent data is passed in from the signaling processing module, the file is read from the disk to the buffer cache, and the incoming Description is checked to see if it is consistent with the Description in the file. If they are inconsistent, it means that the data does not match or the data is damaged, and an error is returned; if they are consistent, the persistence context is returned.
[0056] In this embodiment, the data in the disk is read into the buffer cache when the program starts.
[0057] In step 105, the data length len, the check information magic, and the data data are continuously read from the buffer cache, and the magic information is checked. If the magic check is wrong, an error is returned.
[0058] Optionally, Magic is a checksum with a fixed length and fixed content. When reading data from the disk, Magic is checked to determine whether the data is damaged.
[0059] In step 106, if the buffer cache is read completely, the next file is read into the buffer cache. If all files are read completely, a null value is returned.
[0060] Optionally, if the file on disk is compressed, the file is first decompressed and then read into the buffer cache.
[0061] A method for implementing 5G signaling DPI session data persistence proposed in the present invention implements a universal signaling DPI session information persistence module. When the signaling DPI program exits, the session information of different interfaces in the signaling DPI program is serialized and saved on the disk; when the signaling DPI program is started, the session information of each interface saved on the disk is deserialized and loaded into the signaling DPI to ensure that after the signaling DPI is restarted, the session information filling rate of the XDR call record will not decrease.
[0062] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a program running on the processor, and when the processor runs the program, the above-mentioned steps for implementing the persistence of 5G signaling DPI session data are executed.
[0063] The present invention also provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed, the above-mentioned 5G signaling DPI session data persistence is implemented. The implementation of the 5G signaling DPI session data persistence is described in the preceding section and will not be repeated here.
[0064] Those skilled in the art can understand that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention is described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions recorded in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for implementing 5G signaling DPI session data persistence, characterized in that: include: When the signaling DPI program exits, the persistent data context in the signaling processing module is initialized, a single cache unit in the persistence module is maintained through the persistent data context, and description information of the persistent data is written into the cache unit; Read the persistent data in the signaling processing module and write it into a single cache unit; If the data written in a single cache unit reaches a set threshold, the cache data in the cache unit is written to the disk; When the signaling DPI program starts, the description information of the persistent data is read from the signaling processing module, the cached data in the disk is read to the cache unit, and it is checked whether the description information of the persistent data is consistent with the description information in the cached data. If they are consistent, the persistence context is returned to the signaling processing module.
2. According to claim 1, a method for implementing 5G signaling DPI session data persistence is characterized in that: The description information of the persistent data includes the persistent data structure, length and verification information written into the cache unit.
3. According to claim 1, a method for implementing 5G signaling DPI session data persistence is characterized in that: If the data written in a single cache unit reaches a set threshold, writing the cache data in the cache unit to the disk includes: The cache space of a single cache unit is set according to the session service model in the signaling processing module.
4. A method for implementing 5G signaling DPI session data persistence according to claim 1 or 3, characterized in that: The method further includes compressing the cache data in the cache unit and then writing it into a disk file. When reading, if the cache data in the disk is a compressed file, the compressed file is decompressed and then read into the cache unit.
5. A method for implementing 5G signaling DPI session data persistence according to claim 1, characterized in that: Writing the cache data in the cache unit to the disk includes: releasing the cache data in the cache unit and resetting the cache space of the cache unit.
6. A method for implementing 5G signaling DPI session data persistence according to claim 1 or 5, characterized in that: The verifying whether the description information of the persistent data is consistent with the description information in the cached data includes: returning an error if the description information is inconsistent.
7. A method for implementing 5G signaling DPI session data persistence according to claim 1, characterized in that: The returning the persistent context to the signaling processing module if they are consistent includes: reading the persistent data from the cache unit, verifying the verification information of the persistent data, and discarding the current data if the verification is wrong.
8. A method for implementing 5G signaling DPI session data persistence according to claim 1, characterized in that: The process of reading cached data from the disk to the cache unit, verifying whether the description information of the persistent data is consistent with the description information in the cache data, and returning the persistence context to the signaling processing module if they are consistent includes: if the cache unit is read, the next disk file is read into the cache unit; if all files on the disk are read, empty is returned.
9. An electronic device, characterized in that: It includes a memory and a processor, the memory stores a program running on the processor, and the processor executes a method for implementing 5G signaling DPI session data persistence as described in any one of claims 1-8 when running the program.
10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed, a method for implementing persistence of 5G signaling DPI session data as described in any one of claims 1-8 is executed.
Citation Information
Patent Citations
Method and device for network flow data analysis based on stream processing
CN108259371A
DPI association rule backfill processing method, device and equipment and medium
CN109992427A
4G core network DPI data inspection method and system, and equipment
CN111093224A
Data processing method and device based on large-scale storage system
CN115756334A
Caching temporary data in solid state storage devices
US9646012B1