A computer state control method, device, equipment and storage medium

By dynamically identifying the computer's operating environment and updating scene configuration parameters, and combining system time and user input time for intelligent decision-making, the problem of insufficient intelligence in computer terminal status control is solved, achieving a synergistic improvement in security and convenience.

CN122240190APending Publication Date: 2026-06-19SHENZHEN GONGJIN ELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN GONGJIN ELECTRONICS CO LTD
Filing Date
2026-01-27
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies lack intelligence in computer terminal status control and cannot dynamically adjust according to the differentiated needs of different network areas, resulting in insufficient security and convenience.

Method used

By periodically identifying the computer's operating environment, obtaining the corresponding scenario configuration parameter set from the preset scenario database, dynamically updating the idle judgment threshold, planned execution time and its instructions, and making intelligent decisions in conjunction with system time and user input time, the coordinated execution of idle response and planned tasks is realized.

Benefits of technology

It improves the intelligence level of the computer status control system, ensures high security and operational continuity in a dynamic office environment, and avoids security risks and operational interruptions caused by globally unified configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240190A_ABST
    Figure CN122240190A_ABST
Patent Text Reader

Abstract

This application relates to the technical field of computer management, and more particularly to a computer state control method, apparatus, device, and storage medium. It includes: periodically identifying the current operating environment and obtaining a set of scenario configuration parameters corresponding to the current operating environment; updating an idle determination threshold, an idle instruction, at least one planned execution time, and planned instructions corresponding to each planned execution time based on the matched scenario configuration parameter set; obtaining the current system time of the target computer and determining whether the current system time matches any of the said planned execution times; if it matches any of the said planned execution times, executing the planned instruction corresponding to the matching time; otherwise, obtaining the last input time of the target computer, determining whether the target computer is in an idle state based on the last input time and the idle determination threshold, and executing an idle instruction if the target computer is determined to be in an idle state. This application improves the intelligence level of the computer state control system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of computer management, and in particular to a computer state control method, apparatus, device, and storage medium. Background Technology

[0002] With the diversification of enterprise office environments, computer terminals often need to be switched between different network areas (such as intranet office areas, external network isolation areas, and remote access environments). In these scenarios, users have significantly different needs regarding the security and convenience of system idle response strategies (such as automatic screen off, screen lock, or hibernation). To ensure information security and improve energy efficiency, operating systems and terminal management platforms have generally introduced time-threshold-based state control mechanisms.

[0003] Current mainstream technologies typically rely on users manually configuring or administrators uniformly issuing fixed idle thresholds and scheduled execution policies. For example, Windows operating systems set uniform screen-off or sleep times through power options; in enterprise environments, Group Policy or Mobile Device Management (MDM) tools are often used to deploy global rules. In actual operation, such solutions determine whether a user is idle based solely on a single time dimension, and scheduled tasks (such as timed screen locking) and idle response logic are independent of each other, lacking coordination, which limits the intelligence level of the computer state control system. Summary of the Invention

[0004] To overcome the shortcomings of the prior art, this application provides a computer state control method, apparatus, device, and storage medium, which improves the intelligence level of the computer state control system.

[0005] The technical solution adopted by this application to solve its technical problem is: In a first aspect, this application provides a computer state control method applied to a target computer, the method comprising: Periodically identify the current operating environment and retrieve the set of scenario configuration parameters corresponding to the current operating environment from a preset scenario database; Based on the matched scenario configuration parameter set, update the idle determination threshold, idle instruction, at least one planned execution time, and the planned instruction corresponding to each planned execution time; Obtain the current system time of the target computer and determine whether the current system time matches any of the planned execution times; If the current system time matches any of the planned execution times, the matched planned execution time is determined as the matching time, and the planned instruction corresponding to the matching time is executed. Otherwise, the last input time of the target computer is obtained, and the target computer is determined to be in an idle state based on the last input time and the idle determination threshold. If the target computer is determined to be in an idle state, the idle instruction is executed.

[0006] Optionally, the step of periodically identifying the current operating environment includes: The target computer is periodically subjected to domain name collection to obtain its current network domain name; The current operating environment is determined based on the current network domain name.

