Time length determination method and device, electronic equipment and computer program product

By obtaining and updating the available time of network slices through terminal devices, the problem of inaccurate network slice management is solved, and accurate time management and a stable network slice user experience are achieved.

CN121750581APending Publication Date: 2026-03-27CHENGDU OPPO TELECOMM TECH CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively manage the availability of network slices, leading to inaccurate management of network slice usage.

Method used

The remaining available time of the network slice is obtained by responding to the access command by the terminal device, the access time is recorded, and the usage time is calculated when the connection is disconnected, and the available time is updated to maintain its accuracy.

Benefits of technology

It enables accurate management of the available time of network slices, improves the stability and user experience of network slices, avoids disconnection in a short period of time, and ensures the reliability and billing accuracy of network slices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121750581A_ABST
    Figure CN121750581A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, in particular to a duration determination method and device, electronic equipment and a computer program product.The method is applied to terminal equipment and comprises the steps that in response to an access instruction for a target network slice, the remaining first available duration of the target network slice is obtained, and the target network slice is accessed; recording a first moment when the terminal device accesses the target network slice; if it is detected that the connection with the target network slice is disconnected, determining a target use duration according to the first moment and a second moment when the target network slice is disconnected; and updating the first available duration according to the target use duration. By implementing the embodiment of the invention, the remaining available duration of the network slice can be updated, so that the available duration of the network slice can be conveniently managed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to a method and apparatus for determining duration, electronic equipment, and computer program products. Background Technology

[0002] Network slicing is an innovative network architecture that uses virtualization technology to divide a single physical network into multiple logical subnets. Each different subnet can be considered a network slice, and terminal devices can access different network slices to meet different internet access needs.

[0003] Therefore, how to manage network slices is a goal that the field is constantly optimizing. Summary of the Invention

[0004] This application discloses a method and apparatus for determining the duration of a network slice, an electronic device, and a computer program product, which can update the remaining available duration of a network slice, thereby facilitating the management of the available duration of the network slice.

[0005] The first aspect of this application discloses a method for determining duration, applied to a terminal device, the method comprising: In response to an access command for a target network slice, obtain the remaining first available time of the target network slice and access the target network slice; Record the first moment when the terminal device accesses the target network slice; If a disconnection from the target network slice is detected, the target usage duration is determined based on the first time point and the second time point at which the target network slice is disconnected. The first available time is updated based on the target usage time.

[0006] A second aspect of this application discloses a method for determining duration, applied to a server corresponding to a target network slice, the method comprising: The system receives an access request sent by a terminal device and instructs the target network slice to establish a connection with the terminal device according to the access request. The access request is used to request the establishment of a connection with the target network slice. Receive a disconnect request sent by the terminal device; The disconnection request instructs the target network slice to disconnect from the terminal device and sends a fifth feedback message to the terminal device. The fifth feedback message indicates that the target network slice has successfully disconnected from the terminal device. The fifth feedback message is used to enable the terminal device to determine the target usage duration based on the first moment when the terminal device accesses the target network slice and the second moment when it disconnects the target network slice, and to update the first available duration based on the target usage duration.

[0007] A third aspect of this application discloses a duration determination device applied to a terminal device, the method comprising: The acquisition unit is configured to, in response to an access command for a target network slice, acquire the remaining first available time of the target network slice and access the target network slice; Record the first moment when the terminal device accesses the target network slice; A determining unit is configured to determine the target usage duration based on a first time point and a second time point when the connection with the target network slice is detected to be disconnected. An update unit is used to update the first available time according to the target usage time.

[0008] A fourth aspect of this application discloses a duration determination device, applied to a server corresponding to a target network slice, the method comprising: The first receiving unit is configured to receive an access request sent by a terminal device, and instruct the target network slice to establish a connection with the terminal device according to the access request, wherein the access request is used to request to establish a connection with the target network slice; The second receiving unit is used to receive the disconnection request sent by the terminal device; The sending unit is configured to instruct the target network slice to disconnect from the terminal device according to the disconnection request, and send fifth feedback information to the terminal device. The fifth feedback information indicates that the target network slice has successfully disconnected from the terminal device. The fifth feedback information is used to enable the terminal device to determine the target usage duration based on the first time when the terminal device accesses the target network slice and the second time when it disconnects the target network slice, and to update the first available duration based on the target usage duration.

[0009] The fifth aspect of this application discloses an electronic device, including: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the duration determination method disclosed in the first or second aspect of this application.

[0010] The sixth aspect of this application discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute the duration determination method disclosed in the first or second aspect of this application.

[0011] The seventh aspect of this application discloses a computer program product that, when run on a computer, causes the computer to perform some or all of the steps of any method disclosed in the first or second aspect of this application.

[0012] The eighth aspect of this application discloses an application publishing platform for publishing computer program products, wherein when the computer program product is run on a computer, the computer performs some or all of the steps of any method disclosed in the first or second aspect of this application.

[0013] Compared with related technologies, the embodiments of this application have the following beneficial effects: The duration determination method disclosed in this application can be applied to a terminal device. In response to an access command for a target network slice, the terminal device can obtain the remaining first available duration of the target network slice and connect to the target network slice; record the first moment when the terminal device connects to the target network slice; and if it is detected that the terminal device disconnects from the target network slice, the target usage duration can be determined based on the first moment when the target network slice is connected and the second moment when the target network slice is disconnected; and the first available duration is updated based on the target usage duration.

[0014] As can be seen, by implementing the embodiments of this application, the terminal device can determine the target usage time of the target network slice based on the first moment of accessing the target network slice and the second moment of disconnecting the target network slice. Then, it can update the remaining first available time of the target network slice according to the target usage time, so that the remaining first available time of the target network slice remains accurate, thereby facilitating the management of the available time of the network slice. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of an application scenario disclosed in an embodiment of this application; Figure 2 This is a flowchart illustrating a method for determining duration disclosed in an embodiment of this application; Figure 3 This is a flowchart illustrating another method for determining duration disclosed in an embodiment of this application; Figure 4 This is a flowchart illustrating another method for determining duration disclosed in the embodiments of this application; Figure 5 This is a flowchart illustrating another method for determining duration disclosed in the embodiments of this application; Figure 6 This is a schematic diagram of a method process disclosed in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a duration determination device disclosed in an embodiment of this application; Figure 8 This is a schematic diagram of another duration determination device disclosed in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of another electronic device disclosed in an embodiment of this application. Detailed Implementation

[0017] 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 skilled in the art without creative effort are within the scope of protection of this application.

[0018] It should be noted that the terms "first," "second," "third," and "fourth," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order. The terms "comprising" and "having," and any variations thereof, in the embodiments of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.

[0019] This application discloses a method and apparatus for determining the duration of a network slice, an electronic device, and a computer program product, which can update the remaining available duration of a network slice, thereby facilitating the management of the available duration of the network slice.

