A method for establishing a data connection for a 5G terminal, terminal equipment and medium

CN122579345APending Publication Date: 2026-08-14GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-08
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]本发明提供了一种5G终端的数据连接建立方法、终端设备及介质,用于解决当配电网中同时存在差动保护等关键业务和参数采集等普通业务时,关键业务的连接建立时延长以及效率低的问题

Benefits of technology

本发明通过终端对应用层产生的数据包进行业务识别,确定数据包所属的业务类型及对应的业务优先级,并根据业务类型查询预置的业务与网络需求映射表,获得对应的目标网络切片标识和目标QoS标识符,在应用层发起套接字连接之前,终端根据获得的目标网络切片标识和目标QoS标识符主动向网络侧发起协议数据单元会话建立请求,以使网络侧为协议数据单元会话分配资源,会话建立后通过该会话传输数据包。上述方案在连接建立之前即感知业务类型及其网络需求,并主动向网络侧发起携带精确网络切片标识和QoS标识符的会话建立请求,使网络侧能够根据业务的实际需求直接分配匹配的资源,避免了现有技术中不同业务无差别共享同一默认会话导致的资源争抢和等待,从而显著缩短了关键业务的连接建立时间,提升了连接建立效率和数据传输的可靠性,实现了不同业务类型与网络资源的按需精准匹配以及快速连接。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122579345A_ABST
    Figure CN122579345A_ABST
Patent Text Reader

Abstract

This invention relates to the field of 5G communication technology and provides a data connection establishment method, terminal device, and medium for a 5G terminal. The method includes: identifying the service type and corresponding service priority of data packets generated by the application layer through the terminal; querying a pre-set service-network requirement mapping table based on the service type to obtain the corresponding target network slice identifier and target QoS identifier; before initiating a socket connection at the application layer, the terminal proactively initiates a Protocol Data Unit (PDU) session establishment request to the network side based on the obtained target network slice identifier and target QoS identifier, so that the network side allocates resources for the PDU session; and after the session is established, data packets are transmitted through the session. This application effectively improves connection establishment efficiency and data transmission reliability, achieving on-demand precise matching and rapid connection between different service types and network resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of 5G communication technology, and in particular to a method for establishing a data connection for a 5G terminal, a terminal device, and a medium. Background Technology

[0002] The application of 5G terminals in vertical industries such as power, transportation, and manufacturing is becoming increasingly widespread, placing higher demands on network slicing and QoS assurance capabilities for data connections. Currently, when a 5G terminal establishes a data connection, the application layer typically initiates a socket connection operation, triggering the terminal's communication stack to send a Protocol Data Unit (PDU) session establishment request to the network side. This request carries pre-configured network slice selection assistance information. Upon receiving this request, the network-side access and mobility management (AMU) function forwards it to the corresponding session management function based on the slice information carried within. The session management function then establishes a default PMU session for the terminal and allocates corresponding QoS resources. After the session is established, the terminal transmits service data packets through this session.

[0003] In existing technologies, during connection establishment, terminals treat data packets of different service types indiscriminately. This means that before initiating a protocol data unit session establishment request, the terminal is unaware of the service type of the data packet and its differentiated requirements for latency and reliability, resulting in all services being transmitted through the same default session. When critical services such as differential protection and ordinary services such as parameter acquisition coexist in a distribution network, the connection establishment requests of critical services must share the same establishment process and resource allocation mechanism as ordinary services. This prevents them from receiving priority processing that matches their needs during the connection establishment phase, leading to prolonged connection establishment time and low efficiency for critical services. Summary of the Invention

[0004] This invention provides a data connection establishment method, terminal equipment, and medium for 5G terminals, which solves the problems of prolonged connection establishment time and low efficiency of critical services such as differential protection and ordinary services such as parameter acquisition when both exist simultaneously in a power distribution network.

[0005] The first aspect of this invention provides a method for establishing a data connection for a 5G terminal, comprising: The terminal identifies the data packets generated by the application layer, determines the service type to which the data packets belong, and assigns a corresponding service priority to the service type. The terminal queries a pre-set service and network requirement mapping table according to the service type to obtain the target network slice identifier and target QoS identifier corresponding to the service type and service priority. Before initiating a socket connection at the application layer, the terminal proactively initiates a Protocol Data Unit (PDU) session establishment request carrying the target network slice identifier and the target QoS identifier to the network side, so that the network side can allocate resources for the PDU session. After the protocol data unit session is established, the terminal transmits the data packet through the protocol data unit session.

