Network unlocking methods, devices, electronic devices, and computer-readable storage media

CN122579271APending Publication Date: 2026-08-14SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Benefits of technology

[0017]综上,本申请实施例记录首次激活时间以及最新有效时间,该最新有效时间是最近一次从可信服务器更新得到,在该最新有效时间更新时调度计时器开始计时得到本地计时时间,若记录的该最新有效时间无法从可信服务器更新时,则根据该最新有效时间和计时得到的本地计时时间生成参考基准时间,获取当前网络时间,并根据该当前网络时间、参考基准时间和首次激活时间对网络进行解锁控制。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122579271A_ABST
    Figure CN122579271A_ABST
Patent Text Reader

Abstract

This application discloses a network unlocking method, apparatus, electronic device, and computer-readable storage medium, relating to the field of communication technology. The method includes: recording the initial activation time and the latest valid time, wherein the latest valid time is obtained from the most recent update from a trusted server; scheduling a timer to start counting when the latest valid time is updated to obtain a local time; if the recorded latest valid time cannot be updated from the trusted server, generating a reference time based on the latest valid time and the locally timed time; obtaining the current network time; and performing network unlocking control based on the current network time, the reference time, and the initial activation time. When a trusted time cannot be obtained from a trusted server for device network unlocking control, obtaining the real-time current network time and using a timing method to assist in determining the device's network unlocking conditions improves the accuracy of unlocking control.
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 network unlocking method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] In the mobile communications field, contract phones or subsidized phones sold by operators are typically bound to the operator's network to encourage users to continue using the operator's communication services after purchase. This binding is usually achieved through network locking or SIM locking mechanisms, meaning the device can only access the network using a specific operator's SIM card and cannot use SIM cards from other operators. With changing regulatory requirements, some countries and regions require operators to automatically remove network locking restrictions after a predetermined activation period, and this unlocking process should not require user intervention. Therefore, the device needs to have the ability to automatically determine whether the unlocking conditions are met and execute the unlocking.

[0003] In existing technologies, when a terminal has a data connection, it can typically query the operator's backend server to determine its unlock eligibility. The server then returns a result regarding whether unlocking is permitted based on information such as the terminal's activation time. However, when the terminal is offline, such as when the user has stopped data service, is in a data roaming environment, or the inserted SIM card cannot establish a data connection, the terminal cannot access the backend server, making it difficult to complete the unlocking determination online.

[0004] Therefore, how to accurately determine the unlocking conditions and perform automatic unlocking when the terminal has no network connection is a technical problem that needs to be solved. Summary of the Invention

[0005] This application provides a network unlocking method, apparatus, electronic device, and computer-readable storage medium, which can control the network unlocking of devices more accurately.

[0006] In a first aspect, embodiments of this application provide a network unlocking method, the method comprising: Record the first activation time and the latest validity time, wherein the latest validity time is the most recent update obtained from the trusted server; When the latest valid time is updated, the scheduler starts counting to obtain the local timing time; If the latest valid time recorded cannot be updated from the trusted server, a reference base time is generated based on the latest valid time and the local time. Obtain the current network time, and control the network to unlock based on the current network time, the reference time, and the first activation time.

[0007] Secondly, embodiments of this application also provide a network unlocking device, the device comprising: The recording module is used to record the first activation time and the latest valid time, wherein the latest valid time is obtained from the most recent update from the trusted server; The timing module is used to schedule a timer to start timing and obtain the local timing time when the latest valid time is updated; A generation module is used to generate a reference base time based on the latest valid time and the local time if the recorded latest valid time cannot be updated from the trusted server. The control module is used to obtain the current network time and control the network to unlock based on the current network time, the reference time, and the first activation time.

[0008] Optionally, in some embodiments of this application, generating a reference time based on the latest valid time and the local time includes: The reference time is obtained by summing the latest valid time and the local time. Alternatively, the local timing time can be weighted according to a preset weight to obtain a weighted timing time, and the latest valid time and the weighted timing time can be calculated to obtain the reference base time.

[0009] Optionally, in some embodiments of this application, the step of controlling the network unlocking based on the current network time, the reference time, and the initial activation time includes: The time error is obtained by calculating the difference between the current network time and the reference time. If the time error is less than or equal to the error time threshold, and the difference between the current network time and the first activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the time error is greater than the error time threshold, and the difference between the current network time and the first activation time is greater than or equal to the activation time threshold, then the network is temporarily unlocked. If the time error is greater than the error time threshold, and the difference between the current network time and the first activation time is less than the activation time threshold, then the network will remain locked.

