Brightness adjustment method, apparatus, device, and medium

By acquiring relevant information about the display and saving it to an object, and combining this with adjustment criteria and gamma correction, the problem of limited brightness adjustment was solved, achieving a more efficient brightness adjustment effect.

CN119274503BActive Publication Date: 2025-12-12ZHONGKE FANGDE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The effectiveness and availability of existing brightness adjustment methods are limited by the monitor connection interface and specifications, which makes it impossible to effectively adjust the monitor brightness in some situations.

Method used

The system uses hardware detection tools, command-line tools, and device file directories to obtain relevant information about the display, saves it to the display object, and adjusts the brightness according to the adjustment criteria or gamma correction method.

Benefits of technology

It improves the effectiveness and success rate of brightness adjustment, ensuring comfortable visuals and personalized brightness adjustment in various display environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119274503B_ABST
    Figure CN119274503B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a brightness adjustment method, device, equipment and medium, wherein the method specifically comprises: obtaining related information of a display; the related information comprises: device information of the display, driving information corresponding to the display, and brightness adjustment mode information corresponding to the display; in the case that a device file directory exists and is not empty, it is indicated that the display supports the brightness adjustment mode corresponding to the device file directory; receiving a brightness adjustment request; obtaining adjustment basis information corresponding to a target display from the display object; the types of the adjustment basis information comprise: the brightness adjustment mode information and / or the driving information; adjusting the brightness of the target display according to the adjustment basis information; in the case that the adjustment basis information corresponding to the target display is not included in the display object, adjusting the brightness of the target display according to a gamma correction mode. The embodiments of the present application can improve the effectiveness and success rate of brightness adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of display control, and in particular, to a brightness adjustment method, device, apparatus and medium. BACKGROUND

[0002] A display is a display tool capable of presenting electronic files on a screen through corresponding transmission equipment. In the process of using the display, the eyes of a user are sensitive to the brightness of the surrounding environment, and in particular, sudden changes in brightness can bring adverse effects to the vision of the user. In order to achieve the most comfortable visual effect, the user needs to adjust the brightness of the display according to the changes in the environment.

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

[0004] However, in actual application, the effectiveness and availability of the brightness adjustment method are affected by various factors. For example, the availability of the brightness adjustment method based on DDC depends on the connection interface of the display and the specification supported by the display. When the connection interface of the display does not implement the I 2 C (Inter-Integrated Circuit Bus) protocol, the brightness adjustment method based on DDC cannot be used. Even if the connection interface of the display implements the I 2 C protocol, if the display does not support the MCCS (Monitor Control Command Set) specification, the brightness adjustment method based on DDC cannot also be used. SUMMARY

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

[0006] Correspondingly, 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, embodiments of the present application disclose a brightness adjustment method, which comprises:

[0008] The related information of the display is obtained by using a hardware detection tool, a command line tool and a device file directory, and the related information includes device information of the display, driving information corresponding to the display and brightness adjustment mode information corresponding to the display; and in a case where the device file directory exists and is not empty, it is indicated that the display supports the brightness adjustment mode corresponding to the device file directory, and thus the corresponding brightness adjustment mode information is successfully obtained.

[0009] The related information of the display is saved into a display object.

[0010] A brightness adjustment request is received, and the brightness adjustment request includes a target display to be adjusted.

[0011] Adjustment basis information corresponding to the target display is obtained from the display object, and the types of the adjustment basis information include brightness adjustment mode information and / or driving information.

[0012] The brightness of the target display is adjusted according to the adjustment basis information.

[0013] In a case where the adjustment basis information corresponding to the target display is not included in the display object, the brightness of the target display is adjusted according to a gamma correction mode.

[0014] Embodiments of the present application also disclose a brightness adjustment device, and the device includes:

[0015] An information obtaining module is configured to obtain related information of a display by using a hardware detection tool, a command line tool and a device file directory, and the related information includes device information of the display, driving information corresponding to the display and brightness adjustment mode information corresponding to the display; and in a case where the device file directory exists and is not empty, it is indicated that the display supports the brightness adjustment mode corresponding to the device file directory, and thus the corresponding brightness adjustment mode information is successfully obtained.

[0016] An information saving module is configured to save the related information of the display into a display object.

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

[0018] An adjustment basis information obtaining module is configured to obtain adjustment basis information corresponding to the target display from the display object, and the types of the adjustment basis information include brightness adjustment mode information and / or driving information.

[0019] A first brightness adjustment module is configured to adjust the brightness of the target display according to the adjustment basis information.

[0020] The second brightness adjustment module is configured to perform brightness adjustment of the target display according to a gamma correction mode if the display object does not contain the adjustment basis information corresponding to the target display.

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

[0022] The basis information obtaining module includes:

[0023] The first basis information obtaining module is configured to obtain 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 obtain target driving information corresponding to the target display from the display object if the display object does not contain the target brightness adjustment mode information corresponding to the target display.

[0024] The second basis information obtaining module is configured to obtain target driving information corresponding to the target display from the display object if the first priority corresponding to the brightness adjustment mode information is lower than the first priority corresponding to the driving information, and obtain target brightness adjustment mode information corresponding to the target display from the display object if the display object does not contain the target driving information corresponding to the target display.

[0025] Optionally, the preset priority further includes a second priority corresponding to each of a plurality of brightness adjustment modes and / or a third priority corresponding to each of a plurality of driving information.

[0026] Optionally, the device further includes:

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

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

[0029] The component determination and loading module is configured to determine and load a brightness adjustment component of a display driver interface according to the target driving information.

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

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

[0032] The adjustment according to the information comprises: 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 size s1, and the second brightness adjustment mode information corresponds to a second brightness range [c, d] and a second step size s2; b and d are greater than the source brightness value; d is not less than the target brightness value; the first step size s1 is greater than the second step size s2;

[0033] The first brightness adjustment module comprises:

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

[0035] A second adjustment module is configured 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 comprises: 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 further comprises:

[0038] An intersection module is configured to obtain a target brightness range by intersecting the third brightness range and the fourth brightness range.

[0039] A prompt module is configured to prompt the target brightness range to a user, so that the user determines the target brightness value of the target display in the target brightness range.

[0040] A target brightness value adjustment module is configured to adjust the target brightness value to be within the target brightness range if the target brightness value of the target display is not within the target brightness range.

[0041] Optionally, the information acquisition module comprises:

[0042] A first acquisition module is configured to acquire the related information of the display by using at least one hardware detection tool to obtain a first acquisition result.

[0043] A second acquisition module is configured to acquire the related information of the display by using at least one command line tool to obtain a second acquisition result.

[0044] A third acquisition module is configured to acquire the related information of the display by using at least one device file directory to obtain a third acquisition result.

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

[0046] The embodiments of the present application also disclose an electronic device, including a processor and a memory having executable codes stored thereon, wherein the executable codes, when executed, cause the processor to perform the method according to the embodiments of the present application.

[0047] The embodiments of the present application also disclose a machine readable medium having executable codes stored thereon, wherein the executable codes, when executed, cause a processor to perform the method according to the embodiments of the present application.

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

[0049] In the technical scheme of the embodiments of the present application, the relevant information of the display is acquired by using the hardware detection tool, the command line tool and the device file directory, and the relevant information of the display is saved into the display object. In this way, when the brightness adjustment request is received, the adjustment basis information corresponding to the target display can be acquired from the display object, and the brightness of the target display is adjusted according to the adjustment basis information. Furthermore, when the display object does not contain the adjustment basis information corresponding to the target display, the brightness of the target display can also be adjusted according to the gamma correction mode.

[0050] Firstly, the embodiments of the present application use the hardware detection tool, the command line tool and the device file directory to acquire the relevant information of the display. The three acquisition means realize the diversity of the source of the relevant information, thereby improving the accuracy and comprehensiveness of the relevant information.

[0051] Secondly, the embodiments of the present application use the display object to save the relevant information of the display. The relevant information specifically includes the device information of the display, the driving information corresponding to the display and the brightness adjustment mode information corresponding to the display. When 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. In this way, the brightness adjustment mode information saved in the display object represents the brightness adjustment mode that can be supported by the display. Similarly, the driving information saved in the display object also represents the brightness adjustment component that can be supported by the display.

[0052] On the basis of the luminance adjustment mode information saved in the display object representing the luminance adjustment mode that the display can support and the driving information saved in the display object representing the luminance adjustment component that the display can support, the embodiment of the present application acquires the adjustment basis information corresponding to the target display from the display object in the case of receiving a luminance adjustment request, and performs luminance adjustment of the target display according to the adjustment basis information, so as to realize luminance adjustment of the target display by using the luminance adjustment mode and / or the luminance adjustment component supported by the target display. Therefore, the embodiment of the present application can improve the effectiveness and success rate of luminance adjustment.

[0053] In addition, in the case that the adjustment basis information corresponding to the target display is not included in the display object, it is indicated that the luminance adjustment mode and / or the luminance adjustment component supported by the target display does not exist. In this case, luminance adjustment of the target display is performed according to the gamma correction mode, so as to further improve the effectiveness and success rate of luminance adjustment. BRIEF DESCRIPTION OF DRAWINGS

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

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

[0056] Figure 3 is a flowchart of steps of a luminance adjustment method under a Linux system of an embodiment of the present application;

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

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

[0059] In order to make the above objectives, characteristics and advantages of the present application more apparent and easy to understand, the present application is further described in detail below with reference to the drawings and specific embodiments.

[0060] The luminance adjustment method of the embodiment of the present application can be used to adjust the luminance of a display to meet the needs of users to obtain comfortable vision, adapt to individualized preferences and conveniently adjust the luminance of the display under different ambient light.

[0061] There are various luminance adjustment means at present, such as luminance adjustment means based on DDC or luminance adjustment means based on ACPI.

[0062] However, in practical applications, the effectiveness and availability of the brightness adjustment means can be affected by various factors. For example, the availability of the DDC-based brightness adjustment means depends on the connection interface of the display and the specification supported by the display. When the connection interface of the display does not implement the I 2 C protocol, the DDC-based brightness adjustment means cannot be used. Even if the connection interface of the display implements the I 2 C protocol, if the display does not support the MCCS specification, the DDC-based brightness adjustment means cannot work either.

[0063] To solve the problem of low effectiveness of the brightness adjustment method in the related art, the embodiment of the present application provides a brightness adjustment method, which specifically includes the following steps:

[0064] Obtaining the related information of the display by using a hardware detection tool, a command line tool and a device file directory; the related information specifically includes device information of the display, driving information corresponding to the display, and brightness adjustment mode information corresponding to the display; wherein, when 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 thus the corresponding brightness adjustment mode information is successfully obtained;

[0065] Saving the related information of the display into a display object;

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

[0067] Obtaining 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] Adjusting the brightness of the target display according to the adjustment basis information;

[0069] When the display object does not include the adjustment basis information corresponding to the target display, adjusting the brightness of the target display according to a gamma correction mode.

[0070] The embodiment of the present application obtains the related information of the display by using a hardware detection tool, a command line tool and a device file directory, and saves the related information of the display into a 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 display object, and the brightness of the target display can be adjusted according to the adjustment basis information; further, when the display object does not include the adjustment basis information corresponding to the target display, the brightness of the target display can also be adjusted according to a gamma correction mode.

[0071] Firstly, the embodiment of the present application adopts three acquisition means of hardware detection tool, command line tool and device file directory to acquire the related information of the display. The three acquisition means realize the diversity of the source of the related information, thereby improving the accuracy and comprehensiveness of the related information.

[0072] Secondly, the embodiment of the present application adopts a display object to save the related information of the display. The display object can represent an instance of a data structure or a class for storing and managing the related information of the display in the computer system.

[0073] The related information specifically includes the device information of the display, the driving information corresponding to the display and the brightness adjustment mode information corresponding to the display. Wherein, in the case that the device file directory exists and is not empty, the display supports the brightness adjustment mode corresponding to the device file directory, and the corresponding brightness adjustment mode information is successfully acquired. In this way, the brightness adjustment mode information saved in the display object represents the brightness adjustment mode that the display can support. Similarly, the driving information saved in the display object also represents the brightness adjustment component that the display can support.

[0074] On the basis that the brightness adjustment mode information saved in the display object represents the brightness adjustment mode that the display can support, and the driving information saved in the display object represents the brightness adjustment component that the display can support, in the case that the brightness adjustment request is received, the embodiment of the present application acquires the adjustment basis information corresponding to the target display from the display object, and performs the brightness adjustment of the target display according to the adjustment basis information, which can realize the brightness adjustment of the target display by using the brightness adjustment mode and / or the brightness adjustment component supported by the target display. Therefore, the embodiment of the present application can improve the effectiveness and success rate of the brightness adjustment.

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

[0076] Method embodiment one

[0077] Reference Figure 1 Fig. 1 shows a step flow diagram of the brightness adjustment method according to an embodiment of the present application, which specifically includes the following steps:

[0078] In step 101, a hardware detection tool, a command line tool and a device file directory are used to obtain relevant information of the display; the relevant information specifically includes device information of the display, driving information corresponding to the display and brightness adjustment mode information corresponding to the display; when 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 thus the corresponding brightness adjustment mode information is successfully obtained.

[0079] In step 102, the relevant information of the display is saved into a display object.

[0080] In step 103, a brightness adjustment request is received; the brightness adjustment request specifically includes a target display to be adjusted.

[0081] In step 104, 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.

[0082] In step 105, brightness adjustment of the target display is performed according to the adjustment basis information.

[0083] In step 106, when the display object does not include the adjustment basis information corresponding to the target display, brightness adjustment of the target display is performed according to a gamma correction mode.

[0084] Figure 1 The steps included in the method embodiments can be executed by a client or a service. A service is usually continuously running in the background and provides specific functions or resources for one or more clients.

