Instruction processing method and electronic equipment

By utilizing the camera sensitivity mode and illumination parameter changes of the terminal device, identifying user occlusion and canceling occlusion operations, triggering specific functions, solving the problem that existing virtual button modes are difficult to meet the multifunction needs, and improving hardware utilization and user experience.

CN119576189APending Publication Date: 2025-03-07HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510124930.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-27
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

While meeting user needs, the existing virtual button mode is difficult to meet the increasing functional needs of users, and the hardware utilization rate is low.

Method used

By multiplexing the camera of the terminal device, turning on the photosensitive mode of the camera, and using changes in illuminance parameters to identify the user's occlusion and cancel the occlusion operation, thereby triggering a specific function.

Benefits of technology

On the basis of improving hardware utilization, a new method of inputting virtual key commands has been added, which expands the playability and functionality of user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576189A_ABST
    Figure CN119576189A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an instruction processing method and electronic equipment, and relates to the technical field of terminals. The method comprises the following steps: responding to a user operation acting on a first camera, and triggering terminal equipment to execute a first instruction; wherein the user operation comprises a first operation for shielding the first camera and a second operation for canceling shielding of the first camera. Therefore, by multiplexing the camera equipped on the terminal equipment, the shielding operation and the shielding canceling operation can be performed on the camera, and the virtual key instruction is input after processing and identification so as to trigger the terminal equipment to execute a specific function, so that a virtual key instruction input mode is newly added on the basis of improving the hardware utilization rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to an instruction processing method and an electronic device. Background Art

[0002] With the rapid development of terminal devices, users' demands for the convenience of terminal devices are increasing. In order to meet the needs of users, virtual buttons are introduced into terminal devices.

[0003] In the existing virtual buttons, for example, users can quickly take a screenshot by sliding down with three fingers. The introduction of virtual buttons can not only realize specific functions according to user needs, but also improve the user experience. Summary of the invention

[0004] The embodiment of the present application provides a command processing method and electronic device, which are applied to the field of terminal technology. The technical solution of the present application can perform blocking and unblocking operations on the camera by reusing the camera equipped by the terminal device, and realize the input of virtual key commands after processing and identification to trigger the terminal device to perform specific functions, thereby adding a new input method of virtual key commands on the basis of improving hardware utilization.

[0005] In a first aspect, an embodiment of the present application provides an instruction processing method. The method includes:

[0006] In response to a user operation on the first camera, triggering the terminal device to execute a first instruction;

[0007] The user operation includes a first operation of blocking the first camera and a second operation of canceling blocking the first camera.

[0008] In this implementation, by detecting the illumination parameters corresponding to the first operation and the second operation, it can be determined whether the first data feature is met according to the illumination parameters. By meeting the first data feature, it is determined that the user operation on the first camera is detected. By responding to the user operation acting on the first camera, the terminal device is triggered to execute the first instruction to meet the user's needs.

[0009] In a possible implementation, the method further includes:

[0010] Based on the first sensor, continuously collect illumination parameters of the first camera to obtain illumination parameters of the first camera corresponding to multiple collection moments;

[0011] A user operation acting on the first camera is detected according to illumination parameters of the first camera corresponding to a plurality of acquisition moments.

[0012] In this implementation, power consumption can be reduced by using the first camera to turn on the light-sensing mode to obtain illumination parameters.

[0013] In a possible implementation, detecting a user operation on the first camera according to illumination parameters of the first camera corresponding to a plurality of acquisition moments includes:

[0014] Writing illumination parameters of the first camera corresponding to multiple acquisition moments into the first queue in sequence;

[0015] When the multiple illumination parameters included in the first queue satisfy the first data feature, it is determined that a user operation acting on the first camera is detected; wherein the first data feature conforms to the change feature of the illumination parameter caused by the user operation.

[0016] In this implementation, by introducing the first queue, the illuminance parameters can be analyzed and updated in real time, thereby improving the efficiency of data processing.

[0017] In a possible implementation, the user operation is a single click operation, and the first data feature includes: there are n first illumination parameters, the first illumination parameter is located at a trough position, and the first illumination parameter is less than a first preset threshold.

[0018] In this implementation, by constraining the first illumination parameter to be located at a trough position and the first illumination parameter to be less than a first preset threshold, it can be ensured that the first illumination parameter is indeed the illumination parameter value that becomes smaller due to the user's blocking operation on the first camera, and is not the illumination parameter value that becomes smaller due to the user passing over the first camera without performing a blocking operation, thereby reducing the probability of erroneous activation of the first function.

[0019] In a possible implementation, the user operation is a multiple-click operation, and the first data feature includes:

[0020] There are n first illumination parameters and m second illumination parameters, n and m are integers greater than or equal to 1, and n is greater than m;

[0021] The first illumination parameter is located at a trough position and is less than a first preset threshold, and the second illumination parameter is located at a peak position; and there is a second illumination parameter between any two first illumination parameters.

[0022] In this implementation, by determining that the illumination parameters corresponding to the multiple click operations satisfy the first data feature, it can be determined to be a user operation, which expands the triggering method of the virtual key command proposed in the present application.

[0023] In a possible implementation, the second illumination parameter further satisfies a first condition, where the first condition is that the second illumination parameter is greater than a second preset threshold, or a difference between the second illumination parameter and an adjacent previous first illumination parameter is greater than a third preset threshold;

[0024] The first preset threshold is smaller than the second preset threshold.

[0025] In this implementation, by constraining the second illumination parameter to be located at the peak position and the second illumination parameter to be less than the second preset threshold, or the difference between the second illumination parameter and the adjacent previous first illumination parameter to be greater than the third preset threshold, it can be ensured that the second illumination parameter is indeed the illumination parameter value increased due to the user's unblocking operation on the first camera, thereby reducing the probability of erroneous activation of the first function.

[0026] In a possible implementation, when the multiple illumination parameters included in the first queue meet the first data feature, before determining that a user operation acting on the first camera is detected, the method further includes:

[0027] A first curve is drawn according to the multiple illumination parameters included in the first queue, and based on the first curve, it is determined whether the multiple illumination parameters included in the first queue meet the first data feature.

[0028] In this implementation, by drawing a first curve of the multiple illumination parameters included in the first queue and judging whether the multiple illumination parameters included in the first queue meet the first data feature based on the first curve, the method for determining the first data feature can be expanded.

[0029] In a possible implementation, writing illumination parameters of the first camera corresponding to multiple acquisition moments into the first queue in sequence includes:

[0030] For any one of the multiple collection moments, after obtaining the illumination parameter corresponding to the collection moment, dequeue the illumination parameter at the head of the first queue;

[0031] The illumination parameters corresponding to the collection time are queued.

[0032] In this implementation, by constraining the first queue to meet the first-in-first-out principle, exhaustion of available memory resources can be avoided.

[0033] In a possible implementation, the first queue includes a plurality of storage units, and the acquisition times of the illumination parameters stored in two adjacent storage units are also adjacent;

[0034] The time interval between the acquisition time of the illumination parameter stored in the first storage unit among the multiple storage units and the acquisition time of the illumination parameter stored in the last storage unit among the multiple storage units is less than the preset time interval.

[0035] In this implementation, by constraining the acquisition times of the illumination parameters stored in two adjacent storage units to be adjacent, it can be ensured that the illumination parameters stored in the first queue are stored according to the acquisition times, thereby avoiding analysis errors caused by storage errors.

[0036] In a possible implementation, the method further includes:

[0037] When the illumination parameters of the multiple acquisition moments included in the first queue meet the second data feature and the first function is marked as the first state, the first function is marked as the second state, wherein the first state is used to indicate that the first function is available, the second state is used to indicate that the first function is unavailable, and the first function is a function of performing a user operation on the first camera to trigger a first instruction;

[0038] When the illumination parameters at the multiple acquisition moments included in the first queue do not satisfy the second data feature and the first function is marked as the second state, marking the first function as the first state;

[0039] The second data feature is that multiple illumination parameters stored in the first queue are all smaller than a fourth preset threshold.

[0040] In this implementation, by determining whether the illumination parameters of multiple acquisition moments contained in the first queue meet the second data feature, it is possible to ensure that when the first function of the terminal device is in a state where it can work normally, user operation detection is performed to avoid unnecessary energy consumption.

[0041] In a possible implementation, when illumination parameters at multiple acquisition moments included in the first queue meet the first data feature, determining that a user operation acting on the first camera is detected includes:

[0042] When the first function is marked as the first state and the illumination parameters of the multiple acquisition moments contained in the first queue meet the first data feature, it is determined that a user operation acting on the first camera is detected.

[0043] In this implementation, by issuing an instruction that the first function is in the first state, the processor of the terminal device can be put into a working state to respond to the first function corresponding to the user operation in real time, thereby improving the response efficiency.

[0044] In a possible implementation, after marking the first function as the second state, the method further includes:

[0045] Displaying a first identifier on a screen of the terminal device, the first identifier being used to indicate that the first function is in the second state;

[0046] After marking the first function as the first state, the method further includes:

[0047] A second identifier is displayed on the screen of the terminal device, and the second identifier is used to indicate that the first function is in the first state.

[0048] In this implementation, by displaying a first mark on the screen of the terminal device, it can be indicated that user operations are not allowed in the current environment. If the user needs to perform user operations, the user will hold the terminal device and move it to a well-lit scene, thereby improving the intelligence of the terminal device; by displaying a second mark on the screen of the terminal device, it can be indicated that user operations are allowed in the current environment, thereby improving user-friendliness.

[0049] In a possible implementation, based on the first sensor, continuously collecting illumination parameters of the first camera to obtain illumination parameters of the first camera corresponding to multiple collection moments includes:

[0050] Based on the first sensor, continuously collect the light-sensing data of the first camera;

[0051] The photosensitive data is converted into corresponding illumination parameters to obtain illumination parameters of the first camera corresponding to multiple acquisition moments.

[0052] In this implementation, by continuously collecting the photosensitive data of the first camera based on the first sensor and then converting the photosensitive data into illumination parameters, it is possible to analyze whether the first data feature or the second data feature is met based on the illumination parameters, thereby improving the operability of the solution of the present application.

[0053] In a possible implementation manner, the photosensitive module in the first sensor is in a normally open state.

[0054] In this implementation, by setting the photosensitive module in the first sensor to a normally-on state, the illumination parameters can be obtained under the premise of low power consumption.

[0055] In a second aspect, an embodiment of the present application provides an instruction processing device, which may be an electronic device, or a chip or chip system in an electronic device. The instruction processing device may include a display unit and a processing unit. When the instruction processing device is an electronic device, the display unit may be a display screen. The display unit is used to perform the display step so that the electronic device implements an instruction processing method described in the first aspect or any possible implementation of the first aspect. When the instruction processing device is an electronic device, the processing unit may be a processor. The instruction processing device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit so that the electronic device implements an instruction processing method described in the first aspect or any possible implementation of the first aspect. When the instruction processing device is a chip or chip system in an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit so that the electronic device implements an instruction processing method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (eg, a register, a cache, etc.), or a storage unit within the electronic device that is located outside the chip (eg, a read-only memory, a random access memory, etc.).

[0056] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, the memory being used to store code instructions, and the processor being used to run the code instructions to execute the method described in the first aspect or any possible implementation of the first aspect.

[0057] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instructions are stored. When the computer program or instructions are run on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.

[0058] In a fifth aspect, an embodiment of the present application provides a computer program product including a computer program. When the computer program runs on a computer, the computer executes the method described in the first aspect or any possible implementation manner of the first aspect.

[0059] In a sixth aspect, the present application provides a chip or a chip system, the chip or chip system comprising at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used to run a computer program or instruction to execute the method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, a pin or a circuit, etc.

[0060] In a possible implementation, the chip or chip system described above in the present application further includes at least one memory, in which instructions are stored. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (such as a read-only memory, a random access memory, etc.).

[0061] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 A schematic diagram of a physical button of a terminal device provided in an embodiment of the present application;

[0063] Figure 2 Schematic diagram of a virtual key of a terminal device provided in an embodiment of the present application Figure 1 ;

[0064] Figure 3 Schematic diagram of a virtual key of a terminal device provided in an embodiment of the present application Figure 2 ;

[0065] Figure 4 Schematic diagram of a virtual key of a terminal device provided in an embodiment of the present application Figure 3 ;

[0066] Figure 5 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application;

[0067] Figure 6 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application;

[0068] Figure 7 A schematic diagram of enabling the first function provided in an embodiment of the present application;

[0069] Figure 8 A schematic diagram of a process for detecting user operations provided in an embodiment of the present application;

[0070] Fig. 9 A schematic diagram of a photosensing point of a camera provided in an embodiment of the present application;

[0071] Fig.10 A schematic diagram of a first queue provided in an embodiment of the present application;

[0072] Fig.11 Schematic diagram of the analysis illumination parameters provided in the embodiment of the present application Figure 1 ;

[0073] Fig.12Schematic diagram of the analysis illumination parameters provided in the embodiment of the present application Figure 2 ;

[0074] Fig.13 Schematic diagram of the analysis illumination parameters provided in the embodiment of the present application Figure 3 ;

[0075] Fig.14 Schematic diagram of the analysis illumination parameters provided in the embodiment of the present application Figure 4 ;

[0076] Fig.15 Schematic diagram of the analysis illumination parameters provided in the embodiment of the present application Figure 5 ;

[0077] Fig.16 A schematic diagram of a process for detecting a first functional state provided in an embodiment of the present application;

[0078] Fig.17 A schematic diagram of analyzing a second data feature provided in an embodiment of the present application;

[0079] Fig.18 A schematic diagram showing a first mark provided in an embodiment of the present application;

[0080] Fig.19 A schematic diagram showing a second identifier provided in an embodiment of the present application;

[0081] Fig. 20 A flowchart of an instruction processing method provided in an embodiment of the present application;

[0082] Fig.21 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0083] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:

[0084] 1. Photosensitive pixels.

[0085] Photosensitive pixels refer to the basic units on image sensors that are used to capture light and convert it into electrical signals. Each photosensitive pixel corresponds to a photosensitive area on the image sensor. When light shines on this area, it generates an electric charge, and the amount of charge is proportional to the intensity of the light.

[0086] 2. Perceive pixels.

[0087] Perceived pixels are usually related to display technology and image processing. Users capture color information and focus on how to optimize images to match the visual perception of the human eye. Specifically, perceived pixels involve optimizing image display effects through algorithms so that the image quality perceived by the human eye is improved under limited physical pixels.

[0088] 3. Lux equivalent value.

[0089] Illuminance is a physical quantity used to indicate the degree to which the surface of an object is illuminated, or it can be understood as the luminous flux received per unit area, and the unit is lux.

[0090] Lux equivalent value refers to a value equivalent to Lux under specific conditions through certain conversions or comparative references. It is used to describe the illumination level corresponding to a certain light environment, light source luminous ability, or device's light perception effect.

[0091] 4. Other terms.

[0092] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0093] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0094] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.

[0095] 5. Electronic equipment.

[0096] The electronic device of the embodiment of the present application may include a handheld device, a vehicle-mounted device, etc. with a data processing function. For example, some electronic devices are: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (PLANs), and wireless terminals in smart cities. The embodiments of the present application do not limit this.

[0097] As an example but not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.

[0098] In addition, in the embodiments of the present application, the electronic device may also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things.

[0099] The electronic device in the embodiments of the present application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.

[0100] In an embodiment of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0101] In order to better understand the technical solution of the present application, the relevant technologies involved in the present application are further introduced in detail below.

[0102] With the rapid development of terminal devices, users' demand for the convenience of terminal devices is increasing. In order to meet the needs of users, terminal devices not only provide physical buttons, but also introduce virtual buttons. These buttons can realize some functions in specific scenarios, improving the convenience and playability of specific scenarios.

[0103] Combine the following Figure 1 To understand the physical buttons of the terminal device, Figure 1 A schematic diagram of the physical buttons of a terminal device provided in an embodiment of the present application.

[0104] like Figure 1 As shown, it is assumed that there is a terminal device 101, which can be, for example, Figure 1Meanwhile, the terminal device 101 may include a volume physical button 102 and a power physical button 103 .

[0105] In response to the user pressing the power physical button 103, the terminal device 101 may display the following Figure 1 The interface 104 shown in (b) in the figure may be understood as the lock screen interface of the terminal device 101 .

[0106] It should be noted that the above introduction is made on that the physical power button can light up the screen of the terminal device. In practice, other functions can also be implemented for the physical power button, or some functions can be implemented for other physical buttons. The embodiments of the present application do not limit this.

[0107] In addition to the physical buttons of the terminal devices introduced above, in order to meet more user needs, the terminal devices introduce virtual buttons. Figure 2 To understand the virtual keys of the terminal device, Figure 2 Schematic diagram of a virtual key of a terminal device provided in an embodiment of the present application Figure 1 .

[0108] like Figure 2 As shown, it is assumed that there is a terminal device 201, which can be, for example, Figure 2 When the terminal device 201 is in the locked screen state, the following may be displayed: Figure 2 The lock screen interface 202 shown in (a) may include: time, date, weather and slide to unlock controls.

[0109] In response to the user's triggering operation on the slide-to-unlock control, the current terminal device 201 displays the following Figure 2 The interface 203 shown in (b) can be understood as the desktop interface of the terminal device 201, and the interface may include desktop controls such as time, date, and weather, as well as application controls such as themes, phone, and camera.

[0110] In addition to the above virtual buttons for unlocking, other virtual buttons are also provided in the virtual buttons introduced by the terminal device. For example, the user can quickly take a screenshot by operating the virtual button icon or sliding down with three fingers.

[0111] Combine the following Figure 3 This chapter introduces the process of taking screenshots by operating virtual button icons. Figure 3 Schematic diagram of a virtual key of a terminal device provided in an embodiment of the present application Figure 2 .

[0112] like Figure 3As shown, it is assumed that there is a terminal device 301, such as Figure 3 The interface shown in (a) can be understood as the desktop interface of the terminal device 301, which may include desktop controls such as time, date, and weather, as well as application controls such as themes, phone, and camera.

[0113] In response to the user's pull-down operation on the top right side 302 of the desktop interface, the current terminal device 301 displays the following Figure 3 The interface 303 shown in (b) can be understood as the control center interface of the terminal device 301, and the control center interface may include: WLAN, mobile data, Bluetooth, mute, flashlight, automatic rotation, eye protection mode, screenshot and other controls.

[0114] In response to the user's triggering operation on the screenshot control, the current terminal device 301 displays the following Figure 3 The interface 304 shown in (c) includes: an image 305 captured from the desktop interface, a sharing control 306 and a scrolling screenshot control 307 .

[0115] According to the above operations, the screenshot function can be realized. Figure 4 Introduce the implementation process of taking screenshots by sliding down with three fingers. Figure 4 Schematic diagram of a virtual key of a terminal device provided in an embodiment of the present application Figure 3 .

[0116] like Figure 4 As shown, it is assumed that there is a terminal device 401, such as Figure 4 The interface 402 shown in (a) can be understood as the desktop interface of the terminal device 401, and the interface can include controls for applications such as themes, phone, and camera.

[0117] In response to the user's three-finger sliding operation on the desktop interface 402, the current terminal device 401 displays the following Figure 4 The interface shown in (b) in FIG. 1 includes: an image 403 captured from the desktop interface, a sharing control 404 and a scrolling screenshot control 405 .

[0118] It should be noted that the above description is about operating the virtual button icon and sliding down with three fingers to realize the screenshot function, but in practice, there are other ways to realize screenshot, for example, tapping the screen with knuckles to realize screenshot. This application illustrates the way to realize the screenshot function, but does not limit the virtual button to realize the screenshot function.

[0119] Based on the above content, it can be understood that the terminal device introduces virtual buttons, which can, on the one hand, realize specific functions according to user needs, and on the other hand, enhance the user experience and playability of the operation by allowing the user to operate the virtual buttons.

[0120] In existing terminal devices, a variety of virtual key methods have been proposed to implement specific functions, such as sliding down with three fingers to complete the screenshot function. However, users have more and more requirements for terminal devices, and the existing virtual key methods are still limited and difficult to meet the increasing functional requirements of users.

[0121] In response to the above-mentioned problems, this application proposes a technical concept: since the virtual key mode of the terminal device is still limited, this application expands a new way of inputting virtual key commands. This application can be implemented in a terminal device equipped with a camera, turning on the light-sensing mode of the camera to continuously extract light-sensing values, and confirming the user's input of a virtual key command to trigger the terminal device to execute a specific function based on the light-sensing value extracted by the blocked camera and the light-sensing value extracted by the unblocked camera, thereby adding a new way of inputting virtual key commands on the basis of improving hardware utilization.

[0122] The instruction processing method of the embodiment of the present application can be executed by an electronic device with a camera, or by a chip, a chip system or a processor that supports the electronic device to implement the instruction processing method, or by a logic module or software that can implement all or part of the functions of the electronic device, and the present application does not impose specific restrictions on this. The instruction processing method of the embodiment of the present application is described in detail below, taking the electronic device as the execution subject as an example.

[0123] The electronic device may be, for example, a terminal device. Figure 5 and Figure 6 Provide a brief introduction to the terminal equipment.

[0124] For example, Figure 5 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application.

[0125] Figure 5A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. The terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a gyro sensor 180B, a distance sensor 180F, a proximity light sensor 180G, an image sensor 180H, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0126] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0127] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. In an embodiment of the present application, the processor 110 can be used to process the received photosensitive data and perform a series of processing. Exemplarily, the acquired photosensitive data is format converted.

[0128] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or is cyclically using. If the processor 110 needs to use the instruction or data again, it may be called from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved. In an embodiment of the present application, the virtual key instructions proposed in the present application may be stored in the memory.

[0129] The software system of the terminal device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture, etc. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the terminal device.

[0130] For example, Figure 6 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application.

[0131] like Figure 6 As shown, the layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system may include an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, a hardware abstraction layer (HAL) and a kernel layer. It should be noted that the embodiment of the present application is illustrated by taking the Android system as an example. In other operating systems (such as Hongmeng system, IOS system, etc.), as long as the functions implemented by each functional module are similar to those of the embodiment of the present application, the solution of the present application can also be implemented.

[0132] Among them, the application layer can include a series of application packages.

[0133] like Figure 6 As shown, the application package may include applications such as camera, gallery, phone, map, etc. Of course, the application layer may also include other application packages, such as payment applications, shopping applications, banking applications, social applications, and other third-party applications, which are not limited in this application.

[0134] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0135] like Figure 6 As shown, the application framework layer may include a window manager, a content provider, a resource manager, a view system, a notification manager, and the like.

[0136] The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, the terminal device vibrates, the indicator light flashes, etc. In an embodiment of the present application, the notification manager can prompt that the virtual key proposed in the present application is in a normal working state, or that the virtual key proposed in the present application is in a closed state.

[0137] Among them, Android runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.

[0138] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0139] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0140] The system library may include multiple functional modules, such as a surface manager, a memory manager, a 3D graphics processing library (such as OpenGL ES), a 2D graphics engine (such as SGL), etc.

[0141] Among them, the HAL layer is an encapsulation of the Linux kernel driver, providing an interface to the upper layer and shielding the implementation details of the low-level hardware.

[0142] The HAL layer may include instruction processing HAL, software code library, etc.

[0143] In the embodiment of the present application, the instruction processing HAL can provide an instruction interface for the upper layer to interact with the underlying hardware (such as a camera). It can be understood that the sensor driver can pass the acquired illumination parameters to the instruction processing HAL, and the instruction processing HAL will perform instruction conversion on the received data and provide an instruction interface for the upper layer component. The upper layer component accesses the data of the sensor driver through the interface provided by the instruction processing HAL.

[0144] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, executable environment system, audio driver, and sensor driver.

[0145] In the embodiment of the present application, the sensor driver is responsible for managing and controlling the underlying sensor hardware to acquire light-sensitive data.

[0146] The following, in conjunction with the accompanying drawings, describes in detail the technical solutions of the embodiments of the present application and how the technical solutions of the embodiments of the present application solve the above-mentioned technical problems with specific embodiments. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0147] The embodiments of the present application may be performed based on the first function being in an on state. The first function may be understood as a specific function implemented for a specific user operation. The first function may be a screenshot function or other functions, which are not limited in the embodiments of the present application. Also, the specific user operations described in the present application may include a user blocking and unblocking the camera of a terminal device. For ease of explanation, the specific user operations are collectively referred to as user operations below.

[0148] It can be understood that only when the first function is in the on state can the function corresponding to the user specific operation be implemented according to the detected user specific operation. Figure 7 Introduce the process of opening the first function. Figure 7 A schematic diagram of enabling the first function provided in an embodiment of the present application.

[0149] like Figure 7 As shown, it is assumed that there is a terminal device 701, such as Figure 7 The interface shown in (a) can be understood as the desktop interface of the terminal device 701, which may include desktop controls such as time, date, and weather, as well as application controls such as themes, phone, and settings.

[0150] In response to the user's triggering operation on the control of the setting application, the current terminal device 701 displays the following Figure 7 The interface shown in (b) in the figure can be understood as the setting interface of the terminal device 701, and the setting interface may include: settings for accounts, settings for WLAN, settings for mobile data, settings for Bluetooth, settings for auxiliary functions, and settings for other functions.

[0151] In response to the user's triggering operation of the control for setting the auxiliary function, the current terminal device 701 displays the following Figure 7The interface shown in (c) in the figure can be understood as a setting interface of the auxiliary function of the terminal device 701, and the setting interface of the auxiliary function can include: settings for the first function, settings for the error prevention mode, and settings for other functions. Among them, the settings for the first function can include an on state setting and a off state setting. In one embodiment, when the first function is in the off state, in response to the user's triggering operation of the control set for the off state, the first function is in the on state; in another embodiment, when the first function is in the on state, in response to the user's triggering operation of the control set for the on state, the first function is in the off state.

[0152] In response to the user's triggering operation of the control 702 set for the closed state of the first function, the state of the first function is changed to Figure 7 The on state 703 shown in (d) in FIG. 7 . When the first function is in the on state, the terminal device will implement the function corresponding to the user operation after detecting the user operation.

[0153] It should be noted that the above illustration shows that the first function is enabled by setting up an application. In actual implementation, the first function may also be enabled through a control center. The embodiment of the present application does not limit the method for enabling the first function.

[0154] Based on the above introduction, when the terminal device turns on the first function, it is necessary to continuously obtain illumination parameters reflecting the light sensitivity. According to the analysis of the obtained illumination parameters, it is determined whether a user operation is detected. According to the detected user operation, the terminal device is triggered to respond to the instruction corresponding to the user operation, and further, the terminal device responds to the instruction corresponding to the user operation to complete the function corresponding to the user operation.

[0155] The technical solution provided by this application is described in detail below with reference to specific drawings. Figure 8 A schematic diagram of a process for detecting user operations provided in an embodiment of the present application, Fig. 9 A schematic diagram of a photosensitive point of a camera provided in an embodiment of the present application, Fig.10 A schematic diagram of a first queue provided in an embodiment of the present application, Fig.11 Schematic diagram of the analysis illumination parameters provided in the embodiment of the present application Figure 1 , Fig.12 Schematic diagram of the analysis illumination parameters provided in the embodiment of the present application Figure 2 , Fig.13 Schematic diagram of the analysis illumination parameters provided in the embodiment of the present application Figure 3 , Fig.14 Schematic diagram of the analysis illumination parameters provided in the embodiment of the present application Figure 4 , Fig.15Schematic diagram of the analysis illumination parameters provided in the embodiment of the present application Figure 5 . Reference Figure 8 , the method comprising:

[0156] S801. Continuously collect illumination parameters of a first camera based on a first sensor.

[0157] In the embodiment of the present application, it is necessary to determine whether there is a user operation based on the characteristics of the illumination parameter changes when the user performs an occlusion operation and a cancel occlusion operation on the first camera. The first camera can be a front camera or a rear camera, and the embodiment of the present application does not limit this. The illumination parameter can be understood as a Lux equivalent value, which is used to measure the brightness in the camera area.

[0158] Exemplarily, the illumination parameters can be obtained through an Always-On (AO) camera. It is understood that the AO camera is a camera function that is continuously turned on in the terminal device to respond to user needs. At the same time, it is understood that since the AO camera is in the always-on mode, using the AO camera to obtain the illumination parameters will result in excessive energy consumption, which increases the loss of the terminal device.

[0159] In order to solve the above problem, the present application sets the first camera to a light-sensitive mode. The light-sensitive mode can be understood as the light-sensitive pixels in the light-capturing area of ​​the image sensor in the camera working, while the sensing pixels in the color-capturing area of ​​the image sensor do not work. Furthermore, when the first camera is in the light-sensitive mode, the illumination parameters of the first camera can be collected based on the first sensor without outputting image information.

[0160] Therefore, the embodiment of the present application uses the first camera to turn on the light-sensing mode to obtain the illumination parameters, instead of using the always-on (AO) camera to perform image acquisition to obtain the illumination parameters, which can reduce power consumption.

[0161] Combine the following Fig. 9 Understand the camera's photosensitive pixels.

[0162] like Fig. 9 As shown, it is assumed that there is an image sensor 901 corresponding to the first camera, and the image sensor includes photosensitive pixels for light capture and perception pixels for color capture. Among them, the photosensitive pixels can be understood as Fig. 9 The 902 in the figure can be understood as the perceived pixel point Fig. 9 When the first camera starts the light-sensing mode, the plurality of light-sensing pixels 902 work, and the plurality of sensing pixels 903 stop working.

[0163] When the first camera turns on the light-sensing mode, the first sensor can continuously collect the illumination parameters of the first camera. Two methods of collecting illumination parameters are provided below.

[0164] In one embodiment, the first sensor may be an image sensor. It is understood that the image sensor is a core component of the camera, which can convert the optical information captured by the lens into an electrical signal, and after subsequent processing, photosensitive data can be obtained. According to the acquired photosensitive data, it is converted into a Lux equivalent value. Among them, the formula for converting the photosensitive data into a Lux equivalent value is not limited in the embodiment of the present application.

[0165] In another embodiment, the first sensor may be a light intensity sensor. It is understood that the light intensity sensor is a sensor used to measure the ambient light intensity, and the light intensity sensor may be directly used to obtain the Lux equivalent value.

[0166] It should be noted that two methods of obtaining illumination parameters are introduced above, and in practice, there may be other methods to obtain illumination parameters. The method of obtaining illumination parameters can be determined according to actual needs, and the embodiments of the present application do not limit this.

[0167] S802: Write illumination parameters of the first camera corresponding to multiple acquisition moments into the first queue in sequence.

[0168] According to the above content, the illumination parameters of the first camera can be continuously collected based on the first sensor. Afterwards, the illumination parameters corresponding to multiple collection moments are sequentially written into the first queue. The first queue includes multiple storage units, and the collection moments of the illumination parameters stored in two adjacent storage units are also adjacent.

[0169] At the same time, the first queue satisfies the first-in-first-out rule, and when the queue is full and the illumination parameters of the new collection moment are to be stored, the illumination parameters corresponding to the first storage unit in the first queue need to be deleted, and the contents of the other storage units are moved to the storage units corresponding to the previous collection moment in turn, and then the illumination parameters of the new collection moment are stored in the last storage unit, which can be understood as the first-in-first-out principle.

[0170] Furthermore, the length of the first queue is limited. It can be understood that the time interval between the acquisition time of the illumination parameter stored in the first storage unit in the first queue and the acquisition time of the illumination parameter stored in the last storage unit is less than or equal to the preset time. It can also be understood that by setting the preset time, the change characteristics of the illumination parameter within a period of time corresponding to the preset time can be analyzed according to the illumination parameter within the period of time.

[0171] Therefore, the length of the first queue is limited and meets the first-in-first-out principle. On the one hand, it can avoid exhausting the available memory resources, and on the other hand, it can perform real-time analysis and update of the illumination parameters to improve the efficiency of data processing.

[0172] Combine the following Fig.10 Understand the first queue.

[0173] like Fig.10 As shown, assuming that there is a terminal device 1001, the first camera of the terminal device 1001 continuously collects Lux equivalent values ​​corresponding to multiple moments, and writes the Lux equivalent values ​​at multiple moments into the first queue A in sequence. The first queue A is composed of multiple storage units, for example, Fig.10 A storage unit 1002 is shown in FIG. 1 . Meanwhile, adjacent storage units store illumination parameters corresponding to adjacent acquisition moments.

[0174] Exemplarily, assuming that the preset duration corresponding to the first queue can be 2s, and assuming that 10 illumination parameters can be collected in 1 second, then the illumination parameters captured for 2 seconds can correspond to 20 illumination parameters, and the length can be set to 20 for the first queue 1002. The first storage unit in the first queue A stores the illumination parameters corresponding to the collection time t1, and the last storage unit in the first queue A stores the illumination parameters corresponding to the collection time t20. At the same time, it can be understood that the storage unit of the illumination parameter corresponding to the collection time t1 is adjacent to the storage unit of the illumination parameter corresponding to the collection time t2.

[0175] When the first queue A is full, in order to store the illumination parameters corresponding to the acquisition time t21, it is necessary to delete the illumination parameters corresponding to the acquisition time t1 in the first queue A, and move the illumination parameters corresponding to the remaining acquisition times to the storage unit of the previous time. Then the illumination parameters stored in the first queue A are as follows: Fig.10 As shown in the first queue A'.

[0176] It can be understood that in the first queue A', the first storage unit stores the illumination parameter corresponding to the acquisition time t2, the illumination parameter corresponding to the acquisition time t2 is consistent with the illumination parameter corresponding to the acquisition time t2 in the first queue A, the illumination parameter corresponding to the acquisition time t3 is consistent with the illumination parameter corresponding to the acquisition time t3 in the first queue A, and the same logic can be understood for the illumination parameters corresponding to the acquisition times t4~t20. The last storage unit stores the illumination parameter corresponding to the acquisition time t21.

[0177] It should be noted that the above illustrates a queue method for storing illumination parameters at multiple acquisition moments, but in practice, other data structures can also be used to store illumination parameters, such as a linked list. Regardless of the method chosen to store illumination parameters, the principle of limited length and first-in-first-out must be met, and this application does not limit the structure for storing illumination parameters.

[0178] It should also be noted that the above illustrates the illumination parameters corresponding to the preset duration of 2 seconds, but in practice, the value of the preset duration can be determined according to actual needs, and the embodiments of the present application do not limit this.

[0179] S803: Analyze illumination parameters at multiple acquisition moments to determine illumination parameters that meet the first data feature in the first queue.

[0180] According to the above content, the illumination parameters stored in the first queue within a period of time can be obtained. By analyzing the illumination parameters within this period of time, it can be determined whether the first queue contains illumination parameters that meet the first data feature. Among them, the first data feature can be understood as the feature of the illumination parameter change caused by the user operation.

[0181] The following introduces the case where there is no illumination parameter change feature in the absence of user operation and the case where there is illumination parameter change feature in the presence of user operation.

[0182] Case 1: No user operation exists. It can be understood that when the terminal device starts the first function, the first camera is in the light-sensing mode, and the current environment of the terminal device is bright, the detected Lux ​​equivalent value is in a stable state.

[0183] For example, it is possible to determine whether there is a user operation in the first queue by analyzing data and drawing curves. Two methods are introduced below.

[0184] In one implementation, data analysis may be used to determine whether a user operation occurs. When there is no user-specific operation, the detected Lux ​​equivalent value tends to be stable.

[0185] In another implementation, a curve may be drawn to determine whether a user operation occurs. When there is no user-specific operation, the drawn curve is smooth.

[0186] Combine the following Fig.11 The case where there is no user operation is indicated.

[0187] like Fig.11As shown in (a), it is assumed that the indoor lights are turned off during the day, and it is assumed that the preset duration corresponding to the first queue can be 2s. According to the preset duration, it can be assumed that 10 illumination parameters are collected in 1 second, and 20 illumination parameters corresponding to 2 seconds are captured and correspond to the first queue 1101. Among them, the values ​​of the 20 illumination parameters collected are all 39Lux, so the detected Lux ​​equivalent value in the current environment is in a stable state, and there is no user operation.

[0188] Corresponds to Fig.11 The illumination parameters of the 20 acquisition moments shown in (a) can be plotted as Fig.11 The broken line 1102 shown in (b) in FIG. 1102 represents the linear relationship between the acquisition time and the illumination parameter in the scene of turning off the indoor lights during the day. It can be understood from observing the broken line 1102 that the broken line 1102 is smooth, so the Lux equivalent value detected in the current environment is in a stable state, and there is no user operation.

[0189] It can be understood that the above illustrates the change of illumination parameters in a scene. Based on the change, it can be judged that there is no user-specific operation. The specific operation can be understood as the user's blocking operation on the first camera and the user's unblocking operation on the first camera.

[0190] It should be noted that the above illustrates the change of an illumination parameter in a scene, but in practice, there may be multiple scenes and multiple changes in illumination parameters. The embodiments of the present application do not limit the scene and the change of illumination parameters.

[0191] Case 2: User operation. It is understandable that when the user blocks the first camera, the lens of the first camera receives less light, and the Lux equivalent value reflecting the brightness becomes smaller; when the user cancels the blocking operation on the first camera, the lens of the first camera receives more light, and the Lux equivalent value reflecting the brightness becomes larger.

[0192] The following introduces the first data feature corresponding to a single click and the first data feature corresponding to multiple clicks.

[0193] Exemplarily, when the user clicks the first camera, there may be two implementations for determining the first data feature.

[0194] In one embodiment, the first data feature can be determined by analyzing the data. The first data feature corresponding to the user clicking the first camera can be: there are multiple first illumination parameters, the first illumination parameter is located at the trough position and the first illumination parameter is less than the first preset threshold. The trough can be understood as the lowest point formed by being less than the previous data point adjacent to the acquisition time and less than the subsequent data point adjacent to the acquisition time, and the illumination parameter corresponding to the lowest point can be understood as the first illumination parameter. The first preset threshold can be understood as the preset illumination parameter value when the operation of blocking the first camera occurs.

[0195] Therefore, by constraining the first illumination parameter to be located at the trough position and the first illumination parameter to be less than the first preset threshold, it can be ensured that the first illumination parameter is indeed the illumination parameter value that becomes smaller due to the user's blocking operation on the first camera, and is not the illumination parameter value that becomes smaller due to the user passing over the first camera without performing a blocking operation, thereby reducing the probability of erroneous activation of the first function.

[0196] In another embodiment, a broken line can be drawn according to the multiple illumination parameters included in the first queue, and based on the broken line, it is determined whether the multiple illumination parameters included in the first queue meet the first data feature. When there is a trough feature in the broken line and the illumination parameter corresponding to the trough position is less than the first preset threshold, it can be understood that the multiple illumination parameters included in the first queue meet the first data feature. When the multiple illumination parameters included in the first queue meet the first data feature, the drawn broken line can be understood as a first curve.

[0197] Combine the following Fig.12 The situation where a user clicks the operation is indicated.

[0198] like Fig.12 As shown in (a), assuming that the scene is outdoors during the day, and assuming that the preset duration corresponding to the first queue can be 2s. According to the preset duration, it can be assumed that 10 illumination parameters are collected in 1 second, and 20 illumination parameters corresponding to 2 seconds are captured, corresponding to the first queue 1201. Among them, the illumination parameter corresponding to the acquisition time t6 is equal to the illumination parameter corresponding to the acquisition time t7, both of which are 6Lux, and are smaller than the illumination parameter 65Lux corresponding to the acquisition time t5 and smaller than the illumination parameter 180Lux corresponding to the acquisition time t8. Then it can be understood that 6Lux is the first illumination parameter corresponding to the trough position.

[0199] At the same time, assuming that when the first camera operation is blocked, the illumination parameter that needs to be met is 10Lux, or it can be understood that 10Lux is the first preset threshold, and the 6Lux corresponding to the trough position is less than 10Lux, so it can be considered that the first queue 1201 contains illumination parameters that meet the first data characteristics.

[0200] Corresponds to Fig.12 The illumination parameters of the 20 acquisition moments shown in (a) can be plotted as Fig.12 The broken line 1202 shown in (b) in FIG. 1 shows the linear relationship between the acquisition time and the illumination parameter in the outdoor scene during the day. By observing the broken line 1202, it can be understood that the fluctuation range of the illumination parameter is between 6 Lux and 253 Lux, and there is a trough position 1203, and the illumination parameter corresponding to the trough position 1203 is 6 Lux.

[0201] Corresponding to the first preset threshold value 10 Lux, the following can be drawn: Fig.12 The broken line 1204 shown in (b) in FIG. 6 , wherein the illumination parameter 6 Lux corresponding to the trough position is less than the first preset threshold value 10 Lux.

[0202] It can be understood that there is a trough feature in the broken line 1202 and the illumination parameter corresponding to the trough position is less than the first preset threshold. It can be understood that the multiple illumination parameters contained in the first queue 1201 meet the first data feature, and the drawn broken line 1202 can be understood as the first curve.

[0203] Exemplarily, when the user taps the first camera multiple times, there are two implementations for determining the first data feature.

[0204] In one embodiment, the first data feature can be determined by analyzing the data. The first data feature corresponding to the user clicking multiple times on the first camera can be: there are multiple first illumination parameters and multiple second illumination parameters. The first illumination parameter is located at a trough position and the first illumination parameter is less than a first preset threshold, and the second illumination parameter is located at a peak position; and there is a second illumination parameter between any two first illumination parameters.

[0205] According to the above content of the user clicking the first camera, the trough and the first preset threshold can be understood, which will not be repeated here. The peak can be understood as the highest point formed by being greater than the previous data point adjacent to the acquisition time and greater than the subsequent data point adjacent to the acquisition time, and the illumination parameter corresponding to the highest point can be understood as the second illumination parameter. At the same time, there is a peak between any two troughs, which can also be understood as a second illumination parameter between any two first illumination parameters.

[0206] Further, the following constraints may be imposed on the peak: for example, the second illumination parameter is greater than a second preset threshold, or for example, the difference between the second illumination parameter and the adjacent previous first illumination parameter is greater than a third preset threshold, wherein the first preset threshold is less than the second preset threshold.

[0207] It can be understood that the second preset threshold value can be a preset illumination parameter value when canceling the operation of blocking the first camera after the operation of blocking the first camera occurs. When the second illumination parameter is greater than the second preset threshold value, it can be determined that the user's canceling operation of blocking the first camera has indeed occurred.

[0208] At the same time, it can be understood that the third preset threshold value can be a preset difference between a peak and a trough. When the first illumination is less than the first preset threshold value, and the difference between the second illumination parameter and the adjacent previous first illumination parameter is greater than the third preset threshold value, it can be determined that the user has indeed performed an unblocking operation on the first camera.

[0209] Therefore, by constraining the second illumination parameter to be located at the peak position and the second illumination parameter to be less than the second preset threshold, or the difference between the second illumination parameter and the adjacent previous first illumination parameter is greater than the third preset threshold, it can be ensured that the second illumination parameter is indeed the illumination parameter value increased due to the user's unblocking operation on the first camera, thereby reducing the probability of erroneous activation of the first function.

[0210] In another embodiment, a broken line can be drawn according to the multiple illumination parameters included in the first queue, and based on the broken line, it is determined whether the multiple illumination parameters included in the first queue meet the first data feature. When there is a trough position in the broken line and the illumination parameter corresponding to the trough position is less than the first preset threshold value and there is a peak between two adjacent troughs, it can be understood that the multiple illumination parameters included in the first queue meet the first data feature. When the multiple illumination parameters included in the first queue meet the first data feature, the drawn broken line can be understood as a first curve.

[0211] Combine the following Figure 13~Figure 15 The case where there is a user's multi-click operation is understood by taking an example where there is a user's double-click operation.

[0212] like Fig.13 As shown in (a), assuming that the indoor lights are turned off during the day, and assuming that the preset duration corresponding to the first queue can be 2s. According to the preset duration, it can be assumed that 10 illumination parameters are collected in 1 second, and 20 illumination parameters corresponding to 2 seconds are captured and correspond to the first queue 1301.

[0213] Among them, the illumination parameter 3Lux corresponding to the acquisition time t9 is less than the illumination parameter 5Lux corresponding to the acquisition time t8 and less than the illumination parameter 31Lux corresponding to the acquisition time t10. Then it can be understood that 3Lux is the first illumination parameter corresponding to the first trough position. The illumination parameter 2Lux corresponding to the acquisition time t13 is less than the illumination parameter 6Lux corresponding to the acquisition time t12 and less than the illumination parameter 28Lux corresponding to the acquisition time t14. Then it can be understood that 2Lux is the first illumination parameter corresponding to the second trough position. At the same time, assuming that when the first camera operation is blocked, the illumination parameter that needs to be met is 10Lux, or it can be understood that 10Lux is the first preset threshold, and the first illumination parameters 3Lux and 2Lux corresponding to the two trough positions are both less than 10Lux.

[0214] The illumination parameter 31 Lux corresponding to the acquisition time t10 is greater than the illumination parameter 3 Lux corresponding to the acquisition time t9 and greater than the illumination parameter 21 Lux corresponding to the acquisition time t11. It can be understood that 31 Lux is the second illumination parameter corresponding to the peak position.

[0215] Further, assuming that after the operation of blocking the first camera occurs and the operation of canceling the blocking of the first camera occurs, the illumination parameter that needs to be met is 20Lux, or it can be understood that 20Lux is the second preset threshold, and the second illumination parameter 31Lux corresponding to the peak position is greater than the second preset threshold.

[0216] Alternatively, the third preset threshold is 10 Lux. When the difference between the first illumination parameter 3 Lux and the second illumination parameter 31 Lux is 28 Lux, it is greater than the third preset threshold 10 Lux; when the difference between the first illumination parameter 2 Lux and the second illumination parameter 31 Lux is 29 Lux, it is greater than the third preset threshold 10 Lux.

[0217] According to the above content, it can be obtained that the first queue 1301 contains illumination parameters that meet the first data characteristics.

