Method and system for automatically controlling use time of electronic device

By using a camera on an electronic device to confirm the user's identity and automatically manage the usage time, the problem of managers frequently manually adjusting control measures in a shared environment of multiple people is solved, and the efficiency and flexibility of time management are improved.

CN119808050APending Publication Date: 2025-04-11SHANDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411862026.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When multiple people share an electronic device, managers need to frequently manually adjust control measures, which increases the complexity of operations and the burden of management.

Method used

The camera of the electronic device is activated to capture the user's facial image, compare it to confirm the user's identity, and automatically set the allowable usage time based on the remaining usage time of the user and the requested target usage time. When the allowable usage time is reached, the electronic device will be automatically turned off.

Benefits of technology

It effectively avoids the error and complexity of manual operations, reasonably allocates the usage time of each user, improves the efficiency and flexibility of time management, and reduces the management burden of managers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808050A_ABST
    Figure CN119808050A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for automatically controlling the use time of an electronic device, belongs to the technical field of automatic control of electronic devices, and aims to solve the problem that management personnel need to frequently and manually adjust control measures due to the fact that multiple persons share one electronic device. Comprising the steps of activating a camera to capture a first facial image of a first user in response to a first operation of the first user on the electronic device; obtaining a target use duration requested by the first user; determining whether the first user is a restricted user according to the first face image; when it is judged that the first user is the limited user, obtaining the remaining use duration of the first user on that day; obtaining a to-be-confirmed use duration according to the remaining use duration of the day and the target use duration; according to the to-be-confirmed use duration and a preset allowed use time period, the allowed use duration of this time is obtained; and when the use duration of the electronic device by the first user reaches the current allowed use duration, controlling the electronic device to be automatically closed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automatic control of electronic devices, and in particular to a method and system for automatically controlling the use time of an electronic device. Background Art

[0002] With the rapid development of modern technology, electronic devices have become an indispensable part of people's daily lives, including smartphones, tablets, laptops, etc. While these devices provide convenience and entertainment for people, they also cause a series of problems, especially the negative impact of excessive use of electronic devices on health and productivity. In order to deal with these problems, a variety of methods and tools for controlling the use time of electronic devices have appeared on the market. However, the existing methods for controlling the use time of electronic devices usually set a fixed time interval, and then automatically switch the electronic device to a restricted state after the time is reached, such as locking the screen, limiting the use of applications, etc. Although this method can effectively limit the use time of electronic devices to a certain extent, its limitations are also obvious:

[0003] When an electronic device is switched to a restricted state, no one can use the electronic device unless the administrator lifts the restriction. This causes the administrator to frequently manually adjust control measures when multiple people share an electronic device, thereby increasing the complexity of operations and the burden of management.

[0004] The disclosure of the above background technology content is only used to assist in understanding the concept and technical solution of the present invention. It does not necessarily belong to the prior art of this patent application. In the absence of clear evidence that the above content has been disclosed on the filing date of this patent application, the above background technology should not be used to evaluate the novelty and creativity of the present application. Summary of the invention

[0005] The present application provides a method and system for automatically controlling the usage time of an electronic device, which is used to solve the problem that when multiple people share an electronic device, the administrator needs to frequently manually adjust the control measures.

[0006] To achieve the above objectives, the present application discloses the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a method for automatically controlling the usage time of an electronic device, comprising the following steps:

[0008] In response to a first operation of the electronic device by the first user, activating a camera of the electronic device to capture a first facial image of the first user;

[0009] Obtain the target usage time requested by the first user;

[0010] comparing the captured first facial image with pre-stored user facial images stored in a local or cloud database to determine whether the first user is a restricted user;

[0011] When it is determined that the first user is a restricted user, the remaining usage time of the first user for the day is obtained from a database storing user usage records;

[0012] Compare the target usage time with the remaining usage time of the day: if the target usage time is less than or equal to the remaining usage time of the day, set the target usage time as the usage time to be confirmed; if the target usage time is greater than the remaining usage time of the day, set the remaining usage time of the day as the usage time to be confirmed;

[0013] According to the usage time to be confirmed and the preset allowed usage time period, the current allowed usage time is obtained;

[0014] When the first user's usage time of the electronic device reaches the current allowed usage time, the electronic device is controlled to automatically shut down.