[0085] The service of the embodiments of the present application can be a brightness adjustment service. The brightness adjustment service is usually continuously running in the background and is ready to provide the specific function of brightness adjustment for multiple possible clients (such as different application programs, display setting modules of operating systems, etc.) at any time. It is like a professional "server" waiting for the brightness adjustment request from the client. When the 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 the service is only an example of the execution subject of the brightness adjustment method of the embodiments of the present application, and is not understood as an application limitation on the execution subject. The embodiments of the present application are not limited to the client or the service. Figure 1 The specific execution subject of the method embodiments is not limited.

[0087] The embodiments of the present application are not limited to the specific operating system corresponding to the client or the 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 embodiments of the present application can provide three different interaction modes for receiving the brightness adjustment request. In other words, the application program can send the brightness adjustment request to the brightness adjustment service of the embodiments of the present application according to the interaction modes.

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

[0090] Another interaction mode is to provide an IPC (Inter-Process Communication) mechanism for other application programs to access and control.

[0091] The other interaction mode is to provide a command tool to facilitate the user to perceive and adjust the brightness of the display under the non-GUI (Graphical User Interface) environment.

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

[0093] The brightness adjustment service of the embodiments of the present application can have the processing capability of multiple brightness adjustment means. If the target display supports a certain brightness adjustment means, the brightness adjustment service can 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 can use any one or combination of the multiple brightness adjustment means to adjust the brightness of the target display.

[0094] The 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 drive information, and a third brightness adjustment means corresponding to the gamma correction mode.

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

[0096] The 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, scan frequency, etc. Its main purpose is to realize the plug-and-play function and simplify the connection and configuration process of the device. The DDC channel complies with the I2C bus protocol, and the DDC bus is a 4-wire bus, including 2 data lines and 2 clock lines. 2The C interface standard mode carries out data transmission. The sending end reads the E-EDID (Enhanced Extended Display Identification Data) data of the receiving end through the DDC channel to obtain the configuration information of the receiving end, and determines the audio and video data transmission format with the receiving end according to the configuration information.

[0097] ACPI is used to provide an operating system and an application program with all power management interfaces, including various software and hardware specifications.

[0098] The second brightness adjustment means corresponding to the drive information determines and loads a brightness adjustment component of a display driver docking; and according to a display service, calls a brightness adjustment function provided by the brightness adjustment component to realize 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 non-linear 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. If no gamma correction is performed, the image may have areas that are too dark or too bright, the contrast is not appropriate, and the details are not clear. In terms of brightness adjustment, by adjusting the gamma value, the overall brightness perception of the image can be changed. A lower gamma value will make the image brighter, and a higher gamma value will make the image darker.

[0100] One purpose of the embodiments of the present application is to use the 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 embodiments of the present application comprehensively use three acquisition means of hardware detection tools, command line tools and device file directories to acquire the related information of the display.

[0102] The device information in the above-mentioned related 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 can include: current brightness value or brightness range. The brightness range refers to the interval from the minimum brightness value to the maximum brightness value that the display can display.

[0103] The drive information in the above-mentioned related information specifically includes: drive version information, supported operating system, function feature support and hardware compatibility information. Among them, the function feature support specifically includes: multi-display configuration: if the operating system is connected with multiple displays, the drive may support specific multi-display settings, such as extended mode, mirror mode, etc.

[0104] Among them, the hardware detection tool can deeply explore the physical characteristics and hardware parameters of the display, laying the foundation for a comprehensive understanding of the performance of the display. 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 can obtain various key information about the display from the system level, such as connection status and driver situation, by virtue of its powerful instruction set and flexible operation mode. For example, lshw (Hardware Lister) is a command line tool for listing hardware information.

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

[0107] And the inspection of 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 in the Linux system for managing display devices. This directory contains various information files and subdirectories related to display devices. For example, there may be device files for specific display controllers, and by reading these files, you can obtain detailed attributes of the device, such as manufacturer information, device model, supported resolution range, etc.

[0110] / sys / class / backlight / : This is a directory in the Linux system for managing the backlight of display devices.

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

[0112] The combination of the three acquisition means 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 characteristics of the display can be accurately acquired in various complex use scenarios, so as to select the most appropriate brightness adjustment method.

[0113] In the embodiment of the application, in the case that the device file directory exists and is not empty, the display is characterized in that the display supports the brightness adjustment mode corresponding to the device file directory, and the corresponding brightness adjustment mode information is successfully acquired.

[0114] In a specific implementation, it can be first judged whether the device file directory exists, if the device file directory exists, it can be judged whether the device file directory is empty, if the device file directory is not empty, the corresponding brightness adjustment mode information can be successfully acquired. Specifically, it can be determined whether the directory is empty by acquiring the file list in the device file directory and checking its length.

[0115] For example, in a Linux system environment, the principle of the ACPI-based brightness adjustment means is that the linux kernel exposes the device class interface / sys / class / backlight under 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 the ACPI-based brightness adjustment means.

[0116] For another example, in a Linux system environment, the principle of the DDC-based brightness adjustment means is that the DDC communication protocol interacts with the display through the I 2 C bus to achieve brightness adjustment, and the display driver that implements the DDC communication protocol creates a device named / dev / I 2 C*, and brightness adjustment can be achieved by reading and writing to the device. Therefore, if the / dev / I 2 C* device file directory exists and is not empty, it can be considered that the corresponding display supports the DDC-based brightness adjustment means.

[0117] In a specific implementation, the above process of acquiring display-related information by using a hardware detection tool, a command line tool and a device file directory can specifically include:

[0118] Step A1, using at least one hardware detection tool to acquire display-related information to obtain a first acquisition result;

[0119] Step A2, using at least one command line tool to acquire display-related information to obtain a second acquisition result;

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

[0121] Step A4, fusing the first acquisition result, the second acquisition result and the third acquisition result to obtain the 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 embodiments of the present application specifically includes: taking the union of the subsets corresponding to the first acquisition result, the second acquisition result and the third acquisition result, and the obtained union set can contain the relevant information of the display.

[0123] In addition to taking 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 subjected to removal processing and mutual verification processing, etc. It can be understood that one purpose of the embodiments of the present application is to collect the relevant information of the display from multiple dimensions and different levels, and the specific fusion process is not limited.

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

[0125] The display object can represent an instance of a data structure or class for storing and managing the relevant information of the display in the computer system. Different displays can correspond to different display objects. For example, the first display corresponds to the first display object, and the second display corresponds to the second display object. Among them, different displays can be distinguished according to device information such as display model.

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

[0127] The target brightness value refers to the specific numerical value that the user or the client expects to adjust the brightness of the target display to in the brightness adjustment request.

[0128] The target brightness value is usually expressed in units of brightness such as nit. The target brightness value reflects the specific requirements of the user for the brightness of the display, which can be set based on different use scenarios and personal preferences.

