Mobile terminal multi-source backlight control method and device and storage medium

By locking the backlight function of the display screen and verifying that the source is legal, the problem of backlight control command conflicts in multi-station detection is solved, precise control and abnormal protection of the backlight of the mobile terminal display screen is achieved, and detection efficiency and product quality are improved.

CN120048224AActive Publication Date: 2025-05-27SHENZHEN HONOR SMART MASCH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510386856.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-05-27
Estimated Expiration
2045-03-31

AI Technical Summary

Technical Problem

In the multi-station detection scenario of mobile terminals, backlight control instructions from multiple sources are likely to cause conflicts in the adjustment of the display backlight value, which in turn causes production line shutdown, low detection efficiency and product defect rate to increase.

Method used

By locking the backlight function of the display screen, cache the current backlight value and verify whether the source of the backlight instruction is legal. Only adjust the backlight value under the command of the legal source to ensure that the cached backlight value is restored after the screen detection is completed.

Benefits of technology

Accurate control and abnormal protection of backlights from multiple sources are achieved, avoiding the risk of line shutdown, and improving station detection efficiency and product yield.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120048224A_ABST
    Figure CN120048224A_ABST
Patent Text Reader

Abstract

The invention provides a mobile terminal multi-source backlight control method and device and a storage medium. According to the method, under the condition that a backlight instruction is received, the backlight value is set only according to the backlight instruction issued by a service process of a legal source in the backlight locking period of the mobile terminal by locking the backlight function of a display screen. Therefore, in the screen detection process, other applications and services cannot modify the backlight value, so that accurate control and abnormal protection of backlight from various sources are realized, the line stop risk is avoided, and the station detection efficiency and the product yield are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of mobile terminals, and particularly to a multi-source backlight control method, device, and storage medium for mobile terminals. Background Art

[0002] Currently, in order to improve the human-computer interaction experience, more and more mobile terminals are equipped with display modules. To ensure the product quality of these mobile terminals, various station detections need to be performed on the display modules of the mobile terminals during the production process. For example, screen function detection, screen aging test, screen display picture defect detection, etc.

[0003] Since these station detections all require backlight control of the display module (display screen) of the mobile terminal, in the scenario of multi-station detection, there will be conflicts in adjusting the backlight value (brightness information) of the display screen by backlight control instructions from multiple sources, which will lead to line stoppage, low station detection efficiency, and even missed detection of defective products, resulting in an increase in the product defect rate. Summary of the Invention

[0004] To solve the above technical problems, embodiments of this application provide a multi-source backlight control method, device, and storage medium for mobile terminals, aiming to achieve precise control and abnormal protection of backlights from multiple sources, avoid the risk of line stoppage, and improve the station detection efficiency and product yield.

[0005] In a first aspect, embodiments of this application provide a multi-source backlight control method for mobile terminals, which is applied to mobile terminals. The mobile terminal includes a display screen. The method includes: when receiving a backlight instruction, locking the backlight function of the display screen of the mobile terminal and caching the current first backlight value of the display screen; verifying whether the source of the backlight instruction is legal according to the process identifier of the service process that issues the backlight instruction; when the source of the backlight instruction is legal, setting the backlight value of the display screen to a second backlight value according to the backlight instruction, and performing a screen detection on the display screen; after completing the screen detection on the display screen, unlocking the backlight function and setting the backlight value of the display screen according to the cached backlight value.

[0006] Among them, locking the backlight function of the display screen of the mobile terminal means that after the backlight function is locked, the display screen remains backlit constantly. Subsequently, it is simply referred to as locking the backlight.

[0007] Among them, the screen detection performed on the display screen is determined by generating a backlight instruction with a legal source.

[0008] For example, when the backlight instruction with a legal source is triggered and generated by the screen function detection station, the screen detection performed on the display screen is the detection of the screen detection function, such as performing a white screen detection and a black screen detection on the screen.

[0009] For another example, when the backlight instruction with a legal source is triggered and generated at the screen aging test station, the screen detection performed on the display screen is a screen aging test.

[0010] For another example, when the backlight instruction with a legal source is triggered and generated at the screen display picture defect detection station, the screen detection performed on the display screen is a screen display picture defect detection.

[0011] Among them, when the first backlight value is the locked backlight, it is the current backlight value of the display screen. For example Figure 9A the shown backlight value BN0, Figure 9B the shown backlight value BN5.

[0012] Among them, the second backlight value is the backlight value corresponding to the backlight instruction from a legal source during the locked backlight period. In specific applications, there can be multiple second backlight values. That is, the backlight values corresponding to the backlight instructions from legal sources received during the locked backlight period can all be described as the second backlight value. For example Figure 9A the shown backlight values BN1, backlight value BN2, backlight value BN3, backlight value BN4, Figure 9B the shown backlight values BN6, backlight value BN9, etc.

[0013] Among them, the backlight value can include the brightness parameters of the screen, such as the maximum brightness, excitation brightness, or indicators related to the backlight technology, such as the blue light radiation amount, dimming frequency, etc.

[0014] Thus, when a backlight instruction is received, by locking the backlight function of the display screen and setting that during the locked backlight period of the mobile terminal, only the backlight instruction issued by the service process from a legal source is allowed to set the backlight value. In this way, during the screen detection process, other applications and services cannot modify the backlight value, thereby achieving precise control and abnormal protection of backlights from multiple sources, avoiding the risk of production line stoppage, and improving the detection efficiency of the station and the yield of products.

[0015] According to the first aspect, the method further includes: caching the third backlight value corresponding to the backlight instruction when the source of the backlight instruction is illegal.

[0016] In this way, it is possible to avoid the problem that the backlight value changes due to the modification of the backlight value by an illegal source backlight instruction during the screen detection process, resulting in a jump in the screen brightness.

[0017] According to the first aspect, or any one of the above implementation manners of the first aspect, setting the backlight value of the display screen according to the cached backlight value includes: setting the backlight value of the display screen according to the latest cached backlight value.

[0018] In this way, it is possible to achieve precise control and abnormal protection for backlights from multiple sources. After unlocking the lock on the backlight function of the display screen, the backlight value of the display screen can be promptly set to the backlight value adjusted by the most recent service or system, thereby ensuring the normal execution of other services.

[0019] According to the first aspect, or any implementation manner of the above first aspect, setting the backlight value of the display screen according to the latest cached backlight value includes: when the latest cached backlight value is the first backlight value, setting the backlight value of the display screen to the first backlight value; when the latest cached backlight value is the third backlight value, setting the backlight value of the display screen to the third backlight value.

[0020] Among them, the third backlight value is the backlight value corresponding to an illegal source backlight instruction during the backlight locking period. In a specific application, there may be multiple third backlight values. That is, the backlight values corresponding to the illegal source backlight instructions received during the backlight locking period can all be described as the third backlight value. For example Figure 9B The shown backlight values BN7, BN8, etc.

[0021] It can be understood that the cached backlight values are cached in sequence according to the order. That is, the backlight value of the illegal source backlight instruction received first is cached first, and the backlight value of the illegal source backlight instruction received later is cached later. When reading the cached backlight value, the last cached one is read out first. That is, the latest cached backlight value is the last cached backlight value.

[0022] In this way, by introducing a dynamic caching and recovery mechanism and combining the caching mechanism with active intervention at the driver layer, seamless switching of the brightness state before and after testing is ensured, thereby improving the production line testing efficiency.

[0023] According to the first aspect, or any implementation manner of the above first aspect, verifying whether the source of the backlight instruction is legal according to the process identifier of the service process that issues the backlight instruction includes: when the process identifier of the service process that issues the backlight instruction matches the process identifier recorded in the process identifier whitelist saved in the mobile terminal, determining that the source of the backlight instruction is legal. The process identifiers recorded in the process identifier whitelist are legal process identifiers generated during the initialization stage of the mobile terminal, and the backlight instructions issued by the service processes corresponding to the legal process identifiers are from legal sources.

[0024] Among them, the legal process identifier, such as the PID of Hwdisplay mentioned in the following embodiments, such as PID1.

[0025] Regarding the specific implementation details of this aspect, reference can be made to Figure 8 The description part of step S604 in the shown embodiments, which will not be elaborated here for the time being.

[0026] In this way, legal-source backlight instructions can be quickly and accurately filtered out, thus achieving precise control of backlights from multiple sources.

[0027] According to the first aspect, or any implementation manner of the above first aspect, before receiving a backlight instruction, the method further includes: during the initialization stage of the mobile terminal, starting a driver related to the display screen; when the driver related to the display screen is ready, initializing a service process corresponding to the screen detection function, allocating a process identifier to the service process corresponding to the screen detection function, and saving the process identifier of the service process corresponding to the screen detection function to the process identifier whitelist.

[0028] Among them, the initialization stage is, for example, the system startup or service restart stage.

[0029] Among them, the driver related to the display screen is, for example, a driver that can interact through Hwdisplay, such as Backlight Driver, SDE Driver, LCDkit Driver, etc.

[0030] Among them, the service process corresponding to the screen detection function is, for example, a service process that enables the screen detection application in the application layer to interact with the driver layer, such as Hwdisplay.

[0031] Regarding the specific implementation details of this aspect, reference can be made to Figure 7 the description part of steps S501 to S503 in the illustrated embodiment, which will not be elaborated here for the time being.

[0032] In this way, after the driver related to the display screen is ready, by initializing Hwdisplay, Hwdisplay can subsequently receive backlight instructions from the screen detection application in the application layer and send the received backlight instructions to BacklightDriver, enabling Backlight Driver to determine whether the PID corresponding to the currently received backlight instruction is PID1 saved during the initialization stage. Furthermore, it can be determined whether the source of the currently received backlight instruction is legal.

[0033] According to the first aspect, or any implementation manner of the above first aspect, the method further includes: when the driver related to the display screen is not ready, after the unified display interface is first called, initializing a service process corresponding to the screen detection function, allocating a process identifier to the service process corresponding to the screen detection function, and saving the process identifier of the service process corresponding to the screen detection function to the process identifier whitelist.

[0034] Regarding the specific implementation details of this aspect, reference can be made to Figure 7In the description parts of step S504 and step S503 in the illustrated embodiment, they will not be elaborated here for the time being.

[0035] In this way, it can be ensured that the PIDs from legal sources are saved to the whitelist (process identifier whitelist), and duplicate saving can be avoided, which may cause data redundancy and reduce resource occupancy.

[0036] According to the first aspect, or any implementation manner of the above first aspect, locking the backlight function of the display screen of the mobile terminal includes: determining whether the mobile terminal supports locking the backlight function of the display screen; in the case that the mobile terminal supports locking the backlight function of the display screen, setting the flag bit corresponding to the backlight function of the display screen to a first identifier, where the first identifier is used to indicate that the backlight function of the display screen is in a locked state.

[0037] Regarding the specific implementation details of this aspect, reference can be made to Figure 8 the description parts of step S601 and step S603 in the illustrated embodiment, and Figure 6 the description parts of step a and step b in

[0038] In this way, by modifying the identification information of the flag bit corresponding to the backlight function of the display screen, the backlight function can be quickly locked.

[0039] According to the first aspect, or any implementation manner of the above first aspect, determining whether the mobile terminal supports locking the backlight function of the display screen includes: determining whether a process identifier whitelist is saved in the mobile terminal, where the process identifiers recorded in the process identifier whitelist are legal process identifiers generated during the initialization stage of the mobile terminal, and the sources of the backlight instructions issued by the service processes corresponding to the legal process identifiers are legal.

[0040] Regarding the specific implementation details of this aspect, reference can be made to Figure 6 the description part of step a in

[0041] In this way, it can be quickly determined whether the display screen of the mobile terminal currently supports locking the backlight function.

[0042] According to the first aspect, or any implementation manner of the above first aspect, unlocking the backlight function includes: setting the flag bit corresponding to the backlight function of the display screen to a second identifier, where the second identifier is used to indicate that the backlight function of the display screen is in an unlocked state.

[0043] Regarding the specific implementation details of this aspect, reference can be made to Figure 8 the description part of step S607 in the illustrated embodiment, which will not be elaborated here for the time being.

[0044] In this way, by modifying the identification information of the flag bit corresponding to the backlight function of the display screen, the locking of the backlight function can be quickly unlocked, so as to restore the backlight control permission of the service process of the PID outside the whitelist to the display screen. That is, the display screen of the mobile terminal can adjust the backlight value of the display screen according to the backlight instruction sent by the service process of the PID outside the whitelist.

[0045] According to the first aspect, or any implementation manner of the above first aspect, after locking the backlight function of the display screen of the mobile terminal, the method further includes: when the display screen is turned off, clearing the identification information of the flag bit corresponding to the backlight function of the display screen, or modifying the identification information from the first identification to the second identification, where the first identification is used to indicate that the backlight function of the display screen is in a locked state, and the second identification is used to indicate that the backlight function of the display screen is in an unlocked state.

[0046] In this way, when it is monitored that a screen-off event occurs and the flag bit for locking the backlight is automatically cleared, by clearing the currently corresponding identification information of the flag bit of the backlight function, or modifying the current identification information to the second identification, the locking of the backlight function can be unlocked, avoiding the situation where the backlight function is locked due to an abnormal service process, thereby enhancing the system fault tolerance.

[0047] In a second aspect, an embodiment of the present application provides a multi-source backlight control system for a mobile terminal. The system is applied to a mobile terminal and is used to make the mobile terminal execute the instructions of the method in the first aspect or any possible implementation manner of the first aspect.

[0048] In a third aspect, an embodiment of the present application provides a mobile terminal. The mobile terminal includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the mobile terminal executes the instructions of the method in the first aspect or any possible implementation manner of the first aspect.

[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable medium for storing a computer program, where the computer program includes instructions for executing the method in the first aspect or any possible implementation manner of the first aspect.

[0050] In a fifth aspect, an embodiment of the present application provides a computer program, where the computer program includes instructions for executing the method in the first aspect or any possible implementation manner of the first aspect.

[0051] Sixth aspect, an embodiment of the present application provides a chip, which includes a processing circuit and transceiver pins. Among them, the transceiver pins and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation manner of the first aspect to control the receiving pin to receive a signal and control the transmitting pin to transmit a signal. Description of the Drawings

[0052] Figure 1 Schematic diagram of a mobile terminal with a display screen shown for illustration purposes; Figure 2 Schematic diagram of a station detection performed on the display screen of a mobile terminal on a production line shown for illustration purposes; Figure 3A Schematic diagram of a screen aging test performed on the display screen of a mobile terminal shown for illustration purposes; Figure 3B Schematic diagram of a screen display image defect detection performed on the display screen of a mobile terminal shown for illustration purposes; Figure 3C Schematic diagram of a screen function detection performed on the display screen of a mobile terminal shown for illustration purposes; Figure 4 Schematic diagram of the hardware structure of a mobile terminal with a display screen shown for illustration purposes; Figure 5 Schematic diagram of the software structure of a mobile terminal with a display screen shown for illustration purposes; Figure 6 Schematic diagram of the flow of a mobile terminal multi-source backlight control method shown for illustration purposes; Figure 7 Schematic diagram of the processing logic for saving legal source PIDs during the initialization phase of a mobile terminal in a mobile terminal multi-source backlight control method shown for illustration purposes; Figure 8 Schematic diagram of the processing logic for locking and unlocking the backlight in a mobile terminal multi-source backlight control method shown for illustration purposes; Figure 9A Schematic diagram of caching backlight values based on a mobile terminal multi-source backlight control method shown for illustration purposes; Figure 9B Another schematic diagram of caching backlight values based on a mobile terminal multi-source backlight control method shown for illustration purposes. Detailed Description of the Embodiments

[0053] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0054] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone.

[0055] The terms "first" and "second" in the description of the embodiments of the present application and the claims are used to distinguish different objects, rather than to describe a specific order of the objects. For example, the first target object and the second target object are used to distinguish different target objects, rather than to describe the specific order of the target objects.

[0056] In the description of the embodiments of the present application, words such as "exemplary", "for example", or "optionally" are used to give examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary", "for example", or "optionally" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly, using words such as "exemplary", "for example", or "optionally" is intended to present relevant concepts in a specific manner.

[0057] In the description of the embodiments of the present application, the naming of various controls, regions, options, and entrances is only for illustration and does not limit the embodiments of the present application. That is, in actual use, it can also be described by other names.

[0058] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality of" refers to two or more. For example, a plurality of processing units refers to two or more processing units; a plurality of systems refers to two or more systems.

[0059] In the description of the embodiments of the present application, unless otherwise specified, at the same moment, only one user interface can be displayed. For example, when the display interface 102 is displayed, the interface 104 will not be displayed on the current screen. Conversely, when the display interface 104 is displayed, the interface 102 will not be displayed on the current screen. However, the elements included in different interfaces can be the same.

[0060] In the description of the embodiments of the present application, unless otherwise specified, the dotted lines shown in the drawings are only for illustration. That is, in actual use, they are not displayed.

[0061] Currently, in order to improve the human-computer interaction experience, more and more mobile terminals are equipped with display modules. Specifically, in the embodiments of the present application, the display module takes the display screen of the mobile terminal as an example. Among them, these mobile terminals, for example, are Figure 1 the mobile phone 100 shown in (1) in Figure 1 and the tablet computer 200 shown in (2) in

[0062] etc. The display modules equipped by these mobile terminals, for example, are the display screen 101 of the mobile phone 100, the display screen 201 of the tablet computer 200, etc.

[0063] Exemplarily, in some implementation manners, various station detections performed on the display screen of the mobile terminal can be implemented through different detection functions. For example Figure 2 the first detection station, the second detection station, the third detection station, etc. shown in

[0064] Taking the first detection station as the detection station for implementing the screen aging test as an example, when performing the screen aging test on the display screen 101 of the mobile terminal, such as the mobile phone 100, the personnel or equipment at the first detection station can trigger the icon of the application for performing the screen aging test on the user interface displayed by the display screen 101, such as clicking Figure 3A the icon 103 on the interface 102 displayed by the display screen 101 shown in (1) in Figure 3A so that the mobile phone 100 responds to this operation, starts the application for performing the screen aging test, and displays the corresponding test interface, such as Figure 3A the interface 104 shown in (2) in During the process of performing the screen aging test, the mobile phone 100 will call the backlight control interface specifically used for performing the screen aging test (subsequently referred to as: the first backlight control interface), issue the corresponding backlight instruction, and implement the adjustment of the backlight value (brightness information) of the display screen, thereby implementing the screen aging test.

[0065] Among them, after the screen aging test passes (the screen meets the aging test requirements and the test is qualified), the display screen 101 can display the corresponding test qualified interface. In some implementation manners, the screen aging test qualified interface can be represented by green.

[0066] Correspondingly, after the screen aging test fails (the screen does not meet the aging test requirements and the test is unqualified), the display screen 101 can display the corresponding test unqualified interface. In some implementation manners, the screen aging test unqualified interface can be represented by red for the user.

[0067] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment, and does not serve as the sole limitation to this embodiment.

[0068] Taking the second detection station as an example, which is used to implement the detection of screen display picture defects, when detecting the screen display picture defects of the display screen 101 of a mobile terminal, such as a mobile phone 100, the personnel or equipment at the second detection station can, through the dialing interface displayed on the display screen 101, such as Figure 3B the interface 105 shown in (1) in, input specific engineering instructions, such as "*#2846#", so that the mobile phone 100 responds to this operation and enters the screen display picture defect detection mode, and displays the corresponding user interface, such as Figure 3B the interface 106 shown in (2) in. After the interface 106 is displayed, the personnel or equipment at the second detection station can trigger the detection of screen display picture defects in different scenarios by pressing the mechanical keys on the frame of the mobile phone 100, such as the volume keys, the power-on key, etc. During the process of detecting the screen display picture defects, the mobile phone 100 will call the backlight control interface specifically used for detecting the screen display picture defects (subsequently referred to as: the second backlight control interface), issue the corresponding backlight instructions, and realize the adjustment of the backlight value (brightness information) of the display screen, so as to realize the detection of screen display picture defects.

[0069] Among them, the engineering instruction "*#2846#" is only for illustration. In some implementation manners, for different mobile terminals of different manufacturers and different models, different engineering instructions can be pre-configured so that different mobile terminals can realize the detection of screen display picture defects at the second detection station.

[0070] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment, and does not serve as the sole limitation to this embodiment.

[0071] Taking the third detection station as an example, which is used to implement the screen function detection, when detecting the screen function of the display screen 101 of a mobile terminal, such as a mobile phone 100, the personnel or equipment at the third detection station can place the mobile phone 100 on the screen function detection device specifically for screen function detection, such as placing it on Figure 3C the station drawer 301 of the screen function detection device shown in, and orient the display screen 101 of the mobile phone 100 towards the chromaticity meter 302 of the screen function detection device.

[0072] It should be understood that Figure 3CFor illustrative purposes only. In actual applications, the screen function detection device may further include a dust removal light source. In this way, during the screen function detection process, by irradiating with a specific light source, dust particles in the air can be charged. Subsequently, under the action of the electric field force, these charged particles can be adsorbed onto the dust collecting plate of the screen function detection device, thereby achieving the dust removal effect and avoiding interference of the dust on the display screen 101 with the detection results.

[0073] In addition, it should be noted that when performing screen function detection on the display screen 101 of the mobile phone 100, the mobile phone 100 can also be communicatively connected to the control device. In this way, by calling the backlight control interface specifically used for screen function detection (subsequently referred to as: the third backlight control interface), the control device can issue corresponding backlight instructions through the communication link with the mobile phone 100 to adjust the backlight value (brightness information) of the display screen 101 of the mobile phone 100, and further achieve screen function detection, such as white screen test and black screen test.

[0074] Among them, the white screen test can include tests such as white screen color temperature, color uniformity, brightness uniformity, center point brightness, white screen point defects, white screen dirt, white screen horizontal stripes, white screen vertical stripes, white screen light leakage, white screen black blocks, white screen black shadows, etc.

[0075] Among them, the black screen test can include tests such as black screen light leakage, black screen bright spots, etc.

[0076] It should be understood that the above description is only an example listed for better understanding of the technical solution of this embodiment and does not serve as the sole limitation of this embodiment.

[0077] Through the above combination Figures 3A to 3C of the description, it can be seen that for these station detections, backlight control of the display screen of the mobile terminal is required. However, the backlight control interfaces called by different detection stations are not the same.

[0078] In addition, it should be noted that there are also dedicated backlight control interfaces in some system services, applications, or third-party applications (applications not developed by the terminal manufacturer) in the mobile terminal.

[0079] This leads to conflicts in the adjustment of the backlight value (brightness information) of the display screen caused by backlight control instructions from multiple sources in the scenario of multi-station detection, and further leads to the defect problems shown in Table 1.

[0080] Table 1 Defect problems induced by multi-source backlight control interfaces

[0081] The defect problems shown in Table 1 will directly lead to the production line being stopped and the station detection efficiency being low.

[0082] In addition, abnormal brightness can interfere with the automated detection algorithm, posing a risk of missed detection in bad interception, and further increasing the defective rate of products.

[0083] In view of this, the embodiments of the present application provide a multi-source backlight control method for a mobile terminal, aiming to achieve precise control and abnormal protection of backlights from multiple sources, avoid the risk of production line stoppage, and improve the detection efficiency of workstations and the yield of products.

[0084] To better understand the technical solutions provided by the embodiments of the present application, before explaining the technical solutions of the embodiments of the present application, first, the hardware structure of the mobile terminal applicable to the embodiments of the present application, such as mobile phones, tablet computers, etc., will be described with reference to the accompanying drawings.

