Method and device for displaying optimal brightness of equipment for two-dimensional code

By dynamically obtaining the brightness of the surrounding environment of mobile devices and combining Fechner's law to calculate, optimizing the brightness of the mobile phone screen to display the QR code, solving the problem of ignoring the user's visual experience in the existing technology, and achieving better visual experience and device scanning efficiency.

CN119600911APending Publication Date: 2025-03-11AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411724957.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The existing technology can improve the brightness of the mobile phone screen when the APP enters the QR code interface, only pay attention to the device scanning efficiency and ignore the user's visual experience, resulting in problems that users may not see clearly or dazzling in different environments.

Method used

The brightness of the surrounding environment is dynamically obtained through the light sensor of the mobile device, combined with the optimized Fischner's law and the pre-set visual perception gap in the human eye, the enhanced brightness is calculated, and the brightness is set when the APP QR code is turned on to optimize the user's visual experience.

Benefits of technology

It realizes that when the APP enters the QR code interface, displaying the QR code with the best brightness, improving the user's visual experience, and taking into account the brightness conditions of the surrounding environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600911A_ABST
    Figure CN119600911A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment optimal brightness display method and device for a two-dimensional code, and the method comprises the steps: dynamically obtaining the surrounding environment brightness of mobile equipment through a light sensor of the mobile equipment, carrying out the calculation according to an optimized Fechner's law calculation formula, a preset human visual perception gap and the surrounding environment brightness, and obtaining the optimal brightness of the mobile equipment. And when it is monitored that the APP two-dimensional code of the mobile device is started, setting the brightness of the APP two-dimensional code display interface of the mobile device through the enhanced brightness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of device brightness display, and more specifically, to a method and apparatus for displaying optimal brightness of a device for a two-dimensional code. Background Art

[0002] At present, the QR code function has been widely integrated into the applications (Application, App) of various mobile devices (such as mobile phones), and is often used in scenarios such as scanning code to pay, scanning code to receive money, scanning code to take a bus, etc. In order to facilitate the use of the QR code function of the mobile phone App to scan code to pay, scan code to receive money, scan code to take a bus, etc., it is necessary to increase the brightness of the mobile phone screen when the APP enters the QR code interface. The display interface with increased brightness is conducive to distinguishing the mobile device screen from the surrounding environment, and facilitates the device to locate and identify the QR code content more quickly.

[0003] The current method of increasing the brightness of the mobile phone screen when entering the QR code interface of the APP is generally to enhance the brightness to a larger fixed value to improve the efficiency of device scanning. However, only focusing on the efficiency of device scanning while ignoring the user's visual experience will inevitably lead to many unfriendly user visual experiences. For example, in some boarding code interfaces, the QR codes for buses and subways are different, and in the same interface, switching between the two requires manual operation on the screen. Too low or too high brightness in different environments will cause users to see unclearly or glare.

[0004] Therefore, how to display the QR code with the best brightness when the APP enters the QR code interface to improve the user's visual experience is a problem that needs to be solved urgently in this application. Summary of the invention

[0005] In view of this, the present application discloses a method and apparatus for optimal brightness display of a QR code device, aiming to display the QR code with optimal brightness when the APP enters the QR code interface to improve the user's visual experience.

[0006] In order to achieve the above purpose, the disclosed technical solution is as follows:

[0007] The first aspect of the present application discloses a device optimal brightness display method for a two-dimensional code, the method comprising:

[0008] Dynamically obtain the ambient brightness of the mobile device through the light sensor of the mobile device;

[0009] The enhanced brightness is obtained by calculating according to the optimized calculation formula of Fechner's law, the preset human eye visual perception gap and the surrounding environment brightness;

[0010] When it is detected that the APP QR code of the mobile device is opened, the brightness of the APP QR code display interface of the mobile device is set according to the enhanced brightness.

[0011] Preferably, dynamically acquiring the ambient brightness of the mobile device through a light sensor of the mobile device includes:

[0012] When the QR code interface of the mobile device is detected, the parameters of the camera of the mobile device are obtained according to the interface of the camera hardware;

[0013] Setting parameters of a camera of a mobile device; wherein the parameters at least include an input device stream, an output device stream, and an output device stream proxy;

[0014] Start a session to obtain the video frame content output by the camera of the mobile device after the settings are completed, and obtain the initial environment brightness;

[0015] Normalizing the initial environment brightness to obtain a normalized frame brightness value;

[0016] The ambient brightness of the mobile device is determined according to the normalized frame brightness value and a preset value.

[0017] Preferably, determining the ambient brightness of the mobile device according to the normalized frame brightness value and a preset value includes:

[0018] The normalized frame brightness value is multiplied by a preset value to obtain the ambient brightness of the mobile device.

[0019] Preferably, the calculation based on the optimized calculation formula of Fechner's law, the preset human eye visual perception gap and the ambient brightness to obtain the enhanced brightness includes:

[0020] The human eye visual value is calculated based on the optimized Fechner's law;

[0021] The human eye visual value is summed with a preset human eye visual perception gap to obtain an enhanced visual value;

[0022] Calculate the enhanced visual value according to the inverse calculation formula of Fechner's law to obtain the brightness value of the mobile device;

[0023] The brightness value of the mobile device is reduced by a preset multiple to obtain enhanced brightness; wherein the preset multiple is consistent with the preset value.

[0024] Preferably, it also includes:

[0025] When the QR code of the mobile device is not detected to be turned on, the screen brightness of the non-QR code scene preset on the mobile device is restored.

[0026] The second aspect of the present application discloses a device for displaying optimal brightness of a two-dimensional code, the device comprising:

[0027] An acquisition unit, used to dynamically acquire the ambient brightness of the mobile device through a light sensor of the mobile device;

[0028] A calculation unit, used to calculate according to the optimized calculation formula of Fechner's law, the preset human eye visual perception gap and the surrounding environment brightness to obtain the enhanced brightness;

[0029] The monitoring setting unit is used to set the brightness of the APP QR code display interface of the mobile device according to the enhanced brightness when it is detected that the APP QR code of the mobile device is opened.

[0030] Preferably, the acquisition unit includes:

[0031] A monitoring and acquisition module is used to acquire the parameters of the camera of the mobile device according to the interface of the camera hardware when detecting the entry of the QR code interface of the mobile device;

[0032] A setting module, used to set the parameters of the camera of the mobile device; wherein the parameters at least include an input device stream, an output device stream and an output device stream proxy;

[0033] A first acquisition module is used to start a session to obtain the video frame content output by the camera of the mobile device after setting, and obtain the initial environment brightness;

[0034] A normalization module, used to perform normalization processing on the initial environment brightness to obtain a normalized frame brightness value;

[0035] The determination module is used to determine the ambient brightness of the mobile device according to the normalized frame brightness value and a preset value.

[0036] Preferably, the determining module is specifically used to:

[0037] The normalized frame brightness value is multiplied by a preset value to obtain the ambient brightness of the mobile device.

[0038] Preferably, the computing unit comprises:

[0039] The first calculation module is used to calculate the human eye visual value according to the optimized Fechner's law;

[0040] A summing module, used for summing the human eye visual value and a preset human eye visual perception gap to obtain an enhanced visual value;

[0041] A second calculation module is used to calculate the enhanced visual value according to the inverse calculation formula of Fechner's law to obtain a brightness value of the mobile device;

[0042] The second acquisition module is used to reduce the brightness value of the mobile device by a preset multiple to obtain an enhanced brightness; wherein the preset multiple is consistent with the preset value.

[0043] Preferably, it also includes:

[0044] The recovery unit is used to restore the screen brightness of the non-QR code scene preset by the mobile device when the QR code of the mobile device is not detected to be turned on.