[0129] For example, in a light environment, a user can want to set a target display's brightness value to a lower value, such as 100 nits, to reduce the irritation and fatigue of the eyes; and in a bright environment, in order to ensure that the content on the display is clearly visible, the user can 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 mode information saved in the display object represents the brightness adjustment mode that the display can support, and the driving information saved in the display object also represents the brightness adjustment component that the display can support; thus, in the case of receiving a brightness adjustment request, the adjustment basis information corresponding to the target display obtained from the display object represents the brightness adjustment mode and / or the brightness adjustment component that the target display can support.

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

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

[0134] The embodiments of the present application can provide the following technical solutions for obtaining the adjustment basis information corresponding to the target display from the 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] Then, 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, the target brightness adjustment mode information corresponding to the target display is obtained from the display object, and in the case that the display object does not contain the target brightness adjustment mode information corresponding to the target display, the target driving information corresponding to the target display is obtained from the display object; or

[0139] Step B2, if the first priority corresponding to the brightness adjustment mode information is lower than the first priority corresponding to the driving information, obtaining the target driving information corresponding to the target display from the display object, and in the case that the target driving information corresponding to the target display is not contained in the display object, obtaining the target brightness adjustment mode information corresponding to the target display 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 obtained from the display object first. If the target brightness adjustment mode information is successfully obtained, the target brightness adjustment mode information can be taken as the adjustment basis information, and step 105 can be executed.

[0141] If the target brightness adjustment mode information is not obtained, it means that the target brightness adjustment mode information corresponding to the target display is not contained in the display object, in which case, the target driving information corresponding to the target display can be obtained from the display object. It can be understood that the result of obtaining the target driving information can include success or failure. If the target driving information is successfully obtained, the target driving information can be taken as the adjustment basis information, and step 105 can be executed. If the target driving information is not obtained, 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 obtained from the display object first. If the target driving information is successfully obtained, the target driving information can be taken as the adjustment basis information, and step 105 can be executed.

[0143] If the target driving information is not obtained, it means that the target driving information corresponding to the target display is not contained in the display object, in which case, the target adjustment mode information corresponding to the target display can be obtained from the display object. It can be understood that the result of obtaining the target adjustment mode information can include success or failure. If the target adjustment mode information is successfully obtained, the target adjustment mode information can be taken as the adjustment basis information, and step 105 can be 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 can further include: second priorities corresponding to a plurality of brightness adjustment mode information respectively, and / or third priorities corresponding to a plurality of driving information respectively.

[0146] For example, the plurality of brightness adjustment mode information specifically includes: first brightness adjustment mode information and second brightness adjustment mode information. The first brightness adjustment mode information corresponds to a DDC-based brightness adjustment means, and the second brightness adjustment mode information corresponds to an ACPI-based brightness adjustment means. A user or a person skilled in the art 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 can include: the second priority of the first brightness adjustment mode information is higher than that of the second brightness adjustment mode information, or the second priority of the first brightness adjustment mode information is lower than that of the second brightness adjustment mode information, or the priorities of the first brightness adjustment mode information and the second brightness adjustment mode information are the same, etc.

[0147] In the case where the priorities of the first brightness adjustment mode information and the second brightness adjustment mode information are the same, the adjustment basis information of the embodiments of the present application can include: the first brightness adjustment mode information and the second brightness adjustment mode information; the first brightness adjustment mode information corresponds to a first brightness range [a, b] and a first step size s1, and the second brightness adjustment mode information corresponds to a second brightness range [c, d] and a second step size s2. a, b, c, d, s1, and s2 can be positive real numbers. The first brightness range [a, b] and the second brightness range [c, d] have an intersection, a < c < b, and d > b.

