Automatic screen locking method and system, electronic equipment and storage medium

By establishing a Bluetooth connection with the user's mobile device, obtaining the Bluetooth signal strength calculation distance in real time, the automatic lock screen solves the problem of being unable to dynamically perceive the user's departure in the existing technology, and realizes the timely screen locking and data security improvement of the computer.

CN120408733APending Publication Date: 2025-08-01BEIJING BAIDUPAY SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510484912.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing computer lock screen function cannot dynamically sense whether the user has left, resulting in the failure to lock the screen in time when leaving for a short period of time, and there is a risk of sensitive information leakage.

Method used

By establishing a Bluetooth connection with the user's mobile device, the Bluetooth signal strength is obtained in real time, the distance between devices is calculated, and the screen is automatically locked when the preset distance threshold is exceeded.

Benefits of technology

It realizes automatic screen locking when users are away from computers, reducing the risk of information leakage, improving data security, and no additional hardware equipment is required.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408733A_ABST
    Figure CN120408733A_ABST
Patent Text Reader

Abstract

The invention provides an automatic screen locking method and system, electronic equipment and a storage medium, and the method comprises the steps: building Bluetooth connection between a computer and user mobile equipment, obtaining the Bluetooth signal strength of the user mobile equipment in real time after the Bluetooth connection is built, judging the distance between the computer and the user mobile equipment based on the Bluetooth signal strength, and locking a screen according to the distance. And when the distance exceeds a preset distance threshold value, controlling the computer to lock the screen. When the distance between the mobile device of the user and the computer exceeds the preset distance threshold value, it is indicated that the distance between the user and the computer is long, at the moment, computer screen locking can be controlled to achieve automatic screen locking of the computer in time when the user is away from the computer, and user data safety is improved. Moreover, the Bluetooth signal strength of the mobile equipment is acquired in real time, namely, the distance between the user and the computer is acquired in real time, so that timely response to the behavior of the user away from the computer is ensured, and the screen locking timeliness of the computer is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data security, and in particular, to an automatic screen locking method, system, electronic device, and storage medium. Background Art

[0002] For the sake of data security, it is usually necessary to lock the computer screen when the user leaves the computer. Computer screen locking refers to a state in which the computer screen enters a locked state through specific operations or settings in the computer operating system. In this state, the user cannot directly access the desktop, open applications, or view the content of running programs to prevent unauthorized access and data leakage.

[0003] The existing computer screen locking function usually relies on manual operations by the user or automatically locks the screen after a fixed time if the user has no operation within that fixed time. However, this method cannot dynamically sense whether the user has left the computer, which poses a security risk. Especially when the user leaves for a short time, failure to lock the screen in time may lead to sensitive information being viewed or stolen by others. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide an automatic screen locking method, system, electronic device, and storage medium to improve the timeliness of computer screen locking and thus enhance user data security.

[0005] According to one aspect of the present invention, an automatic screen locking method is provided, which is applied to a computer. The method includes:

[0006] Establish a Bluetooth connection with the user's mobile device, where the distance between the user's mobile device and the user is less than a first preset distance threshold;

[0007] Obtain the Bluetooth signal strength of the user's mobile device in real time;

[0008] Calculate the target distance between the computer and the user's mobile device based on the Bluetooth signal strength;

[0009] When the target distance exceeds a second preset distance threshold, control the computer to lock the screen.

[0010] In a possible embodiment, the computer includes a Bluetooth protocol interface, and the method further includes:

[0011] After establishing the Bluetooth connection with the user's mobile device, start the Bluetooth listening function to receive the Bluetooth signal strength of the user's mobile device in real time;

[0012] The obtaining the Bluetooth signal strength of the user's mobile device in real time includes:

[0013] Collect the Bluetooth signal strength of the user's mobile device through the Bluetooth protocol interface according to a preset sampling period.

[0014] In a possible embodiment, the computer includes a display interface, and the method further includes:

[0015] When the target distance exceeds the second preset distance threshold, start a timer according to a preset duration, and display the lock screen countdown information on the display interface according to the timing duration of the timer;

[0016] If an operation on the computer by the user is received before the timing duration of the timer reaches the preset duration, stop the timer from timing, and return to the step of continuously obtaining the Bluetooth signal strength of the user's mobile device in real time;