[0015] In the embodiment of the present application, in response to the first user's first operation on the electronic device, the camera of the electronic device is used to capture the facial image of the current operating user and compare it with the pre-stored image in the database, ensuring that the identity of the current user can be automatically confirmed each time it is used. In this way, it can be ensured that the usage record of each user is independent and accurate, effectively avoiding identity confusion when sharing equipment.

[0016] After confirming the user's identity, the remaining usage time of the user for the day is automatically obtained and compared with the target usage time requested by the user to automatically determine the usage time to be confirmed. In this way, on the one hand, the errors and complexity of manual operation can be effectively avoided; on the other hand, the usage time of each user can be reasonably allocated. In this way, the efficiency and flexibility of time management are improved, ensuring that the usage time of each user meets the preset limit and preventing overtime usage.

[0017] In addition, the permitted usage time is obtained based on the usage time to be confirmed and the preset permitted usage time period, which can ensure that the user can only use the electronic device within the permitted time period.

[0018] To sum up, the embodiments of the present application ensure the security and usage specifications of electronic devices in a shared environment, and can automatically adjust and allocate usage time according to user requests and remaining usage time. There is no need for administrators to frequently and manually adjust the device's usage permissions and time settings, thereby reducing the management burden of administrators when multiple people share the device.

[0019] In some possible implementations of the first aspect, the step of obtaining the current permitted usage duration according to the usage duration to be confirmed and the preset permitted usage time period includes:

[0020] Get the current system time of the electronic device and determine whether the current system time is within the allowed usage time period:

[0021] If the current system time is not within the permitted usage time period, rejecting the first user's usage request, and controlling the electronic device to pop up a message window on its display screen to prompt the user that the current time is unavailable;

[0022] If the current system time is within the permitted time period, then the duration from the current system time to the end time of the permitted time period is calculated to obtain a first duration;

[0023] Compare the usage duration to be confirmed with the first duration:

[0024] When the usage time to be confirmed is less than or equal to the first time, the usage time to be confirmed is set as the current allowed usage time;

[0025] When the usage time to be confirmed is greater than the first time, the first time is set as the allowed usage time for this time. In this way, the goal of allowing users to use electronic devices only within the set usage time period is effectively achieved. The system can not only dynamically adjust the usage time, but also promptly remind users that the current time is unavailable, preventing users from trying repeatedly, thereby improving user experience and system management efficiency.

[0026] In some possible implementations of the first aspect, the method for automatically controlling the usage time of an electronic device further includes the following steps:

[0027] During the period when the first user uses the electronic device, randomly selecting a value from a preset array as a time interval;

[0028] When the time interval arrives, reactivating the camera of the electronic device to capture a facial image of the current user;

[0029] comparing the facial image of the current user with the facial image of the first user;

[0030] If it is determined that the current user is not the same as the first user, an abnormal event notification is generated and sent to the preset management terminal, and the electronic device is controlled to automatically shut down. Among them, irregular identity authentication can make the inspection process unpredictable, thereby effectively preventing users from evading detection by guessing the inspection time, which is conducive to ensuring that the actual user of the electronic device is always the intended user, and preventing users who have used up their daily usage time from borrowing other people's time to continue using the device.

[0031] In addition, when the system detects that the current user is inconsistent with the initial user, it will immediately generate and send an abnormal event notification to the management terminal, so that the management personnel can deal with the relevant situation in time to prevent further illegal use. At the same time, it is convenient for the management personnel to carry out necessary education and management on the illegal users and strengthen the use regulations. In addition, the function of automatically shutting down the device can also effectively protect the security of the device and the integrity of the data, and prevent potential damage caused by unauthorized use.

[0032] In some possible implementations of the first aspect, the step of obtaining the target usage duration requested by the first user includes:

[0033] Obtaining the expected usage duration requested by the first user;

[0034] Compare the expected usage time with the preset single maximum time;

[0035] If the expected usage time is less than or equal to the preset single maximum time, the expected usage time is set as the target usage time;

[0036] If the expected usage time is longer than the preset maximum single time, the preset maximum single time is set as the target usage time. In this way, it can effectively prevent users from using electronic devices continuously for a long time and avoid health problems caused by excessive use of users (such as decreased vision, fatigue, etc.).

