Equipment offline authentication method and device and electronic equipment

By setting the time interval strategy and generating network access token with offline time interval, the real -time and flexibility of user equipment is controlled by the time control of the user equipment, and the more efficient network access control and security are achieved.

CN119363434APending Publication Date: 2025-01-24WUHAN SIPU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411481269.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In the prior art, the real-time and flexibility of the control of the down-line time of user equipment is low, and it is difficult to adjust in time according to actual conditions.

Method used

By setting the time interval strategy, calculating the first time interval and the second time interval of the target equipment, determine the offline time interval, and generate a network access token with a offline time interval, which is used to use it to the bottom of the target equipment. Conditional execution certification.

Benefits of technology

It improves the real-time and flexibility of controlling the offline time of user equipment, can quickly adjust the offline time according to the actual situation, and enhances network security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363434A_ABST
    Figure CN119363434A_ABST
Patent Text Reader

Abstract

The invention provides an equipment offline authentication method and device and electronic equipment. The method comprises the following steps: calculating a first time interval according to a time interval strategy and online time of target equipment; setting a second time interval for the target equipment; determining an offline time interval of the target device according to the first time interval and the second time interval, generating a network access token, and sending the network access token to the target device; and analyzing the time period of the network access token, and executing authentication on the offline state of the target equipment. The method comprises the steps of calculating a first time interval of target equipment according to a time interval strategy; obtaining a preset second time interval, and determining an offline time interval of the target equipment according to the first time interval and the second time interval; and finally, generating a network access token with an off-line time interval, and executing authentication on the off-line state of the target equipment, thereby improving the real-time performance and the flexibility of controlling the off-line time of the user equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of network security technology, and in particular to a device offline authentication method, device, and electronic device. Background Art

[0002] In a computer network environment, access control is required through a user authentication mechanism to improve network security. When using network resources, users may need to log off in certain circumstances, such as completing work tasks, leaving the work area, or reaching the usage time limit. Therefore, a user offline authentication mechanism is required to implement offline operations.

[0003] The user offline authentication mechanism includes two mechanisms: timeout and forced re-login interval. The timeout mechanism can start the timer after the user logs in. When the user's online time reaches the set timeout time, the user is automatically offline. The forced re-login interval mechanism requires the user to log in again within a certain time interval to verify his identity and access rights. Both mechanisms rely on timers to ensure the accuracy and timeliness of user offline.

[0004] However, in the application process, the administrator needs to adjust the specific time or time interval of the user offline according to the actual situation, that is, modify the time object or authentication policy. However, after modifying the time object or authentication policy, it is necessary to wait for the timer to count the original time interval to take effect, which reduces the real-time and flexibility of controlling the user offline time. Summary of the invention

[0005] The present application provides a device offline authentication method, apparatus and electronic device to solve the problem of low real-time performance and poor flexibility in controlling the offline time of user equipment.

[0006] In a first aspect, the present application provides a device offline authentication method, comprising:

[0007] Set time interval strategy;

[0008] Get the online time of the target device;

[0009] Calculate a first time interval of the target device according to the time interval strategy and the online time of the target device;

[0010] Setting a custom time interval for the target device, and using the custom time interval as a second time interval;

[0011] Determine an offline time interval of the target device according to the first time interval and the second time interval;

[0012] Generate a network access token according to the offline time interval, and send the network access token to the target device; wherein the network access token includes a time period, and the time period is equal to the offline time interval;

[0013] The time period of the network access token is parsed, and the offline state of the target device is authenticated.

[0014] The method sets a time interval strategy, and calculates a first time interval when the target device is online in different time periods according to the time interval strategy; then obtains a preset second time interval, and determines an offline time interval of the target device according to the first time interval and the second time interval; finally, generates a network access token with an offline time interval, which is used to authenticate the offline state of the target device, thereby improving the real-time and flexibility of controlling the offline time of the user device.

[0015] In an implementation manner of the first aspect, setting the time interval strategy includes:

[0016] Setting an authentication period and an authentication time period, wherein the authentication time period is within the authentication period;