[0017] If an operation on the computer by the user is not received before the timing duration of the timer reaches the preset duration, control the computer to lock the screen.

[0018] In a possible embodiment, the controlling the computer to lock the screen includes:

[0019] Call the lock screen interface in the computer to call a preset lock screen program to perform a lock screen operation on the computer.

[0020] According to another aspect of the present invention, an automatic lock screen system is provided. The system includes a computer and a user's mobile device, and the distance between the user's mobile device and the user is less than a first preset distance;

[0021] The user's mobile device is configured to establish a Bluetooth connection with the computer;

[0022] The computer is configured to establish a Bluetooth connection with the user's mobile device, continuously obtain the Bluetooth signal strength of the user's mobile device in real time; calculate the target distance between the computer and the user's mobile device based on the Bluetooth signal strength; and control the computer to lock the screen when the target distance exceeds a second preset distance threshold.

[0023] In a possible embodiment, the computer includes a Bluetooth protocol interface. After establishing the Bluetooth connection with the user's mobile device, the computer is configured to start a Bluetooth listening function to continuously receive the Bluetooth signal strength of the user's mobile device in real time;

[0024] The continuously obtaining the Bluetooth signal strength of the user's mobile device in real time includes:

[0025] Collect the Bluetooth signal strength of the user's mobile device through the Bluetooth protocol interface according to a preset sampling period.

[0026] In a possible embodiment, the computer includes a display interface. The computer is configured to start a timer for a preset duration when the target distance exceeds the second preset distance threshold, and display lock screen countdown information on the display interface according to the timing duration of the timer.

[0027] When an operation on the computer by the user is received before the timing duration of the timer reaches the preset duration, stop the timing of the timer and return to the step of continuously obtaining the Bluetooth signal strength of the user's mobile device in real time.

[0028] When an operation on the computer by the user is not received before the timing duration of the timer reaches the preset duration, control the computer to lock the screen.

[0029] In a possible embodiment, the controlling the computer to lock the screen includes:

[0030] Call the lock screen interface in the computer to call a preset lock screen program to perform a lock screen operation on the computer.

[0031] According to another aspect of the present invention, there is provided an electronic device, including:

[0032] A processor; and

[0033] A memory storing a program,

[0034] wherein the program includes instructions that, when executed by the processor, cause the processor to execute any one of the above-described automatic lock screen methods.

[0035] According to another aspect of the present invention, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute any one of the above-described automatic lock screen methods.

[0036] One or more technical solutions provided in the embodiments of the present invention establish a Bluetooth connection between a computer and a user's mobile device, and after establishing the Bluetooth connection, the Bluetooth signal strength of the user's mobile device is obtained in real time. Based on the Bluetooth signal strength, the distance between the computer and the user's mobile device is judged. When the distance exceeds a preset distance threshold, the computer is controlled to lock the screen. Since the distance between the user's mobile device and the user is relatively close, when the distance between the user's mobile device and the computer exceeds the preset distance threshold, it means that the user is far away from the computer. At this time, controlling the computer to lock the screen can achieve automatic locking of the computer in a timely manner when the user is away from the computer. Even if the user forgets to lock the screen when leaving, the system can automatically protect sensitive data, reduce the risk of information leakage, and improve the security of user data. Moreover, the Bluetooth signal strength of the mobile device is collected in real time, that is, the distance between the user and the computer is collected in real time, ensuring timely response to the user's behavior of moving away from the computer and further improving the timeliness of computer screen locking. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In the following description of exemplary embodiments with reference to the accompanying drawings, more details, features, and advantages of the present invention are disclosed. In the drawings:

[0038] Figure 1 is a flowchart of an automatic screen locking method provided by an embodiment of the present invention;

[0039] Figure 2 is a schematic diagram of a user's mobile device near a computer in the automatic screen locking method provided by an embodiment of the present invention;

[0040] Figure 3 is a schematic diagram of a user's mobile device moving away from a computer in the automatic screen locking method provided by an embodiment of the present invention;

[0041] Figure 4 is a schematic structural diagram of an automatic screen locking system provided by an embodiment of the present invention;

[0042] Figure 5 shows a structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0043] The embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not used to limit the protection scope of the present invention.

[0044] It should be understood that the various steps described in the method embodiments of the present invention can be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this regard.