[0085] See Figure 4 , the mobile terminal 400 may include: a processor 410, an external memory interface 420, an internal memory 421, a universal serial bus (USB) interface 430, a charging management module 440, a power management module 441, a battery 442, an antenna 1, an antenna 2, a mobile communication module 450, a wireless communication module 460, an audio module 470, a sensor module 480, keys 490, a motor 491, an indicator 492, a camera 493, a display screen 494, and a subscriber identification module (SIM) card interface 495, etc.

[0086] Among them, the audio module 470 may include a speaker 470A, a receiver 470B, a microphone 470C, a headphone interface 470D, etc.

[0087] Among them, the sensor module 480 may include a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc. These are not listed one by one here, and the present application does not limit this.

[0088] Among them, the processor 410 may include one or more processing units. Different processing units may be independent devices or integrated in one or more processors.

[0089] Exemplarily, in some implementations, the processor 410 may include a Central Processing Unit (CPU), an application processor (AP), a Modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU), a Data Processing Unit (DPU), etc. This is not listed one by one here, and the present application places no restrictions thereon.

[0090] Among them, the controller can be the nerve center and command center of the mobile terminal 400. In practical applications, the controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0091] Among them, the GPU can perform graphics rendering, numerical analysis, financial analysis, password cracking, and other mathematical calculations and geometric operations. Specifically, in the embodiment of the present application, during the process of detecting screen display picture defects, the GPU is required to complete image rendering and other processing.

[0092] Among them, the DPU can offload infrastructure operations such as security, communication, storage, and virtualization in the data center to the DPU, thereby releasing the computing resources of the CPU and improving the overall computing performance.

[0093] Among them, a memory can also be set in the processor 410 for storing instructions and data. In some implementations, the memory in the processor 410 is a cache memory. This memory can save the instructions or data that the processor 410 has just used or recycled. If the processor 410 needs to use this instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 410, and thus improves the efficiency of the system.

[0094] Among them, the processor 410 may further include one or more interfaces. Among them, the interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. There is no need to list them one by one here, and this application does not limit this.

[0095] Among them, the external memory interface 420 may be used to connect an external memory card, such as a Micro SD card, to implement the storage capacity expansion of the mobile terminal 400. The external memory card communicates with the processor 410 through the external memory interface 420 to implement the data storage function.

[0096] Among them, the internal memory 421 may be used to store computer-executable program codes, and the executable program codes include instructions. The processor 410 executes various functional applications and data processing of the mobile terminal 400 by running the instructions stored in the internal memory 421. The internal memory 421 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, and the screen detection functions described in the embodiments of this application, such as a screen aging test function, a screen display picture defect detection function, etc.). The data storage area may store data created during the use of the mobile terminal 400 (such as a log file generated during the screen detection of the mobile terminal based on the technical solution provided in the embodiments of this application). In addition, the internal memory 421 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0097] Among them, the charging management module 440 is used to receive charging input from a charger, charge the battery 442, and supply power to the mobile terminal 400 through the power management module 441.

[0098] Among them, the power management module 441 is used to connect the battery 442, the charging management module 440, and the processor 410. The power management module 441 receives inputs from the battery 442 and / or the charging management module 440 and supplies power to the processor 410, the internal memory 421, the external memory, the display screen 494, the camera 493, the wireless communication module 460, etc. The power management module 441 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance).

[0099] Among them, the wireless communication function of the mobile terminal 400 can be implemented through antenna 1, antenna 2, the mobile communication module 450, the wireless communication module 460, the modulation and demodulation processor, and the baseband processor, etc.

[0100] Among them, the mobile communication module 450 can provide wireless communication solutions applied to the mobile terminal 400, including second-generation wireless telephone technology specifications (2G), third-generation mobile communication technology (3G), fourth-generation mobile communication technology (4G), fifth-generation mobile communication technology (5G), etc.

[0101] Among them, the wireless communication module 460 can provide wireless communication solutions applied to the mobile terminal 400, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.

[0102] Among them, the button 490 includes a power-on button, volume buttons, etc. The button 490 can be a mechanical button or a touch button. The mobile terminal 400 can receive button inputs and generate button signal inputs related to the user settings and function controls of the mobile terminal 400. Specifically, in the embodiments of the present application, after the mobile terminal enters the screen display image defect detection mode, by pressing the power-on button and volume buttons, the second backlight control interface can be called to issue corresponding backlight instructions to adjust the backlight value (brightness information) of the display screen, thereby realizing the screen display image defect detection.

[0103] Among them, the display screen 494 is used to display images, videos, etc. The display screen 494 includes a display panel. In some implementation manners, the mobile terminal 400 may include one or N display screens 494, where N is a positive integer greater than 1. The mobile terminal 400 can implement the display function through a GPU, the display screen 494, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 494 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 410 may include one or more GPUs, which execute program instructions to generate or change display information. Specifically, in the embodiments of the present application, the screen test performed on the display module of the mobile terminal is for the display screen 494.

[0104] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment and does not serve as a specific limitation on the mobile terminal 400. In other embodiments of the present application, the mobile terminal 400 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure can be implemented in hardware, or software, or a combination of software and hardware.

[0105] In addition, it should also be noted that Figure 4 above the components of the shown mobile terminal 400, an operating system is also running. For example, the iOS operating system developed by Apple Inc., the Android open-source operating system developed by Google Inc., the Windows operating system developed by Microsoft Corporation, etc. These operating systems can adopt a layered architecture, or an event-driven architecture, or a microkernel architecture, or a microservices architecture, or a cloud architecture.

[0106] For ease of explanation, in the embodiments of the present application, taking the Android system with a layered architecture as an example, the software structure of the mobile terminal 400 is exemplarily described.

[0107] It should be noted that although the embodiments of the present application are described by taking the Android system as an example, the basic principle also applies to mobile terminals based on operating systems such as iOS or Windows.

[0108] SeeFigure 5 , an exemplary software structure block diagram of an electronic device is shown. As Figure 5 shown, the layered architecture of the mobile terminal 400 divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments of the present application, the Android system is divided into five layers, from top to bottom are the application layer, the application framework layer, the Android runtime and system libraries, the Hardware Abstract Layer (HAL), and the kernel layer.

[0109] Among them, the application layer may include a series of application packages. As Figure 4 shown, the application packages may include applications (Application, APP) such as screen detection, phone, video, settings, etc., which are not listed one by one here, and the present application does not limit this.

[0110] Exemplarily, in some implementation manners, the screen detection application, for example, is Figure 3A the application for performing screen aging test shown in (1) in

[0111] Exemplarily, in some other implementation manners, the screen detection application, also for example, is the application for triggering to enter Figure 3B the screen display defect detection mode shown in (2) in

[0112] Exemplarily, in some other implementation manners, the screen detection application, also for example, is the application integrated with the functions of triggering the screen aging test and the screen display defect detection. In this implementation manner, after clicking on the screen detection application, the mobile terminal can, in response to this operation, display an entry for triggering the screen aging test function and an entry for triggering the screen display defect detection function.

[0113] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment, and does not serve as the sole limitation of this embodiment.

[0114] The phone application can be used to make calls and input engineering instructions for entering the screen display defect detection mode.

[0115] Among them, the application framework layer provides application programming interfaces (API) and programming frameworks for the applications in the application layer. In some implementation manners, these programming interfaces and programming frameworks can be described as functions. As Figure 5As shown in the figure, the application framework layer may include functions such as PowerManagerService (PMS), DisplayManagerService (DMS), and DisplayPowerController (DPC). There are too many to list here one by one, and this application does not limit them.

[0116] PMS is responsible for managing and coordinating the device power supply and common functions of the device, such as screen on / off, brightness adjustment, low power mode, keeping the CPU awake, etc.

[0117] DMS is responsible for managing the life cycle of the display device, adding, removing, and updating the status, and sending notifications to the system and other applications when the status is updated.

[0118] DPC is used to control the display power status, handle screen on / off and its animations, backlight adjustment, etc.

[0119] Android Runtime includes core libraries and a virtual machine. Android Runtime is responsible for the scheduling and management of the Android system.

[0120] The core libraries contain two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core libraries of Android.

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

[0122] The system libraries can include multiple functional modules. For example: surface manager, Media Libraries, 3D (three-dimensional) graphics processing library (such as: OpenGL ES), 2D (two-dimensional) graphics engine (such as: SGL), etc.

[0123] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0124] The media libraries support the playback and recording of various common audio and video formats, as well as static image files, etc. The media libraries can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0125] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.

[0126] Understandably, the above-mentioned 2D graphics engine is a graphics engine for 2D drawing.

[0127] Among them, the hardware abstraction layer is an interface layer located between the operating system kernel (kernel layer) and the hardware circuit. Its purpose is to isolate the application framework layer from the kernel, so that Android does not overly rely on the kernel, thus enabling the development of the application framework layer to proceed without considering the driver.

[0128] Exemplarily, in some implementation manners, the hardware abstraction layer may include a display HAL (such as DisplayHal or Hardware Display (Hwdisplay)), a hardware composer (Hardware Composer, HWC), and a sensor HAL (SensorHal) for various sensors.

[0129] In the embodiments of the present application, the display HAL is used to abstract the hardware display function, enabling upper-layer application programs to interact with the underlying hardware. For example, notifying the corresponding driver to control the initialization, screen resolution, refresh rate, rotation, etc. of the display screen of the mobile terminal, as well as register configuration, etc.

[0130] Among them, the kernel layer is the layer between the hardware and the software. The kernel layer may include various drivers, such as a surface display engine driver (such as Surface Display Engine Driver, SDE Driver), an LCD screen driver (such as LCDkitDriver), a backlight driver (such as Backlight Driver), and a sensor driver (such as Sensor Driver) for various sensors.

[0131] As the driver management layer of the display engine, the SDE Driver is responsible for the scheduling and optimization of the graphics interface rendering process. It can manage the display buffer (Frame Buffer), control the screen refresh rate (typical values: 60 / 90 / 120Hz), implement dynamic frame rate switching technology (such as LTPO), and support advanced display standards such as HDR10+ / Dolby Vision.

[0132] As the hardware interaction layer of the LCD screen (Liquid Crystal Display), the LCDkit Driver directly controls the physical characteristics of the screen. It can drive IC register configuration (such as through the MIPI / SPI interface), adjust the backlight brightness (such as the PWM frequency range: 100Hz - 100kHz), perform color temperature calibration (such as supporting CIE 1931 XYZ color space conversion), and implement the low blue light mode (such as filtering in the wavelength range: 415 - 455nm).

[0133] Specifically, in the embodiments of the present application, the Backlight Driver can verify whether the source of the currently received backlight instruction is legal according to the information provided by the display HAL, such as whether it is a backlight instruction issued by the process corresponding to the screen detection function, and determine which specific screen detection function the process that issues the current backlight instruction is (screen function detection function, screen aging test function, screen display picture defect detection function, etc.). Furthermore, when the source of the backlight instruction is legal, the current backlight value is locked, and the SDE Driver, LCDkit Driver, etc. are notified to drive the image processor, display screen, etc. to perform the corresponding screen detection function.

[0134] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment, and does not specifically limit the operating system of the mobile terminal 400. In other embodiments of the present application, the operating system of the mobile terminal 400 may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which are not limited in the present application.

[0135] Taking the mobile terminal with the above hardware structure and software structure as a mobile phone as an example, the multi-source backlight control method for the mobile terminal provided by the embodiments of the present application will be specifically described with reference to the accompanying drawings.

[0136] See Figure 6 , for example, after Hwdisplay receives a screen detection application from the application layer (such as an MMI application for detecting screen display picture defects (which can be entered from the dialing interface), an application for performing a screen aging test, an application for performing micro-needle detection on the screen, etc.), or a backlight instruction sent by a control device connected to the mobile terminal, it will send the received backlight instruction and its own process identifier (Process IDentifier, PID) to the Backlight Driver.

[0137] Continue to see Figure 6 , for example, other applications in the application layer, such as some system applications and third-party applications that can call the backlight control interface, issue backlight control instructions, and adjust the backlight value, can also send the corresponding backlight instructions and the PID corresponding to the HWC to the BacklightDriver through DMS, SurfaceFlinger, HWC, etc.

[0138] For the convenience of description, in the embodiments of the present application, PID1 is used to represent the PID of Hwdisplay, and PID2 is used to represent the PID of HWC.

[0139] It should be understood that Figure 6The illustration is only for exemplary purposes. In some implementations, the backlight instructions sent to the BacklightDriver, as well as the PID, can also be other methods, such as those corresponding to an automated detection algorithm.

[0140] Continue to refer to Figure 6 , by way of example, specifically in the embodiments provided in the present application, in order to achieve precise control of multi-source backlight instructions, the Backlight Driver implements calls to functions (interfaces) such as determining whether backlight locking is supported (such as isLockBacklightSuppor()), locking / unlocking the backlight (such as lockBacklight()), and setting the backlight value (such as setBacklight()). In this way, after the Backlight Driver receives backlight instructions provided by different objects (Hwdisplay, HWC, etc.) in the HAL, it can execute step a. For example, through the isLockBacklightSuppor() interface, it determines whether the mobile terminal supports backlight locking.

[0141] By way of example, in some implementations, when determining whether the mobile terminal supports backlight locking through the isLockBacklightSuppor() interface, for example, it is to determine whether the PID in the whitelist mentioned in the Figure 7 illustrated embodiment has been saved.

[0142] By way of example, in other implementations, when determining whether the mobile terminal supports backlight locking through the isLockBacklightSuppor() interface, for example, it is to determine whether the lockBacklight() interface can be called.

[0143] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment and does not serve as the sole limitation of this embodiment.

[0144] Continue to refer to Figure 6 , by way of example, in the case where it is determined that the mobile terminal supports backlight locking, the BacklightDriver can execute step b. For example, lock the backlight through the lockBacklight() interface. Specifically, the parameter passed into the lockBacklight() interface can be set to "true", that is, call the lockBacklight(true) interface. In this way, relevant drivers, such as the enable flag in the display driver, can be set to true, thereby achieving backlight locking.

[0145] It should be noted that in the embodiments of the present application, after the backlight is locked, the backlight value of the mobile terminal display screen is only allowed to be set according to the backlight instruction issued by Hwdisplay.

[0146] Continue to refer to Figure 6 , for example, after the backlight is locked, it is also necessary to cache the current backlight value for use after the screen detection is completed.

[0147] For example, in some implementation manners, the current backlight value can be cached through sysfs (a virtual file system designed to provide a method for accessing kernel data structures), and a suitable backlight value can be read from the backlight value cache area subsequently.

[0148] For example, in some implementation manners, the backlight value cache area can be accessed according to a preset path. This path is, for example, " / sys / class / backlight / ... / brightness".

[0149] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment and does not serve as the only limitation to this embodiment.

[0150] Continue to refer to Figure 6 , for example, after the backlight is locked and the current backlight value is cached, Backlight Driver can execute step c. For example, by determining whether the PID corresponding to the currently received backlight instruction is the PID saved in the initialization stage, it can be further determined whether the source of the currently calculated backlight instruction is legal.

[0151] Regarding the implementation logic of saving the legal source PID in the initialization stage, reference can be made to Figure 7 the embodiments shown, which will not be elaborated here for the time being.

[0152] From the above description, it can be seen that in the embodiments of the present application, only the backlight value is allowed to be set according to the backlight instruction issued by Hwdisplay. Therefore, when the PID corresponding to the backlight instruction is the PID of Hwdisplay, such as PID1, it can be determined that the source of the backlight instruction is legal. Otherwise, it is considered that the source of the backlight instruction is illegal.

[0153] Continue to refer to Figure 6 , for example, when it is determined that the source of the backlight instruction is legal, BacklightDriver can set the backlight value according to this backlight instruction through the setBacklight() interface and send this backlight value to the drivers required for this screen detection, such as SDE Driver and / or LCDkitDriver.

[0154] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment and does not serve as the sole limitation of this embodiment.

[0155] In addition, it should be noted that the processing logic during the backlight locking and screen detection period, as well as the processing logic after the screen detection ends, can be referred to Figure 8 the illustrated embodiment, which will not be elaborated here for the time being.

[0156] As can be seen from the above description, during the backlight locking period, the backlight value of the mobile terminal display screen is only allowed to be set according to the backlight instruction issued by Hwdisplay. In this way, during the screen detection process, other applications and services cannot modify the backlight value, thereby achieving precise control and abnormal protection of backlights from multiple sources, avoiding the risk of line stoppage, and improving the station detection efficiency and product yield.

[0157] Refer to Figure 7 for an exemplary schematic diagram showing the processing logic of saving the legal source PID during the initialization phase. The implementation logic of this phase may include: S501, when the system boots or the service restarts, start the driver related to the display screen.

[0158] Among them, the driver related to the display screen, for example, is a driver that can interact through Hwdisplay, such as Backlight Driver, SDE Driver, LCDkit Driver, etc.

[0159] S502, detect whether the driver related to the display screen has been started and is ready.

[0160] For example, detect whether the driver related to the display screen has completed all parameter settings, recognized the corresponding sensor signals in the display screen, and there is no abnormal alarm information.

[0161] Correspondingly, when all parameter settings are completed, the corresponding sensor signals in the display screen are recognized, and there is no abnormal alarm information, it can be determined that the driver related to the display screen is ready. In this case, step S503 can be executed. Otherwise, step S504 can be executed.

[0162] S503, initialize Hwdisplay and save the PID of Hwdisplay.

[0163] Specifically, when the system boots or the server restarts, if the driver related to the display screen is ready, at this time, Hwdisplay can be initialized, and a corresponding PID, such as PID1, can be assigned to Hwdisplay, and then the PID1 of Hwdisplay can be saved.

[0164] In this way, the subsequent Hwdisplay can receive the backlight instruction of the screen detection application in the application layer and send the received backlight instruction to the Backlight Driver, enabling the Backlight Driver to determine whether the PID corresponding to the currently received backlight instruction is the PID1 saved during the initialization phase. Furthermore, it can be determined whether the source of the currently received backlight instruction is legal.

[0165] In addition, it should be noted that during the initialization of Hwdisplay, other HALs can also be initialized, and corresponding PIDs can be allocated to the corresponding service processes.

[0166] In addition, it should also be noted that in order to facilitate the distinction of these PIDs, the PIDs of the service processes used to identify the legal source of the backlight instruction can be added to a whitelist. In this way, during actual application, the backlight instructions sent by the service processes corresponding to all PIDs that can be added to the whitelist can be considered to have a legal source, and thus the adjustment of the backlight value can be realized during the backlight locking period. On the contrary, the backlight instructions sent by the service processes corresponding to the PIDs not in the whitelist can be considered to have an illegal source. For the backlight instructions with an illegal source, the Backlight Driver can intercept them. For example, instead of setting and sending the backlight value according to the backlight instruction with an illegal source, the backlight value corresponding to the backlight instruction with an illegal source can be cached. In this way, it can be avoided that the backlight value is modified by the backlight instruction with an illegal source, resulting in a change in the backlight value during the screen detection process and causing the problem of screen brightness jump.

[0167] In some implementation manners, when intercepting the backlight instruction with an illegal source, a corresponding log file can also be recorded to facilitate subsequent positioning of anomalies for repair processing.

[0168] S504, after the first call to the DisplayUniversal() interface, initialize Hwdisplay and save the PID of Hwdisplay.

[0169] It should be noted that during the system startup or service restart phase, the DisplayUniversal() interface can be responsible for activating the display hardware (such as GPU or integrated graphics card) and configuring basic display parameters (resolution, color mode, etc.) to ensure that the BIOS (Basic Input / Output System) / UEFI (Unified Extensible Firmware Interface) or the operating system can output the startup screen. Therefore, when the drivers related to the display screen are not ready, it is possible to monitor whether the DisplayUniversal() interface is called for the first time. After the first call to the DisplayUniversal() interface, it is possible to start the drivers related to the display screen and make the drivers related to the display screen ready.

[0170] Correspondingly, after the first call to the DisplayUniversal() interface, the operation of step S503 can also be executed. In this way, it can be ensured that the PID from a legal source is saved to the whitelist, and at the same time, duplicate saving can be avoided, which causes data redundancy and reduces resource occupancy.

[0171] Thus, by initializing a legal service process, such as Hwdisplay, during the system startup or service restart process, and then saving the PID1 of Hwdisplay to the whitelist corresponding to the backlight instruction from a legal source, it is possible to quickly and accurately determine whether the PID corresponding to the currently received backlight instruction is legal based on the PID maintained in the whitelist after locking the backlight, and further determine whether the source of the currently received backlight instruction is legal, thereby achieving precise control of backlights from multiple sources.

[0172] See Figure 8 , which exemplarily shows a schematic diagram of the processing logic for locking and unlocking the backlight after receiving a backlight instruction. The implementation logic of this stage can include: S601, when a backlight instruction is received, determine whether the backlight can be locked.

[0173] Specifically, after the Backlight Driver receives the backlight instructions sent by Hwdisplay, HWC, and other services in the HAL, it can call the isLockBacklightSuppor() interface to determine whether the mobile terminal supports locking the backlight. That is, execute Figure 6 step a executed by the Backlight Driver in Figure 6 For the specific implementation details of this step, refer to the description of step a in the embodiment shown in

[0174] In the case where it is determined that the mobile terminal does not support locking the backlight, in some implementation manners, Backlight Drive may execute step S602.

[0175] In the case where it is determined that the mobile terminal supports locking the backlight, in some implementation manners, Backlight Drive may execute step S603.

[0176] S602, set the backlight value according to the backlight instruction.

[0177] For example, Backlight Drive adjusts the current backlight value to the backlight value corresponding to the brightness information according to the brightness information corresponding to the currently received backlight instruction.

[0178] In some implementation manners, in the case where the mobile terminal does not support locking the backlight, during the execution of step S602, the current log file may also be recorded for subsequent use.

[0179] S603, lock the backlight and cache the current backlight value.

[0180] Specifically, when Backlight Driver determines that the mobile terminal supports locking the backlight, it can lock the backlight by calling the lockBacklight(true) interface and cache the current backlight value through sysfs. That is, execute Figure 6 step b executed by Backlight Driver in. For the specific implementation details of this step, reference can be made to Figure 6 the description part of step b in the illustrated embodiment, which will not be elaborated here.

[0181] For example Figure 9A As shown, when the current backlight value is BN0, after Backlight Driver calls the lockBacklight(true) interface to lock the backlight, sysfs can cache the current backlight value BN0 to the specified backlight value cache area, such as the path " / sys / class / backlight / ... / brightness".

[0182] Also for example Figure 9B As shown, when the current backlight value is BN5, after Backlight Driver calls the lockBacklight(true) interface to lock the backlight, sysfs can cache the current backlight value BN5 to the specified backlight value cache area, such as the path " / sys / class / backlight / ... / brightness".

[0183] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment, and does not serve as the sole limitation to this embodiment.

[0184] In addition, it should be noted that in some implementation manners, in order to ensure that the backlight function of the display screen has been locked and subsequent processing can proceed normally. Before executing step S604 or before executing S606, it is also possible to further determine whether the backlight function has been locked. For example, check whether the flag bit corresponding to the backlight function is "true".

[0185] Correspondingly, when it is determined that the flag bit corresponding to the backlight function is "true", then execute step S604 or step S606. Otherwise, step S603 can be re-executed, or a log file can be input.