[0045] Through the above technical scheme, it can be known that the present application discloses a device optimal brightness display method and device for a QR code, which dynamically obtains the ambient brightness of the mobile device through the optical sensor of the mobile device, and calculates according to the optimized calculation formula of Fechner's law, the pre-set human eye visual perception gap and the ambient brightness to obtain an enhanced brightness. When the APP QR code of the mobile device is detected to be turned on, the brightness of the APP QR code display interface of the mobile device is set by the enhanced brightness. According to the above scheme, in the process of enhancing the brightness of the mobile device, the ambient brightness of the mobile device is dynamically obtained through the optical sensor of the mobile device, and the enhanced brightness is obtained in combination with the human eye visual perception gap. The enhanced brightness can take into account the user's human eye experience while taking into account the surrounding environment. The brightness of the APP QR code display interface of the mobile device is set by the enhanced brightness, so that when the APP enters the QR code interface, the QR code is displayed at the optimal brightness to improve the user's visual experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0047] Figure 1 A schematic diagram of a process of a device optimal brightness display method for a two-dimensional code disclosed in an embodiment of the present application;

[0048] Figure 2 A schematic diagram of a brightness-visual relationship disclosed in an embodiment of the present application;

[0049] Figure 3 A schematic diagram of another brightness-visual relationship disclosed in an embodiment of the present application;

[0050] Figure 4This is an example diagram of the optimal brightness display of a device for a QR code disclosed in an embodiment of the present application;

[0051] Figure 5 A schematic diagram of the process of another device optimal brightness display method for a two-dimensional code disclosed in an embodiment of the present application;

[0052] Figure 6 A schematic diagram of the structure of a device for displaying optimal brightness of a two-dimensional code disclosed in an embodiment of the present application;

[0053] Figure 7 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0055] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0056] As can be seen from the background technology, the existing way to increase the brightness of the mobile phone screen when the APP enters the QR code interface is generally to enhance the brightness to a larger fixed value to improve the efficiency of device scanning. However, only paying attention to the efficiency of device scanning and ignoring the user's visual experience will inevitably cause many unfriendly user visual experiences. For example, in some boarding code interfaces, the QR codes for buses and subways are different, and in the same interface, the switching between the two requires manual operation on the screen. Too low or too high brightness in different environments will cause users to see unclearly or glaringly. Therefore, how to display the QR code with the best brightness when the APP enters the QR code interface to improve the user's visual experience is a problem that urgently needs to be solved in this application.

[0057] In order to solve the above problems, the present application discloses a device optimal brightness display method and device for a QR code. In the process of enhancing the brightness of a mobile device, the ambient brightness of the mobile device is dynamically acquired through the light sensor of the mobile device, and the enhanced brightness is obtained in combination with the visual perception difference of the human eye. The enhanced brightness can take into account the user's human eye experience while taking into account the surrounding environment. The brightness of the APP QR code display interface of the mobile device is set by the enhanced brightness, so that when the APP enters the QR code interface, the QR code is displayed at the optimal brightness to improve the user's visual experience. The specific implementation method is specifically described by the following embodiments.

[0058] refer to Figure 1 FIG. 1 is a flow chart of a method for displaying optimal brightness of a device for a two-dimensional code disclosed in an embodiment of the present application. The method for displaying optimal brightness of a device for a two-dimensional code mainly includes the following steps:

[0059] S101: Dynamically obtain the ambient brightness of the mobile device through a light sensor of the mobile device.

[0060] Mobile devices include but are not limited to mobile phones, tablet computers, etc.

[0061] Among them, mobile devices generally have light sensors, and the light sensors of mobile devices are used to obtain the surrounding brightness. orig Indicated by.

[0062] The specific process of dynamically acquiring the ambient brightness of the mobile device through the light sensor of the mobile device is shown in A1-A5.

[0063] A1: When the QR code interface of the mobile device is detected, the camera parameters of the mobile device are obtained according to the camera hardware interface.