[0045] As used herein, the term "comprising" and its variants are open-ended, that is, "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0046] It should be noted that the modification of "one" and "a plurality" mentioned in the present invention is illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly stated in the context, it should be understood as "one or more".

[0047] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0048] In the related art, it is usually adopted that the user manually locks the screen or sets a fixed time, and indexing is performed when the user has no operation within this fixed time. This traditional screen locking method lacks dynamic perception and cannot detect in real time whether the user leaves the computer, completely relying on the user's active behavior or fixed time intervals. The fixed-time screen locking lacks flexibility and cannot be dynamically adjusted according to the actual situation of the user, which may lead to frequent screen locking or failure to lock the screen in time during use. When the user leaves for a short time without locking the screen, sensitive information in the computer may be viewed or tampered with by others, posing a risk of data leakage.

[0049] In view of this, the embodiments of the present invention provide an automatic screen locking method, system, electronic device and storage medium. The automatic screen locking method provided by the embodiments of the present invention can be applied to any electronic device with a screen locking function. This electronic device may specifically be a computer. The solution of the present invention will be described below with reference to the accompanying drawings:

[0050] Figure 1 It is a schematic flowchart of an automatic screen locking method provided by an embodiment of the present invention, which may include the following steps:

[0051] S101. Establish a Bluetooth connection with the user's mobile device, where the distance between the user's mobile device and the user is less than the first preset distance threshold;

[0052] S102. Obtain the Bluetooth signal strength of the user's mobile device in real time;

[0053] S103. Calculate the target distance between the computer and the user's mobile device based on the Bluetooth signal strength;

[0054] S104. When the target distance exceeds the second preset distance threshold, control the computer to lock the screen.

[0055] Applying the embodiments of the present invention, by establishing a Bluetooth connection between the computer and the user's mobile device, and obtaining the Bluetooth signal strength of the user's mobile device in real time after establishing the Bluetooth connection, judging the distance between the computer and the user's mobile device based on the Bluetooth signal strength, and controlling the computer to lock the screen when the distance exceeds the preset distance threshold. Since the distance between the user's mobile device and the user is relatively close, when the distance between the user's mobile device and the computer exceeds the preset distance threshold, it means that the user is far away from the computer. At this time, controlling the computer to lock the screen can achieve that when the user is away from the computer, the computer automatically locks the screen in time. Even if the user forgets to lock the screen when leaving, the system can automatically protect sensitive data, reduce the risk of information leakage, and improve the security of the user's data. Moreover, the Bluetooth signal strength of the mobile device is collected in real time, that is, the distance between the user and the computer is collected in real time, ensuring timely response to the user's behavior of being away from the computer and further improving the timeliness of the computer locking the screen.

[0056] The following is an exemplary description of S101 - S104:

[0057] The user's mobile device can be a mobile terminal carried by the user, and the mobile terminal can include a mobile phone, a smart watch, a head-mounted device, etc. The distance between the user's mobile device and the user is usually relatively close. Exemplarily, it can be defined that the distance between the user's mobile device and the user is less than the first preset distance threshold, and the first preset distance threshold can be determined according to the user's wearing habit, such as 10 cm, 30 cm, etc.

[0058] There can be multiple such user mobile devices. Correspondingly, multiple user mobile devices can establish Bluetooth connections with the computer. Exemplarily, if the user holds a mobile phone and a smart watch, a Bluetooth connection can be established between the mobile phone and the computer and a Bluetooth connection can be established between the smart watch and the computer respectively.

[0059] Both user mobile devices and computers can include a Bluetooth connection module, which can implement Bluetooth discovery and Bluetooth pairing. As a possible implementation, both the computer and the user mobile device can turn on the Bluetooth pairing mode to search for connectable Bluetooth devices and / or be searched by other devices. Taking the mobile device's active Bluetooth search as an example, after the mobile device searches for the computer's corresponding computer identifier among the surrounding pairable Bluetooth devices, it can send a Bluetooth pairing request to the computer. The Bluetooth pairing request can include information such as the user mobile device identifier and Bluetooth address of the user mobile device. After receiving the Bluetooth pairing request, the computer can display the information contained in the Bluetooth pairing request on the display interface. The user can determine whether to accept the Bluetooth pairing based on this information. If accepted, the computer can perform Bluetooth pairing with the user mobile device, that is, establish a Bluetooth connection between the computer and the user mobile device.

[0060] The above computer can also include a Bluetooth monitoring module. After establishing a Bluetooth connection between the computer and the user mobile device, the computer can start the Bluetooth monitoring function. After the Bluetooth monitoring function is started, the computer can use this Bluetooth monitoring module to continuously monitor the Bluetooth signal strength RSSI (Received Signal Strength Indication) of the user mobile device. The Bluetooth monitoring module can obtain Bluetooth signal strength data through the Bluetooth protocol interface built into the operating system. This Bluetooth protocol interface can be HCI (Host Controller Interface). As a possible implementation, the Bluetooth protocol interface can collect the Bluetooth signal strength of the user mobile device according to a preset sampling period. This sampling period can be pre-set according to the actual application scenario, such as it can be 10 times / s, 1 time / s, etc. When the Bluetooth monitoring module receives a Bluetooth signal, it can measure the received signal power and convert it into an RSSI value. The higher the RSSI value, the stronger the received signal; the lower the RSSI value, the weaker the received signal.

[0061] After each collection of the Bluetooth signal strength of the user mobile device, the target distance between the computer and the user mobile device can be calculated based on this Bluetooth signal strength. The Bluetooth signal strength is usually negatively correlated with the distance between devices, that is, the shorter the distance between two devices, the higher the Bluetooth signal strength, and the longer the distance between two devices, the lower the Bluetooth signal strength. Therefore, the Bluetooth signal strength of the user mobile device collected by the computer can intuitively reflect the distance between the user mobile device and the computer.

[0062] As a possible implementation, the unit Bluetooth signal strength corresponding to the unit distance when the distance between the computer and the user's mobile device is pre-computed. The unit distance is usually 1m. The target distance between the computer and the user's mobile device can be obtained by the ratio between the Bluetooth signal strength actually received by the computer and the unit Bluetooth signal strength. The specific formula for calculating the distance between devices based on the Bluetooth signal strength can refer to the description in the related technology and will not be elaborated here.

[0063] As another possible implementation, a second distance threshold can be pre-set. The second pre-set distance threshold can be set according to the actual application scenario, such as it can be 2 meters. The second pre-set distance threshold can also be defined by the user himself to adapt to different usage scenarios. Exemplarily, a Bluetooth configuration interface can be displayed on the computer and accept the input of the second pre-set distance threshold by the user in this Bluetooth configuration interface to obtain the second distance threshold. For example, the user can set a relatively far threshold (such as 3 meters) in the office environment, and a relatively close threshold (such as 1 meter) in public places such as cafes.

[0064] The computer can pre-obtain the corresponding Bluetooth signal strength threshold for the second pre-set distance threshold. Exemplarily, the Bluetooth signal strength value corresponding to the distance between the computer and the user's mobile device reaching the second pre-set distance threshold can be determined based on historical statistical data as the Bluetooth signal strength threshold. The above historical statistical data can be the Bluetooth signal strengths corresponding to different distances between the computer and the user device during the historical Bluetooth connection process. The above Bluetooth signal strength threshold can be the average value, minimum value or maximum value, etc. of the Bluetooth signal strength values corresponding to the second pre-set distance threshold.

[0065] After the computer obtains the Bluetooth signal strength between it and the user's mobile device through the Bluetooth monitoring module, it can judge whether the Bluetooth signal strength is less than the Bluetooth signal strength threshold. If it is less, it is determined that the target distance between the user's mobile device and the computer exceeds the second pre-set distance threshold. If it is not less, it is determined that the target distance between the user's mobile device and the computer does not exceed the second pre-set distance threshold.

[0066] Exemplarily, the Bluetooth signal strength threshold corresponding to the second pre-set distance threshold is -70dBm. Then when the Bluetooth signal strength is in the range of 0 to -50dBm, the Bluetooth signal strength is strong, indicating that the user's mobile device is close. When the Bluetooth signal strength is in the range of -50 to -70dBm, the Bluetooth signal strength is medium, indicating that the user's mobile device is slightly farther. When the Bluetooth signal strength is below -70dBm, the Bluetooth signal strength is weak, indicating that the device is farther or in the critical range.