[0017] When the online time of the target device is before the authentication time period, the setting time interval strategy instructs the target device to go offline at the end of the authentication time period;

[0018] When the online time of the target device is within the authentication time period, the setting time interval strategy instructs the target device to go offline at the end of the authentication time period;

[0019] When the target device goes online after the authentication period, the time interval setting policy instructs the target device to go offline at the end of the authentication period.

[0020] In an implementation manner of the first aspect, obtaining the online time of the target device includes:

[0021] Receiving heartbeat data sent by the target device;

[0022] The heartbeat data is parsed to obtain the online time of the target device.

[0023] In an implementable manner of the first aspect, calculating the first time interval of the target device according to the time interval policy and the online time of the target device includes:

[0024] Determine the planned offline time of the target device according to the time interval strategy;

[0025] The planned offline time is subtracted from the online time of the target device to obtain the first time interval.

[0026] In an implementation manner of the first aspect, determining the offline time interval of the target device according to the first time interval and the second time interval includes:

[0027] If the first time interval is smaller than the second time interval, the first time interval is set as the offline time interval; otherwise, the second time interval is set as the offline time interval.

[0028] In an implementation manner of the first aspect, the method further includes:

[0029] Setting a timer using the time period of the network access token as a timing time;

[0030] Determine whether the timing time of the timer has expired, and if the timing time of the timer has not expired, set the access status of the network access token to a valid status;

[0031] If the timing time of the timer expires, the access status of the network access token is set to an invalid status.

[0032] In an implementation manner of the first aspect, parsing the network access token and authenticating the offline state of the target device includes:

[0033] Obtaining the access status of the network access token;

[0034] If the access status of the network access token is the valid status, authenticating the target device as being in a non-offline status;

[0035] If the access status of the network access token is the invalid status, the target device is authenticated as being in an offline status.

[0036] In an implementation manner of the first aspect, the method further includes:

[0037] Set the update interval strategy;

[0038] Calculate a first update time interval of the target device according to the update time interval strategy and the online time of the target device;

[0039] An offline time interval of the target device is determined according to the first update time interval and the second time interval.

[0040] In a second aspect, the present application also provides a user offline authentication device, including:

[0041] The time interval strategy generating module is configured to: set the time interval strategy;

[0042] The online time acquisition module is configured to: acquire the online time of the target device;

[0043] A first time interval generating module is configured to: calculate a first time interval of the target device according to the time interval strategy and the online time of the target device;

[0044] A second time interval acquisition module is configured to: set a custom time interval for the target device, and use the custom time interval as a second time interval;

[0045] An offline time interval acquisition module is configured to: determine an offline time interval of the target device according to the first time interval and the second time interval;

[0046] A network access token generation module is configured to: generate a network access token according to the offline time interval, and send the network access token to the target device; wherein the network access token includes a time period, and the time period is equal to the offline time interval;

[0047] The offline status authentication module is configured to: parse the time period of the network access token and perform authentication on the offline status of the target device.

[0048] In a third aspect, the present application further provides an electronic device, including:

[0049] one or more processors;

[0050] a memory configured to store one or more programs;

[0051] When the one or more programs are executed by the one or more processors, the one or more processors implement the device offline authentication method described in any one of the first aspects above.

[0052] It can be seen from the above technical scheme that the present application provides a device offline authentication method, device and electronic device, the method comprising: setting a time interval strategy; obtaining the online time of the target device; calculating the first time interval of the target device according to the time interval strategy and the online time of the target device; setting a custom time interval for the target device, and using the custom time interval as the second time interval; determining the offline time interval of the target device according to the first time interval and the second time interval; generating a network access token according to the offline time interval, and sending the network access token to the target device; wherein the network access token includes a time period, and the time period is equal to the offline time interval; parsing the time period of the network access token, and performing authentication on the offline state of the target device.

[0053] The method sets a time interval strategy, and calculates a first time interval when the target device is online in different time periods according to the time interval strategy; then obtains a preset second time interval, and determines an offline time interval of the target device according to the first time interval and the second time interval; finally, generates a network access token with an offline time interval, which is used to authenticate the offline state of the target device, thereby improving the real-time and flexibility of controlling the offline time of the user device. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0055] Figure 1 This is a flow chart of the device offline authentication method described in an embodiment of the present application;