[0186] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment, and does not serve as the sole limitation to this embodiment.

[0187] S604, determine whether the PID of the currently received backlight instruction is the PID of Hwdisplay saved in the initialization stage.

[0188] Specifically, after locking the backlight and caching the current backlight value, the Backlight Driver can determine whether the PID corresponding to the currently received backlight instruction is the PID in the whitelist saved in the initialization stage. That is, execute Figure 6 step c executed by BacklightDriver in. For the specific implementation details of this step, reference can be made to Figure 6 the description part of step c in the shown embodiment, which will not be elaborated here.

[0189] When it is determined that the PID of the currently received backlight instruction is not the PID of Hwdisplay saved in the initialization stage, such as in the case of PID1, in some implementation manners, step S605 can be executed.

[0190] When it is determined that the PID of the currently received backlight instruction is the PID of Hwdisplay saved in the initialization stage, such as in the case of PID1, in some implementation manners, step S606 can be executed.

[0191] S605, cache the backlight value corresponding to the backlight instruction.

[0192] After the backlight is locked, when it is determined that the PID of the currently received backlight instruction is not the PID saved in the whitelist during the initialization phase, such as not the PID of Hwdisplay, the backlight value corresponding to the currently received backlight instruction is cached to the specified backlight value cache area through sysfs, such as the path " / sys / class / backlight / ... / brightness".

[0193] In addition, it should be noted that after the backlight is locked and before it is unlocked, that is, during the backlight locking period, if other backlight instructions are received, the legitimacy source of each backlight instruction needs to be verified.

[0194] Correspondingly, when it is determined that the source of the currently received backlight instruction is legal, it is normally issued for screen detection, such as executing step S606. Otherwise, step S605 is executed.

[0195] That is to say, during the backlight locking period, the legitimacy source of all received backlight instructions needs to be verified. When the source is verified to be legal, step S606 is repeatedly executed; when the source is verified to be illegal, the backlight values corresponding to each illegal backlight instruction are cached.

[0196] For example Figure 9A As shown, during the backlight locking period, 4 backlight instructions are received, and the backlight values corresponding to these 4 backlight instructions are backlight value BN1, backlight value BN2, backlight value BN3, and backlight value BN4 respectively. After the judgment and processing in step S604, it is determined that the sources of the backlight instructions corresponding to the 4 backlight values of backlight value BN1, backlight value BN2, backlight value BN3, and backlight value BN4 are all legal. The Backlight Driver will execute the operation of step S606 4 times according to the backlight instructions corresponding to these 4 backlight values. That is, after receiving the backlight instruction corresponding to backlight value BN1, execute the operation of step S604 once. When it is determined that the backlight instruction corresponding to backlight value BN1 is from a legal source, execute step S606 once; after receiving the backlight instruction corresponding to backlight value BN2, execute the operation of step S604 once. When it is determined that the backlight instruction corresponding to backlight value BN2 is from a legal source, execute step S606 once; after receiving the backlight instruction corresponding to backlight value BN3, execute the operation of step S604 once. When it is determined that the backlight instruction corresponding to backlight value BN3 is from a legal source, execute step S606 once; after receiving the backlight instruction corresponding to backlight value BN4, execute the operation of step S604 once. When it is determined that the backlight instruction corresponding to backlight value BN4 is from a legal source, execute step S606 once.

[0197] Also for example Figure 9BAs shown, during the locked backlight period, 4 backlight instructions were received, and the corresponding backlight values of these 4 backlight instructions are backlight value BN6, backlight value BN7, backlight value BN8, and backlight value BN9 respectively. After the judgment and processing in step S604, it is determined that the sources of the backlight instructions corresponding to the two backlight values, backlight value BN6 and backlight value BN9, are legal, and the sources of the backlight instructions corresponding to the two backlight values, backlight value BN7 and backlight value BN8, are illegal. In this scenario, the Backlight Driver will perform the operation in step S606 twice and perform the operation in step S605 twice. That is, after receiving the backlight instruction corresponding to backlight value BN6, perform the operation in step S604 once. When it is determined that the backlight instruction corresponding to backlight value BN6 has a legal source, perform the operation in step S606 once; after receiving the backlight instruction corresponding to backlight value BN7, perform the operation in step S604 once. When it is determined that the backlight instruction corresponding to backlight value BN6 has an illegal source, perform the operation in step S605 once; after receiving the backlight instruction corresponding to backlight value BN8, perform the operation in step S604 once. When it is determined that the backlight instruction corresponding to backlight value BN8 has an illegal source, perform the operation in step S605 once; after receiving the backlight instruction corresponding to backlight value BN9, perform the operation in step S604 once. When it is determined that the backlight instruction corresponding to backlight value BN9 has a legal source, perform the operation in step S606 once.

[0198] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment and does not serve as the sole limitation to this embodiment.

[0199] In this way, by caching the backlight values corresponding to the backlight instructions with illegal sources instead of directly setting the backlight value according to the illegal backlight instruction, it is possible to avoid the backlight being locked and the brightness of the display screen jumping during the screen detection.

[0200] S606: Set the backlight value according to the backlight instruction and perform screen detection.

[0201] When it is determined that the source of the backlight instruction is legal, the Backlight Driver can, through the setBacklight() interface, set the backlight value according to the backlight instruction and send the backlight value to the drivers required for this screen detection, such as the SDE Driver and / or the LCDkitDriver, so as to realize the corresponding screen detection.

[0202] S607: Unlock the backlight after the screen detection is completed.

[0203] After the screen detection is completed, the Backlight Driver can unlock the backlight through the lockBacklight() interface. Specifically, the parameter passed in the lockBacklight() interface can be set to "false", that is, the lockBacklight(false) interface is called. In this way, the relevant driver, such as the enable flag in the display driver, can be set to false, thus realizing the unlocking of the backlight.

[0204] In addition, it should be noted that in order to achieve high reliability, in some implementation methods, when the screen-off event is monitored, the flag bit for locking the backlight can be automatically cleared. That is, when the screen goes off, regardless of whether the current screen detection is completed, the Backlight Driver calls the lockBacklight(false) interface to unlock the backlight. In this way, it is possible to prevent the backlight from being locked due to abnormal service processes, thus enhancing the system's fault tolerance.

[0205] In addition, it should be noted that in some other implementation methods, an interface for specifically clearing the flag bit for locking the backlight can also be set. In this way, when the screen-off event is monitored and the flag bit for locking the backlight is automatically cleared, this interface can be directly called.

[0206] It should be understood that the above description is only an example listed for better understanding of the technical solution of this embodiment, and does not serve as the sole limitation of this embodiment.

[0207] S608, after unlocking the backlight, set the backlight value to the latest backlight value cached in the cache.

[0208] After unlocking the backlight, sysfs can read the latest backlight value cached from the backlight value cache area, such as the path " / sys / class / backlight / ... / brightness", and set this latest backlight value as the current backlight value of the display screen.

[0209] For example Figure 9A As shown, during the period of locking the backlight, when the received backlight instructions are all from legal sources, after unlocking the backlight, the latest backlight value read from the backlight value cache is the backlight value cached when the backlight was locked, such as the backlight value BN0.

[0210] Also for example Figure 9B As shown, during the period of locking the backlight, when there are backlight instructions from illegal sources, such as the backlight instructions corresponding to the backlight values BN7 and BN8, the corresponding backlight values will be cached in the backlight value cache area in the order of the received backlight instructions from illegal sources. That is, Figure 9BIn the shown scenario, before unlocking the backlight, the latest backlight value cached in the backlight value cache area is backlight value BN8. Therefore, after unlocking the backlight, the latest backlight value read from the backlight value cache area is backlight value BN8. Thus, after unlocking the backlight, the backlight value of the display screen will be set to backlight value BN8.

[0211] It should be understood that the above description is only an example listed for better understanding the technical solution of this embodiment and does not serve as the sole limitation of this embodiment.