[0064] Among them, the QR code is a black and white graphic that records data symbol information distributed in a plane (two-dimensional direction) according to a certain geometric pattern. It is automatically read by image input equipment or photoelectric scanning equipment to realize automatic information processing.

[0065] A2: Setting parameters of a camera of a mobile device; wherein the parameters at least include an input device stream, an output device stream, and an output device stream proxy.

[0066] Among them, the input device stream is set according to the operating system type of different mobile devices. For example, if the operating system of the mobile device is an IOS system, the input device stream AVCaptureDeviceInput, the output device stream AVCaptureVideoDataOutput and the AVCaptureDeviceInput agent are set.

[0067] iOS is a mobile phone operating system that provides various system permissions for apps and is the key to ensuring the normal operation of the phone, similar to the Windows operating system on PCs.

[0068] A3: Start a session to obtain the video frame content output by the camera of the mobile device after the settings are completed, and obtain the initial environment brightness.

[0069] Among them, the frame brightness value is expressed as R orig express.

[0070] A4: Normalize the initial environment brightness to obtain a normalized frame brightness value.

[0071] Among them, the normalized frame brightness value is R′ orig express.

[0072] A5: The ambient brightness of the mobile device is determined according to the normalized frame brightness value and a preset value.

[0073] In A5, the normalized frame brightness value is multiplied by the preset value to obtain the ambient brightness of the mobile device, so as to ensure that the normalized frame brightness value is within the preset threshold range. Then, Fechner's law is used to calculate the visual value to be around 0 to 1, which can ensure consistency with the range (0 to 1) of the mobile phone screen brightness setting under the iOS system.

[0074] Among them, the preset value is 10.

[0075] The preset threshold range is the range of mobile phone screen brightness (0 to 1).

[0076] For the sake of understanding the process of dynamically acquiring the ambient brightness of the mobile device through the light sensor of the mobile device, an IOS system mobile phone is used as an example for explanation, as shown in S201-S205.

[0077] S201: Get the mobile phone camera device according to AVCaptureDevice.

[0078] S202: Set the camera input and output device streams AVCaptureDeviceInput and AVCaptureVideoDataOutput, and set the AVCaptureVideoDataOutput agent.

[0079] S203: Start the session, obtain the camera output video frame content kCGImagePropertyExifBrightnessValue, and obtain the initial environment brightness, that is, the frame brightness value R orig .

[0080] S204: Set the human eye perception difference d to the ambient brightness R orig Normalization processing is performed to obtain the normalized frame brightness value R′ orig The specific process of S204 is shown in S301-S302:

[0081] S301: Use the normalization formula to calculate R orig Processing, because the R obtained under the IOS system orig The value range is -5 to 12, which is not conducive to the calculation using the Fechner's law formula. The normalized frame brightness value range is 0 to 1.

[0082] The normalization formula is shown in formula (1).

[0083]

[0084] Among them, R' is the normalized frame brightness value range; R is the stimulus intensity; R max is the maximum brightness of the frame; R min is the minimum brightness of the frame.

[0085] S302: Multiply the normalized frame brightness value by a preset value (10) so that R′ orig The value range is 0 to 10, and then using Fechner's law, the visual value calculated is around 0 to 1, which can ensure consistency with the range (0 to 1) of the mobile phone screen brightness setting under the IOS system.

[0086] S205: Calculate the human eye visual value S based on the optimized Fechner's law formula orig , using the optimized Fechner's law formula, the human eye visual value S can be calculated orig , the relationship between mobile device screen brightness and human vision is shown in the attached Figure 2 shown.

[0087] The optimized Fechner's law formula is shown in formula (2).

[0088] S = lg(R+1)(2)

[0089] Among them, S is the sensation intensity; R is the stimulus intensity.

[0090] S102: Calculate the enhanced brightness (R up ).

[0091] The human eye visual perception gap is set. This value determines the user's visual experience of the brightened QR code. If it is too large, it may cause glare, and if it is too low, the brightening may not be obvious, affecting the clarity of the QR code. The human eye visual perception gap is represented by d.