[0067] If the target distance does not exceed the second preset distance threshold, the Bluetooth signal strength of the user's mobile device can be continuously monitored; if the target distance exceeds the second preset distance threshold, it is determined that the user may have left the computer, so the computer can enter the lock screen process. Specifically, the computer can call the lock screen interface in the computer to call a preset lock screen program to perform a lock screen operation on the computer.

[0068] In the case where there are multiple user mobile devices connected to the computer via Bluetooth, the target distance between each user mobile device and the computer can be calculated separately. If there is a target distance that exceeds the second preset distance threshold, it can be determined that the user has left the computer, and the computer can enter the lock screen process. The computer can also record the lock screen information in this automatic lock screen, including the device RSSI value, the lock screen time, etc.

[0069] In a possible embodiment, in order to avoid false lock screens, the user's operations can be considered in the automatic lock screen. Exemplarily, the above method can further include the following steps:

[0070] S41. When the target distance exceeds the second preset distance threshold, start a timer according to a preset duration, and display lock screen countdown information in the display interface according to the timing duration of the timer;

[0071] S42. If an operation of the user on the computer is received before the timing duration of the timer reaches the preset duration, stop the timer from timing, and return to the step of continuously obtaining the Bluetooth signal strength of the user's mobile device in real time;

[0072] S43. If an operation of the user on the computer is not received before the timing duration of the timer reaches the preset duration, control the computer to lock the screen.

[0073] When the target distance exceeds the second preset distance threshold, the computer can activate the countdown reminder module. The countdown reminder module may include a timer. When the countdown reminder module is activated, the timer starts counting. Specifically, the timer can count down from a preset duration. For example, if the preset duration is 10s, the timer can count down from 10s until the count reaches 0. While the timer is counting, the countdown information can be displayed on the computer display interface. The countdown information can be the real-time counting time in the timer. Based on the above example, the timer counts down from 10s until the count reaches 0, and then the display interface can synchronously display 10, 9... 0 with the timer. The above countdown information may also include a screen lock reminder message, which is used to remind the user that the computer is about to lock the screen. Exemplarily, the reminder text "It is detected that you have left the computer, and the screen will be automatically locked in 10 seconds. Please operate to cancel" can be displayed while showing the counting time.

[0074] The user can interrupt the countdown through operations such as mouse movement, keyboard tapping, or touch screen. If the user performs an operation on the computer before the countdown ends, the computer can stop the countdown and return to the step of continuously monitoring the Bluetooth signal strength of the user's mobile device in real time. If the user does not perform any operation on the computer before the countdown ends, that is, the computer does not receive any operation from the user before the countdown ends, the computer can enter the screen lock step, that is, the computer can call the screen lock interface in the operating system to call the preset screen lock program to perform the screen lock operation on the computer.

[0075] In an actual application scenario, there may be a situation where the user briefly leaves the computer and then returns. To simplify the user operation, before the above countdown ends, if it is detected that the target distance between the user's mobile device and the computer is less than the second preset distance threshold, the computer can automatically exit the screen lock program. As a possible implementation, during the countdown of the countdown reminder module, the Bluetooth monitoring module can continuously collect the Bluetooth signal strength of the user's mobile device according to the preset sampling period, and determine whether the target distance between the computer and the user's mobile device is less than the second preset distance threshold based on the Bluetooth signal strength. If it is less, the computer can stop the countdown of the countdown reminder module to interrupt the screen lock process.

[0076] As Figure 2 shown, Figure 2 FIG. is a schematic diagram of an application scenario of the automatic screen lock method provided by an embodiment of the present invention. Figure 2Among them, the Bluetooth signal strength threshold is -70 dBm. The user's mobile device includes a mobile phone and a smart watch. The computer receives an RSSI of -40 dBm from the mobile phone and an RSSI of -50 dBm from the smart watch. At this time, both the mobile phone and the smart watch are relatively close to the computer, and the Bluetooth signal strength is strong. Therefore, the lock screen process will not be triggered.

