CN113709302B - Method and system for adjusting brightness of light-emitting device, electronic device and storage medium - Google Patents

Method and system for adjusting brightness of light-emitting device, electronic device and storage medium Download PDF

Info

Publication number
CN113709302B
CN113709302B CN202110839170.9A CN202110839170A CN113709302B CN 113709302 B CN113709302 B CN 113709302B CN 202110839170 A CN202110839170 A CN 202110839170A CN 113709302 B CN113709302 B CN 113709302B
Authority
CN
China
Prior art keywords
sliding
brightness
value
emitting device
light
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110839170.9A
Other languages
Chinese (zh)
Other versions
CN113709302A (en
Inventor
宁允泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110839170.9A priority Critical patent/CN113709302B/en
Publication of CN113709302A publication Critical patent/CN113709302A/en
Application granted granted Critical
Publication of CN113709302B publication Critical patent/CN113709302B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/22Details of telephonic subscriber devices including a touch pad, a touch sensor or a touch detector

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides a method and a system for adjusting the brightness of light-emitting equipment, wherein the method comprises the following steps: acquiring a sliding starting point and a sliding ending point of a sliding action on a screen of the mobile terminal; determining the sliding direction of the sliding action according to the sliding starting point and the sliding ending point; determining a unit pixel brightness value according to the pixel value corresponding to the sliding direction; and determining a sliding pixel value according to the sliding direction, the sliding starting point and the sliding ending point, and acquiring a brightness difference value according to the sliding pixel value and the unit pixel brightness value so as to adjust the current brightness of the light-emitting device according to the brightness difference value. The invention can realize the rapid and continuous adjustment of the light brightness and improve the convenience of the operation of the user terminal.

Description

Method and system for adjusting brightness of light-emitting device, electronic device and storage medium
Technical Field
The invention relates to the technical field of intelligent household appliances, in particular to a method and a system for adjusting the brightness of a light-emitting device.
Background
With the development of science and technology, household appliances gradually enter an intelligent era. The intelligent household appliance is controlled and can be operated and realized through the mobile terminal.
At present, in most of control pages of intelligent household appliances, the light brightness value is adjusted by clicking a button at a specific position on a mobile terminal page or dragging a sliding bar, and the final brightness value is issued to a control device to realize the control of the light brightness. Fig. 1 is a schematic diagram illustrating brightness adjustment by clicking a page button in the prior art, as shown in fig. 1, a user must accurately click a page fixing position, such as the + or-button in fig. 1, to change a brightness value. Fig. 2 is a schematic diagram illustrating brightness adjustment by dragging a slider in the prior art, and as shown in fig. 2, a user must click a circular slider to change a brightness value.
However, the above scheme requires a fine operation, and the user must check the screen at the same time when controlling the smart home appliance, which is poor in convenience. Therefore, a method and a system for adjusting the brightness of a light emitting device are needed to solve the above problems.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method and a system for adjusting the brightness of a light-emitting device.
The invention provides a brightness adjusting method of a light-emitting device, which comprises the following steps:
acquiring a sliding starting point and a sliding ending point of a sliding action on a screen of the mobile terminal;
determining the sliding direction of the sliding action according to the sliding starting point and the sliding ending point;
determining a unit pixel brightness value according to the pixel value corresponding to the sliding direction;
and determining a sliding pixel value according to the sliding direction, the sliding starting point and the sliding ending point, and acquiring a brightness difference value according to the sliding pixel value and the unit pixel brightness value so as to adjust the current brightness of the light-emitting device according to the brightness difference value.
According to the brightness adjusting method of the light emitting device provided by the invention, the determining the sliding direction of the sliding action according to the sliding starting point and the sliding ending point comprises the following steps:
acquiring a horizontal distance between the sliding starting point and the sliding end point and a vertical distance between the sliding starting point and the sliding end point according to the sliding starting point and the sliding end point;
judging the horizontal distance and the vertical distance, and if the horizontal distance is greater than the vertical distance, judging to know that the sliding direction is the horizontal direction;
and if the horizontal distance is less than or equal to the vertical distance, judging to acquire that the sliding direction is the vertical direction.
According to the brightness adjusting method of the light emitting device provided by the invention, the determining the unit pixel brightness value according to the pixel value corresponding to the sliding direction comprises the following steps:
if the sliding direction is the horizontal direction, determining the brightness value of the unit pixel according to the pixel value of the screen width corresponding to the horizontal direction;
and if the sliding direction is the vertical direction, determining the unit pixel brightness value according to the pixel value of the screen height corresponding to the vertical direction.
According to a luminance adjusting method of a light emitting device provided by the present invention, determining a sliding pixel according to the sliding direction, the sliding start point and the sliding end point, and obtaining a luminance difference value according to the sliding pixel and the unit pixel luminance value, includes:
if the sliding direction is the horizontal direction, determining a first sliding pixel according to the horizontal distance between the sliding end point and the sliding start point, and acquiring a brightness difference value corresponding to the first sliding pixel according to the first sliding pixel and the unit pixel brightness value;
and if the sliding direction is the vertical direction, determining a second sliding pixel according to the vertical distance between the sliding end point and the sliding start point, and acquiring a brightness difference value corresponding to the second sliding pixel according to the second sliding pixel and the unit pixel brightness value.
According to a luminance adjusting method of a light emitting apparatus provided by the present invention, after the obtaining of the luminance difference value according to the sliding pixel and the unit pixel luminance value, the method further includes:
acquiring a brightness value to be adjusted of the light-emitting device according to the current brightness value of the light-emitting device and the brightness difference value;
and judging the brightness value to be adjusted of the light-emitting device, and adjusting the brightness of the light-emitting device according to the judgment result.
According to the brightness adjusting method of the light emitting device provided by the invention, the judging of the brightness value to be adjusted of the light emitting device and the brightness adjustment of the light emitting device according to the judging result comprise the following steps:
judging the brightness value to be adjusted of the light-emitting device, and if the brightness value to be adjusted of the light-emitting device is judged to be larger than a first preset threshold, adjusting the current brightness value of the light-emitting device to be the first preset threshold;
if the brightness value to be adjusted of the light-emitting device is judged to be smaller than a second preset threshold value, adjusting the current brightness value of the light-emitting device to the second preset threshold value;
and if the brightness value to be adjusted of the light-emitting device is judged to be greater than or equal to the second preset threshold value and less than or equal to the first preset threshold value, adjusting the current brightness value of the light-emitting device to the brightness adjustment value of the light-emitting device.
The present invention also provides a brightness adjusting system of a light emitting device, comprising:
the sliding position determining module is used for acquiring a sliding starting point and a sliding ending point of a sliding action on a screen of the mobile terminal;
a sliding direction obtaining module, configured to determine a sliding direction of the sliding motion according to the sliding starting point and the sliding ending point;
the unit pixel brightness determining module is used for determining the unit pixel brightness value according to the pixel value corresponding to the sliding direction;
and the brightness difference value acquisition module is used for determining a sliding pixel value according to the sliding direction, the sliding starting point and the sliding ending point, and acquiring a brightness difference value according to the sliding pixel value and the unit pixel brightness value so as to adjust the current brightness of the light-emitting device according to the brightness difference value.
According to the brightness adjusting system of the light emitting device provided by the present invention, the sliding direction obtaining module further comprises:
a distance determining unit for acquiring a horizontal distance between the sliding start point and the sliding end point and a vertical distance between the sliding start point and the sliding end point according to the sliding start point and the sliding end point;
the first judging unit is used for judging the horizontal distance and the vertical distance, and if the horizontal distance is greater than the vertical distance, judging that the sliding direction is the horizontal direction;
and the second judging unit is used for judging that the sliding direction is the vertical direction if the horizontal distance is smaller than or equal to the vertical distance.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the steps of the method for adjusting the brightness of the light-emitting device.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for adjusting the brightness of a light emitting device as described in any one of the above.
According to the brightness adjusting method and system of the light-emitting device, the screen of the mobile terminal slides, the sliding direction is determined according to the sliding starting point and the sliding end point, and the screen of the mobile phone can slide at any position quickly; obtaining the brightness value of the unit pixel through the screen pixel value corresponding to the sliding direction; and obtaining a brightness difference value according to the sliding pixel value and the brightness value of the unit pixel, thereby realizing the rapid and continuous brightness adjustment of the light-emitting equipment according to the brightness difference value and improving the convenience of the operation of the user terminal.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a diagram illustrating brightness adjustment by clicking a page button in the prior art;
FIG. 2 is a schematic diagram illustrating brightness adjustment by dragging a slider in the prior art;
fig. 3 is a schematic flow chart of a brightness adjustment method for a light emitting device according to the present invention;
fig. 4 is a schematic diagram of a sliding position on a screen of a mobile terminal according to the present invention;
fig. 5 is a schematic structural diagram of a brightness adjusting system of a light emitting device provided by the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 3 is a schematic flow chart of a method for adjusting brightness of a light emitting device according to the present invention, and as shown in fig. 3, the present invention provides a method for adjusting brightness of a light emitting device, including:
step 301, acquiring a sliding starting point and a sliding ending point of a sliding action on a screen of the mobile terminal;
step 302, determining the sliding direction of the sliding action according to the sliding starting point and the sliding ending point;
step 303, determining a unit pixel brightness value according to the pixel value corresponding to the sliding direction;
step 304, determining a sliding pixel value according to the sliding direction, the sliding starting point and the sliding ending point, and obtaining a brightness difference value according to the sliding pixel value and the unit pixel brightness value to adjust the current brightness of the light-emitting device according to the brightness difference value.
In the invention, a user takes the whole screen of the mobile terminal as an effective operation area (for example, in a control page of a smart lamp H5), and performs a sliding action at any position of the screen of the mobile terminal to obtain a sliding starting point and a sliding ending point of the sliding action on the screen of the mobile terminal. Specifically, the swipe starting point is the coordinates of the starting point of the swipe action, and the swipe ending point is the coordinates of the ending point of the swipe action.
Further, by acquiring the coordinates of the sliding start point and the sliding end point of the sliding motion, the sliding direction of the sliding motion is further determined. The sliding direction may be a horizontal direction, a vertical direction, or a direction with any angle.
Further, since each pixel has a corresponding luminance value, the unit pixel luminance value is determined by the corresponding pixel value on the screen of the mobile terminal in the sliding direction.
Further, judging the sliding direction, and obtaining a sliding pixel value according to the judgment result of the sliding direction, the sliding starting point coordinate and the sliding ending point coordinate; acquiring a brightness difference value according to the sliding pixel value and the brightness value of the unit pixel; and further obtaining a brightness value to be adjusted of the target light-emitting device through the brightness difference value, and sending the brightness value to be adjusted of the target light-emitting device to the light-emitting device, so as to adjust the brightness value of the light-emitting device.
Since the screen interface of the user terminal is complex and needs to be refined, the old or the children may not be able to understand how to operate immediately (the old may not see the screen clearly because of eyesight). The brightness adjusting method of the light-emitting equipment provided by the invention has the advantages that the sliding direction is determined according to the sliding starting point and the sliding ending point by sliding on the screen of the mobile terminal, so that the sliding of the screen of the mobile phone at any position is realized; obtaining the brightness value of the unit pixel through the screen pixel value corresponding to the sliding direction; and obtaining a brightness difference value according to the sliding pixel value and the brightness value of the unit pixel, thereby realizing the rapid and continuous brightness adjustment of the light-emitting equipment according to the brightness difference value and improving the convenience of the operation of the user terminal.
On the basis of the above embodiment, the determining the sliding direction of the sliding motion according to the sliding starting point and the sliding ending point includes:
acquiring a horizontal distance between the sliding starting point and the sliding end point and a vertical distance between the sliding starting point and the sliding end point according to the sliding starting point and the sliding end point;
judging the horizontal distance and the vertical distance, and if the horizontal distance is greater than the vertical distance, judging to know that the sliding direction is the horizontal direction;
and if the horizontal distance is smaller than or equal to the vertical distance, judging to acquire that the sliding direction is the vertical direction.
Fig. 4 is a schematic diagram of a sliding position on a screen of a mobile terminal according to the present invention, as shown in fig. 4, a plane coordinate system is established with an upper left corner of the screen as an origin of coordinates (0,0), a horizontal direction as an x-axis, a vertical direction as a y-axis, and a sliding start point coordinate is a (x) (x-axis) 1 ,y 1 ) The coordinate of the end point of sliding is B (x) 2 ,y 2 ). Optionally, when the mobile terminal places the screen in a normal state, the horizontal direction is the width direction of the screen, and the vertical direction is the height direction of the screen; when the mobile terminal turns over the screen, the horizontal direction is the height direction of the screen, and the vertical direction is the width direction of the screen.
Further, according to the coordinates of the sliding starting point and the sliding ending point, the horizontal distance | x between the coordinates of the sliding starting point and the coordinates of the sliding ending point is obtained 2 -x 1 I, which is the absolute value of the difference between the two horizontal coordinates; obtaining the vertical distance y between the coordinates of the sliding starting point and the sliding ending point 2 -y 1 I, the absolute value of the difference between the two ordinate.
Further, if the horizontal distance is greater than the vertical distance, | x 2 -x 1 |>|y 2 -y 1 If the sliding direction is the x axis in the horizontal direction; if the horizontal distance is less than or equal to the vertical distance, | x 2 -x 1 |≤|y 2 -y 1 And the y axis in the vertical direction is taken as the sliding direction.
On the basis of the above embodiment, the determining a unit pixel brightness value according to the pixel value corresponding to the sliding direction includes:
if the sliding direction is the horizontal direction, determining the brightness value of the unit pixel according to the pixel value of the screen width corresponding to the horizontal direction;
and if the sliding direction is the vertical direction, determining the unit pixel brightness value according to the pixel value of the screen height corresponding to the vertical direction.
In one embodiment, the mobile terminal is normally placed, the upper left corner of the screen is used as a coordinate origin (0,0), the horizontal direction is used as an x axis, the vertical direction is used as a y axis to establish a plane coordinate system, and included angles between a straight line where a sliding starting point and a sliding ending point are located and the x axis and the y axis are obtained according to the sliding starting point coordinate and the sliding ending point coordinate. If the included angle between the straight line and the x axis is larger than the included angle between the straight line and the y axis, determining the sliding direction as the vertical direction; otherwise, determining the sliding direction as the horizontal direction.
Further, if the sliding direction of the sliding motion on the screen of the mobile terminal is the x axis in the horizontal direction, the unit pixel brightness value is obtained according to the pixel value of the screen width corresponding to the horizontal direction. Specifically, if the sliding direction is the horizontal direction, the unit pixel luminance value = the pixel value of the screen width ÷ m.
And if the sliding direction of the sliding action on the screen of the mobile terminal is a vertical direction y axis, obtaining the brightness value of the unit pixel according to the pixel value of the screen height corresponding to the vertical direction. Specifically, if the sliding direction is the horizontal direction, the unit pixel luminance value = pixel value ÷ m of the screen height. Wherein m represents the maximum value of the brightness adjusting range of the light-emitting device, and the value of the invention is 100.
On the basis of the above embodiment, determining a sliding pixel according to the sliding direction, the sliding start point, and the sliding end point, and obtaining a luminance difference value according to the sliding pixel and the unit pixel luminance value includes:
if the sliding direction is the horizontal direction, determining a first sliding pixel according to the horizontal distance between the sliding end point and the sliding start point, and acquiring a brightness difference value corresponding to the first sliding pixel according to the first sliding pixel and the unit pixel brightness value;
and if the sliding direction is the vertical direction, determining a second sliding pixel according to the vertical distance between the sliding end point and the sliding start point, and acquiring a brightness difference value corresponding to the second sliding pixel according to the second sliding pixel and the unit pixel brightness value.
In the present invention, if the sliding direction of the sliding motion on the screen of the mobile terminal is the horizontal direction x-axis, the first sliding pixel = x 2 -x 1 Thereby first sliding imageThe luminance difference corresponding to the pixel is the product of the luminance value of the first pixel and the luminance value of the unit pixel. If the sliding direction of the sliding motion on the screen of the mobile terminal is the vertical direction y-axis, the second sliding pixel = y 2 -y 1 So that the luminance difference value corresponding to the second sliding pixel is the product of the luminance value of the second pixel and the luminance value of the unit pixel.
On the basis of the above embodiment, after the obtaining of the luminance difference value according to the sliding pixel and the unit pixel luminance value, the method further includes:
acquiring a brightness value to be adjusted of the light-emitting device according to the current brightness value of the light-emitting device and the brightness difference value;
and judging the brightness value to be adjusted of the light-emitting device, and adjusting the brightness of the light-emitting device according to the judgment result.
In the invention, the whole screen of the mobile terminal is used as an effective operation range, the sliding direction and the sliding distance are calculated according to the sliding starting point coordinate and the sliding ending point coordinate, and the brightness value of a unit pixel is calculated according to the width and the height of the screen; acquiring a brightness difference value according to the brightness values of the sliding pixel and the unit pixel; and adding the current brightness value and the brightness difference value of the light-emitting device to obtain a brightness value to be adjusted of the light-emitting device, so as to adjust the brightness of the light-emitting device according to the brightness value to be adjusted of the light-emitting device.
Furthermore, the range of the brightness value to be adjusted of the light-emitting device is judged, and the brightness value to be adjusted of the light-emitting device beyond the range is correspondingly changed according to the judgment result, so that the adjustment of the light-emitting device is more accurate.
In the invention, the user can quickly and continuously adjust the brightness of the light-emitting device in a finger sliding mode without accurately clicking a fixed position of a screen or staring at the screen for operation, so that the operation of the user is more convenient and simpler, and the user experience is effectively improved.
On the basis of the above embodiment, the determining the value to be adjusted of the luminance of the light emitting device and adjusting the luminance of the light emitting device according to the determination result includes:
judging the brightness value to be adjusted of the light-emitting device, and if the brightness value to be adjusted of the light-emitting device is judged to be larger than a first preset threshold, adjusting the current brightness value of the light-emitting device to be the first preset threshold;
if the brightness value to be adjusted of the light-emitting device is judged to be smaller than a second preset threshold value, adjusting the current brightness value of the light-emitting device to the second preset threshold value;
and if the brightness value to be adjusted of the light-emitting device is judged to be greater than or equal to the second preset threshold value and less than or equal to the first preset threshold value, adjusting the current brightness value of the light-emitting device to the brightness adjustment value of the light-emitting device.
In the invention, a first preset threshold and a second preset threshold correspond to the adjusting range of the light brightness, the first preset threshold is the maximum value of the adjusting range of the light-emitting device brightness, and the second preset threshold is the minimum value of the adjusting range of the light-emitting device brightness.
In the present invention, the first preset threshold value is 100, and the second preset threshold value is 0.
Further, adding the current brightness value and the brightness difference value of the light-emitting device to obtain a brightness value to be adjusted of the light-emitting device, judging the brightness value to be adjusted of the light-emitting device, and if the brightness value to be adjusted of the light-emitting device is greater than 100, obtaining a final brightness value to be adjusted of the light brightness of 100, adjusting the brightness of the light-emitting device to the maximum brightness; if the brightness value to be adjusted of the light-emitting device is smaller than 0, and the final brightness value to be adjusted of the light-emitting device is 0, adjusting the brightness of the light-emitting device to the lowest brightness, namely, turning off the light-emitting device; and if the brightness value to be adjusted of the light-emitting device is more than or equal to 0 and less than or equal to 100, adjusting the brightness of the light-emitting device according to the brightness value to be adjusted of the light-emitting device obtained by adding the brightness value of the light-emitting device and the brightness difference value of the lamp light.
It should be noted that the brightness adjusting method for the lighting device mentioned in the above embodiments is not only applicable to lighting devices, but also applicable to temperature adjustment by air conditioner, or sound adjustment for similar household appliances.
Fig. 5 is a schematic structural diagram of a brightness adjusting system of a light emitting device according to the present invention, and as shown in fig. 5, the present invention provides a brightness adjusting system of a light emitting device, which includes a sliding position determining module 501, a sliding direction obtaining module 502, a unit pixel brightness determining module 503 and a brightness difference obtaining module 504, where the sliding position determining module 501 obtains a sliding start point and a sliding end point of a sliding action on a screen of a mobile terminal; the sliding direction obtaining module 502 is configured to determine a sliding direction of the sliding action according to the sliding starting point and the sliding ending point; the unit pixel brightness determining module 503 is configured to determine a unit pixel brightness value according to a pixel value corresponding to the sliding direction; the luminance difference obtaining module 504 is configured to determine a sliding pixel value according to the sliding direction, the sliding start point, and the sliding end point, and obtain a luminance difference value according to the sliding pixel value and the unit pixel luminance value, so as to adjust the current luminance of the light emitting device according to the luminance difference value.
The brightness adjusting system of the light-emitting equipment provided by the invention can determine the sliding direction according to the sliding starting point and the sliding ending point by sliding on the screen of the mobile terminal, thereby realizing the sliding of the screen of the mobile phone at any position; obtaining the brightness value of the unit pixel through the screen pixel value corresponding to the sliding direction; and obtaining a brightness difference value according to the sliding pixel value and the brightness value of the unit pixel, thereby realizing the rapid and continuous brightness adjustment of the light-emitting equipment according to the brightness difference value and improving the convenience of the operation of the user terminal.
On the basis of the above embodiment, the sliding direction obtaining module further includes a distance determining unit, a first judging unit, and a second judging unit, where the distance determining unit is configured to obtain, according to the sliding start point and the sliding end point, a horizontal distance between the sliding start point and the sliding end point, and a vertical distance between the sliding start point and the sliding end point; the first judging unit is used for judging the horizontal distance and the vertical distance, and if the horizontal distance is greater than the vertical distance, judging to acquire that the sliding direction is the horizontal direction; the second judging unit is used for judging that the sliding direction is the vertical direction if the horizontal distance is smaller than or equal to the vertical distance.
The system provided by the present invention is used for executing the above method embodiments, and for the specific processes and details, reference is made to the above embodiments, which are not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 6, the electronic device may include: a processor (processor) 601, a communication Interface (Communications Interface) 602, a memory (memory) 603 and a communication bus 604, wherein the processor 601, the communication Interface 602 and the memory 603 complete communication with each other through the communication bus 604. The processor 601 may invoke logic instructions in the memory 603 to perform a lighting device brightness adjustment method comprising: acquiring a sliding starting point and a sliding ending point of a sliding action on a screen of the mobile terminal; determining the sliding direction of the sliding action according to the sliding starting point and the sliding ending point; determining a unit pixel brightness value according to the pixel value corresponding to the sliding direction; and determining a sliding pixel value according to the sliding direction, the sliding starting point and the sliding ending point, and acquiring a brightness difference value according to the sliding pixel value and the unit pixel brightness value so as to adjust the current brightness of the light-emitting device according to the brightness difference value.
In addition, the logic instructions in the memory 603 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which when executed by a computer, enable the computer to perform the method for adjusting the brightness of a light emitting device provided by the above methods, the method comprising: acquiring a sliding starting point and a sliding ending point of a sliding action on a screen of the mobile terminal; determining the sliding direction of the sliding action according to the sliding starting point and the sliding ending point; determining a unit pixel brightness value according to the pixel value corresponding to the sliding direction; and determining a sliding pixel value according to the sliding direction, the sliding starting point and the sliding ending point, and acquiring a brightness difference value according to the sliding pixel value and the unit pixel brightness value so as to adjust the current brightness of the light-emitting device according to the brightness difference value.
In still another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the brightness adjusting method of the light emitting device provided by the above aspects, the method comprising: acquiring a sliding starting point and a sliding ending point of a sliding action on a screen of the mobile terminal; determining the sliding direction of the sliding action according to the sliding starting point and the sliding ending point; determining a unit pixel brightness value according to the pixel value corresponding to the sliding direction; and determining a sliding pixel value according to the sliding direction, the sliding starting point and the sliding ending point, and acquiring a brightness difference value according to the sliding pixel value and the unit pixel brightness value so as to adjust the current brightness of the light-emitting device according to the brightness difference value.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for adjusting brightness of a light emitting device, comprising:
acquiring a sliding starting point and a sliding ending point of a sliding action on a screen of the mobile terminal;
determining a sliding direction of the sliding action according to the sliding starting point and the sliding ending point, wherein the sliding starting point is a starting point coordinate of the sliding action, and the sliding ending point is an ending point coordinate of the sliding action;
determining a unit pixel brightness value according to the pixel value corresponding to the sliding direction;
determining a sliding pixel value according to the sliding direction, the sliding starting point and the sliding ending point, and acquiring a brightness difference value according to the sliding pixel value and the unit pixel brightness value so as to adjust the current brightness of the light-emitting device according to the brightness difference value;
determining a sliding pixel value according to the sliding direction, the sliding starting point and the sliding ending point, and obtaining a brightness difference value according to the sliding pixel value and the unit pixel brightness value, including:
if the sliding direction is a horizontal direction, determining a first sliding pixel value according to a horizontal distance between the sliding end point and the sliding start point, wherein a formula is as follows:
first sliding pixel value = x 2 -x 1
Wherein x is 2 A sliding end point, x, indicating that the sliding direction of the sliding motion is the x-axis in the horizontal direction 1 Representing that the sliding direction of the sliding action is a sliding starting point of an x axis in the horizontal direction, and acquiring a brightness difference value corresponding to a first sliding pixel value according to the first sliding pixel value and the unit pixel brightness value;
if the sliding direction is a vertical direction, determining a second sliding pixel value according to the vertical distance between the sliding end point and the sliding start point, wherein the formula is as follows:
second sliding pixel value = y 2 -y 1
Wherein, y 2 A sliding end point, y, indicating that the sliding direction of the sliding motion is a y-axis in the vertical direction 1 A sliding starting point which represents that the sliding direction of the sliding action is the y axis in the vertical direction is obtained, and a brightness difference value corresponding to the second sliding pixel value is obtained according to the second sliding pixel value and the unit pixel brightness value;
after the obtaining of the luminance difference value according to the sliding pixel value and the unit pixel luminance value, the method further includes:
acquiring a brightness value to be adjusted of the light-emitting device according to the current brightness value of the light-emitting device and the brightness difference value;
and judging the brightness value to be adjusted of the light-emitting device, and adjusting the brightness of the light-emitting device according to the judgment result.
2. The method for adjusting brightness of a light emitting device according to claim 1, wherein said determining a sliding direction of the sliding action according to the sliding starting point and the sliding ending point comprises:
acquiring a horizontal distance between the sliding starting point and the sliding end point and a vertical distance between the sliding starting point and the sliding end point according to the sliding starting point and the sliding end point;
judging the horizontal distance and the vertical distance, and if the horizontal distance is greater than the vertical distance, judging that the sliding direction is the horizontal direction;
and if the horizontal distance is smaller than or equal to the vertical distance, judging to acquire that the sliding direction is the vertical direction.
3. The method for adjusting brightness of a light emitting device according to claim 1, wherein said determining a unit pixel brightness value according to a pixel value corresponding to the sliding direction comprises:
if the sliding direction is the horizontal direction, determining the brightness value of the unit pixel according to the pixel value of the screen width corresponding to the horizontal direction;
and if the sliding direction is the vertical direction, determining the unit pixel brightness value according to the pixel value of the screen height corresponding to the vertical direction.
4. The method for adjusting the brightness of the light-emitting device according to claim 1, wherein the determining the value to be adjusted of the brightness of the light-emitting device and adjusting the brightness of the light-emitting device according to the determination result comprises:
judging the brightness value to be adjusted of the light-emitting device, and if the brightness value to be adjusted of the light-emitting device is judged to be larger than a first preset threshold, adjusting the current brightness value of the light-emitting device to be the first preset threshold;
if the brightness value to be adjusted of the light-emitting device is judged to be smaller than a second preset threshold, adjusting the current brightness value of the light-emitting device to be the second preset threshold;
and if the brightness value to be adjusted of the light-emitting device is judged to be greater than or equal to the second preset threshold value and less than or equal to the first preset threshold value, adjusting the current brightness value of the light-emitting device to the brightness adjustment value of the light-emitting device.
5. A lighting device brightness adjustment system, comprising:
the sliding position determining module is used for acquiring a sliding starting point and a sliding ending point of a sliding action on a screen of the mobile terminal;
a sliding direction obtaining module, configured to determine a sliding direction of the sliding motion according to the sliding starting point and the sliding ending point, where the sliding starting point is a starting point coordinate of the sliding motion, and the sliding ending point is an ending point coordinate of the sliding motion;
the unit pixel brightness determining module is used for determining the unit pixel brightness value according to the pixel value corresponding to the sliding direction;
a brightness difference value obtaining module, configured to determine a sliding pixel value according to the sliding direction, the sliding starting point, and the sliding ending point, and obtain a brightness difference value according to the sliding pixel value and the unit pixel brightness value, so as to adjust current brightness of the light-emitting device according to the brightness difference value;
the brightness difference value obtaining module is specifically configured to:
if the sliding direction is the horizontal direction, determining a first sliding pixel value according to the horizontal distance between the sliding end point and the sliding start point, wherein the formula is as follows;
first sliding pixel value = x 2 -x 1
Wherein x is 2 A sliding end point, x, indicating that the sliding direction of the sliding motion is the x-axis in the horizontal direction 1 Representing that the sliding direction of the sliding action is a sliding starting point of an x axis in the horizontal direction, and acquiring a brightness difference value corresponding to a first sliding pixel value according to the first sliding pixel value and the unit pixel brightness value;
if the sliding direction is a vertical direction, determining a second sliding pixel value according to the vertical distance between the sliding end point and the sliding start point, wherein the formula is as follows:
second sliding pixel value = y 2 -y 1
Wherein, y 2 A sliding end point, y, indicating that the sliding direction of the sliding motion is a y-axis in the vertical direction 1 A sliding starting point which represents that the sliding direction of the sliding action is the y axis in the vertical direction is obtained, and a brightness difference value corresponding to the second sliding pixel value is obtained according to the second sliding pixel value and the unit pixel brightness value;
the lighting device brightness adjustment system is further configured to:
acquiring a brightness value to be adjusted of the light-emitting device according to the current brightness value of the light-emitting device and the brightness difference value;
and judging the brightness value to be adjusted of the light-emitting device, and adjusting the brightness of the light-emitting device according to the judgment result.
6. The system of claim 5, wherein the sliding direction obtaining module further comprises:
a distance determining unit for acquiring a horizontal distance between the swipe starting point and the swipe ending point and a vertical distance between the swipe starting point and the swipe ending point, according to the swipe starting point and the swipe ending point;
the first judging unit is used for judging the horizontal distance and the vertical distance, and if the horizontal distance is greater than the vertical distance, judging that the sliding direction is the horizontal direction;
and the second judging unit is used for judging that the sliding direction is the vertical direction if the horizontal distance is smaller than or equal to the vertical distance.
7. An electronic device comprising a memory, a processor and a computer program stored on said memory and executable on said processor, characterized in that said processor implements the steps of the method for dimming a light emitting device according to any of claims 1 to 4 when executing said program.
8. A non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of the method for adjusting the brightness of a light emitting device according to any one of claims 1 to 4.
CN202110839170.9A 2021-07-23 2021-07-23 Method and system for adjusting brightness of light-emitting device, electronic device and storage medium Active CN113709302B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110839170.9A CN113709302B (en) 2021-07-23 2021-07-23 Method and system for adjusting brightness of light-emitting device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110839170.9A CN113709302B (en) 2021-07-23 2021-07-23 Method and system for adjusting brightness of light-emitting device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN113709302A CN113709302A (en) 2021-11-26
CN113709302B true CN113709302B (en) 2023-02-03

Family

ID=78650426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110839170.9A Active CN113709302B (en) 2021-07-23 2021-07-23 Method and system for adjusting brightness of light-emitting device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN113709302B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489456B (en) * 2022-01-04 2024-01-30 杭州涂鸦信息技术有限公司 Lighting system control method, lighting system control device, computer device, and readable storage medium
CN114610218B (en) * 2022-05-16 2022-08-12 广州市保伦电子有限公司 Sliding operation method of display interface and display device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103558980A (en) * 2013-10-21 2014-02-05 广东明创软件科技有限公司 Rapid screen backlight time adjusting method and mobile terminal
CN105138268A (en) * 2015-08-28 2015-12-09 广东欧珀移动通信有限公司 Adjusting method and system for display terminal screen brightness
CN105204762A (en) * 2015-08-27 2015-12-30 广东欧珀移动通信有限公司 Method for regulating screen brightness and user terminal
CN107734119A (en) * 2017-09-21 2018-02-23 惠州Tcl移动通信有限公司 A kind of method, storage medium and terminal for adjusting screen intensity

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051760A (en) * 2012-12-18 2013-04-17 广东欧珀移动通信有限公司 Touch screen mobile phone-based screen brightness regulation method
KR20140099760A (en) * 2013-02-04 2014-08-13 삼성전자주식회사 Method and apparatus for display controlling in terminal
CN105872211A (en) * 2016-03-28 2016-08-17 乐视控股(北京)有限公司 Screen brightness adjusting method and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103558980A (en) * 2013-10-21 2014-02-05 广东明创软件科技有限公司 Rapid screen backlight time adjusting method and mobile terminal
CN105204762A (en) * 2015-08-27 2015-12-30 广东欧珀移动通信有限公司 Method for regulating screen brightness and user terminal
CN105138268A (en) * 2015-08-28 2015-12-09 广东欧珀移动通信有限公司 Adjusting method and system for display terminal screen brightness
CN107734119A (en) * 2017-09-21 2018-02-23 惠州Tcl移动通信有限公司 A kind of method, storage medium and terminal for adjusting screen intensity

Also Published As

Publication number Publication date
CN113709302A (en) 2021-11-26

Similar Documents

Publication Publication Date Title
CN113709302B (en) Method and system for adjusting brightness of light-emitting device, electronic device and storage medium
US10613740B2 (en) Method for controlling screen of user terminal and user terminal
US9288373B2 (en) System and method for human computer interaction
CN108628656A (en) Interface adaptation method, device, computer equipment and storage medium on ios device
CN112230836B (en) Object moving method and device, storage medium and electronic device
US20140340498A1 (en) Using distance between objects in touchless gestural interfaces
CN103885675A (en) Control method and electronic device
CN104317398A (en) Gesture control method, wearable equipment and electronic equipment
CN108037889A (en) Location regulation method, terminal and the computer-readable recording medium of virtual key
CN105260167A (en) Method and device for controlling terminal
CN109669567B (en) Control method and terminal
CN105892842A (en) Screen touch method and device
CN105654531A (en) Method and device for drawing image contour
CN105278832B (en) A kind of terminal and its control method
CN106951108B (en) Virtual screen implementation method and device
CN111028494B (en) Virtual remote control method of electrical equipment, computer readable storage medium and intelligent household appliance
CN105302310B (en) A kind of gesture identifying device, system and method
CN105487801B (en) Progress bar adjusting method and mobile terminal
CN110908498A (en) Gesture associated control function method and terminal equipment
CN113625878A (en) Gesture information processing method, device, equipment, storage medium and program product
CN108363525B (en) Method and device for responding to user gesture operation in webpage and terminal equipment
CN114851959B (en) Light adjusting method and light adjusting system for vehicle
CN116954549B (en) Audio processing method and device and electronic equipment
CN110349531A (en) A kind of brightness control method, device and the computer equipment of line control machine screen
US9860480B2 (en) Method for processing information and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant