Screen state switching method, system, equipment and medium

By establishing a connection with the mobile terminal through the PCBA module, the signal strength is monitored in real time and a signal strength set is constructed. The lock screen state is automatically adjusted using a machine learning model, which solves the problems of cumbersome operation and insufficient security of traditional lock screen methods, and realizes efficient and intelligent screen state switching.

CN120812166AActive Publication Date: 2025-10-17SHENZHEN WAYTRONIC ELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511319164.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-10-17
Estimated Expiration
2045-09-16

AI Technical Summary

Technical Problem

Traditional screen locking methods require additional user operations, which affects work efficiency and is insufficient in terms of security and convenience.

Method used

The PCBA module establishes a wireless connection with the designated mobile terminal, monitors signal strength in real time and adds timestamps to build a signal strength set, and uses a machine learning model to determine the screen state switching conditions and automatically adjust the lock screen state.

Benefits of technology

It reduces unnecessary manual operations, improves user experience and security, saves energy consumption, and enables intelligent automatic switching of screen status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120812166A_ABST
    Figure CN120812166A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of screen state switching, and discloses a screen state switching method, system and device and a medium, and the method comprises the steps: employing a PCBA module to establish a stable connection with a specified mobile terminal, guaranteeing the reliability of information transmission, and carrying out the monitoring of the signal intensity in the process monitoring of the signal intensity, the application of the timestamp can effectively reduce the influence of instantaneous interference on the judgment result, so that the system can more accurately evaluate the user distance, and the system can intelligently and automatically switch the screen locking state by constructing the signal intensity set and combining the judgment of the current screen state. The method has the beneficial effects that unnecessary manual operation is reduced, the use efficiency of a user is improved, the safety of the static terminal and the user experience are remarkably improved by monitoring the signal intensity change of the specified mobile terminal in real time, automatic screen locking can be realized, and the energy consumption is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of screen state switching, in particular to a screen state switching method, system, device and medium. BACKGROUND

[0002] Under the background of modern informationization, the security and convenience of computers are increasingly valued. Traditional screen locking methods usually rely on inputting passwords, gestures or fingerprints, etc. Although they can provide certain security protection, they have many shortcomings in user experience and operation convenience. These methods not only require users to perform additional operations, increasing the use burden, but also affect work efficiency to some extent. SUMMARY

[0003] Therefore, it is necessary to propose a screen state switching method, system, device and medium for the existing screen state switching problem.

[0004] A screen state switching method applied to a static terminal, the method comprising: establishing a wireless connection between the PCBA module and a specified mobile terminal; periodically obtaining the signal strength of the specified mobile terminal in real time, and adding a timestamp to each signal strength based on the acquisition time; selecting a preset number of signal strengths as a signal strength set based on the timestamps of each signal strength; obtaining the current screen state of the display screen; wherein the current screen state includes a locked screen state and an unlocked screen state; determining whether the signal strength set meets the preset switching condition of the current screen state; if the signal strength set meets the preset switching condition of the current screen state, switching the current screen state.

[0005] Further, the step of establishing a wireless connection between the PCBA module and a specified mobile terminal comprises: obtaining the HID service information broadcast by the specified mobile terminal; based on the HID service information, establishing a connection between the PCBA module and the specified mobile terminal.

[0006] Further, the step of determining whether the signal strength set meets the preset switching condition of the current screen state comprises: inputting the current screen state and the signal strength set into a machine learning model as input, executing the machine learning model to obtain a calculation result; comparing the calculation result with a set threshold to determine whether the preset switching condition of the current screen state is met.

[0007] Further, before the step of executing the machine learning model with the current screen state and the signal strength set as input to obtain a calculation result, the method further comprises: obtaining a plurality of sample data sets and label information corresponding to each sample data set, wherein the label information comprises a current screen state corresponding to each sample data set and a corresponding calculation result; calculating a feature vector of each sample data set wherein represents a qth time point, represents a feature vector of an ith sample data set, represents a rate of change of signal strength between a qth time point and a zth time point, q, z, i are positive integers, and q>z, i≤n; dividing a plurality of the feature vectors into a training data set and a test data set according to a predetermined proportion; inputting the training data set and label information corresponding to the training data set into a predetermined machine learning initial model, and training the predetermined machine learning initial model according to optimal hyperparameters; detecting the trained model through the test data set and label information corresponding to the test data set, and obtaining a machine learning model when the detection result meets the training requirements of the model.

[0008] Further, before the step of determining whether the signal strength set meets the preset switching condition of the current screen state, the method further comprises: receiving a current movement state of the specified mobile terminal; obtaining a preset switching condition based on the current movement state according to a predetermined movement state and switching condition correspondence table.

[0009] Further, before the step of determining whether the signal strength set meets the preset switching condition of the current screen state, the method further comprises: receiving a security level sent by the specified mobile terminal; obtaining a preset switching condition based on the security level according to a predetermined security level and switching condition correspondence table.

[0010] A screen state switching method applied to a PCBA module, wherein the PCBA module is connected with a static terminal, and the method comprises: establishing a connection with the static terminal based on a Bluetooth HID protocol; periodically sending an input report of signal strength to the static terminal in real time.

[0011] A screen state switching system, wherein the system is provided with a PCBA module, and the system comprises: a connection module, configured to establish a wireless connection with a designated mobile terminal based on the PCBA module; a first acquisition module, configured to periodically acquire signal strengths with the designated mobile terminal in real time, and add a time stamp to each signal strength based on an acquisition time; a selection module, configured to select a preset number of signal strengths as a signal strength set based on the time stamps of the signal strengths; a second acquisition module, configured to acquire a current screen state of a display screen; wherein the current screen state includes a locked screen state and an unlocked screen state; a judgment module, configured to judge whether the signal strength set meets a preset switching condition of the current screen state; a switching module, configured to switch the current screen state if the signal strength set meets the preset switching condition of the current screen state.

[0012] A U disk device, comprising a PCBA module, the PCBA module comprising a memory and a processor, the memory storing a computer program, the computer program being executed by the processor to make the processor execute the following steps: establishing a connection with a static terminal based on a Bluetooth HID protocol; periodically sending an input report of a signal strength to the static terminal in real time.

[0013] A computer readable storage medium, storing a computer program, the computer program being executed by a processor to make the processor execute the following steps: establishing a wireless connection with a designated mobile terminal based on the PCBA module; periodically acquiring signal strengths with the designated mobile terminal in real time, and adding a time stamp to each signal strength based on an acquisition time; selecting a preset number of signal strengths as a signal strength set based on the time stamps of the signal strengths; acquiring a current screen state of a display screen; wherein the current screen state includes a locked screen state and an unlocked screen state; judging whether the signal strength set meets a preset switching condition of the current screen state; switching the current screen state if the signal strength set meets the preset switching condition of the current screen state.

[0014] The beneficial effects of the present invention include: establishing a stable connection with a designated mobile terminal using the PCBA module to ensure the reliability of information transmission. During the process monitoring of signal strength, the application of timestamps can effectively reduce the impact of transient interference on the judgment results, making the system's assessment of user distance more accurate. By constructing a signal strength set and combining it with the judgment of the current screen status, the system can intelligently and automatically switch to the lock screen state, thereby reducing unnecessary manual operations and improving user efficiency. By monitoring the signal strength changes of the designated mobile terminal in real time, the security and user experience of the static terminal are significantly improved, and automatic screen lock can be achieved, saving energy consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] in: Figure 1 This is a diagram of an application environment of a screen state switching method in one embodiment; Figure 2 is a flowchart of a screen state switching method in one embodiment; Figure 3 is a structural block diagram of a screen state switching device in one embodiment; Figure 4 FIG. 4 is a structural block diagram of a USB disk device in one embodiment. DETAILED DESCRIPTION

[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0018] Figure 1 This is a diagram of the screen state switching application environment in one embodiment. Figure 1The screen state switching method is applied to a screen state switching system. The screen state switching system includes a mobile terminal 110 and a static terminal 120. The mobile terminal 110 and the static terminal 120 are connected through Bluetooth. The mobile terminal 110 can be at least one of a mobile phone, a tablet computer, a notebook computer, etc. The static terminal 120 can be at least one of a computer, a tablet computer, a smart home device, etc. The mobile terminal 110 is configured to provide a signal strength. The static terminal 120 is configured to execute a switching instruction based on the signal strength.

[0019] As shown in FIG. 1, in one embodiment, a screen state switching method is provided. The method is applied to a static terminal and can also be applied to a server. If applied to the server, the server receives a signal strength set uploaded by a designated mobile terminal to determine whether the signal strength set meets a preset switching condition of a current screen state. The server sends a determination result to the terminal to execute a switching instruction. The embodiment is exemplarily described by taking the application to the terminal. Figure 2 The screen state switching method specifically includes the following steps: S1: establishing a wireless connection between the PCBA module and a designated mobile terminal; S2: periodically acquiring a signal strength of the designated mobile terminal in real time and adding a time stamp to each signal strength based on an acquisition time; S3: selecting a preset number of signal strengths as a signal strength set based on the time stamps of the signal strengths; S4: acquiring a current screen state of a display screen. The current screen state includes a locked screen state and an unlocked screen state; S5: determining whether the signal strength set meets a preset switching condition of the current screen state; S6: if the signal strength set meets the preset switching condition of the current screen state, switching the current screen state.

[0020] As described in the above step S1, the PCBA module establishes a wireless connection with the specified mobile terminal. The static terminal first needs to establish a wireless connection with the specified mobile terminal (such as a smartphone, tablet computer or wearable smart device, etc.), which can be a Bluetooth connection, a wifi connection or other near field communication technology. Specifically, taking the Bluetooth HID protocol connection as an example, in the pairing process, the terminal sends a Bluetooth connection request, and the specified mobile terminal responds according to the settings. After successful pairing, a persistent Bluetooth connection can be established. Through the Bluetooth HID protocol, once the connection is established, the computer will be able to receive various data from the mobile terminal, thereby laying the foundation for subsequent signal strength judgment. The static terminal can be a computer, a smart home device or a tablet computer. The PCBA (Printed Circuit Board Assembly) module is a complete electronic assembly composed of a printed circuit board (PCB) and electronic components soldered thereon, which can also be a U disk. The first wireless connection is specifically established by installing an App on the specified mobile terminal, which binds the PCBA module and the mobile phone for the first time through the App. The strength of the wireless transmission signal (such as Bluetooth, WIFI, broadcast, etc.) is detected by the PCBA module program to determine the distance, and the unique identifier of the specified mobile terminal is recorded in the PCBA module to facilitate subsequent direct connection. That is, after the binding is completed, the PCBA module can automatically identify the specified mobile terminal and automatically connect with the specified mobile terminal. Therefore, after the specified mobile terminal is connected through the App, the App can be directly deleted, and subsequent connection with the PCBA can be achieved by opening the corresponding near field communication on the specified mobile terminal. Further, if the static terminal is converted from a locked screen state to an unlocked screen state, the lock screen password needs to be input. At this time, the lock screen password can be input to the specified mobile terminal by human, and then transmitted to the PCBA module through the App on the specified mobile terminal. Subsequently, when the locked screen state is converted to the unlocked screen state, the corresponding lock screen password is automatically input to realize the conversion from the locked screen state to the unlocked screen state.

[0021] As described in the above step S2, the signal strength of the specified mobile terminal is periodically acquired in real time, and a time stamp is added to each signal strength based on the acquisition time. The periodic monitoring of the Bluetooth signal strength is achieved, and the computer periodically queries the signal strength between the specified mobile terminal through a fixed time interval. The signal strength is an important indicator for measuring the quality of wireless communication between two devices, and is usually represented by an RSSI (Received Signal Strength Indicator) value. In order to improve the timeliness of data processing, a time stamp is required for each signal strength acquisition, which can record the change of the signal. The addition of this time stamp helps subsequent analysis, especially when the trend of signal strength change over time needs to be investigated in the subsequent steps. In addition, by periodically acquiring the signal strength, the system can more accurately determine the distance and state of the user, thereby realizing the automatic switching of the screen state.

[0022] As described in the above step S3, a preset number of signal strengths are selected as a signal strength set based on the time stamps of each signal strength. Using the collected signal strength data and time stamps, data filtering and set construction are performed, and according to the preset number (for example, the last 10 signal strength values), the system will select signal strength values from the historical records and construct a signal strength set. The main purpose of this process is to avoid misjudgment caused by instantaneous signal fluctuations by analyzing a certain number of signal strengths. By selecting the signal strength with the most recent time stamp, the system can ensure more accurate judgment of the user's state. This collection method can effectively reflect the overall trend of signal changes within a certain period of time, providing an effective basis for subsequent state judgment. The effective implementation of this step is directly related to the accuracy and intelligence of the subsequent lock screen state judgment.

[0023] As described in the above step S4, the current screen state of the display screen is acquired; wherein the current screen state includes a locked screen state and an unlocked screen state. The current screen state of the computer screen is acquired. The computer system needs to monitor its screen state in real time to determine whether it is in a "locked screen state" or an "unlocked screen state". This state monitoring can not only be directly obtained through the system API, but also be detected through user operation and interaction. The locked screen state means that the user cannot directly access the functions of the static terminal and needs to perform identity verification to unlock, while the unlocked screen state means that the user can freely operate the static terminal. Accurate acquisition of the current screen state can provide basic information for the automatic control of the screen state switching system to determine whether the subsequent signal strength set meets the switching conditions.

[0024] As described in the above step S5, it is judged whether the signal strength set meets the preset switching condition of the current screen state. According to the signal strength set established in the previous step, it is judged whether to switch the lock screen state. First, a certain switching condition needs to be set in advance, for example, when the signal strength is lower than a certain threshold value (indicating that the user is far away from the computer), the system will make an automatic lock screen decision according to the threshold value. On the contrary, if it is detected that the signal strength is continuously higher than a certain value, it indicates that the user is close to the computer, and it can be determined as "unlocked screen state". This judgment process is the core of the screen state switching system, which is directly related to the reaction sensitivity and accuracy of the system. Through the analysis and judgment of the signal strength set, the system can intelligently adapt to the user's behavior, improve the security and convenience of the computer, and effectively avoid the occurrence of false lock screen or missed lock screen.

[0025] As described in the above step S6, if the signal strength set meets the preset switching condition of the current screen state, the current screen state is switched. If it is judged that the current signal strength set meets the preset switching condition, that is, it is confirmed that the user's position or state has changed significantly, the screen locking or unlocking operation will be performed. This process can be called through the corresponding API of the operating system to intervene the lock screen state of the computer. If the condition for automatic lock screen is met, the system will quickly switch to the lock screen state to protect the user's data security; if the condition is not met, the current state is retained. This intelligent lock screen mechanism not only reduces the frequency of manual operation of the user, improves the security, but also conforms to the operation habit of the user, provides a more friendly use experience. The screen state switching method realizes an efficient and automatic work flow, and guarantees the security of the user data and the device. Modern display, especially high brightness, high resolution or OLED / AMOLED screen, is one of the components with the highest power consumption in the entire computer system, often far exceeding the working power consumption of CPU. When the system is automatically locked, the display is usually set to be turned off or enter a super low power consumption sleep state (such as OSD turning off the backlight). During the screen off period, its power consumption can be reduced from tens of watts or even hundreds of watts (high brightness large screen) to usually only 1-3 watts or even lower. For notebook users, this directly translates into longer battery life. And in the lock screen state, most unnecessary user applications and services are suspended or limited in activity, reducing invalid CPU calculation and storage access, further saving energy.

[0026] In one embodiment, the step S1 of establishing a wireless connection between the PCBA module and the specified mobile terminal comprises: S101: acquiring the HID service information broadcast by the specified mobile terminal; S102: based on the HID service information, establishing a connection between the PCBA module and the specified mobile terminal.

[0027] As described in step S101 above, the static terminal actively scans through the Bluetooth module to obtain the service information broadcast by all nearby mobile terminals supporting the Bluetooth HID protocol. The Bluetooth HID (Human Interface Device) service information usually includes device name, device type, device supported functions, and current signal strength, etc. The system needs to initiate a Bluetooth scanning request to receive broadcast data packets from mobile terminals, which contain service information in a certain standard format, facilitating interpretation and processing between devices. Obtaining HID service information not only allows the system to confirm whether the target mobile terminal supports the Bluetooth HID protocol, but also provides necessary parameters for subsequent connection steps. This process usually has real-time nature and may require repeated scanning to ensure that the device is in a suitable state for connection. In order to ensure the smoothness of user experience, the system will display a list of connectable devices after obtaining valid HID service information, allowing the user to select and connect.

[0028] As described in step S102 above, based on the HID service information, the PCBA module establishes a connection with the specified mobile terminal. When the target mobile terminal's HID service information is successfully obtained, the static terminal will establish an actual connection with the mobile terminal based on this information using the Bluetooth HID protocol and through the PCBA module. This connection process involves defining connection parameters and sending a connection request, including device address, service UUID, pairing request, etc. During this process, the system also performs identity verification to ensure the security of the end-to-end connection. This pairing process may include PIN code input to ensure that only the device of a legitimate user can be connected. After a successful connection, the static terminal enters a "paired state" and maintains a stable data transmission channel with the mobile terminal. In the architecture of the Bluetooth HID protocol, the connection can be either active (the static terminal initiates the connection) or passive (the mobile terminal actively connects). The specific connection behavior depends on the user interface and system design. When establishing a connection, the system also performs signal strength evaluation to ensure good connection quality. Once the connection is successful, the computer can start receiving various signal data from the mobile terminal, providing data support for subsequent lock screen state monitoring and intelligent control.

[0029] In one embodiment, the step S5 of judging whether the signal strength set meets the preset switching condition of the current screen state comprises: S501: taking the current screen state and the signal strength set as inputs of a machine learning model, and executing the machine learning model to obtain a calculation result; S502: comparing the calculation result with a set threshold to determine whether the preset switching condition of the current screen state is met.

[0030] As described in step S501, the current screen state and the signal strength set are input into a machine learning model to obtain a calculation result. The current screen state (including the locked screen state and the unlocked screen state) and the signal strength set are input into a pre-trained machine learning model as input data. The machine learning model is usually trained based on a past data set and can make intelligent decisions through feature extraction and pattern recognition. The current screen state and the signal strength set are feature values, and the model will analyze these features to determine the user's behavior pattern. The machine learning model here can be in various forms, such as decision trees, support vector machines, neural networks, etc. The key to this process is the accuracy and applicability of the model, because only through precise learning and training can the model effectively understand the information conveyed by the input features and generate meaningful output. After the machine learning model operation is completed, the system will output a calculation result, usually a numerical value or a classification result, representing whether the current screen state should be switched. The advantage of this process is that it can dynamically adapt to the user's usage habits, such as in some cases (such as rapid fluctuations in signal strength), the user may enter and exit the locked screen state more frequently in a short period of time. The application of the machine learning model enables the system to gradually optimize the judgment logic through historical data, improving the flexibility and accuracy of screen state switching.

[0031] As described in step S502, the calculation result is compared with a set threshold to determine whether the preset switching condition of the current screen state is met. After obtaining the calculation result, subsequent analysis is performed on the result, i.e., comparison with the preset threshold. The selection of the threshold is usually based on past data analysis and optimization of user experience, aiming to determine whether the lock screen state should be switched under specific conditions. The threshold can be a fixed value or dynamically adjusted according to the user usage pattern. It should be noted that the corresponding set thresholds of different lock screen states can be the same, for example, the threshold can be set to 10. This is because the value before the calculation result is obtained can be processed as an absolute value. Generally, before the absolute value is calculated, the current screen state is in the locked state, and the calculation value that meets the switching condition is usually negative. Therefore, the corresponding set threshold should be negative. Only when the calculated value is less than the threshold, the state switching is performed. If the absolute value is calculated, the same determination method can be met, i.e., the final calculation value only needs to be greater than the threshold to determine that it meets the condition. By comparing the calculation result with the threshold, the system can quickly determine whether the preset switching condition of the current screen state is met. For example, if the calculation result indicates that the user is far away from the computer and the signal strength is lower than the set threshold, the system can decide to automatically lock the screen; otherwise, the unlocked state is maintained. This comparison process is very important because it not only provides the basis for switching, but also provides a more adaptive and intelligent interactive experience for the user. In addition, in a specific implementation, the system can also use the comparison result for historical record to continuously optimize the set threshold and the parameters of the machine learning model. This cyclic feedback mechanism can improve the response ability and accuracy of the screen state switching system, ensuring that the system always meets the actual needs of the user.