[0077] As Figure 3 shown, Figure 3 in the computer receives an RSSI of -80 dBm from the mobile phone and an RSSI of -90 dBm from the smart watch. At this time, both the mobile phone and the smart watch are relatively far from the computer, and the Bluetooth signal strength is weak. Therefore, the computer can lock the screen. Specifically, the computer can start a countdown and display the countdown time and a prompt message of "The screen will be automatically locked soon. Press any key to cancel" on the display interface. If the user performs any operation on the computer before the countdown ends, the lock screen process can be interrupted. If the user does not perform any operation on the computer before the countdown ends, the computer can be locked. The lock screen function calls the lock screen interface of the operating system and requires the user to unlock by entering a password or authentication (such as fingerprint, face recognition) to ensure data security.

[0078] Applying the embodiment of the present invention, by listening to the Bluetooth signal strength of the mobile device (such as a smart watch or a mobile phone) paired with the computer, the distance between the user and the computer is dynamically detected. When the user leaves and reaches a preset distance, the system counts down to prompt the user to operate. If there is no response, the screen will be automatically locked. In this way, even if the user forgets to lock the screen when leaving, the system can automatically protect sensitive data and reduce the risk of information leakage. By listening to the Bluetooth signal in real time, it is ensured that the system can respond quickly when the user leaves. The countdown prompt function allows the user to interrupt the lock screen to avoid misoperation affecting the user experience and improve the fault tolerance of the automatic lock screen method provided by the present invention. Moreover, the present invention does not require additional hardware devices and is applicable to most computers and mobile terminals that support Bluetooth functions. It can be widely applied to work scenarios with high information security requirements, such as office computers, terminal devices in the financial industry, etc. It can be seen that the present invention effectively improves the security of the computer in the scenario where the user leaves, while maintaining high user friendliness and operation flexibility.

[0079] Based on the same inventive concept, according to another aspect of the present invention, an automatic lock screen system is provided. As Figure 4 shown, the system 400 may include a computer 401 and a user mobile device 402, and the distance between the user mobile device 402 and the user is less than a first preset distance;

[0080] The user mobile device 402 is used to establish a Bluetooth connection with the computer 401;

[0081] The computer 401 is used to establish a Bluetooth connection with the user mobile device 402, and obtain the Bluetooth signal strength of the user mobile device in real time; calculate the target distance between the computer and the user mobile device based on the Bluetooth signal strength; and lock the screen of the computer when the target distance exceeds a second preset distance threshold.

[0082] In a possible embodiment, a Bluetooth protocol interface is included in the computer. The computer 401 is used to start a Bluetooth listening function after establishing the Bluetooth connection with the user mobile device 402, so as to receive the Bluetooth signal strength of the user mobile device 402 in real time.

[0083] The obtaining the Bluetooth signal strength of the user mobile device in real time includes:

[0084] Collect the Bluetooth signal strength of the user mobile device through the Bluetooth protocol interface according to a preset sampling period.

[0085] In a possible embodiment, a display interface is included in the computer. The computer 401 is used to start a timer according to a preset duration when the target distance exceeds the second preset distance threshold, and display a screen lock countdown message on the display interface according to the timing duration of the timer.

[0086] If an operation of the user on the computer is received before the timing duration of the timer reaches the preset duration, stop the timer from timing, and return to the step of obtaining the Bluetooth signal strength of the user mobile device in real time.

[0087] If an operation of the user on the computer is not received before the timing duration of the timer reaches the preset duration, control the computer to lock the screen.

[0088] In a possible embodiment, the controlling the computer to lock the screen includes:

[0089] Call the screen lock interface in the computer to call a preset screen lock program to perform a screen lock operation on the computer.

[0090] Among them, the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved in the present invention all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0091] An exemplary embodiment of the present invention further provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, it is used to cause the electronic device to execute the method according to the embodiment of the present invention.

[0092] An exemplary embodiment of the present invention further provides a non-transitory computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor of a computer, it is used to cause the computer to execute the method according to the embodiment of the present invention.

[0093] An exemplary embodiment of the present invention further provides a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, it is used to cause the computer to execute the method according to the embodiment of the present invention.

[0094] Reference Figure 5 , the structural block diagram of the electronic device 500 that can be used as a server or a client of the present invention will now be described. It is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described herein and / or claimed.

[0095] As Figure 5 shown, the electronic device 500 includes a computing unit 501, which can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 502 or the computer program loaded from the storage unit 508 into the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.