[0007] Optionally, after the step of executing the planned instruction corresponding to the matching time, the method further includes: If the planned execution instruction is canceled, the instruction cancellation time is obtained, and a first time difference between the instruction cancellation time and the matching time is calculated; If the first time difference is less than the preset difference threshold, then this execution will be recorded as a false triggering event; Periodically count the frequency of false triggering events associated with each parameter item, and determine the first update parameter based on the frequency of false triggering events; The set of scene configuration parameters corresponding to the currently matched scene in the preset scene database is updated according to the first update parameter.

[0008] Optionally, the step of obtaining the last input time of the target computer includes: Call the input event monitoring interface provided by the system to obtain the last interaction information; The last input time is determined based on the last interaction information.

[0009] Optionally, the step of determining whether the target computer is in an idle state based on the last input time and the idle determination threshold includes: Calculate the second time difference between the current system time and the last input time, and determine whether the second time difference reaches the idle determination threshold; If the second time difference reaches the idle determination threshold, then the target computer is determined to be in the idle state.

[0010] Optionally, after the step of executing the idle instruction, the method further includes: Record second change events resulting from user intervention; Periodically count the adjustment frequency of each parameter item in the second change event, and determine the parameter items whose adjustment frequency reaches the preset frequency threshold as the second update parameters; The set of scene configuration parameters corresponding to the currently matched scene in the preset scene database is updated according to the second update parameter.

[0011] Optionally, the method further includes: Continuously monitor for emergency stop commands; In response to the emergency stop command, all automated operations are terminated.

[0012] Secondly, this application provides a computer state control device applied to a target computer, comprising: The scene recognition module is used to periodically identify the current operating environment and obtain the scene configuration parameter set corresponding to the current operating environment from the preset scene database; The parameter import module is used to update the idle judgment threshold, idle instruction, at least one planned execution time, and the planned instruction corresponding to each of the planned execution times according to the matched scenario configuration parameter set. The node matching module is used to obtain the current system time of the target computer and determine whether the current system time matches any of the planned execution times; The plan execution module is used to determine the matched plan execution time as the matching time if the current system time matches any of the planned execution times, and to execute the plan instruction corresponding to the matching time. The idle identification module is used to obtain the last input time of the target computer, determine whether the target computer is in an idle state based on the last input time and the idle determination threshold, and execute the idle instruction when the target computer is determined to be in an idle state.

[0013] Thirdly, this application provides an electronic device, comprising: One or more processors; One or more memory units; And one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions that, when executed by the one or more processors, cause the electronic device to perform the methods described above.

[0014] Fourthly, this application provides a computer-readable storage medium storing a program or instructions that, when executed, implement the above-described method.

[0015] The computer state control method provided in this application dynamically senses the operating environment of the target computer and calls a matching set of scenario configuration parameters accordingly, thereby automatically updating the idle judgment threshold, idle command, planned execution time, and corresponding planned commands. Based on this, the system first compares the current system time with the preset planned execution time in real time. If a match is found, the corresponding planned command is executed immediately; if no match is found, the system obtains the last input time and combines it with the updated idle judgment threshold to determine whether the target computer is in an idle state. Upon confirmation of idleness, the corresponding idle command is executed. The entire process organically integrates planned control and the idle response mechanism into the same decision framework, and all control parameters are adaptively adjusted according to changes in the operating environment.

[0016] Based on this, the beneficial effects of this application are: overcoming the shortcomings of static strategies and fragmented scenarios in mainstream technologies. Specifically, because the system can periodically identify the current operating environment and load the corresponding scenario configuration parameter set, different network areas (such as intranet office areas or remote access environments) can be associated with differentiated idle thresholds and planned tasks, thereby avoiding security risks or operational interruptions caused by globally unified configurations. At the same time, the planned execution time and idle determination logic are incorporated into a unified execution priority judgment process, first checking whether the planned time has been reached, and then falling back to idle detection, so that the two types of control strategies no longer operate in isolation, but form an orderly and collaborative state response system.

[0017] This not only improves the accuracy of strategy adaptation but also enhances the system's intelligence level in changing office environments, enabling computer state control to meet the timely protection needs of high-security scenarios while also ensuring operational continuity in highly interactive scenarios. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the computer state control method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the virtual structure of the computer status control device provided in this application; Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0019] The present application will be further described below with reference to the accompanying drawings and embodiments.

[0020] The following will clearly and completely describe the concept, specific structure, and resulting technical effects of this application in conjunction with embodiments and accompanying drawings, so as to fully understand the purpose, features, and effects of this application. Obviously, the described embodiments are only a part of the embodiments of this application, not all of them. Other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are all within the scope of protection of this application. Furthermore, all connections / linkages involved in the patent do not simply refer to direct contact between components, but rather to the ability to form a better connection structure by adding or reducing connecting accessories according to specific implementation conditions. The various technical features in this application can be combined interactively without contradicting each other.

[0021] In modern electronics manufacturing and office environments, energy management and information security control of computer terminals are increasingly becoming key aspects of refined enterprise operations. With the increasing automation of production lines and the widespread adoption of office informatization, many PCs remain in standby or inefficient operation for extended periods, resulting not only in energy waste but also potential data leakage risks. Therefore, achieving coordinated energy conservation and security management through automatic screen shutdown, screen locking, and even hibernation has become a common requirement in industrial and office settings.

[0022] To improve the intelligence level of computer state control, refer to Figure 1 , Figure 1 This is a flowchart illustrating the computer state control method provided in an embodiment of this application. Figure 1 The image illustrates several key steps involved in the intelligent computer state management solution provided in this application, which are described in detail below: In step S1, the current operating environment is identified periodically, and the set of scene configuration parameters corresponding to the current operating environment is obtained from the preset scene database.

[0023] The current operating environment refers to the network context characteristics of the target computer at the current moment. Different operating environments correspond to different security policies and usage habits, such as corporate intranets, branch offices, or remote office networks.

[0024] The preset scenario database is a collection of data storing multiple scenario configuration parameter sets. Each scenario configuration parameter set is pre-associated with a specific network domain name (i.e., a runtime environment). The scenario database can be deployed on a local or remote server to support the mapping from runtime environment to control policy. The scenario configuration parameter set contains a set of adjustable parameters for controlling the computer's state, including at least an idle threshold, an idle command, one or more planned execution times and their corresponding planned commands. This parameter set represents the complete state control policy to be adopted under a specific runtime environment, i.e., a templated configuration.

[0025] Specifically, the system periodically collects the domain name information of the network the target computer is currently in, using this as a basis for identification to determine its current operating environment. Subsequently, the system searches a pre-set scenario database for records matching that network domain name and extracts the corresponding scenario configuration parameter set. This process allows the computer's state control logic to no longer rely on fixed or global configurations, but instead automatically switch to the most suitable strategy combination based on the actual network environment.

[0026] More specifically, by decoupling runtime environment identification and parameter set loading into a standardized process, the system automates policy configuration and enables context awareness. The parameter set updated after each environment identification is directly used for subsequent planned task judgment and idle state detection, thereby ensuring that all control behaviors are based on the real needs of the current scenario, improving the system's adaptability while reducing management complexity.

[0027] More specifically, to achieve automation and high reliability in identifying the operating environment, in this embodiment of the application, the step of periodically identifying the current operating environment includes: The target computer is periodically subjected to domain name collection to obtain its current network domain name; The current operating environment is determined based on the current network domain name.

[0028] Domain name collection refers to the operation of actively obtaining the name of the network domain that the target computer is currently joined through system interfaces or network protocols. The current network domain name represents the enterprise network identifier that the target computer is connected to at a specific time. This domain name is assigned by the network infrastructure (such as Active Directory domain controllers), has uniqueness and environmental characterization, and can serve as a key basis for distinguishing different office scenarios.

[0029] Specifically, the system continuously monitors the network ownership status of target computers by periodically performing domain name collection operations. At set time intervals (e.g., every 12 hours), the system triggers a collection process, calling the network information interface provided by the operating system to obtain currently valid network domain names. Subsequently, this domain name is directly regarded as the result of the current operating environment determination, establishing a one-to-one correspondence between "current network domain name" and "current operating environment."

[0030] More specifically, this design relies solely on stable, system-level network attributes to complete scene recognition. Since domain name changes typically occur when users switch physical or logical network locations (e.g., from an office to a remote access point), this mechanism can accurately capture scene transition events, providing timely and accurate input for subsequent loading of adaptive control strategies.