[0056] Figure 2 A schematic diagram of a server and a target device according to an embodiment of the present application;

[0057] Figure 3 A schematic diagram of a method for setting a practice strategy according to an embodiment of the present application;

[0058] Figure 4 A schematic diagram of a method for determining the access status of a network access token of a target device according to an embodiment of the present application;

[0059] Figure 5 A schematic diagram of a method for authenticating the offline status of a target device according to an embodiment of the present application;

[0060] Figure 6 This is a schematic diagram of the overall process of the offline authentication method using the update time interval strategy described in the embodiment of the present application;

[0061] Figure 7 A schematic diagram of connecting a server to multiple target devices according to an embodiment of the present application;

[0062] Figure 8 This is a schematic diagram of the structure of the device offline authentication device described in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.

[0064] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0065] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0066] In a computer network environment, access control mechanisms are required to manage and protect network resources and ensure the secure transmission and storage of information. Among them, the user authentication mechanism is the core link of access control. The user authentication mechanism improves the overall security of the network by verifying the identity and authority of the user. The user authentication mechanism is not limited to the initial verification when the user logs in, but also runs through the entire process of the user accessing the network, aiming to prevent unauthorized access and data leakage.

[0067] When users are using network resources, they need to log off actively or passively based on actual needs, such as completing work tasks, temporarily or permanently leaving the work area, reaching the preset usage time limit, etc. The user offline authentication mechanism can ensure the orderly release and safe transition of network resources.

[0068] The user offline authentication mechanism includes a timeout mechanism and a forced re-login interval mechanism. The timeout mechanism starts a timer after the user successfully logs in to the system. When the user's online time reaches the preset timeout threshold, the system will automatically perform the offline operation and disconnect the user's session connection. This mechanism is suitable for scenarios where the user's online time needs to be strictly controlled, such as temporary access rights or limited resource usage. The forced re-login interval mechanism requires users to re-authenticate within a specified time period to confirm that they continue to have access rights. Potential security risks can be discovered and addressed in a timely manner.

[0069] However, when the network environment changes, the user's offline time or time interval needs to be dynamically modified. The timeout mechanism and the forced re-login interval mechanism both rely on timers to operate, and the real-time and flexibility of controlling the user's offline time are low.

[0070] The embodiments of the present application provide a device offline authentication method, apparatus, and electronic device, which can improve the real-time and flexibility of controlling user device offline. Figure 1 A schematic diagram of a device offline authentication method flow chart provided in some embodiments of the present application, such as Figure 1 As shown, the device offline authentication method includes steps S100-S700.

[0071] S100: Set the time interval strategy.

[0072] In some embodiments, the device offline authentication method indicates that the server authenticates the offline status of the subordinate target device. Figure 2 As shown, the server 201 includes a storage unit 2011, an analysis unit 2012 and a communication unit 2013; the target device 202 includes an analysis unit 2021 and a communication unit 2022. The server 201 and the target device 202 perform communication via the communication unit 2013 and the communication unit 2022.

[0073] In some embodiments, since the target device 202 can be online at any time, in order to improve the efficiency and flexibility of the server 201 in controlling the target device 202 offline and reduce the resource usage of the server 201, it is necessary to set a time interval strategy and store it in the storage unit 211 of the server 201 to distinguish the offline time of the target device 202 corresponding to different online times. Figure 3 As shown, when setting the time interval strategy, first set the authentication period and authentication time period, where the authentication time period is within the authentication period. For example, set the authentication period to a natural day, that is, 0:00-24:00; set the authentication time period to 9:00-10:00.

[0074] In some embodiments, when setting the time interval policy, it is necessary to distinguish a variety of different situations according to the online time of the target device 202: when the online time of the target device 202 is before the authentication time period, the time interval policy is set to instruct the target device 202 to go offline at the end of the authentication time period. For example, if the authentication period is 0:00-24:00, and the authentication time period is 9:00-10:00, when the online time of the target device 202 is 8:00, before 9:00-10:00 during the authentication period, the time interval policy is set to instruct the target device 202 to go offline at the end of the authentication time period, that is, 10:00.