[0096] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 can be any type of device capable of inputting information into the electronic device 500. The input unit 506 can receive input digital or character information and generate key signal inputs related to the user settings and / or function controls of the electronic device. The output unit 507 can be any type of device capable of presenting information and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 can include, but is not limited to, a magnetic disk and an optical disk. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks and can include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0097] The computing unit 501 can be various general-purpose and / or dedicated processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 executes the various methods and processes described above. For example, in some embodiments, any of the above-described automatic screen locking methods can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 500 via the ROM 502 and / or the communication unit 509. In some embodiments, the computing unit 501 can be configured to execute any of the above-described automatic screen locking methods in any other suitable manner (e.g., by means of firmware).

[0098] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a dedicated computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.

[0099] In the context of the present invention, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0100] As used in the present invention, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., a disk, an optical disk, a memory, a programmable logic device (PLD)) that can be used to provide machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal that can be used to provide machine instructions and / or data to a programmable processor.

[0101] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0102] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.

[0103] A computer system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The client and server relationship is generated by computer programs running on the respective computers and having a client-server relationship with each other.

Claims

1. An automatic screen locking method, characterized in that, Applied to a computer, the method includes: Establish a Bluetooth connection with a user mobile device, where the distance between the user mobile device and the user is less than a first preset distance threshold; Obtain the Bluetooth signal strength of the user mobile device in real time; Calculate the target distance between the computer and the user mobile device based on the Bluetooth signal strength; When the target distance exceeds a second preset distance threshold, control the computer to lock the screen.

2. The method according to claim 1, wherein The computer includes a Bluetooth protocol interface, and the method further includes: After establishing the Bluetooth connection with the user mobile device, start the Bluetooth listening function to receive the Bluetooth signal strength of the user mobile device in real time; The obtaining the Bluetooth signal strength of the user mobile device in real time includes: Collect the Bluetooth signal strength of the user mobile device through the Bluetooth protocol interface according to a preset sampling period.

3. The method according to claim 1, wherein The computer includes a display interface, and the method further includes: When the target distance exceeds the second preset distance threshold, start a timer according to a preset duration, and display the lock screen countdown information on the display interface according to the timing duration of the timer; When an operation on the computer by the user is received before the timing duration of the timer reaches the preset duration, stop the timer, and return to the step of obtaining the Bluetooth signal strength of the user mobile device in real time; When an operation on the computer by the user is not received before the timing duration of the timer reaches the preset duration, control the computer to lock the screen.

4. The method according to claim 1, wherein The controlling the computer to lock the screen includes: Call the lock screen interface in the computer to call a preset lock screen program to perform a lock screen operation on the computer.

5. An automatic screen locking system, characterized in that, The system includes a computer and a user mobile device, where the distance between the user mobile device and the user is less than a first preset distance; The user mobile device is used to establish a Bluetooth connection with the computer; The computer is used to establish a Bluetooth connection with the user mobile device, obtain the Bluetooth signal strength of the user mobile device in real time; Calculate the target distance between the computer and the user mobile device based on the Bluetooth signal strength; when the target distance exceeds a second preset distance threshold, control the computer to lock the screen.

6. The system according to claim 5, wherein The computer includes a Bluetooth protocol interface, and the computer is used to start the Bluetooth listening function after establishing the Bluetooth connection with the user mobile device to receive the Bluetooth signal strength of the user mobile device in real time; The obtaining the Bluetooth signal strength of the user mobile device in real time includes: Collect the Bluetooth signal strength of the user mobile device through the Bluetooth protocol interface according to a preset sampling period.

7. The system according to claim 5, characterized in that The computer includes a display interface, and the computer is used to start a timer according to a preset duration when the target distance exceeds the second preset distance threshold, and display the lock screen countdown information on the display interface according to the timing duration of the timer; In the case that an operation of the user on the computer is received before the timing duration of the timer reaches the preset duration, stop the timing of the timer and return to the step of obtaining the Bluetooth signal strength of the user's mobile device in real time; In the case that an operation of the user on the computer is not received before the timing duration of the timer reaches the preset duration, control the computer to lock the screen.

8. The system according to claim 5, wherein The controlling the computer to lock the screen includes: Invoking a screen locking interface in the computer to perform a screen locking operation on the computer by invoking a preset screen locking program.

9. An electronic device, comprising: A processor; And A memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to execute the method according to any one of claims 1-4.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-4.