[0020] The technical solution of this application will be described in detail below with reference to specific embodiments.

[0021] To more clearly explain the duration determination method disclosed in the embodiments of this application, we will first introduce network slicing. Network slicing technology is an innovative network architecture that allows the creation of multiple independent virtual networks on a shared physical network infrastructure. That is, it divides a single physical network into multiple logical subnets through virtualization technology, and each different subnet can be considered a network slice. When a terminal device uses a network slice, it needs to establish a separate link channel with that network slice, and the use of other network slices will not be affected during the process.

[0022] Different network slices are suitable for different network usage scenarios. For example, in autonomous driving scenarios, fast network response is required, thus necessitating "low latency" network slices; in live streaming scenarios, the ability to transmit high-definition images is required, thus necessitating "high bandwidth" network slices; and in smart home scenarios, network stability and power saving are required, thus necessitating "low power consumption" network slices. These are not limited to specific scenarios.

[0023] As mentioned above, terminal devices may access different network slices in different usage scenarios, so how to manage network slices is a goal that is constantly being optimized in this field.

[0024] This application discloses a method for determining duration, which can be applied to terminal devices. Optionally, the terminal device may include portable electronic devices such as mobile phones and tablets, wearable devices such as smartwatches and smart bracelets, desktop electronic devices such as desktop TVs and desktop computers, or central control devices of smart furniture and vehicles, etc., and is not limited thereto.

[0025] Optionally, in response to an access command for a target network slice, the terminal device may obtain the remaining first available time of the target network slice and connect to the target network slice; record the first moment when the terminal device connects to the target network slice; and if it is detected that the terminal device disconnects from the target network slice, it may determine the target usage time based on the first moment when it connects to the target network slice and the second moment when it disconnects from the target network slice; and update the first available time based on the target usage time.

[0026] For example, please refer to Figure 1 , Figure 1 This is a schematic diagram of an application scenario disclosed in an embodiment of this application. Optionally, the terminal device 102 can establish a communication connection with the target server 104 corresponding to the target network slice; wherein, the target server 104 is mainly responsible for purchasing network slices, order management, and storing the available time of network slices.

[0027] Optionally, terminal device 102 may send an access request to target server 104. Upon receiving the access request, target server 104 may instruct the target network slice to establish a communication connection with terminal device 102. If it is necessary to disconnect from the target network slice, terminal device 102 may send a disconnect request to target server 104. Upon receiving the disconnect request, target server 104 may instruct the target network slice to disconnect from terminal device 102.

[0028] By implementing the embodiments of this application, the terminal device can determine the target usage time of the target network slice based on the first moment of accessing the target network slice and the second moment of disconnecting the target network slice. Then, it can update the remaining first available time of the target network slice according to the target usage time, so that the remaining first available time of the target network slice remains accurate. This facilitates the management of the available time of the network slice, and facilitates the billing of the network slice and the maintenance of the availability of the network slice.

[0029] Based on this, the duration determination method and apparatus, electronic device and computer program product disclosed in the embodiments of this application will be described below.

[0030] Please see Figure 2 , Figure 2 This is a flowchart illustrating a method for determining duration disclosed in an embodiment of this application. Optionally, this method can be applied to the terminal device described above, or other execution entities, and is not limited thereto. This application embodiment uses a terminal device as an example for illustration and should not be construed as limiting the scope of this application embodiment. Optionally, the method may include: 202. In response to the access command for the target network slice, obtain the remaining first available time of the target network slice and access the target network slice.

[0031] In this embodiment, the access command may be a first access command actively input by the user, a second access command initiated by the system of the terminal device, or a third access command initiated by the target application in the terminal device, and is not limited here.

[0032] Users can input the first access command according to their own usage needs.

[0033] Optionally, the terminal device's system may initiate a second access command if it determines that a target network slice exists; for example, the terminal device may initiate a second access command if it detects that it is currently in a network usage scenario that adapts to the target network slice.

[0034] Optionally, the target application can be an application whose network requirements match those of the target network slice; for example, if the target network slice has the characteristic of "low latency", then the target application can include an autonomous driving application that requires fast network response; and for example, if the target network slice has the characteristic of "low power consumption", then the target application can include a smart furniture application that requires power saving of the network, without limitation.

[0035] In this embodiment, if a terminal device wants to access a target network slice, it needs to request the available time of the target network slice. The remaining first available time of the target network slice is the total time that the terminal device can continue to access the target network slice.

[0036] In one alternative implementation, the terminal device may obtain the second available duration of the target network slice recorded in the local database as the first available duration.

[0037] Optionally, the terminal device can establish a local database. When the terminal device obtains the available time of the target network slice, it can store the obtained available time in the local database. In addition, after each disconnection from the target network slice, the terminal device can also store the remaining available time of the target network slice in the local database, which makes it convenient for the terminal device to directly query the available time of the target network slice locally, making it more convenient.

[0038] In another optional embodiment, the terminal device may obtain the third available time of the target network slice sent by the target server corresponding to the target network slice as the first available time.

[0039] In this embodiment, the target server may store the remaining available time of the target network slice. Optionally, the terminal device may send a time query request to the target server. Upon receiving the time query request, the target server may send first feedback information to the terminal device, which may include a third available time of the target network slice.

[0040] It should be noted that the data stored on the target server is usually more stable and accurate, thus the remaining availability time of the target network slice obtained from the target server is more accurate.

[0041] In this embodiment of the application, in response to an access instruction for a target network slice, the terminal device may send an access request to the target server corresponding to the target network slice; upon receiving the access request, the target server may instruct the target network slice to establish a connection with the terminal device according to the access request.

[0042] 204. Record the first moment when the terminal device accesses the target network slice.

[0043] In this embodiment of the application, when the terminal device successfully establishes a connection with the target network slice, the terminal device can record the current first moment in the local database, so as to facilitate subsequent querying of the first moment when the terminal device accessed the target network slice.

[0044] 206. If a disconnection is detected with the target network slice, the target usage duration is determined based on the first time point and the second time point at which the target network slice is disconnected.

[0045] In this embodiment, the terminal device can actively disconnect from the target network slice. For example, the terminal device can actively disconnect from the target network slice upon detecting a switching command for switching network slices or a disconnect command for disconnecting the target network slice.

[0046] In other embodiments, the target server may actively instruct the target network slice to disconnect from the terminal device. For example, the target server may actively instruct the target network slice to disconnect from the terminal device if the remaining first available time of the target network slice is less than or equal to a minimum time threshold; this is not limited here. The minimum time threshold can be set by developers based on extensive development experience, for example, 0 minutes, 5 minutes, etc., and is not limited here.

[0047] Optionally, when the terminal device detects a disconnection from the target network slice, it can record a second moment of disconnection from the target network slice, and then determine the target usage duration based on the recorded first and second moments of access to the target network slice. The target usage duration is used to characterize the total duration of the terminal device's access to the target network slice this time.

