Brightness adjustment method and device, equipment and medium

By acquiring and saving relevant information of the display and adjusting the brightness according to the gamma correction method, the problem that the brightness adjustment means in the prior art is restricted by interfaces and specifications is solved, and the effectiveness and success rate of brightness adjustment are improved.

CN119274503AActive Publication Date: 2025-01-07ZHONGKE FANGDE SOFTWARE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411485283.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-01-07
Estimated Expiration
2044-10-23

AI Technical Summary

Technical Problem

The effectiveness and availability of existing brightness adjustment methods in actual applications are affected by various factors, especially when the connection interface of the display does not implement the I2C protocol or does not support the MCCS specification, the brightness adjustment method based on DDC cannot be used, resulting in effective brightness adjustment. Lower sex.

Method used

By using hardware detection tools, command line tools and device file directories to obtain relevant information of the display, save it in the display object, and adjust the brightness according to the acquired information. If the adjustment basis information supported by the display does not exist, the gamma correction method is used Make adjustments.

Benefits of technology

It improves the effectiveness and success rate of brightness adjustment, ensures comfortable visual effects in different environments, adapts to personalized preferences, and conveniently adjusts the brightness of the monitor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119274503A_ABST
    Figure CN119274503A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a brightness adjusting method and device, equipment and a medium. The method specifically comprises the following steps: acquiring related information of a display; the related information comprises equipment information of the display, driving information corresponding to the display and brightness adjusting mode information corresponding to the display; when the device file catalog exists and is not empty, representing that the display supports a brightness adjustment mode corresponding to the device file catalog; receiving a brightness adjustment request; obtaining adjustment basis information corresponding to the target display from the display object; the types of the adjustment basis information comprise brightness adjustment mode information and / or driving information; adjusting the brightness of the target display according to the adjustment basis information; and under the condition that the display object does not contain the adjustment basis information corresponding to the target display, performing brightness adjustment of the target display according to the gamma correction mode. According to the embodiment of the invention, the effectiveness and success rate of brightness adjustment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of display control technology, and in particular to a brightness adjustment method, device, equipment and medium. Background Art

[0002] A display is a tool that can display electronic files on the screen through corresponding transmission devices. When using a display, the user's eyes are sensitive to the brightness of the surrounding environment, especially sudden changes in brightness will have adverse effects on the user's vision. In order to achieve the most comfortable visual effect, the user needs to adjust the brightness of the display according to changes in the environment.

[0003] There are many brightness adjustment methods at present, such as brightness adjustment method based on DDC (Display Data Channel) or brightness adjustment method based on ACPI (Advanced Configuration and Power Interface).

[0004] However, in actual applications, the effectiveness and availability of brightness adjustment methods are affected by many factors. For example, the availability of DDC-based brightness adjustment methods depends on the display connection interface and the specifications supported by the display. 2 If the display interface implements the IC (Inter-Integrated Circuit Bus) protocol, the DDC-based brightness adjustment method cannot be used. 2 C protocol, but if the display does not support the MCCS (Monitor Control Command Set) specification, the DDC-based brightness adjustment method will not work either. Summary of the invention

[0005] The embodiment of the present application provides a brightness adjustment method, which can improve the effectiveness and success rate of brightness adjustment.

[0006] Correspondingly, the embodiments of the present application also provide a brightness adjustment device, an electronic device and a machine-readable medium to ensure the implementation and application of the above method.

[0007] In order to solve the above problems, the embodiment of the present application discloses a brightness adjustment method, the method comprising:

[0008] Using a hardware detection tool, a command line tool and a device file directory, obtain relevant information of the display; the relevant information includes: device information of the display, driver information corresponding to the display, and brightness adjustment mode information corresponding to the display; wherein, if the device file directory exists and is not empty, it indicates that the display supports the brightness adjustment mode corresponding to the device file directory, and the corresponding brightness adjustment mode information is successfully obtained;

[0009] Save the relevant information of the display to the display object;

[0010] Receiving a brightness adjustment request; the brightness adjustment request includes: a target display to be adjusted;

[0011] Acquire adjustment basis information corresponding to the target display from the display object; the types of the adjustment basis information include: brightness adjustment mode information and / or driving information;

[0012] According to the adjustment basis information, adjusting the brightness of the target display;

[0013] When the display object does not include the adjustment basis information corresponding to the target display, the brightness of the target display is adjusted according to the gamma correction method.

[0014] The embodiment of the present application also discloses a brightness adjustment device, the device comprising:

[0015] An information acquisition module, used to acquire relevant information of the display by using a hardware detection tool, a command line tool and a device file directory; the relevant information includes: device information of the display, driver information corresponding to the display, and brightness adjustment mode information corresponding to the display; wherein, if the device file directory exists and is not empty, it indicates that the display supports the brightness adjustment mode corresponding to the device file directory, and the corresponding brightness adjustment mode information is successfully acquired;

[0016] An information saving module, used to save the relevant information of the display into the display object;

[0017] A request receiving module, configured to receive a brightness adjustment request; the brightness adjustment request includes: a target display to be adjusted;

[0018] A basis information acquisition module is used to acquire adjustment basis information corresponding to the target display from the display object; the types of the adjustment basis information include: brightness adjustment mode information and / or driving information;

[0019] A first brightness adjustment module, used for adjusting the brightness of the target display according to the adjustment basis information;

[0020] The second brightness adjustment module is used to adjust the brightness of the target display according to the gamma correction method when the display object does not contain the adjustment basis information corresponding to the target display.

[0021] Optionally, according to a preset priority, the adjustment basis information corresponding to the target display is obtained from the display object; the preset priority includes: a first priority corresponding to the brightness adjustment mode information and the driving information;

[0022] The information acquisition module comprises:

[0023] a first information acquisition module, configured to acquire target brightness adjustment mode information corresponding to the target display from the display object if the first priority corresponding to the brightness adjustment mode information is higher than the first priority corresponding to the driving information, and acquire target driving information corresponding to the target display from the display object if the target brightness adjustment mode information corresponding to the target display is not included in the display object; or

[0024] The second is an information acquisition module, which is used to obtain the target driving information corresponding to the target display from the display object if the first priority corresponding to the brightness adjustment method information is lower than the first priority corresponding to the driving information, and to obtain the target brightness adjustment method information corresponding to the target display from the display object if the target driving information corresponding to the target display is not included in the display object.

[0025] Optionally, the preset priority level further includes: second priorities respectively corresponding to a plurality of brightness adjustment mode information, and / or third priorities respectively corresponding to a plurality of driving information.

[0026] Optionally, the device further comprises:

[0027] The supplementary adjustment module is used to perform supplementary brightness adjustment of the target display according to a gamma correction method after monitoring a brightness change event of the target display if the adjusted brightness value of the target display does not meet a preset condition.

[0028] Optionally, the adjustment basis information is target driving information, and the first brightness adjustment module includes:

[0029] A component determination loading module, used to determine and load a brightness adjustment component connected to the display driver according to the target driver information;

[0030] The function calling module is used to call the brightness adjustment function provided by the brightness adjustment component according to the display service to achieve brightness adjustment of the target display.

[0031] Optionally, the brightness adjustment request further includes: a target brightness value of a target display;

[0032] The adjustment basis information includes: first brightness adjustment mode information and second brightness adjustment mode information; the first brightness adjustment mode information corresponds to a first brightness range [a, b] and a first step length s1, and the second brightness adjustment mode information corresponds to a second brightness range [c, d] and a second step length s2; b and d are both greater than the source brightness value; d is not less than the target brightness value; the first step length s1 is greater than the second step length s2;

[0033] The first brightness adjustment module includes:

[0034] A first adjustment module, configured to adjust the brightness value of the target display from the source brightness value to b using the first brightness adjustment mode information;

[0035] The second adjustment module is used to adjust the brightness value of the target display from b to the target brightness value by using the second brightness adjustment mode information.

[0036] Optionally, the target display includes: a first display and a second display; the first display corresponds to a third brightness range, and the second display corresponds to a fourth brightness range;

[0037] The device also includes:

[0038] An intersection calculation module, used for calculating the intersection of the third brightness range and the fourth brightness range to obtain a target brightness range;

[0039] A prompting module, configured to prompt a user of the target brightness range, so that the user determines a target brightness value of the target display within the target brightness range;

[0040] The target brightness value adjustment module is used to adjust the target brightness value to within the target brightness range when the target brightness value of the target display is not within the target brightness range.

[0041] Optionally, the information acquisition module includes:

[0042] A first acquisition module, configured to acquire relevant information of the display using at least one hardware detection tool to obtain a first acquisition result;

[0043] A second acquisition module, used to acquire relevant information of the display using at least one command line tool to obtain a second acquisition result;

[0044] A third acquisition module, used to acquire relevant information of the display by using at least one device file directory to obtain a third acquisition result;

[0045] A fusion module is used to fuse the first acquisition result, the second acquisition result and the third acquisition result to obtain relevant information of the display.

[0046] The embodiment of the present application further discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes the method described in the embodiment of the present application.

[0047] The embodiment of the present application further discloses a machine-readable medium on which executable code is stored. When the executable code is executed, a processor executes the method described in the embodiment of the present application.

[0048] The embodiments of the present application include the following advantages:

