Mobile terminal multi-source backlight control method, device and storage medium
By locking the display backlight function and verifying the source of the backlight command, the problem of backlight value adjustment conflicts in multi-station detection of mobile terminals is solved, achieving precise control and efficiency improvement.
Patent Information
- Application Number
- CN202510386856.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-03-31
AI Technical Summary
During the multi-station inspection process of mobile terminals, backlight control commands from multiple sources lead to conflicts in backlight value adjustments, resulting in production line stoppages, low inspection efficiency, and missed inspections of defective products.
By locking the display's backlight function, caching the current backlight value, and verifying the legality of the source of the backlight command, the backlight value is adjusted only under instructions from a legal source, ensuring precise control of backlight from multiple sources.
It achieves precise control of backlight from multiple sources, avoids the risk of production line stoppage, and improves workstation inspection efficiency and product yield.
Smart Images

Figure CN120048224B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of mobile terminals, and in particular to a method, device and storage medium for controlling multi-source backlight of a mobile terminal. Background Art
[0002] To enhance the human-computer interaction experience, more and more mobile terminals are equipped with display modules. To ensure the product quality of these mobile terminals, the display modules of these terminals must undergo various inspections during the production process. For example, these inspections include screen function testing, screen burn-in testing, and screen display defect detection.
[0003] Since these workstation inspections all require backlight control of the mobile terminal's display module (display screen), in multi-workstation inspection scenarios, there will be conflicts in the adjustment of the display screen backlight value (brightness information) from backlight control commands from multiple sources, which will lead to production line stoppages, low workstation inspection efficiency, and even missed inspections of defective products, resulting in an increase in product defect rates. Summary of the Invention
[0004] In order to solve the above technical problems, the embodiments of the present application provide a multi-source backlight control method, device and storage medium for a mobile terminal, aiming to achieve precise control and abnormal protection of backlights from multiple sources, avoid the risk of line stoppage, and improve workstation detection efficiency and product yield.
[0005] In a first aspect, an embodiment of the present application provides a multi-source backlight control method for a mobile terminal, which is applied to a mobile terminal. The mobile terminal includes a display screen. The method includes: upon 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 legitimate based on the process identifier of the service process that issued the backlight instruction; if the source of the backlight instruction is legitimate, setting the backlight value of the display screen to a second backlight value based on the backlight instruction, and performing a screen test on the display screen; after completing the screen test on the display screen, unlocking the backlight function and setting the backlight value of the display screen based on the cached backlight value.
[0006] Locking the backlight function of the display screen of the mobile terminal means that the backlight of the display screen remains on after the backlight function is locked. This is hereinafter referred to as locking the backlight.
[0007] The screen detection of the display screen is determined by generating a backlight instruction from a legitimate source.
[0008] For example, when the backlight instruction from a legitimate source is triggered by a screen function detection station, the screen detection performed on the display screen is a detection of the screen detection function, such as white screen detection, black screen detection, etc.
[0009] For another example, when the backlight instruction from a legitimate source is triggered by a screen aging test station, the screen inspection performed on the display screen is a screen aging test.
[0010] For another example, when the backlight instruction from a legitimate source is triggered by a screen display image defect detection station, the screen detection performed on the display screen is a screen display image defect detection.
[0011] The first backlight value is the current backlight value of the display when the backlight is locked. Figure 9A The backlight value BN0 is shown, Figure 9B Backlight value BN5 is shown.
[0012] The second backlight value is the backlight value corresponding to the backlight instruction from the legitimate source during the backlight locking period. In a specific application, the second backlight value can be multiple. That is, the backlight value corresponding to the backlight instruction from the legitimate source received during the backlight locking period can be described as the second backlight value. For example Figure 9A The backlight values BN1, BN2, BN3 and BN4 are shown. Figure 9B Backlight value BN6, backlight value BN9, etc. are shown.
[0013] Among them, the backlight value may include the brightness parameters of the screen, such as maximum brightness, excitation brightness, or indicators related to backlight technology, such as blue light radiation, dimming frequency, etc.
[0014] Therefore, upon receiving a backlight command, the display's backlight function is locked, and the mobile terminal is configured to only allow backlight settings based on backlight commands issued by legitimate service processes during the locked backlight period. This prevents other applications and services from modifying the backlight value during screen detection, enabling precise control and anomaly protection for backlights from multiple sources, avoiding the risk of line stoppages and improving workstation detection efficiency and product yield.
[0015] According to the first aspect, the method further includes: when the source of the backlight instruction is illegal, caching a third backlight value corresponding to the backlight instruction.
[0016] In this way, it is possible to prevent backlight commands from illegal sources from modifying the backlight value, causing the backlight value to change during the screen detection process, resulting in the problem of screen brightness jumping.
[0017] According to the first aspect, or any implementation of the first aspect above, 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 of backlights from multiple sources, and after unlocking the backlight function of the display, the backlight value of the display can be set to the backlight value of the most recent service or system adjustment, thereby ensuring the normal execution of other services.
[0019] According to the first aspect, or any implementation of the first aspect above, the backlight value of the display screen is set according to the latest cached backlight value, including: when the latest cached backlight value is the first backlight value, the backlight value of the display screen is set to the first backlight value; when the latest cached backlight value is the third backlight value, the backlight value of the display screen is set to the third backlight value.
[0020] The third backlight value is the backlight value corresponding to the backlight instruction from an illegal source during the backlight locking period. In a specific application, there may be multiple third backlight values. That is, the backlight value corresponding to the backlight instruction from an illegal source received during the backlight locking period can be described as the third backlight value. For example Figure 9B Backlight value BN7, backlight value BN8, etc. are shown.
[0021] Understandably, cached backlight values are cached sequentially. That is, the backlight value for the first backlight command received from an illegal source is cached first, followed by the backlight values for the later backlight commands received from illegal sources. When reading cached backlight values, the most recently cached value is read first. In other words, the most recently cached backlight value is the most recently cached backlight value.
[0022] In this way, by introducing a dynamic cache and recovery mechanism and combining the cache mechanism with active intervention at the driver layer, seamless switching of brightness states before and after testing is ensured, thereby improving production line testing efficiency.
[0023] According to the first aspect, or any implementation method of the first aspect above, based on the process identifier of the service process that issues the backlight instruction, verify whether the source of the backlight instruction is legal, including: 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 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.
[0024] The legal process identifier is, for example, the PID of Hwdisplay mentioned in the following embodiment, such as PID1.
[0025] For details on the implementation of this aspect, please refer to Figure 8 The description of step S604 in the illustrated embodiment will not be repeated here.
[0026] In this way, backlight instructions from legitimate sources can be quickly and accurately filtered out, thereby achieving precise control of backlights from multiple sources.
[0027] According to the first aspect, or any implementation of the first aspect above, before receiving the backlight instruction, the method also includes: in the initialization stage of the mobile terminal, starting the driver related to the display screen; when the driver related to the display screen is ready, initializing the service process corresponding to the screen detection function, assigning 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] The initialization phase is, for example, a system startup or service restart phase.
[0029] Among them, the drivers related to the display screen are, for example, drivers that can interact through Hwdisplay, such as Backlight Driver, SDE Driver, LCDkit Driver, etc.
[0030] The service process corresponding to the screen detection function is, for example, a service process that enables the screen detection application of the application layer to interact with the driver layer, such as Hwdisplay.
[0031] For details on the implementation of this aspect, please refer to Figure 7 The description of steps S501 to S503 in the illustrated embodiment will not be repeated here.
[0032] In this way, after the display-related drivers are ready, Hwdisplay is initialized. Subsequently, Hwdisplay can receive backlight commands from the screen detection application at the application layer and send the received backlight commands to BacklightDriver. This allows the Backlight Driver to determine whether the PID corresponding to the currently received backlight command is PID1 saved during the initialization phase. Furthermore, it can determine whether the source of the currently received backlight command is legitimate.
[0033] According to the first aspect, or any implementation of the first aspect above, the method also includes: when the driver related to the display screen is not ready, after the unified display interface is called for the first time, initializing the service process corresponding to the screen detection function, assigning 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] For details on the implementation of this aspect, please refer to Figure 7The description of step S504 and step S503 in the illustrated embodiment will not be repeated here.
[0035] In this way, it can ensure that the PID of the legitimate source is saved in the whitelist (process identifier whitelist), and it can avoid repeated saving, causing data redundancy and reducing resource usage.
[0036] According to the first aspect, or any implementation method of the first aspect above, locking the backlight function of the display screen of the mobile terminal includes: determining whether the mobile terminal supports the backlight function of locking the display screen; if the mobile terminal supports the backlight function of locking the display screen, setting the flag corresponding to the backlight function of the display screen 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.
[0037] For details on the implementation of this aspect, please refer to Figure 8 The description of step S601 and step S603 in the embodiment shown, and Figure 6 The description of steps a and b in the above will not be repeated here.
[0038] In this way, the backlight function can be quickly locked by modifying the identification information of the flag bit corresponding to the backlight function of the display screen.
[0039] According to the first aspect, or any implementation method of the first aspect above, determining whether the mobile terminal supports the backlight function of locking the display screen includes: determining 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 source of the backlight instruction issued by the service process corresponding to the legitimate process identifier is legitimate.
[0040] For details on the implementation of this aspect, please refer to Figure 6 The description of step a in [1] will not be repeated here.
[0041] In this way, it can be quickly determined whether the display screen of the mobile terminal currently supports the backlight locking function.
[0042] According to the first aspect, or any implementation of the first aspect above, unlocking the backlight function includes: setting the flag corresponding to the backlight function of the display screen to a second identifier, the second identifier being used to indicate that the backlight function of the display screen is in an unlocked state.
[0043] For details on the implementation of this aspect, please refer to Figure 8 The description of step S607 in the illustrated embodiment will not be repeated here.
[0044] In this way, by modifying the identification information of the flag bit corresponding to the display screen backlight function, the backlight function can be quickly unlocked, thereby restoring the backlight control permission of the service process of the PID outside the whitelist. In other words, the display screen of the mobile terminal can adjust the backlight value of the display screen according to the backlight instruction issued by the service process of the PID outside the whitelist.
[0045] According to the first aspect, or any implementation method of the first aspect above, after locking the backlight function of the display screen of the mobile terminal, the method also 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 changing the identification information from the first identification to the second identification, 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 a screen-off event is detected and the flag that triggers the backlight lock is automatically cleared, the backlight function can be unlocked by clearing the current identification information corresponding to the flag of the backlight function, or modifying the current identification information to a second identification, thereby avoiding the situation where the backlight function is locked due to an abnormal service process, thereby enhancing the system's fault tolerance.
[0047] In a second aspect, embodiments of the present application provide a mobile terminal multi-source backlight control system, which is applied to a mobile terminal and configured to cause the mobile terminal to execute instructions of the method of the first aspect or any possible implementation of the first aspect.
[0048] In a third aspect, embodiments of the present application provide a mobile terminal. The mobile terminal includes: a memory and a processor, the memory and the processor being coupled; the memory storing program instructions, which, when executed by the processor, cause the mobile terminal to execute instructions of the method of the first aspect or any possible implementation 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, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0050] In a fifth aspect, an embodiment of the present application provides a computer program comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0051] In a sixth aspect, embodiments of the present application provide a chip comprising a processing circuit and transceiver pins. The transceiver pins and the processing circuit communicate with each other via an internal connection path, and the processing circuit executes the method of the first aspect or any possible implementation of the first aspect to control the receive pin to receive a signal and to control the transmit pin to send a signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 is a schematic diagram of an exemplary mobile terminal with a display screen;
[0053] Figure 2 This is a schematic diagram illustrating an exemplary workstation inspection of a display screen of a mobile terminal on a production line;
[0054] Figure 3A This is a schematic diagram illustrating an exemplary method of performing a screen aging test on a display screen of a mobile terminal;
[0055] Figure 3B This is a schematic diagram illustrating an exemplary method of detecting screen display defects on a display screen of a mobile terminal;
[0056] Figure 3C This is a schematic diagram illustrating an exemplary method of performing screen function detection on a display screen of a mobile terminal;
[0057] Figure 4 This is a schematic diagram showing an exemplary hardware structure of a mobile terminal with a display screen;
[0058] Figure 5 This is a schematic diagram illustrating a software structure of a mobile terminal with a display screen;
[0059] Figure 6 1 is a flow chart showing an exemplary method for controlling a multi-source backlight of a mobile terminal;
[0060] Figure 7 1 is a schematic diagram of a processing logic for saving a legitimate source PID during the initialization phase of a mobile terminal in a multi-source backlight control method for a mobile terminal;
[0061] Figure 8 1 is a schematic diagram of the processing logic of locking and unlocking the backlight in an exemplary method for controlling a multi-source backlight of a mobile terminal;
[0062] Figure 9A This is a schematic diagram illustrating an exemplary method for caching backlight values based on a multi-source backlight control method for a mobile terminal;
[0063] Figure 9B This is a schematic diagram illustrating another exemplary method for caching backlight values based on a multi-source backlight control method for a mobile terminal. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0065] The term "and / or" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0066] In the description and claims of the embodiments of this application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first target object" and "second target object" are used to distinguish different objects, rather than to describe a specific order of objects.
[0067] In the description of the embodiments of the present application, words such as "exemplary," "for example," or "optionally" are used to indicate examples, illustrations, or explanations. Any embodiment or design described in the embodiments of the present application as "exemplary," "for example," or "optionally" should not be interpreted as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary," "for example," or "optionally" is intended to present the relevant concepts in a concrete manner.
[0068] In the description of the embodiments of the present application, the names of various controls, areas, options, and entrances are for illustration only and are not intended to limit the embodiments of the present application. That is, in actual use, they may also be described as other names.
[0069] In the description of the embodiments of this application, unless otherwise specified, "multiple" means two or more. For example, "multiple processing units" means two or more processing units; "multiple systems" means two or more systems.
[0070] In the description of the embodiments of this application, unless otherwise specified, only one user interface can be displayed at a time. For example, if interface 102 is displayed, interface 104 will not be displayed on the current screen. Conversely, if interface 104 is displayed, interface 102 will not be displayed on the current screen. However, the elements included in different interfaces can be the same.
[0071] In the description of the embodiments of the present application, unless otherwise specified, the dotted lines in the drawings are for illustration only, that is, they are not shown in actual use.
[0072] At present, in order to improve the human-computer interaction experience, more and more mobile terminals are equipped with display modules. Specifically in the embodiment 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, Figure 1 The mobile phone 100 shown in (1), and Figure 1 The tablet computer 200 shown in (2) is shown in FIG. The display modules provided by these mobile terminals are, for example, the display screen 101 of the mobile phone 100 and the display screen 201 of the tablet computer 200 .
[0073] In order to ensure the product quality of these mobile terminals, during the production process, in addition to testing the various sensors, buttons, cameras, microphones, earpieces, etc. included in the mobile terminals, the display screens also need to be tested at various workstations, such as screen function testing, screen aging testing, and screen display defect testing.
[0074] For example, in some implementations, the various station detections performed on the display screen of the mobile terminal can be implemented through different detection functions. Figure 2 The first inspection station, the second inspection station, the third inspection station, etc. are shown in FIG.
[0075] Taking the first detection station as an example, when performing a screen aging test on a mobile terminal, such as the display screen 101 of a mobile phone 100, the personnel or equipment at the first detection station can trigger an icon of an application for performing a screen aging test on the user interface displayed on the display screen 101, such as clicking Figure 3A The icon 103 on the interface 102 displayed on the display screen 101 shown in (1) causes the mobile phone 100 to respond to the operation, start the application for performing the screen aging test, and display the corresponding test interface, such as Figure 3A Interface 104 shown in (2). During the screen aging test, the mobile phone 100 will call the backlight control interface specifically used for the screen aging test (hereinafter referred to as: the first backlight control interface), and issue the corresponding backlight instruction to adjust the backlight value (brightness information) of the display screen, thereby realizing the screen aging test.
[0076] Among them, after the screen aging test passes (the screen meets the aging test requirements and passes the test), the display screen 101 can display the corresponding test pass interface. In some implementations, the screen aging test pass interface can be represented by green.
[0077] Accordingly, after the screen aging test fails (the screen does not meet the aging test requirements and the test fails), the display screen 101 can display a corresponding test failure interface. In some implementations, the screen aging test failure interface can be displayed in red.
[0078] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0079] Taking the second inspection station as an example, when performing screen display defect detection on a mobile terminal, such as the display screen 101 of a mobile phone 100, the personnel or equipment at the second inspection station can use the dialing interface displayed on the display screen 101, such as Figure 3B Enter a specific engineering instruction, such as "*#2846#", into the interface 105 shown in (1), and the mobile phone 100 responds to the operation, enters the screen display defect detection mode, and displays the corresponding user interface, such as Figure 3B The interface 106 shown in (2) is shown. After the interface 106 is displayed, the personnel or equipment at the second detection station can trigger the screen display defect detection in different scenarios by pressing the mechanical buttons on the frame of the mobile phone 100, such as the volume button, the power button, etc. During the screen display defect detection process, the mobile phone 100 will call the backlight control interface (hereinafter referred to as the second backlight control interface) specifically used for screen display defect detection, and issue the corresponding backlight instruction to adjust the backlight value (brightness information) of the display screen, thereby realizing the screen display defect detection.
[0080] The engineering instruction "*#2846#" is for illustration only. In some implementations, different engineering instructions can be pre-configured for mobile terminals of different manufacturers and models, so that different mobile terminals can be inspected for screen display defects at the second inspection station.
[0081] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0082] Taking the third inspection station as an example, when performing screen function inspection on the display screen 101 of a mobile terminal, such as a mobile phone 100, the personnel or equipment at the third inspection station can place the mobile phone 100 on a screen function inspection device specifically for screen function inspection, for example, Figure 3C The mobile phone 100 is placed on the workstation drawer 301 of the screen function detection device shown in the figure, and the display screen 101 of the mobile phone 100 is facing the colorimeter 302 of the screen function detection device.
[0083] It should be understood that Figure 3C This is for illustrative purposes only. In practical applications, the screen function detection device may further include a dust removal light source. Thus, during the screen function detection process, dust particles in the air can be charged by irradiation with a specific light source. Subsequently, these charged particles, under the action of the electric field force, can be adsorbed onto the dust collecting plate of the screen function detection device, thereby achieving a dust removal effect and preventing dust on the display screen 101 from interfering with the detection results.
[0084] Furthermore, it should be noted that when performing a screen function test on the display screen 101 of the mobile phone 100, the mobile phone 100 can also be in communication with a control device. Thus, by invoking a backlight control interface specifically used for screen function testing (hereinafter referred to as the third backlight control interface), the control device can issue corresponding backlight instructions via the communication link with the mobile phone 100, thereby adjusting the backlight value (brightness information) of the display screen 101 of the mobile phone 100, thereby performing screen function tests such as white screen tests and black screen tests.
[0085] 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, and white screen black shadows.
[0086] Among them, the black screen test can include black screen light leakage, black screen bright spot and other tests.
[0087] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0088] Through the above combination Figures 3A to 3C As can be seen from the description, these station inspections all require backlight control of the mobile terminal's display screen. However, the backlight control interfaces called by different inspection stations are different.
[0089] In addition, it should be noted that some existing system services, applications, or third-party applications (applications not developed by the terminal manufacturer) in the mobile terminal also have dedicated backlight control interfaces.
[0090] This results in a multi-station inspection scenario where backlight control commands from multiple sources conflict with the display backlight value (brightness information) adjustment, leading to defects as shown in Table 1.
[0091] Table 1 Defects caused by multi-source backlight control interface
[0092]
[0093] The defects shown in Table 1 will directly lead to production line shutdown and low workstation inspection efficiency.
[0094] In addition, abnormal brightness will interfere with the automated detection algorithm, resulting in the risk of missed detection of defective products, which in turn will cause an increase in product defect rates.
[0095] In view of this, an embodiment of the present application provides 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 line stoppage, and improve workstation detection efficiency and product yield.
[0096] In order to better understand the technical solutions provided by the embodiments of the present application, before describing the technical solutions of the embodiments of the present application, the hardware structure of mobile terminals, such as mobile phones and tablet computers, to which the embodiments of the present application are applicable will be described with reference to the accompanying drawings.
[0097] See also 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, a button 490, a motor 491, an indicator 492, a camera 493, a display screen 494, and a subscriber identification module (SIM) card interface 495, etc.
[0098] The audio module 470 may include a speaker 470A, a receiver 470B, a microphone 470C, an earphone jack 470D, and the like.
[0099] Among them, the sensor module 480 may include a pressure sensor, a gyroscope sensor, an air 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., which are not listed here one by one and this application does not limit this.
[0100] The processor 410 may include one or more processing units, and different processing units may be independent devices or integrated into one or more processors.
[0101] Exemplarily, in some implementations, the processor 410 may include a central processing unit (CPU), an application processor (AP), a modem processor (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 processor (DPU), etc., which are not listed one by one here and are not limited in this application.
[0102] The controller may be the nerve center and command center of the mobile terminal 400. In practical applications, the controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and execution.
[0103] Among them, GPU can be used for 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 screen display defect detection process, it is necessary to use GPU to complete image rendering and other processing.
[0104] Among them, DPU can offload infrastructure operations such as security, communication, storage, virtualization, etc. in the data center to DPU, thereby freeing up CPU computing resources and improving overall computing performance.
[0105] The processor 410 may also include a memory for storing instructions and data. In some implementations, the memory in the processor 410 is a cache memory. This memory can store instructions or data that the processor 410 has just used or is reusing. If the processor 410 needs to use the 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 system efficiency.
[0106] The processor 410 may further include one or more interfaces. 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. The interfaces are not listed here one by one and are not limited in this application.
[0107] The external memory interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile terminal 400. The external memory card communicates with the processor 410 via the external memory interface 420 to implement a data storage function.
[0108] The internal memory 421 can be used to store computer-executable program code, which includes 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. The program storage area may store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, and the screen detection function mentioned in the embodiments of the present application, such as a screen aging test function and a screen display defect detection function). The data storage area may store data created during the use of the mobile terminal 400 (such as log files generated during the screen detection process of the mobile terminal based on the technical solution provided in the embodiments of the present application). In addition, the internal memory 421 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0109] The charging management module 440 is configured to receive charging input from a charger, charge the battery 442 , and provide power to the mobile terminal 400 via the power management module 441 .
[0110] 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 input from the battery 442 and / or the charging management module 440 and provides power to the processor 410, the internal memory 421, the external memory, the display 494, the camera 493, and the wireless communication module 460. 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), etc.
[0111] The wireless communication function of the mobile terminal 400 may be implemented through antenna 1, antenna 2, mobile communication module 450, wireless communication module 460, a modem processor, and a baseband processor.
[0112] The mobile communication module 450 may provide wireless communication solutions for the mobile terminal 400, including second-generation wireless telephone technology (2G), third-generation mobile communication technology (3G), fourth-generation mobile communication technology (4G), and fifth-generation mobile communication technology (5G).
[0113] Among them, the wireless communication module 460 can provide wireless communication solutions applied on 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 technology (NFC), infrared technology (IR), etc.
[0114] Among them, the buttons 490 include a power button, a volume button, etc. The buttons 490 can be mechanical buttons or touch buttons. The mobile terminal 400 can receive key inputs and generate key signal inputs related to user settings and function control of the mobile terminal 400. Specifically, in the embodiment of the present application, after the mobile terminal enters the screen display defect detection mode, by pressing the power button or volume button, the second backlight control interface is invoked, and the corresponding backlight command is issued to adjust the display backlight value (brightness information), thereby realizing screen display defect detection.
[0115] Among them, the display screen 494 is used to display images, videos, etc. The display screen 494 includes a display panel. In some implementations, the mobile terminal 400 may include 1 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, a display screen 494, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 494 and the application processor. The GPU is used to perform 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 embodiment of the present application, the screen test performed on the display module of the mobile terminal is for the display screen 494.
[0116] It should be understood that the above description is merely an example for a better understanding of the technical solution of this embodiment and does not constitute 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, or may combine or separate certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0117] In addition, it should be noted that Figure 4 The components of the mobile terminal 400 are also running an operating system. Examples include the iOS operating system developed by Apple, the Android open-source operating system developed by Google, and the Windows operating system developed by Microsoft. These operating systems may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
[0118] For ease of explanation, the embodiment of the present application takes the Android system with a layered architecture as an example to exemplify the software structure of the mobile terminal 400.
[0119] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to mobile terminals based on operating systems such as iOS or Windows.
[0120] See also Figure 5 , which exemplifies a software structure diagram of an electronic device. Figure 5 As shown, the layered architecture of mobile terminal 400 divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other via software interfaces. In some embodiments of the present application, the Android system is divided into five layers: from top to bottom, the application layer, the application framework layer, the Android runtime and system library, the hardware abstraction layer (HAL), and the kernel layer.
[0121] The application layer can include a series of application packages. Figure 4 As shown, the application package may include applications (Application, APP) such as screen detection, phone, video, and settings. They are not listed here one by one and this application does not impose any restrictions on this.
[0122] For example, in some implementations, the screen detection application, for example Figure 3A The application for performing screen aging test shown in (1) is shown.
[0123] For example, in some other implementations, the screen detection application is also used to trigger the entry Figure 3B The application of the screen display picture defect detection mode shown in (2) is shown.
[0124] For example, in some other implementations, the screen detection application is an application that integrates a function for triggering a screen aging test and a function for detecting screen display defects. In such an implementation, after clicking on the screen detection application, the mobile terminal may display an entry for triggering the screen aging test function and an entry for triggering the screen display defect detection function in response to the operation.
[0125] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0126] The phone application can be used to make calls and enter engineering instructions to enter screen display defect detection mode.
[0127] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. In some implementations, these programming interfaces and programming frameworks can be described as functions. Figure 5As shown, the application framework layer may include functions such as power management service (PowerManagerService, PMS), display management service (DisplayManagerService, DMS), display power controller (DisplayPowerController, DPC), etc., which are not listed here one by one and this application does not impose any restrictions on this.
[0128] PMS is responsible for managing and coordinating device power and common device functions, such as turning the screen on and off, brightness adjustment, low power mode, and keeping the CPU awake.
[0129] DMS is responsible for managing the life cycle of display devices, adding, removing, and updating status, and sending notifications to the system and other applications when the status is updated.
[0130] DPC is used to control the display power state, process screen lighting and animation, backlight adjustment, etc.
[0131] Android Runtime includes core libraries and a virtual machine. Android Runtime is responsible for scheduling and management of the Android system.
[0132] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0133] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0134] The system library can include multiple functional modules, such as the surface manager, media libraries, 3D graphics processing libraries (such as OpenGL ES), and 2D graphics engines (such as SGL).
[0135] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0136] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0137] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0138] It can be understood that the 2D graphics engine mentioned above is a drawing engine for 2D drawing.
[0139] 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 become overly dependent on the kernel, thereby allowing the development of the application framework layer to be carried out without considering the driver.
[0140] For example, in some implementations, 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) of various sensors.
[0141] In the embodiments of this application, the display HAL is used to abstract the hardware display functions, allowing upper-layer applications to interact with the underlying hardware. For example, it notifies the corresponding driver to control the initialization, screen resolution, refresh rate, rotation, etc. of the mobile terminal's display, as well as register configuration.
[0142] The kernel layer is the layer between hardware and software. It includes various drivers, such as the surface display engine driver (such as the Surface Display Engine Driver, SDE Driver), display drivers (such as LCDkitDriver), backlight drivers (such as Backlight Driver), and sensor drivers for various sensors (such as Sensor Driver).
[0143] The SDE Driver, as the driver management layer of the display engine, is responsible for scheduling and optimizing the graphics interface rendering process. It manages the display buffer (Frame Buffer), controls screen refresh rates (typical values: 60 / 90 / 120Hz), implements dynamic frame rate switching technologies (such as LTPO), and supports advanced display standards such as HDR10+ and Dolby Vision.
[0144] The LCDkit Driver serves as the hardware interface layer for LCD (Liquid Crystal Display) screens, directly controlling the physical characteristics of the screen. It drives IC register configuration (e.g., via MIPI / SPI interfaces), backlight brightness adjustment (e.g., PWM frequency range: 100Hz-100kHz), color temperature calibration (e.g., support for CIE 1931 XYZ color space conversion), and low blue light mode implementation (e.g., wavelength filtering: 415-455nm).
[0145] Specifically in the embodiment of the present application, the Backlight Driver can verify whether the source of the currently received backlight instruction is legal based on 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 screen detection function (screen function detection function, screen aging test function, screen display defect detection function, etc.) the process that currently issues the backlight instruction is. Then, 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.
[0146] It should be understood that the above description is merely an example for a better understanding of the technical solution of this embodiment and does not constitute a specific limitation on 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, and each layer may include more or fewer components, and this application does not limit this.
[0147] Taking a mobile phone as an example of the mobile terminal having the above hardware and software structures, the multi-source backlight control method for a mobile terminal provided by the embodiment of the present application will be specifically described with reference to the accompanying drawings.
[0148] See also Figure 6 For example, after receiving a backlight instruction from a screen detection application at the application layer (such as an MMI application for screen display defect detection (accessible from the dial-up interface), an application for screen aging test, an application for microneedle detection of the screen, etc.), or a control device connected to the mobile terminal, Hwdisplay will send the received backlight instruction and its own process identification number (PID) to the Backlight Driver.
[0149] 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, send 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, surface manager (SurfaceFlinger), HWC, etc.
[0150] For ease of explanation, the embodiment of the present application uses PID1 to represent the PID of Hwdisplay and uses PID2 to represent the PID of HWC.
[0151] It should be understood that Figure 6In some implementations, the backlight instruction and PID sent to the BacklightDriver may also be other methods, such as those corresponding to an automated detection algorithm.
[0152] Continue to see Figure 6 For example, in the embodiments provided herein, to achieve precise control of multi-source backlight commands, the Backlight Driver implements calls to functions (interfaces) such as determining whether backlight locking is supported (e.g., isLockBacklightSuppor()), locking / unlocking the backlight (e.g., lockBacklight()), and setting the backlight value (e.g., setBacklight()). Thus, upon receiving backlight commands from different objects in the HAL (e.g., Hwdisplay, HWC), the Backlight Driver can execute step a. For example, the isLockBacklightSuppor() interface can be used to determine whether the mobile terminal supports backlight locking.
[0153] For example, in some implementations, when determining whether the mobile terminal supports locking the backlight through the isLockBacklightSuppor() interface, for example, determining whether the Figure 7 The PIDs in the whitelist in the illustrated embodiment.
[0154] Exemplarily, in some other implementations, when determining whether the mobile terminal supports locking the backlight through the isLockBacklightSuppor() interface, for example, determining whether the lockBacklight() interface is supported.
[0155] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0156] Continue to see Figure 6 For example, if it is determined that the mobile terminal supports backlight locking, BacklightDriver can execute step b. For example, the backlight can be locked through the lockBacklight() interface. Specifically, the parameter passed in the lockBacklight() interface can be set to "true", that is, the lockBacklight(true) interface is called. In this way, the enable flag in the relevant driver, such as the display driver, can be set to true, thereby achieving backlight locking.
[0157] It should be noted that, in the embodiment 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.
[0158] Continue to see Figure 6 For example, after locking the backlight, the current backlight value needs to be cached for use after the screen detection is completed.
[0159] For example, in some implementations, the current backlight value may be cached via sysfs (a virtual file system intended to provide a method for accessing kernel data structures), and the appropriate backlight value may be subsequently read from the backlight value cache area.
[0160] For example, in some implementations, the backlight value cache area may be accessed according to a preset path, such as " / sys / class / backlight / ... / brightness".
[0161] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0162] Continue to see Figure 6 For example, after locking the backlight and caching the current backlight value, the Backlight Driver may execute step c. For example, by determining whether the PID corresponding to the currently received backlight instruction is the PID saved during the initialization phase, the Backlight Driver may determine whether the source of the currently calculated backlight instruction is legitimate.
[0163] For the implementation logic of saving the legitimate source PID during the initialization phase, please refer to Figure 7 The embodiments shown are not described in detail here.
[0164] As can be seen from the above description, in this embodiment of the present application, only backlight commands issued by Hwdisplay are allowed to set the backlight value. Therefore, when the PID corresponding to the backlight command is the PID of Hwdisplay, such as PID1, it can be determined that the source of the backlight command is legitimate. Otherwise, the source of the backlight command is considered illegitimate.
[0165] Continue to see 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 the backlight instruction through the setBacklight() interface, and send the backlight value to the driver required for this screen detection, such as SDE Driver and / or LCDkitDriver.
[0166] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0167] In addition, it should be noted that the processing logic during the period of locking the backlight and performing screen detection, as well as the processing logic after the screen detection is completed, can be found in Figure 8 The embodiments shown are not described in detail here.
[0168] As can be seen from the above description, during the backlight lock period, the mobile terminal display's backlight value can only be set according to the backlight command issued by Hwdisplay. This prevents other applications and services from modifying the backlight value during screen detection, enabling precise control and abnormal protection of backlight from multiple sources, avoiding the risk of line stoppages and improving workstation inspection efficiency and product yield.
[0169] See also Figure 7 , illustrates an example of a schematic diagram of the processing logic for saving the legitimate source PID during the initialization phase. The implementation logic of this phase may include:
[0170] S501, when the system is turned on or the service is restarted, start the display screen related driver.
[0171] Among them, display-related drivers are, for example, drivers that can interact through Hwdisplay, such as Backlight Driver, SDE Driver, LCDkit Driver, etc.
[0172] S502: Check whether the display screen related driver is ready to start.
[0173] For example, check whether the display-related drivers have completed all parameter settings, identified the corresponding sensor signals in the display, and have no abnormal alarm information.
[0174] Accordingly, when all parameters are set, 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.
[0175] S503: Initialize Hwdisplay and save the PID of Hwdisplay.
[0176] Specifically, when the system is turned on or the server is restarted, if the display-related driver is ready, Hwdisplay can be initialized and a corresponding PID, such as PID1, can be assigned to Hwdisplay, and PID1 of Hwdisplay can be saved.
[0177] In this way, Hwdisplay can subsequently receive the backlight command from the screen detection application at the application layer and send it to the Backlight Driver. This allows the Backlight Driver to determine whether the PID corresponding to the currently received backlight command is PID1 saved during the initialization phase, and further determine whether the source of the currently received backlight command is legitimate.
[0178] In addition, it should be noted that, during the process of initializing Hwdisplay, other HALs may also be initialized, thereby allocating corresponding PIDs to corresponding service processes.
[0179] In addition, it should be noted that in order to facilitate the distinction between these PIDs, the PID of the service process used to identify the legitimate source of the backlight instruction can be added to a whitelist. In this way, in actual application, all backlight instructions issued by the service process corresponding to the PID that can be added to the whitelist can be considered to be from a legitimate source, thereby achieving the adjustment of the backlight value during the period of locking the backlight. Conversely, the backlight instructions issued by the service process corresponding to the PID that is not in the whitelist can be considered to be from an illegal source. For backlight instructions from illegal sources, the Backlight Driver can intercept them. For example, instead of setting the backlight value according to the backlight instruction from an illegal source and issuing the backlight value, it caches the backlight value corresponding to the backlight instruction from an illegal source. In this way, it is possible to avoid the backlight instruction from an illegal source from modifying the backlight value, causing the backlight value to change during the screen detection process, resulting in the problem of screen brightness jumping.
[0180] In some implementations, when intercepting backlight instructions from illegal sources, corresponding log files can also be recorded to facilitate subsequent abnormality location and repair.
[0181] S504: After calling the DisplayUniversal() interface for the first time, initialize Hwdisplay and save the PID of Hwdisplay.
[0182] It's important to note that during system startup or service restart, the DisplayUniversal() interface is responsible for activating display hardware (such as the GPU or integrated graphics card) and configuring basic display parameters (resolution, color mode, etc.), ensuring that the BIOS (Basic Input / Output System) / UEFI (Unified Extensible Firmware Interface) or operating system can output the startup screen. Therefore, if the display-related drivers are not ready, it's possible to monitor whether the DisplayUniversal() interface has been called for the first time. After the DisplayUniversal() interface is called for the first time, the display-related drivers can be started and prepared.
[0183] Accordingly, after calling the DisplayUniversal() interface for the first time, the operation of step S503 can also be performed. In this way, it is possible to ensure that the PID of the legal source is saved in the whitelist, and to avoid repeated saving, resulting in data redundancy and reducing resource occupation.
[0184] Therefore, by initializing a legitimate service process, such as Hwdisplay, during system startup or service restart, and then saving Hwdisplay's PID1 to the whitelist corresponding to the backlight instruction from a legitimate source, after locking the backlight, it is possible to quickly and accurately determine whether the PID corresponding to the currently received backlight instruction is legitimate based on the PID maintained in the whitelist, and then determine whether the source of the currently received backlight instruction is legitimate, thereby achieving precise control of backlights from multiple sources.
[0185] See also Figure 8 , which exemplifies a schematic diagram of the processing logic for locking and unlocking the backlight after receiving a backlight command. The implementation logic of this stage may include:
[0186] S601: When a backlight instruction is received, determine whether backlight locking is supported.
[0187] Specifically, after receiving the backlight instruction from Hwdisplay, HWC, and other services in HAL, Backlight Driver can determine whether the mobile terminal supports locking the backlight by calling the isLockBacklightSuppor() interface. Figure 6 Backlight Driver performs step a. For details on the implementation of this step, see Figure 6 The description of step a in the illustrated embodiment will not be repeated here.
[0188] In the case where it is determined that the mobile terminal does not support locking the backlight, in some implementations, Backlight Drive may execute step S602.
[0189] In the case where it is determined that the mobile terminal supports locking the backlight, in some implementations, Backlight Drive may execute step S603.
[0190] S602: Set the backlight value according to the backlight instruction.
[0191] For example, the 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.
[0192] In some implementations, when the mobile terminal does not support locking the backlight, during the execution of step S602 , the current log file may be recorded for subsequent use.
[0193] S603, lock the backlight and cache the current backlight value.
[0194] 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. Figure 6 Backlight Driver performs step b. For details on the implementation of this step, see Figure 6 The description of step b in the illustrated embodiment will not be repeated here.
[0195] For example Figure 9A As shown, when the current backlight value is BN0, when the 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 " / sys / class / backlight / ... / brightness" path.
[0196] For example Figure 9B As shown, when the current backlight value is BN5, when the 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 " / sys / class / backlight / ... / brightness" path.
[0197] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0198] Furthermore, it should be noted that, in some implementations, to ensure that the backlight function of the display screen has been locked so that subsequent processing can proceed normally, before executing step S604 or before executing step S606, it may be further determined whether the backlight function has been locked. For example, a flag bit corresponding to the backlight function is checked to see whether it is "true."
[0199] Accordingly, if it is determined that the flag corresponding to the backlight function is "true", step S604 or step S606 is executed again. Otherwise, step S603 can be executed again, or a log file can be input.
[0200] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0201] S604: Determine whether the PID of the currently received backlight instruction is the PID of Hwdisplay saved in the initialization phase.
[0202] 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 phase. Figure 6 Step c performed by BacklightDriver in . For the specific implementation details of this step, please refer to Figure 6 The description of step c in the illustrated embodiment will not be repeated here.
[0203] When it is determined that the PID of the currently received backlight instruction is not the PID of Hwdisplay saved in the initialization phase, such as PID1, in some implementations, step S605 may be executed.
[0204] When it is determined that the PID of the currently received backlight instruction is the PID of Hwdisplay saved in the initialization phase, such as PID1, in some implementations, step S606 may be executed.
[0205] S605: Cache the backlight value corresponding to the backlight instruction.
[0206] After locking the backlight period, if it is determined that the PID of the currently received backlight command is not the PID saved in the whitelist during the initialization phase, such as the PID of Hwdisplay, the backlight value corresponding to the currently received backlight command is cached in a specified backlight value cache area through sysfs, such as the " / sys / class / backlight / ... / brightness" path.
[0207] In addition, it should be noted that after locking the backlight and before unlocking the backlight, that is, during the period of locking the backlight, if other backlight instructions are received, the legal source of each backlight instruction needs to be verified.
[0208] Accordingly, when it is determined that the source of the currently received backlight instruction is legal, it is issued normally and screen detection is performed, such as executing step S606. Otherwise, step S605 is executed.
[0209] That is, during the backlight locking period, all backlight instructions received need to be verified for legal sources. If the verified source is legal, step S606 is repeated; if the verified source is illegal, the backlight value corresponding to each illegal backlight instruction is cached.
[0210] For example Figure 9A As shown, during the backlight lock period, four backlight commands were received. The backlight values corresponding to these four backlight commands are backlight value BN1, backlight value BN2, backlight value BN3, and backlight value BN4. After the judgment process in step S604, it is determined that the sources of the backlight commands corresponding to the four backlight values BN1, BN2, BN3, and BN4 are all legal. The Backlight Driver will execute the operation of step S606 four times based on the backlight commands corresponding to these four backlight values. That is, after receiving the backlight instruction corresponding to the backlight value BN1, the operation of step S604 is executed once, and when it is determined that the backlight instruction corresponding to the backlight value BN1 is a legal source, step S606 is executed once; after receiving the backlight instruction corresponding to the backlight value BN2, the operation of step S604 is executed once, and when it is determined that the backlight instruction corresponding to the backlight value BN2 is a legal source, step S606 is executed once; after receiving the backlight instruction corresponding to the backlight value BN3, the operation of step S604 is executed once, and when it is determined that the backlight instruction corresponding to the backlight value BN3 is a legal source, step S606 is executed once; after receiving the backlight instruction corresponding to the backlight value BN4, the operation of step S604 is executed once, and when it is determined that the backlight instruction corresponding to the backlight value BN4 is a legal source, step S606 is executed once.
[0211] For example Figure 9BAs shown, during the backlight lock period, four backlight instructions were received. The backlight values corresponding to these four backlight instructions were backlight values BN6, BN7, BN8, and BN9. After the judgment process in step S604, it was determined that the sources of the backlight instructions corresponding to the backlight values BN6 and BN9 were legal, while the sources of the backlight instructions corresponding to the backlight values BN7 and BN8 were illegal. In this scenario, the Backlight Driver will perform the operation of step S606 twice and the operation of step S605 twice. That is, after receiving the backlight instruction corresponding to the backlight value BN6, the operation of step S604 is executed once, and when it is determined that the backlight instruction corresponding to the backlight value BN6 is a legal source, step S606 is executed once; after receiving the backlight instruction corresponding to the backlight value BN7, the operation of step S604 is executed once, and when it is determined that the backlight instruction corresponding to the backlight value BN6 is an illegal source, step S605 is executed once; after receiving the backlight instruction corresponding to the backlight value BN8, the operation of step S604 is executed once, and when it is determined that the backlight instruction corresponding to the backlight value BN8 is an illegal source, step S605 is executed once; after receiving the backlight instruction corresponding to the backlight value BN9, the operation of step S604 is executed once, and when it is determined that the backlight instruction corresponding to the backlight value BN9 is a legal source, step S606 is executed once.
[0212] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0213] In this way, by caching the backlight value corresponding to the backlight instruction from an illegal source instead of directly setting the backlight value according to the illegal backlight instruction, it is possible to avoid locking the backlight and causing the brightness of the display screen to jump during screen detection.
[0214] S606: Set the backlight value according to the backlight instruction and perform screen detection.
[0215] When it is determined that the source of the backlight instruction is legal, the Backlight Driver can set the backlight value according to the backlight instruction through the setBacklight() interface, and send the backlight value to the driver required for this screen detection, such as the SDE Driver and / or LCDkitDriver, to achieve the corresponding screen detection.
[0216] S607: After the screen detection is completed, unlock the backlight.
[0217] After screen detection is complete, the Backlight Driver can unlock the backlight using the lockBacklight() interface. Specifically, this can be done by setting the parameter passed to lockBacklight() to "false," i.e., calling the lockBacklight(false) interface. This will then set the enable flag in related drivers, such as the display driver, to false, thereby unlocking the backlight.
[0218] In addition, it should be noted that to achieve high reliability, in some implementations, when a screen-off event is detected, the backlight lock flag can be automatically cleared. That is, when the screen goes off, regardless of whether the current screen detection has ended, the Backlight Driver calls the lockBacklight(false) interface to unlock the backlight. This prevents the backlight from being locked due to abnormal service processes, thereby enhancing the system's fault tolerance.
[0219] In addition, it should be noted that in some other implementations, an interface for specifically clearing the backlight lock flag may also be provided. In this way, when a screen-off event is detected, triggering the automatic clearing of the backlight lock flag, the interface can be directly called.
[0220] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0221] S608: After unlocking the backlight, the backlight value is set to the latest backlight value cached in the cache.
[0222] After unlocking the backlight, sysfs can read the latest cached backlight value from the backlight value cache area, such as the " / sys / class / backlight / ... / brightness" path, and set the latest backlight value as the current backlight value of the display.
[0223] For example Figure 9A As shown, when the backlight is locked, if all the backlight commands received are from legitimate sources, after the backlight is unlocked, the latest backlight value read from the backlight value cache is the backlight value cached when the backlight is locked, such as backlight value BN0.
[0224] For example Figure 9B As shown, during the backlight lock period, if the backlight command received has an illegal source, such as the backlight command corresponding to backlight value BN7 and backlight value BN8, the backlight value cache area will cache the corresponding backlight values in the order of the backlight commands received from the illegal source. That is, Figure 9BIn the scenario shown, before the backlight is unlocked, the latest backlight value cached in the backlight value cache area is backlight value BN8. Therefore, after the backlight is unlocked, the latest backlight value read from the backlight value cache area is backlight value BN8. Therefore, after the backlight is unlocked, the backlight value of the display will be set to backlight value BN8.
[0225] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.
[0226] Therefore, based on the above-mentioned multi-source backlight control method for mobile terminals, by building a collaborative control architecture between the driver layer and the application layer, the relevant drivers in the HAL and the kernel can interact with various screen detection applications. In this way, when the driver layer receives a backlight command triggered by the application layer, the driver layer locks the backlight and, based on the PID maintained in the whitelist, quickly and accurately determines whether the PID corresponding to the currently received backlight command is legal, and then determines whether the source of the currently received backlight command is legal, thereby achieving precise control of backlights from multiple sources.
[0227] In addition, after locking the backlight, the PID of the service process that sends the backlight command is maintained and managed, which realizes the normalization and hierarchical management of the backlight control interface (backlight command), and realizes the precise isolation and control of backlight commands from multiple sources, thereby eliminating the backlight control logic conflicts of multiple inspection stations and avoiding the risk of line stoppage.
[0228] In addition, by introducing a dynamic cache and recovery mechanism and combining the cache mechanism with active intervention at the driver layer, seamless switching of brightness states before and after testing is ensured, thereby improving production line testing efficiency.
[0229] In addition, since the multi-source backlight control solution for mobile terminals provided by the embodiment of the present application can be implemented through the coordinated management and control of the application layer and the driver layer, full-process brightness closed-loop management can be achieved without additional hardware costs.
[0230] In addition, it is understandable that, in order to implement the above functions, the mobile terminal includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form 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 be beyond the scope of this application.
[0231] Furthermore, it should be noted that, in actual application scenarios, the mobile terminal multi-source backlight control methods provided in the above embodiments implemented by a mobile terminal may also be executed by a chip system included in the mobile terminal. The chip system may include a processor. The chip system may be coupled to a memory so that, when the chip system is running, it calls a computer program stored in the memory to implement the steps executed by the above mobile terminal. The processor in the chip system may be an application processor or a processor other than an application processor.
[0232] In addition, the present invention also provides a mobile terminal multi-source backlight control system. The system does not belong to a mobile terminal with a display screen, so that when the mobile terminal is running, it can execute the above-mentioned related method steps to implement the method in the above embodiment.
[0233] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a mobile terminal, the mobile terminal executes the above-mentioned related method steps to implement the method in the above-mentioned embodiment.
[0234] In addition, an embodiment of the present application further provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal executes the above-mentioned related steps to implement the method in the above-mentioned embodiment.
[0235] In addition, embodiments of the present application further provide a device. This device may be a chip, component, or module. The device may include a processor and a memory connected to each other; the memory is configured to store computer-executable instructions. When the device is running, the processor may execute the computer-executable instructions stored in the memory, causing the chip to perform the methods described in the aforementioned method embodiments.
[0236] In addition, it can be seen from the above description that the mobile terminal, computer-readable storage medium, computer program product or chip provided in 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 repeated here.
[0237] Furthermore, those skilled in the art will appreciate that, based on the above description of the embodiments, for ease and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed. In other words, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0238] In addition, it is understandable that in the several embodiments provided in this application, the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0239] 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 above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, 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 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 including a display screen, the method comprising: When a backlight instruction is received, 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 illegal, a third backlight value corresponding to the backlight instruction is cached; wherein, while the backlight function of the display screen of the mobile terminal is locked, the third backlight values corresponding to all backlight instructions received from illegal sources are cached in the order in which the backlight instructions from the illegal sources are received; If 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 screen detection on the display screen; After completing the screen detection of the display screen, unlocking the backlight function, and setting the backlight value of the display screen according to the cached latest backlight value; After locking the backlight function of the display screen of the mobile terminal, the method further includes: When the display screen is turned off, the backlight function is unlocked, and the backlight value of the display screen is set according to the latest cached backlight value.
2. The method according to claim 1, characterized in that The step of setting the backlight value of the display screen according to the cached latest backlight value includes: 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 backlight value in the buffer is the third backlight value, the backlight value of the display screen is set to the third backlight value.
3. The method according to claim 1 or 2, 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.
4. The method according to claim 3, 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.
5. The method according to claim 4, 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.
6. The method according to claim 1 or 2, characterized in that The locking of the backlight function of the display screen of the mobile terminal includes: Determining whether the mobile terminal supports a backlight locking function for 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.
7. The method according to claim 6, characterized in that The determining whether the mobile terminal supports a backlight locking function for 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 is from a legitimate source.
8. The method according to claim 1 or 2, characterized in that The unlocking of the backlight function includes: 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.
9. The method according to claim 1 or 2, characterized in that When the display screen is turned off, unlocking the backlight function includes: When the display screen is turned off, the identification information of the flag corresponding to the backlight function of the display screen is cleared. 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.
10. A mobile terminal, characterized in that: 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 mobile terminal multi-source backlight control method according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that The method comprises a computer program, which, when executed on a mobile terminal, enables the mobile terminal to execute the multi-source backlight control method for a mobile terminal according to any one of claims 1 to 9.
Citation Information
Patent Citations
Screen test method for controlling brightness, electronic equipment and related medium
CN119377027A