[0048] Optionally, the terminal device may calculate a first difference between the second time point and the first time point, and determine the first difference as the target usage duration.

[0049] 208. Update the first available time based on the target usage time.

[0050] In this embodiment of the application, the method by which the terminal device updates the first available time according to the target usage time may include: calculating a second difference between the first available time and the target usage time, and determining the second difference as the updated first available time.

[0051] For example, assuming the first available time is 90 minutes and the target usage time is 30 minutes, the updated first available time is 60 minutes, which is not limited here.

[0052] In one optional embodiment, after updating the first available time according to the target usage time, the terminal device can update the remaining available time of the target network slice stored in the local database of the terminal device to the updated first available time.

[0053] By implementing the above method, the terminal device can synchronize the updated first available time to the terminal device's local database, thereby ensuring the accuracy of the remaining available time of the target network slice stored in the local database and facilitating the query of the accurate remaining available time of the target network slice at any time.

[0054] As an optional implementation, the terminal device updates the remaining available time of the target network slice stored in the local database to the updated first available time; it can sort the multiple network slices stored in the local database according to the order of the remaining available time from most to least available to obtain a sorting result.

[0055] Optionally, when the terminal device detects a request to access a network slice, it can output the identifier information corresponding to the first network slice with the longest remaining available time based on the sorting result; in response to the second operation of selecting the first network slice, the terminal device can send an access request to the server corresponding to the first network slice to access the first network slice.

[0056] By implementing the above method, terminal devices can prioritize recommending users to access network slices with more remaining available time, thereby ensuring a long-term and stable connection with the network slice and improving the user's network experience.

[0057] In another optional embodiment, the terminal device can determine one or more second network slices with remaining available time less than the minimum time threshold based on the sorting results; and output application prompt information based on the second network slices, which is used to prompt the application for the available time of the second network slice.

[0058] Optionally, the terminal device may determine the historical access counts of one or more second network slices; and determine the second network slices whose historical access counts are greater than or equal to the access count threshold as target second network slices; and output application prompt information based on the target second network slices, which is used to indicate the available time for applying for the target second network slices.

[0059] By implementing the above method, the terminal device can remind the user to apply for the remaining available time of the network slice with a short available time, avoiding the situation where the network slice cannot be accessed later, thus improving the user experience.

[0060] By implementing the methods disclosed in the above embodiments, the terminal device can determine the target usage duration of the target network slice based on the first moment of accessing the target network slice and the second moment of disconnecting the target network slice. Then, it can update the remaining first available duration of the target network slice according to the target usage duration, ensuring the accuracy of the remaining first available duration and facilitating the management of the network slice's available duration. Furthermore, the remaining first available duration of the target network slice can be obtained from a local database or the target server, improving the flexibility of the method. Additionally, the terminal device can synchronize the updated first available duration to its local database, ensuring the accuracy of the remaining available duration of the target network slice stored in the local database and facilitating the retrieval of the accurate remaining available duration of the target network slice at any time.

[0061] Please see Figure 3 , Figure 3 This is a flowchart illustrating another method for determining duration disclosed in an embodiment of this application. Optionally, this method can be applied to the terminal device described above, or other execution entities, and is not limited thereto. This application embodiment uses a terminal device as an example for illustration and should not be construed as limiting the scope of this application embodiment. Optionally, the method may include: 302. In response to an access command for a target network slice, obtain the remaining second available time of the target network slice recorded in the local database.

[0062] 304. Obtain the remaining third available time of the target network slice sent by the target server corresponding to the target network slice.

[0063] As an optional implementation, when the terminal device obtains the remaining second available time of the target network slice recorded in the local database, it can determine whether the second available time is greater than the time threshold; if the second available time is greater than the time threshold, the terminal device can send a time query request to the target server corresponding to the target network slice. Receive the first feedback information sent by the target server based on the duration query request. The first feedback information includes the remaining third available duration of the target network slice, so as to obtain the remaining third available duration of the target network slice.

[0064] Optionally, the duration threshold can be set by developers based on extensive development experience. Typical values ​​may include -5 minutes, -1 minute, 0 minutes, 1 minute, or 5 minutes, etc., and are not limited here. In an optional embodiment, the duration threshold can be the minimum duration for which the target server allows a terminal device to access the target network slice. For example, if the minimum duration allowed by the target server is 0 minutes, then the terminal device is only allowed to access the target network slice if the second available duration is greater than 0 minutes. Only when the terminal device is allowed to access the target network slice is it necessary to subsequently query the remaining third available duration of the target network slice stored on the target server.

[0065] By implementing the above method, if the terminal device obtains the second available time from the local database as greater than the time threshold, it can determine that the terminal device can access the target network slice. Only then will it query the remaining third available time of the target network slice stored on the target server. This avoids situations where the terminal device may not be able to access the target network slice and still needs to query the remaining third available time of the target network slice stored on the target server. This can save the terminal device's power consumption and the transmission resources between the terminal device and the target server.

[0066] In another optional embodiment, if the second available duration is not greater than the duration threshold, the terminal device can output a prompt message to indicate the available duration for applying for the target network slice.

[0067] It should be noted that if the remaining second duration of the target network slice stored in the local database is not greater than the duration threshold, it indicates that the available duration of the target network slice that the terminal device can access has been exhausted or is about to be exhausted. In response, the terminal device can output a prompt message to remind the user to request the available duration of the target network slice. This can prevent the terminal device from being unable to access the target network slice, or from disconnecting from the target network slice after a short period of time, thus ensuring the stability of the terminal device's access to the target network slice and improving the user's network experience.

[0068] 306. The second available time is calibrated based on the third available time to obtain the first available time, and then connected to the target network slice.

[0069] In this embodiment of the application, considering that the remaining second available time of the target network slice recorded in the local database of the terminal device may be lost or inaccurate due to target influencing factors. Optionally, target influencing factors may include: the terminal device clearing local data, performing a factory reset causing the second available time to be lost, or storage errors, power outages, etc. causing errors in the second available time, which are not limited here.

[0070] Compared to the second available duration recorded in the local database of the terminal device, the target server is more stable, and therefore the third available duration of the target network slice stored therein is more accurate. The terminal device can use the third available duration of the target network slice sent by the target server to calibrate the second available duration and obtain the first available duration.

[0071] Optionally, the terminal device can determine whether the second available duration and the third available duration are the same; if they are the same, the second available duration or the third available duration can be determined as the first available duration. If they are different, the terminal device can determine the third available duration as the first available duration. Optionally, the terminal device can update the remaining second available duration of the target network slice stored in the local database to the third available duration.

[0072] By implementing the above method, the terminal device can calibrate the second available time stored in its local database based on the more accurate third available time sent by the target server, thereby improving the accuracy of the remaining first available time of the target network slice obtained subsequently; in addition, it can keep the data of the target server and the local database synchronized and consistent.