[0218] Corresponds to Fig.13 The illumination parameters of the 20 acquisition moments shown in (a) can be plotted as Fig.13 The broken line 1302 shown in (b) in FIG. The broken line 1302 represents the linear relationship between the acquisition time and the illumination parameter of the scene of turning off the lights indoors during the day. By observing the broken line 1302, it can be understood that there are two trough positions and a peak position between the two troughs. At the same time, the illumination parameters corresponding to the trough positions are all less than the first preset threshold corresponding to the broken line 1304, and the illumination parameters corresponding to the peak position are greater than the second preset threshold corresponding to the broken line 1303.

[0219] It can be understood from the above content that the multiple illumination parameters included in the first queue 1301 meet the first data feature, and the drawn broken line 1302 can be understood as the first curve.

[0220] like Fig.14 As shown in (a), it is assumed that the indoor light is turned on during the day, and it is also assumed that the preset duration corresponding to the first queue can be 2s. According to the preset duration, it can be assumed that 10 illumination parameters are collected in 1 second, and 20 illumination parameters corresponding to 2 seconds are captured and correspond to the first queue 1401.

[0221] Among them, the illumination parameter corresponding to the acquisition time t9 is equal to the illumination parameter corresponding to the acquisition time t10, both of which are 4Lux, and 4Lux is less than the illumination parameter 21Lux corresponding to the acquisition time t8 and less than the illumination parameter 55Lux corresponding to the acquisition time t11. Then it can be understood that 4Lux is the first illumination parameter corresponding to the first trough position. The illumination parameter 5Lux corresponding to the acquisition time t14 is less than the illumination parameter 6Lux corresponding to the acquisition time t13 and less than the illumination parameter 62Lux corresponding to the acquisition time t15. Then it can be understood that 5Lux is the first illumination parameter corresponding to the second trough position. At the same time, assuming that when the first camera operation is blocked, the illumination parameter that needs to be met is 10Lux, or it can be understood that 10Lux is the first preset threshold, and the first illumination parameters 4Lux and 5Lux corresponding to the two trough positions are both less than 10Lux.

[0222] The illumination parameter 55 Lux corresponding to the acquisition time t11 is greater than the illumination parameter 4 Lux corresponding to the acquisition time t10 and greater than the illumination parameter 14 Lux corresponding to the acquisition time t12. It can be understood that 55 Lux is the second illumination parameter corresponding to the peak position.

[0223] Further, assuming that after the operation of blocking the first camera occurs and the operation of canceling the blocking of the first camera occurs, the illumination parameter that needs to be met is 50Lux, or it can be understood that 50Lux is the second preset threshold, and the second illumination parameter 55Lux corresponding to the peak position is greater than the second preset threshold.

[0224] Alternatively, the third preset threshold is 30 Lux. When the difference between the first illumination parameter of 4 Lux and the second illumination parameter of 55 Lux is 51 Lux, it is greater than the third preset threshold of 30 Lux; when the difference between the first illumination parameter of 5 Lux and the second illumination parameter of 55 Lux is 50 Lux, it is greater than the third preset threshold of 30 Lux.

[0225] According to the above content, it can be obtained that the first queue 1401 contains illumination parameters that meet the first data characteristics.

[0226] Corresponds to Fig.14 The illumination parameters of the 20 acquisition moments shown in (a) can be plotted as Fig.14 The broken line 1402 shown in (b) in FIG. The broken line 1402 represents the linear relationship between the acquisition time and the illumination parameter of the scene with the lights turned on indoors during the day. By observing the broken line 1402, it can be understood that there are two trough positions and a peak position between the two troughs. At the same time, the illumination parameters corresponding to the trough positions are all less than the first preset threshold corresponding to the broken line 1404, and the illumination parameters corresponding to the peak position are greater than the second preset threshold corresponding to the broken line 1403.

[0227] It can be understood from the above content that the multiple illumination parameters included in the first queue 1401 meet the first data feature, and the drawn broken line 1402 can be understood as the first curve.

[0228] like Fig.15 As shown in (a), assuming that the scene is outdoors during the day, and assuming that the preset duration corresponding to the first queue can be 2s. According to the preset duration, it can be assumed that 10 illumination parameters are collected in 1 second, and 20 illumination parameters corresponding to 2 seconds are captured and correspond to the first queue 1501.

[0229] Among them, the illumination parameter corresponding to the acquisition time t6 is equal to the illumination parameter corresponding to the acquisition time t7, both of which are 6Lux, and 6Lux is less than the illumination parameter 65Lux corresponding to the acquisition time t5 and less than the illumination parameter 180Lux corresponding to the acquisition time t8. It can be understood that 6Lux is the first illumination parameter corresponding to the first trough position. The illumination parameter 6Lux corresponding to the acquisition time t11 is less than the illumination parameter 8Lux corresponding to the acquisition time t10 and less than the illumination parameter 252Lux corresponding to the acquisition time t12. It can be understood that 6Lux is the first illumination parameter corresponding to the second trough position. At the same time, assuming that when the first camera operation is blocked, the illumination parameter that needs to be met is 10Lux, or it can be understood that 10Lux is the first preset threshold, and the first illumination parameters 6Lux corresponding to the two trough positions are both less than 10Lux.

[0230] The illumination parameter 180 Lux corresponding to the acquisition time t8 is greater than the illumination parameter 6 Lux corresponding to the acquisition time t7 and greater than the illumination parameter 85 Lux corresponding to the acquisition time t9. It can be understood that 180 Lux is the second illumination parameter corresponding to the peak position.

[0231] Further, assuming that after the operation of blocking the first camera occurs and the operation of canceling the blocking of the first camera occurs, the illumination parameter that needs to be met is 150Lux, or it can be understood that 150Lux is the second preset threshold, and the second illumination parameter 180Lux corresponding to the peak position is greater than the second preset threshold.

[0232] Alternatively, the third preset threshold is preset to be 140 Lux. When the difference between the first illumination parameter of 6 Lux and the second illumination parameter of 180 Lux is 174 Lux, it is greater than the third preset threshold of 140 Lux.

[0233] According to the above content, it can be obtained that the first queue 1501 contains illumination parameters that meet the first data characteristics.

[0234] Corresponds to Fig.15 The illumination parameters of the 20 acquisition moments shown in (a) can be plotted as Fig.15 The broken line 1502 shown in (b) in FIG. 1 shows the linear relationship between the acquisition time and the illumination parameter of the outdoor scene during the day. By observing the broken line 1502, it can be understood that there are two trough positions and a peak position between the two troughs. At the same time, the illumination parameters corresponding to the trough positions are all less than the first preset threshold corresponding to the broken line 1504, and the illumination parameters corresponding to the peak position are greater than the second preset threshold corresponding to the broken line 1503.

[0235] It can be understood from the above content that the multiple illumination parameters included in the first queue 1501 meet the first data feature, and the drawn broken line 1502 can be understood as the first curve.

[0236] It should be noted that the second preset threshold and the third preset threshold need to be pre-set according to the light conditions of the environment in which the terminal device is located. With different light conditions corresponding to different environments, the second preset threshold and the third preset threshold change dynamically, and this application does not limit the specific values ​​of the second preset threshold and the third preset threshold.

[0237] It should be noted that the above illustrates the first data feature corresponding to single-clicking and double-clicking the first camera, but in practice, other methods can also be used to implement the blocking operation and canceling the blocking operation on the first camera, for example, long pressing the first camera. The embodiment of the present application does not limit the method of implementing the user's blocking operation and canceling the blocking operation on the first camera.

[0238] It should also be noted that the above illustrates a method of analyzing data and drawing a first curve to determine whether the first data feature is met, but in practice, other methods can also be used to determine, and the embodiments of the present application do not limit this.

[0239] S804: Determine that a user operation acting on the first camera is detected based on whether illumination parameters at multiple acquisition moments included in the first queue satisfy a first data feature.

[0240] In the above content, the content of the first data feature when the user performs a single-click operation on the first camera and the content of the first data feature when the user performs a multi-click operation on the first camera are introduced. When the illumination parameters of multiple acquisition moments included in the first queue meet the above first data feature, it can be determined that the user operation acting on the first camera is detected.

[0241] Furthermore, a certain duration limit may be added to the first data feature. For example, a duration threshold may be pre-set, and then it is determined whether the duration corresponding to the time period in which the first data feature is detected is less than the duration threshold. If it is less than, it can be determined that a specific user operation is detected. Otherwise, it is not considered that a specific user operation is detected.

[0242] When determining the time period in which the first data feature is detected, for example, the time when the illumination parameter starts to change can be determined as the start time of the time period, and the time when the illumination parameter ends to change can be determined as the end time of the time period. The changes introduced here can be understood as the changes corresponding to the first data feature described above.

[0243] By adding a time limit to specific user operations, it can be achieved that the user is considered to have entered a specific operation only when the first data feature is detected within a specific time period, thereby improving the accuracy of detecting specific user operations and preventing false detections.

[0244] Therefore, the probability of false activation is reduced by constraining the illumination parameters of multiple acquisition moments included in the first queue with the first data feature and setting a time threshold constraint.

[0245] It should be noted that the setting of the time threshold and the method of judging whether the illumination parameter has changed significantly can be determined according to actual needs, and the embodiments of the present application do not limit this.

[0246] S805. Trigger the terminal device to execute a first instruction corresponding to the first function.

[0247] In an embodiment of the present application, when a first operation of blocking the first camera and a second operation of canceling blocking the first camera are detected, a first instruction corresponding to the first function of the terminal device will be triggered. Further, the first function is started according to the first instruction to meet the user's needs.

