Anti-addiction method, electronic device and computer readable storage medium
By collecting battery status information and system time of electronic equipment, judging the number of battery cycles and setting charging and discharge parameters and temperature thresholds, effective prevention of addiction for minors using electronic equipment is achieved, and failure to effectively prevent long-term development in the existing technology is solved. The problem of time usage enhances the real-time and effectiveness of anti-addiction.
Patent Information
- Application Number
- CN202310466183.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-26
- Publication Date
- 2024-11-05
AI Technical Summary
The prior art is difficult to effectively prevent minors from using electronic devices for a long time, especially the problems of insufficient self-control and the traditional software anti-addiction mode being easily bypassed.
By collecting battery status information and system time of the electronic device, we can determine whether the battery cycle times exceeds the preset threshold, set the battery charge and discharge parameters and temperature threshold, prompt the user to enter the anti-addiction mode, and restore the initial state at the system refresh time.
It realizes effective control over the use of electronic devices for minors, avoids long-term use, enhances the real-time and effectiveness of anti-addiction, and avoids the behavior of bypassing the anti-addiction mode.
Smart Images

Figure CN118897768A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an anti-addiction technology, and in particular to an anti-addiction method, an electronic device and a computer-readable storage medium. Background Art
[0002] With the development of society, electronic devices such as smart phones are becoming more and more popular, and their functions are becoming more and more powerful. Now many people spend most of their time on their mobile phones, playing games, browsing Weibo and videos on their phones, and the playing time is getting longer and longer, and they may play for the whole day. Especially now that minors lack self-control, they play with mobile phones and other electronic devices more unrestrainedly, which seriously affects the physical health and academic performance of minors.
[0003] The traditional solution is:
[0004] The first one relies mainly on self-control. If the child is a minor, supervision from parents or other adults is required.
[0005] Secondly, many software applications (applications, APPs) have added software protection modes to prevent minors from playing such APPs for a long time.
[0006] Traditional solutions have the following disadvantages:
[0007] In the first case, it is difficult for parents or adults to conduct real-time supervision and prevent children from playing with mobile phones for a long time. Adults sometimes lack self-control and need external assistance.
[0008] In the second case, the software protection mode can only prevent the long-term use of such apps. If you don’t play such apps, there are other types of apps that can be played, and there are many ways to bypass this anti-addiction mode. Summary of the invention
[0009] In view of the above, it is necessary to provide an anti-addiction method, an electronic device and a computer-readable storage medium that can solve the above problems existing in the prior art.
[0010] An embodiment of the present invention provides an anti-addiction method, which is applied to an electronic device, and the method includes: collecting battery status information and system time of the electronic device, the battery status information including at least battery cycle number, battery state of charge, charging status and battery temperature; judging whether the system time has reached the refresh time; if not, judging whether the battery cycle number is greater than a first preset threshold value according to the battery status information; and if so, setting the battery charging and discharging parameters and changing the battery temperature threshold, and prompting the user to enter the anti-addiction mode.
[0011] Optionally, setting the battery charging and discharging parameters and changing the battery temperature threshold include: determining whether the battery state of charge is greater than a second preset threshold and current charging is completed; if so, setting the charging current of the battery of the electronic device to a third preset value or static charging; and reducing the discharge current of the battery of the electronic device to a fourth preset value or reducing the battery temperature threshold to a fifth preset value.
[0012] Optionally, the method further includes: if the system time reaches the refresh time, restoring the battery state to an initial state.
[0013] Optionally, the method further includes: when the battery cycle number is not greater than a preset threshold, continuing to collect battery status information and system time of the electronic device.
[0014] An embodiment of the present invention also provides an electronic device, which includes a memory, a processor, and an anti-addiction program stored in the memory and executable on the processor, wherein the anti-addiction program implements the following steps when executed by the processor: collecting battery status information and system time of the electronic device, wherein the battery status information includes at least the number of battery cycles, battery state of charge, charging status, and battery temperature; determining whether the system time reaches a refresh time; if not, determining whether the number of battery cycles is greater than a first preset threshold value based on the battery status information; and if so, setting the battery charging and discharging parameters and changing the battery temperature threshold, and prompting the user to enter anti-addiction mode.
[0015] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the anti-addiction method as described above are implemented.
[0016] Compared with the prior art, the uplink frequency hopping method, device and computer-readable storage medium, in this embodiment, collects the battery status information and system time of the electronic device; determines whether the system time reaches the refresh time; if not, determines whether the battery cycle number is greater than the first preset threshold value according to the battery status information; if so, sets the battery charge and discharge parameters and changes the battery temperature threshold, and prompts the user to enter the anti-addiction mode. In this way, the anti-addiction function can be achieved by controlling the battery charge and discharge and temporarily changing the battery temperature threshold. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a program module diagram of a preferred embodiment of the electronic device of the present invention.
[0018] Figure 2 It is a flow chart of the anti-addiction method of a preferred embodiment of the present invention.
[0019] Main component symbols
[0020] Electronic device 10
[0021] Memory 20
[0022] Processor 30
[0023] Acquisition Module 101
[0024] Determination module 102
[0025] Setting Module 103
[0026] Initialization module 104
[0027] Steps S20 to S28
[0028] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0029] See also Figure 1 , is a program module diagram of a preferred embodiment of the electronic device 10 of the present invention. The electronic device 10 includes a collection module 101, a judgment module 102, a setting module 103 and an initialization module 104. The electronic device 10 also includes a memory 20 and a processor 30. The collection module 101, the judgment module 102, the setting module 103 and the initialization module 104 of the present invention are computer program segments that complete a specific instruction. The memory 20 is used to store data such as program codes of the electronic device 10. The processor 30 is used to execute the program code stored in the memory 20.
[0030] The memory 20 includes at least one type of storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. The processor 30 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips, etc.
[0031] The acquisition module 101 is used to acquire the battery status information and system time of the electronic device.
[0032] Specifically, the battery status information includes at least the number of battery cycles, the battery state of charge, the charging state and the battery temperature.
[0033] The state of charge (SOC) of a battery is defined as the state of available electrical energy in a battery. The state of charge is the ratio of the remaining capacity of a battery after it has been used for a period of time or has been left unused for a long time to its capacity in a fully charged state, usually expressed as a percentage. Its value range is 0 to 1. When SOC = 0, it means that the battery is fully discharged, and when SOC = 1, it means that the battery is fully charged. The charging state is specifically to determine whether the battery is being charged.
[0034] The determination module 102 is used to determine whether the system time has reached a refresh time.
[0035] The judgment module 102 is further configured to judge whether the battery cycle count is greater than a first preset threshold according to the battery status information when it is judged that the system time has not reached the refresh time.
[0036] One cycle is a complete charge and discharge cycle. When the battery reaches a complete charge cycle, the number of battery cycles will increase by 1. The first preset threshold is set by the developer according to the degree of anti-addiction. In a more preferred embodiment, it can also be set by the user of the electronic device. For example, it is set to 2 times. When the number of battery cycles reaches two times, the anti-addiction parameter setting is performed. This embodiment is not limited to this.
[0037] When the judgment module 102 determines that the number of battery cycles is greater than the first preset threshold, the setting module 103 is used to set the battery charging and discharging parameters and change the battery temperature threshold, and prompt the user to enter the anti-addiction mode.
[0038] The judging module 102 is further used to judge whether the battery state of charge is greater than a second preset threshold and the current charging is finished;
[0039] If so, the setting module 103 is also used to set the charging current of the battery of the electronic device to a third preset threshold or static charging when the judgment module 102 determines that the battery charge state is greater than the second preset threshold and the current charging is completed; and reduce the discharge current of the battery of the electronic device to a fourth preset threshold or reduce the battery temperature threshold to a fifth preset threshold.
[0040] In this embodiment, when the battery charge state is used to determine that the current power of the electronic device is not too low and the current charging is finished, the charging current of the battery of the electronic device is limited or charging is limited, and the discharge current of the battery of the electronic device is reduced or the battery temperature threshold is reduced to restrict the user from using the application. Furthermore, the user can be prompted on the screen to pay attention to the power level and enter the anti-addiction or control mode.
[0041] The initialization module 104 is configured to restore the battery state to an initial state when the determination module 102 determines that the system time has reached a refresh time.
[0042] Specifically, if the judgment module 102 judges that the system time reaches the refresh time, the initialization module 104 restores the battery state to the initial state, for example, resets the number of cycles per day, enables charging, and restores the battery temperature threshold and the charge and discharge current. The refresh time can be preset, for example, set to 8 am. The present invention is not limited to this.
[0043] In this embodiment, the first preset threshold, the second preset threshold, the third preset threshold, the fourth preset threshold and the fifth preset threshold are only for the convenience of description to distinguish different values and are not intended as specific limitations.
[0044] In this embodiment, the battery status information and system time of the electronic device are collected; it is determined whether the system time reaches the refresh time; if not, it is determined whether the battery cycle number is greater than a first preset threshold value according to the battery status information; if so, the battery charge and discharge parameters are set and the battery temperature threshold is changed, and the user is prompted to enter the anti-addiction mode. In this way, the anti-addiction function can be achieved by controlling the battery charge and discharge and temporarily changing the battery temperature threshold.
[0045] See also Figure 2 , which is a flow chart of an anti-addiction method according to a preferred embodiment of the present invention. The anti-addiction method can be executed by the processor 30 Figure 1 The module 101-104 shown is implemented.
[0046] Step S20, collecting battery status information and system time of the electronic device.
[0047] Specifically, the battery status information includes at least the number of battery cycles, the battery state of charge, the charging state and the battery temperature.
[0048] The state of charge (SOC) of a battery is defined as the state of available electrical energy in a battery. The state of charge is the ratio of the remaining capacity of a battery after it has been used for a period of time or has been left unused for a long time to its capacity in a fully charged state, usually expressed as a percentage. Its value range is 0 to 1. When SOC = 0, it means that the battery is fully discharged, and when SOC = 1, it means that the battery is fully charged. The charging state is specifically to determine whether the battery is being charged.
[0049] Step S22, determining whether the system time has reached the refresh time. If the system time has not reached the refresh time, executing step S24, otherwise executing step S28.
[0050] Step S24, judging whether the battery cycle number is greater than a first preset threshold value according to the battery status information. If yes, executing step S26, if no, executing step S20.
[0051] One cycle is a complete charge and discharge cycle. When the battery reaches a complete charge cycle, the number of battery cycles will increase by 1. The first preset threshold is set by the developer according to the degree of anti-addiction. In a more preferred embodiment, it can also be set by the user of the electronic device. For example, it is set to 2 times. When the number of battery cycles reaches two times, the anti-addiction parameter setting is performed. This embodiment is not limited to this.
[0052] Step S26, setting the battery charging and discharging parameters and changing the battery temperature threshold, and prompting the user to enter the anti-addiction mode.
[0053] In step S26, setting the battery charge and discharge parameters and changing the battery temperature threshold specifically includes:
[0054] Determining whether the battery state of charge is greater than a second preset threshold and current charging is completed;
[0055] If yes, setting the charging current of the battery of the electronic device to a third preset threshold or static charging; and
[0056] The discharge current of the battery of the electronic device is reduced to a fourth preset threshold or the battery temperature threshold is reduced to a fifth preset threshold.
[0057] In this embodiment, when the battery charge state is used to determine that the current power of the electronic device is not too low and the current charging is finished, the charging current of the battery of the electronic device is limited or charging is limited, and the discharge current of the battery of the electronic device is reduced or the battery temperature threshold is reduced to restrict the user from using the application. Furthermore, the user can be prompted on the screen to pay attention to the power level and enter the anti-addiction or control mode.
[0058] Step S28, restoring the battery status to the initial status.
[0059] Specifically, if the system time reaches the refresh time, the battery state is restored to the initial state, for example, the number of cycles per day is reset, charging is enabled, and the battery temperature threshold and the charge and discharge current are restored. The refresh time can be preset, for example, set to 8 am. The present invention is not limited to this.
[0060] In this embodiment, the first preset threshold, the second preset threshold, the third preset threshold, the fourth preset threshold and the fifth preset threshold are only for the convenience of description to distinguish different values and are not intended as specific limitations.
[0061] In this embodiment, the battery status information and system time of the electronic device are collected; it is determined whether the system time reaches the refresh time; if not, it is determined whether the battery cycle number is greater than a first preset threshold value according to the battery status information; if so, the battery charge and discharge parameters are set and the battery temperature threshold is changed, and the user is prompted to enter the anti-addiction mode. In this way, the anti-addiction function can be achieved by controlling the battery charge and discharge and temporarily changing the battery temperature threshold.
[0062] This embodiment also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the anti-addiction method as described above are implemented.
[0063] It is worth noting that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. An anti-addiction method, applied to an electronic device, characterized in that: The method comprises: Collecting battery status information and system time of the electronic device, wherein the battery status information includes at least battery cycle count, battery state of charge, charging state and battery temperature; Determine whether the system time reaches the refresh time; If the system time has not reached the refresh time, determining whether the battery cycle count is greater than a first preset threshold value according to the battery status information; and If it is determined that the battery cycle number is greater than the first preset threshold, the battery charge and discharge parameters are set, the battery temperature threshold is changed, and the user is prompted to enter the anti-addiction mode.
2. The anti-addiction method according to claim 1, characterized in that: The setting of the battery charge and discharge parameters and the changing of the battery temperature threshold include: Determining whether the battery state of charge is greater than a second preset threshold and current charging is completed; If yes, setting the charging current of the battery of the electronic device to a third preset threshold or static charging; and The discharge current of the battery of the electronic device is reduced to a fourth preset threshold or the battery temperature threshold is reduced to a fifth preset threshold.
3. The anti-addiction method according to claim 1, characterized in that: The method further comprises: If the system time reaches the refresh time, the battery state is restored to the initial state.
4. The anti-addiction method according to claim 1, characterized in that: The method further comprises: When the battery cycle count is not greater than the first preset threshold, the battery status information and system time of the electronic device continue to be collected.
5. An electronic device, characterized in that: The electronic device includes a memory, a processor, and an anti-addiction program stored in the memory and executable on the processor. When the anti-addiction program is executed by the processor, the following steps are implemented: Collecting battery status information and system time of the electronic device, wherein the battery status information includes at least battery cycle count, battery state of charge, charging state and battery temperature; Determine whether the system time reaches the refresh time; If the system time has not reached the refresh time, determining whether the battery cycle count is greater than a first preset threshold according to the battery status information; and If it is determined that the battery cycle number is greater than the first preset threshold, the battery charge and discharge parameters are set, the battery temperature threshold is changed, and the user is prompted to enter the anti-addiction mode.
6. The electronic device as claimed in claim 5, characterized in that: The setting of the battery charge and discharge parameters and the changing of the battery temperature threshold include: Determining whether the battery state of charge is greater than a second preset threshold and current charging is completed; If yes, setting the charging current of the battery of the electronic device to a third preset threshold or static charging; and The discharge current of the battery of the electronic device is reduced to a fourth preset threshold or the battery temperature threshold is reduced to a fifth preset threshold.
7. The electronic device method according to claim 5, characterized in that: When the anti-addiction program is executed by the processor, the following steps are implemented: If the system time reaches the refresh time, the battery state is restored to the initial state.
8. The electronic device method as claimed in claim 5, characterized in that: When the anti-addiction program is executed by the processor, the following steps are implemented: When the battery cycle count is not greater than the first preset threshold, the battery status information and system time of the electronic device continue to be collected.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the anti-addiction method as claimed in any one of claims 1 to 4.