[0037] In some possible implementations of the first aspect, when the usage time to be confirmed is greater than the first time, the control electronic device pops up a message window on its display screen to prompt the user of the allowed usage time. In this way, the user can understand that the allowed usage time is inconsistent with the expected time, so as to reasonably allocate the usage time.

[0038] In some possible implementations of the first aspect, in response to the first user's first operation on the electronic device, a usage notification is also generated and sent to a preset management terminal. In this way, the manager only needs to monitor the terminal to understand the usage of all devices, simplifying the management process.

[0039] In a second aspect, an embodiment of the present application provides a system for automatically controlling the usage time of an electronic device, comprising:

[0040] A first activation module, configured to activate a camera of the electronic device to capture a first facial image of the first user in response to a first operation of the first user on the electronic device;

[0041] A first acquisition module, used to acquire the target usage time requested by the first user;

[0042] a first comparison module, configured to compare the captured first facial image with pre-stored user facial images stored in a local or cloud database to determine whether the first user is a restricted user;

[0043] A second acquisition module, configured to acquire the remaining usage time of the first user on the current day from a database storing user usage records when it is determined that the first user is a restricted user;

[0044] The second comparison module is used to compare the target usage time with the remaining usage time of the day: if the target usage time is less than or equal to the remaining usage time of the day, the target usage time is set as the usage time to be confirmed; if the target usage time is greater than the remaining usage time of the day, the remaining usage time of the day is set as the usage time to be confirmed;

[0045] A third acquisition module is used to obtain the current permitted usage time according to the usage time to be confirmed and the preset permitted usage time period;

[0046] The automatic shut-down module is used to control the electronic device to automatically shut down when the first user's usage time of the electronic device reaches the current allowed usage time.

[0047] In some possible implementations of the second aspect, the third acquisition module is specifically used to: obtain the current system time of the electronic device, and determine whether the current system time is within the allowed usage time period; if the current system time is not within the allowed usage time period, reject the first user's usage request, and control the electronic device to pop up a message window on its display screen to prompt the user that the current time is unavailable; if the current system time is within the allowed usage time period, calculate the duration from the current system time to the end time of the allowed usage time period to obtain a first duration; compare the usage duration to be confirmed with the first duration: when the usage duration to be confirmed is less than or equal to the first duration, set the usage duration to be confirmed as the current allowed usage time; when the usage duration to be confirmed is greater than the first duration, set the first duration as the current allowed usage time.

[0048] In some possible implementations of the second aspect, the system for automatically controlling the usage time of an electronic device also includes a monitoring module, which is used to randomly select a value from a preset array as a time interval while a first user is using the electronic device; when the time interval is reached, reactivate the camera of the electronic device to capture the facial image of the current user; compare the facial image of the current user with the facial image of the first user; if it is determined that the current user is inconsistent with the first user, generate and send an abnormal event notification to a preset management terminal, and control the electronic device to automatically shut down.

[0049] In some possible implementations of the second aspect, the first acquisition module is specifically used to: obtain the expected usage time requested by the first user; compare the expected usage time with the preset single maximum time; if the expected usage time is less than or equal to the preset single maximum time, set the expected usage time as the target usage time; if the expected usage time is greater than the preset single maximum time, set the preset single maximum time as the target usage time.

[0050] In some possible implementations of the second aspect, the third acquisition module is further specifically used to control the electronic device to pop up a message window on its display screen to prompt the user of the allowed usage time when the usage time to be confirmed is greater than the first time.

[0051] In some possible implementations of the second aspect, the first activation module is specifically used to generate and send a usage notification to a preset management terminal in response to a first operation of the electronic device by the first user.

[0052] In a third aspect, an embodiment of the present application provides an electronic device, comprising one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any technical solution of the first aspect.

[0053] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in any technical solution of the first aspect is implemented.

[0054] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in any technical solution of the first aspect.

[0055] Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0057] Figure 1 A flowchart of a method for automatically controlling the usage time of an electronic device provided in some embodiments of the present application;

[0058] Figure 2 A schematic diagram of the structure of a system for automatically controlling the usage time of an electronic device provided in some embodiments of the present application;

[0059] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present application. DETAILED DESCRIPTION

[0060] Specific embodiments of the present invention will now be mentioned in detail. Although the present invention is described in conjunction with these specific embodiments, it should be appreciated that it is not intended to limit the present invention to these specific embodiments. On the contrary, these embodiments are intended to cover substitutions, changes or equivalent embodiments that may be included in the spirit and scope of the invention defined by the claims. In the following description, a large number of specific details are set forth in order to provide a comprehensive understanding of the present invention. The present invention may be implemented without some or all of these specific details.

[0061] When used in conjunction with "including," "methods comprising," or similar language in this specification and the appended claims, the singular forms "a," "an," and "the" include plural references unless the context clearly dictates otherwise. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0062] Application Overview:

[0063] With the rapid development of modern technology, electronic devices have become an indispensable part of people's daily lives, including smartphones, tablets, laptops, etc. While these devices provide convenience and entertainment for people, they also cause a series of problems, especially the negative impact of excessive use of electronic devices on health and productivity. In order to deal with these problems, a variety of methods and tools for controlling the use time of electronic devices have appeared on the market. However, the existing methods for controlling the use time of electronic devices usually set a fixed time interval, and then automatically switch the electronic device to a restricted state after the time is reached, such as locking the screen, limiting the use of applications, etc. Although this method can effectively limit the use time of electronic devices to a certain extent, its limitations are also obvious:

[0064] When an electronic device is switched to a restricted state, no one can use the electronic device unless the administrator lifts the restriction. This causes the administrator to frequently manually adjust control measures when multiple people share an electronic device, thereby increasing the complexity of operations and the burden of management.

[0065] In response to the above technical problems, the overall idea of ​​the technical solution provided by the present application is as follows: a method for automatically controlling the usage time of an electronic device is provided, comprising the following steps: in response to a first operation of the electronic device by a first user, activating a camera of the electronic device to capture a first facial image of the first user; obtaining a target usage time requested by the first user; comparing the captured first facial image with a pre-stored user facial image stored in a local or cloud database to determine whether the first user is a restricted user; when it is determined that the first user is a restricted user, obtaining the remaining usage time of the first user for the day from a database storing user usage records; comparing the target usage time with the remaining usage time for the day: if the target usage time is less than or equal to the remaining usage time for the day, setting the target usage time as the usage time to be confirmed; if the target usage time is greater than the remaining usage time for the day, setting the remaining usage time for the day as the usage time to be confirmed; obtaining the current permitted usage time based on the usage time to be confirmed and the preset permitted usage time period; when the first user's usage time of the electronic device reaches the current permitted usage time, controlling the electronic device to automatically shut down.

[0066] In response to the first operation of the electronic device by the first user, the facial image of the current operating user is captured by the camera of the electronic device and compared with the pre-stored image in the database, so as to ensure that the identity of the current user can be automatically confirmed each time the device is used. In this way, the usage record of each user can be guaranteed to be independent and accurate, effectively avoiding identity confusion when sharing the device.

[0067] After confirming the user's identity, the remaining usage time of the user for the day is automatically obtained and compared with the target usage time requested by the user to automatically determine the usage time to be confirmed. In this way, on the one hand, the errors and complexity of manual operation can be effectively avoided; on the other hand, the usage time of each user can be reasonably allocated. In this way, the efficiency and flexibility of time management are improved, ensuring that the usage time of each user meets the preset limit and preventing overtime usage.

[0068] In addition, the permitted usage time is obtained based on the usage time to be confirmed and the preset permitted usage time period, which can ensure that the user can only use the electronic device within the permitted time period.

[0069] To sum up, the embodiments of the present application ensure the security and usage specifications of electronic devices in a shared environment, and can automatically adjust and allocate usage time according to user requests and remaining usage time. There is no need for administrators to frequently and manually adjust the device's usage permissions and time settings, thereby reducing the management burden of administrators when multiple people share the device.

[0070] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application will be specifically described below in conjunction with the drawings in the specification.

[0071] In a first aspect, an embodiment of the present application provides a method for automatically controlling the usage time of an electronic device, comprising the following steps:

[0072] S101: In response to a first operation of a first user on an electronic device, activating a camera of the electronic device to capture a first facial image of the first user;

[0073] Specifically, taking the electronic device as a mobile phone as an example, the first operation may be that the user presses the power button, the volume up button, the volume down button, or wakes up the screen.

[0074] S102: Obtaining the target usage time requested by the first user;

[0075] The execution subject of the method for automatically controlling the usage time of an electronic device (for example, the processor of the electronic device) can obtain the target usage time requested by the first user through the following steps:

[0076] The first step is to obtain the expected usage time requested by the first user;

[0077] Exemplarily, the user inputs the expected usage time through a user interface (UI) of the electronic device, which may be a touch screen interface, voice command, or other input device.

[0078] The second step is to compare the expected usage time with the preset single maximum time;

[0079] Step 3: If the expected usage time is less than or equal to the preset single maximum time, the expected usage time is set as the target usage time;

[0080] Step 4: If the expected usage time is longer than the preset maximum single time, the preset maximum single time is set as the target usage time. In this way, users can be effectively prevented from using electronic devices continuously for a long time, thus avoiding health problems (such as decreased vision, fatigue, etc.) caused by excessive use.

[0081] Specifically, the target usage time can be determined by the following formula:

[0082]

[0083] Where:

[0084] T request : Expected usage duration of the user request.

[0085] T max : The preset maximum duration of a single time.

[0086] Ttarget : Target usage time.

[0087] S103: comparing the captured first facial image with pre-stored user facial images stored in a local or cloud database to determine whether the first user is a restricted user;

[0088] Exemplarily, a convolutional neural network (CNN) is used to process the captured facial image and extract a feature vector. The distance between the captured facial feature vector and the pre-stored facial feature vector is calculated using the Euclidean distance formula to determine whether they are the same user. If the distance is less than a set threshold, it is determined to be the same user, otherwise it is determined to be a different user. The Euclidean distance formula is as follows:

[0089]

[0090] Where:

[0091] x i : The i-th eigenvalue in the feature vector of the captured facial image.

[0092] y i : The i-th eigenvalue in the eigenvector of the pre-stored user facial image.

[0093] d: Euclidean distance, used to determine the similarity between the captured facial image and the pre-stored facial image. Of course, the present application is not limited thereto. In other embodiments, cosine similarity can also be used to compare two facial feature vectors.

[0094] S104: when it is determined that the first user is a restricted user, obtaining the remaining usage time of the first user for the day from a database storing user usage records;

[0095] Specifically, in some embodiments, the execution subject may obtain the remaining usage time of the first user on the day from a database storing user usage records based on the first facial image. Of course, the present application is not limited thereto. In other embodiments, the execution subject may also obtain the remaining usage time of the first user on the day from a database storing user usage records based on the name of the first user.

[0096] S105: Compare the target usage time with the remaining usage time of the day: if the target usage time is less than or equal to the remaining usage time of the day, set the target usage time as the usage time to be confirmed; if the target usage time is greater than the remaining usage time of the day, set the remaining usage time of the day as the usage time to be confirmed;

[0097] Specifically, the usage time to be confirmed can be determined by the following formula:

[0098]

[0099] Where:

[0100] T target : Target usage time.

[0101] T remaining : The remaining usage time for the day.

[0102] T confirm : Usage time to be confirmed.

[0103] S106: Obtaining the current permitted usage time according to the usage time to be confirmed and the preset permitted usage time period;

[0104] In some embodiments, the execution subject may obtain the current permitted usage duration according to the usage duration to be confirmed and the preset permitted usage time period through the following steps:

[0105] The first step is to obtain the current system time of the electronic device and determine whether the current system time is within the allowed usage time period:

[0106] Step 2: If the current system time is not within the permitted usage time period, the first user's usage request is rejected, and the electronic device is controlled to pop up a message window on its display screen to prompt the user that the current time is unavailable;

[0107] Step 3: If the current system time is within the allowed time period, then the duration from the current system time to the end time of the allowed time period is calculated to obtain a first duration;

[0108] Step 4: Compare the usage time to be confirmed with the first time:

[0109] Step 5: When the usage time to be confirmed is less than or equal to the first time, the usage time to be confirmed is set as the current allowed usage time;