[0073] In this embodiment, the terminal device can access the target network slice when the third available time is greater than a time threshold. The fact that the third available time is greater than the time threshold indicates that after accessing the target network slice, the terminal device can maintain a connection with the target network slice for a relatively long period. This prevents the terminal device from disconnecting shortly after accessing the target network slice, thus improving the user's network experience.

[0074] In another optional embodiment, if the third available time is not greater than the time threshold, the terminal device can output a prompt message to indicate the available time for applying for the target network slice.

[0075] It should be noted that if the remaining third available time of the target network slice stored on the target server is not greater than the time threshold, it means that the available time of the target network slice that the terminal device can access has been exhausted or is about to be exhausted. In this case, the terminal device can output a prompt message to remind the user to request the available time of the target network slice. This can avoid the terminal device being unable to access the target network slice or disconnecting from the target network slice after a short period of time, thus ensuring the stability of the terminal device's access to the target network slice and improving the user's network experience.

[0076] 308. Record the first moment when the terminal device accesses the target network slice.

[0077] 310. If a disconnection is detected with the target network slice, the target usage duration is determined based on the first time point and the second time point at which the target network slice is disconnected.

[0078] As an optional implementation, the terminal device can send a disconnect request to the target server corresponding to the target network slice. The disconnect request is used to request to disconnect from the target network slice. Upon receiving the disconnect request, the target server can instruct the target network slice to disconnect from the terminal device and monitor whether the disconnection is successful.

[0079] If the disconnection is successful, the target server can send a sixth feedback message to the terminal device; the sixth feedback message indicates that the connection with the target network slice has been successfully disconnected; upon receiving the sixth feedback message, the terminal device can record the second moment of disconnection of the target network slice.

[0080] If the disconnection fails, the target server can send a fourth feedback message to the terminal device; the terminal device receives the fourth feedback message sent by the target server; if the fourth feedback message indicates that the disconnection from the target network slice failed, the terminal device can increment the second request count by one. The second request count can represent the number of times the terminal device has historically requested to disconnect from the target network slice. Optionally, the second request count can be counted by a counter within the terminal device, which is not limited here.

[0081] Optionally, if the current number of second requests is less than the second number threshold, the terminal device can resend a disconnect request to the target server corresponding to the target network slice to retry disconnecting the connection with the target network slice.

[0082] The threshold for the second count can be set by the developers based on extensive development experience. Typical values ​​may include 2, 3, or 6 times, etc., and are not limited here.

[0083] By implementing the above method, the terminal device can repeatedly send a disconnection request to the target server corresponding to the target network slice if it fails to disconnect from the target network slice, thereby increasing the probability of the terminal device disconnecting from the target network slice and improving the flexibility of the method.

[0084] In another alternative embodiment, if the current number of second applications reaches the second number threshold, the terminal device can take the current third moment as the second moment of disconnecting the target network slice, and perform the step of determining the target usage duration based on the first moment and the second moment of disconnecting the target network slice.

[0085] If the current second request count reaches the second threshold, it means that the terminal device has repeatedly requested disconnection from the target server without success. In this case, the terminal device can directly use the current third moment as the second moment of disconnection from the target network slice, which facilitates the subsequent calculation of the target usage time. It can also avoid the terminal device getting stuck in a loop of repeatedly sending disconnection requests, saving the terminal device's power consumption and the transmission resources between the terminal device and the target server.

[0086] Optionally, after successfully disconnecting from the target network slice, the terminal device determines the target usage duration based on the first time and the second time of disconnection; or, the terminal device takes the current third time as the second time of disconnection and, after determining the target usage duration based on the first time and the second time of disconnection, can reset the second application count to zero to avoid affecting the counting result of the next time.

[0087] 312. Update the first available time based on the target usage time.

[0088] By implementing the methods disclosed in the above embodiments, the terminal device can determine the target usage duration of the target network slice access based on the first moment of accessing the target network slice and the second moment of disconnecting the target network slice. Then, it can update the remaining first available duration of the target network slice based on the target usage duration to ensure the accuracy of the remaining first available duration, thereby facilitating the management of the network slice's available duration. Furthermore, if the second available duration obtained from the local database is greater than a duration threshold, it can determine that the terminal device can access the target network slice before querying the remaining third available duration of the target network slice stored on the target server. This avoids situations where the terminal device may not be able to access the target network slice and still needs to query the remaining third available duration stored on the target server, thereby saving power consumption and transmission resources between the terminal device and the target server. Additionally, the second available duration stored in the terminal device's local database can be calibrated based on a more accurate third available duration sent by the target server, thereby improving the accuracy of the subsequently obtained remaining first available duration of the target network slice. The system can output prompts to users indicating the available time of the target network slice, thus preventing situations where terminal devices cannot access the target network slice or disconnect after a short period of access, ensuring the stability of terminal device access to the target network slice and improving the user's network experience. Furthermore, if disconnection fails, the system can repeatedly send disconnection requests to the target server corresponding to the target network slice, increasing the probability of disconnection and enhancing the flexibility of the method. Additionally, if the current second request count reaches the second threshold, it indicates that the terminal device has repeatedly requested disconnection from the target server without success. In this case, the terminal device can directly use the current third moment as the second moment of disconnection from the target network slice, facilitating subsequent calculations of the target usage time and preventing the terminal device from getting stuck in a loop of repeatedly sending disconnection requests, thus saving power consumption and transmission resources between the terminal device and the target server.

[0089] Please see Figure 4 , Figure 4 This is a flowchart illustrating another method for determining duration disclosed in this application. Optionally, this method can be applied to the terminal device described above, or other execution entities, and is not limited thereto. This application uses a terminal device as an example for illustration and should not be construed as limiting the scope of this application. Optionally, the method may include: 402. In response to an access command for a target network slice, if the terminal device has never accessed the target network slice in the past, a prompt message is output, which is used to indicate the available time for applying for the target network slice.

[0090] In this embodiment of the application, the terminal device can determine whether it has accessed the target network slice in the past in response to the access command for the target network slice.

[0091] If the terminal device has never accessed the target network slice in the past, it may not have applied for the available time of the target network slice. In this case, the terminal device can output a prompt message to remind the user to apply for the available time of the target network slice.

[0092] By implementing the above method, when the terminal device determines that it is establishing a connection with the target network slice for the first time, it can prompt the user to apply for the available time of the template network slice, thereby ensuring that the terminal device can access the target network slice normally in the future, thus improving the user experience.

[0093] In an optional embodiment, considering that the terminal device may have already applied for the available time of the target network slice, but has not yet accessed the target network slice; in this case, if the terminal device determines that it has not accessed the target network slice in the past, it can obtain the first available time remaining of the target network slice; if the first available time remaining of the target network slice is less than the time threshold, the terminal device outputs a prompt message.

[0094] By implementing the above method, the terminal device can output a prompt message only after further determining that the remaining first available time of the target network slice is less than the time threshold. This avoids repeatedly prompting the user to apply for the available time of the target network slice, which would otherwise affect the user and improve the user experience.