[0075] When the online time of the target device 202 is within the authentication time period, the time interval policy is set to instruct the target device 202 to go offline at the end of the authentication time period. For example, if the authentication period is 0:00-24:00, and the authentication time period is 9:00-10:00, when the online time of the target device 202 is 9:30, which is between 9:00 and 10:00 during the authentication period, the time interval policy is set to instruct the target device 202 to go offline at the end of the authentication time period, that is, 10:00.

[0076] When the target device 202 is online after the authentication period, the time interval policy is set to instruct the target device 202 to go offline at the end of the authentication period. For example, if the authentication period is 0:00-24:00, and the authentication time period is 9:00-10:00, when the target device 202 is online at 11:00, which is after the authentication period 9:00-10:00, the time interval policy is set to instruct the target device 202 to go offline at the end of the authentication period, that is, 23:59.

[0077] S200: Obtaining the online time of the target device.

[0078] In some embodiments, in order to perform offline authentication on the target device 202, the online time of the target device 202 needs to be obtained. Figure 2 As shown, the communication unit 2013 of the server 201 receives the heartbeat data sent from the communication unit 2022 of the target device 202, and then the analysis unit 2012 of the server 201 parses the heartbeat data to obtain the online time of the target device.

[0079] For example, the analyzing unit 2012 of the server 201 parses the heartbeat data sent by the target device 202 and obtains that the online time of the target device 202 is 8 o'clock.

[0080] S300: Calculate a first time interval of the target device according to the time interval policy and the online time of the target device.

[0081] In some embodiments, in order to improve the accuracy of the server 201 controlling the offline time of the target device 202, it is necessary to determine the first time interval of the target device 202. After obtaining the online time of the target device 202, the server 201 first determines the planned offline time of the target device 202 according to the time interval strategy. After determining the planned offline time, the online time of the target device 202 is subtracted from the planned offline time to obtain the first time interval.

[0082] It should be understood that, for different online times of the target device 202 , the offline time of the target device can be determined according to different situations in the time interval strategy and the first time interval can be calculated.

[0083] For example, if the online time of the target device 202 is 8 o'clock and the authentication time period of the time interval policy is 9 o'clock-10 o'clock, then the planned offline time of the target device 202 can be determined to be 10 o'clock. By subtracting the online time of the target device 202, 8 o'clock, from the planned offline time 10 o'clock, the first time interval of the target device 202 can be obtained as 2 hours.

[0084] For example, if the online time of the target device 202 is 9:30 and the authentication time period of the time interval policy is 9:00-10:00, then the planned offline time of the target device 202 can be determined to be 10:00. By subtracting the online time of the target device 202, 9:30, from the planned offline time 10:00, the first time interval of the target device 202 can be obtained as 30 minutes.

[0085] For example, if the online time of the target device 202 is 15:00 and the authentication time period of the time interval policy is 9:00-10:00, then the planned offline time of the target device 202 can be determined as 23:59. By subtracting the online time of the target device 202, 15:00, from the planned offline time 23:59, the first time interval of the target device 202 can be obtained as 8 hours and 59 minutes.

[0086] S400: Setting a custom time interval for the target device, and using the custom time interval as a second time interval.

[0087] In some embodiments, in order to facilitate the administrator to control the offline time of the target device 202 according to actual conditions and improve the flexibility and autonomy of the device offline authentication method, a custom time interval can also be set for the target device 202, and the custom time interval is used as the second time interval for controlling the target device 202 to go offline.

[0088] Exemplarily, the custom time interval of the target device 202 is set to 1 hour, and then the target device 202 can be controlled to go offline after the target device 202 is online for 1 hour.

[0089] S500: Determine an offline time interval of the target device according to the first time interval and the second time interval.