[0148] Suppose 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 size s1 is greater than the second step size s2, then the first brightness adjustment mode information and the second brightness adjustment mode information can be comprehensively utilized to adjust the brightness of the target display. Accordingly, in the case of increasing the brightness value (i.e., 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: adjusting the brightness value of the target display from the source brightness value to b using the first brightness adjustment mode information; and adjusting the brightness value of the target display from b to the target brightness value using the second brightness adjustment mode information. The source brightness value can represent the brightness value of the target display before brightness adjustment.

[0149] The embodiments of the present application first utilize the first brightness adjustment mode information to quickly approach the target brightness value of the target display. Because the first step size of the first brightness adjustment mode is large (s1 > s2), the brightness value of the target display can be quickly approached when the difference between the source brightness value and the target brightness value is 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 the adjustment time, and improve the adjustment efficiency.

[0150] The embodiment of the present application then uses the second brightness adjustment mode information to perform accurate adjustment of brightness. The second brightness adjustment mode with a second step length smaller than the first step length can perform fine adjustment when approaching the target brightness value, so that the final brightness value accurately reaches the target brightness value. The above step-by-step adjustment mode avoids the problem of too long adjustment time or difficulty in accurately reaching the target brightness value due to an inappropriate single adjustment mode step length.

[0151] Assuming that b and d are both less than the source brightness value, a is not greater than the target brightness value, and the first step length s1 is less than the second step length s2, the first brightness adjustment mode information and the second brightness adjustment mode information can be comprehensively used to perform brightness adjustment of the target display. Accordingly, in the case of brightness value adjustment (i.e., the target brightness value is less than the source brightness value), the process of performing brightness adjustment of the target display according to the above adjustment basis information specifically includes: using the second brightness adjustment mode information to adjust the brightness value of the target display from the source brightness value to c; and using the first brightness adjustment mode information to adjust the brightness value of the target display from c to the target brightness value.

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

[0153] In step 105, the process of performing brightness adjustment of the target display according to the above adjustment basis information can achieve brightness adjustment of the target display using the brightness adjustment mode and / or brightness adjustment component supported by the target display.

[0154] In one implementation, in the case of the adjustment basis information being the first brightness adjustment mode information, the first brightness adjustment mode information specifically can be directory information of a first device file corresponding to the target display. For example, in a Linux system environment, the directory information of the first device file specifically is: / dev / I 2 C* device file. Wherein, the information of the / dev / I 2 C* device file can be obtained from a target display object corresponding to the display model of the target display according to the display model of the target display.

[0155] In this way, the brightness adjustment of the target display can be realized based on the read-write operation 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 in a first step length. One first step length can correspond to one MCCS (Monitor Control Command Set) instruction. Specifically, the MCCS instruction related to the brightness adjustment can be written in the first device file.

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

[0157] In this way, the brightness adjustment of the target display can be realized based on the read-write operation 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 in a second step length. Specifically, the adjustment instruction related to the brightness adjustment can be written in the second device file.

[0158] In still another implementation manner, the adjustment basis information is the target driver information, and the process of adjusting the brightness of the target display according to the adjustment basis information specifically includes: determining and loading a brightness adjustment component of display driver docking according to the target driver information; and calling a brightness adjustment function provided by the brightness adjustment component according to a display service, so as to realize the brightness adjustment of the target display.

[0159] The target driver information can include the name and version number of the display driver program and the like. The brightness adjustment component is a module or part of the display driver program that provides the display brightness adjustment function.

[0160] The display service can include Xorg / x11 or Wayland and the like. It can be understood that the embodiments of the present application do not limit the specific display service.

[0161] The Xorg / x11 is an open source implementation of the X Window System and is also a widely used graphical interface service in the Linux system. It provides a graphical interface and supports various graphic hardware, including graphics cards, controllers, expansion cards, displays, drawing tablets, scanners and various input and output devices.

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

[0163] In an implementation, the second brightness adjustment means corresponding to the driving information can access and configure permissions by means of DRM (Direct Rendering Manager) provided by the display service, and call the brightness adjustment function provided by the brightness adjustment component to realize the brightness adjustment of the target display. By means of the access and configuration permissions of the DMS, the brightness adjustment service can adjust the brightness of the target display by inputting and outputting control, and directly calling the brightness adjustment function provided by the brightness adjustment component.

[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 to realize 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 can send a brightness adjustment instruction to the KMS. After receiving the brightness adjustment instruction from the display service, the KMS can pass the brightness adjustment instruction to the brightness adjustment function provided by the graphics card driver. The graphics card driver can adjust the signal strength output by the graphics card according to the brightness adjustment instruction, so as to change the brightness of the display.

[0165] In the Linux system, the display service can use KMS (Kernel Mode Setting) for brightness adjustment.

[0166] Among them, KMS is a mechanism in the Linux kernel for controlling graphics hardware. It directly interacts 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 control the signal strength output by the graphics card to affect the brightness of the display. KMS provides a set of kernel interfaces that allow the display service to communicate with the kernel to set and get the state of the graphics hardware. The display service can send brightness adjustment instructions to the kernel through these interfaces, and get the current brightness settings.

[0167] The brightness adjustment instruction can be an instruction corresponding to a step, which is used to reduce or increase the brightness value of the target display by a step. A brightness adjustment request can contain one or more brightness adjustment instructions. Assuming that the step 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 brightness will make the brightness value 110 brightness units.

[0168] In summary, when brightness needs to be adjusted, the display service sends a brightness adjustment instruction to the KMS. After receiving the brightness adjustment instruction from the display service, the KMS transmits the brightness adjustment instruction to the brightness adjustment function provided by the graphics card driver. 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.

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

[0170] In summary, according to the adjustment basis information, the process of adjusting the brightness of the target display includes: the display service sends a brightness adjustment instruction to the KMS, the KMS transmits 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, in the case where the adjustment basis information corresponding to the target display is not included in the above display object, the brightness of the target display is adjusted according to the gamma correction method. The gamma correction method adjusts the brightness of the target display based on the gamma value.

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

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

[0174] The size of the gamma value determines the adjustment direction of the image brightness. When the gamma value is greater than 1, the dark details of the image are expanded, and the bright details are compressed, so that the overall image becomes dark; when the gamma value is less than 1, the bright details of the image are expanded, and the dark details are compressed, so that the overall image becomes bright. Those skilled in the art can adjust the gamma value according to the actual application requirements, and the adjustment process of the gamma value is not limited in the embodiments of the present application.

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

[0176] The brightness change event of the target display can refer to that the brightness value of the target display has changed. The above brightness change event can be caused by the brightness adjustment of the brightness adjustment service, for example, the brightness adjustment of the brightness adjustment service according to step 105. Or, the above brightness change event can be caused by the brightness adjustment of the third-party application program.

[0177] If the above brightness change event is caused by the brightness adjustment of the brightness adjustment service, the adjusted brightness value of the target display not meeting the preset condition can include that the adjusted brightness value of the target display does not meet the target brightness value.

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

[0179] The embodiments of the present application can judge whether the adjusted brightness value of the target display can be divided by the preset step length, if yes, the preset condition is met, otherwise, the preset condition is not met. For example, the adjusted brightness value is 85, and the preset step length is 2, which does not meet the preset condition.

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

[0181] Each gamma value corresponds to a brightness curve. The target gamma value can be determined based on fitting of the adjusted brightness value, the target brightness value, and the brightness curve.

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

[0183] If the brightness change event is caused by the brightness adjustment of the third-party application, a target brightness value closest to the adjusted brightness value and meeting a preset step size can be determined according to the preset step size. For example, the adjusted brightness value is 85, and the preset step size 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 size.

[0184] The number of target displays in the embodiments of the present application can be multiple. It is assumed that the target display includes a first display and a second display, and it is further assumed that the first display corresponds to a third brightness range and the second display corresponds to a fourth brightness range. In the case that the first display and the second display correspond to different manufacturers or display models, the third brightness range and the fourth brightness range can be different.

[0185] The method can further include: intersecting 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 determines the target brightness value of the target display in the target brightness range; and adjusting the target brightness value to be within the target brightness range in the case that the target brightness value of the target display is not within the target brightness range.

[0186] The embodiments of the present application adjust the target brightness value to be 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 the brightness consistency between multiple displays and avoid the case that a certain display is too bright or too dark, which affects the overall visual effect. Especially in some scenes with high requirements for visual consistency, such as design, video editing, etc., the prompt function and the automatic adjustment function can improve the work efficiency and quality.

[0187] In summary, the brightness adjustment method of the embodiment of the present application uses the hardware detection tool, the command line tool and the device file directory to obtain the related information of the display and save the related information of the display into the display object. In this way, in the case of receiving the brightness adjustment request, the adjustment basis information corresponding to the target display can be obtained from the display object, and the brightness of the target display is adjusted according to the adjustment basis information. Further, in the case that 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 the gamma correction method.

[0188] Firstly, the embodiment of the present application uses the hardware detection tool, the command line tool and the device file directory to obtain the related information of the display. The three obtaining means realize the diversity of the source of the related information, thereby improving the accuracy and comprehensiveness of the related information.

[0189] Secondly, the embodiment of the present application uses the display object to save the related information of the display. The related information specifically includes the device information of the display, the driving information corresponding to the display and the brightness adjustment method information corresponding to the display. In the case that the device file directory exists and is not empty, it indicates that the display supports the brightness adjustment method corresponding to the 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 driving information saved in the display object also represents the brightness adjustment component that the display can support.

[0190] On the basis 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, in the case of receiving the brightness adjustment request, the adjustment basis information corresponding to the target display is obtained from the display object, and the brightness of the target display is adjusted according to the adjustment basis information, which can realize the brightness adjustment of the target display by using the brightness adjustment method and / or the brightness adjustment component supported by the target display. Therefore, the embodiment of the present application can improve the effectiveness and success rate of the brightness adjustment.

[0191] Further, in the case that the display object does not contain the adjustment basis information corresponding to the target display, it indicates that the brightness adjustment method and / or the 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 embodiment two

[0193] Reference Figure 2 Fig. 1 shows a schematic diagram of a processing flow of a brightness adjustment method in a Linux system according to an embodiment of the present application. The Linux system can include a user space, a kernel space, and a hardware device space.

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

[0195] The hardware space can include a motherboard and a display. The motherboard can be provided with an advanced configuration and power interface.

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

[0197] The user space can include a display service and a brightness adjustment service. The brightness adjustment service in the user space means that it cannot directly access hardware resources, but interacts with the kernel space through system calls and the like to adjust the brightness and other parameters of the display.

[0198] Figure 2 The brightness adjustment service can 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 three interaction modes are used to receive brightness adjustment requests sent by users or clients.

[0200] The management module is responsible for the startup and running of the brightness adjustment service, loads the external interaction module, the policy module, the DDC adaptation module, the ACPI adaptation module, and the display driver adaptation module, provides general tools, logs, etc., obtains and listens to environmental parameters and events of the operating system. The environmental parameters specifically include EDID data or information of the display service. The events specifically include plug-in events, etc.

[0201] The policy module is used to determine adjustment basis information corresponding to the brightness adjustment request according to at least one of the environmental parameters, a policy file, and the number and characteristics of the display, and send the adjustment basis information to any one or combination of the DDC adaptation module, the ACPI adaptation module, and the display driver adaptation module, so that any one or combination of the DDC adaptation module, the ACPI adaptation module, and the display driver adaptation module adjusts the brightness of the target display according to the adjustment basis information.

[0202] The DDC adaptation module is configured to adjust the brightness of the target display based on read / write operations of a first device file in a case where the adjustment basis information is 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 adaptation module is configured to adjust the brightness of the target display based on read / write operations of a second device file in a case where the adjustment basis information is second brightness adjustment mode information. The second device file can be connected to the ACPI interface to achieve the brightness adjustment of the target display based on the ACPI interface.

[0204] The display driver adaptation module is configured to adapt different display driver implementation modes according to current environment information in a case where the adjustment basis information is target driver information, or to adjust the brightness of the target display according to a gamma correction mode in a case where the display object does not contain the adjustment basis information corresponding to the target display.

[0205] The different display driver implementation modes can include a display driver implementation mode A and a display driver implementation mode B.

[0206] The display driver implementation mode A can invoke a brightness adjustment function provided by the brightness adjustment component to achieve the brightness adjustment of the target display by means of DRM access and configuration permissions provided by a display service. The brightness adjustment service can directly adjust the brightness of the target display by means of the brightness adjustment function provided by the brightness adjustment component through input / output control by means of the DMS access and configuration permissions.

[0207] The display driver implementation mode B can invoke the brightness adjustment function provided by the brightness adjustment component to achieve the brightness adjustment of the target display by means of the display service. The brightness adjustment service can transmit a brightness adjustment request and information of the brightness adjustment function to the display service, and the display service can send a brightness adjustment instruction to the KMS according to the brightness adjustment request. The KMS can transmit the brightness adjustment instruction to a brightness adjustment function provided by a graphics card driver after receiving the brightness adjustment instruction from the display service. The graphics card driver can adjust the signal strength output by the graphics card according to the brightness adjustment instruction, so as to change the brightness of the display.

[0208] Figure 2In some embodiments, the display service is based on a user space library, and the brightness adjustment instruction is sent to the KMS. For example, Libdrm (The Library for Direct Rendering Manager) is a user space library for interacting with the DRM of the kernel, and provides a set of APIs for handling access and control of graphics hardware and display devices. It is to be understood that embodiments of the present application are not limited to a specific user space library.

[0209] The display driver adaptation module has a function of gamma value setting. In the case where the adjustment basis information corresponding to the target display is not included in the display object, the brightness adjustment of the target display can be performed by using the function of gamma value setting.

[0210] Reference Figure 3 FIG. 6 shows a flowchart of steps of a brightness adjustment method 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] In step 301, the brightness adjustment service is started and connected to a display service according to an environment parameter.

[0212] After being started, the brightness adjustment service can read the environment parameter. The environment parameter specifically includes the name of the display service and other information. If the name of the display service is Xorg, the brightness adjustment service can be connected to the display service Xorg. If the name of the display service is Wayland, the brightness adjustment service can be connected to the display service Wayland.

[0213] The embodiment of the present application can further 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 performed. If the current display service is not running normally, the brightness adjustment service can be exited.

[0214] In step 302, the related information of the display is obtained by 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, the command line tool and the device file directory are available. If they are available and can be accessed normally, the related information of the display can be obtained.

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

[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 indicated that the corresponding display supports the brightness adjustment means corresponding to APCI.

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

[0219] The embodiments of the present application can parse and store the acquisition results of each successfully running tool respectively.

[0220] Further, the information acquired by each tool can be compared one by one according to the master and slave device numbers, names, manufacturers, versions, dates, interface information, etc. in a union set manner, to confirm the full amount of information of the display, and to correspond to the display based on the display model.

[0221] Step 303, saving the related information of the display into the display object;

[0222] Step 304, listening to and processing display events and service running related events;

[0223] The service running related events specifically include forced stop, abnormal error, etc. signals related to service running. When the brightness adjustment is about to exit, the preset data such as log, display configuration (configuration in the policy file), other running parameters of the service, etc. are saved, to realize the keep-alive of the brightness adjustment service.

[0224] The display events mainly cover the hot plug and abnormal loss of the display. When the insertion operation based on the display is used to add a display, the related information of the added display is acquired by means of step 302. When the removal operation based on the display causes the reduction of the display, the display object of the reduced display needs to be cleaned up, and the related configuration parameters of the reduced display such as the brightness range, the policy file, etc. are properly saved.

[0225] Step 305, loading the brightness adjustment related module;

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

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

[0228] The ACPI adaptation module realizes the 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 to be loaded according to the obtained display driver information in the display object. After obtaining KMS access and configuration permissions through necessary interaction with the display service, the brightness of the display is set by the brightness adjustment function implemented by the display driver through input and output control.

[0230] The display driver of the Linux system can include both full open source implementation and partial open source implementation. Among them, the display driver (mesa) is implemented by reverse engineering in the full open source implementation. Therefore, the brightness adjustment component can adapt to different display drivers, and then implement the brightness adjustment function corresponding to different display drivers for brightness adjustment.

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

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

[0233] It should be noted that if the display driver information corresponding to the display cannot be obtained in the display object, the commonly used display driver can be loaded and verified by the corresponding function to determine whether the commonly used display driver is valid. If it is valid, the brightness adjustment component corresponding to the commonly used display driver can be obtained.

[0234] The display driver adaptation module can also adjust the brightness according to the related function provided by the display driver for gamma value setting, to adjust the brightness in the case where the above brightness adjustment means (first brightness adjustment means and 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 can 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 can include the step size of each brightness adjustment means.

[0237] The above policy information can be calculated according to the gamma value, within the brightness range of the display, to better adapt to the perception of the human eye to the brightness.

[0238] The strategy information can determine the calculation method of the brightness adjustment step size in the multi-adjustment mode, and realize dynamic adjustment of the brightness adjustment step size through the proportion of one or more adjustment methods in different brightness adjustment ranges. In this case, the actual adjustment capability of the display is also taken into account.

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

[0240] In step 306, according to the strategy information, any one or a combination of the DDC adaptation module, the ACPI adaptation module, and the display driver adaptation module is called for the brightness adjustment request.

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

[0242] The embodiments of the present application can support the combination of multiple brightness adjustment methods. After adjusting the brightness using the DDC adaptation module, the ACPI adaptation module, and the display driver adaptation module, if the adjusted brightness value of the target display does not meet the preset condition, the supplementary brightness adjustment of the target display can be performed according to the gamma correction method.

[0243] In the case where the client of the third-party application adjusts the brightness of the display, any one of the DDC adaptation module, the ACPI adaptation module, and the display driver adaptation module will perceive the brightness change as an internal event to the event loop processing mechanism and respond to the event. The process of responding to the event can include: judging whether the adjusted brightness value of the target display meets the preset condition, and if not, performing supplementary brightness adjustment of the target display according to the gamma correction method.

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

[0245] It should be noted that for the method embodiments, the series of acts complement each other to achieve the purpose of this application, therefore, the sequence of the acts should not be construed as a limitation on the implementation of the application. In addition, those skilled in the art should understand that the acts described in the specification are only preferred acts, and not all acts are necessary for the implementation of the application.

[0246] On the basis of the above-mentioned embodiments, the present embodiment further provides a brightness adjustment device, referring to the structure schematic diagram shown in the figure, the device specifically comprises: 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. Figure 4

[0247] The information acquisition module 401 is configured to acquire the related information of the display by using a hardware detection tool, a command line tool and a device file directory; the related information comprises device information of the display, drive information corresponding to the display and brightness adjustment mode information corresponding to the display; in the case that the device file directory exists and is not empty, it is indicated 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 storage module 402 is configured to store the related information of the display into a display object.

[0249] The request receiving module 403 is configured to receive a brightness adjustment request; the brightness adjustment request comprises a target display to be adjusted.

[0250] The information acquisition module 404 is configured to acquire the 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 drive information.

[0251] The first brightness adjustment module 405 is configured to perform brightness adjustment of the target display according to the adjustment basis information.

[0252] The second brightness adjustment module 406 is configured to perform brightness adjustment of the target display according to a gamma correction mode in the case that the display object does not contain the adjustment basis information corresponding to the target display.

[0253] Optionally, the adjustment basis information corresponding to the target display is acquired from the display object according to a preset priority; the preset priority comprises a first priority corresponding to the brightness adjustment mode information and the drive information. ​

[0254] The information obtaining module comprises:

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

[0256] The second information obtaining module is configured to, if the first priority corresponding to the brightness adjustment mode information is lower than the first priority corresponding to the driving information, obtain the target driving information corresponding to the target display from the display object, and if the target driving information corresponding to the target display is not included in the display object, obtain the target brightness adjustment mode information corresponding to the target display from the display object.

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

[0258] Optionally, the apparatus further comprises:

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

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

[0261] The component determination and loading module is configured to determine and load a brightness adjustment component of display driving interface according to the target driving information.

[0262] The function calling module is configured to call a brightness adjustment function provided by the brightness adjustment component according to display service, so as to realize brightness adjustment of the target display.

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

[0264] The adjusting according to the information comprises: first brightness adjusting mode information and second brightness adjusting mode information; the first brightness adjusting mode information corresponds to a first brightness range [a, b] and a first step length s1, and the second brightness adjusting mode information corresponds to a second brightness range [c, d] and a second step length s2; b and d are 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 adjusting module comprises:

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

[0267] a second adjusting module, configured to adjust the brightness value of the target display from b to the target brightness value by using the second brightness adjusting mode information.

[0268] Optionally, the target display comprises: 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 further comprises:

[0270] an intersection module, configured to obtain a target brightness range by intersecting the third brightness range and the fourth brightness range;

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

[0272] a target brightness value adjusting module, configured to adjust the target brightness value of the target display to the target brightness range in a case where the target brightness value of the target display is not located in the target brightness range.

[0273] Optionally, the information obtaining module comprises:

[0274] a first obtaining module, configured to obtain the related information of the display by using at least one hardware detection tool, to obtain a first obtaining result;

[0275] a second obtaining module, configured to obtain the related information of the display by using at least one command line tool, to obtain a second obtaining result;

[0276] a third obtaining module, configured to obtain the related information of the display by using at least one device file directory, to obtain a third obtaining result;

[0277] a fusion module, configured to fuse the first obtaining result, the second obtaining result and the third obtaining result, to obtain the related information of the display.

[0278] The embodiments of the present application further provide a non-volatile readable storage medium, which stores one or more programs, and when the one or more programs are applied to a device, the device can execute instructions of steps of the methods in the embodiments of the present application.

[0279] The embodiments of the present application provide one or more machine readable media, which store instructions, and when executed by one or more processors, make an electronic device execute the methods in one or more of the above embodiments. In the embodiments of the present application, the electronic device includes terminal devices, servers (clusters), and other types of devices.

[0280] The embodiments of the present disclosure can be implemented as an apparatus configured in a desired manner using any appropriate hardware, firmware, software, or any combination thereof, which can include terminal devices, servers (clusters), and other electronic devices. Figure 5 An exemplary apparatus 1100 that can be used to implement various embodiments described herein is shown schematically.

[0281] For one embodiment, Figure 5 An exemplary apparatus 1100 is shown having one or more processors 1102, a control module (chipset) 1104 coupled to at least one of the processor(s) 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(s) 1102 can include one or more single core or multi core processors, which can include any combination of general-purpose processors or dedicated processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 1100 can function as a terminal device, a server (cluster), or other device as described in the embodiments of the present application.

[0283] In some embodiments, the apparatus 1100 can include one or more computer readable media (such as the memory 1106 or the non-volatile memory / storage device 1108) having instructions 1114 and one or more processors 1102 that are in operative communication with the one or more computer readable media and are configured to execute the instructions 1114 to implement modules to perform the actions described in the present disclosure.

[0284] For one embodiment, the control module 1104 can include any suitable interface controllers to provide for 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 can include a memory controller module to provide an interface to the memory 1106. The memory controller module can be a hardware module, a software module, and / or a firmware module.

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

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

[0288] The non-volatile memory / storage device 1108 can be used to, for example, store data and / or instructions 1114. The non-volatile memory / storage device 1108 can include any suitable non-volatile memory (e.g., flash memory) and / or can 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 disk drives).

[0289] The non-volatile memory / storage device 1108 can include a storage resource physically part of a device on which the apparatus 1100 is installed or it can be accessible by the device, such as by access over a network, without being physically part of the device. For example, the non-volatile memory / storage device 1108 can be accessed by the apparatus 1100 through the input / output device(s) 1110 via a network.

[0290] The input / output device(s) 1110 can provide an interface between the apparatus 1100 and any other appropriate device for communicating with the apparatus 1100, which can include a communication component, an audio component, a sensor component, and the like. The network interface 1112 can provide an interface between the apparatus 1100 and one or more networks for communicating with the apparatus 1100, which can communicate wirelessly with one or more components of a wireless network in accordance with any of one or more wireless network standards and / or protocols, such as accessing a wireless network based on a communication standard, such as WiFi (WIreless Fidelity), 2G (2-Generation wireless telephone technology), 3G (3-Generation wireless telephone technology), 4G (4-Generation wireless telephone technology), 5G (5-Generation wireless telephone technology), and the like, or a combination thereof.

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

[0292] In various embodiments, the apparatus 1100 can be, but is not limited to, 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.) an end device. In various embodiments, the apparatus 1100 can have more or less components, and / or different architectures. For example, in some embodiments, the apparatus 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, an application specific integrated circuit, and a speaker.

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

[0294] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts are described in the method embodiment.

[0295] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same and similar parts between the embodiments can be referred to each other.

[0296] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams according to the method, terminal device (system), and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate the device for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram.

[0297] These computer program instructions can also be stored in a computer readable memory that can guide the computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer readable memory generate a product including instruction devices, which implement the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram.

[0298] These computer program instructions can also be loaded into a computer or other programmable data processing terminal device, so that a series of operation steps are performed on the computer or other programmable terminal device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram.

[0299] Although the preferred embodiments of the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the appended claims are intended to include the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

[0300] Finally, it is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting; it is not intended to exclude myriad other embodiments of the present application that other inventors can develop based on the same general inventive concepts embodied by the present application. That is, although the present application is described in terms of particular embodiments and implementations, it is to be understood that the terminology used is for the purpose of descriptive clarity and that it should be taken in its broadest possible sense. For example, the terms "first" and "second" are used herein only to differentiate one element from another, without necessarily requiring or implying any actual relationship or order between or among the elements. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0301] The above provides a brightness adjustment method and device, an electronic device and a machine readable medium. The principles and implementation manners of the present application are described by using specific examples. The above examples are only used to help understand the method and core idea of the present application. For those skilled in the art, according to the idea of the present application, the specific implementation manners and applications can be changed. The above description should not be understood as a limitation of the present application.