[0092] The human eye perception gap can be a better value screened out based on the experience of most people, or different values ​​can be set according to the age group of the user, because users of different age groups have different sensitivities to light changes.

[0093] Fechner's law is developed on the basis of Weber's law. It states that the psychological quantity felt by a person is proportional to the logarithm of the physical stimulus quantity, and the quantity of feeling is proportional to the logarithm of the physical quantity. The increase in the quantity of feeling lags behind the increase in the physical quantity, showing that the physical quantity grows in geometric series, while the psychological quantity grows in arithmetic series. For example, in a dark environment, very little light can stimulate the brightness perception of the human eye. To achieve the same feeling in a bright environment, more light is needed. The calculation formula of Fechner's law is shown in formula (3).

[0094] S=K·lg R (3)

[0095] Among them, S is the sensation intensity; R is the stimulus intensity; and K is a constant.

[0096] The enhanced brightness is calculated based on Fechner's law and the difference between human visual perception. The enhanced brightness is calculated by R up It is known that R orig Under these conditions, the visual value S can be calculated according to formula (3) orig , plus the visual value S after the human eye visual perception gap is enhanced up , the enhanced brightness R can be calculated by reverse calculation according to formula (3) up .

[0097] The enhanced brightness (R up ) process is shown in B1-B4.

[0098] B1: The human visual value (S) is calculated based on the optimized Fechner law. orig ).

[0099] B2: The human visual value (S orig ) is summed with the preset human visual perception gap to obtain the enhanced visual value (S′ orig ).

[0100] B3: According to the Fechner law, the enhanced visual value (S′ orig ) is used to calculate the brightness value of the mobile device. The reverse calculation formula is shown in formula (4).

[0101]

[0102] Among them, Y is the visual value of the human eye; X is the brightness value of the mobile device.

[0103] B4: Reduce the brightness value of the mobile device by a preset multiple (10 times) to obtain the enhanced brightness (R up ).

[0104] The preset multiple is consistent with the preset value (such as 10).

[0105] In order to facilitate the understanding of the process of obtaining enhanced brightness, the IOS system is used as an example to illustrate:

[0106] For example, the human eye visual value is calculated based on the optimized Fechner's law formula. The human eye visual value can be calculated using the optimized Fechner's law formula. The final relationship between the brightness value of the mobile device and the human eye visual value is shown in C1-C2.

[0107] C1: The human visual value S orig Add the visual perception difference d to get S′ orig , which can highlight the display effect of the mobile phone App QR code interface.

[0108] Among them, mobile apps are desktop applications that can be run on mobile phones, allowing customers to use banking services on their phones. Other types of apps include shopping mall apps, food delivery apps, instant messaging apps, etc.

[0109] C2: The enhanced brightness value R is obtained by back-calculating based on Fechner's law up .

[0110] Among them, the enhanced brightness value R is obtained by back-calculation based on Fechner's law up The details are shown in D1-D3:

[0111] D1: Use the inverse calculation formula of Fechner's law to obtain the brightness value of the mobile device (such as a mobile phone). The brightness value of the mobile phone is between 0 and 10. The relationship between the human eye visual value and the enhanced brightness value is shown in the attached figure. Figure 3 shown.

[0112] D2: Reduce the brightness of the mobile phone by 10 times to keep it consistent with the magnification of S302 (i.e. the preset value), and finally get R up The value is between 0 and 1.

[0113] D3: Set the QR code screen display brightness of the current mobile phone to R up , use the iOS system [[UIScreenmainScreen]setBrightness:R up ] method to set the screen display brightness of the current QR code interface.

[0114] S103: When the APP QR code of the mobile device is detected to be opened, the enhanced brightness (R up )Set the brightness of the APP QR code display interface on the mobile device.