[0212] Thus, based on the above multi-source backlight control method for mobile terminals, by constructing a collaborative control architecture between the driver layer and the application layer, relevant drivers in HAL and the kernel can interact with various screen detection applications. In this way, when the driver layer receives a backlight instruction triggered by the application layer, the driver layer locks the backlight and quickly and accurately determines whether the PID corresponding to the currently received backlight instruction is legal based on the PID maintained in the whitelist, and further determines whether the source of the currently received backlight instruction is legal, thereby achieving precise control of backlights from multiple sources.

[0213] In addition, after locking the backlight, through the maintenance and management of the PID of the service process that sends the backlight instruction, the normalization and permission hierarchical management of the backlight control interface (backlight instruction) are realized, and precise isolation control of backlight instructions from multiple sources is achieved, thereby eliminating the backlight control logic conflicts of multiple detection stations and avoiding the risk of line stop.

[0214] In addition, by introducing a dynamic caching and recovery mechanism and combining the caching mechanism with the active intervention of the driver layer, seamless switching of the brightness state before and after testing is ensured, and thus the production line testing efficiency is improved.

[0215] In addition, since the multi-source backlight control solution for mobile terminals provided by the embodiments of this application can be realized through the collaborative management and control of the application layer and the driver layer, there is no need to additionally increase the hardware cost to achieve full-process brightness closed-loop management.

[0216] In addition, it can be understood that in order for the mobile terminal to implement the above functions, it includes the corresponding hardware and / or software modules for executing each function. Combining the algorithm steps of each example described in the embodiments disclosed in this article, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of this application.

[0217] In addition, it should be noted that in actual application scenarios, the mobile terminal multi-source backlight control method provided by the above-mentioned embodiments implemented by the mobile terminal can also be executed by a chip system included in the mobile terminal. Among them, the chip system may include a processor. The chip system can be coupled to a memory, so that when the chip system runs, it calls the computer program stored in the memory to implement the steps executed by the above-mentioned mobile terminal. Among them, the processor in the chip system can be an application processor or a processor other than an application processor.

[0218] In addition, the embodiments of the present application also provide a mobile terminal multi-source backlight control system. This system does not belong to a mobile terminal with a display screen, so that when the mobile terminal runs, it can execute the above-mentioned related method steps to implement the method in the above-mentioned embodiments.

[0219] In addition, the embodiments of the present application also provide a computer-readable storage medium. Computer instructions are stored in the computer storage medium. When the computer instructions run on the mobile terminal, the mobile terminal is enabled to execute the above-mentioned related method steps to implement the method in the above-mentioned embodiments.

[0220] In addition, the embodiments of the present application also provide a computer program product. When the computer program product runs on the mobile terminal, the mobile terminal is enabled to execute the above-mentioned related steps to implement the method in the above-mentioned embodiments.

[0221] In addition, the embodiments of the present application also provide a device. The device can be a chip, a component or a module. Among them, the device may include a processor and a memory connected to each other; among them, the memory is used to store computer execution instructions. When the device runs, the processor can execute the computer execution instructions stored in the memory so that the chip executes the methods in the above-mentioned method embodiments.

[0222] In addition, through the above description, it can be seen that the mobile terminal, computer-readable storage medium, computer program product or chip provided by the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.

[0223] In addition, through the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of description, only the above-mentioned division of each functional module is used as an example for illustration. In actual applications, the above functions can be allocated to different functional modules as needed. That is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0224] In addition, it can be understood that in several embodiments provided in the present application, the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.

[0225] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the various embodiments of the present application.

Claims

1. A method for controlling multi-source backlight of a mobile terminal, characterized in that: Applied to a mobile terminal, the mobile terminal includes a display screen, and the method includes: When receiving a backlight instruction, locking a backlight function of a display screen of the mobile terminal and caching a current first backlight value of the display screen; Verifying whether the source of the backlight instruction is legal according to the process identifier of the service process that issues the backlight instruction; In the case where the source of the backlight instruction is legal, according to the backlight instruction, the backlight value of the display screen is set to a second backlight value, and screen detection is performed on the display screen; After completing the screen detection of the display screen, the backlight function is unlocked, and the backlight value of the display screen is set according to the cached backlight value.

2. The method according to claim 1, characterized in that The method further comprises: In a case where the source of the backlight instruction is illegal, a third backlight value corresponding to the backlight instruction is cached.

3. The method according to claim 2, characterized in that The step of setting the backlight value of the display screen according to the cached backlight value comprises: The backlight value of the display screen is set according to the cached latest backlight value.

4. The method according to claim 3, characterized in that: The step of setting the backlight value of the display screen according to the cached latest backlight value comprises: When the latest backlight value in the cache is the first backlight value, setting the backlight value of the display screen to the first backlight value; In a case where the latest cached backlight value is the third backlight value, the backlight value of the display screen is set to the third backlight value.

5. The method according to any one of claims 1 to 4, characterized in that: The verifying whether the source of the backlight instruction is legal according to the process identifier of the service process that issues the backlight instruction includes: When the process identifier of the service process that issues the backlight instruction matches the process identifier recorded in the process identifier whitelist saved in the mobile terminal, it is determined that the source of the backlight instruction is legal, the process identifier recorded in the process identifier whitelist is a legal process identifier generated during the initialization phase of the mobile terminal, and the source of the backlight instruction issued by the service process corresponding to the legal process identifier is legal.

6. The method according to claim 5, characterized in that Before receiving the backlight instruction, the method further includes: During the initialization phase of the mobile terminal, starting a driver related to the display screen; When the driver related to the display screen is ready, the service process corresponding to the screen detection function is initialized, a process identifier is allocated to the service process corresponding to the screen detection function, and the process identifier of the service process corresponding to the screen detection function is saved in the process identifier whitelist.

7. The method according to claim 6, characterized in that The method further comprises: When the driver related to the display screen is not ready, after the unified display interface is called for the first time, the service process corresponding to the screen detection function is initialized, a process identifier is assigned to the service process corresponding to the screen detection function, and the process identifier of the service process corresponding to the screen detection function is saved in the process identifier whitelist.

8. The method according to any one of claims 1 to 4, characterized in that: The locking of the backlight function of the display screen of the mobile terminal comprises: Determining whether the mobile terminal supports a backlight locking function of the display screen; In the case that the mobile terminal supports locking the backlight function of the display screen, the flag bit corresponding to the backlight function of the display screen is set to a first identifier, and the first identifier is used to indicate that the backlight function of the display screen is in a locked state.

9. The method according to claim 8, characterized in that The determining whether the mobile terminal supports a backlight function of locking the display screen includes: It is determined whether a process identifier whitelist is saved in the mobile terminal, the process identifier recorded in the process identifier whitelist is a legitimate process identifier generated during the initialization phase of the mobile terminal, and the backlight instruction issued by the service process corresponding to the legitimate process identifier has a legitimate source.

10. The method according to any one of claims 1 to 4, characterized in that: The unlocking of the backlight function comprises: The flag bit corresponding to the backlight function of the display screen is set to a second identifier, where the second identifier is used to indicate that the backlight function of the display screen is in an unlocked state.

11. The method according to any one of claims 1 to 4, characterized in that: After locking the backlight function of the display screen of the mobile terminal, the method further includes: When the display screen is turned off, clear the identification information of the flag bit corresponding to the backlight function of the display screen, or, The identification information is modified from a first identification to a second identification, wherein the first identification is used to indicate that the backlight function of the display screen is in a locked state, and the second identification is used to indicate that the backlight function of the display screen is in an unlocked state.

12. A mobile terminal, characterized in that: The mobile terminal comprises: a memory and a processor, wherein the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the mobile terminal executes the mobile terminal multi-source backlight control method as described in any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that: It comprises a computer program, and when the computer program is run on a mobile terminal, the mobile terminal executes the mobile terminal multi-source backlight control method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Screen backlight adjusting method and device, and mobile terminal

    CN106710535A

  • Screen test method for controlling brightness, electronic equipment and related medium

    CN119377027A