[0095] 404. In response to the first triggered operation, a request is sent to the target server corresponding to the target network slice. The request is used to request the available duration of the target network slice.

[0096] In this embodiment of the application, after the terminal device outputs a prompt message, the user can trigger a first operation based on the prompt message to trigger the terminal device to send an application request to the target server corresponding to the target network slice.

[0097] Optionally, the prompt information may include guidance information to trigger the first operation, thereby facilitating the user to initiate the first operation. Optionally, the first operation may include triggering virtual buttons, inputting voice information representing the requested available time, etc., which are not limited here.

[0098] In this embodiment of the application, the application request may include one or more of the following: the first identification information of the terminal device, the second identification information corresponding to the target network slice, and the application duration, which are not limited here.

[0099] The application duration refers to the available time of the target network slice to be applied for, such as 2 hours, 24 hours, 3 days, 1 week, etc., which is not limited here. The application duration can be user-defined or a preset fixed duration, which is not limited here.

[0100] Optionally, upon receiving an application request, the target server can generate an application order based on the application request and synchronize the application order to the access devices of the target network slice (e.g., core network, base station) to facilitate the access devices in managing the target network slice.

[0101] Optionally, the target server can store the terminal device's first identification information, the second identification information corresponding to the target network slice, and the successfully applied available duration on the target server for easy subsequent querying.

[0102] Optionally, the target server may send a second feedback message to the terminal device based on the application result. The application result may include one or more of the following: whether the application was successful, the first available time period successfully applied for, and the usage period of the first available time period, which is not limited here. The usage period refers to the validity period of the first available time period. For example, if the terminal device applies for 2 hours of available time with a usage period of 1 week, then the terminal device can only use this 2 hours of available time within 1 week.

[0103] 406. Receive the second feedback information sent by the target server and access the target network slice. The second feedback information is used to indicate the first available duration of the successfully applied target network slice.

[0104] In this embodiment of the application, after receiving the second feedback information and determining that the terminal device has successfully applied for the first available time of the target network slice, it can initiate an access request to the target server to access the target network slice.

[0105] In another optional implementation, if the terminal device receives a third feedback message sent by the target server, it can increment the first application count by one based on the third feedback message; wherein the third feedback message is used to indicate that the application for the available time of the target network slice has failed.

[0106] The first request count is used to characterize the number of times the terminal device has sent request requests to the target server in its history. Optionally, the first request count can be counted by a counter within the terminal device, which is not limited here.

[0107] Optionally, the terminal device can determine whether the number of first applications is less than the threshold for the first time; if the number of first applications is less than the threshold for the first time, the terminal device can resend the application request to the target server.

[0108] By implementing the above method, if the terminal device fails to apply for the available time of the target network slice from the target server, it can repeatedly send the application request to the target server, thereby increasing the probability that the terminal device will obtain the available time of the target network slice, improving the flexibility of the method and the user experience.

[0109] In another embodiment, if the number of first applications is not less than the threshold number of the first application, the terminal device can stop sending application requests to the target server to avoid the terminal device getting stuck in a loop of repeatedly sending application requests to the target server, thereby saving the power consumption of the terminal device and the transmission resources between the terminal device and the target server.

[0110] Optionally, if the number of first applications is not less than the threshold for the first application, the terminal device may also output a reminder message. This reminder message is used to notify the user that the available time of the target network slice has failed, so that the user is aware of the application failure and can find a solution to the application failure.

[0111] Optionally, the terminal device can store the initial available duration and application information of the target network slice in its local database for easy retrieval later. The application information indicates the available duration of the target network slice successfully applied for by the terminal device.

[0112] In an alternative embodiment, the application information can also be used to indicate whether the user refuses to apply for the available time of the target network slice.

[0113] In one alternative implementation, if the terminal device is not accessing the target network slice for the first time, the terminal device can obtain the application information corresponding to the target network slice; if the application information indicates the available time of the target network slice successfully applied for by the terminal device, then the remaining first available time of the target network slice is obtained.

[0114] In another embodiment, if the application information indicates that the user has not refused to apply for the available time of the target network slice, then the remaining first available time of the target network slice can be obtained.

[0115] By implementing the above method, the terminal device can first determine whether it has successfully applied for the available time of the target network slice before by checking the application information stored in the local database. If so, it means that the terminal device has the available time of the target network slice, and can then obtain the remaining first available time of the target network slice. This avoids the situation where the terminal device does not have the available time of the target network slice, and thus reduces the amount of computation and saves the power consumption of the terminal device.

[0116] 408. Record the first moment when the terminal device accesses the target network slice.

[0117] 410. If a disconnection is detected with the target network slice, the target usage duration is determined based on the first time point and the second time point at which the target network slice is disconnected.

[0118] 412. Update the first available time based on the target usage time.

[0119] By implementing the methods disclosed in the above embodiments, the terminal device can determine the target usage duration of the target network slice based on the first moment of accessing the target network slice and the second moment of disconnecting the target network slice. It can then update the remaining first available duration of the target network slice based on the target usage duration, ensuring the accuracy of the remaining first available duration and facilitating the management of the network slice's available duration. Furthermore, if the terminal device determines that this is the first time it has established a connection with the target network slice, it can prompt the user to apply for the available duration of a template network slice, ensuring that subsequent terminal devices can access the target network slice normally, thereby improving the user experience. Additionally, if the terminal device fails to apply for the available duration of the target network slice from the target server, it can repeatedly send application requests to the target server to increase the probability of successfully applying for the available duration of the target network slice, improving the flexibility of the method and the user experience. Finally, the terminal device can store the first available duration of the target network slice and the application information in its local database for easy retrieval later. The terminal device can first determine whether it has successfully applied for the available time of the target network slice before by checking the application information stored in the local database. If so, it means that the terminal device has the available time of the target network slice, and can then obtain the remaining first available time of the target network slice. This avoids the situation where the terminal device does not have the available time of the target network slice, and thus reduces the amount of computation and saves the power consumption of the terminal device.

[0120] Please see Figure 5 , Figure 5 This is a flowchart illustrating another method for determining duration disclosed in this application. Optionally, this method can be applied to the target server described above, or other execution entities, and is not limited thereto. This application uses a target server as an example for illustration and should not be construed as limiting the scope of this application. Optionally, the method may include: 502. Receive the access request sent by the terminal device, and instruct the target network slice to establish a connection with the terminal device according to the access request. The access request is used to apply for establishing a connection with the target network slice.

[0121] 504. Received a disconnect request from the terminal device.

[0122] 506. Based on the disconnection request, the target network slice is instructed to disconnect from the terminal device, and a fifth feedback message is sent to the terminal device. The fifth feedback message indicates that the target network slice has successfully disconnected from the terminal device. The fifth feedback message is used to enable the terminal device to determine the target usage duration based on the first moment when the terminal device accesses the target network slice and the second moment when the target network slice is disconnected, and to update the first available duration based on the target usage duration.