[0115] For example, set the brightness of the mobile phone APP QR code display interface to R up This value is calculated based on Fechner's law and parallax d. It not only ensures the correct recognition rate of the QR code, but also enables users to have a better visual and operating experience.

[0116] To illustrate the feasibility of the optimal brightness display method for mobile APP QR codes based on Fechner's law, an IOS mobile phone is taken as an example. The specific implementation process is as follows: Figure 4 shown.

[0117] S401: Save the phone screen brightness P orig When entering the mobile app QR code interface, save the current screen brightness of the mobile phone, and restore the brightness of the mobile phone when leaving the QR code interface. In the iOS system, use the [UIScreenmainScreen].brightness method to obtain the mobile phone screen brightness P orig , and save it.

[0118] S402: Setting the optimal display brightness of the QR code up When entering the QR code interface of the mobile app, the optimal display brightness of the QR code is intelligently set based on the optimized Fechner's law.

[0119] S403: Restore the phone screen brightness P orig When the user is about to leave the QR code interface when operating the App, you can use the iOS system [[UIScreenmainScreen]setBrightness:P orig ] method to restore the original screen brightness of the phone.

[0120] Among them, the situations of leaving the QR code interface can be divided into two categories:

[0121] The first type is when the user enters other interfaces of the mobile app, the recovery method is used in the viewWillDisappear method.

[0122] The second type is when the user does not close the mobile app and directly returns to the mobile desktop, the recovery method is used in the applicationWillResignActive method; or when the user closes the mobile app and then returns to the mobile desktop, the recovery method is used in the applicationWillTerminate method.

[0123] When the APP QR code of the mobile device is not detected to be opened, the screen brightness of the non-QR code scene preset on the mobile device is restored.

[0124] It should be noted that when the APP QR code of the mobile device is not detected to be opened, it is the above-mentioned situation of leaving the QR code interface.

[0125] In order to facilitate the understanding of the device's optimal brightness display method for QR codes, combined with Figure 5 Give an example. Figure 5 A schematic flow chart of another method for displaying optimal brightness of a two-dimensional code device is shown.

[0126] Figure 5 In step S501: setting the human eye visual distance d;

[0127] S502: Turn on the camera to obtain the surrounding brightness R orig ;

[0128] S503: Brightness of the surrounding environment R orig Normalize and get R′ orig ;

[0129] S504: Calculate the human eye visual value S based on the optimized Fechner's law formula orig ;

[0130] S505: The human eye visual value S orig Add the visual perception difference d to get S′ orig ;

[0131] S506: Obtain enhanced brightness value R by reverse calculation based on Fechner's law up ;

[0132] S507: Set the current QR code screen brightness of the mobile phone to R up .

[0133] There are two existing ways to display the brightness of App QR codes: one is to keep the brightness unchanged without processing the screen brightness; the other is to enhance the screen brightness. The method of the present invention belongs to the category of brightness enhancement. The QR code with enhanced brightness can better adapt to most scenes in daily life and improve the scanning efficiency of the device. However, the existing brightness enhancement method does not take into account the user's eye experience, resulting in unclear QR codes or glare. This application dynamically obtains the brightness of the surrounding environment of the mobile phone based on the optimized Fechner's law, and intelligently enhances the brightness of the QR code interface, which can not only ensure the scanning efficiency of the device, but also optimize the user's operating experience.

[0134] The beneficial effects of the embodiments of the present application are as follows: in the process of enhancing the brightness of a mobile device, the brightness of the surrounding environment of the mobile device is dynamically acquired through the light sensor of the mobile device, and the enhanced brightness is obtained in combination with the visual perception difference of the human eye. The enhanced brightness can take into account the user's human eye experience while taking into account the surrounding environment. The brightness of the APP QR code display interface of the mobile device is set by the enhanced brightness, so that when the APP enters the QR code interface, the QR code is displayed at the optimal brightness to improve the user's visual experience.