[0049] In the technical solution of the embodiment of the present application, the hardware detection tool, the command line tool and the device file directory are used to obtain the relevant information of the display, and the relevant information of the display is saved in the display object. In this way, when a brightness adjustment request is received, the adjustment basis information corresponding to the target display can be obtained from the above display object, and the brightness of the above target display can be adjusted according to the above adjustment basis information; further, when the above display object does not contain the adjustment basis information corresponding to the above target display, the brightness of the above target display can also be adjusted according to the gamma correction method.

[0050] First, the embodiment of the present application uses three acquisition means, namely hardware detection tool, command line tool and device file directory, to acquire relevant information of the display. The above three acquisition means realize the diversity of sources of relevant information, thereby improving the accuracy and comprehensiveness of relevant information.

[0051] Secondly, the embodiment of the present application uses a display object to save relevant information of the display. The above-mentioned relevant information specifically includes: device information of the display, driver information corresponding to the display, and brightness adjustment method information corresponding to the display. Among them, when the above-mentioned device file directory exists and is not empty, it indicates that the display supports the brightness adjustment method corresponding to the above-mentioned device file directory, and the corresponding brightness adjustment method information is successfully obtained; in this way, the brightness adjustment method information saved in the display object represents the brightness adjustment method that the display can support. Similarly, the driver information saved in the display object also represents the brightness adjustment component that the display can support.

[0052] Based on the fact that the brightness adjustment method information saved in the display object represents the brightness adjustment method that the display can support, and the driving information saved in the display object represents the brightness adjustment component that the display can support, the embodiment of the present application obtains the adjustment basis information corresponding to the target display from the above-mentioned display object when receiving a brightness adjustment request, and performs brightness adjustment of the above-mentioned target display according to the above-mentioned adjustment basis information, and can realize the brightness adjustment of the target display by using the brightness adjustment method and / or brightness adjustment component supported by the target display. Therefore, the embodiment of the present application can improve the effectiveness and success rate of brightness adjustment.

[0053] Furthermore, if the display object does not contain the adjustment basis information corresponding to the target display, it means that the brightness adjustment method and / or brightness adjustment component supported by the target display does not exist. In this case, the brightness of the target display is adjusted according to the gamma correction method, which can further improve the effectiveness and success rate of the brightness adjustment. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a flowchart of a brightness adjustment method according to an embodiment of the present application;

[0055] Figure 2 It is a schematic diagram of a processing flow of a brightness adjustment method under a Linux system according to an embodiment of the present application;

[0056] Figure 3 This is a flowchart of a method for adjusting brightness under a Linux system according to an embodiment of the present application;

[0057] Figure 4 is a structural schematic diagram of a brightness adjustment device according to an embodiment of the present application;

[0058] Figure 5 It is a schematic diagram of the structure of a device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0060] The brightness adjustment method of the embodiment of the present application can be used to adjust the brightness of the display to meet the user's needs for comfortable vision under different ambient light conditions, adapting to personalized preferences, and conveniently adjusting the brightness of the display.

[0061] There are many brightness adjustment methods at present, such as brightness adjustment method based on DDC or brightness adjustment method based on ACPI.

[0062] However, in actual applications, the effectiveness and availability of brightness adjustment methods are affected by many factors. For example, the availability of DDC-based brightness adjustment methods depends on the display connection interface and the specifications supported by the display. 2 C protocol, the DDC-based brightness adjustment method cannot be used. 2 C protocol, but if the display does not support the MCCS specification, the DDC-based brightness adjustment method will not work.

[0063] In view of the technical problem that the brightness adjustment method in the related art is of low effectiveness, the embodiment of the present application provides a brightness adjustment method, which specifically includes the following steps:

[0064] Use hardware detection tools, command line tools and device file directories to obtain relevant information about the display; the above-mentioned relevant information specifically includes: device information of the display, driver information corresponding to the display, and brightness adjustment method information corresponding to the display; wherein, if the above-mentioned device file directory exists and is not empty, it indicates that the display supports the brightness adjustment method corresponding to the above-mentioned device file directory, and the corresponding brightness adjustment method information is successfully obtained;

[0065] Save the relevant information of the display to the display object;

[0066] Receiving a brightness adjustment request; the brightness adjustment request includes: a target display to be adjusted;

[0067] Acquire adjustment basis information corresponding to the target display from the display object; the types of the adjustment basis information specifically include: brightness adjustment mode information and / or driving information;

[0068] According to the adjustment basis information, the brightness of the target display is adjusted;

[0069] In the case that the display object does not include the adjustment basis information corresponding to the target display, the brightness of the target display is adjusted according to the gamma correction method.

[0070] The embodiment of the present application uses hardware detection tools, command line tools and device file directories to obtain relevant information about the display, and saves the relevant information about the display into the display object. In this way, when a brightness adjustment request is received, the adjustment basis information corresponding to the target display can be obtained from the above display object, and the brightness of the above target display can be adjusted according to the above adjustment basis information; further, when the above display object does not contain the adjustment basis information corresponding to the above target display, the brightness of the above target display can also be adjusted according to the gamma correction method.

[0071] First, the embodiment of the present application uses three acquisition means, namely hardware detection tool, command line tool and device file directory, to acquire relevant information of the display. The above three acquisition means realize the diversity of sources of relevant information, thereby improving the accuracy and comprehensiveness of relevant information.

[0072] Secondly, the embodiment of the present application uses a display object to save the relevant information of the display. The display object can represent an instance of a data structure or class used in a computer system to store and manage the relevant information of the display.

[0073] The above-mentioned relevant information specifically includes: device information of the display, driver information corresponding to the display, and brightness adjustment method information corresponding to the display. Among them, if the above-mentioned device file directory exists and is not empty, it indicates that the display supports the brightness adjustment method corresponding to the above-mentioned device file directory, and the corresponding brightness adjustment method information is successfully obtained; in this way, the brightness adjustment method information saved in the display object represents the brightness adjustment method that the display can support. Similarly, the driver information saved in the display object also represents the brightness adjustment component that the display can support.

[0074] Based on the fact that the brightness adjustment method information saved in the display object represents the brightness adjustment method that the display can support, and the driving information saved in the display object represents the brightness adjustment component that the display can support, the embodiment of the present application obtains the adjustment basis information corresponding to the target display from the above-mentioned display object when receiving a brightness adjustment request, and performs brightness adjustment of the above-mentioned target display according to the above-mentioned adjustment basis information, and can realize the brightness adjustment of the target display by using the brightness adjustment method and / or brightness adjustment component supported by the target display. Therefore, the embodiment of the present application can improve the effectiveness and success rate of brightness adjustment.

[0075] Furthermore, if the display object does not contain the adjustment basis information corresponding to the target display, it means that the brightness adjustment method and / or brightness adjustment component supported by the target display does not exist. In this case, the brightness of the target display is adjusted according to the gamma correction method, which can further improve the effectiveness and success rate of the brightness adjustment.

[0076] Method Example 1

[0077] refer to Figure 1 , shows a schematic diagram of the steps of a brightness adjustment method according to an embodiment of the present application, the method specifically comprises the following steps:

[0078] Step 101, using a hardware detection tool, a command line tool and a device file directory to obtain relevant information of the display; the above-mentioned relevant information specifically includes: device information of the display, driver information corresponding to the display, and brightness adjustment mode information corresponding to the display; wherein, if the above-mentioned device file directory exists and is not empty, it indicates that the display supports the brightness adjustment mode corresponding to the above-mentioned device file directory, and the corresponding brightness adjustment mode information is successfully obtained;

[0079] Step 102, save the relevant information of the display into the display object;

[0080] Step 103: receiving a brightness adjustment request; the brightness adjustment request specifically includes: a target display to be adjusted;

[0081] Step 104: Acquire adjustment basis information corresponding to the target display from the display object; the adjustment basis information specifically includes: target brightness adjustment mode information and / or target drive information;

[0082] Step 105: adjusting the brightness of the target display according to the adjustment basis information;

[0083] Step 106: When the display object does not include the adjustment basis information corresponding to the target display, adjust the brightness of the target display according to the gamma correction method.

[0084] Figure 1 The steps included in the illustrated method embodiment may be performed by a client or a service. A service usually runs continuously in the background to provide specific functions or resources to one or more clients.

[0085] The service of the embodiment of the present application may be a brightness adjustment service. The brightness adjustment service usually runs continuously in the background, and is always ready to provide the specific function of brightness adjustment for multiple possible clients (such as different applications, display setting modules of operating systems, etc.). It is like a professional "server", waiting for brightness adjustment requests from clients. When a brightness adjustment request is received, the brightness adjustment service will respond quickly and perform the corresponding brightness adjustment operation according to the specific content of the request.

[0086] It can be understood that the client or service is only an example of the execution subject of the brightness adjustment method of the embodiment of the present application, and is not to be understood as an application limitation on the execution subject. Figure 1 The specific execution subject of the illustrated method embodiment is not limited.

[0087] The embodiments of the present application do not limit the specific operating system corresponding to the client or service. For example, the service of the embodiments of the present application can be applied to Unix-like operating systems such as Linux.

[0088] The brightness adjustment service of the embodiment of the present application can provide three different interaction modes, and the above interaction modes are used to receive brightness adjustment requests. In other words, the application can send a brightness adjustment request to the brightness adjustment service of the embodiment of the present application according to the above interaction modes.

[0089] One way of interaction is to provide an API (Application Programming Interface) library to facilitate other applications or services to call. For example, in a Linux system environment, the API library can be provided in the form of .so (Shared Object).

[0090] Another way of interaction is to provide an IPC (Inter-Process Communication) mechanism for access control by other applications.

[0091] Another interactive method is to provide a command tool to facilitate users in a non-GUI (Graphical User Interface) environment to perceive and adjust the brightness of the display.

[0092] It can be understood that those skilled in the art can determine the required interaction method according to actual application requirements, and the embodiments of the present application do not limit the specific interaction method.

[0093] The brightness adjustment service of the embodiment of the present application may have the processing capability of multiple brightness adjustment means. If the target display supports a certain brightness adjustment means, the brightness adjustment service may use this brightness adjustment means to adjust the brightness of the target display. Of course, if the target display supports multiple brightness adjustment means, the brightness adjustment service may use any one or a combination of the multiple brightness adjustment means to adjust the brightness of the target display.

[0094] The above-mentioned multiple brightness adjustment means specifically include: a first brightness adjustment means corresponding to the brightness adjustment mode information, a second brightness adjustment means corresponding to the driving information and a third brightness adjustment means corresponding to the gamma correction mode.

[0095] The first brightness adjustment means specifically includes: a brightness adjustment means based on DDC, or a brightness adjustment means based on ACPI, etc.

[0096] DDC is a communication method between the display and the host system, mainly used for the display to inform the personal computer of its display information, such as resolution, scanning frequency, etc. Its main purpose is to achieve plug-and-play function and simplify the connection and configuration process of the device. The DDC channel follows I 2The transmitter reads the E-EDID (Enhanced Extended Display Identification Data) data of the receiver through the DDC channel to obtain the configuration information of the receiver and determine the audio and video data transmission format between the transmitter and the receiver accordingly.

[0097] ACPI is used to provide operating systems and applications with interfaces for managing all power management, including various software and hardware specifications.

[0098] The second brightness adjustment means corresponding to the driving information determines and loads a brightness adjustment component connected to the display driver; and according to the display service, calls a brightness adjustment function provided by the brightness adjustment component to achieve brightness adjustment of the target display.

[0099] Gamma correction is a technique used to adjust the brightness and contrast of an image. In a display system, the gamma value reflects the nonlinear relationship between the input signal and the output brightness. From a physical point of view, the brightness output of a display device (such as a monitor, projector, etc.) is usually not linearly related to the input signal. Without gamma correction, the image may have areas that are too dark or too bright, with inappropriate contrast and unclear details. In terms of brightness adjustment, the overall brightness perception of the image can be changed by adjusting the gamma value. A lower gamma value will brighten the image, and a higher gamma value will darken the image.

[0100] One purpose of an embodiment of the present application is to use a brightness adjustment means supported by the target display to adjust the brightness of the target display without limiting the specific brightness adjustment means.

[0101] In step 101, the embodiment of the present application uses three acquisition methods, namely, a hardware detection tool, a command line tool, and a device file directory, to acquire relevant information of the display.

[0102] The device information in the above-mentioned relevant information specifically includes: display model, display resolution, display size, display refresh rate, manufacturer information, connection interface and brightness information, etc. Among them, the brightness information specifically includes: current brightness value or brightness range. Among them, the brightness range refers to the interval from the minimum brightness value to the maximum brightness value that the display can display.

[0103] The driver information in the above related information specifically includes: driver version information, supported operating systems, functional feature support and hardware compatibility information. Among them, functional feature support specifically includes: multi-monitor configuration: if the operating system is connected to multiple monitors, the driver may support specific multi-monitor settings, such as extended mode, mirror mode, etc.

[0104] Among them, hardware detection tools can deeply explore the physical characteristics and hardware parameters of the display, laying the foundation for a comprehensive understanding of the display's performance. For example, hw-probe (hardware probe) is a powerful hardware detection tool that can detect device information such as graphics card model and manufacturer.

[0105] The command line tool, with its powerful instruction set and flexible operation mode, obtains various key information about the display from the system level, such as connection status, driver status, etc. For example, lshw (Hardware Lister) is a command line tool for listing hardware information.

[0106] For example, lspci (list PCI) is a command-line tool used to display information about all PCI (Peripheral Component Interconnect) devices in the system. Xrandr (X Resize, Rotate and Reflect Extension) is a command-line tool used to configure display devices, mainly used in the X Window System environment.

[0107] Checking the device file directory provides a direct basis for determining the specific brightness adjustment method supported by the display.

[0108] Examples of device file directories include:

[0109] / sys / class / drm / : This is a directory used to manage display devices in Linux. This directory contains various information files and subdirectories related to display devices. For example, there may be device files for specific display controllers. By reading these files, you can get detailed properties of the device, such as manufacturer information, device model, supported resolution range, etc.

[0110] / sys / class / backlight / : is a directory used to manage the backlight of display devices in the Linux system.

[0111] / dev / I 2 C*: Device file directories are usually used to communicate with I 2 C bus protocol to communicate with hardware devices.

[0112] The combination of the above three acquisition methods greatly improves the comprehensiveness of the acquired display-related information, provides solid data support for subsequent accurate and efficient brightness adjustment, and ensures that the display characteristics can be accurately obtained in various complex usage scenarios, thereby selecting the most appropriate brightness adjustment method.

[0113] In the embodiment of the present application, when the above-mentioned device file directory exists and is not empty, it indicates that the display supports the brightness adjustment method corresponding to the above-mentioned device file directory, and the corresponding brightness adjustment method information is successfully obtained.

[0114] In a specific implementation, it is possible to first determine whether the device file directory exists. If the device file directory exists, it is possible to determine whether the device file directory is empty. If the device file directory is not empty, the corresponding brightness adjustment method information can be successfully obtained. Specifically, it is possible to determine whether the directory is empty by obtaining a file list in the device file directory and checking its length.

[0115] For example, in the Linux system environment, the principle of ACPI-based brightness adjustment is: the Linux kernel exposes the device class interface / sys / class / backlight to the user space through sysfs (system filesystem) to adjust the display backlight. Therefore, if the / sys / class / backlight / directory exists and is not empty, it can be considered that the corresponding display supports ACPI-based brightness adjustment.

[0116] For example, in the Linux system environment, the principle of the brightness adjustment method based on DDC is: the DDC communication protocol is transmitted via I 2 C bus interacts with the display to achieve brightness adjustment. The display driver that implements the DDC communication protocol will create a file called / dev / I 2 C* device, the brightness can be adjusted by reading and writing to this device. 2 If the C* device file directory exists and is not empty, it can be considered that the corresponding display supports DDC-based brightness adjustment.

[0117] In a specific implementation, the process of obtaining the relevant information of the display by using the hardware detection tool, the command line tool and the device file directory may specifically include:

[0118] Step A1: using at least one hardware detection tool to obtain relevant information of the display to obtain a first acquisition result;

[0119] Step A2: using at least one command line tool to obtain relevant information of the display to obtain a second acquisition result;

[0120] Step A3, using at least one device file directory to obtain relevant information of the display to obtain a third acquisition result;

[0121] Step A4: merge the first acquisition result, the second acquisition result and the third acquisition result to obtain relevant information of the display.

[0122] The process of fusing the first acquisition result, the second acquisition result and the third acquisition result in the embodiment of the present application specifically includes: obtaining the union of the subsets corresponding to the first acquisition result, the second acquisition result and the third acquisition result respectively, and the obtained union may include relevant information of the display.

[0123] In addition to finding the union of the subsets corresponding to the first acquisition result, the second acquisition result, and the third acquisition result, the subsets corresponding to the first acquisition result, the second acquisition result, and the third acquisition result can also be removed and mutually verified. It can be understood that one purpose of the embodiment of the present application is to comprehensively collect relevant information of the display from multiple dimensions and different levels, without limiting the specific fusion process.

[0124] In step 102, the embodiment of the present application uses a display object to save relevant information of the display.

[0125] A display object may represent an instance of a data structure or class used in a computer system to store and manage information related to a display. Different displays may correspond to different display objects. For example, a first display corresponds to a first display object, and a second display corresponds to a second display object. Different displays may be distinguished based on device information such as display model.

[0126] In step 103, any of the three interaction modes described above may be used to receive a brightness adjustment request sent by a user or client. The brightness adjustment request specifically includes: a target display to be adjusted. Specifically, the brightness adjustment may include: information such as the display model and target brightness value of the target display.

[0127] The target brightness value refers to a specific value to which the user or client desires to adjust the brightness of the target display in a brightness adjustment request.

[0128] The target brightness value is usually expressed in brightness units such as nits. The target brightness value reflects the user's specific requirements for the display brightness and may be set based on different usage scenarios and personal preferences.

[0129] For example, in a dimly lit environment, the user may want to set the target display brightness value to a lower value, such as 100 nits, to reduce eye stimulation and fatigue; whereas in a bright environment, to ensure that the content on the display is clearly visible, the user may set the target brightness value to a higher value, such as 300 nits.