Claims

1. A luminance adjustment method characterized by, The method comprises: obtaining relevant information of the display by using a hardware detection tool, a command line tool and a device file directory; the relevant information comprises device information of the display, driving information corresponding to the display and brightness adjustment mode information corresponding to the display; wherein, in the case that the device file directory exists and is not empty, it is indicated that the display supports the brightness adjustment mode corresponding to the device file directory, and thus the corresponding brightness adjustment mode information is successfully obtained; saving the relevant information of the display into a display object; receiving a brightness adjustment request; the brightness adjustment request comprises a target display to be adjusted; 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; performing brightness adjustment of the target display according to the adjustment basis information; in the case that the adjustment basis information corresponding to the target display is not included in the display object, performing brightness adjustment of the target display according to a gamma correction mode.

2. The method of claim 1, wherein, obtaining adjustment basis information corresponding to the target display from the display object according to a preset priority; the preset priority comprises a first priority corresponding to the brightness adjustment mode information and the driving information; the obtaining of the adjustment basis information corresponding to the target display from the display object comprises: if the first priority corresponding to the brightness adjustment mode information is higher than the first priority corresponding to the driving information, obtaining target brightness adjustment mode information corresponding to the target display from the display object, and in the case that the target brightness adjustment mode information corresponding to the target display is not included in the display object, obtaining target driving information corresponding to the target display from the display object; or if the first priority corresponding to the brightness adjustment mode information is lower than the first priority corresponding to the driving information, obtaining target driving information corresponding to the target display from the display object, and in the case that the target driving information corresponding to the target display is not included in the display object, obtaining target brightness adjustment mode information corresponding to the target display from the display object.