[0031] In step S2, based on the matched scenario configuration parameter set, the idle determination threshold, idle instruction, at least one planned execution time, and the planned instruction corresponding to each planned execution time are updated.

[0032] The idle threshold refers to the time frame used to determine whether a user is in an idle state. When the difference between the user's last input time and the current system time exceeds this threshold, the system determines that the user has left and triggers an idle response. Idle commands are automated operation commands executed after determining that the user is in an idle state, such as screen off, lock screen (LockWorkStation), or enter sleep (SuspendState). These commands represent the system's response to idle events.

[0033] Among them, the scheduled execution time is a preset specific system time point used to trigger timed control tasks that are not idle-dependent, such as automatically locking the screen at 18:00 every day or forcibly turning off the screen during lunch break; the scheduled instruction is an automated operation instruction bound to a certain scheduled execution time. Its execution does not depend on whether the user is idle, but is only driven by the system time. The content may include locking the screen, shutting down the device, pop-up reminders, etc.

[0034] Specifically, after identifying the current operating environment and matching the corresponding scenario configuration parameter set, the system loads all control parameters in that parameter set into the runtime memory, overwriting any previously effective configurations. This process enables dynamic updates to the control policy: the idle threshold is updated to the value defined for the current scenario, and the idle command is set to the expected idle response action for that scenario; simultaneously, one or more planned execution times and their associated planned commands are also synchronously injected into the scheduler for subsequent time matching judgments. The entire update operation is atomic, ensuring that all parameters maintain logical consistency during the same environment switch and avoiding policy conflicts caused by partial updates.

[0035] More specifically, multi-dimensional control parameters (time thresholds, idle actions, timed tasks and their actions) are managed and replaced as a whole unit, so that behavioral strategies in different scenarios can be switched completely and seamlessly without the need for item-by-item adjustment or manual intervention.

[0036] In one specific embodiment, in a high-security R&D area, a scenario configuration parameter set defines an idle threshold of 3 minutes, an idle command as "lock screen," and sets planned execution times of 12:30 and 18:00, corresponding to planned commands of "turn off screen" and "lock screen," respectively. When the target computer identifies its network domain name within this area, it immediately loads and applies the entire set of parameters. At this point, if the user leaves for 4 minutes, the system will lock the screen; if the user remains on site but arrives at 12:30, the system will still turn off the screen as planned.

[0037] In step S3, the current system time of the target computer is obtained, and it is determined whether the current system time matches any of the planned execution times.

[0038] The current system time refers to the real-time time information provided by the target computer's operating system kernel.

[0039] Specifically, during each status detection cycle, the system first obtains the current system time and compares it with all planned execution times contained in the loaded scenario configuration parameter set. If the current system time is found to be equal to any of the planned execution times, it is determined as a "successful match," indicating that the time-driven planned task should be executed first, rather than the idle detection logic that depends on user behavior.

[0040] In step S4, if the current system time matches any of the planned execution times, the matched planned execution time is determined as the matching time, and the planned instruction corresponding to the matching time is executed.

[0041] Among them, the matching time refers to the specific plan execution time that is confirmed to be consistent after comparing the current system time with multiple preset plan execution times. It is used to clearly identify the unique time point corresponding to this trigger so as to accurately call the plan instruction bound to it.

[0042] Specifically, after matching the current system time with all planned execution times, if at least one time matches successfully, the system will select that time from the matching results (usually only one, as there are generally no duplicate tasks within the same minute) and mark it as the "matched time". Subsequently, the system will query the planned instruction associated with that matched time in the scenario configuration parameter set and immediately call the operating system interface to execute the instruction.

[0043] In one specific embodiment, in the office setting of a financial institution, a planned execution time of "17:30" is configured, corresponding to the planned instruction "lock screen". When the target computer obtains the current system time at 17:30 and confirms a match, the system determines this time as the matching time and immediately calls the LockWorkStation API to execute the screen lock. Even if the user is browsing the web at this time, the screen lock will still occur on time, ensuring that sensitive terminals are forcibly protected before the end of the workday.

[0044] It is worth noting that, in order to improve the adaptability and accuracy of the planned task strategy, this application embodiment also proposes that, after the step of executing the planned instruction corresponding to the matching time, the method further includes: If the planned execution instruction is canceled, the instruction cancellation time is obtained, and a first time difference between the instruction cancellation time and the matching time is calculated; Command cancellation refers to the user's active action of stopping or reversing the system state change caused by a planned command after its execution through interactive operations (such as entering a password to unlock or clicking cancel). For example, entering credentials to unlock immediately after the screen is automatically locked constitutes the cancellation of the screen lock command. The command cancellation time is used to record the system time when the user completes the above cancellation operation, and is used to measure the time interval between the triggering of the planned command and the user's intervention.

[0045] Furthermore, if the first time difference is less than a preset difference threshold, then this execution will be recorded as a false triggering event; The first time difference refers to the absolute time difference between the instruction release time and the matching time, reflecting the user's response speed to the planned instruction. A false trigger event occurs when the first time difference is less than a preset difference threshold (such as 2 minutes). The system determines that the execution of the planned instruction does not conform to the user's actual usage intention and is a premature or unnecessary trigger, and therefore marks it as a false trigger event.

[0046] Furthermore, the frequency of false triggering events associated with each parameter item is periodically counted, and the first update parameter is determined based on the frequency of false triggering events.

[0047] The first update parameter is optimization suggestion data generated based on the statistical results of false trigger events. It is used to adjust the parameter items related to planned execution in the scenario configuration parameter set, such as the planned execution time or the corresponding instruction type.

[0048] Finally, the set of scene configuration parameters corresponding to the currently matched scene in the preset scene database is updated according to the first update parameter.

[0049] Specifically, after the planned instruction is executed, the system continuously monitors for any attempts to release the instruction. Once a release operation is detected, the system immediately records the release time and calculates the time difference between it and the original matching time. If this difference is less than a preset threshold (e.g., the user unlocks the screen within 30 seconds of locking it), the system infers that the execution of this planned instruction does not match the user's actual needs, classifies it as a false trigger event, and stores it in the operation log.

[0050] Subsequently, the system periodically aggregates and analyzes historical logs, statistically analyzing the frequency of false trigger events associated with each parameter (such as the execution time of a specific plan). When the false trigger frequency of a certain parameter exceeds a set standard, a corresponding first update parameter is generated to guide adjustments to that parameter. Finally, the system writes the first update parameter back to the preset scenario database, matching the scenario configuration parameter set for the current scenario, achieving closed-loop optimization of the strategy. This allows the system to identify unreasonable points in the strategy configuration by quantifying the user's rapid rejection of plan instructions and drive automatic parameter correction without manual intervention.

[0051] In one specific embodiment, suppose an employee's scenario is configured with a daily automatic screen lock schedule at 14:00. However, this employee regularly holds video conferences from 14:00 to 14:30 each day, manually unlocking the screen within 10 seconds after each lock. The system records multiple events with a "matching time of 14:00 and unlocking time of 14:00:10," and calculates that the first time difference is much smaller than the preset 2-minute threshold, thus marking these events as false triggers. After a week of statistics, it is found that the false trigger frequency of the 14:00 scheduled execution time is as high as 90%. Based on this, the system generates a first update parameter, suggesting the removal or postponement of the screen lock task at this time. Subsequently, this parameter is applied to the configuration set of the current matching scenario, and the 14:00 scheduled instruction is deleted. After this, the user no longer experiences meeting interruptions, while the system still retains screen lock policies for other reasonable time periods.

[0052] In step S5, otherwise, the last input time of the target computer is obtained, and the target computer is determined to be in an idle state based on the last input time and the idle determination threshold. If the target computer is determined to be in an idle state, the idle instruction is executed.

[0053] The last input time refers to the system timestamp of the last time the target computer received an input event from a Human Interface Device (HID), including user operations such as keyboard key presses, mouse movements, or clicks.

[0054] Specifically, once the system confirms in the preceding steps that the current system time does not match any planned execution time, it transitions to an idle detection process based on user behavior. First, the system calls the input event monitoring interface provided by the operating system to obtain the last input time. Then, it uses the current system time and the last input time to determine whether the target computer is in an idle state. If it is determined to be in an idle state, it triggers the execution of the associated idle instruction; otherwise, it maintains the current running state and does not perform any control operations.

[0055] It is worth noting that, to ensure the high accuracy and system-level reliability of the time reference on which the idle state determination is based, in this embodiment of the application, the step of obtaining the last input time of the target computer includes: Call the input event monitoring interface provided by the system to obtain the last interaction information; The last input time is determined based on the last interaction information.

[0056] The input event monitoring interface refers to the system-level program interface provided by the operating system for querying the recent operation records of Human Interface Devices (HIDs). In Windows systems, a typical example is the GetLastInputInfo API (Application Programming Interface), which returns the timestamp of the last keyboard or mouse activity since system startup; the last interaction information is the raw data returned by the input event monitoring interface.

[0057] Specifically, the system proactively calls the operating system's built-in input event monitoring interface to request the last interaction information. This interface directly accesses the HID event log maintained by the kernel, ensuring that the data source is authoritative and real-time. Subsequently, the system converts the returned last interaction information with the current system running state, transforming it into a standard last input time.

[0058] In one specific embodiment, assuming the target computer is running a Windows operating system, the system calls the GetLastInputInfo API during idle detection to obtain the last interaction information as "12,567,890 milliseconds after system startup". Simultaneously, the system finds its own startup time to be "2026-01-22 10:00:00", and calculates the last input time as "2026-01-22, 13:29:27".

[0059] Furthermore, in order to achieve standardization and scene adaptation in idle state determination, this application embodiment proposes that the step of determining whether the target computer is in an idle state based on the last input time and the idle determination threshold includes: Calculate the second time difference between the current system time and the last input time, and determine whether the second time difference reaches the idle determination threshold; If the second time difference reaches the idle determination threshold, then the target computer is determined to be in the idle state.

[0060] The second time difference refers to the absolute time interval between the current system time and the last input time, which is used to quantify the duration of no interaction since the user's last operation.

[0061] Specifically, the system first obtains the current system time and the determined last input time, calculates the difference between the two, and obtains a second time difference value. Then, this difference value is compared with the currently effective idle threshold. If the second time difference value is greater than or equal to the idle threshold, it is logically confirmed that the user has exceeded the preset inactivity tolerance period, and the system determines that the target computer is idle; otherwise, it is assumed that the user is still actively using the computer, and no response is triggered.

[0062] In one specific embodiment, within the intranet environment of a research and development department, the scene configuration parameter set sets the idle threshold to 4 minutes. The system obtains the last input time as 15:00 and the current system time as 15:05, calculating a second time difference of 5 minutes, which exceeds the 4-minute threshold. Therefore, the system determines the target computer is idle and executes a screen lock command. However, in a remote work scenario, the threshold for the same user might be 20 minutes; in this case, 5 minutes of inactivity would not trigger any action.

[0063] Furthermore, this application also constructs a feedback learning loop oriented towards idle response, transforming the user's negative behavior into a quantifiable optimization signal, driving the configuration parameters to evolve in a direction more aligned with actual usage habits. Specifically, in the embodiments of this application, after the step of executing the idle instruction, the method further includes: Record second change events resulting from user intervention; Periodically count the adjustment frequency of each parameter item in the second change event, and determine the parameter items whose adjustment frequency reaches the preset frequency threshold as the second update parameters; The set of scene configuration parameters corresponding to the currently matched scene in the preset scene database is updated according to the second update parameter.

[0064] The second change event refers to a record of user intervention in the system state through active operations (such as unlocking the screen or waking from sleep mode) after the idle command is executed. This event indicates that the user has negative feedback on the current idle response, meaning that they believe the idle determination or response does not conform to their actual usage intention. The adjustment frequency refers to the number of times a specific parameter (such as the idle threshold or idle command type) has been triggered by a second change event during historical operation. This frequency reflects how often the parameter triggers user intervention in actual use. The preset frequency threshold is a statistical critical value pre-set by the system to determine whether a parameter needs optimization due to frequent user intervention. For example, if an idle threshold causes more than 10 user unlocks within a week, it may exceed the threshold.

[0065] The second update parameter is based on the optimization suggestion data generated by the statistical analysis of the second change event. It is used to guide the adjustment of parameters related to idle control in the scenario configuration parameter set, such as extending the idle judgment threshold or changing the idle instruction type.