[0032] In one embodiment, before the step S501 of executing the machine learning model to obtain the calculation result, the current screen state and the signal strength set are used as inputs of the machine learning model, further comprising: S5001: obtaining a plurality of sample data sets and label information corresponding to each sample data set; the label information includes the current screen state corresponding to each sample data set and the corresponding calculation result; S5002: calculating the feature vector of each sample data set , wherein represents the qth time point, represents the feature vector of the ith sample data set, represents the rate of change of the signal strength between the qth time point and the zth time point, q, z, i are positive integers, and q>z, i≤n; S5003: dividing a plurality of feature vectors into a training data set and a test data set according to a preset proportion; S5004: input the training data set and the label information corresponding to the training data set into a preset machine learning initial model, and train the preset machine learning initial model according to the optimal hyperparameter; S5005: detect the trained model by using the test data set and the label information corresponding to the test data set, and obtain the machine learning model when the detection result meets the training requirement of the model.

[0033] As described in the above step S5001, a plurality of sample data sets and label information corresponding to each sample data set are obtained. The label information includes the current screen state and the corresponding calculation result of each sample data set. The plurality of sample data sets are obtained for machine learning model training. These sample data sets are obtained through actual user behavior or simulated scenarios, covering different usage scenarios and environments. Each sample data set will correspond to the corresponding label information. These label information includes the current screen state (such as "locked screen" or "unlocked screen") and the state switching result calculated according to the signal strength and other related factors. Effective sample data sets can include data of multiple users in different environments created to ensure the generalization ability of the model so that the model can work normally on different users and devices. After this step, the system lays a solid foundation for subsequent feature vector extraction and model training, thereby improving the effectiveness and practicality of machine learning.

[0034] As described in the above step S5002, in this step, feature extraction is performed on each sample data set to calculate the feature vector. The feature vector is an important concept in machine learning, which converts the original data into a numerical representation that can be used for model training. The change of signal strength is an important factor to determine whether the user is near the device. However, a single RSSI (Received Signal Strength Indicator) value is affected by many environmental factors, such as physical obstacles, interference sources, and user movement behavior. If only the signal strength at the current time point is relied on, it may lead to misjudgment, for example, the user is near the device but is incorrectly judged as far away from the device due to temporary signal interference, resulting in unnecessary screen locking. In order to solve this problem, the signal strength at the current time point is associated with the signal strength at the previous q time points, which can provide a more comprehensive signal strength change situation. This method not only helps to smooth the impact of instantaneous signal fluctuations, but also captures the trend of signal strength over time. By analyzing the historical signal data over a period of time, the signal change rate can be extracted, and these change characteristics can be combined to make more accurate judgments on the current screen state.

[0035] As described in the above step S5003, the plurality of feature vectors are divided into a training dataset and a test dataset according to a preset proportion. The system needs to divide the calculated feature vectors into a training dataset and a test dataset. This process is usually performed according to a preset proportion, for example, a common division method is to use 70%-80% of the data for training and the remaining 20%-30% for testing. The training dataset is used to train the machine learning model, so that it learns how to produce corresponding output results from the input features, while the test dataset is used to evaluate the performance and generalization ability of the trained model. The process of dividing the feature vectors is a key step to ensure the effectiveness of the model, because the training dataset and the test dataset should be relatively independent, avoiding overfitting caused by the model obtaining information in the training process during the testing process. The test dataset can help determine the performance of the model on new data that has not been seen before, by comparing the predicted results of the model with the actual labels, to evaluate the accuracy and robustness of the model. Through effective data division, the system ensures the comprehensiveness of model training and the reliability of the results, providing data support for subsequent optimization and tuning of the model.

[0036] As described in the above step S5004, the training dataset and the corresponding label information of the training dataset are input into a preset machine learning initial model, and the preset machine learning initial model is trained according to the optimal hyperparameters. The training dataset and its corresponding label information are input into the preset machine learning initial model for training. The selected machine learning model type depends on the specific application requirements, for example, it can be a support vector machine (SVM), a random forest, a neural network, etc. By inputting the training data, the model will start to learn the relationship between features and labels. During the training process, the model will be optimized according to the preset optimal hyperparameters. Hyperparameters include learning rate, regularization parameter, depth of decision tree, etc., which will significantly affect the learning efficiency and prediction accuracy of the model, and the optimal hyperparameter training method can be any one of grid search, cross-validation, random search, and Bayesian optimization. After multiple rounds of iterative training, the model adjusts the parameters to reduce the prediction error, so that the final model can more accurately understand the input features and better adapt to different user behaviors. This process is the key to the success of machine learning applications, ensuring that the model has enough ability and flexibility to cope with various input scenarios.

[0037] As described in step S5005 above, the trained model is tested using the test dataset and its corresponding label information. When the test results meet the model's training requirements, a machine learning model is obtained. The trained machine learning model is then evaluated and tested using the previously divided test dataset. By inputting the feature vectors from the test dataset, the model outputs its predictions. The model's predictions are then compared with the actual labels in the test dataset to assess the model's accuracy and performance. If the test results meet the preset performance requirements, such as prediction accuracy, recall, or F1 score, the model is effective based on the training data and can be put into practical application. If the model's performance does not meet the requirements, further adjustments may be required, including modifying hyperparameters, selecting a different machine learning algorithm, or even adding more training data. Through this feedback mechanism, the system can continuously optimize the learning model, ensuring that the resulting machine learning model has high recognition capabilities and accuracy, and can be successfully applied in subsequent screen state transition judgments, thereby achieving efficient user experience and security management.

[0038] In one embodiment, before step S5 of determining whether the signal strength set satisfies the preset switching condition of the current screen state, the method further includes: S401: Receive the current mobile status of the designated mobile terminal; S402: According to a preset movement state and switching condition correspondence table, a preset switching condition is obtained based on the current movement state.