[0110] Step 6: When the usage time to be confirmed is greater than the first time, the first time is set as the allowed usage time for this time. In this way, the goal of allowing users to use electronic devices only within the set usage time period is effectively achieved. The system can not only dynamically adjust the usage time, but also promptly remind users that the current time is unavailable, preventing users from trying repeatedly, thereby improving user experience and system management efficiency.

[0111] Specifically, the allowed usage time can be determined by the following formula:

[0112]

[0113] Where:

[0114] T confirm : Usage time to be confirmed.

[0115] T period : From the current system time t current Until the end time of the allowed use period t end Length of time.

[0116] T allowed : The duration of this usage allowed.

[0117] S107: When the first user's usage time of the electronic device reaches the current allowed usage time, the electronic device is controlled to automatically shut down.

[0118] Preferably, in some embodiments, the method for automatically controlling the usage time of an electronic device further comprises the following steps:

[0119] The first step is to randomly select a value from a preset array as a time interval during the period when the first user uses the electronic device;

[0120] The second step is to reactivate the camera of the electronic device to capture the facial image of the current user when the time interval arrives;

[0121] The third step is to compare the facial image of the current user with the facial image of the first user;

[0122] In the fourth step, if it is determined that the current user is not the same as the first user, an abnormal event notification is generated and sent to the preset management terminal, and the electronic device is controlled to automatically shut down. Among them, irregular identity authentication can make the inspection process unpredictable, thereby effectively preventing users from evading detection by guessing the inspection time, which is conducive to ensuring that the actual user of the electronic device is always the intended user, and preventing users who have used up their daily usage time from borrowing other people's time to continue using the device.

[0123] In addition, when the system detects that the current user is inconsistent with the initial user, it will immediately generate and send an abnormal event notification to the management terminal, so that the management personnel can deal with the relevant situation in time to prevent further illegal use. At the same time, it is convenient for the management personnel to carry out necessary education and management on the illegal users and strengthen the use regulations. In addition, the function of automatically shutting down the device can also effectively protect the security of the device and the integrity of the data, and prevent potential damage caused by unauthorized use.

[0124] Preferably, in some embodiments, when the usage time to be confirmed is greater than the first time, the control electronic device pops up a message window on its display screen to prompt the user of the allowed usage time. In this way, the user can understand that the allowed usage time is inconsistent with the expected time, so as to reasonably allocate the usage time.

[0125] Preferably, in some embodiments, in response to the first user's first operation on the electronic device, a usage notification is also generated and sent to a preset management terminal. In this way, the management personnel only need to monitor the terminal to understand the usage of all devices, simplifying the management process.

[0126] See also Figure 2 Based on the same inventive concept as the method for automatically controlling the usage time of an electronic device in the aforementioned embodiment, the embodiment of the present application provides a system for automatically controlling the usage time of an electronic device, comprising:

[0127] A first activation module 201, configured to activate a camera of the electronic device to capture a first facial image of the first user in response to a first operation of the first user on the electronic device;

[0128] A first acquisition module 202, configured to acquire a target usage duration requested by the first user;

[0129] A first comparison module 203, used to compare the captured first facial image with pre-stored user facial images stored in a local or cloud database to determine whether the first user is a restricted user;

[0130] The second acquisition module 204 is used to acquire the remaining usage time of the first user on the current day from a database storing user usage records when it is determined that the first user is a restricted user;

[0131] The second comparison module 205 is used to compare the target usage time with the remaining usage time of the day: if the target usage time is less than or equal to the remaining usage time of the day, the target usage time is set as the usage time to be confirmed; if the target usage time is greater than the remaining usage time of the day, the remaining usage time of the day is set as the usage time to be confirmed;

[0132] The third acquisition module 206 is used to obtain the current allowed usage time according to the usage time to be confirmed and the preset allowed usage time period;

[0133] The automatic shut-down module 207 is configured to control the electronic device to automatically shut down when the first user's usage time of the electronic device reaches the current allowed usage time.

[0134] In some embodiments, the third acquisition module 206 is specifically used to: obtain the current system time of the electronic device, and determine whether the current system time is within the allowed usage time period; if the current system time is not within the allowed usage time period, reject the first user's usage request, and control the electronic device to pop up a message window on its display screen to prompt the user that the current time is unavailable; if the current system time is within the allowed usage time period, calculate the duration from the current system time to the end time of the allowed usage time period to obtain a first duration; compare the usage duration to be confirmed with the first duration: when the usage duration to be confirmed is less than or equal to the first duration, set the usage duration to be confirmed as the current allowed usage time; when the usage duration to be confirmed is greater than the first duration, set the first duration as the current allowed usage time.

[0135] In some embodiments, the system for automatically controlling the usage time of an electronic device also includes a monitoring module 208, which is used to randomly select a value from a preset array as a time interval while a first user is using the electronic device; when the time interval is reached, reactivate the camera of the electronic device to capture the facial image of the current user; compare the facial image of the current user with the facial image of the first user; if it is determined that the current user is inconsistent with the first user, generate and send an abnormal event notification to a preset management terminal, and control the electronic device to automatically shut down.

[0136] In some embodiments, the first acquisition module 202 is specifically used to: obtain the expected usage time requested by the first user; compare the expected usage time with the preset single maximum time; if the expected usage time is less than or equal to the preset single maximum time, set the expected usage time as the target usage time; if the expected usage time is greater than the preset single maximum time, set the preset single maximum time as the target usage time.

[0137] In some embodiments, the third acquisition module 206 is further specifically configured to control the electronic device to pop up a message window on its display screen to prompt the user of the permitted usage time when the usage time to be confirmed is greater than the first time.

[0138] In some embodiments, the first activation module 201 is further configured to generate and send a usage notification to a preset management terminal in response to a first operation of the electronic device by the first user.

[0139] It is understandable that the modules and references recorded in the system for automatically controlling the use time of electronic devices Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the system for automatically controlling the use time of an electronic device and the modules contained therein, and will not be described in detail here.

[0140] See also Figure 3 , based on the inventive concept of a method for automatically controlling the use time of an electronic device in the aforementioned embodiment, an embodiment of the present application provides an electronic device. The electronic device may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device includes a processing device 301 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a ROM 302 (read-only memory) or a program loaded from a storage device 308 into a RAM 303 (random access memory). In RAM 303, various programs and data required for the operation of the electronic device are also stored. The processing device 301, ROM 302, and RAM 303 are connected to each other via a bus 304. An input / output interface (i.e., an I / O interface 305) is also connected to the bus 304.

[0141] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data.

[0142] In particular, according to some embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present application are executed.

[0143] It should be noted that the computer-readable medium recorded in some embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In some embodiments of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0144] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an adhoc peer-to-peer network), as well as any currently known or future developed network.

[0145] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to a first operation of the electronic device by the first user, activates the camera of the electronic device to capture a first facial image of the first user; obtains the target usage time requested by the first user; compares the captured first facial image with a pre-stored user facial image stored in a local or cloud database to determine whether the first user is a restricted user; when it is determined that the first user is a restricted user, obtains the remaining usage time of the first user for the day from a database storing user usage records; compares the target usage time with the remaining usage time for the day: if the target usage time is less than or equal to the remaining usage time for the day, sets the target usage time as the usage time to be confirmed; if the target usage time is greater than the remaining usage time for the day, sets the remaining usage time for the day as the usage time to be confirmed; obtains the current allowed usage time based on the usage time to be confirmed and the preset allowed usage time period; when the first user's usage time of the electronic device reaches the current allowed usage time, controls the electronic device to automatically shut down.

[0146] The computer program code for performing the operation of some embodiments of the present application can be written in one or more programming languages ​​or a combination thereof, and the above-mentioned programming languages ​​include object-oriented programming languages, such as Java, Smalltalk, C++, and also include conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0147] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0148] The modules described in some embodiments of the present application may be implemented by software or hardware. The modules described may also be set in a processor: for example, they may be described as: a first activation module, a first acquisition module, a first comparison module, a second acquisition module, a second comparison module, a third acquisition module, an automatic shutdown module, and a monitoring module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the first activation module may also be described as a "camera activation module."

[0149] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0150] Some embodiments of the present application also provide a computer program product, including a computer program, which implements any of the above-mentioned methods for automatically controlling the usage time of an electronic device when executed by a processor.

[0151] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.

Claims