[0135] Based on the above embodiments Figure 1 A device optimal brightness display method for a two-dimensional code is disclosed. The embodiment of the present application also discloses a device optimal brightness display device for a two-dimensional code, such as Figure 6 As shown, the device for displaying optimal brightness of a QR code comprises:

[0136] An acquisition unit 601 is used to dynamically acquire the ambient brightness of the mobile device through a light sensor of the mobile device;

[0137] A calculation unit 602 is used to calculate according to the optimized calculation formula of Fechner's law, the preset human eye visual perception gap and the surrounding environment brightness to obtain the enhanced brightness;

[0138] The monitoring setting unit 603 is used to set the brightness of the APP QR code display interface of the mobile device through the enhanced brightness when it is detected that the APP QR code of the mobile device is opened.

[0139] Furthermore, the acquisition unit 601 includes:

[0140] A monitoring and acquisition module is used to acquire the parameters of the camera of the mobile device according to the interface of the camera hardware when detecting the entry of the QR code interface of the mobile device;

[0141] A setting module, used to set the parameters of the camera of the mobile device; wherein the parameters at least include an input device stream, an output device stream and an output device stream proxy;

[0142] The first acquisition module is used to start a session to obtain the video frame content output by the camera of the mobile device after setting, and obtain the initial environment brightness.

[0143] A normalization module is used to normalize the initial environment brightness to obtain a normalized frame brightness value;

[0144] The determination module is used to determine the ambient brightness of the mobile device according to the normalized frame brightness value and a preset value.

[0145] Furthermore, the determination module is specifically used to perform a product operation on the normalized frame brightness value and a preset value to obtain the ambient brightness of the mobile device.

[0146] Furthermore, the calculation unit 602 includes:

[0147] The first calculation module is used to calculate the human eye visual value according to the optimized Fechner's law;

[0148] A summing module, used for summing the human eye visual value and the preset human eye visual perception gap to obtain an enhanced visual value;

[0149] The second calculation module is used to calculate the enhanced visual value according to the inverse calculation formula of Fechner's law to obtain the brightness value of the mobile device;

[0150] The second acquisition module is used to reduce the brightness value of the mobile device by a preset multiple to obtain an enhanced brightness; wherein the preset multiple is consistent with the preset value.

[0151] Furthermore, the device for displaying optimal brightness of a QR code also includes:

[0152] The recovery unit is used to restore the screen brightness of the non-QR code scene preset by the mobile device when the QR code of the mobile device is not detected to be turned on.

[0153] The beneficial effects of the embodiments of the present application are as follows: in the process of enhancing the brightness of a mobile device, the brightness of the surrounding environment of the mobile device is dynamically acquired through the light sensor of the mobile device, and the enhanced brightness is obtained in combination with the visual perception difference of the human eye. The enhanced brightness can take into account the user's human eye experience while taking into account the surrounding environment. The brightness of the APP QR code display interface of the mobile device is set by the enhanced brightness, so that when the APP enters the QR code interface, the QR code is displayed at the optimal brightness to improve the user's visual experience.

[0154] An embodiment of the present application further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned device optimal brightness display method for a two-dimensional code.

[0155] The present application also provides an electronic device, whose structural diagram is as follows: Figure 7 As shown, it specifically includes a memory 701, and one or more instructions 702, wherein the one or more instructions 702 are stored in the memory 701, and are configured to be executed by one or more processors 703 to execute the one or more instructions 702 to execute the above-mentioned device optimal brightness display method for the two-dimensional code.

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

[0157] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0158] The steps in the methods of the embodiments of the present application can be adjusted in order, combined, and deleted according to actual needs.

[0159] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0160] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

[0161] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A device optimal brightness display method for a two-dimensional code, characterized in that: The method comprises: Dynamically obtain the ambient brightness of the mobile device through the light sensor of the mobile device; The enhanced brightness is obtained by calculating according to the optimized calculation formula of Fechner's law, the preset human eye visual perception gap and the surrounding environment brightness; When it is detected that the APP QR code of the mobile device is opened, the brightness of the APP QR code display interface of the mobile device is set according to the enhanced brightness.