[0039] As described above, step S401 receives the current mobility status of the designated mobile terminal. The user's current mobility status needs to be obtained from the designated mobile terminal. This status information is crucial for screen state switching decisions because it provides insight into the user's activity, such as whether the user is stationary, moving, or in another state. Mobile terminals typically use built-in sensors (such as accelerometers, gyroscopes, and GPS) to monitor and determine the user's mobility status, and then transmit this information to the stationary terminal. Specific types of current mobility status include "stationary," "walking," and "running." The system receives and updates this status information at regular intervals to ensure that decisions are based on the latest user behavior. After obtaining the current mobility status, the system can make appropriate decisions based on different usage scenarios. By integrating the current mobility status, the lock screen system can establish more intelligent interactions, thereby meeting security requirements while improving the user experience. Effective mobility status tracking can reduce unnecessary lock screen actions, provide a smoother user experience, and create a more comfortable operating environment for users.

[0040] As described in step S402, the preset switching condition is obtained based on the current mobile state according to the preset mobile state-switching condition correspondence table. According to the current mobile state information received from the mobile terminal, the corresponding preset switching condition is found and extracted. This process is based on a predefined "mobile state-switching condition correspondence table", which contains the strategies for screen state switching under different mobile states. For example, for the "driving" state, the system may need to set a higher signal strength threshold to ensure that the user is not mistakenly locked while driving; for the "stationary" state, the system can use more stringent conditions to make the screen lock more quickly. The design of this correspondence table is an important part of the intelligentization of the screen lock system. By presetting different mobile states and switching conditions, the system can intelligently adjust the screen lock strategy according to the user's real-time behavior, thus adapting to the user's needs in different scenarios. The flexibility of this technology greatly enhances the applicability of the system, providing personalized solutions for different environments and different users. By considering the user's mobile status and signal strength, this judgment process is more comprehensive, effective and accurate, and truly realizes the screen state switching. In this way, users can enjoy a safe and convenient experience in various dynamic scenarios.

[0041] In one embodiment, before the step S5 of judging whether the signal strength set meets the preset switching condition of the current screen state, the method further comprises: S411: receiving the security level sent by the designated mobile terminal; S412: obtaining the preset switching condition based on the security level according to the preset security level-switching condition correspondence table.

[0042] As described in steps S411-S412 above, the security level information from the designated mobile terminal is received. This security level can be calculated and evaluated by the mobile device based on various factors such as user settings, device status, location, and current activity scenario, etc., that is, the designated mobile terminal will transmit the security level information to the static terminal. The security level generally includes multiple levels, such as "high", "medium", "low", etc., reflecting the user's security needs and risk assessment, and the introduction of the security level helps to enhance the security and flexibility of the screen state switching system. When the system receives the security level information, different locking strategies can be taken according to different levels. For example, under high security level, the system can lower the signal strength threshold and lock the screen quickly; while under low security level, the system can handle the lock screen state relatively leniently, providing greater convenience for use. In this way, the system realizes personalized response to user needs, ensuring that the user's work efficiency and use experience are improved without affecting security. In an embodiment, the corresponding preset switching conditions can also be obtained from the preset "mobile state and switching condition correspondence table" according to the received current mobile state and security level. This correspondence table is designed for different mobile states and security levels, ensuring that the system can flexibly adjust the lock screen policy in different context environments. For example, when the user is in a "still" state under high security level, the signal strength must be higher than -60dBm to maintain the unlocked screen state; while in the "walking" state, the signal strength threshold needs to be lowered to -70dBm. Through this dynamic adjustment mechanism, the system can adapt to the real-time state and security needs of the user, providing a more intelligent and personalized interactive experience. Therefore, by combining the current mobile state, security level and preset switching conditions, the system realizes more accurate and effective lock screen control, ensuring security while avoiding unnecessary interference. In some embodiments, if the static terminal is a smart lamp, the light can be brightened when the signal strength is high, and the light can be automatically dimmed when the signal strength is low, that is, the brightness of the light is intelligently adjusted, and if it is an air conditioner, the temperature can be lowered when the signal strength is high, and the temperature can be automatically raised when the signal strength is low, that is, the temperature of the air conditioner is intelligently adjusted, achieving energy saving.

[0043] The application also provides a screen state switching method applied to a PCBA module connected with a static terminal, the method comprising: S001: establishing a connection with the static terminal based on the Bluetooth HID protocol; S002: periodically sending an input report of the signal strength to the static terminal in real time.

[0044] As described in the above steps S001-S022, the designated mobile terminal (such as a smartphone or tablet) first needs to establish a Bluetooth HID protocol-based connection with the static terminal. This process usually starts in the Bluetooth settings interface of the mobile terminal, where the user selects the static terminal to be connected and initiates a pairing request. Upon receiving this request, the static terminal needs to perform identity verification to ensure the security of the connection. During the connection process, the mobile terminal broadcasts its HID service information, including device ID, supported functions, device type, etc., which helps the static terminal identify and confirm the legitimacy of the connection. Once the connection is successfully established, Bluetooth creates a stable data channel, allowing bidirectional communication between the mobile terminal and the static terminal. During this process, the pairing information of both parties is also recorded to facilitate faster future connections. The key to establishing a Bluetooth HID connection lies in ensuring stability and security, and device interoperability is also crucial. After a successful connection, the mobile terminal can perform subsequent signal transmission and lock screen control functions, which lay the foundation for realizing screen state switching. Through the established Bluetooth HID connection, the mobile terminal begins to periodically send signal strength input reports to the static terminal in real time. This input report usually contains the RSSI (Received Signal Strength Indication) value sent by the mobile terminal, indicating the wireless signal quality between the mobile terminal and the static terminal. The interval of periodic transmission can be set according to actual needs, such as every second, every two seconds, etc., to ensure the real-time nature of signal updates. The purpose of sending signal strength reports is to enable the static terminal to dynamically monitor the distance between the user and the device, so as to make accurate decisions when determining the lock screen state. When the signal strength value is high, it indicates that the user is close to the static terminal, and the system can decide to remain in the unlocked state; when the signal gradually weakens and reaches a preset threshold, the system may automatically switch to the locked state, thereby ensuring data security. During transmission, changes in signal strength can provide data support for subsequent machine learning algorithms, such as analyzing user behavior patterns and improving the accuracy of lock screen decisions.

[0045] Referring Figure 3 , the present application also provides a screen state switching system, which is provided with a PCBA module, and comprises: a connection module 902 for establishing a wireless connection with a designated mobile terminal based on the PCBA module; a first acquisition module 904 for periodically acquiring the signal strength of the designated mobile terminal in real time and adding a timestamp to each signal strength based on the acquisition time; a selection module 906 for selecting a preset number of signal strengths as a signal strength set based on the timestamps of each signal strength; The second acquisition module 908 is configured to acquire a current screen state of the display screen; wherein the current screen state comprises a locked screen state and an unlocked screen state. The judgment module 910 is configured to judge whether the signal strength set satisfies a preset switching condition of the current screen state. The switching module 912 is configured to switch the current screen state if the signal strength set satisfies the preset switching condition of the current screen state.

[0046] In an embodiment, the connection module 902 comprises: The HID service information acquisition submodule is configured to acquire the HID service information broadcasted by the specified mobile terminal. The specified mobile terminal connection submodule is configured to establish a connection between the PCBA module and the specified mobile terminal based on the HID service information.

[0047] In an embodiment, the judgment module 910 comprises: The input submodule is configured to take the current screen state and the signal strength set as inputs of a machine learning model, and execute the machine learning model to obtain a calculation result. The comparison submodule is configured to compare the calculation result with a set threshold to determine whether the preset switching condition of the current screen state is satisfied.

[0048] In an embodiment, the judgment module 910 further comprises: The sample data set acquisition submodule is configured to acquire a plurality of sample data sets and label information corresponding to each sample data set; the label information comprises a current screen state corresponding to each sample data set and a corresponding calculation result. The feature vector calculation submodule is configured to calculate a feature vector of each sample data set. Wherein, represents a qth time point, represents a feature vector of an ith sample data set, represents a rate of change of signal strength between the qth time point and a zth time point, q, z, i are positive integers, and q>z, i≤n. The feature vector division submodule is configured to divide a plurality of the feature vectors into a training data set and a test data set according to a preset proportion. The training data input submodule is configured to input the training data set and label information corresponding to the training data set into a preset machine learning initial model, and train the preset machine learning initial model according to an optimal hyperparameter. The detection submodule is configured to detect the trained model by using the test data set and label information corresponding to the test data set, and obtain the machine learning model when a detection result meets a training requirement of the model.

[0049] In one embodiment, the screen state switching system further comprises: The current mobile state receiving module is configured to receive a current mobile state of the specified mobile terminal. The preset switching condition first obtaining module is configured to obtain a preset switching condition based on the current mobile state according to a preset mobile state and switching condition correspondence table.

[0050] In one embodiment, the screen state switching system further comprises: The security level obtaining module is configured to receive a security level sent by the specified mobile terminal. The preset switching condition second obtaining module is configured to obtain a preset switching condition based on the security level according to a preset security level and switching condition correspondence table.

[0051] Figure 4 An internal structure diagram of a U disk device in one embodiment is shown. The U disk device integrates the PCBA module, and the U disk device includes a processor, a memory, and a network interface connected through a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the U disk device stores an operating system and can also store a computer program. When the computer program is executed by the processor, the processor can implement the screen state switching method. The internal memory can also store a computer program. When the computer program is executed by the processor, the processor can execute the screen state switching method. Those skilled in the art can understand that Figure 4 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the U disk device to which the scheme of the present application is applied. A specific U disk device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0052] In one embodiment, a U disk device is provided, which includes a PCBA module including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor executes the following steps: Establish a connection with a static terminal based on a Bluetooth HID protocol; Periodically send an input report of a signal strength of the static terminal in real time.

[0053] The PCBA module is used to establish a stable connection with the designated mobile terminal, so as to ensure the reliability of information transmission. In the process of signal strength monitoring, the application of time stamp can effectively reduce the influence of instantaneous interference on the judgment result, so that the system can more accurately evaluate the distance of the user. Through the construction of the signal strength set and the judgment combined with the current screen state, the system can intelligently and automatically switch the lock screen state, thereby reducing unnecessary manual operation, improving the use efficiency of the user, and improving the safety and user experience of the static terminal.