[0010] Optionally, in some embodiments of this application, after controlling the network unlocking based on the current network time, the reference time, and the first activation time, the device further includes: If the network is temporarily unlocked and the device meets preset conditions, then the latest valid time is updated based on the trusted server. The preset conditions include at least one of powering on, inserting a user identification card, or reaching a set time period. If the latest valid time is successfully updated, and the difference between the latest valid time and the initial activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked.

[0011] Optionally, in some embodiments of this application, after controlling the network unlocking based on the current network time, the reference time, and the first activation time, the device further includes: If the network is temporarily unlocked and the device meets the preset conditions, then the identification information for the temporary unlock and the device identification code are sent to the trusted server, and the trusted server generates an unlock control command based on the current server time and the first activation time. Receive the unlock control command returned by the trusted server; The network is unlocked by the unlock control command.

[0012] Optionally, in some embodiments of this application, after controlling the network unlocking based on the current network time, the reference time, and the first activation time, the device further includes: If the network is temporarily unlocked, and the device meets the preset conditions and cannot connect to the trusted server, then obtain the latest current network time; If the difference between the latest current network time and the initial activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the difference between the latest current network time and the initial activation time is less than the activation time threshold, then the network remains in a temporarily unlocked state.

[0013] Optionally, in some embodiments of this application, the apparatus further includes: If the latest current network time is earlier than the current network time, and the difference between the latest current network time and the first activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the latest current network time is earlier than the current network time, and the difference between the latest current network time and the first activation time is less than the activation time threshold, then the network remains in a temporarily unlocked state.

[0014] Thirdly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the network unlocking method described above.

[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the network unlocking method described above.

[0016] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in embodiments of this application.

[0017] In summary, this application embodiment records the first activation time and the latest valid time. The latest valid time is obtained from the most recent update from the trusted server. When the latest valid time is updated, the scheduling timer starts counting to obtain the local timing time. If the recorded latest valid time cannot be updated from the trusted server, a reference base time is generated based on the latest valid time and the local timing time obtained by counting. The current network time is obtained, and the network is unlocked and controlled based on the current network time, the reference base time, and the first activation time.

[0018] In this embodiment of the application, when a trusted time cannot be obtained from a trusted server for network unlocking control of the device, the accuracy of unlocking control is improved by obtaining the real-time current network time and using a timing method to assist in judging the network unlocking conditions of the device. Attached Figure Description

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

[0020] Figure 1 This is a schematic diagram illustrating a scenario where a terminal device, as provided in an embodiment of this application, executes the network unlocking method. Figure 2 This is a flowchart illustrating the network unlocking method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the network unlocking device provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application.

[0021] Explanation of icon numbers: 101-Terminal device; 301-Recording module; 302-Timing module; 303-Generation module; 304-Control module; 401-Processor; 402-Memory; 403-Power supply; 404-Input unit. Detailed Implementation

[0022] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] In the description of the embodiments of this application, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, the terms "first," "second," "third," and "fourth" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first," "second," "third," and "fourth" may explicitly or implicitly include one or more features. In the description of the present invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0024] In this application, the term "exemplary" is used to mean "serving as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0025] This application provides a network unlocking method, apparatus, electronic device, and computer-readable storage medium. Specifically, this application provides a network unlocking apparatus suitable for electronic devices, including terminal devices such as mobile phones, tablets, and smartwatches that require internet access.

[0026] For example, please see Figure 1 , Figure 1 This is a schematic diagram illustrating a scenario where a terminal device, according to an embodiment of this application, executes the network unlocking method. Specifically, the execution process of the network unlocking method by the terminal device is as follows: Terminal device 101 records the first activation time and the latest valid time. The latest valid time is the most recent update obtained from the trusted server. When the latest valid time is updated, the scheduling timer starts counting to obtain the local time. If the recorded latest valid time cannot be updated from the trusted server, a reference base time is generated based on the latest valid time and the local time obtained by counting. The current network time is obtained, and the network is unlocked and controlled in coordination based on the current network time, the reference base time and the first activation time.