[0123] By implementing the above embodiments, when the target server receives an access request to establish a connection with the target network slice, it can instruct the target network slice to establish a connection with the terminal device; and when it receives a disconnection request from the terminal device, it can instruct the target network slice to disconnect from the terminal device and send fifth feedback information to the terminal device. The fifth feedback information indicates that the target network slice has successfully disconnected from the terminal device. The fifth feedback information is used to enable the terminal device to determine the target usage duration based on the first moment of accessing the target network slice and the second moment of disconnecting the target network slice, and to update the first available duration based on the target usage duration. It is evident that by implementing the embodiments of this application, the terminal device can determine the target usage duration of its current access to the target network slice based on the first moment of accessing the target network slice and the second moment of disconnecting the target network slice, and then update the remaining first available duration of the target network slice based on the target usage duration, so that the remaining first available duration of the target network slice remains accurate, thereby facilitating the management of the available duration of the network slice.

[0124] To more clearly describe the duration determination method disclosed in the embodiments of this application, the following will be combined with... Figure 6 The methodology and process are explained. Figure 6 This is a schematic diagram of a method process disclosed in an embodiment of this application. Wherein: 602. After the initialization is complete, monitor the network slice status changes. If you are ready to connect to the network slice, execute 604; if you are ready to disconnect the network slice, execute 632.

[0125] 604. Prepare to connect to the network slice; if this is the first time establishing a connection, proceed to 606; if this is not the first time establishing a connection, proceed to 622.

[0126] 606. Output a prompt message indicating the available time for the requested network slice; if the application is approved, proceed to step 608; if the application is rejected, proceed to step 620.

[0127] 608. Send an application request to the server corresponding to the network slice to request the available duration of the network slice; if the server reports a successful application, proceed to step 610; if the server reports a failed application, proceed to step 612.

[0128] 610. Store the requested available duration in the local database and execute 614.

[0129] 612. Resend the request to the server corresponding to the network slice and increment the first request count by one; if the first request count is less than the threshold, execute 608; if the first request count is not less than the threshold, do nothing.

[0130] 614. Send an access request to the server corresponding to the network slice; if the connection is established successfully, proceed to step 616; if the connection fails, proceed to step 618.

[0131] 616. Record the first moment of accessing the network slice.

[0132] 618. Resend the access request to the server corresponding to the network slice; and increment the second request count by one; if the second request count is less than the threshold, then execute 614; if the first request count is not less than the threshold, then no action is taken.

[0133] 620. Record the rejected application in the local database.

[0134] 622. Check the local database to see if the application is rejected; if yes, take no action; if no, proceed to step 624.

[0135] 624. Query the local database for the remaining second available time of the network slice; if the second available time is greater than 0, then execute 626; if the second available time is less than or equal to 0, then execute 606.

[0136] 626. Send a duration query request to the server corresponding to the network slice and receive the remaining third available duration of the network slice from the server; if the third available duration is greater than 0, then execute 614; if the third available duration is less than or equal to 0, then execute 606.

[0137] 628. Compare the second and third available time durations; if they match, no action is taken; if they do not match, proceed to step 630.

[0138] 630. Update the remaining second available time of the network slice stored in the local database to the third available time.

[0139] 632. Send a disconnect request to the server corresponding to the network slice and receive the feedback result sent by the server; if the disconnection is successful, execute 634; if the disconnection fails, repeat 632; and if the number of repetitions reaches the threshold, record the current third time and update the remaining available time of the network slice at the first and third times.

[0140] 634. Record the second moment when the network slice is disconnected.

[0141] 636. Update the remaining available time of the network slice based on the first and second time points.

[0142] Please see Figure 7 , Figure 7 This is a schematic diagram of a duration determination device disclosed in an embodiment of this application. Optionally, this device can be applied to the terminal device described above, or other execution entities, and is not limited thereto. This application embodiment uses a terminal device as an example for illustration and should not be construed as limiting the scope of this application embodiment. Optionally, the device may include an acquisition unit 702, a recording unit 704, a determination unit 706, and an update unit 708, wherein: The acquisition unit 702 is configured to, in response to an access command for a target network slice, acquire the remaining first available time of the target network slice and access the target network slice. Recording unit 704 is used to record the first moment when the terminal device accesses the target network slice; The determining unit 706 is used to determine the target usage duration based on a first time and a second time when the connection with the target network slice is disconnected, in the event that a disconnection with the target network slice is detected. Update unit 708 is used to update the first available time according to the target usage time.

[0143] By implementing the above-mentioned device, the terminal device can determine the target usage time of the target network slice based on the first moment of accessing the target network slice and the second moment of disconnecting the target network slice. Then, it can update the remaining first available time of the target network slice according to the target usage time, so as to keep the remaining first available time of the target network slice accurate, thereby facilitating the management of the available time of the network slice.

[0144] As an optional implementation, the acquisition unit 702 is further configured to acquire the remaining second available duration of the target network slice recorded in the local database as the first available duration; and / or acquire the remaining third available duration of the target network slice sent by the target server corresponding to the target network slice as the first available duration.

[0145] By implementing the above apparatus, the remaining first available time of the target network slice can be obtained from a local database or the target server, which improves the flexibility of the method.

[0146] As an optional implementation, the acquisition unit 702 is further configured to acquire the remaining second available duration of the target network slice recorded in the local database; and to acquire the remaining third available duration of the target network slice sent by the target server corresponding to the target network slice; and to calibrate the second available duration based on the third available duration to obtain the first available duration.

[0147] By implementing the above-mentioned device, the terminal device can calibrate the second available time stored in the local database of the terminal device based on the more accurate third available time sent by the target server, thereby improving the accuracy of the remaining first available time of the target network slice obtained subsequently.

[0148] As an optional implementation, the acquisition unit 702 is further configured to send a duration query request to the target server corresponding to the target network slice when the second available duration is greater than the duration threshold; and to receive first feedback information sent by the target server according to the duration query request, the first feedback information including the remaining third available duration of the target network slice.

[0149] By implementing the above device, if the terminal device obtains a second available duration from the local database that is greater than the duration threshold, it can determine that the terminal device can access the target network slice. Only then will it query the remaining third available duration of the target network slice stored on the target server. This avoids situations where the terminal device may not be able to access the target network slice and still needs to query the remaining third available duration of the target network slice stored on the target server. This can save the power consumption of the terminal device and the transmission resources between the terminal device and the target server.

[0150] As an optional implementation method, Figure 7 The illustrated device may also include an output unit (not shown), wherein: The output unit is used to output a prompt message when the second available time and / or the third available time is not greater than the time threshold. The prompt message is used to indicate the available time for applying for the target network slice.

[0151] If, after implementing the above device, the remaining third available time of the target network slice stored on the target server is not greater than the time threshold, it indicates that the available time of the target network slice that the terminal device can access has been exhausted or is about to be exhausted. In response, the terminal device can output a prompt message to remind the user to request available time of the target network slice. This can prevent the terminal device from being unable to access the target network slice or from disconnecting from the target network slice within a short period of time, thus ensuring the stability of the terminal device's access to the target network slice and improving the user's network experience.

[0152] As an optional implementation method, Figure 7 The apparatus shown may also include a claim unit (not shown), wherein: The application unit is used to respond to an access command for a target network slice. If the terminal device has never accessed the target network slice in the past, it outputs a prompt message to indicate the available duration of the target network slice. In response to the triggered first operation, it sends an application request to the target server corresponding to the target network slice. The application request is used to request the available duration of the target network slice. The acquisition unit 702 is also used to receive second feedback information sent by the target server, the second feedback information being used to indicate the first available duration of the successfully applied target network slice.

[0153] By implementing the above device, when the terminal device determines that it is establishing a connection with the target network slice for the first time, it can prompt the user to apply for the available time of the template network slice, thereby ensuring that the terminal device can access the target network slice normally in the future, thus improving the user experience.

[0154] As an optional implementation method, Figure 7 The illustrated apparatus may further include a first retransmission unit (not shown), wherein: The first retransmission unit is configured to receive a third feedback message sent by the target server after sending an application request to the server, the third feedback message indicating that the application for the available time of the target network slice failed; and, based on the third feedback message, increment the first application count by one; and, if the current first application count is less than the first count threshold, re-execute the step of sending an application request to the target server corresponding to the target network slice.

[0155] By implementing the above-described device, if the terminal device fails to apply for the available time of the target network slice from the target server, it can repeatedly send the application request to the target server, thereby increasing the probability that the terminal device will obtain the available time of the target network slice, improving the flexibility of the method and the user experience.

[0156] As an optional implementation method, Figure 7 The illustrated device may also include a storage unit (not shown), wherein: The storage unit is used to store the first available time and application information in the local database of the terminal device. The application information is used to indicate the available time of the target network slice when the terminal device successfully applies for it.

[0157] By implementing the above-mentioned device, the terminal device can store the first available duration and application information of the target network slice in the local database of the terminal device for easy retrieval at any time.

[0158] As an optional implementation, the acquisition unit 702 is further configured to acquire application information corresponding to the target network slice when the terminal device is not accessing the target network slice for the first time; and if the application information indicates the available time of the target network slice successfully applied by the terminal device, then acquire the remaining first available time of the target network slice.

[0159] By implementing the above device, the terminal device can first determine whether it has successfully applied for the available time of the target network slice before by checking the application information stored in the local database. If so, it means that the terminal device has the available time of the target network slice, and can then obtain the remaining first available time of the target network slice. This avoids the situation where the terminal device does not have the available time of the target network slice, and thus reduces the amount of computation and saves the power consumption of the terminal device.

[0160] As an optional implementation method, Figure 7 The illustrated device may also include a second retransmission unit (not shown), wherein: The second retransmission unit is configured to, after accessing the target network slice, send a disconnect request to the target server corresponding to the target network slice, the disconnect request being used to request disconnection from the target network slice; and receive a fourth feedback information sent by the target server; and, if the fourth feedback information indicates that disconnection from the target network slice has failed, increment the second request count by one; and, if the current second request count is less than the second count threshold, re-execute the request to send a disconnect request to the target server corresponding to the target network slice.

[0161] By implementing the above-described apparatus, the terminal device can repeatedly send a disconnection request to the target server corresponding to the target network slice if it fails to disconnect from the target network slice, thereby increasing the probability of the terminal device disconnecting from the target network slice and improving the flexibility of the method.

[0162] As an optional implementation, the determining unit 706 is further configured to, when the current second application count reaches the second number threshold, take the current third time as the second time to disconnect the target network slice, and perform the step of determining the target usage duration based on the first time and the second time to disconnect the target network slice.

[0163] If the current second application count reaches the second threshold, it means that the terminal device has repeatedly requested disconnection from the target server without success. In this case, the terminal device can directly take the current third moment as the second moment of disconnection from the target network slice, so as to facilitate the subsequent calculation of the target usage time. It can also avoid the terminal device getting stuck in a loop of repeatedly sending disconnection requests, saving the power consumption of the terminal device and the transmission resources between the terminal device and the target server.

[0164] As an optional implementation method, Figure 7 The apparatus shown may also include an update unit (not shown), wherein: The update unit is used to update the remaining available time of the target network slice stored in the local database of the terminal device to the updated first available time after updating the first available time according to the target usage time.

[0165] By implementing the above device, the terminal device can synchronize the updated first available time to the local database of the terminal device, thereby ensuring the accuracy of the remaining available time of the target network slice stored in the local database and making it convenient to query the accurate remaining available time of the target network slice at any time.

[0166] Please see Figure 8 , Figure 8 This is a schematic diagram of another duration determination device disclosed in an embodiment of this application. Optionally, this device can be applied to the target server described above, or other execution entities, and is not limited thereto. This application embodiment uses a target server as an example for illustration and should not be construed as limiting the scope of this application embodiment. Optionally, the device may include a first receiving unit 802, a second receiving unit 804, and a sending unit 806, wherein: The first receiving unit 802 is used to receive an access request sent by the terminal device, and to instruct the target network slice to establish a connection with the terminal device according to the access request. The access request is used to apply for establishing a connection with the target network slice. The second receiving unit 804 is used to receive a disconnection request sent by the terminal device; The sending unit 806 is used to instruct the target network slice to disconnect from the terminal device according to the disconnection request, and to send a fifth feedback information to the terminal device. The fifth feedback information indicates that the target network slice has successfully disconnected from the terminal device. The fifth feedback information is used to enable the terminal device to determine the target usage time based on the first moment when the terminal device accesses the target network slice and the second moment when the target network slice is disconnected, and to update the first available time based on the target usage time.

[0167] By implementing the above apparatus, when the target server receives an access request to establish a connection with the target network slice, it can instruct the target network slice to establish a connection with the terminal device; and when it receives a disconnection request from the terminal device, it can instruct the target network slice to disconnect from the terminal device and send fifth feedback information to the terminal device. The fifth feedback information indicates that the target network slice has successfully disconnected from the terminal device. The fifth feedback information is used to enable the terminal device to determine the target usage duration based on the first moment of accessing the target network slice and the second moment of disconnecting the target network slice, and to update the first available duration based on the target usage duration. Therefore, by implementing the embodiments of this application, the terminal device can determine the target usage duration of its current access to the target network slice based on the first moment of accessing the target network slice and the second moment of disconnecting the target network slice, and then update the remaining first available duration of the target network slice based on the target usage duration, so that the remaining first available duration of the target network slice remains accurate, thereby facilitating the management of the available duration of the network slice.