[0130] In step 104, the adjustment basis information corresponding to the target display is obtained from the display object; the adjustment basis information specifically includes: target brightness adjustment mode information and / or target driving information.

[0131] Since the brightness adjustment method information saved in the display object represents the brightness adjustment methods that the display can support, and the driving information saved in the display object also represents the brightness adjustment components that the display can support; thus, when the embodiment of the present application receives a brightness adjustment request, the adjustment basis information corresponding to the target display obtained from the above-mentioned display object represents the brightness adjustment methods and / or brightness adjustment components that the target display can support.

[0132] In a specific implementation, the adjustment basis information corresponding to the target display may be obtained from the above display object according to a preset priority.

[0133] The preset priority of the embodiment of the present application can be determined by the user or a person skilled in the art. The preset priority can be recorded in a policy file.

[0134] The embodiment of the present application can provide the following technical solution for obtaining the adjustment basis information corresponding to the target display from the above display object:

[0135] Technical solution 1,

[0136] In technical solution 1, the preset priority specifically includes: a first priority corresponding to the brightness adjustment mode information and the driving information;

[0137] The process of obtaining the adjustment basis information corresponding to the target display from the display object specifically includes:

[0138] Step B1: if the first priority corresponding to the brightness adjustment mode information is higher than the first priority corresponding to the driving information, then obtaining the target brightness adjustment mode information corresponding to the target display from the display object, and if the display object does not contain the target brightness adjustment mode information corresponding to the target display, then obtaining the target driving information corresponding to the target display from the display object; or

[0139] Step B2: If the first priority corresponding to the brightness adjustment method information is lower than the first priority corresponding to the driving information, the target driving information corresponding to the target display is obtained from the display object, and if the display object does not contain the target driving information corresponding to the target display, the target brightness adjustment method information corresponding to the target display is obtained from the display object.

[0140] For step B1, if the first priority corresponding to the brightness adjustment mode information is higher than the first priority corresponding to the driving information, the target brightness adjustment mode information corresponding to the target display can be first obtained from the display object. If the target brightness adjustment mode information is successfully obtained, the target brightness adjustment mode information can be used as the adjustment basis information, and step 105 is executed.

[0141] If the target brightness adjustment mode information is not obtained, it means that the display object does not contain the target brightness adjustment mode information corresponding to the target display. In this case, the target drive information corresponding to the target display can be obtained from the display object. It can be understood that the acquisition result of the target drive information may include: acquisition success or acquisition failure. If the target drive information is successfully acquired, the target drive information can be used as the adjustment basis information and step 105 is executed. If the target drive information is not acquired, step 106 can be executed.

[0142] For step B2, if the first priority corresponding to the brightness adjustment mode information is lower than the first priority corresponding to the driving information, the target driving information corresponding to the target display can be first obtained from the display object. If the target driving information is successfully obtained, the target driving information can be used as the adjustment basis information, and step 105 is executed.

[0143] If the target drive information is not obtained, it means that the display object does not contain the target drive information corresponding to the target display. In this case, the target adjustment mode information corresponding to the target display can be obtained from the display object. It can be understood that the acquisition result of the target adjustment mode information may include: acquisition success or acquisition failure. If the target adjustment mode information is successfully obtained, the target adjustment mode information can be used as the adjustment basis information, and step 105 is executed. If the target adjustment mode information is not obtained, step 106 can be executed.

[0144] Technical solution 2,

[0145] In technical solution 2, the preset priority may also include: second priorities corresponding to a plurality of brightness adjustment mode information, and / or third priorities corresponding to a plurality of driving information.

[0146] For example, a plurality of brightness adjustment mode information specifically includes: first brightness adjustment mode information and second brightness adjustment mode information. Among them, the first brightness adjustment mode information corresponds to a brightness adjustment method based on DDC, and the second brightness adjustment mode information corresponds to a brightness adjustment method based on ACPI. Users or technical personnel in this field can determine the second priority between the first brightness adjustment mode information and the second brightness adjustment mode information according to actual application requirements. For example, the second priority may include: the second priority of the first brightness adjustment mode information is higher than the second brightness adjustment mode information, or the second priority of the first brightness adjustment mode information is lower than the second brightness adjustment mode information, or the first brightness adjustment mode information and the second brightness adjustment mode information have the same priority, etc.

[0147] In the case where the priority of the first brightness adjustment mode information and the second brightness adjustment mode information is the same, the adjustment basis information of the embodiment of the present application may include: the first brightness adjustment mode information and the second brightness adjustment mode information; the first brightness adjustment mode information corresponds to the first brightness range [a, b] and the first step length s1, and the second brightness adjustment mode information corresponds to the second brightness range [c, d] and the second step length s2. a, b, c, d, s1 and s2 can be positive real numbers. Among them, the first brightness range [a, b] and the second brightness range [c, d] have an intersection, a<c<b, d>b.

[0148] Assuming that b and d are both greater than the source brightness value; d is not less than the target brightness value; and the first step length s1 is greater than the second step length s2, the first brightness adjustment method information and the second brightness adjustment method information can be used in combination to adjust the brightness of the target display. Accordingly, when the brightness value is increased (that is, the target brightness value is greater than the source brightness value), the process of adjusting the brightness of the target display according to the above adjustment basis information specifically includes: using the first brightness adjustment method information to adjust the brightness value of the target display from the source brightness value to b; using the second brightness adjustment method information to adjust the brightness value of the target display from b to the target brightness value. The source brightness value can represent the brightness value of the target display before the brightness adjustment.

[0149] The embodiment of the present application first uses the first brightness adjustment mode information to quickly make the brightness value of the target display close to the target brightness value. Since the first step length of the first brightness adjustment mode is relatively large (s1>s2), the brightness value of the target display can be quickly made close to the target brightness value when the difference between the source brightness value and the target brightness value is relatively large. For example, when adjusting from a lower source brightness value to a higher target brightness value, the first brightness adjustment mode information can quickly increase the brightness, save adjustment time, and improve adjustment efficiency.

[0150] The embodiment of the present application then uses the second brightness adjustment method information to accurately adjust the brightness. The second brightness adjustment method with a smaller second step size can be finely adjusted when approaching the target brightness value, so that the final brightness value accurately reaches the target brightness value. The above-mentioned step-by-step adjustment method avoids the problem of too long adjustment time or difficulty in accurately reaching the target brightness value due to inappropriate step size of a single adjustment method.

[0151] Assuming that b and d are both smaller than the source brightness value; a is not greater than the target brightness value; and the first step length s1 is smaller than the second step length s2, the first brightness adjustment method information and the second brightness adjustment method information can be used in combination to adjust the brightness of the target display. Accordingly, when the brightness value is adjusted down (that is, the target brightness value is smaller than the source brightness value), the process of adjusting the brightness of the target display according to the above adjustment basis information specifically includes: using the second brightness adjustment method information to adjust the brightness value of the target display from the source brightness value to c; using the first brightness adjustment method information to adjust the brightness value of the target display from c to the target brightness value.

[0152] The various driving information of the embodiment of the present application may include: various brightness adjustment components, etc. A user or a person skilled in the art may determine the third priority among the various driving information according to actual application requirements. It is understood that the embodiment of the present application does not limit the specific third priority.

[0153] In step 105, the brightness of the target display is adjusted according to the adjustment basis information. The brightness adjustment of the target display may be performed by using a brightness adjustment method and / or a brightness adjustment component supported by the target display.

[0154] In one implementation, when the adjustment basis information is the first brightness adjustment mode information, the first brightness adjustment mode information may specifically be: directory information of the first device file corresponding to the target display. For example, in a Linux system environment, the directory information of the first device file may specifically be: / dev / I 2 C* device file directory information. Among them, according to the display model of the target display, you can get / dev / I 2 C* device file information.

[0155] In this way, the brightness adjustment of the target display can be implemented based on the read and write operations of the first device file directory information. Specifically, the brightness value of the target display can be adjusted from the source brightness value to the target brightness value according to the first step length. Among them, one first step length can correspond to an MCCS (Monitor Control Command Set) instruction. Specifically, the MCCS instruction related to brightness adjustment can be written in the first device file.

[0156] In another implementation, when the adjustment basis information is the second brightness adjustment mode information, the second brightness adjustment mode information may specifically be: directory information of the second device file corresponding to the target display. For example, in a Linux system environment, the directory information of the second device file is specifically: / sys / class / backlight. According to the display model of the target display, the information of the / sys / class / backlight device file may be obtained from the target display object corresponding to the display model.

[0157] In this way, the brightness of the target display can be adjusted based on the read and write operations of the second device file directory information. Specifically, the brightness value of the target display can be adjusted from the source brightness value to the target brightness value according to the second step length. Specifically, adjustment instructions related to brightness adjustment can be written in the second device file.

[0158] In another implementation, the adjustment basis information is target drive information, and the process of adjusting the brightness of the target display based on the adjustment basis information specifically includes: determining and loading a brightness adjustment component connected to the display driver based on the target drive information; and calling a brightness adjustment function provided by the brightness adjustment component based on the display service to implement brightness adjustment of the target display.

[0159] The target driver information may include: the name and version number of the display driver, etc. The brightness adjustment component is a module or part of the display driver that provides a display brightness adjustment function.