[0248] The first function may be understood as a function corresponding to a user operation, for example, a screen capture function. When a user performs a blocking operation or a cancel blocking operation on a camera, the terminal device will capture the current screen after detecting the user operation.

[0249] It should be noted that the achievable function corresponding to the first function may be a screenshot function or other functions, and this embodiment of the present application does not limit this.

[0250] To sum up, under the premise that the terminal device has started the first function and the first function can work normally, the power consumption can be reduced by turning on the light-sensitive mode of the first camera to detect the illumination parameters; by introducing the first queue to store the illumination parameters of the first camera corresponding to multiple acquisition moments, the illumination parameters can be analyzed and updated in real time, thereby improving the efficiency of data processing; by introducing the first data features satisfied by the illumination parameters contained in the first queue corresponding to the user's single click and the user's multiple clicks, the probability of false activation can be reduced; through the constraints of the first data features or the constraints of the preset time threshold, it can be determined that the operation acting on the first camera is detected, thereby triggering the terminal device to execute the first instruction corresponding to the first function, thereby meeting the user's needs.

[0251] In addition to the above content, the embodiment of the present application can also determine whether the first function can work normally. If it can work normally, the above embodiment can be executed. If it cannot work normally, the environment in which the terminal device is located needs to be adjusted. The technical solution provided by the present application is described in detail below in conjunction with specific drawings. Fig.16 A schematic diagram of a process for detecting a first functional state provided in an embodiment of the present application, Fig.17 A schematic diagram of analyzing a second data feature provided in an embodiment of the present application, Fig.18 A schematic diagram showing a first mark provided in an embodiment of the present application, Fig.19 A schematic diagram showing a second identifier provided in an embodiment of the present application. Fig.16 , the method comprising:

[0252] S1601. Continuously collect illumination parameters of a first camera based on a first sensor.

[0253] In the embodiment of the present application, it is necessary to determine whether the first function can work normally according to the collected illumination parameters. The first camera and the first sensor can be understood according to the content in S801, and will not be repeated here.

[0254] S1602: Write illumination parameters of the first camera corresponding to multiple acquisition moments into the first queue in sequence.

[0255] Storing the illumination parameters corresponding to the multiple moments collected by the first camera in the first queue can facilitate subsequent analysis of whether the illumination parameters corresponding to the multiple moments meet the conditions for the first function to work normally. The introduction of the first queue can be understood in conjunction with S802 and will not be repeated here.

[0256] S1603, determine whether the first queue contains illumination parameters that meet the second data characteristics, if so, execute S1604, if not, execute S1606.

[0257] When the illumination parameters of the first camera corresponding to multiple acquisition moments are stored in the first queue, these illumination parameters can be analyzed to determine whether the first queue contains illumination parameters that meet the second data feature. The second data feature can be understood as multiple illumination parameters stored in the first queue are all less than a fourth preset threshold. And the fourth preset threshold can be understood as the minimum illumination parameter that needs to be met when the first function can work normally.

[0258] It can be understood that when the multiple illumination parameters stored in the first queue are all less than the fourth preset threshold value, the multiple illumination parameters stored in the first queue do not meet the illumination parameters that need to be met when the first function can work normally, then it can be understood that the first function is not available in the environment where the current terminal device is located. When the first function is not available, execute S1604.

[0259] At the same time, it can be understood that when the multiple illumination parameters stored in the first queue are greater than or equal to the fourth preset threshold value, the multiple illumination parameters stored in the first queue all meet the illumination parameters that need to be met when the first function can work normally, then it can be understood that the first function is available in the environment where the current terminal device is located. When the first function is available, execute S1606.

[0260] Combine the following Fig.17 Let’s understand the second data feature.

[0261] like Fig.17 As shown in (a), it is assumed that in the scene where the indoor lights are turned off at night, and it is assumed that the preset duration corresponding to the first queue can be 2s. According to the preset duration, it can be assumed that 10 illumination parameters are collected in 1 second, and 20 illumination parameters corresponding to 2 seconds are captured and correspond to the first queue 1701. Among them, the 20 illumination parameters collected are all less than the fourth preset threshold value of 10Lux, so the illumination parameters detected based on the current environment meet the second data feature.

[0262] Corresponds to Fig.17 The illumination parameters of the 20 acquisition moments shown in (a) can be plotted as Fig.17 The broken line 1703 shown in (b) of FIG. 1703 represents the linear relationship between the acquisition time and the illumination parameter in the scene of turning off the lights indoors at night. By observing the broken line 1703, it can be understood that the illumination parameters corresponding to the 20 acquisition times in the first queue are all less than the fourth preset threshold corresponding to the broken line 1702.

[0263] It should be noted that the above illustrates the case where the fourth preset threshold is 10 Lux, and in practice, the fourth preset threshold can be set according to actual needs, and the embodiment of the present application does not limit this. It should also be noted that the above illustrates the case where the illumination parameters are detected in the scene of turning off the lights indoors at night, and in practice, illumination parameters can also be collected in other scenes, and the embodiment of the present application does not limit this.

[0264] S1604: Issue an instruction that the first function is in the second state.

[0265] When the illumination parameters included in the first queue meet the second data feature, or it can be understood that the illumination parameters included in the first queue are all less than the fourth preset threshold, the first function of the terminal device is unavailable. The unavailability of the first function can also be understood as the first function being in the second state.

[0266] When the first function is not available, an instruction is issued to set the first function to the second state, indicating that the first function of the terminal device cannot execute the embodiment of detecting user operations.

[0267] S1605: Display a first logo on the screen of the terminal device.

[0268] When the first function is not available, a first mark is displayed on the screen of the terminal device. The first mark indicates that the first function is not available. After the first mark is displayed on the screen of the terminal device, the terminal device executes S1601, that is, continuously collecting illumination parameters of the first camera based on the first sensor. It can be understood that if the user moves the terminal device to a well-lit scene to perform user operations according to the content of the first mark, the terminal device continuously collects illumination parameters to ensure timely response to user operations.

[0269] Therefore, by displaying the first mark on the screen of the terminal device, it can be indicated that user operations are not allowed in the current environment. If the user needs to perform user operations, the user will hold the terminal device and move it to a scene with sufficient light, thereby improving the intelligence of the terminal device.

[0270] Combine the following Fig.18 Understand the first identification.

[0271] like Fig.18 As shown, it is assumed that there is a terminal device 1801, such as Fig.18 The interface shown in (a) can be understood as the desktop interface of the terminal device 1801, which may include desktop controls such as time, date, and weather, as well as application controls such as themes, phone, and camera.

[0272] Exemplarily, the first logo may be displayed at the top of the screen of the terminal device 1801, which may be understood as Fig.18The 1802 shown in (a) in FIG. 1 indicates that the first function is currently unavailable. The top of the screen of the terminal device 1801 may also display a power level indicator, a Bluetooth indicator, and a signal indicator.

[0273] In response to the user's pull-down operation on the top 1803 of the right screen, the current terminal device 1801 displays the following Fig.18 The interface shown in (b) in the figure can be understood as the control center interface of the terminal device 1801, and the control center interface may include: WLAN, mobile data, Bluetooth, mute, flashlight, automatic rotation, eye protection mode and the first function 1805 and other controls.

[0274] Exemplarily, the first identifier can be understood as Fig.18 The first function 1805 shown in (b) of FIG. 1 is currently in a state of being unavailable.

[0275] In response to the user's pull-down operation on the top 1804 of the left screen, the current terminal device 1801 displays the following Fig.18 The interface shown in (c) in the figure can be understood as the notification center interface of the terminal device 1801, and the notification center interface may include: time control, notification setting control, and notification status bar 1906, etc. Among them, the notification status bar 1806 displays that the first function is currently unavailable, please move to an area with sufficient light.

[0276] Exemplarily, the first identifier can be understood as Fig.18 Notification status bar 1806 shown in (c) .

[0277] It should be noted that the above illustrates three ways of displaying the first identification, namely, displaying the first identification on the top of the screen of the terminal device, displaying the first identification in the control center, and displaying the first identification in the notification center. In practice, there may be other ways to display the first identification, and the embodiments of the present application do not limit this.

[0278] S1606: Issue an instruction that the first function is in the first state.

[0279] When the illumination parameters included in the first queue do not meet the second data feature, or it can be understood that the illumination parameters included in the first queue are greater than or equal to the fourth preset threshold, the first function of the terminal device is available. The first function being available can also be understood as the first function being in the first state.

[0280] When the first function is available, an instruction that the first function is in the first state is issued, indicating that the first function of the terminal device can execute an embodiment of detecting user operations.

[0281] Therefore, by issuing an instruction that the first function is in the first state, the processor of the terminal device can be put into a working state to respond to the first function corresponding to the user operation in real time, thereby improving the response efficiency.

[0282] S1607: Display a second identifier on the screen of the terminal device.

[0283] When the first function is available, a second identifier will be displayed on the screen of the terminal device, wherein the second identifier indicates that the first function is available.

[0284] Therefore, by displaying the second identifier on the screen of the terminal device, it can be indicated that the current environment can be operated by the user, thereby improving user friendliness.

[0285] Combine the following Fig.19 Understand the second identifier.

[0286] like Fig.19 As shown, it is assumed that there is a terminal device 1901, such as Fig.19 The interface shown in (a) can be understood as the desktop interface of the terminal device 1901, which may include desktop controls such as time, date, and weather, as well as application controls such as themes, phone, and camera.