[0090] In some embodiments, in order to improve the flexibility and security of device offline authentication, a time interval may be selected from the first time interval and the second time interval as the offline time interval of the target device 202. If the first time interval is less than the second time interval, the first time interval is set as the offline time interval; otherwise, the second time interval is set as the offline time interval.

[0091] For example, if the online time of the target device 202 is 8 o'clock, the first time interval obtained according to the time interval policy of the authentication time period of 9 o'clock to 10 o'clock is 2 hours, and the second time interval customized by the administrator is 1 hour. The first time interval is greater than the second time interval, so the second time interval, i.e. 1 hour, is used as the offline time interval of the target device 202.

[0092] For example, if the online time of the target device 202 is 9:30, the first time interval obtained according to the time interval policy of the authentication time period 9:00-10:00 is 30 minutes, and the second time interval customized by the administrator is 1 hour. The first time interval is smaller than the second time interval, so the first time interval, i.e., 30 minutes, is used as the offline time interval of the target device 202.

[0093] It should be understood that the offline time interval of the target device 202 is smaller, and the target device 202 can be controlled to go offline earlier, thereby reducing the risk of data leakage during network transmission and improving the security of network transmission.

[0094] S600: Generate a network access token according to the offline time interval, and send the network access token to the target device.

[0095] In some embodiments, to ensure the security of network transmission, the server 201 needs to generate a network access token and send it to the target device 202. After receiving the network access token, the target device 202 has the network access rights to the server 201 and can be online. In order to control the target device 202 to go offline at the planned offline time, it is necessary to add the offline time interval to the network access token as the time period of the network access token.

[0096] For example, if the online time included in the heartbeat data of the target device 202 is 8 o'clock, the authentication time period of the time policy set for the target device 202 in the server 201 is 9 o'clock-10 o'clock, and the second time interval customized by the administrator is 1 hour, then the offline time interval of the target device 202 finally determined by the server 201 is 1 hour. The server 201 generates a network access token using the offline time interval of 1 hour as the time period, and sends the network access token to the target device 202.

[0097] S700: Parse the time period of the network access token and perform authentication on the offline status of the target device.

[0098] In some embodiments, the server 201 can authenticate the offline status of the target device 202 by parsing the time period in the network access token sent to the target device 202. A timer is set according to the time period of the network access token to determine the access status of the network access token of the target device. Figure 4 As shown, first, step S401 is executed: a timer is set using the time period of the network access token as the timing time.

[0099] Exemplarily, if the time period of the network access token of the target device 202 is 1 hour, a timer is set with 1 hour as the timing period, and the timer starts counting down when the network access token is issued.

[0100] Next, step S402 is executed: determining whether the timer has expired, if the timer has not expired, step S403 is executed: setting the access status of the network access token to a valid state. If the timer has expired, step S404 is executed: setting the access status of the network access token to an invalid state.

[0101] Exemplarily, the remaining timing time of the timer is obtained. If the remaining timing time of the timer is 59S, it indicates that the timing time has not ended, and the access status of the network access token remains valid. If the remaining timing time of the timer is 0S, it indicates that the timing time has ended, and the access status of the network access token needs to be set to an invalid state.

[0102] In some embodiments, after setting the timer, the server 201 can authenticate the offline status of the target device 202 according to the access status of the network access token of the target device 202. Figure 5 As shown, when authenticating the offline status of the target device 202, the access status of the network access token is first obtained.

[0103] Then, the access status of the network access token is used for judgment: if the access status of the network access token is valid, the target device 202 is in a non-offline state. For example, when the remaining time of the timer is 59 seconds, the access status of the network access token remains valid, and the target device 202 is still in a non-offline state, that is, online.

[0104] If the access status of the network access token is invalid, the authentication target device is offline. For example, when the remaining time of the timer is 0S, the access status of the network access token is invalid. When the server 201 detects that the access status of the network access token is invalid, the target device 202 is set offline.

