CN111506352A - Method and device for judging closing of notebook computer, computer and storage medium - Google Patents

Method and device for judging closing of notebook computer, computer and storage medium Download PDF

Info

Publication number
CN111506352A
CN111506352A CN202010303736.1A CN202010303736A CN111506352A CN 111506352 A CN111506352 A CN 111506352A CN 202010303736 A CN202010303736 A CN 202010303736A CN 111506352 A CN111506352 A CN 111506352A
Authority
CN
China
Prior art keywords
notebook computer
image
threshold value
ambient light
light intensity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010303736.1A
Other languages
Chinese (zh)
Other versions
CN111506352B (en
Inventor
陈庆甲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wentai Information Technology Co Ltd
Original Assignee
Shanghai Wentai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Wentai Information Technology Co Ltd filed Critical Shanghai Wentai Information Technology Co Ltd
Priority to CN202010303736.1A priority Critical patent/CN111506352B/en
Publication of CN111506352A publication Critical patent/CN111506352A/en
Application granted granted Critical
Publication of CN111506352B publication Critical patent/CN111506352B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/002Specific input/output arrangements not covered by G06F3/01 - G06F3/16
    • G06F3/005Input arrangements through a video camera
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/0304Detection arrangements using opto-electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/442Shutdown

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the invention discloses a method and a device for judging the cover closing of a notebook computer, the computer and a storage medium. The method for judging the closing of the notebook computer comprises the following steps: when a light sensor of a notebook computer detects that the ambient light intensity is smaller than a first threshold value, controlling a camera of the notebook computer to shoot a first image; judging whether the first image is consistent with a preset image or not; and if the first image is matched with the preset image, judging that the notebook computer is in a cover closing state. The embodiment of the invention realizes accurate judgment of the cover closing of the notebook computer, saves the space of the notebook computer and reduces the cost of the notebook computer.

Description

Method and device for judging closing of notebook computer, computer and storage medium
Technical Field
The embodiment of the invention relates to computer technology, in particular to a method and a device for judging whether a notebook computer is closed, a computer and a storage medium.
Background
With the increasing popularization of notebook computers, the convenience and the power saving of the notebook computers are paid special attention to by users, and particularly, the application scenes that the computers enter the states of screen locking, sleeping, power off and the like are very common when the notebook computers are used for closing the covers in midway.
The main realization method for enabling the computer to enter the states of screen locking, sleeping, shutdown and the like by closing the cover at present is to respectively install a magnet and a magnetic switch which are accurately matched on an upper cover and a base of the notebook computer, according to the Hall effect principle, when the magnetic switch detects that the magnetic flux is greater than a certain threshold value, the notebook computer is judged to be in the cover closing state, and then an operating system is informed to enter the states of screen locking, sleeping, shutdown and the like.
However, if there is an external magnet near the magnetic switch, it may cause misjudgment as closing the cover, resulting in accidental screen locking, sleep, and shutdown, and the magnetic flux threshold range of the magnetic switch is wide, resulting in large angle deviation of judging the closing of the upper cover, affecting the normal use and experience of the user, and in addition, the magnet and the magnetic switch which are installed on the upper cover and the base of the computer respectively and accurately matched not only occupy the space of the notebook computer, but also have high cost.
Disclosure of Invention
The embodiment of the invention provides a method and a device for judging the cover closing of a notebook computer, the computer and a storage medium, so as to realize accurate judgment of the cover closing of the notebook computer.
To achieve the above object, an embodiment of the present invention provides a method for determining whether a notebook computer is closed, where the method includes:
when a light sensor of a notebook computer detects that the ambient light intensity is smaller than a first threshold value, controlling a camera of the notebook computer to shoot a first image;
judging whether the first image is consistent with a preset image or not;
and if the first image is matched with the preset image, the notebook computer is in a cover closing state.
Further, when the light sensor of the notebook computer detects that the ambient light intensity is less than the first threshold, controlling the camera of the notebook computer to capture the first image includes:
when the light sensor of the notebook computer detects that the ambient light intensity is smaller than a first threshold value and/or when the infrared distance sensor of the notebook computer detects that the distance between the display screen and the keyboard surface of the notebook computer is smaller than a second threshold value, the camera of the notebook computer is controlled to shoot a first image.
Further, after determining that the notebook computer is in a closed state, the method includes:
acquiring the time when the ambient light intensity detected by the light sensor is less than the first threshold value;
judging whether the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is longer than a first preset time or not;
if the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is longer than the first preset time, controlling the notebook computer to enter a sleep state;
if the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is not longer than the first preset time, judging whether the ambient light intensity detected by the light sensor is smaller than the first threshold value within second preset time;
if the ambient light intensity detected by the light sensor is smaller than the first threshold value within the second preset time, controlling a camera of the notebook computer to shoot a second image, and judging whether the second image is matched with the preset image;
and if the second image is matched with the preset image, controlling the notebook computer to enter a shutdown process.
Further, the controlling the notebook computer to enter a shutdown process includes:
controlling the notebook computer to pop up a first window for a user to select whether to shut down the computer;
and receiving a first operation instruction of a user to control the notebook computer to be powered off, or receiving a second operation instruction of the user to control the notebook computer not to be powered off and close the first window.
Further, the first operation instruction comprises that no operation is performed within a third preset time, a left mouse button of the notebook computer is clicked, a first button of the notebook computer is clicked, and a first option in the first window is clicked through the mouse, and the second operation instruction comprises a right mouse button of the notebook computer is clicked, a second button of the notebook computer is clicked, and a second option in the first window is clicked through the mouse.
Further, the first image is a two-dimensional code or a bar code.
Furthermore, the shooting angle of the camera of the notebook computer is adjustable.
On one hand, the embodiment of the invention also provides a device for judging the closing of the notebook computer, which comprises:
the detection and judgment module is used for detecting the ambient light intensity around the notebook computer and judging whether the ambient light intensity is smaller than a first threshold value or not;
the shooting control module is used for controlling a camera of the notebook computer to shoot a first image when the ambient light intensity is smaller than the first threshold value;
the image judging module is used for judging whether the first image is consistent with a preset image or not;
and the state judgment module is used for judging that the notebook computer is in a cover closing state when the first image is matched with a preset image.
On the other hand, an embodiment of the present invention further provides a notebook computer, where the notebook computer includes: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the determination method according to any embodiment of the present invention.
In still another aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the determining method provided in any embodiment of the present invention.
According to the embodiment of the invention, when the light sensor of the notebook computer detects that the ambient light intensity is smaller than the first threshold value, the camera of the notebook computer is controlled to shoot a first image; judging whether the first image is consistent with a preset image or not; if the cover closing state of the notebook computer is judged, the problems that the cover closing is judged by using a magnet and a magnetic switch easily to be misjudged and the deviation of the cover closing angle is large are solved, the cover closing of the notebook computer is accurately judged, the space of the notebook computer is saved, and the cost of the notebook computer is reduced.
Drawings
Fig. 1 is a schematic flow chart illustrating a method for determining whether a notebook computer is closed according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating a method for determining whether a notebook computer is closed according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device for determining whether a notebook computer is closed according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a notebook computer according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but may have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
Furthermore, the terms "first," "second," and the like may be used herein to describe various orientations, actions, steps, elements, or the like, but the orientations, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. For example, a first module may be termed a second module, and, similarly, a second module may be termed a first module, without departing from the scope of the present application. The first module and the second module are both modules, but they are not the same module. The terms "first", "second", etc. are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the embodiments of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Example one
As shown in fig. 1, a first embodiment of the present invention provides a method for determining a cover closing of a notebook computer, where the method includes:
s110, when the light sensor of the notebook computer detects that the ambient light intensity is smaller than a first threshold value, the camera of the notebook computer is controlled to shoot a first image.
In this embodiment, the light sensor and the camera of the notebook computer may be adjacently disposed above the display screen of the notebook computer, the first image may be disposed on the keyboard surface of the notebook computer, when the notebook computer is closed, the positions of the first image and the camera are exactly overlapped and correspond, and the first image may be a two-dimensional code, a barcode, or any other image.
And S120, judging whether the first image is consistent with a preset image or not.
S130, if the first image is matched with the preset image, the notebook computer is in a cover closing state.
In this embodiment, after the camera of the notebook computer captures the first image, a similarity determination algorithm may be performed on the first image and the preset image through a processing unit of the notebook computer, where the similarity determination algorithm may be a SIFT (Scale-invariant feature transform) algorithm, an SSIM (structural similarity) algorithm, and the like. In addition, whether the first image is matched with the preset image or not can be judged by shooting the first image, and even if the ambient light intensity changes, the notebook computer cannot judge that the notebook computer is in a cover closing state because the first image matched with the preset image is not shot, and the accuracy of cover closing judgment is further improved.
According to the embodiment of the invention, when the light sensor of the notebook computer detects that the ambient light intensity is smaller than the first threshold value, the camera of the notebook computer is controlled to shoot a first image; judging whether the first image is consistent with a preset image or not; if the first image is matched with the preset image, the notebook computer is judged to be in the cover closing state, the problems that the cover closing is judged to be easy to judge by mistake by using a magnet and a magnetic switch and the cover closing angle deviation is large are solved, the cover closing of the notebook computer is accurately judged, the space of the notebook computer is saved, and the cost of the notebook computer is reduced.
Example two
As shown in fig. 2, a second embodiment of the present invention provides a method for determining whether a notebook computer is closed, and the second embodiment of the present invention is further optimized based on the first embodiment of the present invention, where the method for determining includes:
s210, when the light sensor of the notebook computer detects that the ambient light intensity is smaller than a first threshold value and/or when the infrared distance sensor of the notebook computer detects that the distance between the display screen and the keyboard face of the notebook computer is smaller than a second threshold value, controlling the camera of the notebook computer to shoot a first image.
S220, judging whether the first image is consistent with a preset image or not.
And S230, if the first image is matched with the preset image, the notebook computer is in a cover closing state.
In this embodiment, the light sensor may be replaced with an infrared distance sensor, and when the infrared distance sensor of the notebook computer detects that the distance between the display screen and the keyboard surface of the notebook computer is smaller than the second threshold, the camera of the notebook computer is controlled to shoot the first image. In addition, an infrared distance sensor can be added on the basis of the light sensor, when the light sensor of the notebook computer detects that the intensity of ambient light is smaller than a first threshold value and the infrared distance sensor detects that the distance between the display screen and the keyboard surface of the notebook computer is smaller than a second threshold value, the camera of the notebook computer is controlled to shoot a first image, so that the cover closing state of the notebook computer is detected in an auxiliary mode, and the shooting time point of the camera is accurately controlled.
And S240, acquiring the time when the ambient light intensity detected by the light sensor is less than a first threshold value.
And S250, judging whether the time that the ambient light intensity detected by the light sensor is less than the first threshold value is greater than a first preset time.
In this embodiment, after the notebook computer is determined to be in the cover closing state, it may be further determined whether the time that the ambient light intensity detected by the light sensor is smaller than the first threshold is longer than a first preset time, that is, it is determined whether the notebook computer is opened again within the first preset time, and optionally, the first preset time is 5 seconds. If the time that the ambient light intensity detected by the light sensor is less than the first threshold is greater than the first preset time, step S260 is executed, and if the time that the ambient light intensity detected by the light sensor is less than the first threshold is not greater than the first preset time, step S270 is executed.
And S260, controlling the notebook computer to enter a dormant state.
If the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is longer than the first preset time, namely within 5 seconds, the notebook computer is not turned on again, it indicates that the user does not use the notebook computer temporarily, and then the notebook computer can be controlled to enter a sleep state to ensure the endurance. The method ends by this execution until the user reuses the notebook computer.
S270, judging whether the light sensor detects that the ambient light intensity is smaller than the first threshold value within second preset time.
And S271, if the ambient light intensity detected by the light sensor in the second preset time is less than the first threshold value, controlling the camera of the notebook computer to shoot a second image, and judging whether the second image is consistent with the preset image.
And S272, if the second image is matched with the preset image, controlling the notebook computer to pop up a first window for a user to select whether to shut down the computer.
And S273, receiving a first operation instruction of the user to control the notebook computer to be powered off, or receiving a second operation instruction of the user to control the notebook computer not to be powered off and close the first window.
In this embodiment, if the time that the ambient light intensity detected by the light sensor is less than the first threshold is less than the first preset time, that is, within 5 seconds, the notebook computer is turned on again, which indicates that the user may want to continue using the notebook computer or want to perform other operations, for example, the shutdown operation in step S271-step S273, it is determined whether the light sensor detects that the ambient light intensity is less than the first threshold within the second preset time, that is, it is determined whether the user wants to perform a secondary closing operation to start executing the shutdown operation.
If the light sensor detects that the ambient light intensity is not less than the first threshold within the second preset time, it indicates that the user may want to continue using the notebook computer, and if the light sensor detects that the ambient light intensity is less than the first threshold within the second preset time, steps S210-S230 are repeatedly performed. If the second image shot for the second time is not matched with the preset image, the fact that the user is possible to operate by mistake is indicated, no action is executed, if the second image shot for the second time is still matched with the preset image, the notebook computer is controlled to pop up a first window for the user to select whether the notebook computer is powered off, the notebook computer is controlled to be powered off by receiving a first operation instruction of the user, or the notebook computer is controlled not to be powered off and the first window is closed by receiving a second operation instruction of the user.
The first window can display the text of 'whether to confirm shutdown', the first operation instruction includes that no operation is performed within a third preset time, a left mouse button of the notebook computer is clicked, a first button of the notebook computer is clicked, and a first option in the first window is clicked through the mouse, the third preset time can be 3 seconds, the first button can be a 'SPACE' button or an 'ENTER' button on the notebook computer, and the first option can be a 'YES' option in the first window. The second operation instruction comprises clicking a right mouse button of the notebook computer, clicking a second button of the notebook computer and clicking a second option in the first window through the mouse, wherein the second button can be an 'ESC' button on the notebook computer, and the second option can be a 'NO' option in the first window.
It should be further noted that the shooting angle of the camera may be adjustable, optionally, when the angle of the display screen and the keyboard cover of the notebook computer is smaller than 45 degrees, the camera may shoot a first image that matches with the preset image, and at this time, the user may also easily observe the content of the first window and perform corresponding operations on the notebook computer. Preferably, the first preset time, the second preset time and the first threshold value can be modified in the notebook computer according to the preference of the user.
For example, if the user wants to quickly shut down the computer, the user only needs to close the notebook computer to 45 degrees, then reopen the notebook computer within a first preset time, and finally completely close the notebook computer within a second preset time, so that the notebook computer can be automatically shut down within a third preset time.
According to the embodiment of the invention, the time that the ambient light intensity detected by the light sensor is less than the first threshold value is obtained; judging whether the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is longer than a first preset time or not; if the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is longer than the first preset time, controlling the notebook computer to enter a sleep state; if the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is not longer than the first preset time, judging whether the ambient light intensity detected by the light sensor is smaller than the first threshold value within second preset time; if the ambient light intensity detected by the light sensor is smaller than the first threshold value within the second preset time, controlling a camera of the notebook computer to shoot a second image, and judging whether the second image is matched with the preset image; if the second image is matched with the preset image, the notebook computer is controlled to enter a shutdown process, the problem that the notebook computer is not intelligent enough after being closed is solved, and the effect of intelligently controlling the closed notebook computer is achieved.
EXAMPLE III
As shown in fig. 3, a third embodiment of the present invention provides a device 100 for determining whether a notebook computer is closed, and the device 100 for determining whether a notebook computer is closed provided by the third embodiment of the present invention can execute the method for determining whether a notebook computer is closed provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. The determination device 100 includes a detection determination module 200, a photographing control module 300, an image determination module 400, and a state determination module 500.
Specifically, the detection and judgment module 200 is configured to detect an ambient light intensity around the notebook computer, and judge whether the ambient light intensity is smaller than a first threshold; the shooting control module 300 is used for controlling a camera of the notebook computer to shoot a first image when the ambient light intensity is smaller than a first threshold value; the image determining module 400 is configured to determine whether the first image matches a preset image; the state determining module 500 is used for determining that the notebook computer is in the cover closing state when the first image is matched with the preset image.
In this embodiment, the detecting and determining module 200 is further configured to detect an ambient light intensity around the notebook computer, determine whether the ambient light intensity is smaller than a first threshold and/or a distance between a display screen and a keyboard surface of the notebook computer, and determine whether the ambient light intensity is smaller than the first threshold and/or determine whether the distance between the display screen and the keyboard surface of the notebook computer is smaller than a second threshold. The shooting control module 300 is configured to control a camera of the notebook computer to shoot a first image when the ambient light intensity is smaller than a first threshold and/or when the infrared distance sensor of the notebook computer detects that the distance between the display screen and the keyboard surface of the notebook computer is smaller than a second threshold. Preferably, the first image is a two-dimensional code or a barcode. The shooting angle of the camera of the notebook computer is adjustable.
Further, the determining apparatus 100 further includes a secondary determining module 600, where the secondary determining module 600 is configured to obtain a time when the ambient light intensity detected by the light sensor is less than the first threshold; judging whether the time that the ambient light intensity detected by the light sensor is less than a first threshold value is longer than a first preset time or not; if the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is longer than a first preset time, controlling the notebook computer to enter a dormant state; if the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is not longer than the first preset time, judging whether the ambient light intensity detected by the light sensor is smaller than the first threshold value within the second preset time; if the ambient light intensity detected by the light sensor is smaller than the first threshold value within a second preset time, controlling a camera of the notebook computer to shoot a second image, and judging whether the second image is consistent with a preset image or not; and if the second image is matched with the preset image, controlling the notebook computer to enter a shutdown process.
The secondary determining module 600 is further configured to control the notebook computer to pop up a first window for the user to select whether to shut down the computer; and receiving a first operation instruction of a user to control the notebook computer to be powered off, or receiving a second operation instruction of the user to control the notebook computer not to be powered off and close the first window. The first operation instruction comprises the steps of not performing any operation within a third preset time, clicking a left mouse button of the notebook computer, clicking a first button of the notebook computer and clicking a first option in the first window through the mouse, and the second operation instruction comprises the steps of clicking a right mouse button of the notebook computer, clicking a second button of the notebook computer and clicking a second option in the first window through the mouse.
The embodiment of the invention is used for detecting the ambient light intensity around the notebook computer through the detection and judgment module 200 and judging whether the ambient light intensity is smaller than a first threshold value; the shooting control module 300 is used for controlling a camera of the notebook computer to shoot a first image when the ambient light intensity is smaller than a first threshold value; the image determining module 400 is configured to determine whether the first image matches a preset image; the state judging module 500 is used for judging that the notebook computer is in the cover closing state when the first image is matched with the preset image, so that the problems that the cover closing is judged by using a magnet and a magnetic switch easily to be judged by mistake and the cover closing angle deviation is large are solved, the cover closing of the notebook computer is accurately judged, the space of the notebook computer is saved, and the cost of the notebook computer is reduced.
Example four
Fig. 4 is a schematic structural diagram of a notebook computer according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary notebook computer 12 suitable for use in implementing embodiments of the present invention. The laptop computer 12 shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of the application of the embodiment of the present invention.
As shown in fig. 4, the notebook computer 12 is in the form of a general purpose computing device. Components of notebook computer 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Notebook computer 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by notebook computer 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Notebook computer 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Notebook computer 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and may also communicate with one or more devices that enable a user to interact with notebook computer 12, and/or with any devices (e.g., network card, modem, etc.) that enable notebook computer 12 to communicate with one or more other computing devices, such communication may occur via input/output (I/O) interfaces 22. moreover, notebook computer 12 may also communicate with one or more networks (e.g., local area network (L AN), Wide Area Network (WAN) and/or a public network, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of notebook computer 12 via bus 18. it should be appreciated that, although not shown, other hardware and/or software modules may be used in conjunction with notebook computer 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, to implement the determination method provided by the embodiment of the present invention:
when the light sensor of the notebook computer detects that the ambient light intensity is smaller than a first threshold value, controlling a camera of the notebook computer to shoot a first image;
judging whether the first image is consistent with a preset image or not;
if the first image is matched with the preset image, the notebook computer is in a cover closing state.
According to the embodiment of the invention, when the light sensor of the notebook computer detects that the ambient light intensity is smaller than the first threshold value, the camera of the notebook computer is controlled to shoot a first image; judging whether the first image is consistent with a preset image or not; if the first image is matched with the preset image, the notebook computer is judged to be in the cover closing state, the problems that the cover closing is judged to be easy to judge by mistake by using a magnet and a magnetic switch and the cover closing angle deviation is large are solved, the cover closing of the notebook computer is accurately judged, the space of the notebook computer is saved, and the cost of the notebook computer is reduced.
EXAMPLE five
The fifth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the determining method provided in all the embodiments of the present invention:
when the light sensor of the notebook computer detects that the ambient light intensity is smaller than a first threshold value, controlling a camera of the notebook computer to shoot a first image;
judging whether the first image is consistent with a preset image or not;
if the first image is matched with the preset image, the notebook computer is in a cover closing state.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having 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. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including AN object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
According to the embodiment of the invention, when the light sensor of the notebook computer detects that the ambient light intensity is smaller than the first threshold value, the camera of the notebook computer is controlled to shoot a first image; judging whether the first image is consistent with a preset image or not; if the first image is matched with the preset image, the notebook computer is judged to be in the cover closing state, the problems that the cover closing is judged to be easy to judge by mistake by using a magnet and a magnetic switch and the cover closing angle deviation is large are solved, the cover closing of the notebook computer is accurately judged, the space of the notebook computer is saved, and the cost of the notebook computer is reduced.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments illustrated herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for judging whether a notebook computer is closed is characterized by comprising the following steps:
when a light sensor of a notebook computer detects that the ambient light intensity is smaller than a first threshold value, controlling a camera of the notebook computer to shoot a first image;
judging whether the first image is consistent with a preset image or not;
and if the first image is matched with the preset image, the notebook computer is in a cover closing state.
2. The method as claimed in claim 1, wherein the controlling the camera of the notebook computer to capture the first image when the light sensor of the notebook computer detects that the intensity of the ambient light is less than the first threshold value comprises:
when the light sensor of the notebook computer detects that the ambient light intensity is smaller than a first threshold value and/or when the infrared distance sensor of the notebook computer detects that the distance between the display screen and the keyboard surface of the notebook computer is smaller than a second threshold value, the camera of the notebook computer is controlled to shoot a first image.
3. The method as claimed in claim 1, wherein the step of determining that the notebook computer is in a closed state comprises:
acquiring the time when the ambient light intensity detected by the light sensor is less than the first threshold value;
judging whether the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is longer than a first preset time or not;
if the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is longer than the first preset time, controlling the notebook computer to enter a sleep state;
if the time that the ambient light intensity detected by the light sensor is smaller than the first threshold value is not longer than the first preset time, judging whether the ambient light intensity detected by the light sensor is smaller than the first threshold value within second preset time;
if the ambient light intensity detected by the light sensor is smaller than the first threshold value within the second preset time, controlling a camera of the notebook computer to shoot a second image, and judging whether the second image is matched with the preset image;
and if the second image is matched with the preset image, controlling the notebook computer to enter a shutdown process.
4. The method as claimed in claim 3, wherein the controlling the notebook computer to enter the shutdown process comprises:
controlling the notebook computer to pop up a first window for a user to select whether to shut down the computer;
and receiving a first operation instruction of a user to control the notebook computer to be powered off, or receiving a second operation instruction of the user to control the notebook computer not to be powered off and close the first window.
5. The method according to claim 4, wherein the first operation instruction comprises not performing any operation within a third preset time, clicking a left mouse button of the notebook computer, clicking a first button of the notebook computer, and clicking a first option in the first window by a mouse, and the second operation instruction comprises clicking a right mouse button of the notebook computer, clicking a second button of the notebook computer, and clicking a second option in the first window by a mouse.
6. The method according to claim 1, wherein the first image is a two-dimensional code or a barcode.
7. The method according to claim 1, wherein a photographing angle of a camera of the notebook computer is adjustable.
8. A judging device for closing a cover of a notebook computer is characterized by comprising:
the detection and judgment module is used for detecting the ambient light intensity around the notebook computer and judging whether the ambient light intensity is smaller than a first threshold value or not;
the shooting control module is used for controlling a camera of the notebook computer to shoot a first image when the ambient light intensity is smaller than the first threshold value;
the image judging module is used for judging whether the first image is consistent with a preset image or not;
and the state judgment module is used for judging that the notebook computer is in a cover closing state when the first image is matched with a preset image.
9. A notebook computer, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the determination method according to any one of claims 1 to 7.
CN202010303736.1A 2020-04-17 2020-04-17 Method and device for judging closing of notebook computer, computer and storage medium Active CN111506352B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010303736.1A CN111506352B (en) 2020-04-17 2020-04-17 Method and device for judging closing of notebook computer, computer and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010303736.1A CN111506352B (en) 2020-04-17 2020-04-17 Method and device for judging closing of notebook computer, computer and storage medium

Publications (2)

Publication Number Publication Date
CN111506352A true CN111506352A (en) 2020-08-07
CN111506352B CN111506352B (en) 2024-01-26

Family

ID=71876183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010303736.1A Active CN111506352B (en) 2020-04-17 2020-04-17 Method and device for judging closing of notebook computer, computer and storage medium

Country Status (1)

Country Link
CN (1) CN111506352B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120280626A1 (en) * 2011-05-04 2012-11-08 National Cheng Kung University Method and system for adjusting brightness
CN105844182A (en) * 2016-03-16 2016-08-10 合肥联宝信息技术有限公司 Screen locking method and device of notebook computer and the notebook computer
CN206584252U (en) * 2016-08-23 2017-10-24 合肥联宝信息技术有限公司 Notebook computer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120280626A1 (en) * 2011-05-04 2012-11-08 National Cheng Kung University Method and system for adjusting brightness
CN105844182A (en) * 2016-03-16 2016-08-10 合肥联宝信息技术有限公司 Screen locking method and device of notebook computer and the notebook computer
CN206584252U (en) * 2016-08-23 2017-10-24 合肥联宝信息技术有限公司 Notebook computer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"笔记本电脑外设总动员", 电脑数码采购周刊 *

Also Published As

Publication number Publication date
CN111506352B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
US10983596B2 (en) Gesture recognition method, device, electronic device, and storage medium
CN109240576B (en) Image processing method and device in game, electronic device and storage medium
US9921744B2 (en) Text input method in touch screen terminal and apparatus therefor
US20170185461A1 (en) Fast switching method, device and terminal of dual system
US9348508B2 (en) Automatic detection of user preferences for alternate user interface model
US11094267B2 (en) Proximity detection method, storage medium, and electronic device
US20110219340A1 (en) System and method for point, select and transfer hand gesture based user interface
US9239724B2 (en) Computer device and boot method thereof
US20130154947A1 (en) Determining a preferred screen orientation based on known hand positions
US10503489B1 (en) Updating firmware via a remote utility
CN110062287B (en) Target object control method and device, storage medium and electronic equipment
CN105144034A (en) Portable device using passive sensor for initiating touchless gesture control
CN110471610A (en) Terminal control method, device, terminal and storage medium
CN111124920A (en) Equipment performance testing method and device and electronic equipment
US10740874B2 (en) Apparatus, method and computer program product for oriented input operations
CN110248023B (en) Intelligent terminal control method, device, equipment and medium
CN111368275B (en) Robot control method, device, equipment and storage medium
CN111045776B (en) Display switching method and device, folding terminal and storage medium
CN110636222B (en) Photographing control method and device, terminal equipment and storage medium
CN111506352B (en) Method and device for judging closing of notebook computer, computer and storage medium
CN109510896B (en) Proximity sensor selection method and device, storage medium and electronic device
CN112036516A (en) Image processing method and device, electronic equipment and storage medium
CN110706474B (en) Detection system, method, device, equipment and storage medium for infrared emission function
CN111083552A (en) Thumbnail generation method, device, equipment and medium
US20210224011A1 (en) Selecting a display with machine learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant