Electronic device for data communication in wireless communication system and method for operating same
Various embodiments of the disclosure relate to a device and a method for modifying a UPF in an electronic device. The electronic device may include: a communication circuit and a processor. The processor may be configured to: perform data communication through a PDU session and IP address 1 , identify IP address 2 of the PDU session related to modification of the UPF, identify an RTT in which the IP address 1 is used and an RTT in which the IP address 2 is used, in a state in which the IP address 1 and the IP address 2 of the PDU session are allocated, modify the data path to IP address 2 , based on a result of comparing the RTT in which IP address 1 is used and the RTT in which IP address 2 is used, prior to expiration of a valid lifetime of IP address 1 , and release the IP address 1 based on modification of the data path to the IP address 2.
1 . An electronic device comprising:
communication circuitry;
at least one processor including processing circuitry; and
memory storing instructions,
wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to:
establish a protocol data unit (PDU) session;
perform data communication through a first data path corresponding to & Internet protocol (IP) address 1 allocated to the PDU session by a network;
identify IP address 2 allocated to the PDU session by the network, the IP address 2 being different from the IP address 1 ;
identify a round trip time 1 (RTT 1 ) in which the IP address 1 is used and an RTT 2 in which the IP address 2 is used, in a state in which the IP address 1 and the IP address 2 are allocated to the PDU session;
switch from the first data path to a second data path corresponding to the IP address 2 , based on a difference between the RTT 2 and the RTT 1 being equal to or less than a designated reference value, prior to expiration of a valid lifetime of the IP address 1 ;
reduce, in response to switching to the second data path, the valid lifetime of the IP address 1 using a designated interval; and
release the IP address 1 based on expiration of the reduced valid lifetime of the IP address 1 .
2 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to:
transmit a message related to an access request to the network through the communication circuit; and
establish, based on information related to session and service continuity (SSC) mode 3 included in information related to PDU establishment acceptance received from the network through the communication circuit, the PDU session being configured in the SSC mode 3 .
3 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to identify the RTT 1 in which the IP address 1 is used and the RTT 2 in which the IP address 2 is used through a server related to a reference application program among multiple application programs currently executed in the electronic device.
4 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to identify the RTT 1 in which the IP address 1 is used and the RTT 2 in which the IP address 2 is used through at least one server related to each of multiple application programs currently executed in the electronic device.
5 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to:
identify a server related to an application program to be accessed through the IP address 2 through domain name system (DNS) pre-resolving, based on identification of the IP address 2 ; and
identify the RTT 2 in which the IP address 2 is used through the server related to the application program to be accessed through the IP address 2 .
6 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to maintain the first data path corresponding to the IP address 1 based on the difference between the RTT 2 in which the IP address 2 is used and the RTT 1 in which the IP address 1 is used exceeding the designated reference value.
7 . The electronic device of claim 6 , wherein the instructions, when executed by the at least one processor, individually and/or collectively, cause the electronic device to:
while maintaining the first data path corresponding to the IP address 1 , repeatedly determine, based on a difference between the RTT 2 in which the IP address 2 is used and the RTT 1 in which the IP address 1 is used, whether to switch to the second data path corresponding to the IP address 2 the valid lifetime of the IP address 1 expires.
8 . A method of operating an electronic device, the method comprising:
establishing a protocol data unit (PDU) session;
performing data communication through a first data path corresponding to Internet protocol (IP) address 1 allocated to the PDU session by a network;
identifying IP address 2 allocated to the PDU session by the network, the IP address 2 being different from the IP address 1 ;
identifying a round trip time 1 (RTT 1 ) in which the IP address 1 is used and an RTT 2 in which the IP address 2 is used, in a state in which the IP address 1 and the IP address 2 are allocated to the PDU session;
switching from the first data path to a second data path corresponding to the IP address 2 , based on a difference between the RTT 2 and the RTT 1 being equal to or less than a designated reference value, prior to expiration of a valid lifetime of the IP address 1 ;
reducing, in response to switching to the second data path, the valid lifetime of the IP address 1 using a designated interval; and
releasing the IP address 1 based on expiration of the reduced valid lifetime of the IP address 1 .
9 . The method of claim 8 , wherein the establishing the PDU session comprises:
transmitting a message related to an access request to a network; and
establishing, based on information related to session and service continuity (SSC) mode 3 included in information related to PDU establishment acceptance received from the network, the PDU session configured in the SSC mode 3 .
10 . The method of claim 8 , wherein the identifying of an RTT comprises identifying the RTT 1 in which the IP address 1 is used and the RTT 2 in which the IP address 2 is used through a server related to a reference application program among multiple application programs currently executed in the electronic device.
11 . The method of claim 8 , wherein the identifying of an RTT comprises identifying the RTT 1 in which the IP address 1 is used and the RTT 2 in which the IP address 2 is used through at least one server related to each of multiple application programs currently executed in the electronic device.
12 . The method of claim 8 , wherein the identifying of an RTT comprises:
identifying a server related to an application program to be accessed through the IP address 2 through domain name system (DNS) pre-resolving, based on identification of the IP address 2 ; and
identifying the RTT 2 in which the IP address 2 is used through the server related to the application program to be accessed through the IP address 2 .
13 . The method of claim 8 , further comprising:
maintaining the first data path corresponding to the IP address 1 of 0 based on the difference between the RTT 2 in which the IP address 2 is used and the RTT 1 in which the IP address 1 is used exceeding the designated reference value.
14 . The method of claim 13 , further comprising:
while maintaining the first data path corresponding to the IP address 1 , repeatedly determining, based on a difference between the RTT 2 in which the IP address 2 is used and the RTT 1 in which the IP address 1 is used, whether to switch to the second data path corresponding to the IP address 2 , until the valid lifetime of the IP address 1 expires.