2. The method according to claim 1, characterized in that The method of dynamically acquiring the ambient brightness of the mobile device through a light sensor of the mobile device includes: When the QR code interface of the mobile device is detected, the parameters of the camera of the mobile device are obtained according to the interface of the camera hardware; Setting parameters of a camera of a mobile device; wherein the parameters at least include an input device stream, an output device stream, and an output device stream proxy; Start a session to obtain the video frame content output by the camera of the mobile device after the settings are completed, and obtain the initial environment brightness; Normalizing the initial environment brightness to obtain a normalized frame brightness value; The ambient brightness of the mobile device is determined according to the normalized frame brightness value and a preset value.

3. The method according to claim 2, characterized in that The step of determining the ambient brightness of the mobile device according to the normalized frame brightness value and a preset value includes: The normalized frame brightness value is multiplied by a preset value to obtain the ambient brightness of the mobile device.

4. The method according to claim 3, characterized in that: The calculation according to the optimized calculation formula of Fechner's law, the preset human eye visual perception gap and the ambient brightness is performed to obtain the enhanced brightness, including: The human eye visual value is calculated based on the optimized Fechner's law; Summing the human eye visual value and a preset human eye visual perception gap to obtain an enhanced visual value; Calculating the enhanced visual value according to the inverse calculation formula of Fechner's law to obtain the brightness value of the mobile device; The brightness value of the mobile device is reduced by a preset multiple to obtain an enhanced brightness; wherein the preset multiple is consistent with the preset value.

5. The method according to claim 1, characterized in that Also includes: When the QR code of the mobile device is not detected to be turned on, the screen brightness of the non-QR code scene preset on the mobile device is restored.

6. A device for displaying optimal brightness of a two-dimensional code, characterized in that: The device comprises: An acquisition unit, used to dynamically acquire the ambient brightness of the mobile device through a light sensor of the mobile device; A calculation unit, used to calculate according to the optimized calculation formula of Fechner's law, the preset human eye visual perception gap and the surrounding environment brightness to obtain the enhanced brightness; The monitoring setting unit is used to set the brightness of the APP QR code display interface of the mobile device according to the enhanced brightness when it is detected that the APP QR code of the mobile device is opened.

7. The device according to claim 6, characterized in that The acquisition unit comprises: A monitoring and acquisition module is used to acquire the parameters of the camera of the mobile device according to the interface of the camera hardware when detecting the entry of the QR code interface of the mobile device; A setting module, used to set the parameters of the camera of the mobile device; wherein the parameters at least include an input device stream, an output device stream and an output device stream proxy; A first acquisition module is used to start a session to obtain the video frame content output by the camera of the mobile device after setting, and obtain the initial environment brightness; A normalization module, used to perform normalization processing on the initial environment brightness to obtain a normalized frame brightness value; The determination module is used to determine the ambient brightness of the mobile device according to the normalized frame brightness value and a preset value.

8. The device according to claim 7, characterized in that The determining module is specifically used for: The normalized frame brightness value is multiplied by a preset value to obtain the ambient brightness of the mobile device.

9. The device according to claim 8, characterized in that The computing unit comprises: The first calculation module is used to calculate the human eye visual value according to the optimized Fechner's law; A summing module, used for summing the human eye visual value and a preset human eye visual perception gap to obtain an enhanced visual value; A second calculation module is used to calculate the enhanced visual value according to the inverse calculation formula of Fechner's law to obtain a brightness value of the mobile device; The second acquisition module is used to reduce the brightness value of the mobile device by a preset multiple to obtain an enhanced brightness; wherein the preset multiple is consistent with the preset value.

10. The device according to claim 6, characterized in that Also includes: The recovery unit is used to restore the screen brightness of the non-QR code scene preset by the mobile device when the QR code of the mobile device is not detected to be turned on.