Anti-myopia glasses control method and equipment based on scene prediction and medium
By introducing a scene prediction method into anti-myopia glasses, which uses distance and duration to determine and dynamically adjust the working status, the inaccuracy of early warning caused by a single threshold in existing technologies is solved. This achieves adaptation to multiple scenarios and users, improving ease of use and accuracy.
Patent Information
- Application Number
- CN202511480132.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2026-02-17
AI Technical Summary
Existing infrared-based anti-myopia glasses use a single fixed threshold for distance determination, resulting in excessively frequent or delayed warnings, which compromises the accuracy and effectiveness of alerts and fails to meet the needs of different users and scenarios.
By using scene prediction methods, the distance and duration between the anti-myopia glasses and the target object are used, combined with scene switching counters and timers, to dynamically adjust the working status, achieve personalized adaptation for various scenarios and users, and avoid frequent operations and false alarms.
It improves the ease of use and accuracy of anti-myopia glasses, adapts to the needs of different users and scenarios, reduces invalid alarms, and enhances the wearing experience for children.
Smart Images

Figure CN121545310A_ABST
Abstract
Description
Technical Field
[0001] This application generally relates to the field of anti-myopia glasses technology, and specifically to an anti-myopia glasses control method, device and medium based on scene prediction. Background Technology
[0002] Existing infrared-based anti-myopia glasses can calculate the distance between the target object and the glasses based on the principle of infrared reflection, and determine whether the teenager's sitting posture is correct based on whether the distance is less than a set threshold, thereby triggering an early warning reminder to help teenagers prevent myopia.
[0003] However, in actual use, the comfortable and appropriate distance required by each user varies in different scenarios, and there are also differences between different users. Currently, most infrared-based children's anti-myopia glasses on the market rely on a single fixed threshold distance for warnings. This is very inconvenient for children, especially as they grow. If a single fixed threshold is still used for distance judgment, warnings may become too frequent or delayed, thus losing the accuracy and effectiveness of the warnings. Summary of the Invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a method, device and medium for controlling myopia prevention glasses based on scene prediction.
[0005] In a first aspect, this application provides a method for controlling myopia prevention glasses based on scene prediction, including: In response to the power-on signal, the anti-myopia glasses enter their first working state; Obtain the first distance between the current anti-myopia glasses and the target object; If it is determined that the first distance is less than the first preset threshold and the duration is less than or equal to the first preset duration but greater than the second preset duration, then the scene switching counter is incremented by 1. If the count after incrementing the scene switching counter by 1 is 1, then the scene switching timer is started to count down, and the countdown duration is the third preset duration. If, within the third preset time period, the scene switching counter is detected to display a first preset value, the anti-myopia glasses are switched from the first working state to the second working state.
[0006] According to the technical solution provided in this application, the method further includes: When the anti-myopia glasses are in the second working state, the second distance between the current anti-myopia glasses and the target object is obtained; If it is determined that the second distance is greater than the second preset threshold and the duration is greater than the fourth preset duration, then the scene switching counter is incremented by 1 until the scene switching counter is displayed as the second preset value, and the anti-myopia glasses are switched from the second working state to the first working state.
[0007] According to the technical solution provided in this application, after obtaining the first distance between the current anti-myopia glasses and the target object, the method further includes: If it is determined that the first distance is less than the first preset threshold and the duration is greater than the first preset duration, a first warning is issued and the reading of the current control scene switching counter is cleared to zero; the first warning is used to prompt the user to adjust their posture.
[0008] According to the technical solution provided in this application, if the count after the scene switching counter is incremented by 1 is 1, then after starting the scene switching timer for timing, the method further includes: If, within the third preset time period, the count display of the scene switching counter is not found to be the first preset value, then after the third preset time period ends, the display of the scene switching counter is cleared to zero and the scene switching timer is reset, and the step of obtaining the first distance between the current anti-myopia glasses and the target object is executed repeatedly.
[0009] According to the technical solution provided in this application, after obtaining the first distance between the current anti-myopia glasses and the target object, the method further includes: If the first distance is determined to be greater than or equal to a first preset threshold, the step of obtaining the first distance between the current anti-myopia glasses and the target object is executed repeatedly.
[0010] According to the technical solution provided in this application, after obtaining the second distance between the current anti-myopia glasses and the target object, the method further includes: If it is determined that the second distance is less than the second preset threshold and the duration is greater than the fifth preset duration, then a second warning is issued and the reading of the scene switching counter is cleared to zero. The process of obtaining the second distance between the current anti-myopia glasses and the target object is executed repeatedly.
[0011] According to the technical solution provided in this application, after obtaining the second distance between the current anti-myopia glasses and the target object, the method further includes: If it is determined that the second distance is greater than the second preset threshold and the duration is less than the fourth preset duration, then the reading of the scene switching counter is cleared to zero. The process of obtaining the second distance between the current anti-myopia glasses and the target object is executed repeatedly.
[0012] According to the technical solution provided in this application, the first preset threshold is greater than the second preset threshold; the first preset threshold is set according to the distance of the user in the reading scenario, and the second preset threshold is set according to the distance of the user in the reading and writing scenario.
[0013] In a second aspect, the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.
[0014] Thirdly, the present invention provides a computer-readable storage medium having a computer program that, when executed by a processor, implements the steps of the above-described method.
[0015] In summary, this technical solution specifically discloses a method, device, and medium for controlling anti-myopia glasses based on scene prediction. The method includes: responding to a power-on signal, the anti-myopia glasses enter a first working state; acquiring a first distance between the current anti-myopia glasses and a target object; determining that the first distance is less than a first preset threshold and its duration is less than or equal to a first preset duration but greater than a second preset duration, then incrementing a scene switching counter by 1; if the scene switching counter displays as 1 after incrementing, then starting a scene switching timer for a countdown duration of a third preset duration; within the second preset duration, if the scene switching counter displays as a first preset value, then switching the anti-myopia glasses from the first working state to the second working state.
[0016] Current myopia prevention glasses still use a single fixed threshold for distance judgment, which leads to either overly frequent or delayed warnings, resulting in a loss of accuracy and effectiveness. This application addresses this by setting dynamic and multiple judgment conditions for the switching between two different working states of current myopia prevention glasses. By strictly judging two dynamic variables—distance and duration—alarms are triggered or scene switching counters are established, significantly reducing the interference of invalid alarms on children, avoiding frequent threshold adjustments, and improving children's wearing experience. Attached Figure Description
[0017] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating a method for controlling myopia prevention glasses based on scene prediction.
[0018] Figure 2 This is a schematic diagram of the structure of an anti-myopia glasses.
[0019] Figure 3 This is a schematic diagram of the hardware system.
[0020] Figure 4 This is a schematic diagram of a terminal device.
[0021] The diagram is labeled as follows: 1. Left temple; 2. Right temple; 3. Hardware system; 31. Power management module; 32. Infrared rangefinder sensor; 33. Main control chip; 34. Buzzer; 4. Eyeglass frame; 5. Lens; 8. Terminal device; 500. Terminal device; 501. CPU; 502. ROM; 503. RAM; 504. Bus; 505. I / O interface; 506. Input section; 507. Output section; 508. Storage section; 509. Communication section; 510. Driver; 511. Removable media; Detailed Implementation The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0022] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0023] Example 1 To make the technical solutions of the embodiments of this application clearer and easier to understand, the application background of the embodiments of this application is introduced below.
[0024] In recent years, the proportion of teenagers with myopia has been increasing. How to prevent myopia or reduce the increase in myopia has become a topic of concern. Among them, the quality of teenagers' eye habits largely determines whether they are prone to myopia. Children and teenagers are in the education stage, and if their eyes are too close to the target object for a long time while reading, writing, or studying by looking at a mobile phone screen, they are more likely to develop myopia.
[0025] Existing infrared-based anti-myopia glasses can calculate the distance between the target object and the glasses based on the principle of infrared reflection. They can then determine if the teenager's posture is correct based on whether the distance is less than a set threshold, triggering an early warning to help prevent myopia. For example, the glasses' hardware system integrates an infrared transmitter and an infrared receiver: the transmitter continuously emits low-power infrared light, which is reflected when it encounters a target object (such as a book, desk, or mobile phone screen); the receiver captures the reflected infrared signal and, combining the reflected signal intensity, calculates the real-time distance between the glasses and the target object.
[0026] However, in actual use, the comfortable and suitable distance required by each user varies in different scenarios, and there are also differences between different users. Currently, most infrared-based children's anti-myopia glasses on the market use a single fixed threshold distance judgment and reminder, which is very inconvenient for children to use. It is impossible to adjust the distance according to the usage needs of each child in different usage scenarios. Especially as children's bodies develop, setting a suitable threshold that conforms to individual usage habits is necessary for children to wear anti-myopia glasses more comfortably; otherwise, in order to avoid frequent alarms from the anti-myopia glasses, parents need to constantly adjust the threshold according to the child's needs.
[0027] In view of this, this application proposes a scene prediction-based method for controlling anti-myopia glasses, comprising: responding to a power-on signal, the anti-myopia glasses enter a first working state; obtaining a first distance between the current anti-myopia glasses and a target object; determining that the first distance is less than a first preset threshold and the duration is less than or equal to a first preset duration but greater than a second preset duration, then incrementing a scene switching counter by 1; if the count after incrementing the scene switching counter is 1, then starting a scene switching timer for a countdown of a third preset duration; within the second preset duration, if the count of the scene switching counter is detected to be the first preset value, then switching the anti-myopia glasses from the first working state to the second working state. It can be seen that this application predicts the switching of usage scenarios by linking the distance between the anti-myopia glasses and the target object, the duration, and the counter, automatically switching the anti-myopia glasses from the first working state to the second working state, avoiding the inconvenience of frequent operations, adapting to the visual needs of different scenarios, reducing false alarms, and improving ease of use.
[0028] To make the technical solution of this application clearer and easier to understand, the following description, in conjunction with the accompanying drawings, introduces the scene prediction-based myopia prevention glasses control method provided in the embodiments of this application. Figure 1 As shown, this figure is a flowchart of a scene prediction-based anti-myopia glasses control method provided in an embodiment of this application. The execution subject of this method can be the control system of the anti-myopia glasses, and the method includes: S101, The control system responds to the power-on signal, and the anti-myopia glasses enter the first working state; The anti-myopia glasses implemented in this application include two modes: normal wearing and anti-myopia wearing. When the user wears the anti-myopia glasses and presses the button to turn on the device, the anti-myopia glasses are in the anti-myopia wearing mode. The control system of the anti-myopia glasses responds to the power-on signal and directly enters the first working state by default. The first working state here is, for example, reading scene monitoring, which means monitoring the user's reading posture in a reading scene to prevent the user from being too close to the book.
[0029] S102, The control system obtains the first distance between the current anti-myopia glasses and the target object; Generally, the first distance is the straight line between the anti-myopia glasses and the target object, denoted as . The target object can be a desk or a book, without any special restrictions. It mainly depends on the static object in the user's wearing scenario. For example, in a reading and writing scenario, the target object can be a desk, while in a reading scenario, the target object is a book.
[0030] S103. If the control system determines that the first distance is less than the first preset threshold and the duration is less than or equal to the first preset duration but greater than the second preset duration, then the control scene switching counter is incremented by 1. Specifically, when the control system determines the first distance First preset threshold This means that the distance between the user's eyes and the target object is too close, requiring monitoring or a warning. However, because users engage in different activities while wearing glasses, their posture varies depending on the activity. For example, during reading and writing, the user's gaze switches between reading and writing, while during reading, the gaze remains focused on the book. In actual usage scenarios, the activities of reading and writing may switch between each other at any time. Therefore, relying solely on data analysis is insufficient to meet user needs.
[0031] In view of this, after obtaining the first distance First preset threshold After determining the result, this embodiment of the application further needs to obtain the duration, that is, the obtained duration must also satisfy: the second preset duration. Duration First preset duration If the first distance is reached, the scene switching counter is incremented by 1; otherwise, if the first distance is reached... First preset threshold If the distance between the current user and the target object is appropriate, no special processing is required. The system will return to step S102 and continue monitoring the first distance between the current anti-myopia glasses and the target object.
[0032] The first preset threshold here As a boundary value used to monitor the distance between a user's eyes and the book in a reading scenario, this value can be set according to the user's reading distance. This value can be set by the user using an app connected to the anti-myopia glasses. Specific data is not specifically limited here, but it can generally be set between 10cm and 40cm; the second preset duration and the first preset duration This serves as the boundary value for the duration of the corresponding action, and there is a second preset duration between these two values. Less than the first preset duration The relationship between the size of the two preset durations is as follows: It should be noted that the first preset duration is the minimum warning time. An alarm will sound when the distance between the user's eyes and the book remains below the first preset threshold for an extended period exceeding the first preset duration. To balance the timeliness of the alert with the frequency of triggering (a first preset duration that is too long will result in insufficient alerts and harm the user's vision; conversely, a first preset duration that is too short will trigger too frequently, affecting the user experience), the first preset duration is generally set to 6-9 seconds. The second preset duration is to avoid brief, accidental triggering situations, such as an insect flying across the infrared beam or a pencil brushing against it; these brief triggering situations are generally set to 1-4 seconds.
[0033] For example, the second preset duration You can set it to 4 seconds, the first preset duration. You can choose 6s; no specific restrictions are set here.
[0034] In addition, the control system determines the first distance When the value is less than the first preset threshold, the following situations also apply: (1) The control system determines the first distance Less than the first preset threshold However, the duration Less than the second preset duration Since the duration is too short, it is assumed that the false trigger may be caused by an object in the air, such as a moving flying insect. At this time, no operation is performed, and the process returns to step S102 to continue monitoring the first distance between the current anti-myopia glasses and the target object.
[0035] (2) Determine the first distance Less than the first preset threshold And duration Greater than the first preset duration If the first warning is triggered, the first warning will be issued and the reading of the current control scene switching counter will be cleared to zero; the first warning is used to prompt the user to adjust their posture.
[0036] Due to the first preset threshold As the boundary line for monitoring, when the real-time distance between the user and the target object is continuously less than a first preset threshold. And duration Greater than the first preset duration If the user's reading posture is incorrect and they are too close to the book, it will be determined that the posture is incorrect and needs to be adjusted in time. The first warning can be issued by the anti-myopia glasses emitting a beeping sound.
[0037] S104. If the control system finds that the count after the scene switching counter is incremented by 1 is 1, it starts the scene switching timer to count down, and the countdown duration is the third preset duration. Specifically, because the scene switching counter satisfies the above "first distance" First preset threshold "And "the second preset duration" Duration First preset duration "When the timer increments by 1, the time and distance will be recalculated, and the number of scene switching counts will be accumulated. Therefore, the scene switching counter will accumulate. When the scene switching counter is incremented by 1, it means that the current scene switching counter is incrementing from 0. At this time, the scene switching timer needs to be started to count down. The countdown duration is the third preset duration."
[0038] For example, suppose that the second preset duration The preset duration is 4 seconds. The third preset duration is 6 seconds. The countdown is 120 seconds. If the scene switching counter increments by 1 and the displayed count is 1, then a 120-second countdown begins. Within these 120 seconds, if the first distance... The situation where the value is less than the first preset threshold occurs intermittently, with durations of 5s, 4s, 3s and 5s respectively. The scene switching counter will be incremented by 1 in both the first and second instances of the 5s duration. At the same time, since the scene switching counter does not start accumulating from 0, the scene switching timer will not be triggered to start again for these two counts.
[0039] S105, the control system during the third preset time period If the scene switching counter is detected to display a first preset value, then... Then the anti-myopia glasses will be switched from the first working state to the second working state.
[0040] If the scene transition counter reaches the first preset value before the countdown ends. The first preset value here Values such as 3 and 4 can be used, without any specific restrictions; if the countdown reaches the first preset value within the countdown period... This indicates that the user is not in a stable reading position at this time, and the first distance between the anti-myopia glasses and the target object... Intermittently multiple times less than the first preset threshold Furthermore, the duration is within a preset range and does not remain below the first preset threshold for an extended period. Therefore, excluding the influence of incorrect user posture, the system determines that the current user has left the stable reading scenario and entered the reading and writing scenario. The control system will then automatically switch from the first working state to the second working state, which can be understood as reading and writing scenario monitoring.
[0041] Furthermore, if the count after incrementing the scene switching counter by 1 is 1, then after starting the scene switching timer, another scenario is included: during the third preset duration... If the scene switching counter is detected to be not at the first preset value, Then, in the third preset duration After the timer expires, the display of the scene switching counter is cleared to zero and the scene switching timer is reset. The step of obtaining the first distance between the current anti-myopia glasses and the target object is executed repeatedly.
[0042] When the third preset duration The first preset value was not reached within the count. If the reading timer is clear, it indicates that the user is still in a stable reading environment and has not engaged in frequent close-range intermittent activities. The control system automatically resets the scene switching counter and scene switching timer and restarts the cyclic judgment. The initial monitoring state can be restored without manual intervention. It can be seen that the automatic reset and cyclic monitoring design adopted in this embodiment of the application not only ensures the continuity of monitoring in a stable environment and does not miss the risk of close-range eye use, but also avoids the interference of the scene switching timer and the residual value of the scene switching timer on subsequent judgments, ensuring the long-term reliable operation of the function.
[0043] In this embodiment of the application, when the anti-myopia glasses are switched from the first working state to the second working state, it indicates that the anti-myopia glasses have been switched to read / write scene monitoring. The method includes the following steps: Step A1: When the anti-myopia glasses are in the second working state, the control system acquires the second distance between the current anti-myopia glasses and the target object. ; Step A2: The control system determines the second distance. Greater than the second preset threshold And duration Greater than the fourth preset duration Then, the scene switching counter is incremented by 1 until the scene switching counter displays a second preset value. The anti-myopia glasses are switched from the second working state to the first working state.
[0044] In reading and writing scenario monitoring, if the second distance between the anti-myopia glasses and the target object... Greater than the second preset threshold If the distance between the user and the target object is too far, exceeding the set value, the control system needs to determine whether the user has transitioned from reading / writing to reading. Therefore, it further determines the duration of this action. If the duration of this action exceeds the fourth preset duration... Then, the scene switching counter is incremented by 1 until the scene switching counter displays the second preset value. This indicates that the user has entered a stable state of maintaining a long distance from the target object, and the control system automatically switches the anti-myopia glasses from the current reading and writing monitoring to reading monitoring.
[0045] It should be noted that the scene switching counter here has been reset when the anti-myopia glasses switch from the first working state to the second working state. Similarly, the scene switching counter and scene switching timer will also be reset when the anti-myopia glasses switch from the second working state to the first working state. This will not be elaborated further here. The aforementioned second distance... This also represents the distance between the user's eyes and the target object, which could be a desktop or a pen tip. Since this is a reading and writing scenario, the second preset threshold is used here. It will be slightly less than the first preset threshold. However, the overall distance should be within the range of 10cm to 40cm, and this value can also be set by the user using the APP connected to the anti-myopia glasses; fourth, preset duration. This fourth preset duration serves as a boundary value for the duration of the corresponding action. You can set a time of 5 minutes; second preset value. It can be set to 2 or 3, without any special restrictions.
[0046] In addition, the control system obtains a second distance between the current anti-myopia glasses and the target object. Following this, the following situations are also included: (1) Determine the second distance Greater than the second preset threshold And duration Less than the fourth preset duration If the scene switching counter is cleared, the second distance between the current anti-myopia glasses and the target object is obtained by repeatedly executing the process. The steps.
[0047] Following on from the above, at the second distance Greater than the second preset threshold After that, there is still a duration. Less than the fourth preset duration This indicates that the user's current action is far from the target object, but the action is short-term and unstable (such as briefly looking up or adjusting posture while writing, rather than truly switching to a long reading state). In this case, the scene switching counter needs to be reset to zero to avoid erroneously triggering scene switching and disrupting the stability of the function.
[0048] (2) Determine the second distance Less than the second preset threshold And duration Greater than the fifth preset duration If the error occurs, a second warning will be issued, and the display of the scene switching counter will be cleared to zero; the process of obtaining the second distance between the current anti-myopia glasses and the target object will be repeated. The steps.
[0049] When the second distance Less than the second preset threshold This indicates that the user is currently close to the target object. To prevent interference from objects in the current scene, the duration is still monitored. The system performs auxiliary judgments, and when it is found that the duration of the user's action of approaching the target object has exceeded the fifth preset duration, it will determine whether the action is effective. If the distance to the target object is too close, a second warning will be issued. This second warning can also take the form of a beeping sound, which will remind the user that the distance to the target object is too close and needs to be adjusted in time. At the same time, the scene switching counter will be reset to zero and enter a new distance and scene monitoring process to ensure that the abnormal state of close-range eye use does not interfere with the scene switching judgment, thereby maintaining the accuracy of scene judgment.
[0050] Based on the above description, this application proposes a scene prediction-based control method for anti-myopia glasses. This method, applied to anti-myopia glasses, can meet the needs of setting distance thresholds for various scenarios and different users, making it more convenient for users to wear and use. Specifically, in response to the power-on signal, the method enters the first working state, which is the reading monitoring state. During the monitoring process, it is necessary to monitor the first distance between the anti-myopia glasses and the target object in real time. At the same time, it is judged based on the comparison between the first distance and the first preset threshold, as well as the duration of the first distance being less than the first preset threshold, to determine whether the user's current state meets the counting conditions for switching scenes. If the current user state does not meet the counting conditions for switching scenes, the scene switching counter is incremented by 1 until the count of the scene switching counter reaches the corresponding first preset value within the countdown time, indicating that the user's intention and action characteristics to enter the reading and writing scene are obvious. Therefore, the control system can automatically control the anti-myopia glasses to switch from the first working state to the second working state for more accurate reading and writing monitoring.
[0051] Therefore, this method has two main advantages. First, by defaulting to reading monitoring mode upon startup, it effectively identifies whether the user meets the scene switching counting conditions by combining real-time comparison of the first distance with the first preset threshold and judging the duration of distance being less than the threshold. Then, it uses "the counter reaching the first preset value within the countdown" as the switching criterion, accurately capturing the user's intention and action characteristics when entering the reading and writing scene, and realizing automatic switching from reading monitoring to reading and writing monitoring. This avoids false alarms or frequent operation problems caused by improper scene adaptation in traditional fixed threshold or manual switching modes, making eye monitoring more accurate in different scenarios. Second, this method supports customized distance threshold settings for various scenarios and different users. It can adapt to the differentiated needs of different eye use scenarios such as reading and reading and writing, and also meet the personalized threshold preferences of different users (such as children of different heights and eye use habits). Users do not need to manually adjust repeatedly when switching scenes, which greatly reduces the operational burden and makes it more convenient for users to wear and use. At the same time, it always maintains effective monitoring of the risk of close-range eye use, ensuring the myopia prevention effect while improving the overall user experience.
[0052] The above text combined Figure 1 The active power control method for electrochemical energy storage power stations provided in the embodiments of this application has been described in detail below, and will be further explained in conjunction with the appendix. Figure 2 , Figure 3 and Figure 4 The anti-myopia glasses, devices, and media provided in the embodiments of this application are described.
[0053] This application proposes an anti-myopia glasses, which includes a left temple 1, a right temple 2, a hardware system 3, a frame 4, and lenses 5. Since the left temple 1, right temple 2, frame 4, and lenses 5 are structures found in conventional eyeglasses, they will not be described in detail here. Only the hardware system 3 will be briefly described: The hardware system 3 includes a power management module 31, an infrared ranging sensor 32, a main control chip 33, and a buzzer 34. The hardware system 3 can also perform Bluetooth control and data transmission with the terminal device 8 (such as a mobile phone with a built-in APP, a tablet, or a computer).
[0054] Specifically, when the hardware system 3 in the anti-myopia glasses is not powered on, the glasses can be worn as normal glasses. The wearer can choose whether to install lenses, and whether to choose plano or prescription lenses, to meet various needs. This can help users without myopia prevent myopia and help users with mild myopia slow down the progression of myopia. Furthermore, after the hardware system 3 is powered on, the power management module 31 supplies power to the main control chip 33 and the infrared ranging sensor 32. The main control chip 33 will activate the infrared ranging sensor 32 to detect the distance between the glasses and the target object through instructions, and will alarm or switch monitoring scenes according to the set threshold. In the hardware system 3, the power management module 31 supplies power to the infrared ranging sensor 32 and the main control chip 33, and the main control chip 33 sends instructions to the infrared ranging sensor 32 to start measuring distance. The infrared ranging sensor 32 returns the distance data between the glasses and the target object to the main control chip 33. The main control chip 33 determines whether to switch scenes and whether to control the buzzer to issue a warning based on the distance data and the set first preset threshold and second preset threshold. The hardware system 3 can be connected to the APP via Bluetooth. The APP can set the thresholds in the hardware system 3 and record the number of warnings, time, trigger distance and other information for easy viewing by the user.
[0055] Therefore, this application proposes an anti-myopia glasses that can be used as ordinary glasses and also help users regulate the distance between their eyes and objects, thus preventing or slowing down myopia and protecting the eye health of users (e.g., teenagers). Furthermore, the scene-prediction-based dynamic threshold adjustment method used in this application allows for manual threshold adjustment via an app to adapt to different developmental stages of teenagers. It can also automatically switch threshold settings based on the teenager's usage scenario (reading or writing), avoiding frequent threshold adjustments and frequent false alarms, greatly improving the wearing experience for children and effectively preventing or slowing down myopia. Finally, the hardware system designed in this invention has a simple structure, with all hardware components concentrated on the right temple, making it lightweight and almost identical to wearing normal glasses, without adding excessive burden to teenagers wearing glasses.
[0056] The present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a large-scale memory management method for incremental injection and forgetting prevention as described in Embodiment 1.
[0057] In this embodiment, as Figure 4As shown, the terminal device 500 includes a CPU (Central Processing Unit) 501, which can perform various appropriate actions and processes according to a program stored in ROM (Read-Only Memory) 502 or a program loaded from storage into RAM (Random Access Memory) 503. RAM 503 also stores various programs and data required for system operation. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An I / O (Input / Output) interface 505 is also connected to the bus 504.
[0058] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.
[0059] In particular, according to embodiments of the present invention, the above-described flowchart is as follows. Figure 1 The described process can be implemented as a computer software program. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by CPU 501, it performs the functions defined above in the system of the present invention.
[0060] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, RAM 503, ROM 502, 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 thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0061] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0062] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself. The described units or modules can also be located in a processor; for example, a processor can be described as including a first generation module, an acquisition module, a search module, a second generation module, and a merging module. The names of these units or modules do not necessarily limit the specific unit or module itself; for example, the acquisition module can also be described as "an acquisition module for acquiring multiple instances to be probed in the base table".
[0063] The present invention also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to implement a large-scale memory management method for incremental injection and forgetting prevention as described in the above embodiments.
[0064] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for controlling myopia prevention glasses based on scene prediction, characterized in that, include: In response to the power-on signal, the anti-myopia glasses enter their first working state; Obtain the first distance between the current anti-myopia glasses and the target object; If it is determined that the first distance is less than the first preset threshold and the duration is less than or equal to the first preset duration but greater than the second preset duration, then the scene switching counter is incremented by 1. If the count after incrementing the scene switching counter by 1 is 1, then the scene switching timer is started to count down, and the countdown duration is the third preset duration. If, within the third preset time period, the scene switching counter is detected to display a first preset value, the anti-myopia glasses are switched from the first working state to the second working state.
2. The method for controlling myopia prevention glasses based on scene prediction according to claim 1, characterized in that, The method also includes: When the anti-myopia glasses are in the second working state, the second distance between the current anti-myopia glasses and the target object is obtained; If it is determined that the second distance is greater than the second preset threshold and the duration is greater than the fourth preset duration, then the scene switching counter is incremented by 1 until the scene switching counter is displayed as the second preset value, and the anti-myopia glasses are switched from the second working state to the first working state.
3. The method for controlling myopia prevention glasses based on scene prediction according to claim 1, characterized in that, After obtaining the initial distance between the current anti-myopia glasses and the target object, it also includes: If it is determined that the first distance is less than the first preset threshold and the duration is greater than the first preset duration, a first warning is issued and the reading of the current control scene switching counter is cleared to zero; the first warning is used to prompt the user to adjust their posture.
4. The method for controlling myopia prevention glasses based on scene prediction according to claim 1, characterized in that, If the count after incrementing the scene switching counter by 1 is 1, then after starting the scene switching timer, the process also includes: If, within the third preset time period, the count display of the scene switching counter is not found to be the first preset value, then after the third preset time period ends, the display of the scene switching counter is cleared to zero and the scene switching timer is reset, and the step of obtaining the first distance between the current anti-myopia glasses and the target object is executed repeatedly.
5. The method for controlling myopia prevention glasses based on scene prediction according to claim 1, characterized in that, After obtaining the initial distance between the current anti-myopia glasses and the target object, it also includes: If the first distance is determined to be greater than or equal to a first preset threshold, the step of obtaining the first distance between the current anti-myopia glasses and the target object is executed repeatedly.
6. The method for controlling myopia prevention glasses based on scene prediction according to claim 2, characterized in that, After obtaining the second distance between the current anti-myopia glasses and the target object, it also includes: If it is determined that the second distance is less than the second preset threshold and the duration is greater than the fifth preset duration, then a second warning is issued and the reading of the scene switching counter is cleared to zero. The process of obtaining the second distance between the current anti-myopia glasses and the target object is executed repeatedly.
7. The method for controlling myopia prevention glasses based on scene prediction according to claim 2, characterized in that, After obtaining the second distance between the current anti-myopia glasses and the target object, it also includes: If it is determined that the second distance is greater than the second preset threshold and the duration is less than the fourth preset duration, then the reading of the scene switching counter is cleared to zero. The process of obtaining the second distance between the current anti-myopia glasses and the target object is executed repeatedly.
8. The method for controlling myopia prevention glasses based on scene prediction according to claim 2, characterized in that, The first preset threshold is greater than the second preset threshold; the first preset threshold is set according to the distance of the user in the reading scenario, and the second preset threshold is set according to the distance of the user in the reading and writing scenario.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.