A communication method, apparatus, electronic device, and storage medium
By setting a timer in the 5G LAN and modifying the byte content of the MAC address to generate a temporary address, the UPF dead loop problem caused by MAC address conflict is resolved, and system stability is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNITED NETWORK COMM GRP CO LTD
- Filing Date
- 2023-08-29
- Publication Date
- 2026-05-29
Smart Images

Figure CN116996485B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a communication method, apparatus, electronic device and storage medium. Background Technology
[0002] 5G local access network (5G LAN) service is a communication service provided by the 5G system for a specific 5G virtual network group (VN Group). A 5G VN Group is a collection of user equipment (UE) designated by subscription.
[0003] In 5G LANs, the transmission of Ethernet data packets is based on the routing rules configured in the user plane function (UPF) network elements of the core network. UPF supports self-learning of media access control (MAC) addresses, meaning that UPF can detect the UE's MAC address based on the uplink protocol data unit (PDU) sessions sent by the UE.
[0004] The MAC address is a unique identifier assigned by the device manufacturer during UE manufacturing; in principle, it is fixed and unique. However, in practical 5G LAN applications, MAC address conflicts caused by user actions are unavoidable, such as users manually changing their MAC addresses or other devices being connected to the UE. Once the UPF detects that different UEs within the same 5G LAN have the same MAC address, it will perform MAC address migration on the UE using the duplicate MAC address, i.e., cancel the UE's MAC address and register a new one. As long as the MAC address conflict problem is not completely resolved, the UPF will continuously repeat the above process, constantly sending user update messages, causing the UPF to enter an infinite loop, which may even lead to UPF crashes in severe cases. Summary of the Invention
[0005] This application provides a communication method, apparatus, electronic device, and storage medium to improve the problem of UPF network element crashes in the core network caused by MAC address conflicts.
[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0007] In a first aspect, embodiments of this application provide a communication method, comprising: when receiving an uplink protocol data unit (PDU) session establishment request sent by a first user equipment (UE) from a 5G local area network, obtaining the media access control (MAC) address of the first UE from the uplink PDU session establishment request; when the MAC address of the first UE is the same as the MAC address of any second UE stored in the communication device, setting the MAC address of the first UE as a first conflict address and storing the MAC address of the first UE; starting a first timer and detecting whether the MAC address corresponding to the uplink PDU session establishment request sent by a third UE is the same as the first conflict address; the third UE includes the first UE; the first UE, the second UE, and the third UE belong to the same 5G local area network; if so, stopping the first timer, determining the first conflict address as the target temporary address of the third UE, and allocating different target temporary addresses to the first UE and the second UE respectively based on a preset method; the preset method includes changing the byte content at different positions for the MAC addresses of different devices.
[0008] Optionally, the Data Forwarding Control Protocol (PFCP) session ID is obtained from the uplink PDU session establishment request sent by the first user equipment, and the PFCP session ID is used to replace the fifth byte of the MAC address of the first user equipment. The new address obtained after replacement is determined as the first temporary address of the first user equipment. If the first temporary address is different from the MAC address of each second user equipment, the first temporary address is determined as the target temporary address of the first user equipment. If the first temporary address is the same as the MAC address of any second user equipment, the PDU session ID is obtained from the uplink PDU session establishment request sent by the first user equipment, and the PDU session ID is used to replace the fourth byte of the first temporary address. The new address obtained after replacement is determined as the target temporary address of the first user equipment.
[0009] Optionally, the PFCP session ID of the second user equipment is obtained, and the PFCP session ID is used to replace the fifth byte of the MAC address of the second user equipment. The new address obtained after replacement is determined as the second temporary address of the second user equipment. The PFCP session ID of the second user equipment is included in the establishment request of the uplink PDU session corresponding to the second user equipment. The communication device is used to store the contents included in the establishment request of the uplink PDU session corresponding to the second user equipment and the above-mentioned PDU session ID. If the second temporary address is different from the MAC address of any other second user equipment besides the second user equipment, the second temporary address is determined as the target temporary address of the second user equipment. If the second temporary address is the same as the MAC address of any other second user equipment besides the second user equipment, the uplink PDU session ID corresponding to the second user equipment is obtained, and the PDU session ID is used to replace the fourth byte of the second temporary address. The new address obtained after replacement is determined as the target temporary address of the second user equipment.
[0010] Optionally, after starting the first timer, the downlink PDU sessions corresponding to the first user equipment and the second user equipment are suspended respectively. Also, if the MAC address corresponding to the uplink PDU session establishment request received from the third user equipment is the same as the first conflict address, the downlink PDU session corresponding to the third user equipment is suspended. After determining the target temporary address for the first user equipment, the second user equipment and the third user equipment respectively, the suspended downlink PDU sessions corresponding to the first user equipment, the second user equipment and the third user equipment are restored respectively, and the downlink traffic data corresponding to the downlink PDU sessions corresponding to the first user equipment, the second user equipment and the third user equipment are forwarded according to their respective target temporary addresses.
[0011] Optionally, if, within a preset duration of the first timer's operation, the MAC addresses corresponding to the uplink PDU session establishment requests received from the third user equipment are all different from the first conflicting address, the first conflicting address is determined as the target temporary address of the first user equipment, and the MAC address of the second user equipment is re-registered; the MAC address is then determined as the target temporary address of the second user equipment.
[0012] Optionally, the downlink traffic data corresponding to the downlink PDU sessions of the first user equipment and the second user equipment can be forwarded according to their respective target temporary addresses.
[0013] As can be seen from the above, in the solution of this application embodiment, to address the MAC address conflict problem of user equipment within a 5G local area network, a first timer is set. If, before the first timer expires, the MAC address corresponding to the uplink PDU session establishment request sent by a third user equipment is found to be the same as the first conflicting address, the problem of duplicate MAC addresses for multiple downstream devices corresponding to one user terminal within the 5G local area network may occur. In this application embodiment, the MAC address of the third user equipment that last sent the PDU session establishment request is not changed. For the first and second user equipments that have MAC address conflicts, a preset method is used to modify the byte content at different positions of the MAC address of different devices to generate a target temporary address. This improves the problem of MAC address conflicts not being handled in a timely manner and the UPF constantly updating its correspondence between MAC addresses and PDUs, causing the UPF to enter an infinite loop.
[0014] Secondly, embodiments of this application provide a communication device, including: an acquisition module, a detection module, and a conflict resolution module;
[0015] The acquisition module is used to acquire the Media Access Control (MAC) address of the first user equipment from the uplink PDU session establishment request when it receives an uplink protocol data unit (PDU) session establishment request sent by the first user equipment in the 5G local area network; when the MAC address of the first user equipment is the same as any MAC address of a second user equipment stored in the communication device, the MAC address of the first user equipment is set as the first conflict address and the MAC address of the first user equipment is stored.
[0016] The detection module is used to start a first timer and detect whether the MAC address corresponding to the uplink PDU session establishment request sent by the third user equipment is the same as the first conflict address; the third user equipment includes the first user equipment; the first user equipment, the second user equipment and the third user equipment belong to the same 5G local area network;
[0017] The conflict handling module is used to stop the first timer if it detects whether the MAC address corresponding to the uplink PDU session establishment request sent by the third user equipment is the same as the first conflict address, determine the first conflict address as the target temporary address of the third user equipment, and allocate different target temporary addresses to the first user equipment and the second user equipment respectively based on a preset method; the preset method includes changing the byte content at different positions for the MAC address of different devices.
[0018] Optionally, the conflict resolution module is further configured to obtain the Data Forwarding Control Protocol (PFCP) session ID from the uplink PDU session establishment request sent by the first user equipment, and use the PFCP session ID to replace the fifth byte of the MAC address of the first user equipment, and determine the new address obtained after replacement as the first temporary address of the first user equipment; if the first temporary address is different from the MAC address of each second user equipment, the first temporary address is determined as the target temporary address of the first user equipment; if the first temporary address is the same as the MAC address of any second user equipment, the PDU session ID is obtained from the uplink PDU session establishment request sent by the first user equipment, and the PDU session ID is used to replace the fourth byte of the first temporary address, and the new address obtained after replacement is determined as the target temporary address of the first user equipment.
[0019] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor; the memory is used to store computer-executable instructions; when the electronic device is running, the processor executes the computer-executable instructions stored in the memory to cause the electronic device to perform the communication method as described in the first aspect and any of the implementations.
[0020] Fourthly, embodiments of this application provide a computer-readable storage medium, including: the computer-readable storage medium includes computer-executable instructions, which, when executed on a computer, cause the computer to perform the communication method as described in the first aspect and any of the implementations.
[0021] These or other aspects of the embodiments of this application will become more apparent in the following description. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 A schematic diagram of a communication system provided in an embodiment of this application;
[0024] Figure 2 A schematic diagram of a communication method provided in an embodiment of this application. Figure 1 ;
[0025] Figure 3 A schematic diagram of a communication method provided in an embodiment of this application. Figure 2 ;
[0026] Figure 4A flowchart illustrating a communication method provided in an embodiment of this application. Figure 1 ;
[0027] Figure 5 A flowchart illustrating a communication method provided in an embodiment of this application. Figure 2 ;
[0028] Figure 6 A schematic diagram of a communication method provided in an embodiment of this application. Figure 3 ;
[0029] Figure 7 A flowchart illustrating a communication method provided in an embodiment of this application. Figure 3 ;
[0030] Figure 8 A flowchart illustrating a communication method provided in an embodiment of this application. Figure 4 ;
[0031] Figure 9 A schematic diagram of a communication device provided in an embodiment of this application;
[0032] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0033] 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. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0034] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.
[0035] It should be noted that in this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. It should also be noted that any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0036] 5G local access network (5G LAN) service is a communication service provided by the 5G system for a specific 5G virtual network group (VN Group). This communication service can occur between two or more members of a 5G VN Group, or between a member of a 5G VN Group and a data network. A 5G VN Group is a set of user equipment (UEs) designated by a subscription. Joining a VN Group is equivalent to joining a virtual IP subnet or Ethernet subnet, enabling 5G LAN-type services within the virtual subnet. Since 5G LAN can have the same meaning as the following terms: 5G LAN, 5G LAN-type service, 5G LAN-VN, 5G VN group, and 5G VN, the term 5G LAN will be used throughout this document.
[0037] In a 5G LAN, data can be transmitted using Internet Protocol (IP), Ethernet, or unstructured data. Ethernet data packet transmission is based on routing rules configured in the 5G core network's User Plane Function (UPF) elements. The UPF performs addressing and data forwarding based on the terminal device's Media Access Control (MAC) address. The UPF supports self-learning of the UE's MAC address; that is, the UPF can examine the MAC addresses received in Protocol Data Unit (PDU) sessions within uplink traffic and provide Ethernet-based addressing and forwarding services based on the self-learned MAC addresses and routing rules issued by the Session Management Function (SMF) elements or configured locally.
[0038] The MAC address mentioned above is an address assigned by the equipment manufacturer to each terminal device during manufacturing to uniquely identify the terminal device's location in the network. Terminal devices include network-enabled devices such as mobile phones and computers. In principle, the MAC addresses of the UE and its downstream devices are fixed and unique. The downstream device of the UE is at least one device interconnected with the UE in the network. In this case, the UE acts as a Transmission Control Protocol / Internet Protocol (TCP / IP) Level 2 network switch for the downstream device, providing the UE with a Layer 2 connection to Ethernet, which is the data network layer.
[0039] Although the MAC addresses of different devices are unique at the factory, in practical applications, it is impossible to completely avoid MAC address conflicts between different UEs within the same 5G local area network, such as when a user manually changes the UE's MAC address. A MAC address conflict occurs when the UPF detects that at least two UEs within the same 5G local area network have the same MAC address. Since each UE corresponds to a different PDU, at least two UEs using the same MAC address when receiving and sending data via the PDU cause the UPF to continuously update its mapping between MAC addresses and PDUs. This process repeats indefinitely, potentially leading the UPF into an infinite loop.
[0040] Existing technology involves MAC address migration for UEs experiencing address conflicts within the same 5G local area network. This involves deregistering the UE's old MAC address on the 5G core network side and registering a new one. Since the registered new address only remains on the 5G core network side and doesn't actually change the UE's MAC address, this method is only temporary. As long as the MAC address conflict issue remains unresolved, the UPF will continuously repeat the process, constantly sending user update messages. This leads to heavy congestion of message channels on the 5G core network side, causing signaling storms, and in severe cases, preventing other UEs from accessing the 5G network.
[0041] To address the aforementioned issues, this application provides a communication method. In this method, when an uplink PDU session establishment request is received from a first user equipment (UE) in a 5G local area network (LAN), the MAC address of the first UE is obtained from the uplink PDU session establishment request. If the MAC address of the first UE is the same as the MAC address of any second UE stored in the communication device, the MAC address of the first UE is set as a first conflict address, and the MAC address of the first UE is stored. A first timer is started, and it is detected whether the MAC address corresponding to the uplink PDU session establishment request received from a third UE is the same as the first conflict address. The third UE includes the first UE. The first UE, second UE, and third UE belong to the same 5G LAN. If so, the first timer is stopped, the first conflict address is determined as the target temporary address of the third UE, and different target temporary addresses are allocated to the first UE and second UE respectively based on a preset method. The preset method includes changing the byte content at different positions for the MAC addresses of different devices.
[0042] As can be seen from the above, in the solution of this application embodiment, to address the MAC address conflict problem of user equipment within a 5G local area network, a first timer is set. If, before the first timer expires, the MAC address corresponding to the uplink PDU session establishment request sent by a third user equipment is found to be the same as the first conflicting address, the problem of duplicate MAC addresses for multiple downstream devices corresponding to one user terminal within the 5G local area network may occur. In this application embodiment, the MAC address of the third user equipment that last sent the PDU session establishment request is not changed. For the first and second user equipments that have MAC address conflicts, a preset method is used to modify the byte content at different positions of the MAC address of different devices to generate a target temporary address. This improves the problem of MAC address conflicts not being handled in a timely manner and the UPF constantly updating its correspondence between MAC addresses and PDUs, causing the UPF to enter an infinite loop.
[0043] The methods described in the embodiments of this application can be applied to communication systems. See also... Figure 1 As shown, the system may include user equipment 101, 5G base station 102, 5G core network 103, and communication device 104.
[0044] User equipment 101 is a wireless terminal device based on MAC address addressing, such as a 5G smartphone or industrial control equipment. Industrial control equipment is a type of computer specifically designed for industrial control and automation, also known as an industrial control computer or embedded industrial control computer.
[0045] The 5G base station 102 is a node in the 5G access network. On the one hand, it provides a wireless network to the user equipment 101, utilizing existing spectrum resources to improve the effectiveness and reliability of wireless communication to meet the user equipment 101's requirements for wireless communication quality of service. On the other hand, it establishes a wired connection with the 5G core network, connecting the user equipment 101 to the Internet, including forwarding data from the 5G core network to the user equipment 101, or forwarding data from the user equipment 101 to the 5G core network 103.
[0046] The 5G core network 103 is a platform that provides users with access to the data network, manages users, and carries services. As a bearer network, it provides an interface to external networks. The services it provides include voice calls, SMS, MMS, and Internet access. User management mainly includes authentication of user access to the network, billing of functional services, and user communication records.
[0047] From a protocol stack perspective, the 5G core network 103 includes a user plane and a control plane. The control plane is responsible for signaling and control messages, while the user plane is responsible for data traffic. First, the base station establishes a control plane connection and data bearer for the user equipment 101 before user plane data traffic transmission can occur. Compared to the 4G core network, the system architecture of the 5G core network 103 has undergone significant changes, primarily in the complete separation of the control plane and user plane. That is, different network elements in the 5G core network 103 independently handle control plane or user plane functions. Furthermore, the user plane only has UPF network elements, which reduces the number of user plane nodes and allows for flexible deployment of user plane functions. The network elements responsible for user plane functions are distributed and deployed closer to the user side at the edge, significantly reducing 5G network latency.
[0048] From a system architecture perspective, the 5G core network 103 includes many network elements to implement different functions, mainly including Session Management Function (SMF) network elements, Access and Mobility Management Function (AMF) network elements, UPF network elements, and other network elements, such as those responsible for authentication and network slicing management. Among these, AMF and SMF are network elements corresponding to the control plane. AMF is mainly responsible for terminal access and mobility management, including controlling user access to the 5G network to obtain 5G network services, controlling user disconnection from the 5G network, and managing user equipment 101 when it is in a mobile state. SMF is responsible for session management functions and QoS control. The UPF network element is the network element corresponding to the user plane, responsible for forwarding data traffic, MAC addressing, and changing routes between the 5G base station 102 and the 5G core network 103.
[0049] Among its features, the UPF supports MAC address self-learning, meaning it can check the MAC address corresponding to the Protocol Data Unit (PDU) session in uplink traffic. Based on the self-learned MAC address and the routing rules issued by the SMF network element or configured locally, the UPF can provide Ethernet-based addressing and forwarding services.
[0050] The MAC addresses of terminal devices within the same 5G local area network (LAN) cannot be duplicated. The UPF (User Provider Function) checks for MAC address conflicts within the same LAN. If MAC addresses are duplicated, at best the core network cannot address the corresponding terminal device, thus preventing data transmission; at worst, the UPF may crash due to continuously sending user update messages. An example of a MAC address conflict process is as follows: Figure 2 As shown, both terminal A and terminal B have their MAC addresses set to MAC-A. When terminal A sends a data request to the network server, the network server assumes that terminal A corresponds to MAC-A and uses MAC-A to address and send data. However, when terminal B sends a data request to the server, it also carries a MAC address of MAC-A. After receiving the data request from terminal B, the network server, since both terminal A and terminal B have MAC-A addresses, no longer knows whether MAC-A corresponds to terminal A or terminal B, nor does it know whether the data should be sent to terminal A or terminal B. This results in an address conflict.
[0051] Specifically, there are two reasons for MAC address conflicts within the same 5G local area network: first, the UE is reassigned to a new port; second, within the same local area network, at least two of the downstream devices corresponding to the UE have the same MAC address.
[0052] Taking the second scenario above as an example, such as Figure 3As shown, the Subscriber Identity Modules (SIMs) inserted into the user equipment are SIM-1 and SIM-2, respectively, and the MAC addresses of the corresponding downstream devices A and B are both MAC-A. When downstream devices A and B simultaneously access the 5G network, downstream device A requests to establish a session PDU-1 with an Ethernet session type, and downstream device B requests to establish a session PDU-2 with an Ethernet session type. The user equipment is used to route the uplink and downlink data of downstream devices A and B respectively, which is equivalent to a network switch in this case, connecting downstream devices A and B to the same 5G LAN, i.e., the 5G LAN to which the user equipment is subscribed. Since the UPF network element of the 5G core network checks the MAC address in the uplink PDU session establishment request and uses this MAC address to configure the downlink filter, the UPF will send all downlink traffic data containing this MAC address in the destination address field to the corresponding user equipment through this PDU session. When the UPF detects that the MAC addresses corresponding to PDU-1 and PDU-2 in the uplink PDU session are both MAC-A, the UPF cannot determine whether the downlink traffic containing this MAC address should be routed to PDU-1 or PDU-2, and therefore cannot be routed correctly.
[0053] The communication device 104 is used to resolve the MAC address conflict problem in the aforementioned 5G local area network. The communication device 104 can be integrated into the UPF or connected to the UPF via an interface as an internal module of the UPF, and can obtain all information about MAC addressing from the UPF.
[0054] In some embodiments, for each 5G local area network, the communication device 104 has a corresponding MAC address list, which includes the MAC addresses corresponding to at least one user equipment 101 included in the 5G local area network, and the MAC addresses can be updated. When the communication device 104 detects a conflicting MAC address MAC-A corresponding to at least two uplink PDU sessions of UEs, the communication device 104 will cache all downlink traffic data corresponding to the MAC-A address and start a timer. At the same time, the communication device 104 continues to detect whether there are other newly initiated PDU sessions with MAC addresses of MAC-A, and compares them with the MAC address list of all user equipment 101 corresponding to the 5G local area network.
[0055] Among them, the newly initiated PDU session may come from user equipment with MAC address MAC-A that has already sent an uplink PDU session establishment request, or it may come from other user equipment in the 5G local area network.
[0056] On the one hand, if the communication device 104 detects that at least one MAC address included in the PDU session establishment request is MAC-A before the timer expires, it stops the current timer and generates a temporary MAC address for at least one user equipment with MAC address MAC-A to distinguish different user equipment. For example, the communication device 104 may modify the byte content at different positions for different devices' MAC addresses.
[0057] On the other hand, if the communication device 104 does not detect at least one newly online PDU session with MAC address MAC-A until the timer expires, it will re-register the MAC address for the user equipment corresponding to MAC-A.
[0058] When implementing the communication method in this application embodiment based on the above communication system, it is also possible to address the MAC address conflict problem of user equipment within a 5G local area network. By setting a first timer, if the MAC address corresponding to the uplink PDU session establishment request sent by the third user equipment is found to be the same as the first conflicting address before the first timer expires, then it corresponds to the second cause of MAC address conflict mentioned above, namely, the MAC addresses of multiple downstream devices corresponding to one user terminal in the 5G local area network are indeed duplicated. In this application embodiment, the MAC address of the third user equipment that last sent the PDU session establishment request is not changed. For the first user equipment and the second user equipment that have MAC address conflicts, a preset method is used to change the byte content at different positions of the MAC address of different devices to generate a target temporary address. This improves the problem that the MAC address conflict problem cannot be handled in a timely manner, and that the UPF keeps updating its correspondence between MAC address and PDU repeatedly, causing the UPF to enter an infinite loop.
[0059] This application provides a communication method. This method can be applied to electronic devices with computing and processing capabilities, such as communication devices, servers, and host computers. Taking the application of this method to a communication device as an example, the execution subject of this method is the communication device, see [link to relevant documentation]. Figure 4 As shown, the method includes the following steps S401-S404.
[0060] S401. When a PDU session establishment request is received from the first user equipment in the 5G local area network, the MAC address of the first user equipment is obtained from the uplink PDU session establishment request.
[0061] In some embodiments, each time the communication device receives a PDU session establishment request from a user equipment (UE), it retrieves and saves the UE's MAC address and checks whether the MAC address conflicts with any other UE on the same 5G local area network. Specifically, the PDU session establishment request sent by the first user includes the PDU session type, MAC address, and transmitted data. The PDU session type is Ethernet, and Ethernet-type PDUs are used to carry Ethernet data packets transmitted between the UE and the data network (DN).
[0062] The control plane and user plane of the 5G core network are separate, see [link / reference] Figure 1 As shown, the network elements in the control plane include AMF and SMF. AMF is responsible for terminal access and mobility management, while SMF is responsible for PDU session management. The network element in the user plane, UPF, is responsible for data forwarding. The interface between SMF and UPF is defined by the packet forwarding control protocol (PFCP). SMF sends data forwarding rules to UPF. In these data forwarding rules, the content related to the PDU session is carried by the PFCP session.
[0063] For details, see Figure 5 As shown, the relevant process for establishing a PDU session on the 5G core network side is as follows. Among them,
[0064] 1. After the 5G data transfer switch of the user equipment is turned on, the user equipment requests the creation of at least one PDU session for data transmission with the data network. (R)AN is the 5G base station in the access network. It transparently transmits the non-access stratum (NAS) signaling sent between the 5G core network and the user equipment, and directly forwards the PDU SessionEstablishment Request sent by the UE to the AMF of the 5G core network. This signaling includes information elements (IEs) such as PDU session type, PDU session identification (ID), data network name (DNN), and MAC address. Among them, the PDU session type is Ethernet type.
[0065] 2. AMF selects an SMF entity for the PDU session based on IEs such as DNN.
[0066] 3. The AMF requests the SMF to create a session management (SM) context. The Nsmf_PDUSession_CreateSMContext_Request includes the PDU session ID, DNN, and PDU session type.
[0067] 4. The SMF returns an Nsmf_PDUSession_CreatSMContext_Response to the AMF to acknowledge receipt and create the aforementioned PDU session.
[0068] 5. SMF selects UPF for PDU session based on DNN and UE location information. This is because UPFs are distributed and deployed at the edge closer to the user, so it is necessary to select a UPF that is closer to the UE.
[0069] 6. The SMF sends a PFCP Session Establishment Request to the UPF to establish a connection with the UPF, i.e., a PFCP session, which is used to provide data monitoring, reporting rules, and other content for the PDU session.
[0070] 7. The UPF responds to the SMF with a PFCP Session Establishment Response. This signaling includes whether the 5G core network accepts or rejects the SMF's PFCP session establishment. If accepted, the signaling also includes the PFCP session ID.
[0071] 8. The SMF sends Namf_Communication_N1N2MessageTransfer to the AMF, which includes the quality of service (QoS) and QoS flow identifier (QFI) related information for the PDU session.
[0072] 9. The AMF sends a PDU Session Resource Setup Request to the (R)AN, which also includes QoS and QFI information.
[0073] 10. The RAN sends a PDU Session Establishment Accept to the UE, which is a response to the UE's request to establish a PDU session in step 1, and also includes QoS and other relevant information for the PDU. If the PDU is successfully established, the UE can begin sending the first packet of uplink data, which refers to the data transmitted with the data network.
[0074] 11. (R)AN replies to AMF with a PDU session Resource Setup Response, including the QFI corresponding to the established PDU, etc.
[0075] 12. The AMF sends an Nsmf_PDUSession_UpdateSMContext_Request to the SMF in response to the establishment of the PDU session.
[0076] 13. The SMF sends a PFCP Session Modification Request to the UPF, which includes data forwarding rules, information required to update the user plane, etc.
[0077] 14. The UPF replies to the SMF with a PFCP Session Modification Response. Then, the UPF can send data network data to the UE through the downlink PDU corresponding to the successfully established PDU session ID.
[0078] 15. The SMF replies to the AMF with Nsmf_PDUSession_UpdateSMContext_Response, including the QFI corresponding to the established PDU, etc.
[0079] In summary, steps 1 to 10 constitute the PDU session establishment process, and simultaneously establish a corresponding PFCP session for this PDU session. If the PDU establishment is successful, the UE can begin sending uplink data via the uplink PDU. Steps 11 to 15 constitute the PDU modification process; if the PDU modification is successful, the UE can begin sending downlink data via the downlink PDU.
[0080] S402. When the MAC address of the first user equipment is the same as the MAC address of any second user equipment stored in the communication device, the MAC address of the first user equipment is set as the first conflict address, and the MAC address of the first user equipment is saved.
[0081] In some embodiments, when the communication device receives a PDU session establishment request initiated by a UE, it first saves the MAC address corresponding to the UE, and then checks whether the address conflicts with the MAC address of a second user equipment that has established a PDU connection in the 5G local area network. If so, the communication device will immediately process the conflicting MAC address.
[0082] Based on the above process, before the first user equipment initiates a PDU session establishment request, the communication device stores the MAC address corresponding to each of the at least one second user equipment that has already established a PDU session in the 5G local area network. These MAC addresses are unique. Since the user equipment establishing a new uplink PDU session includes user equipment whose MAC addresses are not stored in the communication device, it is only necessary to confirm whether the MAC address of the user equipment establishing the new uplink PDU session is the same as the MAC address of any of the second user equipment stored in the communication device.
[0083] S403. Start the first timer and check whether the MAC address corresponding to the uplink PDU session establishment request sent by the third user equipment is the same as the first conflicting address.
[0084] Within the same 5G local area network, MAC address conflicts can occur for two reasons: first, the UE is reassigned to a new port; second, within the same local area network, at least two of the UE's connected devices have the same MAC address. Different methods are needed to resolve these two causes of MAC address conflicts, for the following reasons.
[0085] In the first scenario, after the first user equipment is switched to a new port, it will have the same MAC address as other devices in the 5G local area network. In this case, it is feasible to perform MAC address drifting, that is, to register a new MAC address for the first user equipment in the 5G core network.
[0086] For the second scenario, see Figure 3 As shown, in the same local area network, among the multiple downstream devices corresponding to the terminal device, at least two of the downstream devices have the same MAC address, MAC-A. All downstream devices have 5G data enabled. For example, MAC-A corresponds to downstream devices A and B of the terminal device. Downstream device A initiates a PDU session establishment request. The communication device stores the MAC address of downstream device A as MAC-A. After successfully establishing the PDU session, data transmission begins. Then, downstream device B initiates a PDU session establishment request. At this point, the communication device detects a MAC address conflict and begins to handle the address conflict, first setting MAC-A as the first conflicting address.
[0087] However, unlike the first scenario, the second scenario may present the following situations: Since the communication device will not respond to the PDU session establishment requests of all downstream devices corresponding to MAC-A until the MAC address conflict problem is resolved, downstream device A may repeatedly send the PDU session establishment request, or other PDU session establishment requests may be used to start other types of data services, or terminal B may also initiate a PDU session establishment request, or other downstream devices corresponding to the user equipment with MAC addresses of MAC-A, besides terminal device A and the terminal device, may also initiate a PDU session establishment request.
[0088] Therefore, the difference between the second scenario and the first scenario is that in the second scenario, after multiple downstream devices with the same MAC address corresponding to a terminal device have their 5G data switches turned on, multiple downstream devices have the need to establish PDU sessions. Therefore, the time interval between them initiating PDU session establishment requests is very short. This phenomenon does not exist in the first scenario.
[0089] In some embodiments, a first timer is used to distinguish between the two scenarios of MAC address conflict. The duration of the first timer is expected to be slightly longer than the time interval between PDU session establishment requests sent between the downstream devices with conflicting MAC addresses. This allows the detection of PDU session establishment requests sent by the downstream device corresponding to the conflicting address before the first timer expires. The preset duration of the first timer can be one of 100ms, 200ms, 300ms, 400ms, 600ms, 1000ms, 1500ms, and 2000ms. When the first timer is started, the downlink PDU sessions corresponding to the first user equipment and the second user equipment are suspended, respectively. It is then detected whether the MAC address corresponding to the uplink PDU session establishment request sent by the third user equipment is the same as the first conflicting address. The third user equipment includes the first user equipment; the first user equipment, the second user equipment, and the third user equipment belong to the same 5G local area network.
[0090] S404. If so, stop the first timer, determine the first conflicting address as the target temporary address of the third user equipment, and allocate different target temporary addresses to the first user equipment and the second user equipment respectively based on a preset method.
[0091] If, during timer operation, the MAC address corresponding to the uplink PDU session establishment request received from a third user equipment is the same as the first conflicting address, it indicates that the cause of the MAC address conflict corresponds to the second scenario mentioned above. The PDU session corresponding to the third user equipment needs to be suspended first, meaning that the uplink and downlink PDUs corresponding to this PDU ID cannot transmit data at this time, and the data to be transmitted is cached. The session can only be resumed after the corresponding target temporary address is determined.
[0092] In some embodiments, the first timer is stopped, the first conflicting address is determined as the target temporary address of the third user equipment, and then the addresses of the first user equipment and the second user equipment are determined according to a preset method. The preset method includes changing the byte content at different positions for the MAC addresses of different devices. Specifically, the preset method includes:
[0093] First, for the first user equipment, the communication device obtains the PFCP session ID from the uplink PDU session establishment request sent by the first user equipment, and uses the PFCP session ID to replace the fifth byte of the first user equipment's MAC address. The new address obtained after the replacement is determined as the first temporary address of the first user equipment. For example, as shown below... Figure 6 As shown. Among them, the PFCP session ID is the PFCP session ID corresponding to the PDU session. It is an identifier of the PFCP session allocated by the SMF and provided to the UPF. Its length is 8 bits. Each PFCP session ID is unique within a 5G local area network.
[0094] If the first temporary address is different from the MAC address of each second user device, the first temporary address is determined as the target temporary address of the first user device.
[0095] If the first temporary address is the same as the MAC address of any second user equipment, the PDU session ID is obtained from the uplink PDU session establishment request sent by the first user equipment, and the fourth byte of the first temporary address is replaced by the PDU session ID. The new address obtained after the replacement is determined as the target temporary address of the first user equipment.
[0096] Second, for the second user equipment, the communication device obtains the PFCP session ID from the uplink PDU session establishment request sent by the second user equipment, and uses the PFCP session ID to replace the fifth byte of the MAC address of the second user equipment, and determines the new address obtained after the replacement as the second temporary address of the second user equipment.
[0097] If the second temporary address is different from the MAC address of all other second user equipments in the 5G local area network except for the second user equipment, the communication device will determine the second temporary address as the target temporary address of the second user equipment.
[0098] If the second temporary address is the same as the MAC address of any other second user equipment besides the second user equipment, the communication device obtains the uplink PDU session ID corresponding to the second user equipment, and uses the PDU session ID to replace the fourth byte of the second temporary address, and determines the new address obtained after replacement as the target temporary address of the second user equipment.
[0099] The reason why the communication device can ensure the uniqueness of the target temporary address by modifying the conflicting MAC address at most twice is that after replacing the fifth byte of the first conflicting address with the PFCP session ID, since each user equipment's PFCP session ID is different, the modified MAC addresses of the first, second, and third user equipments that have an address conflict within the 5G local area network will definitely be different. However, it cannot be ruled out that the first temporary address of the first, second, and third user equipments that have an address conflict might be the same as that of the second user equipment within the 5G local area network whose MAC address is not the first conflicting address. If so, the fourth byte of the first temporary address needs to be replaced with the PDU session ID. Since the PDU session ID is also unique, the target temporary address generated after at most two modifications can guarantee its uniqueness within the 5G local area network.
[0100] After determining the target temporary addresses for the first user equipment, the second user equipment, and the third user equipment respectively, the downlink PDU sessions corresponding to the first user equipment, the second user equipment, and the third user equipment respectively are restored, and the downlink traffic data corresponding to the downlink PDU sessions corresponding to the first user equipment, the second user equipment, and the third user equipment respectively are forwarded according to their respective target temporary addresses.
[0101] In other embodiments, if, within a preset duration of the first timer's operation, the MAC addresses in the uplink PDU session establishment requests received from the third user equipment are all different from the first conflicting address, this indicates the cause of the MAC address conflict, corresponding to the first scenario of MAC address conflict mentioned in S403. In this case, address drift processing can be performed on the first conflicting address. The communication device determines the first conflicting address as the target temporary address of the first user equipment and determines the re-registered MAC address as the target temporary address of the second user equipment.
[0102] Since the communication device suspends the uplink PDU and downlink PDU corresponding to the first conflicting address when it determines the address conflict, it has already cached the traffic data to be transmitted by the aforementioned PDU. After determining the target temporary addresses for the first user equipment and the second user equipment respectively, the communication device sends user update messages to other network elements of the core network to update the MAC addresses corresponding to the downlink PDU sessions of the first user equipment and the second user equipment; and forwards the downlink traffic data corresponding to the downlink PDU sessions of the first user equipment and the second user equipment according to the corresponding target temporary addresses.
[0103] As can be seen from the above, in the solution of this application embodiment, for the problem of MAC address conflict of user equipment in a 5G local area network, a first timer is used to distinguish the two causes of MAC address conflict and different processing methods are adopted for each. For the first cause, the terminal with the MAC address is adjusted to a new port, and the address drift method is used for processing. For the second cause, the MAC addresses of multiple downstream devices corresponding to one user terminal in the 5G local area network are indeed duplicated. In this application embodiment, the MAC address of the third user equipment that last sent the PDU session establishment request is not changed. For the other first and second user equipments that have MAC address conflicts, a preset method is used. For each first or second user equipment, the fifth byte of the MAC address is replaced with the PFCP session ID. If the generated temporary address is duplicated with the MAC address of other user equipment in the 5G local area network, the fourth byte of the MAC address is replaced with the PDU session ID, thereby generating the target temporary address. Since the PFCP session ID and PDU session ID are necessary information generated by the UPF to support the session process, they can ensure the uniqueness of each PFCP session ID and PDU session ID within the 5G local area network, without introducing additional parameters. By adopting different processing methods for the two causes of MAC address conflicts mentioned above, the fault tolerance of the 5G communication system is enhanced, and the MAC address conflict problem is fundamentally solved. At the same time, the actual amount of computation is small, avoiding excessive consumption of computing and storage resources.
[0104] In the embodiments of this application, see Figure 7 As shown, the method further includes the following steps S701-S702.
[0105] S701. The MAC addresses of the first user equipment and the second user equipment, and / or the third user equipment are found to be the same.
[0106] In some embodiments, the communication device detects that the MAC address corresponding to the establishment request of the uplink protocol data unit (PDU) session sent by the first user equipment in a 5G local area network conflicts with the MAC address of the second user equipment already stored in the communication device, starts a first timer, and detects that the MAC address corresponding to the establishment request of the uplink PDU session sent by the third user equipment is the same as the first conflicting address.
[0107] S702. After receiving the PFCP SESSION DELECTION REQUEST signal, the PFCP session release process begins.
[0108] In practical applications, when a user equipment terminates a certain data service, which triggers the release of the corresponding PDU connection or PDU session, or when the user equipment turns off 5G traffic, or when the user equipment disconnects the 5G connection due to network environment reasons, the 5G core network will release the user equipment's PDU session and release the corresponding PFCP session.
[0109] The PFCP session release procedure is used to delete the context of the PFCP session corresponding to the PDU session saved on the UPF, and the initiator of the PFCP session release can only be the SMF.
[0110] See Figure 8 As shown, the specific process for releasing a PFCP session is as follows.
[0111] 1. The SMF sends a PFCP SESSION DELECTION REQUEST to the UPF, which contains the PFCP session ID that needs to be deleted.
[0112] 2. After UPF finds and deletes the context of the PFCP session that needs to be deleted based on the PFCP session ID.
[0113] 3. UPF sends PFCP SESSION DELECTION RESPONSE to SMF.
[0114] 4. The SMF interacts with other network elements in the 5G core network, such as the AMF, to carry out the subsequent PFCP session deletion process.
[0115] In some embodiments, when the communication device detects a MAC address conflict of user equipment within the aforementioned 5G local area network via the UPF interface, it begins to determine a target temporary address for the first user equipment, the second user equipment, and / or the third user equipment. If the PDU session corresponding to the PFCP session contained in the received PFCP SESSION DELECTION REQUEST is assigned to the target user equipment among the first, second, or third user equipment experiencing the address conflict, the following processing methods are applied:
[0116] (1) If a PFCP SESSIONDELECTION REQUEST corresponding to the target user equipment is received before the target temporary address is determined, the communication device stops determining the target temporary address for the target user equipment and directly performs PFCP session release.
[0117] (2) If a PFCP SESSIONDELECTION REQUEST is received after the target temporary address has been determined, the communication device instructs the UPF to release the PFCP session.
[0118] As can be seen from the above, in the above method of this application embodiment, if after determining that the MAC address of the first user equipment is the same as the MAC address of other first user equipments in the 5G local area network besides the first user equipment, a notification to release the uplink PDU session is received from the first user equipment, it is only necessary to release the uplink PDU session. In conjunction with the existing PFCP related process, the MAC address conflict handling is added on the basis of the existing PFCP release process.
[0119] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0120] This application embodiment can divide the communication device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0121] This application also provides a communication device, such as... Figure 9 The diagram shows the internal structure of the communication device, which includes an acquisition module 901, a detection module 902, and a conflict handling module 903.
[0122] The acquisition module 901 is used to acquire the Media Access Control (MAC) address of the first user equipment from the uplink PDU session establishment request when it receives an uplink protocol data unit (PDU) session establishment request sent by the first user equipment in the 5G local area network; when the MAC address of the first user equipment is the same as the MAC address of any second user equipment stored in the communication device, the MAC address of the first user equipment is set as the first conflict address and the MAC address of the first user equipment is stored.
[0123] The detection module 902 is used to start a first timer and detect whether the MAC address corresponding to the uplink PDU session establishment request sent by the third user equipment is the same as the first conflict address; the third user equipment includes the first user equipment; the first user equipment, the second user equipment and the third user equipment belong to the same 5G local area network.
[0124] The conflict handling module 903 is used to stop the first timer if it detects whether the MAC address corresponding to the uplink PDU session establishment request sent by the third user equipment is the same as the first conflict address, determine the first conflict address as the target temporary address of the third user equipment, and allocate different target temporary addresses to the first user equipment and the second user equipment respectively based on a preset method; the preset method includes changing the byte content at different positions for the MAC address of different devices.
[0125] The conflict resolution module 903 is further configured to obtain the PFCP session ID from the uplink PDU session establishment request sent by the first user equipment, and use the PFCP session ID to replace the fifth byte of the MAC address of the first user equipment, and determine the new address obtained after replacement as the first temporary address of the first user equipment; if the first temporary address is different from the MAC address of each second user equipment, the first temporary address is determined as the target temporary address of the first user equipment; if the first temporary address is the same as the MAC address of any second user equipment, the PDU session ID is obtained from the uplink PDU session establishment request sent by the first user equipment, and the PDU session ID is used to replace the fourth byte of the first temporary address, and the new address obtained after replacement is determined as the target temporary address of the first user equipment.
[0126] The conflict resolution module 903 is further configured to obtain the PFCP session ID of the second user equipment, and replace the fifth byte of the MAC address of the second user equipment with the PFCP session ID, and determine the new address obtained after replacement as the second temporary address of the second user equipment; the PFCP session ID of the second user equipment is included in the establishment request of the uplink PDU session corresponding to the second user equipment; the communication device is configured to store the contents included in the establishment request of the uplink PDU session corresponding to the second user equipment and the aforementioned PDU session ID; if the second temporary address is different from the MAC address of any other second user equipment besides the second user equipment, the second temporary address is determined as the target temporary address of the second user equipment; if the second temporary address is the same as the MAC address of any other second user equipment besides the second user equipment, the uplink PDU session ID corresponding to the second user equipment is obtained, and the fourth byte of the second temporary address is replaced with the PDU session ID, and the new address obtained after replacement is determined as the target temporary address of the second user equipment.
[0127] The conflict handling module 903 is further configured to, after starting the first timer, suspend the downlink PDU sessions corresponding to the first user equipment and the second user equipment respectively, and, if the MAC address corresponding to the uplink PDU session establishment request received from the third user equipment is the same as the first conflict address, suspend the downlink PDU session corresponding to the third user equipment; after determining the target temporary addresses for the first user equipment, the second user equipment and the third user equipment respectively, restore the suspended downlink PDU sessions corresponding to the first user equipment, the second user equipment and the third user equipment respectively, and forward the downlink traffic data corresponding to the downlink PDU sessions corresponding to the first user equipment, the second user equipment and the third user equipment respectively according to their respective target temporary addresses.
[0128] The conflict handling module 903 is further configured to, if within a preset duration of the first timer's operation, all MAC addresses corresponding to the uplink PDU session establishment requests received from the third user equipment are different from the first conflict address, determine the first conflict address as the target temporary address of the first user equipment and re-register the MAC address of the second user equipment; and determine the MAC address as the target temporary address of the second user equipment.
[0129] The conflict handling module 903 is also used to forward the downlink traffic data corresponding to the downlink PDU sessions of the first user equipment and the second user equipment according to their respective target temporary addresses.
[0130] When implementing the communication method in this application embodiment, to address the MAC address conflict problem of user equipment within a 5G local area network, a first timer is set. If, before the first timer expires, the MAC address corresponding to the uplink PDU session establishment request sent by the third user equipment is found to be the same as the first conflicting address, then this corresponds to the second cause of MAC address conflict mentioned above, namely, the MAC addresses of multiple downstream devices corresponding to one user terminal within the 5G local area network are indeed duplicated. In this application embodiment, the MAC address of the third user equipment that last sent the PDU session establishment request is not changed. For the first and second user equipments that have MAC address conflicts, a preset method is used to modify the byte content at different positions of the MAC address of different devices to generate a target temporary address. This improves the problem of MAC address conflict not being handled in a timely manner and the UPF constantly updating its correspondence between MAC address and PDU, causing the UPF to enter an infinite loop.
[0131] Figure 10 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 10As shown, the electronic device includes a processor 1001 and a memory 1002. Optionally, the electronic device may also include a communication interface 1003; optionally, the electronic device may also include a bus 1004. The processor 1001 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 1001 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 1001 may also be a combination that implements computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc. The communication interface 1003 is used to connect with other devices through a communication network. The communication network may be Ethernet, a private network, a wireless access network, a wireless local area network (WLAN), etc. The memory 1002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. As one possible implementation, the memory 1002 may exist independently of the processor 1001. The memory 1002 may be connected to the processor 1001 via a bus 1004 for storing instructions or program code. When the processor 1001 calls and executes the instructions or program code stored in the memory 1002, it can implement the communication method provided in the embodiments of this application. In another possible implementation, the memory 1002 can also be integrated with the processor 1001. The bus 1004 can be an extended industry standard architecture (EISA) bus, etc. The bus 1004 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0132] Some embodiments of this application provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) storing computer program instructions that, when executed on a computer, cause the computer to perform the method as described in any of the above embodiments.
[0133] For example, the aforementioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical discs (e.g., compact disks (23CDs), digital versatile disks (DVDs), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memory, EPROM), cards, sticks, or key drives, etc.). The various computer-readable storage media disclosed in this application may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.
[0134] This application provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the method of any of the above embodiments.
[0135] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A communication method, characterized in that, Applied to a communication device, the method includes: When an uplink protocol data unit (PDU) session establishment request is received from a first user equipment in the 5G local area network, the media access control (MAC) address of the first user equipment is obtained from the uplink PDU session establishment request. When the MAC address of the first user equipment is the same as the MAC address of any second user equipment stored in the communication device, the MAC address of the first user equipment is set as the first conflict address, and the MAC address of the first user equipment is saved. A first timer is started. Within a preset duration of the first timer's operation, it is detected whether the MAC address corresponding to the uplink PDU session establishment request received from the third user equipment is the same as the first conflicting address; the third user equipment includes the first user equipment; the first user equipment, the second user equipment, and the third user equipment belong to the same 5G local area network; If so, the first timer is stopped, the first conflicting address is determined as the target temporary address of the third user equipment, and different target temporary addresses are allocated to the first user equipment and the second user equipment respectively based on a preset method; the preset method includes changing the byte content at different positions for the MAC address of different devices.
2. The method according to claim 1, characterized in that, Assigning a target temporary address to the first user equipment based on the preset method includes: The Data Forwarding Control Protocol (PFCP) Session Identity ID is obtained from the uplink PDU session establishment request sent by the first user equipment, and the PFCP session ID is used to replace the fifth byte of the MAC address of the first user equipment. The new address obtained after the replacement is determined as the first temporary address of the first user equipment. If the first temporary address is different from the MAC address of each of the second user equipments, the first temporary address is determined as the target temporary address of the first user equipment. If the first temporary address is the same as the MAC address of any of the second user equipments, the PDU session ID is obtained from the uplink PDU session establishment request sent by the first user equipment, and the fourth byte of the first temporary address is replaced by the PDU session ID. The new address obtained after the replacement is determined as the target temporary address of the first user equipment.
3. The method according to claim 1, characterized in that, Assigning a target temporary address to the second user equipment based on the preset method includes: The PFCP session ID of the second user equipment is obtained, and the PFCP session ID is used to replace the fifth byte of the MAC address of the second user equipment. The new address obtained after the replacement is determined as the second temporary address of the second user equipment. The PFCP session ID of the second user equipment is included in the establishment request of the uplink PDU session corresponding to the second user equipment. The communication device is used to save the content included in the establishment request of the uplink PDU session corresponding to the second user equipment and the aforementioned PDU session ID. If the second temporary address is different from the MAC address of all other second user equipments besides the second user equipment, the second temporary address is determined as the target temporary address of the second user equipment. If the second temporary address is the same as the MAC address of any other second user equipment besides the second user equipment, obtain the uplink PDU session ID corresponding to the second user equipment, and use the PDU session ID to replace the fourth byte of the second temporary address, and determine the new address obtained after replacement as the target temporary address of the second user equipment.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: After starting the first timer, the downlink PDU sessions corresponding to the first user equipment and the second user equipment are suspended respectively. If the MAC address corresponding to the uplink PDU session establishment request sent by the third user equipment is the same as the first conflicting address, the downlink PDU session corresponding to the third user equipment is suspended. After determining the target temporary address for the first user equipment, the second user equipment, and the third user equipment respectively, the suspended downlink PDU sessions corresponding to the first user equipment, the second user equipment, and the third user equipment are restored, and the downlink traffic data corresponding to the downlink PDU sessions corresponding to the first user equipment, the second user equipment, and the third user equipment are forwarded according to the corresponding target temporary address.
5. The method according to claim 1, characterized in that, The first timer runs for a preset duration; the method further includes: If, within the preset duration of the first timer's operation, the MAC addresses corresponding to the uplink PDU session establishment requests received from the third user equipment are all different from the first conflicting address, the first conflicting address is determined as the target temporary address of the first user equipment, and the MAC address of the second user equipment is re-registered. The MAC address is determined as the target temporary address of the second user equipment.
6. The method according to claim 5, characterized in that, The method further includes: The downlink traffic data corresponding to the downlink PDU sessions of the first user equipment and the second user equipment are forwarded according to the respective target temporary addresses.
7. A communication device, characterized in that, include: The acquisition module is configured to, when receiving an uplink protocol data unit (PDU) session establishment request sent by a first user equipment in the 5G local area network, acquire the media access control (MAC) address of the first user equipment from the uplink PDU session establishment request; when the MAC address of the first user equipment is the same as the MAC address of any second user equipment stored in the communication device, set the MAC address of the first user equipment as the first conflict address and save the MAC address of the first user equipment. The detection module is used to start a first timer and, within a preset duration of the first timer's operation, detect whether the MAC address corresponding to the uplink PDU session establishment request received from a third user equipment is the same as the first conflicting address; the third user equipment includes the first user equipment; The first user equipment, the second user equipment, and the third user equipment belong to the same 5G local area network; The conflict handling module is configured to, if it detects whether the MAC address corresponding to the uplink PDU session establishment request sent by the third user equipment is the same as the first conflict address, stop the first timer, determine the first conflict address as the target temporary address of the third user equipment, and allocate different target temporary addresses to the first user equipment and the second user equipment respectively based on a preset method; the preset method includes changing the byte content at different positions for the MAC address of different devices.
8. The apparatus according to claim 7, characterized in that, The conflict handling module is further configured to obtain the PFCP session ID from the uplink PDU session establishment request sent by the first user equipment, and use the PFCP session ID to replace the fifth byte of the MAC address of the first user equipment, and determine the new address obtained after replacement as the first temporary address of the first user equipment. If the first temporary address is different from the MAC address of each of the second user equipments, the first temporary address is determined as the target temporary address of the first user equipment. If the first temporary address is the same as the MAC address of any of the second user equipments, the PDU session ID is obtained from the uplink PDU session establishment request sent by the first user equipment, and the fourth byte of the first temporary address is replaced by the PDU session ID. The new address obtained after the replacement is determined as the target temporary address of the first user equipment.
9. An electronic device, characterized in that, It includes a memory and a processor; the memory is used to store computer execution instructions; when the electronic device is running, the processor executes the computer execution instructions stored in the memory to cause the electronic device to perform the communication method as described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the communication method according to any one of claims 1-6.