[0027] For example, when the terminal device can connect to a trusted server, the trusted time recorded by the trusted server is used directly to determine the unlocking conditions. For instance, when the set activation duration is reached, an unlocking command is sent to the terminal device. When the terminal device receives the unlocking command, it controls the device to unlock so that the user can use the terminal device to switch to other networks that are not available when locked.

[0028] When a terminal device cannot connect to a trusted server, it cannot determine the unlocking conditions based on the trusted time recorded by the trusted server. In this case, the local time is used to verify the current network time, which lacks trust, and then the network unlocking conditions are determined. This allows for more accurate control of the device's network unlocking even when the network is unavailable.

[0029] In summary, when a trusted time cannot be obtained from a trusted server for network unlocking control of the device, the embodiments of this application improve the accuracy of unlocking control by obtaining the real-time current network time and using a timing method to assist in determining the network unlocking conditions of the device.

[0030] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.

[0031] Please see Figure 2 , Figure 2This is a flowchart illustrating the network unlocking method provided in this application embodiment. Although the flowchart shows a logical order, in some cases, the steps shown or described can be performed in a different order than that shown in the flowchart. Specifically, the specific flow of the network unlocking method is as follows: S201. Record the first activation time and the latest valid time, wherein the latest valid time is obtained from the most recent update from the trusted server.

[0032] The initial activation time serves as the time benchmark for unlocking and is used as the starting point for determining the duration of activation. In this embodiment, the initial activation time refers to the time of the first network activation, for example, the time when the terminal device first connects to the trusted server for network access.

[0033] The latest valid time refers to the valid usage time of the terminal device obtained from the trusted server, that is, the time used after the terminal device is activated. For example, the latest valid time includes the specific year, month, day, hour, minute, and second after the initial activation time.

[0034] Understandably, in traditional network-connected scenarios, the duration of activation is calculated by the difference between the latest valid time and the first activation time. For example, the difference between the latest valid time and the first activation time is compared with an activation time threshold. When the activation time threshold is reached, the trusted server issues an activation command, and the terminal device controls the network unlocking based on the activation command.

[0035] The activation time threshold is a pre-set activation time condition that must be met, i.e., how long after the initial activation it needs to be unlocked. For example, the activation time threshold may include 60 days, 90 days, etc.

[0036] S202, when the latest valid time is updated, the scheduler starts counting to obtain the local time.

[0037] Understandably, the local time is the time obtained by triggering the timing when the latest valid time is updated. This local time is used as a relatively reliable elapsed time calibration reference when it is impossible to update the latest valid time online.

[0038] It is understandable that the update frequency of the latest valid time is not real-time in some scenarios / configurations. Therefore, when the latest valid time is triggered to be updated, if the update fails, the latest valid time that was updated earlier is not actually the latest time. That is, the latest valid time that was updated earlier is already some time away from the current time, and the local time can reflect this time difference more accurately.

[0039] Therefore, by starting the timer when the latest valid time is updated, this embodiment of the application can more accurately capture the time difference caused by the failure to update the latest valid time in a timely manner, which can be used as a reference for subsequent unlocking judgment.

[0040] S203. If the recorded latest valid time cannot be updated from the trusted server, a reference base time is generated based on the latest valid time and the local timekeeping.

[0041] For example, the reference base time is obtained by calculating the sum of the latest valid time and the local time. Since this reference base time includes the time difference caused by the latest valid time not being updated in time, it is suitable as a benchmark for judging the duration after activation.

[0042] S204. Obtain the current network time, and control the network to unlock based on the current network time, the reference time, and the first activation time.

[0043] The current network time is the time issued by the base station, such as the time corresponding to the network identifier and time zone (NITZ). It should be noted that due to the existence of fake base stations, this current network time is not entirely reliable. Therefore, in this embodiment, the accuracy of determining the network unlocking conditions of the terminal device can be improved by using the current network time and the reference time in a coordinated manner.

[0044] In summary, when a trusted time cannot be obtained from a trusted server for network unlocking control of the device, the embodiments of this application improve the accuracy of unlocking control by obtaining the real-time current network time and using a timing method to assist in determining the network unlocking conditions of the device.

[0045] For example, the current network time is verified by referencing a base time to determine whether the current network time is reliable. If the current network time is reliable, the current network time is compared with the initial activation time to determine whether the duration after activation has reached the set activation time threshold.