[0105] In some embodiments, different time interval strategies may be used for offline authentication of the same target device 202 to improve the real-time performance and flexibility of offline authentication of user devices. Therefore, multiple time interval strategies may be set in the server 201, such as a time interval strategy and an update time interval strategy. The overall process of the offline authentication method using the update time interval strategy for the target device 202 is the same as the overall process of the offline authentication method using the time interval strategy in the above-mentioned embodiment. Figure 6 As shown, first, set the update time interval policy and the custom time interval. Then parse the heartbeat data to obtain the online time of the target device 202. Secondly, according to the online time of the target device and the update time interval policy, obtain the first time interval. Thirdly, take the custom time interval as the second time interval, and determine the size relationship between the first time interval and the second time interval. Use the smaller time interval of the first time interval and the second time interval as the offline time interval of the target device 202, and generate a network access token with a time period according to the offline time interval, and send the network access token to the target device 202. Finally, by parsing the network access token of the target device 202, perform authentication on the offline state of the target device 202.

[0106] Exemplarily, the authentication time period of the update time interval policy is set to 11:00-12:00, and the custom time interval is set to 3 hours. If the target device 202 is online at 8:00, the first time interval is 4 hours according to the update time interval policy, and the second time interval is 3 hours, and the second time interval is smaller. Therefore, the second time interval is used as the time period to generate a network access token, and the network access token is sent to the target device 202. The server 201 sets a timer with a timing time of 3 hours according to the time period of the network access token of the target device 202, and then performs authentication on the offline state of the target device 202 according to the remaining timing time of the timer.

[0107] It should be understood that when different time interval strategies are used to perform offline authentication on the target device 202 , different custom time intervals may also be used to perform offline authentication on the target device 202 to improve the flexibility of the device offline authentication method.

[0108] In some embodiments, Figure 7 As shown, the server 201 can be connected and communicated with multiple target devices 202. Since the storage unit 2011 of the server 201 can store multiple different time interval strategies and custom time intervals, the corresponding time interval strategies and custom time intervals can be used for different target devices 202 to perform offline authentication, thereby improving the flexibility of offline authentication of user devices.

[0109] Exemplarily, the server 201 is provided with a first time interval strategy with an authentication time period of 8:00-9:00, a second time interval strategy with an authentication time period of 9:00-10:00, and the server 201 is also provided with a first custom time interval of 1 hour and a second custom time interval of 2 hours. For the first target device, the first time interval strategy and the second custom time interval can be used to calculate the offline time interval, and for the second target device, the second time interval strategy and the first custom time interval can be used to calculate the offline time interval.

[0110] Based on the device offline authentication method provided by some embodiments of the present application, some embodiments of the present application also provide a device offline authentication device. Figure 8 This is a schematic diagram of the structure of the device offline authentication device provided in some embodiments of the present application. Figure 8 As shown, the device offline authentication device includes:

[0111] The time interval strategy generating module 801 is configured to: set a time interval strategy.

[0112] The online time acquisition module 802 is configured to: acquire the online time of the target device.

[0113] The first time interval generating module 803 is configured to calculate a first time interval of the target device according to the time interval policy and the online time of the target device.

[0114] The second time interval acquisition module 804 is configured to: set a custom time interval for the target device, and use the custom time interval as the second time interval.

[0115] The offline time interval acquisition module 805 is configured to determine the offline time interval of the target device according to the first time interval and the second time interval.

[0116] The network access token generation module 806 is configured to: generate a network access token according to the offline time interval, and send the network access token to the target device; wherein the network access token includes a time period, and the time period is equal to the offline time interval.

[0117] The offline status authentication module 807 is configured to: parse the time period of the network access token and perform authentication on the offline status of the target device.

[0118] It can be seen from the above technical scheme that the present application provides a device offline authentication method, device and electronic device, the method comprising: setting a time interval strategy; obtaining the online time of the target device; calculating the first time interval of the target device according to the time interval strategy and the online time of the target device; setting a custom time interval for the target device, and using the custom time interval as the second time interval; determining the offline time interval of the target device according to the first time interval and the second time interval; generating a network access token according to the offline time interval, and sending the network access token to the target device; wherein the network access token includes a time period, and the time period is equal to the offline time interval; parsing the time period of the network access token, and performing authentication on the offline state of the target device.

[0119] The method sets a time interval strategy, and calculates a first time interval when the target device is online in different time periods according to the time interval strategy; then obtains a preset second time interval, and determines an offline time interval of the target device according to the first time interval and the second time interval; finally, generates a network access token with an offline time interval, which is used to authenticate the offline state of the target device, thereby improving the real-time and flexibility of controlling the offline time of the user device.

[0120] Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the general concept of this application and do not constitute a limitation on the protection scope of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without creative work belong to the protection scope of this application.

Claims

1. A device offline authentication method, characterized in that: include: Set time interval strategy; Get the online time of the target device; Calculate a first time interval of the target device according to the time interval strategy and the online time of the target device; Setting a custom time interval for the target device, and using the custom time interval as a second time interval; Determine an offline time interval of the target device according to the first time interval and the second time interval; Generate a network access token according to the offline time interval, and send the network access token to the target device; wherein the network access token includes a time period, and the time period is equal to the offline time interval; The time period of the network access token is parsed, and the offline state of the target device is authenticated.

2. The device offline authentication method according to claim 1, characterized in that: The time interval setting strategy includes: Setting an authentication period and an authentication time period, wherein the authentication time period is within the authentication period; When the online time of the target device is before the authentication time period, the setting time interval strategy instructs the target device to go offline at the end of the authentication time period; When the online time of the target device is within the authentication time period, the setting time interval strategy instructs the target device to go offline at the end of the authentication time period; When the target device goes online after the authentication period, the time interval setting policy instructs the target device to go offline at the end of the authentication period.

3. The device offline authentication method according to claim 1, characterized in that: The obtaining of the online time of the target device includes: Receiving heartbeat data sent by the target device; The heartbeat data is parsed to obtain the online time of the target device.

4. The device offline authentication method according to claim 1, characterized in that: The calculating the first time interval of the target device according to the time interval strategy and the online time of the target device includes: Determine the planned offline time of the target device according to the time interval strategy; The planned offline time is subtracted from the online time of the target device to obtain the first time interval.

5. The device offline authentication method according to claim 1, characterized in that: The determining the offline time interval of the target device according to the first time interval and the second time interval includes: If the first time interval is smaller than the second time interval, the first time interval is set as the offline time interval; otherwise, the second time interval is set as the offline time interval.

6. The device offline authentication method according to claim 1, characterized in that: The method further comprises: Setting a timer using the time period of the network access token as a timing time; Determine whether the timing time of the timer has expired, and if the timing time of the timer has not expired, set the access status of the network access token to a valid status; If the timing time of the timer expires, the access status of the network access token is set to an invalid status.

7. The device offline authentication method according to claim 6, characterized in that: Parsing the time period of the network access token and authenticating the offline state of the target device includes: Obtaining the access status of the network access token; If the access status of the network access token is the valid status, authenticating the target device as being in a non-offline status; If the access status of the network access token is the invalid status, the target device is authenticated as being in an offline status.

8. The device offline authentication method according to claim 1, characterized in that: The method further comprises: Set the update interval strategy; Calculate a first update time interval of the target device according to the update time interval strategy and the online time of the target device; An offline time interval of the target device is determined according to the first update time interval and the second time interval.

9. A user offline authentication device, characterized in that: include: The practice strategy generation module is configured to: set a time interval strategy; The online time acquisition module is configured to: acquire the online time of the target device; A first time interval generating module is configured to: calculate a first time interval of the target device according to the time interval strategy and the online time of the target device; A second time interval acquisition module is configured to: set a custom time interval for the target device, and use the custom time interval as a second time interval; An offline time interval acquisition module is configured to: determine an offline time interval of the target device according to the first time interval and the second time interval; A network access token generation module is configured to: generate a network access token according to the offline time interval, and send the network access token to the target device; wherein the network access token includes a time period, and the time period is equal to the offline time interval; The offline status authentication module is configured to: parse the time period of the network access token and perform authentication on the offline status of the target device.

10. An electronic device, characterized in that: include: one or more processors; a memory configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the device offline authentication method according to any one of claims 1-8.