[0160] The display service may include: Xorg / x11, or Wayland, etc. It is understandable that the embodiment of the present application does not limit the specific display service.

[0161] Among them, Xorg / x11 is an open source implementation of the X Window System and a widely used graphical interface service in Linux systems. It provides a graphical interface and supports a variety of graphics hardware, including graphics cards, controllers, expansion cards, monitors, drawing boards, scanners and other input and output devices.

[0162] Wayland is a graphics display protocol under the Linux system, which aims to provide safer, more efficient, more modern and more flexible graphics display services.

[0163] In one implementation, the second brightness adjustment means corresponding to the driving information can, with the help of the DRM (Direct Rendering Manager) access and configuration rights provided by the display service, call the brightness adjustment function provided by the brightness adjustment component to achieve the brightness adjustment of the target display. With the help of the DMS access and configuration rights, the brightness adjustment service can adjust the brightness of the target display directly through the brightness adjustment function provided by the brightness adjustment component through input and output control.

[0164] In another implementation, the second brightness adjustment means corresponding to the driving information can call the brightness adjustment function provided by the brightness adjustment component with the help of the display service to achieve the brightness adjustment of the target display. The brightness adjustment service can pass the brightness adjustment request and the information of the brightness adjustment function to the display service, and the display service will send a brightness adjustment instruction to the KMS. After receiving the brightness adjustment instruction of the display service, the KMS will pass the brightness adjustment instruction to the brightness adjustment function provided by the graphics card driver. The graphics card driver will adjust the signal strength of the graphics card output according to the brightness adjustment instruction, thereby changing the brightness of the display.

[0165] In Linux systems, display services can use KMS (Kernel Mode Setting) to adjust brightness.

[0166] Among them, KMS is a mechanism in the Linux kernel for controlling graphics hardware. It interacts directly with graphics hardware such as graphics cards and is responsible for setting parameters such as resolution, refresh rate, and display mode. For brightness adjustment, KMS can affect the brightness of the display by controlling the signal strength output by the graphics card. KMS provides a set of kernel interfaces that allow display services to communicate with the kernel to set and obtain the status of graphics hardware. Display services can send brightness adjustment instructions to the kernel through these interfaces and obtain the current brightness settings.

[0167] The brightness adjustment instruction may be an instruction corresponding to a step size, used to reduce or increase the brightness value of the target display by a step size. A brightness adjustment request may contain one or more brightness adjustment instructions. Assuming the step size is 10 brightness units (assuming the brightness range is 0-255), when the current brightness value is 120 brightness units, a brightness adjustment instruction for reducing the brightness will cause the brightness value to become 110 brightness units.

[0168] In summary, when the brightness needs to be adjusted, the display service will send a brightness adjustment command to KMS. After receiving the brightness adjustment command from the display service, KMS will pass this brightness adjustment command to the brightness adjustment function provided by the graphics card driver. The graphics card driver will adjust the signal strength output by the graphics card according to the brightness adjustment command, thereby changing the brightness of the display.

[0169] It should be noted that as the first process called in user mode, the display service is regarded as the DRM-master. In this way, the display service has the DRM authority when interacting with DRM. Among them, DRM is responsible for managing the allocation and access control of graphics hardware resources. The interaction between the display service and DRM can avoid conflicts between brightness adjustment operations and other graphics-related processes, and improve the stability and security of brightness adjustment.

[0170] In summary, the process of adjusting the brightness of the target display according to the adjustment basis information specifically includes: the display service sends a brightness adjustment instruction to the KMS, and the KMS passes the brightness adjustment instruction to the graphics card driver, and the graphics card driver adjusts the signal strength output by the graphics card according to the brightness adjustment instruction, thereby changing the brightness of the display.

[0171] In step 106, when the display object does not contain the adjustment basis information corresponding to the target display, the brightness of the target display is adjusted according to a gamma correction method, wherein the gamma correction method adjusts the brightness of the target display based on the adjustment of the gamma value.

[0172] The principle of gamma correction is based on the human eye's perception of brightness. The human eye's perception of brightness is not linear, but follows an approximate power function relationship. Therefore, by performing a power function transformation on the pixel values ​​of the image, it can be closer to the visual perception of the human eye, thereby improving the visual effect of the image.

[0173] Gamma value is a nonlinear parameter used to describe the relationship between input value and output value. In gamma correction, a brightness curve corresponding to a power function formula is usually used to describe the relationship between input value (Iin) and output value (Iout): Iout = Iin^γ. Among them, γ is the gamma value. The input value represents the brightness value before adjustment. The output pixel value is the brightness value actually displayed on the display.

[0174] The size of the gamma value determines the direction of image brightness adjustment. When the gamma value is greater than 1, the dark details of the image will be expanded, while the bright details will be compressed, making the overall image darker; when the gamma value is less than 1, the bright details of the image will be expanded, while the dark details will be compressed, making the overall image brighter. Those skilled in the art can adjust the gamma value according to actual application requirements, and the embodiment of the present application does not limit the gamma value adjustment process.

[0175] In an optional implementation of the present application, the above method may further include: after monitoring a brightness change event of the target display, if the adjusted brightness value of the target display does not meet a preset condition, performing a supplementary brightness adjustment on the target display according to a gamma correction method.

[0176] The brightness change event of the target display may refer to a change in the brightness value of the target display. The brightness change event may be caused by brightness adjustment of the brightness adjustment service, for example, the brightness adjustment service performs brightness adjustment according to step 105. Alternatively, the brightness change event may be caused by brightness adjustment of a third-party application.

[0177] If the brightness change event is caused by brightness adjustment of the brightness adjustment service, the adjusted brightness value of the target display not meeting the preset condition may include: the adjusted brightness value of the target display not meeting the target brightness value.

[0178] If the above brightness change event is caused by the brightness adjustment of a third-party application, then the adjusted brightness value of the target display does not meet the preset condition may include: judging whether the adjusted brightness value of the target display meets the preset condition according to the preset step size in the policy file. The preset step size in the policy file is the adjustment step size expected by the user. The preset step size may be different from the first step size, the preset step size may be different from the second step size, and the preset step size may also be different from the third step size corresponding to the second brightness adjustment means. Assuming that the first step size is 5, the second step size is 10, and the third step size is 20, the preset step size may be 2. In other words, the accuracy of the preset step size may be less than the accuracy of the first step size, the second step size, or the third step size.

[0179] The embodiment of the present application can determine whether the adjusted brightness value of the target display can be divided by the preset step length. If so, it meets the preset condition, otherwise it does not meet the preset condition. For example, the adjusted brightness value is 85, the preset step length is 2, and it does not meet the preset condition.

[0180] According to the gamma correction method, the process of performing supplementary brightness adjustment on the target display specifically includes: using the adjusted brightness value as the input value of the brightness curve, using the target brightness value as the output value of the brightness curve, based on the fitting of the brightness curve, selecting a target gamma value for supplementary brightness adjustment from a plurality of gamma values, and setting the gamma value as the target gamma value.

[0181] Each gamma value corresponds to a brightness curve. The embodiment of the present application can determine the target gamma value based on the fitting between the adjusted brightness value, the target brightness value and the brightness curve.

[0182] It should be noted that if the above brightness change event is caused by brightness adjustment of the brightness adjustment service, the target brightness value may be specified by the user.

[0183] If the brightness change event is caused by the brightness adjustment of a third-party application, the target brightness value that is closest to the adjusted brightness value and meets the preset step length can be determined according to the preset step length. For example, if the adjusted brightness value is 85 and the preset step length is 2, the target brightness value can be 84 or 86. The difference between the target brightness value and the adjusted brightness value is the smallest, and the target brightness value can be divided by the preset step length.

[0184] The number of target displays in the embodiment of the present application may be multiple. Assume that the target display includes: a first display and a second display; further assume that the first display corresponds to the third brightness range and the second display corresponds to the fourth brightness range. In the case where the first display and the second display correspond to different manufacturers or display models, the third brightness range and the fourth brightness range may be different.

[0185] The above method may also include: finding the intersection of the third brightness range and the fourth brightness range to obtain a target brightness range; prompting the target brightness range to the user so that the user can determine the target brightness value of the target display within the target brightness range; and if the target brightness value of the target display is not within the target brightness range, adjusting the target brightness value to within the target brightness range.

[0186] The embodiment of the present application adjusts the target brightness value to within the target brightness range based on the prompt of the target brightness range and the adjustment of the target brightness value. This helps to maintain brightness consistency between multiple displays and avoids the situation where a display is too bright or too dark and affects the overall visual effect. In particular, in some scenarios with high requirements for visual consistency, such as design, video editing, etc., this prompt function and automatic adjustment function can improve work efficiency and quality.

[0187] In summary, the brightness adjustment method of the embodiment of the present application uses hardware detection tools, command line tools and device file directories to obtain relevant information of the display, and saves the relevant information of the display into the display object. In this way, when a brightness adjustment request is received, the adjustment basis information corresponding to the target display can be obtained from the above display object, and the brightness of the above target display can be adjusted according to the above adjustment basis information; further, when the above display object does not contain the adjustment basis information corresponding to the above target display, the brightness of the above target display can also be adjusted according to the gamma correction method.

[0188] First, the embodiment of the present application uses three acquisition means, namely hardware detection tool, command line tool and device file directory, to acquire relevant information of the display. The above three acquisition means realize the diversity of sources of relevant information, thereby improving the accuracy and comprehensiveness of relevant information.

[0189] Secondly, the embodiment of the present application uses a display object to save relevant information of the display. The above-mentioned relevant information specifically includes: device information of the display, driver information corresponding to the display, and brightness adjustment method information corresponding to the display. Among them, when the above-mentioned device file directory exists and is not empty, it indicates that the display supports the brightness adjustment method corresponding to the above-mentioned device file directory, and the corresponding brightness adjustment method information is successfully obtained; in this way, the brightness adjustment method information saved in the display object represents the brightness adjustment method that the display can support. Similarly, the driver information saved in the display object also represents the brightness adjustment component that the display can support.

[0190] Based on the fact that the brightness adjustment method information saved in the display object represents the brightness adjustment method that the display can support, and the driving information saved in the display object represents the brightness adjustment component that the display can support, the embodiment of the present application obtains the adjustment basis information corresponding to the target display from the above-mentioned display object when receiving a brightness adjustment request, and performs brightness adjustment of the above-mentioned target display according to the above-mentioned adjustment basis information, and can realize the brightness adjustment of the target display by using the brightness adjustment method and / or brightness adjustment component supported by the target display. Therefore, the embodiment of the present application can improve the effectiveness and success rate of brightness adjustment.

[0191] Furthermore, if the display object does not contain the adjustment basis information corresponding to the target display, it means that the brightness adjustment method and / or brightness adjustment component supported by the target display does not exist. In this case, the brightness of the target display is adjusted according to the gamma correction method, which can further improve the effectiveness and success rate of the brightness adjustment.

[0192] Method Example 2

[0193] refer to Figure 2 , shows a schematic diagram of the processing flow of a brightness adjustment method under a Linux system according to an embodiment of the present application. The Linux system may include: user space, kernel space, and hardware device space.

[0194] In the Linux system architecture, user space is the part corresponding to kernel space, which provides a relatively independent and protected execution environment for applications and services.

[0195] The hardware space may include: a mainboard and a display, wherein the mainboard may be provided with an advanced configuration and power supply interface.

[0196] The kernel space may include: a first device file, a second device file and a direct rendering manager. The direct rendering manager may further include: a kernel mode setting.

[0197] User space can include: display service and brightness adjustment service. The brightness adjustment service is in user space, which means that it cannot directly access hardware resources, but interacts with kernel space through system calls and other methods to adjust parameters such as display brightness.

[0198] Figure 2 In the embodiment, the brightness adjustment service may specifically include the following modules: an external interaction module, a management module, a policy module, a DDC adaptation module, an ACPI adaptation module and a display driver adaptation module.

[0199] The external interaction module provides three interaction modes. The above three interaction modes are used to receive brightness adjustment requests sent by users or clients.

[0200] The management module is responsible for starting and running the brightness adjustment service, loading the external interaction module, policy module, DDC adapter module, ACPI adapter module and display driver adapter module, providing general tools, logs, etc., obtaining and monitoring the operating system's environmental parameters and events. Environmental parameters specifically include: EDID data, or display service information, etc. The above events specifically include: plug-in events, etc.

[0201] A policy module is used to determine adjustment basis information corresponding to a brightness adjustment request based on environmental parameters, policy files, and at least one of the number of displays and display characteristics, and send the adjustment basis information to any one or a combination of a DDC adapter module, an ACPI adapter module, and a display driver adapter module, so that any one or a combination of the DDC adapter module, the ACPI adapter module, and the display driver adapter module adjusts the brightness of a target display based on the adjustment basis information.

[0202] The DDC adapter module is used to adjust the brightness of the target display based on the read and write operations of the first device file when the adjustment basis information is the first brightness adjustment mode information. The first device file can be connected to the display to achieve the brightness adjustment of the target display.

[0203] The ACPI adapter module is used to adjust the brightness of the target display based on the read and write operations of the second device file when the adjustment basis information is the second brightness adjustment mode information. The second device file can be connected to the ACPI interface to implement the brightness adjustment of the target display based on the ACPI interface.

[0204] A display driver adaptation module is used to adapt different display driver implementation methods according to current environmental information when the adjustment basis information is the target drive information; or, when the above-mentioned display object does not contain the adjustment basis information corresponding to the above-mentioned target display, adjust the brightness of the above-mentioned target display according to the gamma correction method.

[0205] The different display driver implementations may include: display driver implementation A and display driver implementation B.

[0206] Among them, the display driver implementation mode A can call the brightness adjustment function provided by the brightness adjustment component with the help of the DRM access and configuration rights provided by the display service to achieve the brightness adjustment of the target display. With the help of the DMS access and configuration rights, the brightness adjustment service can adjust the brightness of the target display directly through the brightness adjustment function provided by the brightness adjustment component through input and output control.

[0207] Display driver implementation method B can call the brightness adjustment function provided by the brightness adjustment component with the help of the display service to achieve the brightness adjustment of the target display. The brightness adjustment service can pass the brightness adjustment request and the information of the brightness adjustment function to the display service, and the display service will send a brightness adjustment instruction to the KMS according to the brightness adjustment request. After receiving the brightness adjustment instruction of the display service, the KMS will pass this brightness adjustment instruction to the brightness adjustment function provided by the graphics card driver. The graphics card driver will adjust the signal strength of the graphics card output according to the brightness adjustment instruction, thereby changing the brightness of the display.

[0208] Figure 2In the embodiment, the display service sends a brightness adjustment instruction to the KMS based on the user space library. For example, Libdrm (The Library for Direct Rendering Manager) is a user space library for interacting with the kernel's DRM, providing a set of APIs for accessing and controlling graphics hardware and display devices. It is understood that the embodiments of the present application are not limited to specific user space libraries.

[0209] The display driver adaptation module has the function of setting the gamma value. When the display object does not contain the adjustment basis information corresponding to the target display, the gamma value setting function can be used to adjust the brightness of the target display.

[0210] refer to Figure 3 , shows a flowchart of a brightness adjustment method under a Linux system according to an embodiment of the present application. The method can be applied to a brightness adjustment service, and specifically includes the following steps:

[0211] Step 301, after startup, connect to display service according to environmental parameters;

[0212] After the brightness adjustment service is started, the environment parameters can be read. The environment parameters specifically include: information such as the name of the display service. If the name of the display service is Xorg, the display service Xorg can be connected. If the name of the display service is Wayland, the display service Wayland can be connected.

[0213] The embodiment of the present application can also determine whether the current display service is running normally, so as to confirm whether the display driver is loaded normally. If the current display service is running normally, the subsequent steps can be executed. If the current display service is not running normally, the brightness adjustment service can be exited.

[0214] Step 302: Obtain relevant information of the display using a hardware detection tool, a command line tool, and a device file directory;

[0215] In a specific implementation, it can be first determined whether the hardware detection tool, command line tool and device file directory are available. If they are available and can be accessed normally, relevant information of the display can be obtained.

[0216] For some hardware detection tools or command line tools, both the device information of the display and the driver information of the display can be obtained. It can be understood that the embodiments of the present application are not limited to specific hardware detection tools or command line tools.

[0217] It should be noted that, for the brightness adjustment means corresponding to APCI, if the corresponding second device file / sys / class / backlight exists and is not empty, it can be explained that the corresponding display supports the brightness adjustment means corresponding to APCI.

[0218] Similarly, for the brightness adjustment method corresponding to DDC, if the corresponding first device file / dev / I 2 If C* exists and is not empty, it means that the corresponding display supports the brightness adjustment method corresponding to DDC.

[0219] The embodiment of the present application can parse and store the acquisition results of each successfully run tool separately.

[0220] Furthermore, the information obtained by each tool can be compared one by one according to the master and slave device numbers, names, manufacturers, versions, dates, interface information, etc., so as to obtain a union to confirm all the relevant information of the display and match them one by one to the display based on the display model.

[0221] Step 303, save the relevant information of the display to the display object;

[0222] Step 304: monitor and process display events and service operation related events;

[0223] Service operation related events specifically include: forced stop, abnormal error and other signals related to service operation. When the brightness adjustment is about to exit, save the log, display configuration (configuration in the policy file, etc.), other service operation parameters and other preset data to keep the brightness adjustment service alive.

[0224] The display event mainly covers the hot plug and unplug of the display and abnormal loss. When a new display is added based on the display plug-in operation, the relevant information of the new display is obtained with the help of step 302. When the display is reduced due to the unplug operation of the display, the display objects of the reduced display need to be cleaned up, and the relevant configuration parameters of the reduced display, such as brightness range, policy files, etc., need to be properly saved.

[0225] Step 305: Load the brightness adjustment related modules;

[0226] The brightness adjustment related modules specifically include: a policy module, a DDC adaptation module, an ACPI adaptation module and a display driver adaptation module.

[0227] The DDC adapter module adjusts the brightness of the display based on the reading and writing of the first device file and the MCCS instruction.

[0228] The ACPI adapter module implements brightness adjustment of the display based on the reading and writing of the second device file.

[0229] The display driver adaptation module first determines the brightness adjustment component that needs to be loaded based on the driver information in the acquired display object. After the necessary interaction with the display service to obtain KMS access and configuration permissions, the brightness of the display is set by the brightness adjustment function directly implemented by the display driver through input and output control.

[0230] The display driver of the Linux system can include all open source implementations and some open source implementations. Among them, the display driver (mesa) implemented by reverse engineering is included in the all open source implementations. Therefore, the brightness adjustment component can adapt to different display drivers, and then implement the brightness adjustment functions corresponding to different display drivers to adjust the brightness.

[0231] The brightness adjustment component can also obtain brightness adjustment information such as the current brightness value, brightness range, and step length of the display, and write the above brightness adjustment information into the display object of the display.

[0232] The brightness adjustment component can also monitor brightness adjustment changes and send them to the event handling mechanism in the form of service internal events.

[0233] It should be noted that if the driver information corresponding to the display cannot be obtained in the display object, you can try to load the commonly used display driver and verify whether the commonly used display driver is valid through the corresponding function. If it is valid, you can obtain the brightness adjustment component corresponding to the commonly used display driver.

[0234] The display driver adaptation module can also adjust the brightness according to the related function of the gamma value setting provided by the display driver, so as to adjust the brightness when the above brightness adjustment means (the first brightness adjustment means and the second brightness adjustment means) fail.

[0235] The policy module can load a policy file. The policy file can be stored in JSON (JavaScript Object Notation) format. After the policy file is loaded, it is parsed by the policy module to obtain the policy information in the policy file.

[0236] The policy information may include: the priority between the first brightness adjustment means and the second brightness adjustment means, and the priority within the first brightness adjustment means or the second brightness adjustment means. The policy file may include: the step size of each brightness adjustment means.

[0237] The above strategy information can be used to calculate the adjustment step lengths within different brightness ranges within the brightness range of the display according to the gamma value, so as to better adapt to the human eye's perception of brightness.

[0238] The above strategy information can determine the calculation method of the brightness adjustment step under multiple adjustment methods, and realize dynamic adjustment of the brightness adjustment step by the proportion of one or several adjustment methods in different brightness adjustment ranges. In this case, the actual adjustment capability of the display will also be taken into consideration.

[0239] For example, the first brightness adjustment method information corresponds to the first brightness range [a, b] and the first step length s1, the second brightness adjustment method information corresponds to the second brightness range [c, d] and the second step length s2; b and d are both greater than the source brightness value; d is not less than the target brightness value; the first step length s1 is greater than the second step length s2; then the process of adjusting the brightness of the target display according to the adjustment basis information may include: using the first brightness adjustment method information to adjust the brightness value of the target display from the source brightness value to b; using the second brightness adjustment method information to adjust the brightness value of the target display from b to the target brightness value.

[0240] Step 306: In response to the brightness adjustment request, according to the policy information, call any one or a combination of the DDC adapter module, the ACPI adapter module and the display driver adapter module.

[0241] With the help of the event loop processing mechanism, the brightness adjustment service of the embodiment of the present application can respond to different external events quickly and accurately to achieve efficient, reliable and stable display brightness adjustment.

[0242] The embodiment of the present application can support a combination of multiple brightness adjustment means. Among them, after the brightness adjustment is performed using the DDC adapter module, the ACPI adapter module and the display driver adapter module, if the adjusted brightness value of the target display does not meet the preset conditions, the target display can be supplemented with brightness adjustment according to the gamma correction method.

[0243] When the client of the third-party application program adjusts the brightness of the display, any one of the DDC adapter module, the ACPI adapter module, and the display driver adapter module will sense the brightness change, send it to the event loop processing mechanism in the form of an internal event, and respond to the event. The process of responding to the event may include: determining whether the adjusted brightness value of the target display meets the preset conditions, and if not, performing supplementary brightness adjustment of the target display according to the gamma correction method.

[0244] The brightness adjustment service of the embodiment of the present application may also have service functions of logging, configuration, memory management, and inter-process communication.

[0245] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0246] Based on the above embodiment, this embodiment further provides a brightness adjustment device. Figure 4 As shown in the structural diagram, the device specifically includes: an information acquisition module 401, an information storage module 402, a request receiving module 403, an information acquisition module 404, a first brightness adjustment module 405 and a second brightness adjustment module 406.

[0247] The information acquisition module 401 is used to acquire relevant information of the display by using a hardware detection tool, a command line tool and a device file directory; the relevant information includes: device information of the display, driver information corresponding to the display, and brightness adjustment mode information corresponding to the display; if the device file directory exists and is not empty, it indicates that the display supports the brightness adjustment mode corresponding to the device file directory, and the corresponding brightness adjustment mode information is successfully acquired;

[0248] The information saving module 402 is used to save the relevant information of the display into the display object;

[0249] The request receiving module 403 is used to receive a brightness adjustment request; the brightness adjustment request includes: a target display to be adjusted;

[0250] The basis information acquisition module 404 is used to acquire the adjustment basis information corresponding to the target display from the display object; the types of the adjustment basis information include: brightness adjustment mode information and / or driving information;

[0251] A first brightness adjustment module 405, configured to adjust the brightness of the target display according to the adjustment basis information;

[0252] The second brightness adjustment module 406 is used to adjust the brightness of the target display according to the gamma correction method when the display object does not contain the adjustment basis information corresponding to the target display.

[0253] Optionally, according to a preset priority, the adjustment basis information corresponding to the target display is obtained from the display object; the preset priority includes: a first priority corresponding to the brightness adjustment mode information and the driving information;

[0254] The information acquisition module comprises:

[0255] a first information acquisition module, configured to acquire target brightness adjustment mode information corresponding to the target display from the display object if the first priority corresponding to the brightness adjustment mode information is higher than the first priority corresponding to the driving information, and acquire target driving information corresponding to the target display from the display object if the target brightness adjustment mode information corresponding to the target display is not included in the display object; or

[0256] The second is an information acquisition module, which is used to obtain the target driving information corresponding to the target display from the display object if the first priority corresponding to the brightness adjustment method information is lower than the first priority corresponding to the driving information, and to obtain the target brightness adjustment method information corresponding to the target display from the display object if the target driving information corresponding to the target display is not included in the display object.

[0257] Optionally, the preset priority level further includes: second priorities respectively corresponding to a plurality of brightness adjustment mode information, and / or third priorities respectively corresponding to a plurality of driving information.

[0258] Optionally, the device further comprises:

[0259] The supplementary adjustment module is used to perform supplementary brightness adjustment of the target display according to a gamma correction method after monitoring a brightness change event of the target display if the adjusted brightness value of the target display does not meet a preset condition.

[0260] Optionally, the adjustment basis information is target driving information, and the first brightness adjustment module includes:

[0261] A component determination loading module, used to determine and load a brightness adjustment component connected to the display driver according to the target driver information;

[0262] The function calling module is used to call the brightness adjustment function provided by the brightness adjustment component according to the display service to achieve brightness adjustment of the target display.

[0263] Optionally, the brightness adjustment request further includes: a target brightness value of a target display;

[0264] The adjustment basis information includes: first brightness adjustment mode information and second brightness adjustment mode information; the first brightness adjustment mode information corresponds to a first brightness range [a, b] and a first step length s1, and the second brightness adjustment mode information corresponds to a second brightness range [c, d] and a second step length s2; b and d are both greater than the source brightness value; d is not less than the target brightness value; the first step length s1 is greater than the second step length s2;

[0265] The first brightness adjustment module includes:

[0266] A first adjustment module, configured to adjust the brightness value of the target display from the source brightness value to b using the first brightness adjustment mode information;

[0267] The second adjustment module is used to adjust the brightness value of the target display from b to the target brightness value by using the second brightness adjustment mode information.

[0268] Optionally, the target display includes: a first display and a second display; the first display corresponds to a third brightness range, and the second display corresponds to a fourth brightness range;

[0269] The device also includes:

[0270] An intersection calculation module, used for calculating the intersection of the third brightness range and the fourth brightness range to obtain a target brightness range;

[0271] A prompting module, configured to prompt a user of the target brightness range, so that the user determines a target brightness value of the target display within the target brightness range;

[0272] The target brightness value adjustment module is used to adjust the target brightness value to within the target brightness range when the target brightness value of the target display is not within the target brightness range.

[0273] Optionally, the information acquisition module includes:

[0274] A first acquisition module, configured to acquire relevant information of the display using at least one hardware detection tool to obtain a first acquisition result;

[0275] A second acquisition module, used to acquire relevant information of the display using at least one command line tool to obtain a second acquisition result;

[0276] A third acquisition module, used to acquire relevant information of the display by using at least one device file directory to obtain a third acquisition result;

[0277] A fusion module is used to fuse the first acquisition result, the second acquisition result and the third acquisition result to obtain relevant information of the display.

[0278] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.

[0279] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, an electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes various types of devices such as terminal devices and servers (clusters).

[0280] The embodiments of the present disclosure may be implemented as a device that uses any appropriate hardware, firmware, software, or any combination thereof to perform a desired configuration, and the device may include: electronic devices such as terminal devices and servers (clusters). Figure 5 An exemplary apparatus 1100 that can be used to implement various embodiments described in this application is schematically shown.

[0281] For one embodiment, Figure 5 An exemplary apparatus 1100 is shown having one or more processors 1102, a control module (chip set) 1104 coupled to at least one of the (one or more) processors 1102, a memory 1106 coupled to the control module 1104, a non-volatile memory / storage device 1108 coupled to the control module 1104, one or more input / output devices 1110 coupled to the control module 1104, and a network interface 1112 coupled to the control module 1104.

[0282] The processor 1102 may include one or more single-core or multi-core processors, and the processor 1102 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 1100 can be used as a terminal device, server (cluster), etc. described in the embodiments of the present application.

[0283] In some embodiments, the device 1100 may include one or more computer-readable media (e.g., memory 1106 or non-volatile memory / storage device 1108) having instructions 1114 and one or more processors 1102 configured to execute the instructions 1114 in combination with the one or more computer-readable media to implement a module to perform the actions described in the present disclosure.

[0284] For one embodiment, the control module 1104 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1102 and / or any suitable device or component in communication with the control module 1104 .

[0285] The control module 1104 may include a memory controller module to provide an interface to the memory 1106. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0286] The memory 1106 may be used, for example, to load and store data and / or instructions 1114 for the device 1100. For one embodiment, the memory 1106 may include any suitable volatile memory, such as a suitable DRAM (Dynamic Random Access Memory). In some embodiments, the memory 1106 may include a double data rate type four synchronous dynamic random access memory.

[0287] For one embodiment, the control module 1104 may include one or more input / output controllers to provide an interface to the non-volatile memory / storage device 1108 and the input / output device(s) 1110 .

[0288] For example, non-volatile memory / storage 1108 may be used to store data and / or instructions 1114. Non-volatile memory / storage 1108 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives, one or more optical disk drives, and / or one or more digital versatile optical disk drives).

[0289] The non-volatile memory / storage device 1108 may include storage resources that are physically part of the device on which the apparatus 1100 is installed, or it may be accessible to the device without being part of the device. For example, the non-volatile memory / storage device 1108 may be accessed via (one or more) input / output devices 1110 over a network.

[0290] The input / output device(s) 1110 may provide an interface for the apparatus 1100 to communicate with any other appropriate device, and the input / output device 1110 may include a communication component, an audio component, a sensor component, etc. The network interface 1112 may provide an interface for the apparatus 1100 to communicate through one or more networks, and the apparatus 1100 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi (Wireless Fidelity), 2G (2nd Generation Wireless Telephone Technology), 3G (3rd Generation Wireless Telephone Technology), 4G (4th Generation Wireless Telephone Technology), 5G (5th Generation Wireless Telephone Technology), etc., or a combination thereof for wireless communication.

[0291] For one embodiment, at least one of the processor(s) 1102 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 1104. For one embodiment, at least one of the processor(s) 1102 may be packaged together with the logic of one or more controllers of the control module 1104 to form a system-in-package. For one embodiment, at least one of the processor(s) 1102 may be integrated on the same die with the logic of one or more controllers of the control module 1104. For one embodiment, at least one of the processor(s) 1102 may be integrated on the same die with the logic of one or more controllers of the control module 1104 to form a system-on-chip.

[0292] In various embodiments, the device 1100 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a touch screen device, a netbook, etc.). In various embodiments, the device 1100 may have more or fewer components and / or a different architecture. For example, in some embodiments, the device 1100 includes one or more cameras, a keyboard, a liquid crystal display screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, a dedicated integrated circuit, and a speaker.

[0293] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or non-volatile memory / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.

[0294] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0295] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0296] The present application embodiment is described with reference to the flowchart and / or block diagram of the method, terminal device (system) and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, and the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device produce a device for implementing the function specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.

[0297] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0298] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0299] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0300] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0301] The brightness adjustment method and device, an electronic device and a machine-readable medium provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application sets. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A brightness adjustment method, characterized in that: The method comprises: Using a hardware detection tool, a command line tool and a device file directory, obtain relevant information of the display; the relevant information includes: device information of the display, driver information corresponding to the display, and brightness adjustment mode information corresponding to the display; wherein, if the device file directory exists and is not empty, it indicates that the display supports the brightness adjustment mode corresponding to the device file directory, and the corresponding brightness adjustment mode information is successfully obtained; Save the relevant information of the display to the display object; Receiving a brightness adjustment request; the brightness adjustment request includes: a target display to be adjusted; Acquire adjustment basis information corresponding to the target display from the display object; the types of the adjustment basis information include: brightness adjustment mode information and / or driving information; According to the adjustment basis information, adjusting the brightness of the target display; When the display object does not include the adjustment basis information corresponding to the target display, the brightness of the target display is adjusted according to the gamma correction method.

2. The method according to claim 1, characterized in that: According to a preset priority, the adjustment basis information corresponding to the target display is obtained from the display object; the preset priority includes: a first priority corresponding to the brightness adjustment mode information and the driving information; The acquiring the adjustment basis information corresponding to the target display from the display object includes: If the first priority corresponding to the brightness adjustment mode information is higher than the first priority corresponding to the driving information, then obtaining the target brightness adjustment mode information corresponding to the target display from the display object, and if the display object does not contain the target brightness adjustment mode information corresponding to the target display, obtaining the target driving information corresponding to the target display from the display object; or If the first priority corresponding to the brightness adjustment method information is lower than the first priority corresponding to the driving information, the target driving information corresponding to the target display is obtained from the display object, and if the display object does not contain the target driving information corresponding to the target display, the target brightness adjustment method information corresponding to the target display is obtained from the display object.

3. The method according to claim 2, characterized in that The preset priorities also include: second priorities corresponding to a plurality of brightness adjustment mode information, and / or third priorities corresponding to a plurality of driving information.

4. The method according to claim 1, characterized in that The method further comprises: After a brightness change event of a target display is monitored, if the adjusted brightness value of the target display does not meet a preset condition, a supplementary brightness adjustment of the target display is performed according to a gamma correction method.

5. The method according to claim 1, characterized in that The adjustment basis information is target driving information, and the brightness of the target display is adjusted according to the adjustment basis information, including: Determine and load a brightness adjustment component connected to the display driver according to the target drive information; According to the display service, the brightness adjustment function provided by the brightness adjustment component is called to implement the brightness adjustment of the target display.

6. The method according to claim 1, characterized in that The brightness adjustment request also includes: a target brightness value of a target display; The adjustment basis information includes: first brightness adjustment mode information and second brightness adjustment mode information; the first brightness adjustment mode information corresponds to a first brightness range [a, b] and a first step length s1, and the second brightness adjustment mode information corresponds to a second brightness range [c, d] and a second step length s2; b and d are both greater than the source brightness value; d is not less than the target brightness value; the first step length s1 is greater than the second step length s2; The step of adjusting the brightness of the target display according to the adjustment basis information includes: Using the first brightness adjustment mode information, adjusting the brightness value of the target display from the source brightness value to b; The second brightness adjustment mode information is used to adjust the brightness value of the target display from b to the target brightness value.

7. The method according to claim 1, characterized in that The target display includes: a first display and a second display; the first display corresponds to a third brightness range, and the second display corresponds to a fourth brightness range; The method further comprises: The third brightness range is intersected with the fourth brightness range to obtain a target brightness range; Prompting the target brightness range to the user, so that the user determines the target brightness value of the target display within the target brightness range; When the target brightness value of the target display is not within the target brightness range, the target brightness value is adjusted to be within the target brightness range.

8. The method according to claim 1, characterized in that The use of hardware detection tools, command line tools and device file directories to obtain relevant information about the display includes: Using at least one hardware detection tool, obtain relevant information of the display to obtain a first acquisition result; Using at least one command line tool, obtain relevant information of the display to obtain a second acquisition result; Using at least one device file directory, acquiring relevant information of the display to obtain a third acquisition result; The first acquisition result, the second acquisition result and the third acquisition result are merged to obtain relevant information of the display.

9. A brightness adjustment device, characterized in that: The device comprises: An information acquisition module, used to acquire relevant information of the display by using a hardware detection tool, a command line tool and a device file directory; the relevant information includes: device information of the display, driver information corresponding to the display, and brightness adjustment mode information corresponding to the display; wherein, if the device file directory exists and is not empty, it indicates that the display supports the brightness adjustment mode corresponding to the device file directory, and the corresponding brightness adjustment mode information is successfully acquired; An information saving module, used to save the relevant information of the display into the display object; A request receiving module, configured to receive a brightness adjustment request; the brightness adjustment request includes: a target display to be adjusted; A basis information acquisition module is used to acquire adjustment basis information corresponding to the target display from the display object; the types of the adjustment basis information include: brightness adjustment mode information and / or driving information; A first brightness adjustment module, used for adjusting the brightness of the target display according to the adjustment basis information; The second brightness adjustment module is used to adjust the brightness of the target display according to the gamma correction method when the display object does not contain the adjustment basis information corresponding to the target display.

10. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, causes the processor to execute the method according to any one of claims 1 to 8.

11. A machine-readable medium having executable codes stored thereon, which, when executed, causes a processor to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Automatic gamma correction of input source content

    CN101682684A

  • Display device and display method thereof

    CN101739973A

  • Organic light emitting diode display and drive means thereof

    CN101814267A

  • Display brightness calibration method and system

    CN104966495A

  • Brightness adjustment method and device, computer readable storage medium and terminal

    CN110675838A