[0046] It is understandable that, since the local time is a time obtained through timing, when factors such as device shutdown, lag, or restart cause timing abnormalities, the local time cannot be completely equivalent to the time difference caused by the inability to connect to the network and update to the latest valid time. Therefore, this application embodiment does not directly use the reference base time adjusted from the local time to determine the duration after activation. Instead, it uses the reference base time as a criterion for determining whether the current network time is valid, thereby evaluating the reliability of the current network time used to calculate the duration after activation. For example, when the time difference between the reference base time and the current network time is small, it indicates that the current network time is relatively valid.

[0047] Specifically, the details of the embodiments of this application will be described below.

[0048] In order to make the reference time more effective and improve the accuracy and rationality of determining whether the current network time is valid, the reference time can also be optimized based on weights to improve the effectiveness of the reference time itself. That is, optionally, in some embodiments of this application, the step of "generating a reference time based on the latest valid time and the local time" includes: The reference time is obtained by summing the latest valid time and the local time. Alternatively, the local timing time can be weighted according to a preset weight to obtain a weighted timing time, and the latest valid time and the weighted timing time can be calculated to obtain the reference base time.

[0049] For example, the reference base time can be obtained by directly adding the latest valid time and the local time, or by weighting the local time using preset weights to obtain the weighted time, and then adding the weighted time to the latest valid time to obtain the reference base time.

[0050] The preset weights can be determined based on the timing environment. For example, the preset weights can be determined by comprehensively considering factors such as the size of the local timing time, the frequency of terminal device shutdown and restart, clock source accuracy, temperature, power supply stability, network environment, or time zone changes. The local timing time can then be optimized using these preset weights.

[0051] In this application embodiment, unlocking control not only involves unlocking, but also includes locking or maintaining the previous state without unlocking. Specifically, in some embodiments of this application, the step "to perform unlocking control on the network based on the current network time, the reference time, and the first activation time" includes: The time error is obtained by calculating the difference between the current network time and the reference time. If the time error is less than or equal to the error time threshold, and the difference between the current network time and the first activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the time error is greater than the error time threshold, and the difference between the current network time and the first activation time is greater than or equal to the activation time threshold, then the network is temporarily unlocked. If the time error is greater than the error time threshold, and the difference between the current network time and the first activation time is less than the activation time threshold, then the network will remain locked.

[0052] The error time threshold is used as a reference to assess the magnitude of the time error. For example, if the time error between the current network time and the reference time is greater than the error time threshold, it indicates a large difference between the current network time and the reference time; conversely, if the time error between the current network time and the reference time is less than or equal to the error time threshold, it indicates a small difference between the current network time and the reference time. In this embodiment, the error time threshold can be flexibly set based on accuracy requirements. For example, the error time threshold can be set to, but is not limited to, 2 days.

[0053] The concept of the activation time threshold has been explained earlier and will not be repeated here. For example, if the activation time threshold is set to 60 days, it means that the network needs to be unlocked within 60 days / 60 days after the initial activation. Accordingly, if the difference between the current network time and the initial activation time reaches the activation time threshold, it is considered that the terminal device has been activated for 60 days, and the network will be unlocked, allowing the user to use the device to connect to other networks as needed.

[0054] Understandably, if the time difference between the current network time and the reference time is large, the reliability of the current network time is considered low. In this case, even if the difference between the current network time and the first activation time is greater than the activation time threshold, the network will be controlled to be adjusted to a temporary unlocked state rather than a fixed unlocked or normal network state.

[0055] Understandably, permanent unlocking is a different state or operation from temporary unlocking. Temporary unlocking means temporarily unlocking the device, and further judgment is still needed afterward to determine whether it needs to be relocked or permanently unlocked. Permanent unlocking means permanently unlocking the device, and no further judgment is needed afterward.

[0056] Specifically, when the time error is large and the duration after activation does not reach the activation time threshold, the network will remain locked. That is, the current network time is not reliable, and the calculated activation network time has not reached the set target. The network can only be used on the network specified by the operator, and cannot be switched or used on the network provided by other operators at will.

[0057] Furthermore, when the terminal device is in a temporarily unlocked state, it can still trigger an update to the latest valid time based on a trusted server. If the latest valid time update is successful, the network is unlocked according to the successfully updated latest valid time. That is, optionally, in some embodiments of this application, after the step "unlocking the network according to the current network time, the reference time, and the first activation time", the method further includes: If the network is temporarily unlocked and the device meets preset conditions, then the latest valid time is updated based on the trusted server. The preset conditions include at least one of powering on, inserting a user identification card, or reaching a set time period. If the latest valid time is successfully updated, and the difference between the latest valid time and the initial activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked.