3. The method of claim 2, wherein, the preset priority further comprises second priorities corresponding to a plurality of brightness adjustment mode information respectively, and / or third priorities corresponding to a plurality of driving information respectively.

4. The method of claim 1, wherein, the method further comprises: after monitoring a brightness change event of the target display, if an adjusted brightness value of the target display does not meet a preset condition, performing supplementary brightness adjustment of the target display according to a gamma correction mode.

5. The method of claim 1, wherein, the adjustment basis information is target driving information, and the performing of the brightness adjustment of the target display according to the adjustment basis information comprises: determining and loading a brightness adjustment component of display driving docking according to the target driving information; calling a brightness adjustment function provided by the brightness adjustment component according to a display service, so as to realize the brightness adjustment of the target display.

6. The method of claim 1, wherein, the brightness adjustment request further comprises a target brightness value of the target display. The adjustment basis information comprises: 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 size s1, and the second brightness adjustment mode information corresponds to a second brightness range [c, d] and a second step size s2; b and d are greater than the source brightness value; d is not less than the target brightness value; the first step size s1 is greater than the second step size s2; The brightness adjustment of the target display according to the adjustment basis information comprises: adjusting the brightness value of the target display from the source brightness value to b by using the first brightness adjustment mode information; adjusting the brightness value of the target display from b to the target brightness value by using the second brightness adjustment mode information.

7. The method of claim 1, wherein, The target display comprises: 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: intersecting 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 determines the target brightness value of the target display in the target brightness range; in the case that the target brightness value of the target display is not located in the target brightness range, adjusting the target brightness value to the target brightness range.

8. The method of claim 1, wherein, The related information of the display is acquired by using the hardware detection tool, the command line tool and the device file directory, and the related information comprises: at least one hardware detection tool is used to acquire the related information of the display to obtain a first acquisition result; at least one command line tool is used to acquire the related information of the display to obtain a second acquisition result; at least one device file directory is used to acquire the related information of the display to obtain a third acquisition result; the first acquisition result, the second acquisition result and the third acquisition result are fused to obtain the related information of the display.

9. A luminance adjusting apparatus characterized by comprising: The device comprises: an information acquisition module, configured to acquire the related information of the display by using the hardware detection tool, the command line tool and the device file directory; the related information comprises: device information of the display, driving information corresponding to the display, and brightness adjustment mode information corresponding to the display; wherein, in the case that the device file directory exists and is not empty, it is indicated that the display supports the brightness adjustment mode corresponding to the device file directory, and then the corresponding brightness adjustment mode information is successfully acquired; an information saving module, configured to save the related information of the display into a display object; a request receiving module, configured to receive a brightness adjustment request; the brightness adjustment request comprises: a target display to be adjusted; an information acquisition module, configured to acquire the adjustment basis information corresponding to the target display from the display object; the type of the adjustment basis information comprises: brightness adjustment mode information and / or driving information; a first brightness adjustment module, configured to perform brightness adjustment of the target display according to the adjustment basis information. A second brightness adjustment module is configured to, when the display object does not contain the adjustment basis information corresponding to the target display, perform brightness adjustment of the target display according to a gamma correction mode.

10. An electronic device, comprising: Comprising: a processor; and a memory having stored thereon executable code that, when executed, is effective to cause the processor to perform the method of any of claims 1-8.

11. A machine-readable medium having stored thereon executable code that, when executed, is effective to cause a processor to perform the method of any of claims 1-8.

Citation Information

Patent Citations

  • Automatic gamma correction of input source content

    CN101682684A

  • Display device and display method thereof

    CN101739973A