[0066] Specifically, after the idle command is executed, the system continuously monitors for any user intervention. Once such an operation is detected (e.g., immediately entering a password to unlock after locking the screen), a second change event is generated and associated with relevant parameters in the currently effective scene configuration parameter set (e.g., idle threshold, idle command). The system then periodically aggregates and analyzes the accumulated second change events, counting the adjustment frequency of each associated parameter. When the adjustment frequency of a parameter reaches or exceeds a preset frequency threshold, the system marks it as an item requiring optimization and generates a corresponding second update parameter. Ultimately, this second update parameter is used to update the scene configuration parameter set in the preset scene database corresponding to the currently matched scene, achieving closed-loop adaptive strategy.

[0067] In one specific embodiment, suppose an employee is in a branch office scenario, with their idle threshold initially set to 3 minutes and the idle command being "lock screen". Because this employee frequently engages in prolonged reading and unlocks the screen within seconds of locking it, the system records 15 second-change events within a week, all associated with this 3-minute threshold. If the preset frequency threshold is 10 times, the system determines that this parameter needs optimization and generates a second updated parameter suggestion to extend the threshold to 8 minutes. Subsequently, this suggestion is applied to the configuration set of the current matching scenario. After the update, the user's reading is no longer interrupted within 8 minutes, while screen locking is still triggered after the timeout period.

[0068] It is worth noting that, taking into account the conflict between automated control and user emergency needs, this application proposes that, in its embodiments, the method further includes: Continuously monitor for emergency stop commands; In response to the emergency stop command, all automated operations are terminated.

[0069] Among them, the emergency stop command refers to the global termination signal actively issued by the user in an emergency or when it is necessary to immediately interrupt the automated process through a preset method (such as clicking the red stop button on the interface, pressing a specific shortcut key combination, etc.). This command has the highest priority and is used to immediately stop any state control operation that is currently being executed or about to be executed and is automatically triggered by the system. Among them, automated operations include planned instructions triggered by the scheduled execution time (such as timed screen lock) and idle instructions triggered by the idle state determination (such as screen off, hibernation, etc.), which generally refer to all computer state change behaviors that are initiated by the system automatically without the need for real-time user confirmation.

[0070] Specifically, a persistent monitoring mechanism is maintained in the system background to continuously detect the input of emergency stop commands. This monitoring is independent of the main control flow (such as time matching judgment or idle detection) and runs in an event-driven manner, ensuring an immediate response when an emergency stop signal is received at any time. Once an emergency stop command is detected, the system immediately interrupts all ongoing automated operations (such as canceling a lock screen animation or preventing an upcoming hibernation process) and clears the pending tasks in the current scheduling queue, thus fully returning control to the user. The entire process is independent of the current decision branch or running state, possessing global and real-time characteristics.

[0071] Reference Figure 2 , Figure 2 This is a virtual structural diagram of the computer state control device provided in this application. A second aspect of this application provides a computer state control device, comprising: Scene recognition module 100 is used to periodically identify the current operating environment and obtain the scene configuration parameter set corresponding to the current operating environment from a preset scene database; The parameter import module 200 is used to update the idle judgment threshold, idle instruction, at least one planned execution time, and the planned instruction corresponding to each of the planned execution times according to the matched scenario configuration parameter set. The node matching module 300 is used to obtain the current system time of the target computer and determine whether the current system time matches any of the planned execution times; The plan execution module 400 is used to determine the matched plan execution time as the matching time if the current system time matches any of the planned execution times, and to execute the plan instruction corresponding to the matching time. The idle identification module 500 is used to obtain the last input time of the target computer, determine whether the target computer is in an idle state based on the last input time and the idle determination threshold, and execute the idle instruction when it is determined that the target computer is in an idle state.

[0072] The computer state control device described in this application embodiment can execute the computer state control method provided in the above embodiments. The computer state control device has the corresponding functional steps and beneficial effects of the computer state control method described in the above embodiments. For details, please refer to the embodiments of the above computer state control method. The embodiments of this application will not be repeated here.

[0073] This application also provides an electronic device, please refer to... Figure 3 , Figure 3This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include a processor and a memory, which can be connected via a bus or other means. The processor may be a Central Processing Unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips. The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the computer state control method in the embodiments of this application. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the computer state control method in the above method embodiments.