[0058] For example, if a terminal device is in a temporarily unlocked state, and the activation duration is determined to have reached the activation time threshold based on the latest updated valid time, then the network will be switched from a temporarily unlocked state to a fixed unlocked state.

[0059] In one possible implementation, a trusted server can be used to determine the unlocking conditions, and the network unlocking of the terminal device can be controlled by issuing relevant instructions. That is, optionally, in some embodiments of this application, after the step "controlling network unlocking based on the current network time, the reference time, and the initial activation time," the method further includes: If the network is temporarily unlocked and the device meets the preset conditions, then the identification information for the temporary unlock and the device identification code are sent to the trusted server, and the trusted server generates an unlock control command based on the current server time and the first activation time. Receive the unlock control command returned by the trusted server; The network is unlocked by the unlock control command.

[0060] The device identification code is used to uniquely identify the terminal device; for example, the device identification code includes the IMEI.

[0061] The trusted server can calculate the difference between the current server time and the stored first activation time to determine whether the duration of the terminal device's activation has reached the activation time threshold. If it has, it generates an unlock control command to indicate fixed unlocking; if it has not, it generates an unlock control command to lock.

[0062] Accordingly, after receiving the unlock control command, the terminal device can control the network to perform a fixed unlock or control the network to switch from a temporary unlock state to a locked state based on the unlock control command.

[0063] Optionally, after the control device enters a temporary unlocked state, it can still continuously acquire network time and control the device's network unlocking based on the latest network time. That is, optionally, in some embodiments of this application, after the step "controlling network unlocking based on the current network time, the reference time, and the initial activation time", the method further includes: If the network is temporarily unlocked, and the device meets the preset conditions and cannot connect to the trusted server, then obtain the latest current network time; If the difference between the latest current network time and the initial activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the difference between the latest current network time and the initial activation time is less than the activation time threshold, then the network remains in a temporarily unlocked state.

[0064] In other words, when processing a temporary unlocked state, if the difference between the newly acquired current network time and the initial activation time still reaches the activation time threshold, the terminal device will be adjusted to a fixed unlocked state. Otherwise, the temporary unlocked state will be maintained.

[0065] It should be noted that, due to the irreversibility of time, the latest current network time obtained again is generally later than the previously obtained current network time. Also, based on the conventional approach to cracking, if you want to switch from a temporary unlock state to a fixed unlock state, you generally need to adjust the latest current network time to be after the previously obtained current network time, that is, make the difference reach the activation time threshold.

[0066] However, if the latest obtained current network time is earlier than the previously obtained current network time, it indicates that the latest obtained current network time is more reliable. For example, it may not be the time issued by the fake base station. In this case, it is possible to directly determine whether the unlocking condition has been met based on the latest obtained current network time. This can further improve the accuracy of unlocking control. Optionally, in some embodiments of this application, the method further includes: If the latest current network time is earlier than the current network time, and the difference between the latest current network time and the first activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the latest current network time is earlier than the current network time, and the difference between the latest current network time and the first activation time is less than the activation time threshold, then the network remains in a temporarily unlocked state.

[0067] Understandably, based on the foregoing explanation, when the latest current network time is earlier than the previously acquired current network time, it indicates that the latest current network time is relatively reliable. Therefore, network unlocking control based on the latest current time can further improve the accuracy and rationality of network unlocking control.

[0068] In summary, when a trusted time cannot be obtained from a trusted server for network unlocking control of the device, the embodiments of this application improve the accuracy of unlocking control by obtaining the real-time current network time and using a timing method to assist in determining the network unlocking conditions of the device.

[0069] Specifically, the local time obtained from timing is used as the calibration basis for the current network time, enabling the determination of whether the current network time is reliable, thereby improving the accuracy of unlocking control based on the current network time.

[0070] Furthermore, by setting a temporary unlock state, the network can be temporarily opened to meet the timely needs of servers that cannot connect to the network, and by re-verifying after the temporary state, the accuracy of network unlock control of terminal devices is ensured.

[0071] To facilitate better implementation of the network unlocking method of this application, this application also provides a network unlocking device based on the above-described network unlocking method. The meanings of the terms used are the same as in the network unlocking method described above, and specific implementation details can be found in the descriptions of the method embodiments.

[0072] Please see Figure 3 , Figure 3 This is a schematic diagram of the network unlocking device provided in the embodiments of this application, wherein the network unlocking device can specifically be as follows: The recording module 301 is used to record the first activation time and the latest valid time, wherein the latest valid time is obtained from the most recent update from the trusted server. The timing module 302 is used to schedule a timer to start timing to obtain the local timing time when the latest valid time is updated; The generation module 303 is used to generate a reference base time based on the latest valid time and the local time if the recorded latest valid time cannot be updated from the trusted server. The control module 304 is used to obtain the current network time and control the network to unlock based on the current network time, the reference time, and the first activation time.

[0073] Optionally, in some embodiments of this application, generating a reference time based on the latest valid time and the local time includes: The reference time is obtained by summing the latest valid time and the local time. Alternatively, the local timing time can be weighted according to a preset weight to obtain a weighted timing time, and the latest valid time and the weighted timing time can be calculated to obtain the reference base time.

[0074] Optionally, in some embodiments of this application, the step of controlling the network unlocking based on the current network time, the reference time, and the initial activation time includes: The time error is obtained by calculating the difference between the current network time and the reference time. If the time error is less than or equal to the error time threshold, and the difference between the current network time and the first activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the time error is greater than the error time threshold, and the difference between the current network time and the first activation time is greater than or equal to the activation time threshold, then the network is temporarily unlocked. If the time error is greater than the error time threshold, and the difference between the current network time and the first activation time is less than the activation time threshold, then the network will remain locked.

[0075] Optionally, in some embodiments of this application, after controlling the network unlocking based on the current network time, the reference time, and the first activation time, the device further includes: If the network is temporarily unlocked and the device meets preset conditions, then the latest valid time is updated based on the trusted server. The preset conditions include at least one of powering on, inserting a user identification card, or reaching a set time period. If the latest valid time is successfully updated, and the difference between the latest valid time and the initial activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked.

[0076] Optionally, in some embodiments of this application, after controlling the network unlocking based on the current network time, the reference time, and the first activation time, the device further includes: If the network is temporarily unlocked and the device meets the preset conditions, then the identification information for the temporary unlock and the device identification code are sent to the trusted server, and the trusted server generates an unlock control command based on the current server time and the first activation time. Receive the unlock control command returned by the trusted server; The network is unlocked by the unlock control command.

[0077] Optionally, in some embodiments of this application, after controlling the network unlocking based on the current network time, the reference time, and the first activation time, the device further includes: If the network is temporarily unlocked, and the device meets the preset conditions and cannot connect to the trusted server, then obtain the latest current network time; If the difference between the latest current network time and the initial activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the difference between the latest current network time and the initial activation time is less than the activation time threshold, then the network remains in a temporarily unlocked state.

[0078] Optionally, in some embodiments of this application, the apparatus further includes: If the latest current network time is earlier than the current network time, and the difference between the latest current network time and the first activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the latest current network time is earlier than the current network time, and the difference between the latest current network time and the first activation time is less than the activation time threshold, then the network remains in a temporarily unlocked state.

[0079] In this embodiment, the recording module 301 records the initial activation time and the latest valid time. The latest valid time is obtained from the most recent update from the trusted server. The timing module 302 schedules a timer to start timing when the latest valid time is updated to obtain the local timing time. If the recorded latest valid time cannot be updated from the trusted server, the generation module 303 generates a reference base time based on the latest valid time and the local timing time. The control module 304 obtains the current network time and performs network unlocking control based on the current network time, the reference base time, and the initial activation time.

[0080] In summary, when a trusted time cannot be obtained from a trusted server for network unlocking control of the device, the embodiments of this application improve the accuracy of unlocking control by obtaining the real-time current network time and using a timing method to assist in determining the network unlocking conditions of the device.

[0081] In addition, this application also provides an electronic device, such as Figure 4 As shown, it illustrates a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Specifically: The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 401 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.

[0082] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0083] The electronic device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0084] The electronic device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0085] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402, thereby implementing the steps in any of the network unlocking methods provided in the embodiments of this application.

[0086] This application embodiment records the first activation time and the latest valid time. The latest valid time is obtained from the most recent update from the trusted server. When the latest valid time is updated, the scheduling timer starts counting to obtain the local time. If the recorded latest valid time cannot be updated from the trusted server, a reference base time is generated based on the latest valid time and the local time obtained by counting. The current network time is obtained, and the network is unlocked based on the current network time, the reference base time, and the first activation time.