[0287] Exemplarily, the second identification may be displayed at the top of the screen of the terminal device 1901, which may be understood as Fig.19 The 1902 shown in (a) in FIG. 1 indicates that the first function is currently available. The top of the screen of the terminal device 1901 may also display a power level indicator, a Bluetooth indicator, and a signal indicator.

[0288] In response to the user's pull-down operation on the top 1903 of the right screen, the current terminal device 1901 displays the following Fig.19 The interface shown in (b) can be understood as the control center interface of the terminal device 1901, and the control center interface may include: WLAN, mobile data, Bluetooth, mute, flashlight, automatic rotation, eye protection mode and the first function 1905 and other controls.

[0289] Exemplarily, the second identifier can be understood as Fig.19 The first function 1905 shown in (b) in FIG. 1 is currently in a state of being available.

[0290] In response to the user's pull-down operation on the top 1904 of the left screen, the current terminal device 1901 displays the following Fig.19The interface shown in (c) in the figure can be understood as the notification center interface of the terminal device 1901, and the notification center interface may include: time control, notification setting control, and notification status bar 1906, etc. Among them, the notification status bar 1906 displays that the current first function is available.

[0291] Exemplarily, the second identifier can be understood as Fig.19 Notification status bar 1906 shown in (c) .

[0292] It should be noted that the above illustrates three ways of displaying the second logo, namely, displaying the second logo on the top of the screen of the terminal device, displaying the second logo in the control center, and displaying the second logo in the notification center. In practice, there may be other ways to display the second logo, and the embodiments of the present application do not limit this.

[0293] In summary, the technical solution of the present application can determine whether the first function of the terminal device is available by analyzing whether the illumination parameters of multiple acquisition moments in the first queue meet the second data feature. When the first function is not available, the first mark is displayed, and the user can move to a well-lit area to perform user operations according to the content of the first mark, thereby improving the intelligence of the terminal device; when the first function is available, the first mark is displayed, and the user can perform user operations according to the content of the first mark, thereby improving user friendliness.

[0294] Combine the following Fig. 20 Sorting out the above contents, Fig. 20 A flowchart of an instruction processing method provided in an embodiment of the present application.

[0295] like Fig. 20 As shown, based on the first sensor, the illumination parameters of the first camera are continuously collected; the illumination parameters of the first camera corresponding to multiple collection moments are sequentially written into the first queue; it is determined whether the first queue contains illumination parameters that meet the second data feature; if so, an instruction is issued that the first function is in the second state and the first mark is displayed on the screen of the terminal device; if not, an instruction is issued that the first function is in the first state and the second mark is displayed on the screen of the terminal device. The above content corresponds to the process of detecting the state of the first function in S1601~S1607.

[0296] According to the above content, when the second logo is displayed on the screen of the terminal device, it can be understood that the first function is available. At this time, the process of detecting user operations in S801~S805 may include: analyzing the illumination parameters that meet the first data feature in the first queue; determining that a user operation acting on the first camera is detected based on meeting the first data feature; triggering the terminal device to execute the first instruction corresponding to the first function.

[0297] In summary, based on the above content, the present application proposes a new virtual key command input method for performing blocking operations on the camera and canceling the blocking operations to trigger the terminal device to execute a specific function.

[0298] It should be noted that the module names involved in the embodiments of the present application can be defined as other names as long as the functions of each module can be achieved, and there is no specific restriction on the names of the modules.

[0299] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0300] The instruction processing method of the embodiment of the present application has been described above, and the device for executing the above method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the above instruction processing method.

[0301] The instruction processing method provided in the embodiment of the present application can be applied to an electronic device with an instruction processing function. The electronic device includes a terminal device, and the specific device form of the terminal device can refer to the above related description, which will not be repeated here.

[0302] In one implementation, an embodiment of the present application provides an electronic device, Fig.21 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0303] like Fig.21 As shown, the electronic device 210 includes: a processor 2101 and a memory 2102; the memory 2102 stores computer-executable instructions; the processor 2101 executes the computer-executable instructions stored in the memory 2102, so that the electronic device 210 executes the above method.

[0304] When the memory 2102 is independently provided, the electronic device further includes a bus 2103 for connecting the memory 2102 and the processor 2101 .

[0305] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated here.

[0306] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0307] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.

[0308] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.

[0309] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0310] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A command processing method, characterized in that: Applied to a terminal device, the terminal device includes a first camera, and the method includes: In response to a user operation on the first camera, triggering the terminal device to execute a first instruction; The user operation includes a first operation of blocking the first camera and a second operation of canceling blocking the first camera.

2. The method according to claim 1, characterized in that The method further comprises: Based on the first sensor, continuously collect illumination parameters of the first camera to obtain illumination parameters of the first camera corresponding to multiple collection moments; A user operation acting on the first camera is detected according to illumination parameters of the first camera corresponding to a plurality of acquisition moments.

3. The method according to claim 2, characterized in that The detecting, according to the illumination parameters of the first camera corresponding to a plurality of acquisition moments, a user operation acting on the first camera includes: Writing illumination parameters of the first camera corresponding to multiple acquisition moments into a first queue in sequence; When the multiple illumination parameters included in the first queue satisfy a first data feature, it is determined that a user operation acting on the first camera is detected; wherein the first data feature conforms to a change feature of the illumination parameters caused by the user operation.

4. The method according to claim 3, characterized in that The user operation is a single click operation, and the first data feature includes: there are n first illumination parameters, the first illumination parameter is located at a trough position, and the first illumination parameter is less than a first preset threshold.

5. The method according to claim 3, characterized in that: The user operation is a multiple-click operation, and the first data feature includes: there are n first illumination parameters and m second illumination parameters, and n and m are integers greater than or equal to 1, and n is greater than m; The first illumination parameter is located at a trough position and is less than a first preset threshold, and the second illumination parameter is located at a peak position; and there is a second illumination parameter between any two of the first illumination parameters.

6. The method according to claim 5, characterized in that The second illumination parameter also satisfies a first condition, where the first condition is that the second illumination parameter is greater than a second preset threshold, or a difference between the second illumination parameter and an adjacent previous first illumination parameter is greater than a third preset threshold; The first preset threshold is smaller than the second preset threshold.

7. The method according to any one of claims 3 to 6, characterized in that: In the case where the plurality of illumination parameters included in the first queue satisfy the first data feature, before determining that a user operation acting on the first camera is detected, the method further includes: A first curve is drawn according to the multiple illumination parameters included in the first queue, and based on the first curve, it is determined whether the multiple illumination parameters included in the first queue meet the first data feature.

8. The method according to any one of claims 3 to 6, characterized in that: The step of sequentially writing illumination parameters of the first camera corresponding to a plurality of acquisition moments into a first queue includes: For any one of the multiple collection moments, after obtaining the illumination parameter corresponding to the collection moment, dequeue the illumination parameter at the head of the first queue; The illumination parameter corresponding to the acquisition moment is queued.

9. The method according to claim 8, characterized in that The first queue includes a plurality of storage units, and the acquisition times of the illumination parameters stored in two adjacent storage units are also adjacent; The time interval between the acquisition time of the illumination parameter stored in the first storage unit among the multiple storage units and the acquisition time of the illumination parameter stored in the last storage unit among the multiple storage units is less than the preset time interval.

10. The method according to claim 9, characterized in that The method further comprises: When the illumination parameters at the multiple acquisition moments included in the first queue meet the second data feature and the first function is marked as the first state, marking the first function as the second state, wherein the first state is used to indicate that the first function is available, and the second state is used to indicate that the first function is unavailable, and the first function is a function of performing the user operation on the first camera to trigger the first instruction; When the illumination parameters at the multiple acquisition moments included in the first queue do not satisfy the second data feature and the first function is marked as the second state, marking the first function as the first state; The second data feature is that multiple illumination parameters stored in the first queue are all less than a fourth preset threshold.

11. The method according to claim 10, characterized in that When the illumination parameters at the multiple acquisition moments included in the first queue meet the first data feature, determining that a user operation acting on the first camera is detected includes: When the first function is marked as the first state and the illumination parameters of the multiple acquisition moments contained in the first queue meet the first data feature, it is determined that a user operation acting on the first camera is detected.

12. The method according to claim 10, characterized in that After marking the first function as a second state, the method further includes: Displaying a first mark on the screen of the terminal device, where the first mark is used to indicate that the first function is in the second state; After marking the first function as the first state, the method further includes: A second identifier is displayed on the screen of the terminal device, where the second identifier is used to indicate that the first function is in the first state.

13. The method according to claim 2, characterized in that The step of continuously collecting the illumination parameter of the first camera based on the first sensor to obtain the illumination parameters of the first camera corresponding to multiple collection moments includes: Based on the first sensor, continuously collect light-sensing data of the first camera; The photosensitive data is converted into corresponding illumination parameters to obtain illumination parameters of the first camera corresponding to multiple acquisition moments.

14. The method according to claim 13, characterized in that The photosensitive module in the first sensor is in a normally open state.

15. An electronic device, characterized in that: The electronic device comprises: one or more processors and memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to perform the method according to any one of claims 1 to 14.

16. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 14.

18. A computer program product, characterized in that The computer program product comprises a computer program code, and when the computer program code is run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Method for realizing mobile phone key function by simulating double-click operation

    CN102215296A

  • Screen activating and unlocking method for mobile terminal

    CN102868821A

  • Gesture recognition control method and device

    CN113282172A