[0006] Optionally, the terminal performs service identification on the data packets generated by the application layer to determine the service type to which the data packets belong, including: The terminal performs a five-tuple matching on the data packets and categorizes the successfully matched data packets into the corresponding known service type. For data packets that cannot be identified by the five-tuple matching, the terminal initiates deep packet inspection and performs feature signature matching on the application layer payload to determine the service type to which the data packet belongs.

[0007] Optionally, assigning a corresponding business priority to the business type includes: Based on the identification results of the quintuple matching and / or the deep packet inspection, the service type is divided into a first priority service, a second priority service, or a third priority service. Among them, the first priority service has the highest latency and reliability requirements, the third priority service has the lowest latency and reliability requirements, and the second priority service has latency and reliability requirements that are between those of the first priority service and the third priority service.

[0008] Optionally, the service-network requirement mapping table records network requirement parameters corresponding to various services, including latency requirements, reliability requirements, bandwidth requirements, network slice identifiers, and QoS identifiers. Wherein, the network slice identifier corresponding to the first priority service is the first network slice identifier and the QoS identifier is the first QoS identifier, the network slice identifier corresponding to the second priority service is the second network slice identifier and the QoS identifier is the second QoS identifier, and the network slice identifier corresponding to the third priority service is the third network slice identifier and the QoS identifier is the third QoS identifier.

[0009] Optionally, the step of proactively initiating a protocol data unit session establishment request carrying the target network slice identifier and the target QoS identifier to the network side includes: After the application corresponding to the service type is launched and before a socket connection is initiated, the terminal initiates a protocol data unit session establishment request to the network side in advance, so that the network side can pre-allocate resources for the protocol data unit session and reserve the protocol data unit session.

[0010] Optionally, the protocol data unit session establishment request may also carry the guaranteed stream bit rate, maximum stream bit rate, allocation and reservation priority, and data network name corresponding to the service type.

[0011] Optionally, the network side pre-allocates resources for the protocol data unit session, including: The network-side access and mobility management function receives the protocol data unit session establishment request and forwards the request to the network slice selection function according to the target network slice identifier carried in the request. The network slice selection function selects the corresponding target network slice instance based on the target network slice identifier, and sends the request to the session management function in the target network slice instance; The session management function requests authorized QoS rules from the policy control function based on the target QoS identifier, selects a user plane function based on the QoS rules returned by the policy control function, and configures forwarding rules and reliability assurance policies corresponding to the target QoS identifier on the user plane function to complete resource reservation.

[0012] Optionally, after the protocol data unit session is established, it further includes: The terminal monitors the actual performance indicators of the protocol data unit session, including actual latency and actual packet loss rate. When the actual latency is greater than the latency requirement corresponding to the service type recorded in the service and network demand mapping table; And / or, When the actual reliability determined based on the actual packet loss rate is lower than the reliability requirement corresponding to the service type recorded in the service and network demand mapping table; The terminal initiates a Protocol Data Unit Session Modification Request (PDU) carrying a new target network slice identifier to the network side, so as to switch the data packet to the network slice corresponding to the new target network slice identifier for transmission.

[0013] A second aspect of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned 5G terminal data connection establishment method.

[0014] A third aspect of the present invention provides a computer-readable storage medium storing computer instructions that, when executed on a terminal device, cause the terminal device to perform the aforementioned 5G terminal data connection establishment method.

[0015] As can be seen from the above technical solutions, the present invention has the following advantages: This invention identifies the service type and priority of data packets generated by the application layer through terminal processing, determining the service type and priority of the data packets. Based on the service type, it queries a pre-set service-network requirement mapping table to obtain the corresponding target network slice identifier and target QoS identifier. Before initiating a socket connection at the application layer, the terminal proactively initiates a Protocol Data Unit (PDU) session establishment request to the network side based on the obtained target network slice identifier and target QoS identifier. This allows the network side to allocate resources for the PDU session, and data packets are transmitted through the established session. This solution perceives the service type and its network requirements before connection establishment and proactively initiates a session establishment request carrying precise network slice identifiers and QoS identifiers. This enables the network side to directly allocate matching resources according to the actual needs of the service, avoiding resource contention and waiting caused by different services indiscriminately sharing the same default session in existing technologies. This significantly shortens the connection establishment time for critical services, improves connection establishment efficiency and data transmission reliability, and achieves on-demand, precise matching and rapid connection between different service types and network resources. Attached Figure Description

[0016] Figure 1 A flowchart illustrating a method for establishing a data connection for a 5G terminal, provided in an embodiment of this application; Figure 2 A schematic diagram illustrating the process of pre-allocating resources for protocol data unit sessions on the network side, provided in an embodiment of this application; Figure 3 This is a structural diagram of a terminal device provided in an embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0018] The data connection establishment method for a 5G terminal provided in this embodiment of the invention can be applied to a 5G terminal device, which includes an application processor, a baseband processor, a memory, and a radio frequency unit. The memory stores software programs executable by the application processor and the baseband processor. These software programs include an application layer program, a service identification module, a service-to-network requirement mapping table, and a communication protocol stack. The communication protocol stack includes a non-access layer and an access layer. The service identification module is deployed at the upper-layer interface of the communication protocol stack and is used to intercept and parse data packets sent from the application layer to the communication protocol stack. The service-to-network requirement mapping table is stored in the terminal's non-volatile storage area and can be updated remotely by the network side. The terminal's communication protocol stack interacts with the access network and core network elements on the network side via signaling to complete the establishment, modification, and release of protocol data unit sessions.

[0019] During runtime, the application layer program generates data packets to be sent. Before the data packets enter the communication protocol stack, the service identification module identifies the service type of the data packet and assigns a service priority based on five-tuple matching and / or deep packet inspection technology. The communication protocol stack queries the service-network requirement mapping table according to the identified service type to obtain the target network slice identifier and target QoS identifier corresponding to the service type. Then, before the application layer initiates a socket connection operation, the communication protocol stack proactively sends a protocol data unit session establishment request carrying the above parameters to the network side, so that the network side can allocate resources matching the service requirements for the session according to the parameters carried in the request.

[0020] Through the collaborative work of the above modules, the terminal realizes a service-aware, proactive connection establishment method, enabling data packets of different service types to obtain network resource guarantees that match their latency and reliability requirements at the beginning of connection establishment.

[0021] Please see Figure 1 The present invention provides a method for establishing a data connection for a 5G terminal, comprising the following steps: S1. The terminal identifies the service type of the data packets generated by the application layer, determines the service type of the data packets, and assigns the corresponding service priority to the service type. Data packets generated at the application layer refer to Internet protocol data packets generated by the application layer and passed down to the communication protocol stack when various applications running on the terminal perform data sending operations. These data packets typically include protection instruction data packets generated by distribution network differential protection applications, alarm reporting data packets generated by fault alarm applications, telemetry and teleindication data packets generated by status acquisition applications, non-real-time query data packets generated by parameter query applications, and video stream data packets generated by video surveillance applications.

[0022] In this embodiment, the terminal performs service identification on the data packets generated by the application layer to determine the service type to which the data packets belong. This includes: the terminal performs five-tuple matching on the data packets and classifies the successfully matched data packets into the corresponding known service type; for data packets that cannot be identified by five-tuple matching, the terminal initiates deep packet inspection and performs feature signature matching on the application layer payload to determine the service type to which the data packets belong.

[0023] Specifically, the terminal pre-configures a five-tuple matching rule base in its service identification module. This rule base stores the mapping relationships between known service types and their corresponding source Internet Protocol (IP) addresses, destination IP addresses, protocol types, source port numbers, and destination port numbers. When an application layer data packet arrives at the service identification module, the module extracts the source IP address, destination IP address, protocol type, source port number, and destination port number of the data packet and compares this five-tuple information with each mapping relationship in the rule base. If the five-tuple information completely matches a rule in the rule base, the match is considered successful, and the data packet is classified into the known service type corresponding to that rule. For example, a data packet with a destination port number of 2404 and a protocol type of Transmission Control Protocol (TCP) is identified as a power distribution network remote control command or telemetry service data packet after a successful match. If the five-tuple information cannot match any rule in the rule base, the match is considered unsuccessful. In this case, the data packet cannot be identified by the five-tuple and requires deep packet inspection for further identification.

[0024] Service types include, but are not limited to, differential protection services, remote control command services, fault alarm services, status acquisition services, parameter query services, and video surveillance services. Situations where identification via the five-tuple is not possible include: the application using dynamic or non-standard ports for communication, resulting in port numbers outside the known range of the rule base; or the same port carrying multiple different types of application layer protocols, making differentiation impossible solely based on port numbers.

[0025] For the aforementioned unidentifiable scenarios, the terminal initiates the deep packet inspection module. The specific implementation of feature signature matching for the application layer payload is as follows: Upon arrival of a data packet, the deep packet inspection module directly reads the application layer payload content of the packet, extracts the feature strings or binary feature patterns from the payload, and matches the extracted features with a pre-stored feature signature library. The feature signature library stores application layer protocol features corresponding to different service types. For example, a data packet containing the string "IEC104" and conforming to the IEC 60870-5-104 protocol format is identified as a power distribution network remote control command or telemetry service; a data packet containing a specific manufacturer's proprietary protocol header is identified as the corresponding manufacturer's equipment status reporting service; and a data packet conforming to the real-time streaming protocol format and containing video encoding features is identified as a video surveillance service.

[0026] In this embodiment, a corresponding service priority is assigned to the service type, including: classifying the service type into a first priority service, a second priority service, or a third priority service based on the identification results of 5-tuple matching and / or deep packet inspection; wherein, the first priority service has the highest latency requirement and the highest reliability requirement, the third priority service has the lowest latency requirement and the lowest reliability requirement, and the latency requirement and reliability requirement of the second priority service are between those of the first priority service and the third priority service.

[0027] The first priority services refer to critical control services that have a direct impact on the safety of power grid operation, and whose transmission delays or failures will directly lead to power grid safety accidents or major equipment damage. These include differential protection services and remote control command services. The second priority services refer to important monitoring services that play an important role in monitoring the power grid's operating status and handling faults, and whose transmission quality directly affects fault response speed and operation and maintenance efficiency. These include fault alarm services and status acquisition services. The third priority services refer to ordinary acquisition services with relatively low real-time requirements, mainly used for data recording and periodic queries. These include parameter query services and non-real-time data acquisition services.

[0028] The latency requirement for first-priority services is a one-way transmission latency of less than or equal to 15 milliseconds from the terminal to the peer device, and the reliability requirement is a success rate of 99.99%. The latency requirement for second-priority services is a one-way transmission latency of less than or equal to 100 milliseconds, and the reliability requirement is a success rate of 99.9%. The latency requirement for third-priority services is a one-way transmission latency of less than or equal to 1 second, and the reliability requirement is a success rate of 99%. Through these detailed settings of tiers and latency / reliability requirements, the terminal can identify the service type of a data packet and assign it the corresponding service priority. This provides accurate priority information for subsequent queries of the service-network requirement mapping table and obtaining the target network slice identifier and target QoS identifier.

[0029] S2. The terminal queries the pre-set service and network requirement mapping table according to the service type to obtain the target network slice identifier and target QoS identifier corresponding to the service type and service priority; In this embodiment, the service-network requirement mapping table records network requirement parameters corresponding to various services. These network requirement parameters include latency requirements, reliability requirements, bandwidth requirements, network slice identifiers, and QoS identifiers. Specifically, the network slice identifier for the first priority service is the first network slice identifier, and the QoS identifier for the second priority service is the second network slice identifier, and the QoS identifier for the third priority service is the third network slice identifier, and the QoS identifier for the third priority service is the third QoS identifier.

[0030] After completing service identification and priority allocation, the terminal uses the obtained service type and corresponding service priority as query conditions to match and search in a pre-set service and network requirement mapping table. During the query, the terminal uses the service type and service priority as a combined index key value to match records in the mapping table one by one. When the service type field and service priority field of a record in the mapping table both match the query conditions, the match is successful, and the corresponding network requirement parameters in that record are read. Among them, the target network slice identifier is a parameter that uniquely identifies a network slice in the 5G network. It consists of two parts: slice type and slice differentiation identifier. It is used to enable the core network elements on the network side to route the terminal's protocol data unit session request to the correct network slice instance. The target QoS identifier is a scalar value in the 5G network used to indicate specific QoS characteristics. Each QoS identifier corresponds to a set of standardized or pre-configured QoS feature parameters, including resource type, priority level, packet delay budget, and packet error rate, which are used to enable the network side to configure the corresponding forwarding processing strategy for user plane data transmission.

[0031] The service and network demand mapping table is configured as follows: the first network slice identifier corresponds to the slice type of enhanced mobile broadband or ultra-reliable low-latency communication, the slice differentiation identifier is power critical service, the first QoS identifier corresponds to the resource type of guaranteed bit rate, the priority level is the highest, the packet delay budget is less than or equal to 10 milliseconds, and the packet error rate is less than or equal to 0.001%; ​​the second network slice identifier corresponds to the slice type of enhanced mobile broadband, the slice differentiation identifier is power important service, the second QoS identifier corresponds to the resource type of delay critical guaranteed bit rate, the priority level is medium, the packet delay budget is less than or equal to 50 milliseconds, and the packet error rate is less than or equal to 0.1%; the third network slice identifier corresponds to the slice type of enhanced mobile broadband, the slice differentiation identifier is power ordinary service, the third QoS identifier corresponds to the resource type of non-guaranteed bit rate, the priority level is low, and the packet delay budget is less than or equal to 300 milliseconds.

[0032] S3. Before initiating a socket connection at the application layer, the terminal proactively initiates a Protocol Data Unit (PDU) session establishment request carrying the target network slice identifier and the target QoS identifier to the network side, so that the network side can allocate resources for the PDU session. In this embodiment, after the application corresponding to the service type starts and before initiating a socket connection, the terminal initiates a Protocol Data Unit (PDU) session establishment request to the network side in advance, so that the network side can pre-allocate resources for the PDU session and reserve the PDU session. The PDU session establishment request also carries the guaranteed stream bit rate, maximum stream bit rate, allocation and reservation priority, and data network name corresponding to the service type.

[0033] Specifically, a socket connection is a system call operation initiated by an application through the socket application programming interface provided by the operating system, initiating a Transmission Control Protocol (TCP) connection or User Datagram Protocol (UDP) binding to a remote server. It serves as the standard entry point for establishing end-to-end network communication at the application layer. After the application starts, but before the application layer actually invokes the socket connection operation, the terminal's communication protocol stack actively constructs and sends a Protocol Data Unit (PDU) session establishment request message to the network side based on the target network slice identifier and target QoS identifier corresponding to the service type obtained from S2. This request message is a non-access stratum message, carried by the access stratum and forwarded via the radio access network to the access and mobility management functions of the core network. In addition to the target network slice identifier and target QoS identifier, the request message also carries the guaranteed stream bit rate corresponding to the service type, indicating the minimum uplink and downlink data rates that the network side must guarantee for this protocol data unit session; the maximum stream bit rate, indicating the maximum uplink and downlink data rate limits allowed for this protocol data unit session; allocation and reservation priority, indicating the resource preemption and retention priority of this protocol data unit session relative to other sessions when network resources are scarce; and the data network name, indicating the data network that the protocol data unit session needs to access. This proactive request method, carrying fine-grained QoS parameters, allows the network side to complete the resource allocation and reservation of the protocol data unit session before the application actually initiates communication. When the application subsequently calls the socket connection operation to send data, the communication protocol stack can directly activate the reserved protocol data unit session for data transmission, eliminating the waiting delay during the connection establishment phase in the traditional process.

[0034] Please see Figure 2 The network side pre-allocates resources for Protocol Data Unit sessions, including the following: S31. The network-side access and mobility management function receives a protocol data unit session establishment request and forwards the request to the network slice selection function according to the target network slice identifier carried in the request. S32. The network slice selection function selects the corresponding target network slice instance based on the target network slice identifier and sends the request to the session management function in the target network slice instance; S33. The session management function requests authorized QoS rules from the policy control function based on the target QoS identifier, selects the user plane function based on the QoS rules returned by the policy control function, and configures the forwarding rules and reliability assurance policies corresponding to the target QoS identifier on the user plane function to complete resource reservation.

[0035] Specifically, the Access and Mobility Management (AMM) function receives Protocol Data Unit (PDU) session establishment request messages from terminals via a non-access stratum interface. It parses the target network slice identifier field carried in the message and determines the network slice type and slice differentiation identifier indicated by the request based on the value of this field. After identifying the target network slice identifier, the AMM sends a slice selection request to the Network Slice Selection (BSC) function. This request carries the target network slice identifier and the terminal's temporary identifier, requesting the BSC function to select a specific network slice instance for the PDU session. The BSC function maintains information on all available network slice instances in the network, including the slice identifier, load status, and capacity information for each instance. The load status includes one or more of the following: the number of established PDU sessions, allocated bandwidth utilization, and user plane function CPU utilization. The capacity information includes the maximum number of PDU sessions supported by the instance and the maximum available bandwidth. The BSC function obtains the aforementioned load status information from the session management function of each network slice instance at a preset collection period, configurable from 30 to 120 seconds, to ensure the timeliness of the load information. After receiving a slice selection request forwarded by the Access and Mobility Management (AMI) function, the network slice selection function searches its maintained slice instance information database for a network slice instance that matches the target network slice identifier carried in the request. When multiple matching slice instances exist, the network slice selection function performs load balancing selection based on the current load status of each instance. For each matching network slice instance, its overall load rate is calculated. When the load status includes only a single load metric, the utilization rate of that single metric is used as the overall load rate. For example, when only the allocated bandwidth utilization rate is used, the overall load rate is equal to the ratio of the allocated bandwidth to the maximum available bandwidth of the slice instance. When the load status includes multiple load metrics, preset weight coefficients are assigned to each metric, and the weighted sum of the utilization rates of each metric and their corresponding weight coefficients is used as the overall load rate. For example, the utilization rate of established Protocol Data Unit (PDU) session connections has a weight of 0.3, the weight of allocated bandwidth utilization rate is 0.4, and the weight of user plane function CPU utilization rate is 0.3. The overall load rate is equal to the sum of the three utilization rates multiplied by their respective weights. The network slice selection function calculates the overall load rate of each matching instance and selects the network slice instance with the lowest overall load rate as the target network slice instance to achieve load balancing among slice instances. When there are multiple instances with the same lowest overall load rate, one of them is randomly selected as the target network slice instance.

[0036] After selecting a target network slice instance, the network slice selection function returns the address of the access and mobility management function or the session management function corresponding to that slice instance. The access and mobility management function then sends a Protocol Data Unit (PDU) session establishment request message to the session management function within the target network slice instance. The session management function initiates a policy request to the policy control function based on the target QoS identifier. The policy control function queries the corresponding resource type, priority level, packet delay budget, and packet error rate (PFR) based on the target QoS identifier, and, combined with the guaranteed flow bit rate and maximum flow bit rate, generates authorized QoS rules and returns them to the session management function. After obtaining the authorized QoS rules, the session management function includes the QoS rules obtained from the policy control function in the session establishment request, instructing the user plane function to allocate corresponding data buffers and bandwidth resources for the PDU session, and configuring packet scheduling and reliability assurance policies based on the packet delay budget and packet error rate parameters in the QoS rules. After completing the above configuration, the user plane function returns a session establishment confirmation message to the session management function, which then returns a PDU session establishment acceptance message to the terminal through the access and mobility management function.

[0037] S4. After the Protocol Data Unit (PDU) session is established, the terminal transmits data packets through the PDU session.

[0038] In this embodiment, after the Protocol Data Unit (PDU) session is established, the following steps are also included: the terminal monitors the actual performance indicators of the PDU session, including actual latency and actual packet loss rate; when the actual latency is greater than the latency requirement corresponding to the service type recorded in the service-to-network demand mapping table; and / or, when the actual reliability determined based on the actual packet loss rate is lower than the reliability requirement corresponding to the service type recorded in the service-to-network demand mapping table; the terminal initiates a PDU session modification request carrying a new target network slice identifier to the network side to switch the data packets to the network slice corresponding to the new target network slice identifier for transmission.

[0039] Specifically, after a Protocol Data Unit (PDU) session is successfully established, the terminal transmits data packets through this PDU session. Service data packets generated by the application are encapsulated by the communication protocol stack and sent to the user plane function on the network side via the established PDU session, and then forwarded by the user plane function to the corresponding data network. During transmission, the terminal's communication protocol stack continuously monitors the actual performance indicators of the PDU session. The actual latency is half the round-trip time from when the data packet is sent by the terminal to when it receives the acknowledgment message from the peer device. The terminal obtains the actual latency by including a sending timestamp in the data packet and calculating the time difference upon receiving the acknowledgment. The actual packet loss rate is the ratio of the number of data packets sent but not acknowledged within a preset statistical period to the total number of data packets sent within that period. The actual reliability is determined based on the actual packet loss rate by subtracting the actual packet loss rate from 1, which is the proportion of successfully transmitted data packets to the total number of transmitted data packets. When the terminal detects a deterioration in the actual performance indicators, it compares the actual latency with the latency requirement corresponding to the current service type recorded in the service and network requirement mapping table, and compares the actual reliability determined based on the actual packet loss rate with the reliability requirement corresponding to the current service type recorded in the mapping table. If the actual latency is greater than the latency requirement recorded in the mapping table, it indicates that the network slice allocated to the current protocol data unit session cannot provide the transmission latency required by the service. If the actual reliability is lower than the reliability requirement recorded in the mapping table, it indicates that the transmission reliability of the network slice allocated to the current protocol data unit session is insufficient. When any of the above situations or both situations occur simultaneously, the terminal determines that the current network slice can no longer meet the transmission requirements of this service type and triggers the dynamic slice adjustment process.