[0087] In this embodiment of the application, when a trusted time cannot be obtained from a trusted server for network unlocking control of the device, the accuracy of unlocking control is improved by obtaining the real-time current network time and using a timing method to assist in judging the network unlocking conditions of the device.

[0088] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0089] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0090] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the network unlocking methods provided in this application.

[0091] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0092] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0093] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the network unlocking methods provided in this application, the beneficial effects that any of the network unlocking methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0094] The foregoing has provided a detailed description of a network unlocking method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

[0095] It is understood that in the specific implementation of this application, data related to the first activation time, the latest valid time, the local time, the current network time, identification information, and the device identification code are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

Claims

1. A network unlocking method, characterized in that, The method includes: Record the first activation time and the latest validity time, wherein the latest validity time is the most recent update obtained from the trusted server; When the latest valid time is updated, the scheduler starts counting to obtain the local timing time; If the latest valid time recorded cannot be updated from the trusted server, a reference base time is generated based on the latest valid time and the local time. Obtain the current network time, and control the network to unlock based on the current network time, the reference time, and the first activation time.

2. The network unlocking method according to claim 1, characterized in that, The step of generating a reference time based on the latest valid time and the local time includes: The reference time is obtained by summing the latest valid time and the local time. Alternatively, the local timing time can be weighted according to a preset weight to obtain a weighted timing time, and the latest valid time and the weighted timing time can be calculated to obtain the reference base time.

3. The network unlocking method according to claim 1, characterized in that, The step of controlling network unlocking based on the current network time, the reference time, and the initial activation time includes: The time error is obtained by calculating the difference between the current network time and the reference time. If the time error is less than or equal to the error time threshold, and the difference between the current network time and the first activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the time error is greater than the error time threshold, and the difference between the current network time and the first activation time is greater than or equal to the activation time threshold, then the network is temporarily unlocked. If the time error is greater than the error time threshold, and the difference between the current network time and the first activation time is less than the activation time threshold, then the network will remain locked.

4. The network unlocking method according to claim 3, characterized in that, After controlling the network unlocking based on the current network time, the reference time, and the initial activation time, the method further includes: If the network is temporarily unlocked and the device meets preset conditions, then the latest valid time is updated based on the trusted server. The preset conditions include at least one of powering on, inserting a user identification card, or reaching a set time period. If the latest valid time is successfully updated, and the difference between the latest valid time and the initial activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked.

5. The network unlocking method according to claim 3, characterized in that, After controlling the network unlocking based on the current network time, the reference time, and the initial activation time, the method further includes: If the network is temporarily unlocked and the device meets the preset conditions, then the identification information for the temporary unlock and the device identification code are sent to the trusted server, and the trusted server generates an unlock control command based on the current server time and the first activation time; Receive the unlock control command returned by the trusted server; The network is unlocked by the unlock control command.

6. The network unlocking method according to claim 3, characterized in that, After controlling the network unlocking based on the current network time, the reference time, and the initial activation time, the method further includes: If the network is temporarily unlocked, and the device meets the preset conditions and cannot connect to the trusted server, then obtain the latest current network time; If the difference between the latest current network time and the initial activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the difference between the latest current network time and the initial activation time is less than the activation time threshold, then the network remains in a temporarily unlocked state.

7. The network unlocking method according to claim 6, characterized in that, The method further includes: If the latest current network time is earlier than the current network time, and the difference between the latest current network time and the first activation time is greater than or equal to the activation time threshold, then the network is permanently unlocked. If the latest current network time is earlier than the current network time, and the difference between the latest current network time and the first activation time is less than the activation time threshold, then the network remains in a temporarily unlocked state.

8. A network unlocking device, characterized in that, The device includes: The recording module is used to record the first activation time and the latest valid time, wherein the latest valid time is obtained from the most recent update from the trusted server. The timing module is used to schedule a timer to start timing and obtain the local timing time when the latest valid time is updated; A generation module is used to generate a reference base time based on the latest valid time and the local time if the recorded latest valid time cannot be updated from the trusted server. The control module is used to obtain the current network time and control the network to unlock based on the current network time, the reference time, and the first activation time.

9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the network unlocking method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the network unlocking method as described in any one of claims 1-7.