[0168] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of another electronic device disclosed in an embodiment of this application. Figure 9 As shown, the electronic device may include: a memory 901 storing executable program code; and a processor 902 coupled to the memory 901; The processor 902 calls the executable program code stored in the memory 901 to execute the duration determination method disclosed in the above embodiments for use in terminal devices or servers.

[0169] This application discloses a computer-readable storage medium storing a computer program that causes a computer to execute the duration determination method disclosed in the above embodiments for use in terminal devices or servers.

[0170] This application discloses another electronic device. The electronic device may include: a memory storing executable program code; and a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the power-on control method for electronic devices disclosed in the above embodiments.

[0171] This application discloses another computer-readable storage medium storing a computer program that causes a computer to execute the power-on control method for electronic devices disclosed in the above embodiments.

[0172] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compactdisc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0173] The duration determination method, apparatus, electronic device, and computer program product disclosed in the embodiments of this application have been described in detail above. 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 methods 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 ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for determining duration, characterized in that, Applied to a terminal device, the method includes: In response to an access command for a target network slice, obtain the remaining first available time of the target network slice and access the target network slice; Record the first moment when the terminal device accesses the target network slice; If a disconnection from the target network slice is detected, the target usage duration is determined based on the first time point and the second time point at which the target network slice is disconnected. The first available time is updated based on the target usage time.

2. The method according to claim 1, characterized in that, The step of obtaining the remaining first available time of the target network slice includes: Obtain the remaining second available time of the target network slice recorded in the local database as the first available time; and / or, The remaining third available time of the target network slice, sent by the target server corresponding to the target network slice, is used as the first available time.

3. The method according to claim 1, characterized in that, The step of obtaining the remaining first available time of the target network slice includes: Obtain the remaining second available time of the target network slice as recorded in the local database; Obtain the remaining third available time of the target network slice sent by the target server corresponding to the target network slice; The second available time is calibrated based on the third available time to obtain the first available time.

4. The method according to claim 3, characterized in that, The step of obtaining the remaining third available time of the target network slice sent by the target server corresponding to the target network slice includes: If the second available duration is greater than the duration threshold, a duration query request is sent to the target server corresponding to the target network slice; The system receives first feedback information sent by the target server based on the duration query request, wherein the first feedback information includes the remaining third available duration of the target network slice.

5. The method according to any one of claims 2 to 4, characterized in that, The method further includes: If the second available duration and / or the third available duration is not greater than the duration threshold, a prompt message is output, which is used to prompt the user to apply for the available duration of the target network slice.

6. The method according to claim 1, characterized in that, Before obtaining the remaining first available time of the target network slice, the method further includes: In response to an access command for a target network slice, if the terminal device has never accessed the target network slice in the past, a prompt message is output, which is used to indicate the available time for applying for the target network slice; In response to the triggered first operation, a request is sent to the target server corresponding to the target network slice, the request being used to request the available time of the target network slice; The step of obtaining the remaining first available time of the target network slice includes: Receive a second feedback message sent by the target server, the second feedback message being used to indicate the first available duration of the successfully applied target network slice.

7. The method according to claim 6, characterized in that, After sending the request to the server, the method further includes: Receive third feedback information sent by the target server, the third feedback information being used to indicate that the application for the available time of the target network slice failed; Based on the third feedback information, the number of first applications will be incremented by one; If the current number of first applications is less than the threshold for the first application, then the step of sending an application request to the target server corresponding to the target network slice is executed again.

8. The method according to claim 6, characterized in that, The method further includes: The first available time and application information are stored in the local database of the terminal device, and the application information is used to indicate that the terminal device has successfully applied for the available time of the target network slice.

9. The method according to claim 1, characterized in that, The step of obtaining the remaining first available time of the target network slice includes: If the terminal device is not accessing the target network slice for the first time, then the application information corresponding to the target network slice is obtained; If the application information indicates that the terminal device has successfully applied for the available time of the target network slice, then the remaining first available time of the target network slice is obtained.

10. The method according to claim 1, characterized in that, After accessing the target network slice, the method further includes: Send a disconnect request to the target server corresponding to the target network slice, the disconnect request being used to request to disconnect from the target network slice; Receive the fourth feedback information sent by the target server; If the fourth feedback information indicates that the connection with the target network slice has failed, then the second application count is incremented by one; If the current number of second requests is less than the threshold for the second request, then the request to send a disconnect request to the target server corresponding to the target network slice is executed again.

11. The method according to claim 10, characterized in that, The method further includes: If the current second application count reaches the second count threshold, then the current third moment is taken as the second moment of disconnecting the target network slice, and the step of determining the target usage duration based on the first moment and the second moment of disconnecting the target network slice is executed.

12. The method according to claim 1, characterized in that, After updating the first available time according to the target usage time, the method further includes: The remaining available time of the target network slice stored in the local database of the terminal device is updated to the updated first available time.

13. A method for determining duration, characterized in that, The method, applied to a server corresponding to a target network slice, includes: The system receives an access request sent by a terminal device and instructs the target network slice to establish a connection with the terminal device according to the access request. The access request is used to request the establishment of a connection with the target network slice. Receive a disconnect request sent by the terminal device; The disconnection request instructs the target network slice to disconnect from the terminal device and sends a fifth feedback message to the terminal device. The fifth feedback message indicates that the target network slice has successfully disconnected from the terminal device. The fifth feedback message is used to enable the terminal device to determine the target usage duration based on the first moment when the terminal device accesses the target network slice and the second moment when it disconnects the target network slice, and to update the first available duration based on the target usage duration.

14. A duration determining device, characterized in that, Applied to a terminal device, the device includes: The acquisition unit is configured to, in response to an access command for a target network slice, acquire the remaining first available time of the target network slice and access the target network slice; A recording unit is used to record the first moment when the terminal device accesses the target network slice; A determining unit is configured to determine the target usage duration based on a first time point and a second time point when the connection with the target network slice is detected to be disconnected. An update unit is used to update the first available time according to the target usage time.

15. A duration determining device, characterized in that, The device is applied to a server corresponding to a target network slice, and includes: The first receiving unit is configured to receive an access request sent by a terminal device, and instruct the target network slice to establish a connection with the terminal device according to the access request, wherein the access request is used to request to establish a connection with the target network slice; The second receiving unit is used to receive the disconnection request sent by the terminal device; The sending unit is configured to instruct the target network slice to disconnect from the terminal device according to the disconnection request, and send fifth feedback information to the terminal device. The fifth feedback information indicates that the target network slice has successfully disconnected from the terminal device. The fifth feedback information is used to enable the terminal device to determine the target usage duration based on the first time when the terminal device accesses the target network slice and the second time when it disconnects the target network slice, and to update the first available duration based on the target usage duration.

16. An electronic device, characterized in that, The method includes a memory storing executable program code and a processor coupled to the memory; wherein the processor invokes the executable program code stored in the memory to perform the method as described in any one of claims 1 to 12 or 13.

17. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 12 or 13.