[0074] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. One or more modules are stored in the memory and, when executed by the processor, perform the computer state control method as described in the above method embodiments. Specific details of the above electronic device can be understood by referring to the corresponding descriptions and effects in the above method embodiments, and will not be repeated here. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it may include the processes of the embodiments of the above methods. The storage medium may be a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), etc.; the storage medium may also include a combination of the above types of memory.

[0075] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0076] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of this application, various features of this application are sometimes grouped together in a single embodiment, figure, or description thereof. However, this approach to disclosure should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this application.

[0077] It should be noted that the above embodiments are illustrative of this application and not restrictive of this application, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims.

Claims

1. A computer state control method characterized by, Applied to a target computer, the method includes: Periodically identify the current operating environment and retrieve the set of scenario configuration parameters corresponding to the current operating environment from a preset scenario database; Based on the matched scenario configuration parameter set, update the idle determination threshold, idle instruction, at least one planned execution time, and the planned instruction corresponding to each planned execution time; Obtain the current system time of the target computer and determine whether the current system time matches any of the planned execution times; If the current system time matches any of the planned execution times, the matched planned execution time is determined as the matching time, and the planned instruction corresponding to the matching time is executed. Otherwise, the last input time of the target computer is obtained, and the target computer is determined to be in an idle state based on the last input time and the idle determination threshold. If the target computer is determined to be in an idle state, the idle instruction is executed.

2. The computer state control method according to claim 1, wherein The steps for periodically identifying the current operating environment include: The target computer is periodically subjected to domain name collection to obtain its current network domain name; The current operating environment is determined based on the current network domain name.

3. The computer state control method according to claim 1, wherein After the step of executing the planned instruction corresponding to the matching time, the method further includes: If the planned execution instruction is canceled, the instruction cancellation time is obtained, and a first time difference between the instruction cancellation time and the matching time is calculated; If the first time difference is less than the preset difference threshold, then this execution will be recorded as a false triggering event; Periodically count the frequency of false triggering events associated with each parameter item, and determine the first update parameter based on the frequency of false triggering events; The set of scene configuration parameters corresponding to the currently matched scene in the preset scene database is updated according to the first update parameter.

4. The computer state control method according to claim 1, wherein The step of obtaining the last input time of the target computer includes: Call the input event monitoring interface provided by the system to obtain the last interaction information; The last input time is determined based on the last interaction information.

5. The computer state control method according to claim 1, characterized in that, The step of determining whether the target computer is in an idle state based on the last input time and the idle determination threshold includes: Calculate the second time difference between the current system time and the last input time, and determine whether the second time difference reaches the idle determination threshold; If the second time difference reaches the idle determination threshold, then the target computer is determined to be in the idle state.

6. The computer state control method according to claim 1, characterized in that, After the step of executing the idle instruction, the method further includes: Record second change events resulting from user intervention; Periodically count the adjustment frequency of each parameter item in the second change event, and determine the parameter items whose adjustment frequency reaches the preset frequency threshold as the second update parameters; The set of scene configuration parameters corresponding to the currently matched scene in the preset scene database is updated according to the second update parameter.

7. The computer state control method according to claim 1, characterized in that, The method further includes: Continuously monitor for emergency stop commands; In response to the emergency stop command, all automated operations are terminated.

8. A computer state control device, characterized in that, Applied to the target computer, including: The scene recognition module is used to periodically identify the current operating environment and obtain the scene configuration parameter set corresponding to the current operating environment from the preset scene database; The parameter import module is used to update the idle judgment threshold, idle instruction, at least one planned execution time, and the planned instruction corresponding to each of the planned execution times according to the matched scenario configuration parameter set. The node matching module is used to obtain the current system time of the target computer and determine whether the current system time matches any of the planned execution times; The plan execution module is used to determine the matched plan execution time as the matching time if the current system time matches any of the planned execution times, and to execute the plan instruction corresponding to the matching time. The idle identification module is used to obtain the last input time of the target computer, determine whether the target computer is in an idle state based on the last input time and the idle determination threshold, and execute the idle instruction when the target computer is determined to be in an idle state.

9. An electronic device, characterized in that, include: One or more processors; One or more memory units; And one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, the one or more computer programs including instructions that, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a program or instructions that, when executed, implement the method as described in any one of claims 1 to 7.