[0040] After the terminal triggers the dynamic slice adjustment process, it searches for a candidate network slice identifier in the service-network requirement mapping table based on the current service type and service priority. It should be noted that the service-network requirement mapping table stores a primary network slice identifier and a candidate network slice identifier list for the same service type and service priority. The primary network slice identifier is the network slice identifier used when the terminal first establishes a Protocol Data Unit (PDU) session, i.e., the first, second, or third network slice identifier in step S2. The candidate network slice identifier list contains at least one candidate network slice identifier that differs from the primary network slice identifier but still meets the latency and reliability requirements of the service type. The candidate network slice identifier list is configured by the network side when the mapping table is remotely distributed or updated. Its source is a set of backup slice identifiers pre-planned for this service type by the network slice selection function based on the deployment of slice instances across the entire network. The terminal selects a candidate network slice identifier according to the following rules: either selecting sequentially from the candidate network slice identifier list in order of arrangement, or selecting the candidate network slice identifier with the highest priority as the new target network slice identifier based on the priority indication of each candidate network slice identifier distributed synchronously by the network side when the mapping table is updated.

[0041] After finding a new target network slice identifier, the terminal sends a Protocol Data Unit (PDU) session modification request to the Access and Mobility Management (AMI) function via a non-access stratum message. This modification request carries the session identifier of the current PDU session and the new target network slice identifier. The AMI function forwards the modification request to the Network Slice Selection (BSC) function, which selects a new target network slice instance based on the new PDU identifier. Subsequently, the Session Management (SMC) function configures the corresponding forwarding rules and resources for the PDU session on the user plane of the new target network slice instance. This handover process is implemented using a build-then-disconnect approach, specifically including the following: During the handover initiation phase, while sending a Protocol Data Unit (PDU) session modification request, the terminal maintains uninterrupted data transmission on the current PDU session, and data packets continue to be sent to the data network via the current user plane function path. After the network side completes the allocation of new path resources, the session management function returns a PDU session modification acceptance message to the terminal, carrying the new user plane function address information. Upon receiving this acceptance message, the terminal activates the new transmission path, encapsulates subsequent data packets, and sends them simultaneously to both the current user plane function and the new user plane function. On the network side, the new user plane function forwards the data packets to the data network, while the current user plane function continues to forward the buffered data packets it received before the handover. To avoid the data network receiving end receiving duplicate data packets, the terminal sets a path switching flag in the first data packet sent to the new path. The receiving end identifies the starting boundary of the new path data based on this flag and discards data packets on the current path whose sequence number is less than or equal to the sequence number corresponding to the flag that have been successfully received, thereby eliminating duplicate reception.

[0042] During the handover completion phase, once the terminal confirms that data transmission along the new path is stable and that a predetermined number of consecutive data packets on the new path have successfully received confirmation messages, the terminal initiates a release request for the current Protocol Data Unit (PDU) session to the session management function via a non-access stratum message to release user plane function resources on the current network slice instance. Upon receiving the release request, the session management function completes the transmission and confirmation of cached data on the current user plane function, then deletes the corresponding forwarding rules and session context. The PDU session resources on the current network slice instance are completely released, and data packet transmission is fully switched to the new target network slice instance. This "build-then-disconnect" handover mechanism ensures uninterrupted data packet transmission during the handover transition period and minimizes service interruption time by eliminating duplicate data packets through path switching markers.

[0043] Through the aforementioned performance monitoring and dynamic slice adjustment methods, the terminal can continuously perceive changes in actual network performance during data transmission after the establishment of the protocol data unit session, and proactively initiate slice switching when the current network slice cannot meet service requirements, ensuring that service data transmission always receives network resource guarantees that match its real-time latency and reliability requirements.

[0044] Furthermore, embodiments of this application also disclose a terminal device, see [link to relevant documentation]. Figure 3 As shown, the content in the figure should not be considered as any limitation on the scope of use of this application.

[0045] Figure 3This is a schematic diagram of the structure of a terminal device 20 provided in an embodiment of this application. The terminal device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps disclosed in any of the foregoing embodiments.

[0046] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the terminal device 20; the communication interface 24 can create a data transmission channel between the terminal device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0047] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc., and the resources stored thereon include the operating system 221, computer programs 222, and data including target strategies.

[0048] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the terminal device 20 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system 221 can be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs capable of performing the 5G terminal data connection establishment method executed by the terminal device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0049] Furthermore, this application also discloses a computer storage medium storing computer-executable instructions. When the computer-executable instructions are loaded and executed by a processor, they implement the data connection establishment method steps of the 5G terminal disclosed in any of the foregoing embodiments.