[0054] In one embodiment, a computer readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor performs the following steps: Based on the PCBA module and the designated mobile terminal establishing a wireless connection; Real-time periodic acquisition of the signal strength of the designated mobile terminal, and adding a time stamp to each signal strength based on the acquisition time; Selecting a preset number of signal strengths as a signal strength set based on the time stamp of each signal strength; Acquiring the current screen state of the display screen; wherein the current screen state includes a locked screen state and an unlocked screen state; Judging whether the signal strength set meets the preset switching condition of the current screen state; If the signal strength set meets the preset switching condition of the current screen state, switching the current screen state.

[0055] The PCBA module is used to establish a stable connection with the designated mobile terminal, so as to ensure the reliability of information transmission. In the process of signal strength monitoring, the application of time stamp can effectively reduce the influence of instantaneous interference on the judgment result, so that the system can more accurately evaluate the distance of the user. Through the construction of the signal strength set and the judgment combined with the current screen state, the system can intelligently and automatically switch the lock screen state, thereby reducing unnecessary manual operation, improving the use efficiency of the user, and improving the safety and user experience of the static terminal.

[0056] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0057] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0058] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A screen state switching method, applied to a static terminal, wherein the static terminal is provided with a PCBA module, characterized in that: The method comprises: Establishing a wireless connection with a designated mobile terminal based on the PCBA module; Periodically acquiring the signal strength with the designated mobile terminal in real time through the PCBA module, and adding a timestamp to each signal strength based on the acquisition time; selecting a preset number of signal strengths as a signal strength set based on the timestamps of the respective signal strengths; Obtaining the current screen state of the display screen; wherein the current screen state includes a locked screen state and an unlocked screen state; Determining whether the signal strength set meets a preset switching condition of the current screen state; If the signal strength set meets the preset switching condition of the current screen state, the current screen state is switched.

2. The screen state switching method according to claim 1, wherein: The step of establishing a wireless connection with a designated mobile terminal based on the PCBA module includes: Obtaining HID service information broadcast by the designated mobile terminal; Based on the HID service information, a connection is established with the designated mobile terminal through the PCBA module.

3. The screen state switching method according to claim 1, wherein: The step of determining whether the signal strength set meets the preset switching condition of the current screen state includes: Using the current screen state and the signal strength set as inputs of a machine learning model, and executing the machine learning model to obtain a calculation result; The calculation result is compared with a set threshold to determine whether a preset switching condition of the current screen state is met.

4. The screen state switching method according to claim 3, characterized in that: Before the step of using the current screen state and the signal strength set as inputs of a machine learning model and executing the machine learning model to obtain a calculation result, the method further includes: Acquire multiple groups of sample data sets and label information corresponding to each group of sample data sets; the label information includes the current screen state and the corresponding calculation result corresponding to each group of sample data sets; Calculate the eigenvectors of each sample dataset ,in represents the qth time point, represents the feature vector of the i-th sample data set, represents the rate of change of the signal intensity between the qth time point and the zth time point, where q, z, and i are positive integers and q>z, i≤n; Dividing the plurality of feature vectors into a training data set and a test data set according to a preset ratio; Inputting the training data set and the label information corresponding to the training data set into a preset machine learning initial model, and training the preset machine learning initial model according to the optimal hyperparameters; The trained model is tested using the test data set and the label information corresponding to the test data set. When the test result meets the training requirements of the model, a machine learning model is obtained.

5. The screen state switching method according to claim 1, wherein: Before the step of determining whether the signal strength set meets the preset switching condition of the current screen state, the method further includes: receiving a current mobile status of the designated mobile terminal; According to a preset movement state and switching condition correspondence table, a preset switching condition is obtained based on the current movement state.

6. The screen state switching method according to claim 1, wherein: Before the step of determining whether the signal strength set meets the preset switching condition of the current screen state, the method further includes: Receiving the security level sent by the designated mobile terminal; According to a preset table of correspondence between security levels and switching conditions, a preset switching condition is obtained based on the security level.

7. A screen state switching method, applied to a PCBA module, wherein the PCBA module is connected to a static terminal, characterized in that: The method comprises: Establish a connection with the specified mobile device based on the Bluetooth HID protocol; The signal strength input report is sent to the static terminal periodically in real time.

8. A screen state switching system, characterized in that: The system is provided with a PCBA module, and the system comprises: A connection module, configured to establish a wireless connection with a designated mobile terminal based on the PCBA module; A first acquisition module is configured to periodically acquire the signal strength with the designated mobile terminal in real time and add a timestamp to each signal strength based on the acquisition time; A selection module, configured to select a preset number of signal strengths as a signal strength set based on the timestamps of the respective signal strengths; A second acquisition module is used to obtain the current screen state of the display screen; wherein the current screen state includes a locked screen state and an unlocked screen state; A judgment module, configured to judge whether the signal strength set satisfies a preset switching condition of the current screen state; The switching module is configured to switch the current screen state if the signal strength set satisfies a preset switching condition of the current screen state.

9. A computer-readable storage medium, characterized in that A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the screen state switching method according to any one of claims 1 to 7.

10. A USB flash drive device, characterized in that: The device includes a PCBA module, which includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor performs the steps of the screen state switching method as claimed in claim 7.

Citation Information

Patent Citations

  • Method and device for switching state of electronic equipment

    CN104978544A

  • Screen brightness adjusting method and device, storage medium and electronic equipment

    CN119274516A

  • Temperature sensing devices and wireless communication improvements for cooking appliances

    US20250268420A1