1. A method for automatically controlling the usage time of an electronic device, characterized in that: The following steps are involved: In response to a first operation of the electronic device by a first user, activating a camera of the electronic device to capture a first facial image of the first user; Obtaining the target usage duration requested by the first user; Comparing the captured first facial image with pre-stored user facial images stored in a local or cloud database to determine whether the first user is a restricted user; When it is determined that the first user is a restricted user, obtaining the remaining usage time of the first user for the day from a database storing user usage records; Compare the target usage time with the remaining usage time of the day: if the target usage time is less than or equal to the remaining usage time of the day, set the target usage time as the usage time to be confirmed; if the target usage time is greater than the remaining usage time of the day, set the remaining usage time of the day as the usage time to be confirmed; According to the usage time to be confirmed and the preset allowed usage time period, the current allowed usage time is obtained; When the usage time of the electronic device by the first user reaches the current allowed usage time, the electronic device is controlled to be automatically shut down.

2. The method for automatically controlling the usage time of an electronic device according to claim 1, characterized in that: The step of obtaining the current permitted usage time according to the usage time to be confirmed and the preset permitted usage time period includes: Obtain the current system time of the electronic device, and determine whether the current system time is within the permitted usage time period: If the current system time is not within the permitted usage time period, rejecting the first user's usage request, and controlling the electronic device to pop up a message window on its display screen to prompt the user that the current time is unavailable; If the current system time is within the permitted use time period, then calculating the duration from the current system time to the end time of the permitted use time period to obtain a first duration; Compare the usage duration to be confirmed with the first duration: When the usage time to be confirmed is less than or equal to the first time, setting the usage time to be confirmed as the current allowed usage time; When the usage duration to be confirmed is greater than the first duration, the first duration is set as the current allowed usage duration.

3. The method for automatically controlling the usage time of an electronic device according to claim 1, characterized in that: The following steps are also included: During the period when the first user uses the electronic device, randomly selecting a value from a preset array as a time interval; When the time interval arrives, reactivating the camera of the electronic device to capture a facial image of the current user; comparing the facial image of the current user with the facial image of the first user; If it is determined that the current user is not consistent with the first user, an abnormal event notification is generated and sent to a preset management terminal, and the electronic device is controlled to automatically shut down.

4. The method for automatically controlling the usage time of an electronic device according to claim 1, characterized in that: The step of obtaining the target usage duration requested by the first user includes: Obtaining the expected usage duration requested by the first user; Comparing the expected usage duration with a preset single maximum duration; If the expected usage time is less than or equal to the preset single maximum time, the expected usage time is set as the target usage time; If the expected usage time is less than or equal to the preset single maximum usage time, the preset single maximum usage time is set as the target usage time.

5. The method for automatically controlling the usage time of an electronic device according to claim 2, characterized in that: When the usage time to be confirmed is greater than the first time, the electronic device is controlled to pop up a message window on its display screen to prompt the user of the allowed usage time.

6. The method for automatically controlling the usage time of an electronic device according to any one of claims 1 to 5, characterized in that: In response to the first user's first operation on the electronic device, a usage notification is also generated and sent to a preset management terminal.

7. A system for automatically controlling the usage time of an electronic device, characterized in that: include: A first activation module, configured to activate a camera of the electronic device to capture a first facial image of the first user in response to a first operation of the first user on the electronic device; A first acquisition module, used to acquire the target usage time requested by the first user; a first comparison module, configured to compare the captured first facial image with pre-stored user facial images stored in a local or cloud database to determine whether the first user is a restricted user; A second acquisition module, configured to acquire the remaining usage time of the first user on the current day from a database storing user usage records when it is determined that the first user is a restricted user; The second comparison module is used to compare the target usage time with the remaining usage time of the day: if the target usage time is less than or equal to the remaining usage time of the day, the target usage time is set as the usage time to be confirmed; if the target usage time is greater than the remaining usage time of the day, the remaining usage time of the day is set as the usage time to be confirmed; A third acquisition module is used to obtain the current permitted usage time according to the usage time to be confirmed and the preset permitted usage time period; The automatic shut-down module is used to control the electronic device to automatically shut down when the first user's usage time of the electronic device reaches the current allowed usage time.

8. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processing device, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processing device, the method according to any one of claims 1 to 6 is implemented.