[0050] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0051] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0052] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0053] The above provides a detailed description of a data connection establishment method, terminal device, and medium for a 5G terminal provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the matters of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for establishing a data connection for a 5G terminal, characterized in that, include: The terminal identifies the data packets generated by the application layer, determines the service type to which the data packets belong, and assigns a corresponding service priority to the service type. The terminal queries a pre-set service and network requirement mapping table according to the service type to obtain the target network slice identifier and target QoS identifier corresponding to the service type and service priority. Before initiating a socket connection at the application layer, the terminal proactively initiates a Protocol Data Unit (PDU) session establishment request carrying the target network slice identifier and the target QoS identifier to the network side, so that the network side can allocate resources for the PDU session. After the protocol data unit session is established, the terminal transmits the data packet through the protocol data unit session.

2. The data connection establishment method for a 5G terminal according to claim 1, characterized in that, The terminal performs service identification on data packets generated by the application layer to determine the service type to which the data packets belong, including: The terminal performs a five-tuple matching on the data packets and categorizes the successfully matched data packets into the corresponding known service type. For data packets that cannot be identified by the five-tuple matching, the terminal initiates deep packet inspection and performs feature signature matching on the application layer payload to determine the service type to which the data packet belongs.

3. The data connection establishment method for a 5G terminal according to claim 2, characterized in that, Assigning corresponding business priorities to the business type includes: Based on the identification results of the quintuple matching and / or the deep packet inspection, the service type is divided into a first priority service, a second priority service, or a third priority service. Among them, the first priority service has the highest latency and reliability requirements, the third priority service has the lowest latency and reliability requirements, and the second priority service has latency and reliability requirements that are between those of the first priority service and the third priority service.

4. The data connection establishment method for a 5G terminal according to claim 3, characterized in that, The service and network requirement mapping table records the network requirement parameters corresponding to various services. These network requirement parameters include latency requirements, reliability requirements, bandwidth requirements, network slice identifiers, and QoS identifiers. Wherein, the network slice identifier corresponding to the first priority service is the first network slice identifier and the QoS identifier is the first QoS identifier, the network slice identifier corresponding to the second priority service is the second network slice identifier and the QoS identifier is the second QoS identifier, and the network slice identifier corresponding to the third priority service is the third network slice identifier and the QoS identifier is the third QoS identifier.

5. The data connection establishment method for a 5G terminal according to claim 1, characterized in that, The step of proactively initiating a Protocol Data Unit (PDU) session establishment request to the network side, carrying the target network slice identifier and the target QoS identifier, includes: After the application corresponding to the service type is launched and before a socket connection is initiated, the terminal initiates a protocol data unit session establishment request to the network side in advance, so that the network side can pre-allocate resources for the protocol data unit session and reserve the protocol data unit session.

6. The data connection establishment method for a 5G terminal according to claim 5, characterized in that, The protocol data unit session establishment request also carries the guaranteed stream bit rate, maximum stream bit rate, allocation and reservation priority, and data network name corresponding to the service type.

7. The data connection establishment method for a 5G terminal according to claim 5, characterized in that, The network side pre-allocates resources for the protocol data unit session, including: The network-side access and mobility management function receives the protocol data unit session establishment request and forwards the request to the network slice selection function according to the target network slice identifier carried in the request. The network slice selection function selects the corresponding target network slice instance based on the target network slice identifier, and sends the request to the session management function in the target network slice instance; The session management function requests authorized QoS rules from the policy control function based on the target QoS identifier, selects a user plane function based on the QoS rules returned by the policy control function, and configures forwarding rules and reliability assurance policies corresponding to the target QoS identifier on the user plane function to complete resource reservation.

8. The data connection establishment method for a 5G terminal according to claim 1, characterized in that, After the protocol data unit session is established, it also includes: The terminal monitors the actual performance indicators of the protocol data unit session, including actual latency and actual packet loss rate. When the actual latency is greater than the latency requirement corresponding to the service type recorded in the service and network demand mapping table; And / or, When the actual reliability determined based on the actual packet loss rate is lower than the reliability requirement corresponding to the service type recorded in the service and network demand mapping table; The terminal initiates a Protocol Data Unit Session Modification Request (PDU) carrying a new target network slice identifier to the network side, so as to switch the data packet to the network slice corresponding to the new target network slice identifier for transmission.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the data connection establishment method for a 5G terminal according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on a terminal device, cause the terminal device to perform the data connection establishment method for a 5G terminal according to any one of claims 1 to 8.